Create Mod to Replace Core Graphics

Started by jabbamonkey, October 23, 2014, 09:15:49 AM

Previous topic - Next topic

jabbamonkey

Everytime I finish playing the game, I end up recreating one of the graphic elements. At this point, I've replaced a ton of items, and plan of changing others. This is a strictly aesthetic change (since I'm a designer, and not a programmer).

I saw in other posts, that if I wanted to replace core graphics, I just need to place the png graphics in the mods/core folder. For example:
Mods/Core/Textures/Things/Building/Production/TableStonecutter.png
Of, if I wanted to replace the graphics for someone's mod, I would just replace the image in their mod folder.

I want to actually create a mod that will replace these elements (so I can share the graphics with others. Can someone help me with this?  I saw some tutorials online, but they were mainly for creating NEW items ... Can someone show me how to replace one item, and I will run through the rest?

Here is a small taste...

Nutrient Displenser


Butcher Table


Electric Sawmill


Stonecutter Table


All these were created by me. Feel free to use them for your own game. Please ask permission if you want to add these to any mods of your own.

mrofa

Well its quite easy, you just got to Mods/Core/Defs/Thingdefs/ and copy stuff from .xml files your interested into your own mod and change the graphic path to your texture folder.
As long as <Defname> of things in your mod xml is the same as the one in vanillia xml, your will replace vanillia things :)
All i do is clutter all around.

jabbamonkey

Cool. I'll try that out.

What about other Mods. For example, I use "Tech Tree Minami A7" and have been replacing the images in that mod. I don't want my mod to "conflict" with their mod ... I just want it to use my image paths. How do I make sure my mod file is used for the images?

Rikiki

Replace the original mod image by yours in "ModNameFolder\Textures\...\PathToTheImageToReplace.png"

You cannot only create "texture pack" for now but you can provide alternative "textures folder" content for each mod. :)
People interrested just need to grab it and put it in the Textures folder.

mrofa

Well as much as i did read alot about minami stuff, i never actually played it so its hard to say. But basicly if his mod changes vanillia stuff, and you want that stuff to have your texture you would need change the texture path in his mod mod directly, other method to that would require you to make your own defs with the same def name and copy parts of his mod int your mod, and then set your mod to be the last on the mod list so that your changes will be applied last and will overwrite previous changes.
And the last method would be just to send the textures to miniami so he would incorporate them in his mod :)
All i do is clutter all around.

jabbamonkey

I'd be worried about updates ... so if minami updated his mod, then I've have to download the new updated mod, and then replace the images/paths again and again. I'll send him my stuff when I get further along...

jabbamonkey

One more thing... the Def files have ALOT of information in them. Can I just use the new image path, and have the original CORE files supply the rest of the information (in case in changes in the future). So for the Hopper, I would do this...

  <ThingDef ParentName="BuildingBase">
    <defName>Hopper</defName>
    <graphicPathSingle>J-GraphicPack/Things/Building/Production/Hopper.png</graphicPathSingle>
  </ThingDef>

... and exclude the rest of the info (assuming that excluded info gets pulled from the core files)?

mrofa

Nope you need to copy everything from <ThingDef> to </ThingDef>
All i do is clutter all around.

Shinzy

I feel the best way to do these would to make separate "Textures" folders
with your textures in the right paths
and then just guide the user to replace the mod's original textures folder with it

It's much more convenient for you this way, and it's on the acceptable levels of work for anyone who wishes to use the textures

cause with the defs there will be ungodly amounts of work and you'd need to redo most of it on every update, while just the Texture paths might never change

darktakayanagi

Quote from: Shinzy on October 23, 2014, 02:03:45 PM
I feel the best way to do these would to make separate "Textures" folders
with your textures in the right paths
and then just guide the user to replace the mod's original textures folder with it

It's much more convenient for you this way, and it's on the acceptable levels of work for anyone who wishes to use the textures

cause with the defs there will be ungodly amounts of work and you'd need to redo most of it on every update, while just the Texture paths might never change
i agree with this.
u should supply ur textures as a mod, just have instructions so that instead of extracting to the mods folder, we have to extract to the core folder.

great textures btw, 10/10 would replace again :)

jabbamonkey

Yeah, I just realized that by "creating my own mod", I was deactivating certain features of other mods. This was causing some issues. So, I'll move everything to the core folders and not worry about the xml.

JuliaEllie

And again the keyword is .dll Def injection :D You only need to change the filepath of a ThingDef on runtime via .dll and everything will run smoothly and independent of other mods.

Morgrav

I too am interested in modifying some of the core graphics, but I'm having difficulty finding the core graphics folder.

So far I have found

RimWorldAlpha7cWin\RimWorld584Win\Mods\Core

but it only has a single Muffalo file.  Am I looking in the wrong place?

(Nice art by the way Jabbamonkey!)

Shinzy

#13
Quote from: Morgrav on October 25, 2014, 03:30:10 PM
I too am interested in modifying some of the core graphics, but I'm having difficulty finding the core graphics folder.

So far I have found

RimWorldAlpha7cWin\RimWorld584Win\Mods\Core

but it only has a single Muffalo file.  Am I looking in the wrong place?

(Nice art by the way Jabbamonkey!)

The vanilla art isn't in straight up image form in the files anywhere but there's a thread with all the alpha 6 textures in there, lemme go hunt it for you
It'll show the folder structure of the textures really well! although some of them ain't in the correct format
like there's lot of PSD files and ofcourse all the alpha 7 textures missing from there and what not
but it would help with your task regardless!

imma plop the link to the thread in a bit!
oh It's actually in this very subforum =P (that was fun search :-[)
anyway here's the link
https://ludeon.com/forums/index.php?topic=2325.0

Morgrav

Thanks Shinzy.  I actually downloaded that first.  I just didn't know how to use it.  Just to be clear, I copy what ever I change from there in to the Mods/core folder and make sure it's PNG?