Ludeon Forums

RimWorld => Mods => Tools => Topic started by: CannibarRechter on September 09, 2017, 09:16:19 AM

Title: [A17] Moddable (Tool for Modders)
Post by: CannibarRechter on September 09, 2017, 09:16:19 AM
This tool/mod has one very simple purpose:

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

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

The defs file explains in its comments how to use it. You only need to know XML.

Additional items being supported at this time also include:
- Timeouts to force exit from raid map
- Timeouts to undraft
- Option to disable forced slowdown when raided

This mod is taking requests for additional overriding of core hard-coded values.

The download is here (https://www.dropbox.com/sh/afs5ina1jebh308/AAAXn_gW4FF_zfJWL79OWHgua?dl=0)
Title: Re: [A17] Moddable (Tool for Modders)
Post by: SpaceDorf on September 26, 2017, 10:54:51 AM
17 days since release and not a single person has commented on how awesomen thist is ?

Rimworlders, you should be ashamed of yourselves. I know I am.
Title: Re: [A17] Moddable (Tool for Modders)
Post by: CannibarRechter on September 26, 2017, 11:10:50 AM
Heheh, if you like this, wait until you see CompFXOverlay. It enables all sorts of things like flashing lights, twirling props, animations, flickers, balloons, and other FX to be overlayed on a Thing. All the overlays are working right now, but to be complete, they need to A) rotate their relative position when the thing rotates, and B) have triggers, like Thing has power. I'm working on those latter two right now.

This is part of a high detail texture (photo-real) overhaul I'm performing on the game (which is also almost done). Obviously, I'm making use of Moddable as I go. In the texture overhaul, all the things that modders couldn't touch before, including UI commands, icons, motes, etc: they're patched. That means the UI overhaul is comprehensive.

Only thing I have found so far that's actually impossible is the splash screen. Can't do that, because mods are loaded after it is (technically we could patch the assets file, or drop a different DLL over Assembly.dll, but that seems intractably invasive).
Title: Re: [A17] Moddable (Tool for Modders)
Post by: maculator on September 26, 2017, 11:26:51 AM
I have no idea about xml or anything, but I saw the word "balloons"! And I guess something  that grants people easier access to the games files is always a good thing. Hope to see a balloons mod soon.
Title: Re: [A17] Moddable (Tool for Modders)
Post by: swefan on September 29, 2017, 10:20:33 AM
Quote from: CannibarRechter on September 26, 2017, 11:10:50 AM
Heheh, if you like this, wait until you see CompFXOverlay. It enables all sorts of things like flashing lights, twirling props, animations, flickers, balloons, and other FX to be overlayed on a Thing. All the overlays are working right now, but to be complete, they need to A) rotate their relative position when the thing rotates, and B) have triggers, like Thing has power. I'm working on those latter two right now.

This is part of a high detail texture (photo-real) overhaul I'm performing on the game (which is also almost done). Obviously, I'm making use of Moddable as I go. In the texture overhaul, all the things that modders couldn't touch before, including UI commands, icons, motes, etc: they're patched. That means the UI overhaul is comprehensive.

Only thing I have found so far that's actually impossible is the splash screen. Can't do that, because mods are loaded after it is (technically we could patch the assets file, or drop a different DLL over Assembly.dll, but that seems intractably invasive).

Thanks for these resource, thanks to you I finally succeeded in replacing the fire textures for the campfire, but how did you say "All the overlays are working right now" how can you modify them? fire animation "fireoverlay" is made of 3 images the problem is that they are used in different coordinates, and if we increase "firesize" this offset of the position is even more noticeable, how can I adjust this offset?

Title: Re: [A17] Moddable (Tool for Modders)
Post by: CannibarRechter on September 29, 2017, 11:36:24 AM
> and if we increase "firesize" this offset of the position is even more noticeable, how can I adjust this offset?

For your individual frames, you can change them to whatever you like. To change the offset of the graphic as it is displayed over the object, or to resize it, use stanzas like the below (which is just the ordinary game patch system, does not require Moddable):


<Operation Class="PatchOperationReplace">
<xpath>*/ThingDef[defName = "Campfire"]/comps/li[@Class="CompProperties_FireOverlay"]/fireSize</xpath>
<value><fireSize>1.3</fireSize></value>
</Operation>
<Operation Class="PatchOperationAdd">
<xpath>*/ThingDef[defName = "Campfire"]/comps/li[@Class = "CompProperties_FireOverlay"]</xpath>
<value><offset>(0,0,0.4)</offset></value>
</Operation>


What is shown for offset is x,y,z.

Don't mess around with y, that's the direction that is towards or away from you, the viewer. x is left-right. y is up-down. I believe that the unit size of the movement is 1, but spans from -0.5 to 0.5 for an objects of size 1. If the object is size 2, the movement double from -1 to 1.

Title: Re: [A17] Moddable (Tool for Modders)
Post by: swefan on September 29, 2017, 12:17:28 PM
Quote from: CannibarRechter on September 29, 2017, 11:36:24 AM
> and if we increase "firesize" this offset of the position is even more noticeable, how can I adjust this offset?

For your individual frames, you can change them to whatever you like. To change the offset of the graphic as it is displayed over the object, or to resize it, use stanzas like the below (which is just the ordinary game patch system, does not require Moddable):


<Operation Class="PatchOperationReplace">
<xpath>*/ThingDef[defName = "Campfire"]/comps/li[@Class="CompProperties_FireOverlay"]/fireSize</xpath>
<value><fireSize>1.3</fireSize></value>
</Operation>
<Operation Class="PatchOperationAdd">
<xpath>*/ThingDef[defName = "Campfire"]/comps/li[@Class = "CompProperties_FireOverlay"]</xpath>
<value><offset>(0,0,0.4)</offset></value>
</Operation>


What is shown for offset is x,y,z.

Don't mess around with y, that's the direction that is towards or away from you, the viewer. x is left-right. y is up-down. I believe that the unit size of the movement is 1, but spans from -0.5 to 0.5 for an objects of size 1. If the object is size 2, the movement double from -1 to 1.

Thanks for your answer, I will try to do it.
The problem is that each frame has a different offset, for example

fireTextureA
<Value> <offset> (0.2,0.1,0.4) </ offset> </ value>
fireTextureB
<Value> <offset> (0.7,0.5,0.4) </ offset> </ value>
fireTextureC
<Value> <offset> (1,0.3,0.4) </ offset> </ value>

how should I write this in xml?  :)
Title: Re: [A17] Moddable (Tool for Modders)
Post by: CannibarRechter on September 29, 2017, 12:18:48 PM
> The problem is that each frame has a different offset, for example

You can't.

But what you can do is open up the frames in GIMP or some other editor, and move the graphic around. I.e., make your own net new frames, and create your own net new animation.
Title: Re: [A17] Moddable (Tool for Modders)
Post by: swefan on September 29, 2017, 12:27:18 PM
Quote from: CannibarRechter on September 29, 2017, 12:18:48 PM
> The problem is that each frame has a different offset, for example

You can't.

But what you can do is open up the frames in GIMP or some other editor, and move the graphic around. I.e., make your own net new frames, and create your own net new animation.
That's what I had thought to do as an alternative solution, I'll record the animation and then adapt the 3 textures, thanks again  ;)
Title: Re: [A17] Moddable (Tool for Modders)
Post by: CannibarRechter on October 01, 2017, 11:23:51 AM
Updated to include an enabler for shutting down the forced slowdown time when raided.
Title: Re: [A17] Moddable (Tool for Modders)
Post by: CrazyMalk on October 31, 2017, 02:25:24 PM
Are you accepting suggestions? It would be nice to have a "tameable" tag. If you set it to true, the pawn would be tameable, and if you set it to false, the pawn would not be tameable. It would be good if you wanted to create an animal that shoots projectiles using a mechanoid and make it tameable, or making a non-tameable creature.
This mod should be included in HugsLib lol
Title: Re: [A17] Moddable (Tool for Modders)
Post by: Kori on February 07, 2018, 10:10:20 AM
This is just what I was looking for! Do you think you could upgrade this handy tool for B18, please? :)

Also may I request an additional feature?
A setting to override the hardcoded sell/ buy price modifiers (x0.5 and x1.5) as well as the minimum buying price (0.5 silver).
The latter would be great for CE when buying ammo, where this minimum buying price ruins the balance for cheaper rounds at the moment.
Title: Re: [A17] Moddable (Tool for Modders)
Post by: Lady Wolf on January 29, 2020, 08:43:37 PM
Super thread neco, I know, but given I want to use this tool I was wondering if it was ever updated?