Impossible to set secondary warheads other than Concussion Missile?
Impossible to set secondary warheads other than Concussion Missile?
-
- Posts: 52
- Joined: Sun Aug 25, 2019 10:02 pm
It seems that when a second set of warhead launchers is added, its always a (standard) Concussion Missile launcher. It just seems impossible to set it to anything else (Advanced Missile, Torpedo, Advanced Torpedo...) - editing the OPT, editing the weaponry with MXvTED... have no effect on this.
Of course, there's no interface to select the secondary weapons type in-game... and I don't think this one absolutely needs to change. But at least, in TIE Fighter for example, the Missile Boat had Advanced CMs (not the near-useless standard CMs).
I'd assume this behavior hard-coded. Would there be a way (through a new Hook?) to make the game read the ship information; so that the weapons type of this second launcher becomes editable?
Of course, there's no interface to select the secondary weapons type in-game... and I don't think this one absolutely needs to change. But at least, in TIE Fighter for example, the Missile Boat had Advanced CMs (not the near-useless standard CMs).
I'd assume this behavior hard-coded. Would there be a way (through a new Hook?) to make the game read the ship information; so that the weapons type of this second launcher becomes editable?
- Jaeven
- Posts: 578
- Joined: Mon Mar 30, 2015 3:18 am
This would be a really interesting idea. CC: Jeremya
- JeremyaFr
- Posts: 4007
- Joined: Mon Jan 18, 2010 5:52 pm
- Contact:
You are right.
At address 0041BBF0, there is this code:
Code: Select all
if( s_ExeCraftTable[esp18].WarheadTypeId[1] != ModelIndex_000__1_0 )
{
s_pXwaCurrentCraft->WarheadsModelIndex[0] = ModelIndex_287_1_25_ConcussionMissile;
s_pXwaCurrentCraft->WarheadsModelIndex[1] = s_XwaTieWarheadTypeToModelIndex[s_XwaTieFlightGroups[s_V0x09E9708].FlightGroup.WarheadType];
}
else
{
s_pXwaCurrentCraft->WarheadsModelIndex[0] = s_XwaTieWarheadTypeToModelIndex[s_XwaTieFlightGroups[s_V0x09E9708].FlightGroup.WarheadType];
s_pXwaCurrentCraft->WarheadsModelIndex[1] = ModelIndex_000__1_0;
}
-
- Posts: 52
- Joined: Sun Aug 25, 2019 10:02 pm
Wow! Thanks for the quick analysis and confirmation.
Now the question is, could this be modified so it reads the "real" value (patched to the EXE with MXvTED and/or read from the OPT) instead of the default replacement? Or have an an external config file that'd determine what the weapons replacement should be...
Now the question is, could this be modified so it reads the "real" value (patched to the EXE with MXvTED and/or read from the OPT) instead of the default replacement? Or have an an external config file that'd determine what the weapons replacement should be...
- Trevor
- Posts: 541
- Joined: Thu Dec 04, 2014 7:11 pm
Wow, Jeremy, it looks like you are doing a full decompile of xwa, eventually we wont need hooks
Trev
Trev
-
- Posts: 1170
- Joined: Mon Apr 05, 2004 11:01 pm
Turgidson, have you tried using the AlliED mission editor? The Ship Tab and Options tab? I would think if the .opt model and offsets are setup already (try BHE) this would allow you achieve the second load of 40 adv. mis. so Missible Boat would have it's 80 adv. mis. or whatever. I don't recall how many of payload you can specify. Maybe I'm wrong but thought this was already do-able.
W-I-P: TFTC, MC Viscount Cr., ISD-II Avenger, NL-1 Platform, Ton-Falk Esc. Cr., & Misc.
- Mark_Farlander
- Posts: 580
- Joined: Tue Jan 16, 2018 10:47 pm
With BinHexEdit or MXvTED v4.2 you can specify 2 warhead loads with their respective per-launcher payloads. Fighters usually have 2 launchers for each warhead load.
However, as soon as the mission or skirmish is loaded, if the craft has only 1 warhead load in MXvTED it is replaced with the load set in AlliED for that Flight Group.
If the craft has 2 warhead loads in MXvTED the first load is replaced with standard concussion missiles and the second one is replaced with the load set in AlliED.
I suspected this logic, but now the code posted by Jeremy leaves without any doubt.
However, as soon as the mission or skirmish is loaded, if the craft has only 1 warhead load in MXvTED it is replaced with the load set in AlliED for that Flight Group.
If the craft has 2 warhead loads in MXvTED the first load is replaced with standard concussion missiles and the second one is replaced with the load set in AlliED.
I suspected this logic, but now the code posted by Jeremy leaves without any doubt.
I don't judge tactics. The Battle is the best and only Judge.
- Mark_Farlander
- Posts: 580
- Joined: Tue Jan 16, 2018 10:47 pm
As I just wrote, the code posted by Jeremy essentially means that the warhead types set with MXvTED v4.2 do not matter.
It's the load you set with AlliED, Ship menu, or in the simulator that determines the only (or the second) warhead load.
As far as I know the Options menu in AlliED only serves to allow the player to REPLACE what's set in the Ship menu.
Player can change craft with an optional one, or he can load another warhead type, beam system or countermeasure.
But any selection he will do in the hangar, it will remove the default one (the one set in the Ship menu).
Any changes done while player's craft is in the hangar will only affect player's craft, not the other crafts in his FG.
It's the load you set with AlliED, Ship menu, or in the simulator that determines the only (or the second) warhead load.
As far as I know the Options menu in AlliED only serves to allow the player to REPLACE what's set in the Ship menu.
Player can change craft with an optional one, or he can load another warhead type, beam system or countermeasure.
But any selection he will do in the hangar, it will remove the default one (the one set in the Ship menu).
Any changes done while player's craft is in the hangar will only affect player's craft, not the other crafts in his FG.
I don't judge tactics. The Battle is the best and only Judge.
-
- Posts: 52
- Joined: Sun Aug 25, 2019 10:02 pm
So without a hook, no chance to set the other warhead load on the type written in MXvTED (or in any other external file).
- Driftwood
- Posts: 2174
- Joined: Wed Oct 22, 2003 11:01 pm
- Contact:
As I'm reading it can only be changed on a "per mission basis" in allied.
Correct me if I'm wrong.
Correct me if I'm wrong.
- Mark_Farlander
- Posts: 580
- Joined: Tue Jan 16, 2018 10:47 pm
No, if a craft has 2 warhead loads then the first one is always set to standard concussion missiles regardless of the warhead load set in MXvTED or AlliED.
JeremyaFr wrote: ↑Sun Sep 29, 2019 4:44 pmYou are right.
At address 0041BBF0, there is this code:When 2 warheads are defined, one is replaced with a Concussion Missile.Code: Select all
if( s_ExeCraftTable[esp18].WarheadTypeId[1] != ModelIndex_000__1_0 ) { s_pXwaCurrentCraft->WarheadsModelIndex[0] = ModelIndex_287_1_25_ConcussionMissile; s_pXwaCurrentCraft->WarheadsModelIndex[1] = s_XwaTieWarheadTypeToModelIndex[s_XwaTieFlightGroups[s_V0x09E9708].FlightGroup.WarheadType]; } else { s_pXwaCurrentCraft->WarheadsModelIndex[0] = s_XwaTieWarheadTypeToModelIndex[s_XwaTieFlightGroups[s_V0x09E9708].FlightGroup.WarheadType]; s_pXwaCurrentCraft->WarheadsModelIndex[1] = ModelIndex_000__1_0; }
Mark_Farlander wrote: ↑Wed Oct 02, 2019 7:19 amWith BinHexEdit or MXvTED v4.2 you can specify 2 warhead loads with their respective per-launcher payloads. Fighters usually have 2 launchers for each warhead load.
However, as soon as the mission or skirmish is loaded, if the craft has only 1 warhead load in MXvTED it is replaced with the load set in AlliED for that Flight Group.
If the craft has 2 warhead loads in MXvTED the first load is replaced with standard concussion missiles and the second one is replaced with the load set in AlliED.
I suspected this logic, but now the code posted by Jeremy leaves without any doubt.
I don't judge tactics. The Battle is the best and only Judge.
- Mark_Farlander
- Posts: 580
- Joined: Tue Jan 16, 2018 10:47 pm
There is a thing that needs to be tested: as I wrote in the file "Orders (Basic)" for the AlliED modding wiki, the third box (No Effect?) of the order "Attack targets" is warhead usage.
0 is default: the FG fires concussion missiles (standard or advanced) only against fighters, proton torpedoes or heavy rockets only against transports, capital ships and stations.
[See the values in the Warhead - Behavior section in BinHexEdit to get the default usage for every warhead type]
1 is "All targets": the FG fires warheads against every target regardless of target category while performing such order.
2 is "Never": the FG never fires warheads while performing such order.
However, this is true (has been tested many times) for crafts set to carry only one load of warheads in MXvTED, and that load is replaced with the one set in AlliED.
But how does that logic work for crafts set to carry 2 loads of warheads such as the Missile Boat or the Skipray Blastboat?
I mean if the second warhead load is proton torpedoes (the first load is always standard concussion missiles) and you set the third box to 1, how do crafts behave?
The most logic thing would be to use missiles against fighters and proton torpedoes against capital ships, transports and stations just like default, but this needs to be tested.
0 is default: the FG fires concussion missiles (standard or advanced) only against fighters, proton torpedoes or heavy rockets only against transports, capital ships and stations.
[See the values in the Warhead - Behavior section in BinHexEdit to get the default usage for every warhead type]
1 is "All targets": the FG fires warheads against every target regardless of target category while performing such order.
2 is "Never": the FG never fires warheads while performing such order.
However, this is true (has been tested many times) for crafts set to carry only one load of warheads in MXvTED, and that load is replaced with the one set in AlliED.
But how does that logic work for crafts set to carry 2 loads of warheads such as the Missile Boat or the Skipray Blastboat?
I mean if the second warhead load is proton torpedoes (the first load is always standard concussion missiles) and you set the third box to 1, how do crafts behave?
The most logic thing would be to use missiles against fighters and proton torpedoes against capital ships, transports and stations just like default, but this needs to be tested.
I don't judge tactics. The Battle is the best and only Judge.