Additive Mod Behavior - Crashes on Possible Cyclical Logic

  • Game Version: Premium

  • Build Number: 1.00.18.49472.0 (573760R)

  • Platform: Steam

  • Operating System: Windows 10

Issue:

Possible cyclical techtree behaviors cause the game to crash on startup, when the “breaking” changes are applied after booting the game and tested thoroughly in-game, it will not crash.

Trigger Event:

Basically I have something for normal line upgrades to research their “equivalent” of the Egyptian lines, since they are different:

<tech name="EgyptianLineUpgradeMediumAxemen_Extension">
		<status>UNOBTAINABLE</status>
		<flag>Volatile</flag>
		<flag>HideAllNotifications</flag>
		<prereqs>
			<techstatus status="active">ArchaicAgeEgyptian</techstatus>
			<techstatus status="active">MediumAxemen</techstatus>
		</prereqs>
		<effects>
			<effect type="TechStatus" status="active">MediumInfantry</effect>
		</effects>
	  </tech>
	  <tech name="EgyptianLineUpgradeMediumSpearmen_Extension">
		<status>UNOBTAINABLE</status>
		<flag>Volatile</flag>
		<flag>HideAllNotifications</flag>
		<prereqs>
			<techstatus status="active">ArchaicAgeEgyptian</techstatus>
			<techstatus status="active">MediumSpearmen</techstatus>
		</prereqs>
		<effects>
			<effect type="TechStatus" status="active">MediumInfantry</effect>
		</effects>
	  </tech>

There’s the other side of the dependency for when they aren’t Egyptian and do normal line upgrades instead:

<tech name="EgyptianSyncLineUpgradeMediumInfantry_Extension">
		<status>UNOBTAINABLE</status>
		<flag>Volatile</flag>
		<flag>HideAllNotifications</flag>
		<prereqs>
			<techstatus status="unobtainable">ArchaicAgeEgyptian</techstatus>
			<techstatus status="active">MediumInfantry</techstatus>
		</prereqs>
		<effects>
			<effect type="TechStatus" status="active">MediumAxemen</effect>
			<effect type="TechStatus" status="active">MediumSpearmen</effect>
		</effects>
	  </tech>

Having both present on launching the game will crash after loading the game for a little bit. I assume because cyclical behavior is not handled, even if this can’t realistically be reached in a normal game.

Both must be set to obtainable on any of the ClassicalAgeX techs, X being General or Egyptian etc, it doesn’t matter how it is obtainable, but the problem occurs regardless.

IMPORTANT NOTE: if you apply these changes after the game is loaded, it works perfectly fine.

Repro Steps:

  1. Load the game.
    1. Alternatively, skip the above step 1 to see it briefly load on startup into a crash.
  2. Implement the techtree mod changes.
  3. In the Editor, see the above two techs work normally.