[A17] ModdableUI (Tool for Modders)

Started by CannibarRechter, September 09, 2017, 09:15:13 AM

Previous topic - Next topic

CannibarRechter

This mod has one very simple purpose:

It allows previously unmoddable elements of the Rimworld UI to be modded. This normally requires C#. This mod makes it UI modificiation possible for modders just using XML.

This mod overrides textures that are bound inside the rimworld code to readonly static data with textures taken from the mod directories. It has only been lightly tested at this point. FYI.

The mod comes with an example defs file. It presently only handles UI/Commands type textures, but should be able to handle any similar class without any C# updates. I will be extending the XML over time, but it can be modified by anyone with a little knowledge of the core c# files.

The defs file explains in its comments how to use it. In short, the class wants a series of triple strings, like this:

<li>[RIMWORLDCLASS],[CLASSFIELD],[TEXTURE-PATH]</li>
...

For example:

<li>TexCommand,ClearPrioritizedWork,UI/Designators/Cancel</li>

Have fun.

The download is here
CR All Mods and Tools Download Link
CR Total Texture Overhaul : Gives RimWorld a Natural Feel
CR Moddable: make RimWorld more moddable.
CR CompFX: display dynamic effects over RimWorld objects

Canute

Don't you think this would fit better at the tools selection rather then release ?

BlackSmokeDMax

You are probably right in the long run. But it couldn't hurt for people to see this who wouldn't normally go to the tools sub because they know they wouldn't be using the typical C# type of things you'd find there. Not saying that is all that is there, of course!

I think this could be very good for Rimworld. It may unleash a bunch of creativity from people who just don't have the coding skills that it would previously have taken.

wedekit

Quote from: BlackSmokeDMax on September 09, 2017, 11:00:09 AM
You are probably right in the long run. But it couldn't hurt for people to see this who wouldn't normally go to the tools sub because they know they wouldn't be using the typical C# type of things you'd find there. Not saying that is all that is there, of course!

I think this could be very good for Rimworld. It may unleash a bunch of creativity from people who just don't have the coding skills that it would previously have taken.

Well, I'll definitely have to take a look! I taught myself XML fairly easily just by going over mods that alter areas I'm interested in pursuing. But things that rely heavily on C# (including alterations to the UI) always end up over my head. People that leave notes in their coding to explain the sections are my heros, but haven't come across that too much, to be honest.

Anyways, thanks for thinking about us non-C# peeps!

CannibarRechter

The core loads some UI values (things like commands on the command bar, and motes and the like) very early in the game, before mods are processed. For a few items, it locks those into private readonly values. What this mod does is let the modder overcome that problem. The XML file for the mod covers the most common conditions already. You can define additional ones, if you find unmodifiable items in the core, or ask me, and I can add them for you. But it also doesn't do anything more than what I just said, so if you haven't had the specific problem, you won't need the tool. It was created because Jabba asked for it, and it turned out I was working on some similar things.
CR All Mods and Tools Download Link
CR Total Texture Overhaul : Gives RimWorld a Natural Feel
CR Moddable: make RimWorld more moddable.
CR CompFX: display dynamic effects over RimWorld objects