Whats is the problem with my "first mod try" ?

Started by ThiiSoul, February 09, 2019, 08:52:32 PM

Previous topic - Next topic

ThiiSoul

I'm trying to create a mod to change the texture of some Rimworld vanilla "instruments" to start and see if I succeeded I got "Eletric Stove" as an example, but I'm not having a change in texture, I just changed the icon, anyone more familiar with Mods and more knowledge that I could inform me what I'm missing?  :'(

[attachment deleted due to age]

Pelador

Your using old terminology with the naming conventions for the building graphics with the use of "_side" and "_back" etc. (which would also normally include a "_front").

More recent versions of Rimworld changed this convention to now use: "_east" "_north" "_south" "_west", with the minimal set including "_east" and "_north" definition, but best to include all compass points to accommodate the best rotational elements.

(The compass point convention relates to the pawns direction or facing in relation to the use of the building. So "_north" would be as if the pawn was facing the building in an upwards direction with their back to the screen.)

Pelador

Side thought: My experience is also related to the definition of new items so not fully familiar with the process of changing vanilla definitions. But without changing the path or name of the item in question this may also have difficulty in distinguishing from the vanilla definitions.

So I'd suggest using an alternative name like TSoulElectricStove for the graphics and changing the folder path. This will make your items distinct from vanilla.

In all cases it would also be best to use xpathing tools to patch just the graphics texpath definition of the thingdef as opposed to including a full copy of the thingdef. This is to avoid changes with vanilla and also to avoid corrupting the items with a completely new definition should other mods also wish to change elements of the definition which your mod would have the possibilty of overriding these by applying complete definitions.

So in a mod folder "Patches" you would include an XML file similar to the Defs but with tags <Patch> </Patch> instead of <Defs> </Defs>.

And include the following:

<Operation Class="PatchOperationReplace">
<xpath>*/ThingDef[defName="ElectricStove"]/graphicData/texPath</xpath>
<value>
<texPath>Things/Building/Production/TSoulElectricStove</texPath>
</value>
</Operation>