Jump to content

Modded Elements Have Incorrect nameTag


asquared31415
  • Branch: Live Branch Version: Windows Fixed

This affects all platforms and all versions of the game, including live branch and beta branch.

`ElementLoader.ManifestSubstanceForElement` contains code that assigns a `nameTag` to any substance that it processes.  For elements that are included in the game's `SimHashes` it works fine, it uses a tag created from the element's `id`.  But for modded elements, for some reason the code has a special case that creates a tag from the localized name of the element.  This ends up causing crashes if the element's name is not exactly the same as its internal ID.  The correct code would set `tagName` to `GameTagExtensions.Create(elem.id)` in all cases.

The crashes occur because the game uses the value of `nameTag` as the prefab ID to search for, when the correct prefab ID is the element's ID.


Steps to Reproduce

0. Attached is a mod that creates a single test element named "Testing Element" for testing
1. Create a new solid element, but don't correct the `nameTag` manually.
2. Place the element in the world.
3. Dig the element.
4. Crash.

ElementBug.zip

  • Like 3



User Feedback


A developer has marked this issue as fixed. This means that the issue has been addressed in the current development build and will likely be in the next update.

Changed Status to Fixed

It will be changed to the following in the next update. It's been tested with your example mod (thanks!) and the Chemical Processing mod.

elem.substance.nameTag = elem.tag;
  • Big Ups 1

Share this comment


Link to comment
Share on other sites



Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
  • Create New...