Posted by: Dark_Canuck
« on: April 18, 2018, 08:17:00 AM »
I am trying to figure out how the fighter spawn function works in Thrawns Revenge 2.2.
It seems like things have changed since Corey released his video in Oct 2016 on adding fighter bays to ships. I am trying to add a couple extra squadrons to the MC80b and the Quasar, but I cannot figure out how to do it properly, as on the <SPACEBEHAVIOUR> line, there is no SPAWN_SQUADRON function. Currently that section of the XML doc for the MC80B looks like:
<Ship_Class>capital</Ship_Class>
<Formation_Priority>5</Formation_Priority>
<Political_Faction>Rebel</Political_Faction>
<Squadron_Capacity>40</Squadron_Capacity>
<Build_Cost_Credits>4500</Build_Cost_Credits>
<AI_Combat_Power>2030</AI_Combat_Power>
<Build_Time_Seconds>105</Build_Time_Seconds>
<Build_Tab_Space_Units>Yes</Build_Tab_Space_Units>
<Size_Value>360</Size_Value>
<Behavior> SELECTABLE, DUMMY_STARSHIP </Behavior>
<SpaceBehavior>ABILITY_COUNTDOWN, SIMPLE_SPACE_LOCOMOTOR, POWERED, SHIELDED, HIDE_WHEN_FOGGED, REVEAL, TARGETING, UNIT_AI, ASTEROID_FIELD_DAMAGE, ION_STUN_EFFECT, NEBULA, DAMAGE_TRACKING</SpaceBehavior>
<Starting_Spawned_Units_Tech_0>Y-Wing_Squadron, 1</Starting_Spawned_Units_Tech_0>
If I add a SPAWN_FUNCTION and add the ships via the <STARTING_SPAWNED_UNITS_TECH_0>, they will spawn plus the original complement of fighters, plus other ships I didn't ask it to spawn.
For example, with the Quasar, I tried writing it as such and ended up with something like 4 X-Wing Sqns, 3 B-Wing Sqns, 2 Y-Wing Sqns and an A-Wing Sqn for some reason.
<Political_Control>0</Political_Control>
<Squadron_Capacity>10</Squadron_Capacity>
<Transport_Capacity>8</Transport_Capacity>
<Number_per_Squadron>1</Number_per_Squadron>
<Build_Cost_Credits>2100</Build_Cost_Credits>
<AI_Combat_Power>80</AI_Combat_Power>
<Build_Time_Seconds>30</Build_Time_Seconds>
<Build_Tab_Space_Units>Yes</Build_Tab_Space_Units>
<Size_Value>8</Size_Value>
<Behavior> DUMMY_STARSHIP, SELECTABLE </Behavior>
<SpaceBehavior>ABILITY_COUNTDOWN, SIMPLE_SPACE_LOCOMOTOR, SPAWN_SQUADRON, TARGETING, POWERED, SHIELDED, REVEAL, HIDE_WHEN_FOGGED, UNIT_AI, ASTEROID_FIELD_DAMAGE, DAMAGE_TRACKING, ION_STUN_EFFECT, NEBULA</SpaceBehavior>
<Starting_Spawned_Units_Tech_0>Rebel_X-Wing_Squadron, 2</Starting_Spawned_Units_Tech_0>
<Starting_Spawned_Units_Tech_0>B-Wing_Squadron, 2</Starting_Spawned_Units_Tech_0>
<Spawned_Squadron_Delay_Seconds>2</Spawned_Squadron_Delay_Seconds>
The only thing I can think of is that the reference to Y-Wing_Squadron, 1 no longer means a Y-Wing_Squadron, but possibly a generic group of fighters.
Any ideas or advice would be most welcome.