Jump to content

UFO Salvage


Hobbes77

Recommended Posts

So, wow, this is more complex than I thought... which If I thought about it a bit more I'd realize it had to be so, as EMP vs regular weapons alter (at the strategy level) the chances of the various UFO power source / UFO navigation elements being already replaced with destroyed versions when the crash mission initializes.

 

Did a little more digging based on the above strategy function and found that the arrSalvage structure is used in both CreateCrashMission and CreateLandedUFOMission via a line like :

   kMission.m_arrArtifacts = kUFO.m_kTShip.arrSalvage;

The function DetermineCrashLoot handles the replacement of undamaged items (in the item ID range 165-170 for EW) with damage items (in the item ID range 172-177), along with the alloys and elerium.

 

Presumably on mission startup this is used to initialize the destructable actors within the UFO. However what is unclear is what happens if the strategy number doesn't match the total number of specified actors within the mapfile (e.g. if the strategy game specifies 1 or 3 UFO power sources on a small scout map).

 

I've resumed what I've glanced from all the functions mentioned here

 

Why should the strategy number be different from the number of actors within the mapfile? The only reason I can imagine would be if a Power Source was completely destroyed but that never happens since they always captured, even if damaged.

Link to comment
Share on other sites

 

 

Why should the strategy number be different from the number of actors within the mapfile? The only reason I can imagine would be if a Power Source was completely destroyed but that never happens since they always captured, even if damaged.

 

 

If I'm reading it right, the number of UFO artifacts is first generated in the strategy game in the DetermineShipSalvage, which is only undamaged items. This is then modified by DetermineCrashLoot, potentially changing some undamaged items into damage items.

 

This info is then passed to the tactical game via the XGStrategyGameTransport class. Presumably during map initialization this information is used to replace undamaged actors with damaged actor items.

 

So the question is : what happens if someone mods the StrategyGame to specify a number of UFO elements that doesn't correspond to the number defined within the mapfile? Specifically, during the map initialization ...

Link to comment
Share on other sites

 

 

 

Why should the strategy number be different from the number of actors within the mapfile? The only reason I can imagine would be if a Power Source was completely destroyed but that never happens since they always captured, even if damaged.

 

 

If I'm reading it right, the number of UFO artifacts is first generated in the strategy game in the DetermineShipSalvage, which is only undamaged items. This is then modified by DetermineCrashLoot, potentially changing some undamaged items into damage items.

 

This info is then passed to the tactical game via the XGStrategyGameTransport class. Presumably during map initialization this information is used to replace undamaged actors with damaged actor items.

 

So the question is : what happens if someone mods the StrategyGame to specify a number of UFO elements that doesn't correspond to the number defined within the mapfile? Specifically, during the map initialization ...

 

 

boooommm? :)

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...