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: Mystaran NPC Generator (BECMI)

Postby Chimpman » Mon Aug 21, 2017 4:44 pm

Thanks GP, that helps a lot!

Sidenote that I forgot to mention before, but the Shade class from the Shimmering Lands is using a Thonian name generator. I pulled names from CD's work on Thonian Emperors, as well as a few Blackmoorian products/threads that I found over at the Comeback Inn in order to generate those names. Like all things I'm sure it could do with some more refinement. Anyway, we could very easily set up regions for Thonia and/or Blackmoor if anyone is interested in that (I'm looking specifically at Havard and RobJN ;) but I'm sure there are more out there).
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 » Mon Aug 21, 2017 5:32 pm

You are welcome. Sorry for the late reply, it was midnight here and I was already asleep :-)

Regarding Blackmoor, we can certainly set up regions for that era, if there is interest.

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

Re: Mystaran NPC Generator (BECMI)

Postby Chimpman » Mon Aug 21, 2017 6:43 pm

No problem ;) I know there is probably only a short overlap of time when we are both online (early/late and late/early).

I thought about attempting to factor out some of the code, especially around race, region, and origin. I'm noticing that when I add one of these things there can actually be quite a few different files to edit. It might be nice (for example) just to copy a race file template and then edit everything in one place. We may be ok for a while, but then I thought about Gaz 10, and there are probably several more races we will need to add. Anyway, I'm up for the attempt (and I've been having some fun learning Python lately), but wanted to get your thoughts before starting anything. Maybe the best way would be to create a branch so I don't ruin current functionality while I'm messing around?

Going back to the Shimmering Lands, I'm going to play around with the titles next... maybe tweak the immortals a bit more. Then try to set up some custom equipment (and maybe spells). Otherwise I think I have all the races set. Oh.. I was also playing around with some custom lifestyles. That's not a hard thing to add either, but it could end up getting pretty big (depending on how many custom sets I want to do). For example I can imagine that giantkin and dwarves in the Shimmering Lands may have very different backgrounds.
*I have to say I'm really impressed with the amount of work and thought you've put into this tool already. So much work can be done with this, I don't even think we've scratched the surface.

Next up on my BC 2300 TODO list is going to be:
Taymora
Mogreth
Urzud
All of which will require at least a few more custom races. Getting those done will probably also help to get the following modern regions done (Broken Lands, HW Malpheggi, HW Krugel)
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 » Mon Aug 21, 2017 8:32 pm

I agree about refactoring where possible. Let's have an experimental branch for that.

BTW, I'll be less active in the next two days, so you can have a head start on the refactoring.

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 22, 2017 6:34 am

I've had a look at the refactor commit. Great work!

A few comments:
  • The race generator module name can be automatically generated from the race name: 'Halfling' -> 'halfling', etc. I'd leave the generators data structure only for those that map on a different race name.
  • Orc and Ogre should be race/classes in BECMI, so they should belong to the same category as the Gnome rather than Human (Human basically has only Human, Lupin, Rakasta, and, should we implement them, Half-Elf and possibly Aranea)

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

Re: Mystaran NPC Generator (BECMI)

Postby Chimpman » Tue Aug 22, 2017 6:53 am

Wow, that was fast :D
agathokles wrote:[*] The race generator module name can be automatically generated from the race name: 'Halfling' -> 'halfling', etc. I'd leave the generators data structure only for those that map on a different race name.

Yeah, that's a good idea. Should be easy enough to force the name to lowercase.

agathokles wrote:[*] Orc and Ogre should be race/classes in BECMI, so they should belong to the same category as the Gnome rather than Human (Human basically has only Human, Lupin, Rakasta, and, should we implement them, Half-Elf and possibly Aranea)

Let me take a look at that and see if I can figure out the changes.
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 Chimpman » Tue Aug 22, 2017 7:35 am

Ahhh... that was an easy fix. I don't know why I was being dense about monster classes. I also factored out the age generation into the race modules (though some of the new races still need their age ranges to be recalculated).

I was also wondering (can't remember off the top of my head), but do monster classes have Attack Ranks (like dwarves and elves do), or do they simply go from 1-36? Right now the Gnomes are generating without Attack Ranks. It's too late right now or I'd check Top Ballista, but assuming we do want to add Attack Ranks to a class progression, where would that be done at?

I'll keep looking of course, but for now I need to hit the sack.
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 » Tue Aug 22, 2017 9:34 am

They go from 1 to 36, and use monster attack tables IIRC.
See namegen.py for the lowercase thing.

Attack ranks are manage separately in chargen.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 » Tue Aug 22, 2017 6:24 pm

I've had a look at the last commit. I see you have both an origin and a region called 'moadreg'. I'd avoid that -- even if it is generally not a problem, there are places where you want to keep them divided (in particular, in the immortal selection).

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

Re: Mystaran NPC Generator (BECMI)

Postby Chimpman » Tue Aug 22, 2017 6:54 pm

agathokles wrote:I've had a look at the last commit. I see you have both an origin and a region called 'moadreg'. I'd avoid that -- even if it is generally not a problem, there are places where you want to keep them divided (in particular, in the immortal selection).

Ahh... you're right. I think that the region should actually be called "Shimmering Lands", while the origin is "moadreg". That might have been a cut and paste error on my part.

EDIT: I don't think those two classes are ready yet (origingen and regiongen). I probably shouldn't have checked them in, but they aren't being used now. I want to get all the way through the race refactor before I move on to those.
Last edited by Chimpman on Tue Aug 22, 2017 7:08 pm, edited 1 time in total.
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 » Tue Aug 22, 2017 6:55 pm

Chimpman wrote:Ahh... you're right. I think that the region should actually be called "Shimmering Lands", while the origin is "moadreg". That might have been a cut and paste error on my part.


Yes, the region is "Shimmering Lands" in the master branch.

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

Re: Mystaran NPC Generator (BECMI)

Postby Chimpman » Wed Aug 23, 2017 7:16 am

Checked in the next round of changes. Getting closer. I think there are a few more classes I want to take a look at for the race code refactor:
skills
social
titles
traits

That'll be for another night. Brain shutting down ;)
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 » Wed Aug 23, 2017 12:35 pm

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

Re: Mystaran NPC Generator (BECMI)

Postby Chimpman » Wed Aug 23, 2017 5:02 pm

Pulled out Gaz 10 for a refresher, and there are a few requirements and details that I haven't added to the Ogre class yet. Since I've got the book open I'll probably go through the rest of the humanoid races and set them up as well.
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 » Wed Aug 23, 2017 5:25 pm

Great, 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 » Fri Aug 25, 2017 5:58 pm

So, we've got a new feature: a Myoshiman name generator, and Myoshima is now available as a region.

Meanwhile, Chimpman is working on a major redesign of the code, which will make the generator much more flexible, and therefore the results much more reasonable.

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

Re: Mystaran NPC Generator (BECMI)

Postby aklanda » Fri Aug 25, 2017 9:36 pm

The generator is still working flawlessly on PC and this is still excellent work!

Just a small remark: In the read-me file "README.md" it states, that you have to type "./genpdf.py". Is this unix-specific?
(Cause in windows you have to type a backslash instead: ".\genpdf.py")
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 » Fri Aug 25, 2017 9:37 pm

Yes, in Unix (and Mac), it's /

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

Re: Mystaran NPC Generator (BECMI)

Postby Chimpman » Sun Aug 27, 2017 2:11 am

I've gone through a second set of refactoring, working with the Regions. I also started implementing all of the humanoids as Races, and the Broken Lands as a Region, in an attempt to reveal any holes in the refactoring project. I've found a few places:

weapons.py - There is code that looks for a weapon set based on class, however for monster classes, race and class are synonymous. I've also been thinking about factoring out character classes... I might do that after origins. That might help when it comes to some of this char class based definition code, but it also means that for things like monster races we would need to define two different mods: 1) Race mod, and 2) Character Class mod.

savingthrows.py - Another character class based selection code. Same issues as above.

chargen.py - This class has HP generation code, again based on character class. Same issues

config.py There is a list defining primary ability scores for character class. Same issues

I also wanted to get your thoughts on the immortals.py code and how that should be used. Right now I think we are going to end up with a couple of different categories for immortals/religion. So far I think they are:

Region - immortal list
Region - pantheon list

Origin - immortal list

Race - immortal list (this might actually be synonymous with the Origin level category - it seems to only exist for demi-humans at the moment)

How do/should these interact with one another? Does one category supersede another?
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 » Sun Aug 27, 2017 8:33 am

Chimpman wrote:I've gone through a second set of refactoring, working with the Regions. I also started implementing all of the humanoids as Races, and the Broken Lands as a Region, in an attempt to reveal any holes in the refactoring project. I've found a few places:


Thanks!

weapons.py - There is code that looks for a weapon set based on class, however for monster classes, race and class are synonymous. I've also been thinking about factoring out character classes... I might do that after origins. That might help when it comes to some of this char class based definition code, but it also means that for things like monster races we would need to define two different mods: 1) Race mod, and 2) Character Class mod.


Well, monster classes are not unlike demihumans: the class and race share the same name. So, in this case you select the allowed weapons based on the class. However, it is worth noting that humanoid classes, per se, have the same selection as Fighters. Thus, it would be probably better to use a dual selector: weapons allowed by class, and weapons favorites by origin. Ideally, classes include a mapping such as 'Orc' : 'Fighter' or 'Dwarf Cleric' : 'Dwarf' to avoid duplication, while weapon favorites by origin would be managed with the usual frequency classes (allowing e.g. a Red Orc to favor bows and hand axes, and an Orcus Rex orc to favor swords instead). There is a partial implementation of this step in config.py, altough at the moment there is just a list of favorite weapons.

savingthrows.py - Another character class based selection code. Same issues as above.


I think it is not worth the effort to partition this code by class: indeed, all classes except the base ones map on the ST table of another class. This is already taken into account in the mapping table provided in this file, which could/should be transformed into a getter in each class file. Once more, for race/classes I would have one race file and one class file to simplify the management.
There is at least one exception (normal monsters have their own STs which may supercede those of low level character classes: e.g., an Ogre NM saves as F4, IIRC, and an Ogre 1 also saves as F4, not F1. An Ogre 7, however, saves as F7, etc).

chargen.py - This class has HP generation code, again based on character class. Same issues


As in the other cases, HP management can be provided through a getter that maps each class on one of the base ones. However, some races also impact (Lupins, Rakasta, and monster classes have initial HD).

config.py There is a list defining primary ability scores for character class. Same issues


This one can be transformed into a getter or just a value in the class file. No need to involve the race.

I also wanted to get your thoughts on the immortals.py code and how that should be used. Right now I think we are going to end up with a couple of different categories for immortals/religion. So far I think they are:

Region - immortal list
Region - pantheon list

Origin - immortal list

Race - immortal list (this might actually be synonymous with the Origin level category - it seems to only exist for demi-humans at the moment)

How do/should these interact with one another? Does one category supersede another?


Ok, the idea is that the set of available immortals or religions should be:

(immortals_by_origin and immortals_by_region) or pantheon_by_region

However, it would be better to introduce the usual frequency specifiers to define how popular is each item of immortals_by_origin or pantheon_by_region (immortals_by_region is just a filter).

As usual, a mapping can be useful -- initially I didn't think of using this approach, and just had demihumans fall back to their racial immortals, but it would be simpler to map them as separate origins, e.g., 'Montoya' : 'Ispan' but 'Norwold' : 'Denwarf' for Dwarves.

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 27, 2017 3:27 pm

I've committed a set of changes into master which allow Norwold dwarves to use a different set of clans. It redirects Denwarf Dwarves from Norwold to a different name generators, which imports the standard dwarf.py and provides a different definition of the clan module variable. The alternative is to add a parameter to the get_name function, although that would be more intrusive.

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

Re: Mystaran NPC Generator (BECMI)

Postby Chimpman » Sun Aug 27, 2017 8:46 pm

agathokles wrote:Well, monster classes are not unlike demihumans: the class and race share the same name. So, in this case you select the allowed weapons based on the class. However, it is worth noting that humanoid classes, per se, have the same selection as Fighters. Thus, it would be probably better to use a dual selector: weapons allowed by class, and weapons favorites by origin. Ideally, classes include a mapping such as 'Orc' : 'Fighter' or 'Dwarf Cleric' : 'Dwarf' to avoid duplication, while weapon favorites by origin would be managed with the usual frequency classes (allowing e.g. a Red Orc to favor bows and hand axes, and an Orcus Rex orc to favor swords instead). There is a partial implementation of this step in config.py, altough at the moment there is just a list of favorite weapons.

This makes sense. As you also say, partitioning some of this code out by char class is probably a good idea. I'll start thinking along those lines. I also like the idea of setting up frequencies for the weapon choices.

Re saving throws:
agathokles wrote:I think it is not worth the effort to partition this code by class: indeed, all classes except the base ones map on the ST table of another class. This is already taken into account in the mapping table provided in this file, which could/should be transformed into a getter in each class file. Once more, for race/classes I would have one race file and one class file to simplify the management.
There is at least one exception (normal monsters have their own STs which may supercede those of low level character classes: e.g., an Ogre NM saves as F4, IIRC, and an Ogre 1 also saves as F4, not F1. An Ogre 7, however, saves as F7, etc).

Yes, that seems to make the most sense to me as well.


agathokles wrote:Ok, the idea is that the set of available immortals or religions should be:

(immortals_by_origin and immortals_by_region) or pantheon_by_region

However, it would be better to introduce the usual frequency specifiers to define how popular is each item of immortals_by_origin or pantheon_by_region (immortals_by_region is just a filter).

As usual, a mapping can be useful -- initially I didn't think of using this approach, and just had demihumans fall back to their racial immortals, but it would be simpler to map them as separate origins, e.g., 'Montoya' : 'Ispan' but 'Norwold' : 'Denwarf' for Dwarves.

Frequencies are a great idea. I also agree that rather than having racial preferences (for demi-humans and such) it's just easier to make everything origin based.

I just want to make sure I'm understanding your use of the term "filter" for immortals_by_region. Should the algorithm be:

(immortals_by_origin intersect immortals_by_region) union pantheon_by_region

I think this is pretty much what the current code is doing (based on the logical operators being used), but just wanted to make sure that is the intent. It makes sense, in that the origin's preferences are filtered by the region. I suppose it is possible that a given region could entirely filter out an origin's immortal choices (if there is no overlap) in which case that origin would default to the region pantheons (using the above algorithm).

That's how I will move forward unless you clarify otherwise.

Thanks GP - these comments really helped!
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 » Sun Aug 27, 2017 9:33 pm

Yes, that's the idea for the Immortals.
GP
agathokles
Red Dragon
 
Posts: 6597
Joined: Sat May 24, 2008 6:42 pm
Location: Milan, Italy

Re: Mystaran NPC Generator (BECMI)

Postby Chimpman » Mon Aug 28, 2017 5:30 am

Just checked in a fairly large set of changes.

Regions and Races should be all factored out now.
- Made some modifications to the region refactor.

- Started the origin refactor. There are only a few origins done now, but the code should be set up to work both with the refactored origins and the dictionary origins.

- Added Broken Lands as a region, and each of the BL territories as origins.
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 » Sun Sep 03, 2017 12:14 pm

Ok, I had a look at the code and decided to bring Code-Refactor into the main line. I rebased it to origin/master to bring in my modifications -- I had to redo a bit of work for Myoshima, since the changes were extensive. However, worked out. I also spotted a bug on the replacement of Immortal names, and fixed that too.
Finally, I merged Code-Refactor into master.
At the moment, master and Code-Refactor are therefore in the same state.

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

PreviousNext

Return to Mystara

Who is online

Users browsing this forum: Havard, Yahoo [Bot] and 2 guests