On using StationTypeOverride to change the guns on sung fortress walls, I found that they had become impossible to destroy and unable to fire their weapons. Salvagers also navigated to them as if they were abandoned (though they did not appear destroyed visually).

Sung defense towers use a base class store certain values, including their hitpoints. When using StationTypeOverride, this base class is not inherited correctly and the object thus does not load the hitpoint value, causing the observed problems.

To verify that StationTypeOverride was the source of the issues, I altered one wall to use the old method of overriding stations, and found that it worked correctly. This appears to indicate a core engine problem with StationTypeOverride.

To replicate: Using Elemental Shift 0.97PR7 or 0.97PR8, start a new game and spawn a sung fortress. Fire on the walls: in PR7 all four walls will be immune to taking damage (and not fire back). In PR8, all but the northwest wall (which uses a StationType rather than StationTypeOverride to change the gun) will be affected.

Note: NPCs such as salvager nomads interacting with the undead walls can result in game crashes.

the_shrike 27 Jan 2022:

In Elemental Shift 0.97PR8, the code for the sung walls is stored in ES-StationsCore.xml, starting at line 2130 (with dummied-out code for the StationTypeOverride of the NW wall before the live code).

george moromisato 2 Feb 2022:

Thank you! This is definitely a bug in the engine. The problem is that we don't handle overriding types that also inherit from some other type.

I've fixed this in 2.0 Alpha 1. I'll make a new build available soon.