MPGen – A Character Starter

I’m a programmer by profession and while I often tinker briefly with new languages and techniques, the knowledge doesn’t stay with me long if I don’t do anything non-trivial with it.  I’d been trying to think of a good learning project to work on, and one day while rolling up a couple of one-shot, more-or-less throw-away villains for my campaign, it occurred to me, it would be nice if the random parts of this could be automated to get to the interesting stuff more quickly.

So that’s what I did.

MPGen screenshot

MPGen is a “character quickstarter” for Mighty Protectors.  It starts with a list of basic characteristics such as Side, Power Level, Birthplace, sexual traits, etc. – any of which can be specifically selected or left to be randomly generated.  The “Generate Character” button will then roll up basic stats, powers and weaknesses (including species-appropriate items) – basically everything you’ll need to get to the point where you start figuring out a character concept based on the random powers and digging into the specifics of the character’s powers and weaknesses.

The “Download” option for a generated character isn’t implemented yet because I’m still experimenting with different ways to make it work, but the intention is to have the tool create a downloadable spreadsheet version of the new character’s stats, including a page designed to be copy/pasted directly into the Excel Record Sheet in such a way as to auto-fill the relevant fields without overriding any of the built-in calculations.  Once it’s complete, instructions will posted here and included in the document itself.

Update: Spreadsheet download is now enabled! Clicking the download button will retrieve a 3-tab spreadsheet. The first tab is a simple, compact character sheet built by me, so it’s probably not that great because I’m just not a designer. Suggestions for improvement are welcome. The second tab is a set of generic instructions for inserting results into the Excel Record Sheet Pack character sheet, and the third is the data formatted for use with that sheet. I intend to add spreadsheet-app-specific and screenshot-heavy instructions over time, and those will be linked here.

The technical details, for those who are interested:

I’ve been primarily living in the Microsoft .NET world for most of my career, but have long wanted to branch out more into other technologies.  My current employer is a large company which supports many platforms, but .NET is quickly becoming an also-ran there in terms of getting support for it in our cloud environments and deployment tools.  The team I’m on will probably be trying to start a new project in the near future that will be based on the technologies I’ve used for MPGen.

The bulk of the functional character generation logic is built in Python using the Django REST Framework.  The lists of available character attributes are in a simple SQLite database.

The user interface is a ReactJS application built with the Material-UI library.  The select dropdowns are all initially populated by calls to the REST services, then cached locally to eliminate unnecessary network traffic.  Character generation likewise happens when the service receives a list of parameters and sends back the results to be formatted for display in the UI.

For the spreadsheet download feature, my initial inclination was to use a service call for that as well.  However, since my current web host doesn’t support Python, that part MPGen is hosted on a free service with space and traffic limitations that might be impacted by building files and sending them across.  So at this point the sheets will probably be generated on the React side of things – I’m looking at a couple of different libraries for building & editing Excel or OpenDocument spreadsheets to see which will best serve for this function.

6 thoughts on “MPGen – A Character Starter”

  1. There was an issue in the initial version where it was only assigning four abilities rather than rolling for six and allowing a selection of four. This is partially fixed now – it lists 6 abilities with a note to pick four – but in the near future I’ll turn the non-species-specific abilities into checkbox list limited to 4 selections. Similarly to the dropdown for motivation selection and the background choice checkboxes, this will be just a visual cue for the moment but when I get the spreadsheet generation working it will feed into that so only your selections come up on the end result.

  2. I am not able to insert the data into the official excel character sheet, followed instruction and pasting as any format but it doesn’t work?

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to Top