Texture modding for a confused newb...

Started by TitchWitch, September 06, 2015, 03:24:47 PM

Previous topic - Next topic

TitchWitch

Hi there,
I only recently discovered Rimworld and I'm really enjoying it (not sure how I missed hearing anything about it before now because I love games like this!)

I've seen on the forum that people are making some cool new textures and graphics and I'd really love to have a go at that too... but there's a tiny stumbling block. I have absolutely no idea how to mod games and code scares me!
I work as a graphic designer/ illustrator so I know how to do the drawing part... it's just how to magically get those drawings into a game where I come unstuck.
I've been reading through some of the posts here and trying to figure it out, but I'm not sure if things changed for the latest update since the tutorials were made? (I noticed the tutorials were labelled obsolete now, and some of the stuff in a graphics pack I got from here didn't seem like stuff from the game now)

Could anyone explain it for me as if you were trying to explain it to a slowpoke colonist with a brain problem?! Or point me in the right direction of a tutorial that will work with the current build...
I'd be working on a Mac using illustrator and photoshop and I'd like to be able to test graphics out as I go along if that's possible so I can see what kind of things work or not if that's possible.

Thanks in advance to anyone that can help!



cuproPanda

With .XML modding, it's really quite simple. I'll be using my Soda Brewing mod to explain, because it's small and I have experience with it.


  • Every (XML) mod folder has 3 folders: About, Defs, and Textures
  • Textures go in the /Textures/Things/... folders. You can organize these however you want, but most people stick to Things/Items, Things/Building, etc.
  • Inside my Things/Items folder, I have all the sodas I'm currently using, plus a graphic I'm not(EmptyBottle). Just because a graphic exists here, doesn't mean it needs to be used.
  • Over in Defs/ThingDefs/Items_SODA is where I reference the graphics. Defs/ThingDefs/ is required to be named this, but the Items_SODA.xml can be named anything you want.
  • Scrolling down to the second block is the def for SeltzerSoda, this is what I'll explain
  • Inside <graphicData> there is the entry <texPath>Things/Items/Seltzer</texPath> This is simply the path to get to the graphic I want: in this case it's Seltzer. Since the graphic is within the Items folder, which is in the Things folder, and the graphic's name is Seltzer (.png doesn't matter) this works.
  • <graphicClass> defines what type of graphic you want. For most instances, Graphic_Single is what you'd want. Graphic_Single specifies a single image to always represent the object. Graphic_Multi is used for rotated objects. Ever notice how rock chunks have 3 different types? That's because of Graphic_Random. The chunks are called ChunkStoneA, ChunkStoneB, ChunkStoneC and are referenced as Things/Item/Chunk/ChunkStone. The game knows to look for the A,B,C,D, etc. There are also a few others, but I'll leave those up to you.

As far as simple texturing goes, that should get you started. I'd recommend taking a small mod, adding a graphic or two, then go into defining it. It sounds difficult at first, but it really isn't. The hardest part is learning what the definitions mean, but if you look at a few tutorials, analyze a few small XML mods, and ask questions you'll get there. The first mod(AdditionalJoyObjects v1.00) I made had a reskinned chess table and one new object that I slightly changed to make into 4. That was it.

Since you are a graphic designer, I assume you have more talent than I do with graphics. My Zen Garden mod is mainly texture stuff, but every time I try adding new textures it never looks the way I'd like, so I get frustrated and stop. You are more than welcome to take that mod and use it as your own. There should be enough code written to show you the way. I'll also help out if you'd like.
[/list]
cuproPanda's Mods: Survivalist's Additions, Additional Joy Objects, Cupro's Drinks, Quarry, Cupro's Stones, Zen Garden, Cupro's Alloys, Preset Filtered Zones, & more!

Shinzy

Well first of all!




And second! Cuppanda explains things really nicely
so I can only recommend findings a very small mod for reference to look at/study first

the xml files are really, really logical and very fast to pick up

I just wanted to shove the gem of a welcome sign at you! it's impressive!

chaotix14

I guess we're at opposite ends of the spectrum then. I can mod a variety of things as long as it doesn't require assemblies, if I have example codes to look at or have figured similar stuff out previously(most of it is just from blind staring the code until I understood it). But making any texture work that is even remotely visually pleasing is like trying to perform brain surgery with an excavator.



TitchWitch

cuproPanda - thanks for the reply, I checked out a few of your examples and I could kind of understand what was happening thanks to your explanations!
By that I mean I didn't understand exactly what everything meant in the code, but I could see why things are labelled in certain ways and how they get pulled in from their folders.
I think I would have to do a bit of copying and pasting from other mods where people allow that, but I'm guessing because I'd only want to change the appearance and not add or modify anything in the gameplay it should be a tiny bit simpler...

I've been doing a few experiments, but I'm going to draw a bunch of stuff and see what I can do! Your Zen Garden stuff helped me make sure I was making things the right size actually.
Is there a way I can access the existing graphics (if that's allowed)? I did grab a folder of assets from this forum, but I think it might be a bit outdated now. I'd like to check out the existing terrain graphics especially.

I think your Zen graphics worked fine btw and it's a nice idea! One thing I've realised is that it's not that easy to make the odd new graphic or texture for this game because the style is a little inconsistent at the moment, (which is completely understandable, with it still being in development) so new stuff might look fine next to one existing thing and stick out like a sore thumb against another. Some of the perspective angles are a bit inconsistent at the moment too, which can make things look off.
Making a little mood board of reference images can keep you on track if you find yourself struggling to get what's in your head onto the page!

Shinzy - woah, thanks for that gorgeous welcome :D You do have to be careful with your artistic powers though... I've heard you can kill a graphic designer by exposing them to that much comic sans at once!

chaotix14 - I guess this is why games are made by teams of people usually! I'm waiting for the day when we can have brain surgery like the colonists in the game and have little art or coding chips installed :) Tiling textures are a pain to make look nice and seamless though...

Shinzy

Titchy! we've got the Alpha 12 textures on our rimworld modding slack thingie
Someone's probably uploaded the pack here on the forums somewhere, too (possibly)

But anyway! if you wanan join the slack, there might be modding help more readily available too there! ;D
https://ludeon.com/forums/index.php?topic=14501.0

Oh oh! and yes I'm fully aware of the effects of comic sans on graphic designers!


Nynzal

Just starting off with modding too and stumbled upon the original art source of Rimworld ( uploaded from Tynan ).
These textures look quite different ( from opening with gimp ? ??? ). I looked at a mod which used 128px for one tile. Is this good standard or can I use every resolution i might think off ;)
Winter is coming

TheGentlmen

#8
It just needs to be 2^N, A.K.A 2,4,8,16,32,64,128...

Edit: It technical can be anything, but CPU's are better at processing things that are 2^N, and if its not 2^N RW might bug out a little.

cuproPanda

#9
Quote from: Nynzal on September 13, 2015, 05:26:08 PM
Just starting off with modding too and stumbled upon the original art source of Rimworld ( uploaded from Tynan ).
These textures look quite different ( from opening with gimp ? ??? ). I looked at a mod which used 128px for one tile. Is this good standard or can I use every resolution i might think off ;)
I use 64x64 for most things. I think I've only used a different resolution once, when I needed a 45° rotated graphic that didn't have pixelated edges. The only thing to keep in mind is that a square(64x64,32x32,etc) graphic represents one tile in the game unless specified otherwise in your code. If you want to make a smaller object like a single coin or a pen, it would look odd if you drew it taking up the whole image. For this I usually draw my graphic in a 32x32 then paste and center it into a 64x64 image, so it appears smaller in the game. 

EDIT: you can use any resolution you want, but keeping with the 2^N standard helps with rendering speed. Also keep in mind that rendering a 512x1024 image to represent a bed would be impractical because: 1) that's too much detail for such a small image and most of it would just get blended/chopped when zoomed out even 1 notch; and 2) it would cause lag with multiple instances since the graphics card would have to render each one
cuproPanda's Mods: Survivalist's Additions, Additional Joy Objects, Cupro's Drinks, Quarry, Cupro's Stones, Zen Garden, Cupro's Alloys, Preset Filtered Zones, & more!

Nynzal

Thanks for the answers! I don't plan to make some super realistic textures, so I guess i will stick to 64 or 128px  ;D
Winter is coming