How to edit UI buttons?

Started by delsin53, February 06, 2018, 08:16:05 PM

Previous topic - Next topic

delsin53

Hi there.
I am working on a conversion overhaul and using the path Rimworld > Mods > MyNewUIMod > Textures > UI > Buttons to edit the buttons in there don't seem to change the buttons of the UI. I am using no mods except this one. Is this the correct texture path?
If not, how do I find where the right paths are? I can't find where in the Defs folder.
If neither, how can I add my own custom buttons to the UI to replace the current ones?

Harry_Dicks

Download HardcoreSK mod and poke around their texture files and see how they do it, I know I've seen them in there before.

Sandy

wait, is this ur actual path,
"Rimworld > Mods > MyNewUIMod > Textures > UI > Buttons"?
bcoz that wont work. the game will automatically look for ur textures folder inside ur mod, so all u need is, "UI/Buttons" and texture files inside Buttons folder.

take a look inside JabbaUI mod.

Harry_Dicks

JabbaUI to see how they do it, or look at Core defs and see how they do it, or look at HardcoreSK defs to see how they do it.

Either way, that should be at least 3 reference points. Along with Notepad++, I think it should be do able after narrowing down what you can through a few "find in file" searches ;)

By the way, I would guess that it is as simple as just creating the properly named directory and files. There are mods that will replace vanilla textures, and that is literally the only thing the mod will need to do. Just have their texture files in the right directory, within their own mod, and just be loaded after core.

If my non-programming-dumb-ass could try to explain how I imagine it, the game is going through all of your mod directories and "building" it's own temporary copy with the same structure of all of these files from mods that is used to load the game. This new "temporary directory" (I know I am butchering this) has all of the stuff from the mods that they come from, all in the same spots as the were in the mods they come from, except all of these new temporary files are now combined with all of the other mods that are loaded. So if you were to have two mods that both change just the assault rifle's texture, and you have these mods loaded one after another, then the mod loaded last will be the texture to show up, because when these mods are loaded then whoever gets loaded after will overwrite the mod loaded before it if the directory from the first mod is the same.

delsin53

#4
Quote from: Sandy on February 07, 2018, 03:34:03 AM
wait, is this ur actual path,
"Rimworld > Mods > MyNewUIMod > Textures > UI > Buttons"?
bcoz that wont work. the game will automatically look for ur textures folder inside ur mod, so all u need is, "UI/Buttons" and texture files inside Buttons folder.

take a look inside JabbaUI mod.

Not sure what youre talking about. I actually DID download JabbaUI and his texture path IS Rimworld > Mods > JabbaUI > Textures > UI > Buttons. The same as mine, but, he did not edit the buttons in the Buttons folder. I however, did and even with ONLY my mod, the buttons dont change.
They are the button on the lower right of the screen BTW. Those are what i want to change.

Sandy

Quote from: delsin53 on February 07, 2018, 09:50:40 AM
Quote from: Sandy on February 07, 2018, 03:34:03 AM
wait, is this ur actual path,
"Rimworld > Mods > MyNewUIMod > Textures > UI > Buttons"?
bcoz that wont work. the game will automatically look for ur textures folder inside ur mod, so all u need is, "UI/Buttons" and texture files inside Buttons folder.

take a look inside JabbaUI mod.

Not sure what youre talking about. I actually DID download JabbaUI and his texture path IS Rimworld > Mods > JabbaUI > Textures > UI > Buttons. The same as mine, but, he did not edit the buttons in the Buttons folder. I however, did and even with ONLY my mod, the buttons dont change.
They are the button on the lower right of the screen BTW. Those are what i want to change.

can u post ur xml coding here? without knowing what u have done, we cant help much.
also, is this "Rimworld > Mods > JabbaUI > Textures > UI > Buttons" whats written inside JabbaUI's xml?(the JabbaUI mod i downloaded doesnt have the xml file in it, so i cant check)

delsin53

#6
Quote from: Sandy on February 07, 2018, 10:26:09 AM
Quote from: delsin53 on February 07, 2018, 09:50:40 AM
Quote from: Sandy on February 07, 2018, 03:34:03 AM
wait, is this ur actual path,
"Rimworld > Mods > MyNewUIMod > Textures > UI > Buttons"?
bcoz that wont work. the game will automatically look for ur textures folder inside ur mod, so all u need is, "UI/Buttons" and texture files inside Buttons folder.

take a look inside JabbaUI mod.

Not sure what youre talking about. I actually DID download JabbaUI and his texture path IS Rimworld > Mods > JabbaUI > Textures > UI > Buttons. The same as mine, but, he did not edit the buttons in the Buttons folder. I however, did and even with ONLY my mod, the buttons dont change.
They are the button on the lower right of the screen BTW. Those are what i want to change.

can u post ur xml coding here? without knowing what u have done, we cant help much.
also, is this "Rimworld > Mods > JabbaUI > Textures > UI > Buttons" whats written inside JabbaUI's xml?(the JabbaUI mod i downloaded doesnt have the xml file in it, so i cant check)

There is no XML file, I'm just trying to overwrite the default button icons, such as "Abandon, Copy, Paste, Drop, Ingest, InfoButton, ShowColonistBar, ShowRoofOverlay, ShowEnviroment, ShowZones, Suspend", ect ect. THOSE buttons I want to edit but can't find the proper pathing i assume. I've searched every single XML file in the Core folder and NOTHING.

Sandy

Have u looked at this post?
https://ludeon.com/forums/index.php?topic=10670.0

i think it has what u r looking for. tell me if it works for u.

delsin53

Quote from: Sandy on February 07, 2018, 11:06:07 AM
Have u looked at this post?
https://ludeon.com/forums/index.php?topic=10670.0

i think it has what u r looking for. tell me if it works for u.

All it says in there is some dude said to edit UI buttons place them as Mods/YourMod/Textures/UI/Buttons and thats what I did and am doing but for some reason they dont show up in-game. Did Tynan rename the UI buttons in B18? Fuck it, heres a screen shot so you can tell what I have right or wrong.


[attachment deleted due to age]

Sandy

#9
i think naming is the problem.
all ur pics have ".png" at the end. the textures i downloaded doesnt have that. it simply says "Abandon", "ShowColonistBar" and such.
try removing that.

also, if u didnt upload screenshot before bcoz of worrying about content leaking, u could have just cropped the pic to show only the address bar.

delsin53

Quote from: Sandy on February 07, 2018, 12:15:57 PM
i think naming is the problem.
all ur pics have ".png" at the end. the textures i downloaded doesnt have that. it simply says "Abandon", "ShowColonistBar" and such.
try removing that.

lol Thats just the type of file. You can't remove the file type, every file ever has to have a .something at the end of it plus having .png doesnt matter as I can edit every other type of image with .png and it works, just not some of the UI images.

Sandy

Quote from: delsin53 on February 07, 2018, 12:23:59 PM
Quote from: Sandy on February 07, 2018, 12:15:57 PM
i think naming is the problem.
all ur pics have ".png" at the end. the textures i downloaded doesnt have that. it simply says "Abandon", "ShowColonistBar" and such.
try removing that.

lol Thats just the type of file. You can't remove the file type, every file ever has to have a .something at the end of it plus having .png doesnt matter as I can edit every other type of image with .png and it works, just not some of the UI images.

well then, my bad.. sorry i couldnt help much..

BlackSmokeDMax

I could be wrong about this, but I believe using XML will not get you the results you are looking for. I think you will need to go the route of programming in C# for changing the UI like that.

Harry_Dicks

#13
Mods/Core/Textures/UI/Designators

Can you not just paste icons into a folder inside of a mod in a directory like this? No xml or C# required I would assume. Or at least I would hope that if possible Ludeon would have made it as easy as just putting the textures in the proper directory. That's how it works for regular in game textures, anyway. If for example you want to replace the vanilla textures for weapons, then you just create a directory in your mod with the same path and filenames that vanilla textures have, and then they will be replaced.


Tynan

The base game UI images are embedded in the Unity resources; you can't replace them just by adding files to a folder in a mod. Replacing images and sounds doesn't work like replacing defs.

You'd need to actually use a code mod to go in and replace the data.
Tynan Sylvester - @TynanSylvester - Tynan's Blog