[REQUEST] Target Missile Hotkey
Moderators: Moderators for English X Forum, Scripting / Modding Moderators
-
- Posts: 1225
- Joined: Mon, 12. Dec 05, 07:41
[REQUEST] Target Missile Hotkey
Is this possible? Is it not a total pain to do? Currently fighters have basically 0 defence against 1 hit kill missiles (and I don't call a single use chaff 'defence', given they can usually fire off plenty more missiles than you chaff can deal with)
I know it's possible to shoot them, have done it manually on a few occasions (total pain in the rear though), and turrets are clearly capable of it, given they have a missile defence mode where they (mostly) are able to shoot down incoming missiles fairly easily.
Would just be nice to have another option as a fighter pilot to not get deaded pretty much as soon as someone packing missiles comes at you
I know it's possible to shoot them, have done it manually on a few occasions (total pain in the rear though), and turrets are clearly capable of it, given they have a missile defence mode where they (mostly) are able to shoot down incoming missiles fairly easily.
Would just be nice to have another option as a fighter pilot to not get deaded pretty much as soon as someone packing missiles comes at you
[ external image ]
***modified***
"You can get more of what you want with kind words and a gun, than you can with just kind words" - Al Capone
***modified***
"You can get more of what you want with kind words and a gun, than you can with just kind words" - Al Capone
-
- Posts: 3206
- Joined: Thu, 16. Jul 09, 12:24
Re: [REQUEST] Target Missile Hotkey
Would be nice although it would be even better if there was a mod that simply increased the amount of flares/chaff a ship can carry. Modern fighter craft carry dozen/dozens of flares/chaffs.
-
- Posts: 1225
- Joined: Mon, 12. Dec 05, 07:41
Re: [REQUEST] Target Missile Hotkey
I can probably do this... Just might be a touch... Tedious XD But I might throw one together anyway, but would like a target nearest missile option as wellRequiemfang wrote: ↑Tue, 11. Dec 18, 01:05Would be nice although it would be even better if there was a mod that simply increased the amount of flares/chaff a ship can carry. Modern fighter craft carry dozen/dozens of flares/chaffs.
[ external image ]
***modified***
"You can get more of what you want with kind words and a gun, than you can with just kind words" - Al Capone
***modified***
"You can get more of what you want with kind words and a gun, than you can with just kind words" - Al Capone
-
- Posts: 1225
- Joined: Mon, 12. Dec 05, 07:41
Re: [REQUEST] Target Missile Hotkey
Okay, so looks like that might be a little more... Frustrating than I expected XD Seeing as storage for "countermeasures" aren't defined in the macros (for the majority of the ships anyway), I tried using the add command for patching to see if I could get it to work, no matter what syntax I tried nothing seemed to working
Was trying this (on all the Argon fighters, and then doing new game as Young Gun to test):
Also tried
And even
Also tried using replace instead of add for all 3 of those, yet still didn't end up with more than 1 countermeasure storage :/
If anyone reading this happens to have an idea of where I went wrong, would be appreciated to point me in the right direction
Was trying this (on all the Argon fighters, and then doing new game as Young Gun to test):
Code: Select all
<diff>
<add sel="/macros/macro/properties/storage/@countermeasure"> 20</add>
</diff>
Code: Select all
<diff>
<add sel="/macros/macro/properties/storage">
<countermeasure="20"/>
</add>
</diff>
Code: Select all
<diff>
<add sel="/macros/macro/properties">
<storage countermeasure="20">
</add>
</diff>
If anyone reading this happens to have an idea of where I went wrong, would be appreciated to point me in the right direction
[ external image ]
***modified***
"You can get more of what you want with kind words and a gun, than you can with just kind words" - Al Capone
***modified***
"You can get more of what you want with kind words and a gun, than you can with just kind words" - Al Capone
Re: [REQUEST] Target Missile Hotkey
Hey,argon_emperor wrote: ↑Tue, 11. Dec 18, 02:49If anyone reading this happens to have an idea of where I went wrong, would be appreciated to point me in the right direction
Since the game is already reading the countermeasure value from somewhere (and after searching the game files this file is libraries/defaults.xml) it makes sense to use replace on the existing values rather than to add.
I tested this on small ship class in the defaults.xml with 2 small selection one for the starting storage limit and one for the max limit which i assume is used after making the counter measure mod...not entirley sure on that though, the max countermeasure value is always 4 higher than the original value so i used 20 for normal and 24 for max. (instead of the original values of 1 and max 5)
Here is what my diff file looks like
Code: Select all
<?xml version="1.0" encoding="utf-8"?>
<diff>
<replace sel="//defaults/dataset[@class='ship_s']/properties/storage">
<storage countermeasure="20" deployable="50"/>
</replace>
<replace sel="//defaults/dataset[@class='ship_s']/properties/statistics/max/capacity">
<capacity crew="8" container="3156" solid="1750" liquid="0" ship_m="0" ship_s="0" unit="4" missile="28" countermeasure="24" deployable="54" />
</replace>
</diff>
For the other ships classes you would need to add a few more replacements and change the values, for example to select for ship class XL would be:
Code: Select all
<replace sel="//defaults/dataset[@class='ship_xl']/properties/storage">
<storage countermeasure="50" deployable="450"/>
</replace>
<replace sel="//defaults/dataset[@class='ship_xl']/properties/statistics/max/capacity">
<capacity crew="220" container="20400" solid="0" liquid="0" ship_m="10" ship_s="40" unit="104" missile="400" countermeasure="54" deployable="454" />
</replace>
-
- Posts: 1225
- Joined: Mon, 12. Dec 05, 07:41
Re: [REQUEST] Target Missile Hotkey
Thanks for that, much appreciated!Forleyor wrote: ↑Tue, 11. Dec 18, 06:25Hey,argon_emperor wrote: ↑Tue, 11. Dec 18, 02:49If anyone reading this happens to have an idea of where I went wrong, would be appreciated to point me in the right direction
Since the game is already reading the countermeasure value from somewhere (and after searching the game files this file is libraries/defaults.xml) it makes sense to use replace on the existing values rather than to add.
I tested this on small ship class in the defaults.xml with 2 small selection one for the starting storage limit and one for the max limit which i assume is used after making the counter measure mod...not entirley sure on that though, the max countermeasure value is always 4 higher than the original value so i used 20 for normal and 24 for max. (instead of the original values of 1 and max 5)
Here is what my diff file looks like
Tested in game and I could buy 20 Countermeasures on a discovererCode: Select all
<?xml version="1.0" encoding="utf-8"?> <diff> <replace sel="//defaults/dataset[@class='ship_s']/properties/storage"> <storage countermeasure="20" deployable="50"/> </replace> <replace sel="//defaults/dataset[@class='ship_s']/properties/statistics/max/capacity"> <capacity crew="8" container="3156" solid="1750" liquid="0" ship_m="0" ship_s="0" unit="4" missile="28" countermeasure="24" deployable="54" /> </replace> </diff>
For the other ships classes you would need to add a few more replacements and change the values, for example to select for ship class XL would be:
Hope this helps.Code: Select all
<replace sel="//defaults/dataset[@class='ship_xl']/properties/storage"> <storage countermeasure="50" deployable="450"/> </replace> <replace sel="//defaults/dataset[@class='ship_xl']/properties/statistics/max/capacity"> <capacity crew="220" container="20400" solid="0" liquid="0" ship_m="10" ship_s="40" unit="104" missile="400" countermeasure="54" deployable="454" /> </replace>
So my issues was that I was looking at the complete wrong file XD Was looking in assests/units/size_s ect ect.
[ external image ]
***modified***
"You can get more of what you want with kind words and a gun, than you can with just kind words" - Al Capone
***modified***
"You can get more of what you want with kind words and a gun, than you can with just kind words" - Al Capone
Re: [REQUEST] Target Missile Hotkey
Anytime!
Im pretty sure everything in assets directory is 3D model/texture files, atleast...I know the ship files are lol.
Im pretty sure everything in assets directory is 3D model/texture files, atleast...I know the ship files are lol.
Re: [REQUEST] Target Missile Hotkey
can you use expressions? just replace countermeasure=" with countermeasure="50*
-
- Posts: 1225
- Joined: Mon, 12. Dec 05, 07:41
Re: [REQUEST] Target Missile Hotkey
Nah, if you follow it to the macros folder in each of the size folders for the units, that's where each ship's stats are defined (each in a separate file XD) That's where I had to go to alter the crew for all ships, which is why I thought this would be there too as I'd already messed around in there XD
And now uploaded on Nexus: https://www.nexusmods.com/x4foundations/mods/100/
[ external image ]
***modified***
"You can get more of what you want with kind words and a gun, than you can with just kind words" - Al Capone
***modified***
"You can get more of what you want with kind words and a gun, than you can with just kind words" - Al Capone
Re: [REQUEST] Target Missile Hotkey
Ah, Thats good to knowargon_emperor wrote: ↑Tue, 11. Dec 18, 09:23Nah, if you follow it to the macros folder in each of the size folders for the units, that's where each ship's stats are defined