Duplicate defName Conflict

Started by RedTheHusky, February 07, 2015, 12:57:48 PM

Previous topic - Next topic

RedTheHusky

Dont know if this was done. If it was, please can you send me the link.
I got anoyed when a mod overrides a WorkGiverDef, so I made this application that finds duplicated defNames.
The first button makes an list of all XML files.
https://www.dropbox.com/s/tcihpi7zmxegwoe/2-7-2015%207-24-30%20PM.png?dl=0
The second button reads the XML list and makes a defNameList
https://www.dropbox.com/s/sesbbq5hp1ibk77/2-7-2015%207-24-39%20PM.png?dl=0
And the last one checks if defNames duplicate
https://www.dropbox.com/s/objw6w642cwcde0/2-7-2015%207-24-50%20PM.png?dl=0

Of course i could have made it in just one button , but what if you wanted to see all the defNames, not just the duplicated ones.
Dosent check folder "texture", "assemblies", "languages" and "about".
Also dosent check folder "core" but i will (maybe) add an option to check it.
To use it, you need to put it in your game folder.
I added a bit funny error messages  :P
Quote
Empty! Hmmm. Thats bad.
Are you sure you put int in the right folder?
Try again?"

I have a question. If a defName x exist in ThingDefs and in ResearchProjectDefs, will one override the another or that only happens if both are the same type(ThingDefs ThingDefs ) ?

[attachment deleted due to age]

yokai

Very nice work. So looking for problems why the mod dont run will be easier ;D

1000101

Quote from: RedTheHusky on February 07, 2015, 12:57:48 PMI have a question. If a defName x exist in ThingDefs and in ResearchProjectDefs, will one override the another or that only happens if both are the same type(ThingDefs ThingDefs ) ?

defNames have to be unique in a class, but each class could have a def of the same name.  The core DesignationDefs and their associated DesignatorDefs tend to use the same defName.  Note, the DesignatorDefs for the core Designations are "hidden" in code. They do exist but don't have an xml representation (look in Assembly-CSharp).
(2*b)||!(2*b) - That is the question.
There are 10 kinds of people in this world - those that understand binary and those that don't.

Powered By

Adamiks

Don't working for me (i can't even run this). I have windows 7 and i put this into Rimworld785 folder.

mora145