Ok... so I pushed a very early version of new professional (classes/subclasses in the game and base traits in the code) traits system. I expect that old testing.rpy files will throw error so either delete your files or delete erroneous code blocks. My own new testing file attached.
With changes over this many files, I strongly suggest deleting all .rpyc files or clicking Force Recompile button (same thing).
Random girls are created completely differently now but fields remain the same, how we're going to handle them city-mechanics when we have them is an open topic for discussion.
===
Short explanation on how new system works:
*Basetraits are a special group of traits that offer very powerful bonuses. They are the classes like "Warrior", "Mage", "Service", "Stripper", "Anal Whore", "Cook", "Alchemist", "Ninja", "Manager" and etc. Those very powerful bonuses are applied ONLY for two of those traits!
So the system looks like this:
*[Class] - FULL MEGA BONUSES APPLIED
*[Class or Subclass] - FULL MEGA BONUSES APPLIED
*This group can only be applied WHEN THE CHARACTER IS FIRST CREATED! If there is only one, MEGA BONUSES are doubled.
[Subclass] - Normal application
[Subclass] - Normal application
[Subclass] - Normal application
[Subclass] - Normal application
*This group can be applied at any time, these traits can also be lost.
Simple Examples:
*[Service]
*[Stripper]
[Bartender]
[Cook]
[Belly Dancer]
[Pole Dancer]
====
*[Mage]
[Explorer]
[Alchemist]
====
*[Mage]
*[Alchemist]
====
*[Warrior]
[SwordMaster]
[Explorer]
[WarVeteran]
And so on. ATM we obviously have too few jobs, buildings and content but the system was made future proof because I am sick of rewriting the same thing over and over.
Our initial plan where any basetrait could be a Class or Subclass trait was not acceptable because Characters could have ended up with 6 different professions...
New fields:
"occupations": []
This is for internal use, options are: # So far I came up with SIW (Sex Industry worker), Server (All servicegirl jobs), Warrior... Usually used for sorting girls and checking if they are willing to do jobs. This might be updated/expanded.
"higher_tiers": []
This is for SubClasses, should contain main class(es). Like Mage would be a main class for Alchemist.
We'll need to give this new system a test, there are also many discussion points and decisions to be made (mainly for me... rest of the code needs to be adapted to this). I think rest of the traits code is documented already, this is how traits code is looking atm:
class Trait(_object):
def __init__(self):
self.desc = ''
self.icon = None
self.hidden = False
self.mod = dict()
self.max = dict()
self.min = dict()
self.blocks = list()
self.effects = list()
# Occupations related:
self.occupations = list() # So far I came up with SIW (Sex Industry worker), Server, Warrior...
self.higher_tiers = list() # Required higher tier basetraits to enable this trait.
self.sex = "female" # Untill we set this up in traits: this should be "unisex" by default.
# Types:
self.type = "" # Specific type if specified.
self.basetrait = False
self.personality = False
self.race = False
self.breasts = False
self.body = False
self.elemental = False
self.add_beskills = list()
# Elemental:
self.font_color = None
self.resist = list()
self.el_name = ""
self.el_absorbs = dict() # Pure ratio, NOT a modificator to a multiplier like for dicts below.
self.el_damage = dict()
self.el_defence = dict()
self.el_special = dict()
# Weaponfocus:
self.we_damage = dict()
self.we_defence = dict()
self.we_special = dict()
# Base mods on init:
self.init_mod = dict() # Mod value setting
self.init_lvlmax = dict() # Mod value setting
self.init_max = dict() # Mod value setting
self.init_skills = dict() # {skill: [actions, training]}
self.leveling_stats = dict() # {stat: [lvl_max, max **as mod values]}
========
Girls will be normalized to have at least one Class, both Random and Unique.
New random girls can be created simply with:
build_rc() function. Extra parameters are:
def build_rc(id=None, name=None, last_name=None, pattern=None, level=1, add_to_gameworld=True):
'''
Creates a random character!
id: id to choose from the rchar dictionary that holds rGirl loading data from JSON files, will be chosen at random if none availible.
name: (String) Name for a girl to use. If None one will be chosen from randomNames file!
last_name: Same thing only for last name :)
pattern: Pattern to use when creating the character! (Options atm: Warrior, ServiceGirl, Prostitute, Stripper) If None, we use data or normalize in init()
level: Level of the character...
add_to_gameworld: Adds to characters dictionary, should always be True unless character is created not to participate in the game world...
'''
We will now only maintain 200 names/full names at the same time in game memory, if we run out, another 200 will be loaded. Savefile size is down by almost 300kb...
I'll try to write similar function to build_rc for mobs tonight.