File information

Last updated

Original upload

Created by

TacoMagic

Uploaded by

tacomagic

Virus scan

Some manually verified files

About this mod

A tool to randomize the traits of characters in characters.xml

Requirements
Permissions and credits
Donations
I was tired of the basic set of generic characters and wanted to add more variety, so I created a python script that goes through the characters.xml file, strips out all the non-essential traits, and replaces them with a random number of fresh traits.

It's a pretty simple little script right now, but I'm hoping to add a lot more functionality, including some more intelligent trait selection and what not. Maybe even a GUI if I really get ambitious.

What you'll need:
You'll need Python 3, probably at least 3.2, but I used 3.4.1 to write it, so you may as well do that.

Alternately you can give the experimental windows executable a try. It has not been tested as much as the python

What's inside:
charrand.py - this is the script
config.ini - all the basic parameters the script needs to function, nicely commented so you know what the settings actually do
README.txt - standard readme file. Has basically the same information in this post
traits.xml - A list of possible traits the random engine can pull from. Removing or adding to this list changes what can come up as a viable trait
How it works:
Unpack the contents on the zip file somewhere that's easy to navigate to, and drop the characters.xml file you want to randomize in the same folder.

Both versions are command-line tools. See the README.txt of each for how to run them.

Drop the created character_rand.xml into the xml2bmd converter and rename the output to characters.win.bmd. Head over to your game files, backup your current characters.win.bmd (if it exists) and copy in your new randomized file. Works for any new game, and works for newly spawned characters in an existing game (so, does not count for existing personnel or enclaves).

FAQ:

Does it work with <insert mod name here>?
Potentially. All the script does is go through the characters.xml, remove traits, and replace them. If the mod does not use characters.win.bmd, then it's fine. Even if it does use characters.win.bmd, it may still work based on the settings. For instance, the tool, by default (configurable), does not touch Hero traits, so any mod that affects only the Heroes would be fine provided you have the characters.xml from that mod to work with.

The mod makes the XML formatting all goofy, is this bad?
Luckily, XML parsing doesn't care about how easy the file is to read (usually). In this case, yes I know about the readability issue and haven't fixed it yet. It's completely aesthetic and does not prevent the characters.xml file from being processed into a win.bmd file and working in the game. It's also missing the top line which indicates version and encoding, but that's also not necessary for the file to work.

Can you add the function to also randomize how the characters look?
Probably not. Those are a little harder to work with, so I have no plans to randomize character models and heads and stuff. If somebody else wants to take a crack at it, feel free to use my tool as a stepping stone.

I have an idea of something I want this script to do!
Not really a question, but if you've got an idea for a feature I don't have planned, let me know in the thread and, if it's good, I'll add it to my todo list.

Changelog:
Version 0.02:
•Changed input file to an XML for better control
•Added trait groups along with weighting and minimum/maximum traits
•Added the ability to suppress the trait deletion portion of the script so that you can add traits rather than delete and reroll.

Version 0.01:
•Release


Planned Features:
Version 0.03:
Cleanup of XML file to be pretty
Option to force each base skill to appear at least once across all characters
Detect traits that do the exact same thing and reroll them (not counting useless traits)

Future:
Add support for mystyk style "Stay at home"*
Randomization of starting inventories
Add some alternate skill lists to work with forced groups in order to have themed character generation
GUI
REPORT BUG
Top