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 agathokles » Fri Aug 18, 2017 6:21 pm

Regarding the commit, maybe you did the git commit but not the git push.

Regarding origins and races: I've implemented a double mechanism for several items, where in absence of an origin-based value, a race-based value can be used instead. I should have probably done it more extensively, but many parts of the code were developed when I didn't imagine to make the generator so large, so they are sub-par or irregular in design.
So, in the Savage Coast, Montoya dwarves use the ispan.py name generator instead of the dwarven one. This is specified in namegen.py.
On the other hand, I could add Modrigswerg dwarves without specifying a name generator, and they would fall back onto the generic dwarf.py generator.

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

Re: Mystaran NPC Generator (BECMI)

Postby Chimpman » Fri Aug 18, 2017 6:26 pm

Here is some code from config.py
Code: Select all
def align_selector(race, origin) :
   if race in [ 'Dwarf', 'Elf', 'Halfling' ] :
      aligns = align_by_origin[race]
   else :
      aligns = align_by_origin[origin]
   return sum([ [ c ] * freq[aligns[c]] for c in aligns ],[])


I think I may have run into this last night while I was playing around. Does this mean that if the race is "Dwarf", then alignment selection by origin will not work? I'm not sure where this is being called from, but what we may want to do is check first if origin exists (and has a value), use origin alignment, otherwise if race is demi-human, use racial alignment. That way we can override racial alignments if we want to (by setting up a specific origin), but there is still a default value available if we don't do that.
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: 7495
Joined: Thu May 22, 2008 6:52 pm
Location: USA, California

Re: Mystaran NPC Generator (BECMI)

Postby Chimpman » Fri Aug 18, 2017 6:34 pm

agathokles wrote:Regarding the commit, maybe you did the git commit but not the git push.

Yeah, that's probably what happened with the commit.
agathokles wrote:Regarding origins and races: I've implemented a double mechanism for several items, where in absence of an origin-based value, a race-based value can be used instead. I should have probably done it more extensively, but many parts of the code were developed when I didn't imagine to make the generator so large, so they are sub-par or irregular in design.
So, in the Savage Coast, Montoya dwarves use the ispan.py name generator instead of the dwarven one. This is specified in namegen.py.
On the other hand, I could add Modrigswerg dwarves without specifying a name generator, and they would fall back onto the generic dwarf.py generator.

Got it. Looks like they are using belcadiz.py (I don't see an ispan.py anywhere), but I get what you're saying. It's the same name generator being used by the Belcadiz elves, Montoya dwarves, several lupin breeds, and Ispan humans.

Sorry to keep pestering you with questions, but this is helping me a lot! Thanks!
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: 7495
Joined: Thu May 22, 2008 6:52 pm
Location: USA, California

Re: Mystaran NPC Generator (BECMI)

Postby agathokles » Fri Aug 18, 2017 9:08 pm

Chimpman wrote:Here is some code from config.py
Code: Select all
def align_selector(race, origin) :
   if race in [ 'Dwarf', 'Elf', 'Halfling' ] :
      aligns = align_by_origin[race]
   else :
      aligns = align_by_origin[origin]
   return sum([ [ c ] * freq[aligns[c]] for c in aligns ],[])


I think I may have run into this last night while I was playing around. Does this mean that if the race is "Dwarf", then alignment selection by origin will not work? I'm not sure where this is being called from, but what we may want to do is check first if origin exists (and has a value), use origin alignment, otherwise if race is demi-human, use racial alignment. That way we can override racial alignments if we want to (by setting up a specific origin), but there is still a default value available if we don't do that.


Yes, I'll need to allow an override for this!
GP
agathokles
Blue Dragon
 
Posts: 6492
Joined: Sat May 24, 2008 6:42 pm
Location: Milan, Italy

Re: Mystaran NPC Generator (BECMI)

Postby agathokles » Fri Aug 18, 2017 9:09 pm

Chimpman wrote:
agathokles wrote:Regarding the commit, maybe you did the git commit but not the git push.

Yeah, that's probably what happened with the commit.
agathokles wrote:Regarding origins and races: I've implemented a double mechanism for several items, where in absence of an origin-based value, a race-based value can be used instead. I should have probably done it more extensively, but many parts of the code were developed when I didn't imagine to make the generator so large, so they are sub-par or irregular in design.
So, in the Savage Coast, Montoya dwarves use the ispan.py name generator instead of the dwarven one. This is specified in namegen.py.
On the other hand, I could add Modrigswerg dwarves without specifying a name generator, and they would fall back onto the generic dwarf.py generator.

Got it. Looks like they are using belcadiz.py (I don't see an ispan.py anywhere), but I get what you're saying. It's the same name generator being used by the Belcadiz elves, Montoya dwarves, several lupin breeds, and Ispan humans.

Sorry to keep pestering you with questions, but this is helping me a lot! Thanks!


Yes, I wrote the Belcadiz first , and the name stuck...

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

Re: Mystaran NPC Generator (BECMI)

Postby agathokles » Sat Aug 19, 2017 7:52 am

New features: thanks to Chimpman, the Shimmering Lands are now a region! For the moment, only Moadreg Dwarves can be generated, as well as some Humans.

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

Re: Mystaran NPC Generator (BECMI)

Postby agathokles » Sat Aug 19, 2017 7:56 am

@Chimpman: regarding religions, the allowed alignments for each immortal and religion must be specified in immortals.py in the by_alignment data structure.
I've done it for a few BC2300 Immortals just to test the functionality, so the generator now uses Kagyar, Stodos, Slizzark and Skuld. The same should be done for the others as well as for the pantheons.

You can add also trait modifiers for the immortal, as is done in the Northern Reaches gaz, but it is not necessary -- if you don't put anything, no modifiers will be applied.

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

Re: Mystaran NPC Generator (BECMI)

Postby Chimpman » Sat Aug 19, 2017 5:42 pm

agathokles wrote:@Chimpman: regarding religions, the allowed alignments for each immortal and religion must be specified in immortals.py in the by_alignment data structure.
I've done it for a few BC2300 Immortals just to test the functionality, so the generator now uses Kagyar, Stodos, Slizzark and Skuld. The same should be done for the others as well as for the pantheons.

Thanks! I've added in the others, and even used the replace_by_origin to make some Shimmering Lands specific translations for several immortals. I'll play around a little more before updating again.

agathokles wrote:You can add also trait modifiers for the immortal, as is done in the Northern Reaches gaz, but it is not necessary -- if you don't put anything, no modifiers will be applied.

I'll take a look at this as well.
One thing I noticed about the traits is that most of them are set up like this:
positive trait / negative trait

but the 'Dogmatic/Open-Minded' trait seems to be flipped. I assume the code treats it the same but it's confusing when I look at it.
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: 7495
Joined: Thu May 22, 2008 6:52 pm
Location: USA, California

Re: Mystaran NPC Generator (BECMI)

Postby Chimpman » Sat Aug 19, 2017 6:54 pm

I was getting a double Language skill (one for Denwarf, and one for Moadreg), so I tracked it back to skills.py and fixed that. I'm still seeing an extra Language(None) appearing sometimes - not on all entries, but on a few of them. I'm not sure if it has anything to do with the new Shimmering Lands region or not.
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: 7495
Joined: Thu May 22, 2008 6:52 pm
Location: USA, California

Re: Mystaran NPC Generator (BECMI)

Postby Chimpman » Sat Aug 19, 2017 7:35 pm

@GP
I'm working on adding Gnomes to the Shimmering Lands next. The issue I'm seeing now is in the chargen.py get_race_origin() function. It appears that when demi-humans are generated, they may not meet their minimum ability score requirements. In that case they are replaced by the race Human.

This leads to an error if the region you are generating for has no Human entry (The Shimmering Lands should not, but I have one there for now to prevent the error). I'm wondering if this isn't throwing off the racial prevalence in regions that have demi-humans. Could we do a ability score re-roll rather than a racial replace under these circumstances? What do you think?
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: 7495
Joined: Thu May 22, 2008 6:52 pm
Location: USA, California

Re: Mystaran NPC Generator (BECMI)

Postby agathokles » Sat Aug 19, 2017 9:56 pm

Yes. Obviously I didn't consider this possibility in the initial design. I think the best solution is to add an option to raise ability scores to minimum for the selected race.

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

Re: Mystaran NPC Generator (BECMI)

Postby agathokles » Sat Aug 19, 2017 10:00 pm

Chimpman wrote:I was getting a double Language skill (one for Denwarf, and one for Moadreg), so I tracked it back to skills.py and fixed that. I'm still seeing an extra Language(None) appearing sometimes - not on all entries, but on a few of them. I'm not sure if it has anything to do with the new Shimmering Lands region or not.


Eh, Languages are another issue that has been handled with a hack. It would be better to use a different approach, with an explicit input (i.e., a set of languages available in a region, and a native language for each origin).

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

Re: Mystaran NPC Generator (BECMI)

Postby agathokles » Sat Aug 19, 2017 10:02 pm

BTW, I've added a (modern) gnome name generator. When we finish adding Gnomes to the Shimmering Lands, I'll include them in Karameikos and other nations as appropriate (e.g., Ierendi, possibly Alphatia, Norwold).

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

Re: Mystaran NPC Generator (BECMI)

Postby Chimpman » Sat Aug 19, 2017 11:24 pm

agathokles wrote:Yes. Obviously I didn't consider this possibility in the initial design. I think the best solution is to add an option to raise ability scores to minimum for the selected race.

;) I did that right after posting. I agree it's the best solution.

agathokles wrote:BTW, I've added a (modern) gnome name generator. When we finish adding Gnomes to the Shimmering Lands, I'll include them in Karameikos and other nations as appropriate (e.g., Ierendi, possibly Alphatia, Norwold).

I just checked in my Gnome changes. We may have covered some of the same territory (I did a gnome name generator as well), but I figure we can refactor as needed. Keep in mind, my intention was to get some experience creating a new race option, so I may not have put full thought into all of the Gnome options. I just wanted to get all the pieces in so that the program would work (and I didn't necessarily fully understand everything I did). Anyway, I think you should give the Gnome code a once over and modify as needed.

Here is what I want to do next:
- Create Warforged (Soulbound) race/class
- Create Shade race/class (Name generator will be Thonian for this one)
- Create Giantkin race/class (This one I'm thinking might be synonymous with an Ogre - at least stat wise, so we might be able to plug it into the Broken Lands as well).
- Create Dwarf Wizard class
- I might try to tease Mounts out of Other Equipment and make that part more customizable

Hmmm... Actually I wonder if it might be nice to create Era/Campaign specific equipment, magic, etc, lists in the same way that you do for the name generators. So we would be able to plug in an Era and swap out the equipment list in a modular way. I may not be ready to tackle that, but I'm going to start thinking along those lines. That would definitely be useful for the Mystara 2300 BC campaign, but I could think of other uses as well. Davanian campaigns, or campaigns run on Skothar, or the Hollow World, or Hollow Moon all might require some kind of customized equipment list.
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: 7495
Joined: Thu May 22, 2008 6:52 pm
Location: USA, California

Re: Mystaran NPC Generator (BECMI)

Postby agathokles » Sun Aug 20, 2017 6:25 am

I'd start with the Dwarf Wizard: it reuses a lot of components from existing races and classes, so it should be quick to do.

I'll check the gnome and see what I need to do.

Regarding equipment, it's certainly possible to customize based on region (and it's certainly a good idea, e.g. to avoid heavy armor in Ylaruam).
For spellbooks, it's already in place -- see the Tome of Mystaran Magic vs RC options.

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

Re: Mystaran NPC Generator (BECMI)

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

I've pushed modifications that make the Gnome available in Karameikos, Rockhome and Norwold, using my generator for Highforge and yours for everywhere else.
However, I notice you have implemented Gnomes as a demihuman race, rather than as a monster race as in Top Ballista. Is this intentional? In that case, I think we should have two different Gnome classes -- a Halfling-like demihuman for the Shimmering Lands, and a monster race for the modern setting.

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

Re: Mystaran NPC Generator (BECMI)

Postby Chimpman » Sun Aug 20, 2017 7:24 am

Finished most of the above... at least partially.
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: 7495
Joined: Thu May 22, 2008 6:52 pm
Location: USA, California

Re: Mystaran NPC Generator (BECMI)

Postby Chimpman » Sun Aug 20, 2017 7:28 am

agathokles wrote:I've pushed modifications that make the Gnome available in Karameikos, Rockhome and Norwold, using my generator for Highforge and yours for everywhere else.
However, I notice you have implemented Gnomes as a demihuman race, rather than as a monster race as in Top Ballista. Is this intentional? In that case, I think we should have two different Gnome classes -- a Halfling-like demihuman for the Shimmering Lands, and a monster race for the modern setting.

Hmmm... no it wasn't intentional. I'd rather not overly complicate things, I think we should just use the monster race (I was just zooming through the code trying to make something work). If you want to remove the demi-human version and leave the monster version, then I can see what changes you made, and how you made them.
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: 7495
Joined: Thu May 22, 2008 6:52 pm
Location: USA, California

Re: Mystaran NPC Generator (BECMI)

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

Excellent. I've updated the online code, so now the Shimmering Lands generator is at the same level as the offline one.

I'll fix the Gnome to monster class (this means the level correction will be similar to Lupins and Rakasta rather than Halfling) during the afternoon.

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

Re: Mystaran NPC Generator (BECMI)

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

Well, in the end I just did it. So:

New feature: Gnomes are available as per PC2.
agathokles
Blue Dragon
 
Posts: 6492
Joined: Sat May 24, 2008 6:42 pm
Location: Milan, Italy

Re: Mystaran NPC Generator (BECMI)

Postby agathokles » Sun Aug 20, 2017 2:04 pm

New release: added the Five Shires as a region.

Also, I've started working on Minrothad. For now, there's only the name generators for Meditor, Verdier and humans. I'll finish with Minroth Dwarves and Halflings, then I'll start working on the rest of the implementation (without Merchant Princes for now).

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

Re: Mystaran NPC Generator (BECMI)

Postby Chimpman » Sun Aug 20, 2017 8:38 pm

@GP - I'm seeing nicknames being generated every so often, even on names (moadreg and zarka) that I didn't think were using nicknames. The funny thing is that for the moadreg the nicknames seem to be generating between the first name and the clan name, while for the zarka gnomes the nicknames are generating at the end, after city names are added.

How exactly does the nickname system work? I must be missing something somewhere. I'm assuming that the nicknames I'm seeing are coming in from the nicknames.py class (caused by ability scores or traits), but how do they actually get inserted into the name (especially in between two elements of the custom name generator)?
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: 7495
Joined: Thu May 22, 2008 6:52 pm
Location: USA, California

Re: Mystaran NPC Generator (BECMI)

Postby agathokles » Sun Aug 20, 2017 8:57 pm

You are right, they are generated by the default generator in nicknames.py. There is the option to insert the nickname after the full name, or after the first name. You can control this in chargen.py, lines 170-181. In particular, on line 176, the conditional controls the position.

Nicknames are generated with frequency increasing with the character level, and depend on the character traits and ability scores.

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

Re: Mystaran NPC Generator (BECMI)

Postby Chimpman » Sun Aug 20, 2017 11:02 pm

One more question. How do titles work?
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: 7495
Joined: Thu May 22, 2008 6:52 pm
Location: USA, California

Howto: setup nobility titles generation

Postby agathokles » Mon Aug 21, 2017 6:03 am

Similar to nicknames, titles are generated for high level NPCs only. By default, no titles are generated. title_selector in titles.py starts by determining which titles are used, based on region, and possibly ethnicity -- in many regions, the local titles are only used for native NPCs (e.g., in Ylaruam only Alasiyan NPCs get the "Sheik", "Bey", etc. titles). There are also "default" titles (Sir/Dame for Knights, Lord/Lady for dominion rulers, and Patriarch/Matriarch for clerics). These can be used for foreign nobles, or for locals if just a simple set is desired.

So, if you want to enable titles for the Shimmering Lands, you need to add something like:
Code: Select all
if region == 'Shimmering Lands' :
    if origin == 'Moadreg' : selection.append('Moadreg')
    elif origin == 'Zarka' : selection.append('Zarka')
    else : selection.append('default')


Assuming you want to have separate titles for Moadreg, Zarka, and all others.
You then have to add 'Zarka' and 'Moadreg' entries to the data structures.

Finally, note that titles are by default unisex and prefixed, but you can define a female version in the female_titles data structure, and list all postfix titles in the postfix list.

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

PreviousNext

Return to Mystara

Who is online

Users browsing this forum: No registered users and 3 guests