It is NOT used for ships which are destroyed as a result of battle, scrapped, destroyed by an intel attack or annihilated because of entering a one-way wormhole.
Subroutine 4491D0 is called from eight locations, depending on the cause of the ship removal:
- 45E019: unknown.
- 46828F: removal of 1 troop transport from a task force after a succesful invasion. Also used for removal of all troop transports from a task force after a failed invasion attempt. The ship role "troop transport" (0x09) is stored at position 46827F and can be changed to affect a different ship role instead. If no ship with the respective role is present, then no ship is removed.
- 4686BF: destruction by orbital battery fire. Removing this call makes OBs unable to destroy any ships.
- 468774: unknown.
- 468D0F: removal of 1 troop transport from a task force after the completion of an outpost or a starbase. At position 468C55 the role "troop transport" is stored to determine which kind of ship can add production points to outpost/starbase construction.
- 469CD2: removal of 1 colony ship from a task force when colonising a system.
- 46BD1D: destruction by a neutron star.
- 46BF3A: destruction by a black hole.
Code: Select all
value(dec) ship_role 95 0x00 // scout 80 0x01 // destroyer 15 0x02 // cruiser 10 0x03 // artillery 5 0x04 // battleship 50 0x05 // colony ship 70 0x09 // troop transport