Mystaran NPC Generator (BECMI)

Weird red metals, dominions, immortals, hollow planets, invisible moons, and a lot of glorified magic zeppelins. It's all here.
The Book-House: Find Mystara products, Find Known World products.

Moderators: Gawain_VIII, Havard, Seer of Yhog, Cthulhudrew

Re: How-to: spells

Postby RobJN » Mon Jul 31, 2017 8:59 pm

agathokles wrote:How to define a spell selection

At the moment, in order to change the spell selection for wizards, you need to edit the spellbook.py file. The following data structure

.... man, and here I thought I was finally going to learn how to really cast "Mind Bondage".... :oops:
Rob
Thorn's Chronicle: The Thread Index|Thorn's Chronicle Blog
My articles at the Vaults of Pandius; My W.O.I.N. adventure in ENWorld's EONS Patreon #56.
Follow Thorn's Chronicle on Facebook | G+ | twitter
User avatar
RobJN
Dire Flumph
 
Posts: 3587
Joined: Sun May 25, 2008 10:33 pm
Location: Texas, USA

Re: How-to: spells

Postby agathokles » Mon Jul 31, 2017 9:07 pm

RobJN wrote:
agathokles wrote:How to define a spell selection

At the moment, in order to change the spell selection for wizards, you need to edit the spellbook.py file. The following data structure

.... man, and here I thought I was finally going to learn how to really cast "Mind Bondage".... :oops:


LOL!

GP
agathokles
Red Dragon
 
Posts: 6597
Joined: Sat May 24, 2008 6:42 pm
Location: Milan, Italy

Re: Mystaran NPC Generator (BECMI)

Postby agathokles » Tue Aug 01, 2017 5:19 pm

Version 28 is online. The only new feature is Custom Spellbooks, currently limited to Karameikos and Alphatia. "Rules Cyclopedia" option is the old version, the new one is based on the Tome of Mystaran Magic for Alphatia, and the Gazetteer for Karameikos. I'll probably split these in two options in the future.
Also, I've fixed a bug that prevented the correct generation of a single high level NPC with a retinue.
Finally, note that the spellbook creation data structures have been moved into the spellbooks folder. I'll update the how-to accordingly.

GP
agathokles
Red Dragon
 
Posts: 6597
Joined: Sat May 24, 2008 6:42 pm
Location: Milan, Italy

Re: Mystaran NPC Generator (BECMI)

Postby agathokles » Tue Aug 01, 2017 8:04 pm

New version (this was quick :-) ).
Main new feature is the generation of the social status of the family (look in the "life experiences" section, it is the first sentence).
The generator is fairly generic, except for Rockhome, Karameikos and for Heldanner and Vatski/Vrodniki characters in Norwold. It still does not influence the likelihood of titles (I'm going to implement this ASAP), nor it affects starting gold (since various gazetteers conflict as to whether the starting gold should be influenced or not by the social class, I'm staying with the basic rules here).

The structure used to provide this feature is held in file social.py. You can add new regions, and ethnic groups or races within a region with the usual method (it uses the standard frequency specifiers).

Both the online and offline versions have been updated.

GP
agathokles
Red Dragon
 
Posts: 6597
Joined: Sat May 24, 2008 6:42 pm
Location: Milan, Italy

Re: Mystaran NPC Generator (BECMI)

Postby agathokles » Fri Aug 04, 2017 3:40 pm

New version is online. I've added Rockhome and support for female nicknames in Averoignese, Belcadiz/Ispan and Caurenzan.

As a side note, the generator is now complex enough that I've decided to move the development over to git on bitbucket. If you're interested in contributing (this is especially for Chimpman, but anyone else with the appropriate skills is welcome), let me know and I'll send an invitation for the project.

GP
agathokles
Red Dragon
 
Posts: 6597
Joined: Sat May 24, 2008 6:42 pm
Location: Milan, Italy

Re: Mystaran NPC Generator (BECMI)

Postby Chimpman » Fri Aug 04, 2017 5:14 pm

agathokles wrote:New version is online. I've added Rockhome and support for female nicknames in Averoignese, Belcadiz/Ispan and Caurenzan.

As a side note, the generator is now complex enough that I've decided to move the development over to git on bitbucket. If you're interested in contributing (this is especially for Chimpman, but anyone else with the appropriate skills is welcome), let me know and I'll send an invitation for the project.

Yes please, drop me a line. I've been looking over the code this past week, getting a sense for it, but haven't had much time to post my thoughts here. I definitely have ideas and want to contribute.
Visit the Exiles Campaign Setting (a Mystara / Spelljammer crossover)
Visit Mystara 2300 BC

Moderator of The Tabard Inn and Blackmoor. My moderator voice is purple.
User avatar
Chimpman
Hadozee
 
Posts: 7549
Joined: Thu May 22, 2008 6:52 pm
Location: USA, California

Re: Mystaran NPC Generator (BECMI)

Postby agathokles » Sat Aug 05, 2017 4:13 pm

Chimpman wrote:
agathokles wrote:New version is online. I've added Rockhome and support for female nicknames in Averoignese, Belcadiz/Ispan and Caurenzan.

As a side note, the generator is now complex enough that I've decided to move the development over to git on bitbucket. If you're interested in contributing (this is especially for Chimpman, but anyone else with the appropriate skills is welcome), let me know and I'll send an invitation for the project.

Yes please, drop me a line. I've been looking over the code this past week, getting a sense for it, but haven't had much time to post my thoughts here. I definitely have ideas and want to contribute.


Done. Let me know if there is anything I can help with -- the code is not really documented, unfortunately, so there might be obscure sections here and there.

GP
agathokles
Red Dragon
 
Posts: 6597
Joined: Sat May 24, 2008 6:42 pm
Location: Milan, Italy

Re: Mystaran NPC Generator (BECMI)

Postby agathokles » Sun Aug 06, 2017 7:20 am

New version is online: high level ability scores and HP roll option available. It turns all 1s to 2s when rolling HPs and ability scores. It can be combined with the optimization rules, and can be selectively activated for name level NPCs only.

(P.S.: I just fixed a small bug on this feature, it should now be working properly)
agathokles
Red Dragon
 
Posts: 6597
Joined: Sat May 24, 2008 6:42 pm
Location: Milan, Italy

Re: Mystaran NPC Generator (BECMI)

Postby agathokles » Tue Aug 08, 2017 6:53 am

New version is online: I fixed a bug in the parameter processing, and added the Dervish class (Ylaruam only).

GP
agathokles
Red Dragon
 
Posts: 6597
Joined: Sat May 24, 2008 6:42 pm
Location: Milan, Italy

Re: Mystaran NPC Generator (BECMI)

Postby Robin » Tue Aug 08, 2017 11:10 am

Still Great works :mrgreen:
My Deviantart page; http://6inchnails.deviantart.com/ For Mystara hexmaps and Fantasy art (to see all fantasy art; enter and declare you are an adult...frigging exposure rules)
My personal Mystara Blog;http://breathofmystara.blogspot.nl/
User avatar
Robin
Cloud Giant
 
Posts: 1311
Joined: Fri Feb 15, 2013 3:33 pm
Location: Netherland Groningen

Re: Mystaran NPC Generator (BECMI)

Postby agathokles » Tue Aug 08, 2017 11:48 am

Thanks! :-)
GP
agathokles
Red Dragon
 
Posts: 6597
Joined: Sat May 24, 2008 6:42 pm
Location: Milan, Italy

Re: Mystaran NPC Generator (BECMI)

Postby agathokles » Tue Aug 08, 2017 5:18 pm

Small update: Alasiyan names, titles, and nicknames have been expanded a bit. Alasiyan nicknames are in English, for the sake of simplicity.

GP
agathokles
Red Dragon
 
Posts: 6597
Joined: Sat May 24, 2008 6:42 pm
Location: Milan, Italy

Re: Mystaran NPC Generator (BECMI)

Postby agathokles » Thu Aug 10, 2017 6:28 pm

Major update: Darokin is now available as a region, with a name generator. Custom titles, social standings, and churches have been added to complete the generation of Darokin NPCs. Names are based on the Gazetteer as well as on the fan works, mostly by Geoff Gander and Aaron Nowack.

GP
agathokles
Red Dragon
 
Posts: 6597
Joined: Sat May 24, 2008 6:42 pm
Location: Milan, Italy

Re: Mystaran NPC Generator (BECMI)

Postby Chimpman » Fri Aug 11, 2017 5:14 pm

I have been playing around with this - mostly just getting my environment set up. I know you developed this on Linux but as my main dev computer (at home) is a Windows machine I thought I'd at least try to get it running there and see what works. I'm not having much luck getting the LaTex piece to generate pdf files yet, though it appears I've been able to get the main python generator to work. I may end up switching over to my Mac Mini (running OSX) if you think I'll have more luck on that machine.
Visit the Exiles Campaign Setting (a Mystara / Spelljammer crossover)
Visit Mystara 2300 BC

Moderator of The Tabard Inn and Blackmoor. My moderator voice is purple.
User avatar
Chimpman
Hadozee
 
Posts: 7549
Joined: Thu May 22, 2008 6:52 pm
Location: USA, California

Re: Mystaran NPC Generator (BECMI)

Postby agathokles » Fri Aug 11, 2017 6:16 pm

OS X is basically linux. You should have no problems. That said, modern Windows should work as well. You can install LaTeX for Windows from TexLive:
https://www.tug.org/texlive/windows.html

GP
agathokles
Red Dragon
 
Posts: 6597
Joined: Sat May 24, 2008 6:42 pm
Location: Milan, Italy

Re: Mystaran NPC Generator (BECMI)

Postby agathokles » Fri Aug 11, 2017 7:32 pm

Also:
  • You can use the html backend to check the Python side works correctly.
  • I haven't developed on Windows in the last 17 years... I hope Python's facilities for interfacing with the OS work on Windows as well, but I have never used them. The pdf generator uses the "os.system" call from the posix library. It should be compatible. It also uses os.environ, but it is not critical.

Let me know any issue you might get while trying to run the code -- I'll try to make the code as portable as possible.

GP
agathokles
Red Dragon
 
Posts: 6597
Joined: Sat May 24, 2008 6:42 pm
Location: Milan, Italy

Re: Mystaran NPC Generator (BECMI)

Postby Chimpman » Fri Aug 11, 2017 9:27 pm

agathokles wrote:Also:
  • You can use the html backend to check the Python side works correctly.

:oops: That's a great idea. I'll play around with that next.
Visit the Exiles Campaign Setting (a Mystara / Spelljammer crossover)
Visit Mystara 2300 BC

Moderator of The Tabard Inn and Blackmoor. My moderator voice is purple.
User avatar
Chimpman
Hadozee
 
Posts: 7549
Joined: Thu May 22, 2008 6:52 pm
Location: USA, California

Re: Mystaran NPC Generator (BECMI)

Postby agathokles » Sat Aug 12, 2017 7:16 am

Ok. Just use genhtml.py instead of genpdf.py.

GP
agathokles
Red Dragon
 
Posts: 6597
Joined: Sat May 24, 2008 6:42 pm
Location: Milan, Italy

Re: Mystaran NPC Generator (BECMI)

Postby agathokles » Sat Aug 12, 2017 7:30 pm

agathokles wrote:Features I'm planning to implement at some point:
  • Culture-specific nicknames done
  • Social class of the family done
  • Maybe adding a few more classes/races (specifically, the Dervish from Gaz 2 done, Gnomes from Top Ballista, and maybe Aranea)
  • Adding Rockhome done, Alfheim, and the Shadow Elves Territories as new regions
  • High level character generation rules for ability scores done
  • Make training more flexible (at the moment, it is always attempted, but I also have an option ready to let NPCs drop out of training earlier which could be made available in the interface) done
  • Account for gender in the generation of height and weight

It would be also possible to expand the generator to use non-canon information, such as weapons from the Mystaran Armory (at the moment, all canon weapons I know of are included) or spells from the Tome of Mystaran Magic (at the moment, spellbooks are generated only from RC spells) done.
However, these are time consuming projects (mostly from having to type in the information; allowing support for alternate items is quite easy), so they are not on my todo list for the moment.


Well, actually at this point almost all of this stuff is done. Remaining open issues:
  • Regions to add: Alfheim, Shadow Elf Territories, possibly Sind, Hule and the Converted Lands, Minrothad and Ierendi.
  • Name generators: Robrenn (currently using the Dunael one, but Robrenn names are out of Asterix's Gaul, not Scotland), Cimarron, Hule, Simbasta, Ierendi, Minrothad, Glantrian Ethengarians, Sindhi.
  • Height and weight by gender
  • Weapons from the Mystaran Armory
  • Races to add: Gnome, Aranea, possibly others (from PC or Savage Coast)
  • Classes to add: Atruaghin Shamani, Norse Wise Woman, Elf Druid, Elf Cleric, Shadow Elf Shaman, Elf Treekeeper, Elf Wizard
  • Special or additional classes to add: Secret Crafts, Elf Paladins/Druidic Knights, Darokin Merchant, Minrothad Sea Prince

GP
agathokles
Red Dragon
 
Posts: 6597
Joined: Sat May 24, 2008 6:42 pm
Location: Milan, Italy

Re: Mystaran NPC Generator (BECMI)

Postby aklanda » Sat Aug 12, 2017 8:34 pm

Great Work!

I also tried to start the generator in windows, but had no success.

This is what I did:

I installed python (python-3.6.2) and LATEX (basic-miktex-2.9.6361-x64).

Probably I was a bit dizzy, but python installed itself in a quite funny directory:
C:\Users\MYUSERNAME\AppData\Local\Programs\Python\Python36-32


Then I opened a windows-console, changed to the directory, in which I downloaded the generator, and tried to start the python-script:

Image

As you can see, this wasn't working.

My interpretation of the output is, that the script misses Gooey (which I understand is neccessary for GUI input).

So I tried to install it, but was only able to download a "wheel"-file:

https://pypi.python.org/pypi/Gooey/#downloads

I tried to find information on where to put it, but as it seems, this is a special file-format for installation-files to be installed with "pip".

So I tried to install it with pip (which is, I assume, the Python Installer) by putting the downloaded file "Gooey-0.9.2.3-py2-none-any.whl" in the same directory as the generator and by typing:

Image

with not really more success.


Right now I give up and would also like to try the "html"-way. You wrote:

agathokles wrote:Ok. Just use genhtml.py instead of genpdf.py.
GP


Do I get this right: Are you suggesting to simply open the file "genhtml.py" (with python installed of course) with a browser (which didn't work for me), or did I get it wrong?
Wouldn't I need to set up my own machine as a html-server first (with apache and so on)?

Thanks for your great work!
Last edited by aklanda on Sat Aug 12, 2017 10:29 pm, edited 1 time in total.
Place hundreds of orcs against a company of elves: Aklandas Large Battle Simulator
User avatar
aklanda
Gnoll
 
Posts: 123
Joined: Sat Apr 22, 2017 2:38 pm
Location: Europe

Re: Mystaran NPC Generator (BECMI)

Postby agathokles » Sat Aug 12, 2017 9:41 pm

You can use the command line, if you can't install Gooey: just run ./genpdf.py --help. Also, maybe just trying to install gooey with pip install gooey could help (it should fetch the correct package).

For the html version, you'll have the same problems. Anyway, there are two ways: you can install the web server version (it uses flask, which you'd need to install), or you can just generate an html file, and then open it with the browser. For this version, run ./genhtml.py --help to see the command line options.

GP
agathokles
Red Dragon
 
Posts: 6597
Joined: Sat May 24, 2008 6:42 pm
Location: Milan, Italy

Re: Mystaran NPC Generator (BECMI)

Postby agathokles » Sat Aug 12, 2017 10:10 pm

BTW, you need to use Python 2. not Python 3!
Run it with python2 ./genpdf.py instead of just the file name.

GP
agathokles
Red Dragon
 
Posts: 6597
Joined: Sat May 24, 2008 6:42 pm
Location: Milan, Italy

Re: Mystaran NPC Generator (BECMI)

Postby aklanda » Sat Aug 12, 2017 11:02 pm

agathokles wrote:BTW, you need to use Python 2. not Python 3!
Run it with python2 ./genpdf.py instead of just the file name.
GP


I deinstalled python 3 and installed python-2.7.13.msi. Looks better now, but I still got problems. How many paramaters do I have to specify? All of them? Can you post a simple standard-input for the command-line, which should create an pdf-output?

Got the following results (after LATEX made some updates).

Image
Place hundreds of orcs against a company of elves: Aklandas Large Battle Simulator
User avatar
aklanda
Gnoll
 
Posts: 123
Joined: Sat Apr 22, 2017 2:38 pm
Location: Europe

Re: Mystaran NPC Generator (BECMI)

Postby aklanda » Sat Aug 12, 2017 11:27 pm

As I had a second glimpse on the output of the cmd:


I assume the message
"Der Befehl 'mv' ist entweder falsch geschrieben ...
"working in 'pwd' "

tells us, that the command "mv" is not understood by windows and that instead of moving the file to the specified position either LATEX or Python left it in the default directory "pwd" (which I can't find).
Are you (or is LATEX) using the linux "mv" command to move the pdf-file to the right position? And where should the pdf-file be created normally?
Place hundreds of orcs against a company of elves: Aklandas Large Battle Simulator
User avatar
aklanda
Gnoll
 
Posts: 123
Joined: Sat Apr 22, 2017 2:38 pm
Location: Europe

Windows: Instructions

Postby aklanda » Sat Aug 12, 2017 11:55 pm

Sorry, it works all fine. I was just to confused to find the output file.

OK, for anyone who wants to make it work in windows, here is an instruction, how it worked for me:

1. Install Python2: https://www.python.org/downloads/release/python-2713/
2. Install Latex: https://miktex.org/2.9/setup
3. Open a console-window (Start and type "cmd" in the search-box. Afterwards press String-Shift-Return)
4. (Probably not neccessary:) Type "pip install gooey" in the console and hit "return"
5. If you have not yet downloaded the NPC generator do so and unzip it somewhere
6. Navigate (in the console) to the place where you unzipped the NPC generator (reminder: "c.." goes up in the directory, "dir" shows the present files and "cd /myDirectory" dives into the directory with name "myDirectory")
7. When you reached the place IN the directory of the NPC generator type for example:
".\genpdf.py -n 10 -l 2 -r Thyatis" to generate 10 lvl2 characters from Tyatis or
".\genpdf.py -n 100 -m 1 -t 6 -r Karameikos" to generate 100 characters from lvl1 to lvl6 from Karameikos
8. Have a look at the directory of the NPC generator! The file named "npc.pdf" holds your character-pdf
9. For a more detailed list of parameters you can work with type ".\gendpdf.py --help" in the console-window

Thanks for you help agathokles and this is really good work!
Last edited by aklanda on Sun Aug 13, 2017 1:11 pm, edited 1 time in total.
Place hundreds of orcs against a company of elves: Aklandas Large Battle Simulator
User avatar
aklanda
Gnoll
 
Posts: 123
Joined: Sat Apr 22, 2017 2:38 pm
Location: Europe

PreviousNext

Return to Mystara

Who is online

Users browsing this forum: Bing [Bot] and 3 guests