I am on my way to updating my Glasworks mod but am encountering an issue that I dont know how to resolve as the error does not point to where the error is.
Error:
RimWorld 0.18.1722 rev1198
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)
Platform assembly: C:\Program Files (x86)\Steam\steamapps\common\RimWorld\RimWorldWin_Data\Managed\System.Xml.Linq.dll (this essage is harmless)
Could not resolve cross-reference: No RimWorld.StatDef named MeleeWeapon_Cooldown found to give to RimWorld.StatModifier (null stat)
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)
Could not resolve cross-reference: No RimWorld.StatDef named MeleeWeapon_Cooldown found to give to RimWorld.StatModifier (null stat)
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)
Could not resolve cross-reference: No RimWorld.StatDef named MeleeWeapon_Cooldown found to give to RimWorld.StatModifier (null stat)
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)
Cannot call ItemFromXmlFile with resolveCrossRefs=true while loading is already in progress.
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)
Could not resolve cross-reference: No RimWorld.StatDef named MeleeWeapon_Cooldown found to give to RimWorld.StatModifier (null stat)
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)
Could not resolve cross-reference: No RimWorld.StatDef named MeleeWeapon_Cooldown found to give to RimWorld.StatModifier (null stat)
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)
Could not resolve cross-reference: No RimWorld.StatDef named MeleeWeapon_Cooldown found to give to RimWorld.StatModifier (null stat)
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)
Cannot call ItemFromXmlFile with resolveCrossRefs=true while loading is already in progress.
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)
Could not resolve cross-reference: No RimWorld.StatDef named MeleeWeapon_Cooldown found to give to RimWorld.StatModifier (null stat)
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)
Could not resolve cross-reference: No RimWorld.StatDef named MeleeWeapon_Cooldown found to give to RimWorld.StatModifier (null stat)
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)
Could not resolve cross-reference: No RimWorld.StatDef named MeleeWeapon_Cooldown found to give to RimWorld.StatModifier (null stat)
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)
Cannot call ItemFromXmlFile with resolveCrossRefs=true while loading is already in progress.
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)
Could not resolve cross-reference: No RimWorld.StatDef named MeleeWeapon_Cooldown found to give to RimWorld.StatModifier (null stat)
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)
Could not resolve cross-reference: No RimWorld.StatDef named MeleeWeapon_Cooldown found to give to RimWorld.StatModifier (null stat)
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)
Could not resolve cross-reference: No RimWorld.StatDef named MeleeWeapon_Cooldown found to give to RimWorld.StatModifier (null stat)
(Filename: C:/buildslave/unity/build/artifacts/generated/common/runtime/DebugBindings.gen.cpp Line: 51)
I have no clue where this cross-reference error is happening in my code as I dont touch anything close to Weapons. Code can be provided but I was hoping somone could see my glaring mistake from the error.
If your mod is using a modded stuff (and I suppose it is for glass). Look in your stuff def.
I think you may be using old syntax from A17 in <statFactors>
As an example, in Defs/ThingDefs_Items/Items_Resource_Stuff.xml, in the bit about silver there is a similar statdef used.
I think it may have changed between A17 and B17.
Although not the problem directly, it did point me to the right file. It seems I accidentally left some code in the xml file when I was testing to make the glass items melee weapons, a long time ago. Thank you for helping me out with it.