[1.3.3200] Farm animals wander in fails when an animal without traderTags is def

Started by joseasoler, February 16, 2022, 06:17:30 PM

Previous topic - Next topic

joseasoler

What happened: When the game XMLs contain an animal that could be selected for the "Farm animals wander in" event but is missing the <traderTags> tag in its XML definition, the event will raise an exception and it will not trigger. I found this bug while using mods, but after investigating further I managed to reproduce it without mods.

A Player.log file showing this exception can be found attached to this bug report.

What I expected to happen: The animal without traderTags should be ignored by the event and the event would trigger successfully.

Steps:

1)  Edit Data/Core/Defs/ThingDefs_Races/Races_Animal_SheepGroup.xml and remove the entire <tradeTags> XML block from the definition of the Alpaca.

2) Launch RimWorld.

3) Start a new game.

4) Enable development options.

5) Open the debug actions menu.

6) Click on Do incident(Map)...

7) The debug actions menu is replaced with the debug log, which is showing an error.

Alternate steps:

1)  Edit Data/Core/Defs/ThingDefs_Races/Races_Animal_SheepGroup.xml and remove the entire <tradeTags> XML block from the definition of the Alpaca.

2) Launch RimWorld.

3) Start a new game.

4) Wait until the Farm animals wander in triggers naturally.

5) The event will not finish, and will show a similar exception in the log.



Pheanox

Thanks for the bug report.  After conferring with the devs this is something we can support for mod authors.  It has been put on our bug tracker and will be addressed asap.