RimWorld

RimWorld

3,535 ratings
XML Extensions
5
5
6
4
2
2
   
Award
Favorite
Favorited
Unfavorite
Mod, 1.2, 1.3, 1.4, 1.5, 1.6
File Size
Posted
Updated
968.616 KB
13 Aug, 2021 @ 6:55pm
17 Sep @ 8:52pm
162 Change Notes ( view )

Subscribe to download
XML Extensions

In 1 collection by Imranfish
Imranfish's Mods
6 items
Description
Read the wiki at the GitHub page[github.com] to learn more.

Note: Steam keeps taking down my GitHub links, you can simply Google "XML Extensions GitHub" directly instead

Read the change notes for the latest news.

XML Extensions is a framework and modding tool that is focused on extending the general functionality of XML mods. This framework adds many more patch operations and allows for the easy creation of mod settings in XML.

More Patch Operations
XML Extensions includes many new patch operations for modders to use. These operations are much more powerful and dynamic, and allow you to basically do programming in XML; you have access to if-statements, for-loops, mathematical operations, etc.

Create Mod Settings in XML
With XML Extensions, you can easily create mod settings for your mod, all in XML! You may use these settings to toggle patch operations, change values within your patch operations, or use them in C# to do anything else.

Enhanced Error Reporting for XML Errors
With XML Extensions active, all XML patch errors will now generate a stack trace. This means that you can figure out exactly which patch failed, and in some cases, it will even tell you what part of the patch failed. All you need to do is have XML Extensions activated in your modlist while testing your mod.

Here is an example of a trace for a broken patch (you can easily figure out the error is that the letter "N" should be capital in defName):



The vanilla error message for the exact same patch (only reports the parent patch, not the one that actually failed; no clue as to what went wrong):



There is a standalone version of this feature as well.

How to Use
To use this mod as a user, just load this mod after core and the DLCs, but before all other mods that depend on it. As a modder, you need to mark this mod as a dependency in Steam Workshop, and include the dependency in your About.xml.

I am willing to take suggestions for improvements and additions to this framework, and will try to fix any bugs reported.

Join the discord! https://discord.gg/mrrEhHnSQy

Read the wiki at the GitHub page[github.com] to learn more.

Also check out XmlDocument Viewer for another helpful XML modding tool.
Popular Discussions View All (4)
94
18 Aug @ 1:13pm
PINNED: Bug Reports
Imranfish
12
23 Jul @ 10:36am
PINNED: Suggestions
Imranfish
1
29 May, 2023 @ 12:21am
Getting these kind of errors along with Real Ruins
p20 hammerpoints
305 Comments
Xx_redcat_xX 27 Sep @ 6:12pm 
@imranfish Alright i will try
Imranfish  [author] 26 Sep @ 7:07pm 
@Xx_redcat_xX you can either send a log with hugslib log exporter, or upload your player.log file with a website such as github gist. It is unlikely to be this mod in particular, since this mod does not affect any of the actual in-game content, but you may have some sort of mod conflict which needs to be resolved.
Xx_redcat_xX 24 Sep @ 11:54pm 
sorry for bothering but there is an issuse. i confirmed is this mod causing and it made me no longer able to build anything

the only thing in order is command. No walls No bridge or anything

it may cause because of the other mod doesnt work well with this one so where can i find the error and send it to ya?
Shinzou 15 Sep @ 12:00am 
Thanks for the quick fix, seems to work, error disappeared :hawtdawgman:
Imranfish  [author] 12 Sep @ 4:21pm 
@Shinzou
Thank you for reporting this issue, I just uploaded a fix; let me know if it works.
Shinzou 12 Sep @ 1:09pm 
'ello there, getting one red error when loading with only error checker mods and Harmony: https://gist.github.com/HugsLibRecordKeeper/36aee4b2299943144956cd4a5f1a7e47
deadlieremu84 21 Aug @ 9:07pm 
I will confirm this was not the problem. I do believe another mod update corrupted files. I just reinstalled everything with the same mod list and it worked fine.
Kaedys 19 Aug @ 2:12pm 
They could probably fix it by using either 0 instead of -1 for the ticks for childbirth, or by adding an xpath condition to exclude childbirth from the first patch. Glad you got the issue worked around in the mean time, though.
Raitlor 19 Aug @ 1:30pm 
It looks like its an XML only option. I loaded in, unticked the option, and reloaded Rimworld and it seems to have been solved at least for me.

It looks like the WVC author is aware of the problem and planning to rework that option entirely later.
Kaedys 19 Aug @ 12:57pm 
Based on looking at the patch defs in WVC, this is either occurring because of an overlapping patch that applies a 0.7 multiplier to all rituals, and then also overrides childbirth to -1 ticks. If the former is run again after the latter, the result is -0.7 ticks. The other alternative, though I'd have to go hunt through the C# code for the mode, is that you have that setting ticked on both the XML and C# tabs in the mod, so it is applying the XML version, and then applying the same thing in the C# code and effectively doing the above through a different mechanism. In the latter case, you should be able to correct it yourself by disabling the option on one of the two tabs (note: I've not installed or loaded the mod, I'm just going off the description here), in the former case, it's an error by the mod author.