Sir, You Are Being Hunted
Help us shape the future of the Vortex mod manager by taking our survey
0 of 0

File information

Last updated

Original upload

Created by

Red Queen

Uploaded by

xXRedQueenXx

Virus scan

Safe to use

About this mod

A small utility for reducing and altering the loot spawns in the world. Austerity for all!

Permissions and credits
Mirrors
!!NO MOD OF MINE WILL EVER BE PAYWALLED!!



*********************************
*Mod Name: Thatcher v.021
*Author: Red Queen
*Date: August 31st, 2014
*********************************

Thatcher is a barebones program that will let you tweak the items that spawned in a world you have generated by manipulating the world inventory .xml files. It's primarily intended to make the game harder by replacing specified useful items with specified junk items (too much food? Half the pies are now rats!), but it could theoretically be used to do the reverse if you want to make the game easier (fewer old boots, more fruitcakes!). Combined with the custom biome feature, you can now set up specific scenarios in your archipelago -- maybe the factory workers in the Industrial island in the West stockpiled a big stash of dynamite they never got to use before the robots overran them, or perhaps the villagers in the Rural island to the South were suffering a terrible shortage of tea before their doom. The possibilities are endless for tuning the game's item spawns to adjust how it plays to your specific taste, have fun experimenting!

Please note that it currently has no GUI and needs to be run from the command line (step by step instructions below as always) -- maybe someday I will make a GUI for it when I am in the mood to practice with those libraries, but don't hold your breath. :-P Alternatively, you can use the AutomaticAusterity.bat file to process all 5 inventory files automatically -- I got tired of manually running each file from the command line. Laziness is a good motivator.

The usual boilerplate warning -- this is a rough little alpha hacked together by someone who plays around with programming for fun, it comes with no warranties of fitness for purpose or the barest hint of quality, but probably does come with bugs. If it has a glitch that causes your computer to achieve sentience and join the glorious tweedbot revolution, I warned you (and would promptly deem it a "surprise feature" anyway)!

*Contents of this zip file:*

Thatcher_v021\Thatcher.exe
Thatcher_v021\AutomaticAusterity.bat
source\Thatcher.lua
sampleReplaceList\goaway.txt

*Thatcher.exe vs. Thatcher.lua*

Thatcher.exe is the version for Windows users who don't have Lua installed and who just want to use the utility and play the game. Sorry, I don't have a Mac or a Linux installation handy and can't make standalone versions of this program for those systems at this time.

I included the uncompiled version of the program (Thatcher.lua) in the \source folder for power users who want to look under the hood our of curiosity or a desire to learn, want to check themselves to confirm there is no malicious code, or who have Lua installed and just prefer to run the original Lua script because they just do (I completely understand and tend to do that myself). If you're a Mac or Linux user and have Lua installed, then you can use this version. I don't mind if you tweak it for your own personal use, but please don't distribute modified versions of this program without my permission. You can PM me on the Big Robot forums if you want permission.


*How To Use -- The Manual Way*

1.Copy the island inventory files you wish to edit to a temporary folder (found in \SaveGames\World#\Dynamic_Content), and place Thatcher.exe in the folder with them.
2.Create a list of the items you want to replace and what to replace them with. Follow the formatting used in the sample replacement list file included in this mod ("goaway.txt").
3.Open a command line prompt (in Windows, open the Start menu and type "cmd" without the double quotes in Search/Run.
4.Navigate to the folder containing Thatcher and the files to update.
5.Type the following command, adjusted for your filenames and the percent chance you want: Thatcher.exe yourinventoryfile yourfindreplacelist newinventoryfile replacechance
    *yourinventoryfile - the original .xml inventory file for an island generated by Sir (CentreInv.xml)
    *yourfindreplacelist - you make this yourself and name it whatever you like (example: goaway.txt). Look at the next Readme section for help on setting this up.
    *newinventoryfile - the name of the customized inventory file the script will spit out, I recommend something like CentreInv_new.xml or whatever.
    *replacechance - the chance to swap an item with its replacement. 1 is 100% chance, less than 100% chance should be written .NN like this: .75 (a 75% chance to swap)
6.Hit "Enter" and wait a second. You'll see your new inventory .xml appear in the folder if you fed it valid files to work with.
7.Repeat for all other island inventories you want to edit.
8.Move your original inventory files somewhere safe in case Thatcher gave you funky files, then rename the new files to match the old and copy them over your old inventory files in your \SaveGames\World#    \Dynamic_Content folder.
9.Play!


*How To Use -- The Lazy Way*

1.Copy the island inventory files you wish to edit to a temporary folder (found in \SaveGames\World#\Dynamic_Content), and place Thatcher.exe and AutomaticAusterity.bat in the folder with them.
2.Create a list of the items you want to replace and what to replace them with. Follow the formatting used in the sample replacement list file included in this mod ("goaway.txt").
3.Right click on AutomaticAusterity.bat and open it with your favorite text editor -- replace "goaway.txt" with the name of your replacement list file if you chose to name it something different. Replace ".75" with whatever percent chance you prefer.
4.Double-click on AutomaticAusterity.bat and wait a second. Smile when the new versions appear. It's so lazy!
5.Move your original inventory files somewhere safe in case Thatcher gave you funky files, then rename the new files to match the old and copy them over your old inventory files in your \SaveGames\World#\Dynamic_Content folder.
6.Play!


*Advice On Making The Replacement List File*

You need to give Thatcher the exact names as they appear in the inventory.xml files of the items you want to swap in your replacement list file, right down to capitalisation. The format is the item you want Thatcher to change, then a backtick (`) so the script can separate the two items, then the item you want it to turn into. I included a sample file to show you exactly what a usable one looks like (gowaway.txt) -- it will change alarm clocks to stones and pies to catfood. Set yours up the same way but with the items you want to change. You can find out how Sir names items by looking at the original inventory files, or by looking them up on the wiki.

Be advised you need to pair items to change/items to change into by inventory size -- if you want to change something that is a 1x1 item, you need to replace it with another 1x1 item. Also, I don't recommend swapping an item with a use count (ammo, rocks, clocks, bottles, trains, guns, traps, matches, dynamite) into something without a use count (anything else), or vice-versa, as I'm not sure how the game would react to trying to load a dead rat with 6 uses! Changing one item with a use count into another item with a matching use count works fine -- i.e. changing alarm clocks into stones, or dynamite into empty bottles.

This limitation doesn't mean it's impossible to alter ammo if that's what you want to do, it just means you have to do it yourself in Notepad or your text editor of choice, and that's pretty easy as shotgun shells, revolver ammo, and rifle ammo are all unique in their use counts (2, 6, and 10 respectively). A simple find/replace works. For example, to cut down the amount of revolver ammo, you can search for <int>6</int> and replace it with <int>3</int> to effectively half the amount of revolver ammo in the game. This workaround is far easier than what I would have to do to let Thatcher update an item and update its use count, so I don't plan on adding this ability to the utility as I am lazy and have other mods to work on instead.

*Uninstallation:*
1.Delete Thatcher.exe (it doesn't write anything to registry or do any installer magic), copy your backed-up inventory files back into your save game folder.