Problem with Mod-Translation

Started by The_F, March 22, 2018, 12:59:30 PM

Previous topic - Next topic

The_F

Hello.

I'm actually making my very first steps into rimworld modding and started with making translations for some small mods, I use.

At the moment, i try to make a translation for the Dinosauria-Mod but ran into a problem and can't figure out, what I'm doing wrong.
I'm pretty sure, it's something very silly, but I need your help to find out, what exactly.

The Original Dinosauria Mod has no translation yet. For example, there is a file
.../Defs/ThingDefs_Items/Items_Resource_Dinosauria_Items.xml

So I created a new folder in the mod directory
Languages/German/DefInjected/ThingDefs_Items/ with a similar file 'Items_Resource_Dinosauria_Items.xml'

In that xml-file i created a headline
<?xml version="1.0" encoding="UTF-8"?>

followed by... (example)

<LanguageData>
   <EggTyrannosaurusRexFertilized.label>my translation</EggTyrannosaurusRexFertilized.label>
   <EggTyrannosaurusRexFertilized.description>my translation</EggTyrannosaurusRexFertilized.description>
</LanguageData>

But when I start Rimworld with the mod, i get the following error in the log:

Error loading language from ...\Languages\German: dir ThingDefs_Items doesn't correspond to any def type.

The file name of the original .xml and the translation .xml is exactly the same. The folder-structure aswell. I also looked up, if the defs are written correctly. Any idea, what's causing the problem here?

Best regards!

F.

jamaicancastle

The folder structure doesn't have to match. Instead, the folder where you put your translation file should be the type of def you're translating. In this case, it would be ThingDef, making your complete path "YourModFolder/Languages/German/DefInjected/ThingDef/Items_Resources_Dinosauria_Items.xml". If you're translating a research project, it goes in ResearchProjectDef, etc.

The_F

Oh my god. This information solves so many issues for me.

I had no idea, why some translations worked and others not. So I have to orientate on the existing (language)-folder structure in the Rimworld "Core-Mod".

Thank you very much!