Thursday, 24 November 2016

D&D 3.5 - Population/NPC Generator

In my spare time I've been working on a tool which will quickly generate semi-random populations of NPCs, split by class and level, for Dungeons and Dragons 3.5. Not only that but it will then generate largely ready-to-use profiles for the NPCs too.

Now I've finally got it to the point where I'm happy to release it to out to the general public - a terrifying step for any burgeoning programmer.

Be aware that this workbook uses numerous macros and so it will need to be downloaded and macros will need to be enabled for the functions to work. It has only been tested on Windows so far, although it *should* work fine on Macs too. You can find notes and a brief user guide after the jump.


Population Generator Home-Page

Now, this isn't finished by a long shot. There are various usability and interface features (error messages, protected tabs/cells, code comments, user guide etc.) that are missing, it doesn't generate Feats and I'm not 100% certain that everything is being calculated correctly - which is where I'm hoping all of you will come in!

If you get a chance to use it and have any feedback at all then please let me know either as a comment or by email (leadrisingblog@gmail.com).

Note that the generator doesn't completely follow the D&D rules to the letter. It was created with a vaguely 'realistic' Epic6 campaign in mind so has been tweaked slightly to provide more interesting/realistic NPCs based on my own sensibilities. In particular you should be aware of the following changes:
  • All characters have access to Craft, Knowledge and Profession.
  • Characters will have a chance to have one or more of these three skills before having any other and it is possible to have two of any of them if the skill also belongs on their list of Class Skills.
  • The range of available Crafts, Knowledges and Professions have been greatly expanded and manually defined for each class.
  • Apart from those three, characters will only put skill points in class skills.
  • Most feats haven't been set up yet because, frankly, it's really hard to do well. Some standard feats have been added including Weapon Finesse and Two-Weapon Fighting. I recommend adding on Weapon Focus, Toughness and Skill Focus for quick NPCs.
  • Familiars don't give any bonuses at the moment.
  • Currently no validation in place to ensure that casters have sufficient primary casting stats to cast their spells, but this should rarely be an issue.
  • Currently no validation to ensure that characters have sufficient Feat availability for Two-Weapon Fighting and Weapon Finesse. Generally only an issue for non-human Rogues.

Other minor changes and points of interest are:
  • Only racial abilities that haven't been incorporated into the character's stats will appear under Special Attacks/Abilities. Bonus skills, saves, feats and so on will be included elsewhere.
  • It only supports characters up to 10th level (for now!)
  • Buckler/Tower Shield attack penalties don't apply to ranged weapons (should they?).
  • Characters can have items that give +1 to abilities, not just +2. functionally they work the same however.
  • Aristocrats have been renamed as Nobles.
  • Masterwork/Magic weapons and ability boosting magic items become more common at higher levels with PC classes getting greater access than NPC classes.
  • Apart from some incredibly basic logic, such as disallowing two handed weapons with shields or composite weapons with strength of less than 10, everything is generated randomly. Don't expect optimisation.

The aim here is to make interesting NPCs. The freer access to Craft, Knowledge and Profession skills can help provide some basic plot hooks, background and some idea of how the character makes a living - as all characters must do!

If you've read this far and downloaded the workbook you might notice that there are a LOT of tabs. You can safely ignore them all apart from the Home tab as all they do is contain various data sets for skills, spells and so on.

There are two rather enticing-looking buttons on the Home tab though. So what do they do?


Population Generator - Calc Quantity


You should start by clicking the 'Calc Quantity' button. With the default settings this will generate a village with about 400 inhabitants. For each class it generates a random percentage between two boundaries and creates that percentage of 400 characters split across multiple levels. As each class is calculated separately you may end up with more or less than your defined population representing the comings and goings of the local populace.

There are a number of parameters marked in green you can set to modify this function:

Type
Each 'type' from the drop-down box will have a different percentage mix of each class.
  • Rural  - Has the greatest amount of Commoners.
  • Village - More varied populations than Rural.
  • Town - More varied populations than Villages.
  • City - More varied population than Towns.
  • Monastery - Has more Clerics, Adepts, Paladins, Monks and Experts
  • Army - Has more Warriors and Fighters
  • Bandits - Has mostly Warriors and Commoners
  • Party - Generates a rival party mostly from PC classes.

Generally speaking, as you move into more populated areas the percentages of Commoners, Barbarians, Druids and Rangers go down whereas the other classes go up.

Pop
Defines the population you wish to generate. I would not recommend generating more than 100,000 or so as even that locks up Excel on my laptop for a good few seconds! If you'd like to generate larger amounts then I'd recommend ramping up a bit more gradually.

Actual populations tend to vary about +/- 10% from the selected value for all types except for Party.

Party Lvl
If the Party type was selected then this will define their level instead of it being randomly generated. For all other types it does nothing.

% 1st Level
This defines what percentage of characters are typically 'stuck' at any given level.

If it is set to 80%, for example, then 80% of characters would be at 1st level, 80% of the remainder would be 2nd level, 80% of the remainder after that would be 3rd level and so on.
  • 80% is the default for Epic6 and only very rarely produces characters above 6th level.
  • 50% gives a rather high-fantasy feel with 9/10th level characters appearing all over the place.
  • 90% is a very low-fantasy setting where anyone who reaches 4th level or higher is remarkable!
Generally speaking Commoners get a slight penalty to their level and PC classes get a slight bonus. Other NPC classes use the default splits. NPC classes are less likely to be out adventuring and earning XP after all!

Just have a play about and see what sort of results you can get. Once you are comfortable with these features, move on to the next part.


NPC Generator - Gen 3.5 Profile


Now clear out all but a couple of these theoretical characters and just put a '1' somewhere in the results grid - under 3rd level Adept, for example - and click 'Gen 3.5 Profile'.

Example set-up

This will create and show a tab containing the stat-block for your new character. That's literally all there is to it!

The program will pick weapons, armour, spells, skills, domains, companions and class abilities for them with no further input. It will calculate their HP, AC, attack, full attack, spell lists and spells/day as per the standard D&D rules. NPC classes get 3D6 abilities and PC classes get 4D6 drop-lowest.

If the class has access to one, it will also generate a separate tab for an animal companion. This tab will not always appear next to the one for the character the animal belongs to if you are generating multiple characters.

Note that the program will fail silently if you try and generate more than 10 characters at a time. This is to stop it from locking up if it tries to process too much at once. 

Sample character output for a 3rd level Adept

Hopefully the layout of these sheets will be familiar to you with the only unusual addition being a list showing armour, shield, weapons and magic items at the bottom.

Only of the available options on the Home tab affects the character creation process and this is the skill allocation rules

Skill Allocation:
This option has two possible settings and defines how characters spend their skill points.
  • Full - Picks a small number of class skills and applies their maximum possible skill points to each of them.
  • Partial - Randomly assigns their skill points amongst every available class skill. Animal companions always use this latter option due to their very limited skill points.

Note that only skills which either have ranks spent in them or have racial bonuses will appear in the stat-block. All skills not listed will be at their default values as per the character's ability scores.

Skills with a slash in their modifiers, e.g. Swim(+6/+2), show their standard modifier first and then their modifier after armour check penalties second.


So, that's about it really. I'm sure I've missed things and I will no doubt be reminded of them in due course, but I hope that people will find this to be a helpful tool. I would generally use it to generate a population centre as the players reach it, then pick out a few of the highest level characters to create profiles for. 

In the long run, I'd love to add feat support and I'm currently in the process of doing a conversion for Pathfinder as well. I might even open it up to making characters up to level 20, depending on how well it is received. Once again, any feedback at all is greatly welcome!


Patch Notes 10.2.1 to 10.5.1

1.5.1 is a significant back-end overhaul adding two more classes (Warhorse and Pony), two-weapon fighting, weapon finesse and a number of other smaller changes. It seems to be pretty stable at the moment, but feedback is still welcome if you find any bugs.
  • Two-Weapon Fighting and Improved Two-Weapon Fighting are now fully supported. Characters without shields who pick a light/one-handed weapon and have at least Dex 15 (or are at least a 2nd level Ranger) will now use two-weapon fighting.
  • Animal Companions have been updated. Druids and Rangers will always have a Wolf and a Paladin will have a Warhorse or Pony depending on size.
  • NPC classes and animals now have random HP each level, rather than maxing out their level one roll.
  • Quarterstaffs are now used two-handed or for two-weapon fighting as appropriate based on ability scores.
  • Minor rules fixes (e.g. animal companion ability progression)
  • Minor display fixes (e.g. Size mods to AC and creature type)

Patch Notes 10.5.2

  • Fixed Damage bonus from Magic Enhancements not properly applying to melee weapons.
  • Fixed Paladin mounts having one too few HD.
  • Fixed a bug with generic feat quantities not taking into account TWF, WF etc.
  • Fixed a bug where characters were taking Weapon Finesse unnecessarily with Whips/Chains/Rapiers.

Patch Notes 10.6.3

This update includes the ability to re-use character seeds. You can use a specific seed by placing it in cell B5 of the Home page in the format <level><class code><seed>. 

The seed used for each character will also appear at the top of their character sheet and you can simply copy and paste this to re-create the character later. If there are any bugs or inconsistencies then please provide this seed with your comment so I can try and replicate the issue.

Note that seeds may not give consistent results between different versions of the workbook.
  • Improvised Weapons can no longer be Masterwork or Magical.
  • All classes now have their class abilities completed up to level 10.
  • Commoners have been downgraded to a meagre d4 hit die.
  • Paladins now value Wisdom over Intelligence.
  • Wizards have been doing a bit of cardio and now value Constitution and Dexterity higher than Charisma and Wisdom.

Patch Notes 10.7.4

This patch is released as part of ongoing testing and quality updates. It should remain compatible with any previously created Seeds.
  • Fixed off-hand weapons not properly applying their Enchantment bonus to damage.
  • Ranged weapons now scale their damage down for small creatures.
  • Fixed Monks occasionally getting a blank Knowledge Skill.
  • Fixed Bards not getting Inspire Courage (+1) at first level.
  • Animal Companions will no longer have 'human' names. My next wolf companion is definitely going to be called Adelard of Warwick now though...
  • Two-handed weapons with negative strength mods no longer increase the penalty by 50%
  • Minor text fixes.

Patch Notes 10.7.5

Characters utilising Weapon Finesse now take the Armour Check Penalty to attack rolls from their shields, if applicable. It should remain compatible with any previously created Seeds.

Patch Notes 10.7.6

Animal companions will no longer pick up the Two-Weapon Fighting feats. It should remain compatible with any previously created Seeds.

Patch Notes 10.7.7

Small Monks now display the damage for their unarmed attacks where previously the dice size was not shown. This version remains compatible with previous seeds.

2 comments:

  1. Holy crap this is awesome. Is there a way to change this for other games? D&D 5th, IKRPG/UNLEASHED, Star Wars Edge of the Empire (for colonies/planets/etc..), Lo5R are all good games that could use this tool.

    - Bravo Zulu, Cheers

    Dozer

    ReplyDelete
    Replies
    1. Thank you for the kind comment! My knowledge of those games isn't good enough to make a character generator, but the population generator part would be relatively easy. I'd just need to know the class names and some ratios.

      I haven't opened it up to allow others to make changes to it yet because, basically, the code isn't well optimised/commented at the moment and is still being worked on. Eventually I would see no reason why the population generator part couldn't be opened up to allow people to make whatever changes they wish.

      Feel free to drop me an email if you'd like to chat about it. :)

      Delete