RimWorld

RimWorld

XML Extensions
 This topic has been pinned, so it's probably important
Imranfish  [developer] Aug 17, 2021 @ 7:00pm
Suggestions
Please suggest anything you would like to see here. Can be anything: more patch operations, more settings, changes to UI, etc. You may suggest features in the discord server as well.

Currently planned features (in no particular order):
- Add Setting.ColorPicker
- Make radio buttons colorable
- Add an objPaths Examples page to the wiki
- Add singleNode tag to every patch operation
Last edited by Imranfish; Nov 22, 2021 @ 2:42am
< >
Showing 1-12 of 12 comments
ZzZombo Aug 22, 2021 @ 4:47pm 
I'd like to see an option to let players to pick defs to patch. The settings then should display icon, translated name of the object, and whatever settings associated with it the mod lets to configure. Hovering over the row with the icon and name should show its description.

While a similar thing could be done already letting the player to pick exactly what should be affected is needed when whatever your mod adds doesn't always make sense to add to other things, say, because it fundamentally changes how an object works by being just present, so the player should decide what thing he wants it be present on.
Nightliss Sep 13, 2021 @ 1:50pm 
I'd like to see PatchOperationFindMod but using mod id not its name which sometimes changes. No idea why it is implemented the way it is.
Nightliss Sep 13, 2021 @ 2:28pm 
Should have read the docs more thoroughly as it is already supported ^^ Please ignore previous comment.
Sergkart Nov 26, 2021 @ 1:15pm 
Hello, I have a suggestion.

It concerns the "XmlExtensions.Setting.TabView" class
When there are more than 5 tabs, some of the titles no longer fit, at the moment it is bypassed by creating additional tabs in the tabs. As for me, if the tabs could be placed under each other it would save space.

Example:
<li Class="XmlExtensions.Setting.TabView">
<tabs>
<li>
<label>Tab 1</label>
<settings>
<li Class="XmlExtensions.Setting.Text">
<text>You have selected tab 1</text>
</li>
</settings>
</li>
<li>
<label>Tab 2</label>
<settings>
<li Class="XmlExtensions.Setting.Text">
<text>You have selected tab 2</text>
</li>
</settings>
</li>
</tabs>
</li>
Creates tabs in a row. I would like to place Tab 2 under Tab 1 without creating another class.
Imranfish  [developer] Nov 27, 2021 @ 1:52am 
@Sergkart I have just pushed an update that adds the <rows> tag to Setting.TabView. Thanks for the suggestion.
Sergkart Nov 27, 2021 @ 3:27am 
@Imranfish, thank you for the mod and its capabilities, I just suggested:steamhappy:
DragonKing Nov 16, 2022 @ 8:25am 
Cropping feature for: XmlExtensions.Setting.DrawImage

Would be neat to be able to show previews of floor textures, and crop them to only show 64x64, instead of relying on a separate set of textures to accomplish this.

Not sure how well it would work performance-wise, but would make it easier to manage updates to said textures, and set up the previews a lot faster.

Would likely also needs its own anchor and such for adjusting the cropping.
Malnormalulo Sep 16, 2023 @ 5:25am 
It would be super useful for AggregateValues to be able to work with the looping constructs. I have a slate I'm iterating through with a nested for loop (it's a small slate, thisisfine.gif), and I'm defining variables at both looping levels. The nesting structure winds up being:
ForEach/apply GetName/apply ForEach/apply CreateVariable/apply PatchOperationAddOrReplace
And what I'd like to be able to do is:
AggregateValues valueOperations ForEach GetName ForEach CreateVariable apply PatchOperationAddOrReplace
Last edited by Malnormalulo; Sep 16, 2023 @ 5:26am
I'm currently a bit short on time - trying to get my mod into release-able state - but just so I don't forget about them, while making my mod-settings with XML Ext. I came across a few (more) things I didn't mention when we spoke the other day in #mod-general on the Community Discord.

Not going into too much detail, but just so I put the topics out somewhere - since my brain could slowly need some S.M.A.R.T. to keep an eye on it. ^^

1. Not sure if out of scope or if there are ways to achieve that already, but as Bradson has it in his own patchOp mod, some 'post-inheritance' patchOp would really be massively helpful. My mod - as an example - deals with everything power-armor related, including things like replacing the color-generator values. Unfortunately other modders like to not inherit from the PowerArmorBases even if their armor is 'technically' more a power armor than not. Also, mods like Alpha Mechs still use the problematic method of patching in Defs (yeah, I told Sarg over a year ago already, so I started tackling it on my end ^^) - so patching things from those mods is always a bit problematic. Some post-Inheritance patchOp would probably be helpful there.

2. Another thing I thought about - back when I started using XML Ext. for my own mods - would be a sort of toggleable-loadFolder functionality. Unsure how complicated that would be, hooking into the basegame logic. But a way to basically have settings-based loadFolders could be helpful. Don't remember WHAT I needed it back then though.

3. Last topic (for now) - and please excuse if I just overlooked its existence - would be a way for the new colorPicker/-Wheel to basically 'save' user-generated RGB values 'into' the colorPalette. Like many Windows-based apps set the standard of the user selecting a field on the palette first, then picking the color value from the wheel or via RGB input and the resp. color is then saved into the palette for quick access.

Guess that's about it for the time being.
My use of XML Ext. features is probably not the most proficient one yet - still learning - but if you need any example use for your Wiki or something, this is the current state of my latest mod-project that's close to release: https://steamcommunity.com/sharedfiles/filedetails/?id=3529100115
Oh, and before I forget - another thing that might be out of scope, but I just came across some idea where that could come in handy. It's not exactly mod-SETTINGS related though...

A sort of mod-update/-news window opening on the main menu would be something interesting. Since who ever uses XML Ext. for their settings-menu might as well lack the skill to make such thing in the regular way.

But since it's based on some settings-unrelated idea in my case (showing some game- & mod-news and PSA based on my 'Breaking News' section on https://sites.google.com/view/void-archives/home/news-flash - since the site is admittedly not known far enough, but has been come quite handy to track and report on currently ongoing issues with the game, mods, etc.
So I might one day have someone make me the necessary UI in C# to just include in my mods (and who ever wants to support the cause).

But still, just to throw the idea out there. Knowing how rarely people even check their mod's settings, using the settings-menu for such type of announcements (or info about mod-updates) might not be visible enough.
Imranfish  [developer] Jul 22 @ 3:38am 
@tide{S}haper industries That's a great looking menu. I will definitely use it as an example on the Wiki when I get a chance.

I can add a way to apply patch operations post-inheritance. However, depending on your use case, using the ForEachDescendent operation may already suffice. If you point it towards a parent Def, it will iterate over all its derived Defs, including ones that inherit from children of children, etc.

Toggleable load folders was something I was looking into a few years ago. I never got around to doing it, also I was not entirely sure how compatible I could make it. It could be useful for loading Defs on demand, or loading texture/audio for example. I will take another look.

I can make the ColorPalette more versatile in general. Instead of simply taking colors as input, I can make it take keys, apply actions, give it tooltips, etc.

I was also considering a changelog when I first was making the mod. I never did it because I was unsure how many mods would actually take advantage of it. HugsLib has a changelog feature, but it doesn't seem like most mods ever used it. Also I did not want to expand the scope of the mod too much. I am still unsure if I want to add it, but I will consider it.

I will be away on a trip starting later this week, so I won't be able to implement any changes for a while though.
I guess I even looked at ForEachDescendent at some point - probably caused my head to start smoking and I decided to come back to it later. :D But now thinking about it, it basically should do the trick I guess. I probably was thinking about a postInheritance for some more 'brute-force' patches, running over the whole thing after inheritance happened to make sure the values you want are applied. Admittedly not the smoothest idea, and probably more relevant with the limitation of vanilla PatchOps than with XML Ext. ^^

Nothing of those things actually have any priority for myself - it's just stuff that came to mind while trying out what things are possible and what not. If I posted every idea that came to mind you'd be confronted with stuff like; 'allowing textures/icons to be rendered in text' and similar stuff. :D

So no stress for any of those things.

As for the changelog - yeah, what I was thinking was basically Hugslib's feature. Just in a more 'general' use-case, not just for mod-changelogs but basically to display whatever important info that would fit on the main menu. I know at least two/three 'modern' mods who have a feature like it (or similar) Niilo's QoL (uses it to display warnings about mod-overlap, etc.) - Vehicle FW (has their own patchnote-UI) - and technically CAI5000, but that's more just to display a window to pick a preset for its settings on first use.

I also remember Phil running into some issues when first releasing the VF changelog, because it was running at the same time as something else (don't remember exactly, but I think that either Character Editor or PrepCarefully was running some code at the same time for whatever reason) - so my thought was more that if you'd have a method that allows for displaying a 'news/changelog' window on game-load, it ideally would be something offered by a kind of framework instead of everyone hooking into the same place. That would allow for some 'management' when multiple mods want to display something. Like having one window for every message the user can then scroll through, or flip pages...

Not fully sure I would personally use it, but with the mess that is 1.6 right now, I have like 5 'important News' posts on my website about ongoing issues with Rimworld. 2 of them admittedly not meant for ingame announcement, since they have to do with issues that makes the game not open in the first place though. ^^

If I decide on using things that way one day, I'm sure I can get someone to teach me how to write the necessary stuff in C# - so nothing critical - but if more people would want to use a similar feature, having it central could be a benefit.
< >
Showing 1-12 of 12 comments
Per page: 1530 50