Hi there! You are currently browsing as a guest. Why not create an account? Then you get less ads, can thank creators, post feedback, keep a list of your favourites, and more!
Deceased
Original Poster
#1 Old 13th Jul 2018 at 9:15 PM
Default Package-Less XML Resources
Might help some folks out in the development cycle, I found that it is still possible for the game to load XML from individual files without the need for them being in a .package file. However I've been unable to get the auto reload feature to work anymore, any attempts at activating the file watcher service ended in bitter failures (some really bitter, like throwing an exception at every game tick which adds up surprisingly quickly

Still, as I said, this is useful for eliminating the need to repackage a mod in development while tweaking the XML. You can just edit the XML in the unpackedmod folder and reload the game.

To summarize how to use this, you need an additional line in your Resource.cfg file in the Mods folder, like so:
Code:
DirectoryFiles unpackedmod autoupdate


Despite some other information I'd seen, you should not include a /* in that, just the folder name. It can be in a subfolder, e.g. SomeModFolder/unpackedmod, and the folder needn't be named unpackedmod (note there shouldn't be any spaces in the folder names). And since I can't get the file watcher working you can leave off the autoupdate as well, so something like this also works

Code:
DirectoryFiles MyNewMod/MyTestXmlFiles


Then put the XML file(s) you are tweaking the tuning for into that unpackedmod folder with a filename specifying the group!instance.type, where the group, instance and type are the 0xHEX values of the XML resource. For example, to override the computer_PracticeWritingSkill, an interaction (so type 0xE882D22F) with the instance ID 33877(decimal, 0x8455 hex) you would name the XML file with your changes as
Code:
0x00000000!0x0000000000008455.0xE882D22F


The file doesn't have to be an override, it can be a new instance ID and the game will load it. I'm unsure if it has to be XML or if something like a SimData file can be loaded like this without being in a package.

Once everything is tweaked you can then package the XML and remove those individual XML files from the unpackedmod folder.
Back to top