Those working on this mod do so in their own free time and for no pay.
Show your support for them by enabling ads on this site!

Post reply

Warning: this topic has not been posted in for at least 100 days.
Unless you're sure you want to reply, please consider starting a new topic.
Name:
Email:
Subject:
Message icon:

Verification:
Type the letters shown in the picture
Listen to the letters / Request another image

Type the letters shown in the picture:
What is the name of the planet we live on? Type it backwards then add a 5.:
Who is taking revenge? (lowercase):

shortcuts: hit alt+s to submit/post or alt+p to preview


Topic Summary

Posted by: DragonNation5523
« on: April 18, 2018, 10:56:47 PM »

The specific script controlling fighter spawns is GameObjectLibrary.lua. this will give info on each ship: if they spawn fighters, and what fighters and how much
Posted by: Dark_Canuck
« on: April 18, 2018, 04:49:06 PM »

Ah, understood. Thanks for the quick reply!
Posted by: Corey
« on: April 18, 2018, 10:43:23 AM »

Fighter spawns in ICW are handled through a new LUA script, not the in-unit code. This allows us to change them based on which faction controls them (so they can be switched after boarding) and to call them back during single-unit retreat.
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.
Those working on this mod do so in their own free time and for no pay.
Show your support for them by enabling ads on this site!