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 » Sun Sep 03, 2017 1:16 pm

As a consequence, Broken Lands are now active as a region in the online generator (although not perfect yet).

GP

@Chimpman: I've added a few more commits to the master branch, you'd likely want to update to master before going on with more refactoring.
agathokles
Red Dragon
 
Posts: 6592
Joined: Sat May 24, 2008 6:42 pm
Location: Milan, Italy

Re: Mystaran NPC Generator (BECMI)

Postby Chimpman » Sun Sep 03, 2017 5:20 pm

cool, thanks GP!
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 » Sun Sep 03, 2017 6:23 pm

I tried merging my latest changes in, and I may have mucked something up. Sorry GP, but can you double check what I did. It looks like I merged the master changes back into my branch, but that's not what I meant to do.

Anyway, I don't have any unchecked in changes at this point. I'll wait until the sourcetree is resolved before pulling from master again.
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 6:38 pm

Let me check. At most, I'll revert to the latest working commit.

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

Re: Mystaran NPC Generator (BECMI)

Postby agathokles » Sun Sep 03, 2017 6:55 pm

You did merge my changes back into your tree.

However, it seems to me the problem is caused by genhtml.py at line 86, where the called function expects the region instance instead of the region name. I've fixed this by modifying the implementation of the get_origin_name function to accept a region name and load the region object, as you did in the other functions in config.py.
I've committed the modification and pushed it to Code-Refactor (pull from there, master is now a couple of commits behind).

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

Re: Mystaran NPC Generator (BECMI)

Postby agathokles » Mon Sep 04, 2017 8:43 am

@Chimpman, some thoughts about reorganizing weapons:
  • Weapon selection depends on class (constraint) and region or origin (more or less popular weapons in a region or culture; e.g., Six-Shooters are not available outside the Savage Coast).
  • Some reskinning may be desirable (e.g., bastard sword -> matara in Myoshima).
  • It should be possible to replace the RC weapon masteries with variants (in particular those developed by Marco Dalmonte -- MD version).

I see one problem: some weapons that are reskinned in the RC version are independent weapons in MD. E.g., the matara is a reskinned bastard sword in RC but an independent weapon in MD.

Thus, a tentative workflow:

Code: Select all
# weapon_frequency_by_region, weapon_frequency_by_origin to be loaded from config-specific file, same for the actual stats
# weapon_by_class is fixed or more likely obtained from class_obj

def weapon_selector(cclass, region, origin):
  # Combine frequencies by region and origin, e.g., take lower or very rare if it appears only in one of the two
  weapon_selection = combine_freq(weapon_frequency_by_region[region], weapon_frequency_by_origin[origin])
  # Remove disallowed weapons by class, using the base weapon to reduce clutter (i.e., matara is allowed to classes that can use the bastard sword)
  weapon_selection = { weapon : weapon_selection[weapon] if base_weapon[weapon] in weapon_by_class[cclass] }
  # Usual selector
  return join([ [w]*weapon_selection[w] for w in weapon_selection  ], [])

weapon=choice(weapon_selector(cclass, region, origin)


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

Re: Mystaran NPC Generator (BECMI)

Postby agathokles » Mon Sep 04, 2017 8:57 pm

Since it was already refactored, I tried a similar approach with the Immortals. For now, it is quite partial, and the old format is still supported.
However, if a dictionary is used in the origin class instead of a list, the selection will be driven by the dictionary (removing all elements that are not found in the base_set, of course). This does not take into account religions from the region class, though, so I'll work on that next (hopefully tomorrow).
This modification has been pushed in the master branch, so the Code-Refactor is now behind by this commit.

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

Re: Mystaran NPC Generator (BECMI)

Postby Chimpman » Tue Sep 05, 2017 4:49 pm

I didn't have much of a chance to work on anything this weekend... we had one of the hottest heat waves in history here - I didn't even turn on the computer for fear it would melt :o .

I'll catch up and comment soon. I think at this point I'm ready to merge back in with the main line. I haven't made any additional changes since my last update, so I should be able to just work off of main now.

I like where you're going with the weapons. Let me give it a think through.
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 Sep 05, 2017 6:33 pm

Note that I merged back everything, so you can restart from my current version (master).

I've made a major data update, with most of the regions and origins updated to the frequency based version. This also forced me to fix a few bugs.

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

Re: Mystaran NPC Generator (BECMI)

Postby agathokles » Tue Sep 05, 2017 8:37 pm

BTW, I haven't actually modified the weapon selection code, although I do intend to do it soon.

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

Re: Mystaran NPC Generator (BECMI)

Postby agathokles » Tue Sep 05, 2017 8:46 pm

And, I don't have the knowledge to decide the frequencies for the Shimmering Lands and its races/origins. Please fix them when you have time.

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

Re: Mystaran NPC Generator (BECMI)

Postby Chimpman » Tue Sep 05, 2017 9:23 pm

Awesome! I'll fix Shimmering Lands and check it in tonight.
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 Sep 05, 2017 9:32 pm

I'm probably going to look at the origin coding a bit more as well. The one issue that I ran into was the multi-ethnic origins. For example, most origins (as they are currently set up) work pretty well if they are mapping a single Race-Culture combination. The Lupin origins are a good example of this. However the multi-ethinic origins (think Eusdrian for example which can be applied to Elf, and Halfling - each of which have their own distinct racial class) prove a little bit more problematic. Not sure how I want to tackle that yet, but there is definitely some more thought required.

I'm also probably going to take a look at adding some kind of clan structure for specific origins. That way we can set up clans for Alfheim (and other elven realms), Rockhome (and other dwarven realms), probably even use the same mechanism for humanoid hordes, etc... At some point I'd like to tie that back into the name generation code.
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 Sep 05, 2017 10:16 pm

For clans, at the moment I only set up Norwold Dwarves with a different set of clan names.

For Eusdria, I see there is some problem... probably race/class mixes that are not allowed. We need to filter out the disallowed classes, much like I did for the immortals disallowed by alignment or region.

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

Re: Mystaran NPC Generator (BECMI)

Postby agathokles » Tue Sep 05, 2017 10:47 pm

I just pushed a proposed solution for the Eusdrian problem. It uses the class list in race_obj as a filter, but we can go for a different option, using the combine_freq function instead (see its use in immortals.py)

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

Re: Mystaran NPC Generator (BECMI)

Postby agathokles » Wed Sep 06, 2017 4:17 pm

I've implemented a full new version of weapon selection, based on frequencies for both class and origin.
This led to a major simplification of the weapon selection code, which is good.
I've also added common_weapons fields to all origins, as well as overhauling the by_class structure in weapons.py
There are also other considerations that might apply, such as how to create a way to connect weapons and skills (e.g., a lance master should also have riding skill...), but I think for now it will remain as is, and further customization should be implemented much like the special Ethengar classes (which have their own weapon and skill selection).

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

Re: Mystaran NPC Generator (BECMI)

Postby Chimpman » Mon Sep 18, 2017 4:48 pm

Factored out titles. I need to add The Shires origin to complete that task.

Noticed you started working on the Char Class refactor. Cool. I've been thinking about that for a while too. I'll check it out once I have some free time.
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 » Mon Sep 18, 2017 5:09 pm

Also... I think I broke the Eusdria fix you put in a while back. I didn't quite understand what you were doing until just looking back over it now. Let me fix it. I want to play around with a few different ideas. (I'll probably have to muck around a bit more in config.py) I want to get a solution that will work for both the Eusdria (which may need to filter classes by race) and also the Moadreg (which adds a new dwarven class - Dwarf Wizard). I think the solution might be to make the origin class a little more self descriptive with regard to what race/class combinations it will accept.
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 Sep 18, 2017 5:56 pm

Ok. I'll update the online version once Eusdria/Moadreg is fixed. Not that my Eusdria fix might not be the best solution post-refactoring.

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

Previous

Return to Mystara

Who is online

Users browsing this forum: Google [Bot] and 4 guests