Today i got a nice start, my Russian friend Kirill or "Ephemeron" gave me an upgrade to articy draft 2.X (and he already gave me the first articy draft) he's saved me like 140$, i think that earns him a nice place on the "Special Thanks" list for all the future games allright, since i would never have gotten this far without articy, and i couldn't really have afforded it without him, and this tool will indeed be used for all the next games.
So i've probably said three days in a row "I'll finish it today" or "Tomorrow" i'm gonna say it again now!
Somehow i got lead astray and wrote a code for going through the alphabet for different plan letters(this:
alphabet = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
for letter in alphabet:
print ("Plan %s\n" % letter.upper())
#don't ask why...)
Oh right, what i was doing... wait i got this great idea earlier today... what was it again.. argh... Something about attributes i think... or was it stats? it was some actual problem i had... and i solved it in my mind by adding one method to solve it... but i forgot to write it down. >_< what the hell was it!
Argh it was something important too! hopefully i'll remember as i start coding again.
Because of how specializations eacg have a class that defines their base value, (like base_attributes) will just be called "specname" and the total will be called "specname_total"
But now that i'm thinking abuot it, i could just give all the classes methods for doing this stuff :I
That would shorten the code of my modifiers class quite a bit and it gives me a bit better control. (so instead of specname_total i could have specname.total and specname.calculate_total() method).
I think this is a pretty good idea, i'll try it out for now.
Lets see first i need to make the modifier value and the total value "attributes"...
The best way to do it i think is including it as a part of the "Experience_System()" class...
Lets see
...
self.Modifier = Attribute_Total / 2 #Modifier
self.Bonus = 0 #Bonusess from items or buffs
self.Total = self.lvl + self.Modifier + self.Bonus #Total value (Base + Modifier + Bonus)
...
With this i can have self.lvl (Base value) self.Modifier (set individually per skill) and self.Bonus (Bonuses from magic or items... or debuffs)
...
Yes the above works out perfectly fine! then i can just set the modifier per-specialization and use the "Bonus" attribute for third-party bonuses (like Sword of Lockpicking or something.. hey that's a great idea, i should make that as a parody of the Keyblade) i know! i should make "Deadbeat" items or something similar as a tribute to Kamidori Alchemy Meister. Basically stuff that makes the game easier but discourages you by saying "Lol u use deadbeat item, you arr god damn pathetic n00b!"
And just as i got these excellent ideas and planend to add them to my design documents, articy draft failed me while trying to convert my project from version 1.5 to 2.X heh. Let's test the mettle of their support team! Luckily i have this blog to store the info until i can access my project again :)
so where was i.. Oh right.. modifiers... lets see, i should make a method for applying the modifiers to all the specializations. I alreaddy added the "total" value to the level check so every time the level of a skill or specialization is checked it also calculates the total.
"Why as a method?" You ask. Because if i automated it that would mean the modifiers in question all need to exist before i create the variables, and the stats aren't created until after the skills have been. Which means "Seduction" or "Slave Training" specializations would crash the whole thing :I
I've got this.
I'll use a try/except command (GOD DAMN IT now i needed to access my project files =_= i mad. And i'm too lazy to set up a trial version just to access it... or am i? It's sunday so today is a no business day DX no hope for support until tomorrow.)
so (after being delayed a bit by installing the articy trial on my laptop...)
even if "dominance" is an "oddity" it can't break the code since Social.leadership is always at least "1".
def Calculate_Stats():
self.arousal = 0
self.dominance = (self.Social.leadership + self.Attributes[0]) / 2
self.attractiveness = base_attractiveness + (self.Attributes[6] / 2)
try:
self.sexsta = (self.Sex.lvl + (self.Attributes[1]) / 2 #Sexual Endurance (should be "Vit or Will")
self.vcap = (self.height / 8) + (self.arousal * 0.05) + (self.Sex.intercourse / 10)#Vaginal Capacity
self.libido = (self.Attributes[5] / 2) + (self.Sex.lvl / 4) #Libido/Moral Str (Int/Will or Sex/Will)
self.sensitivity = (self.Attributes[1] + self.Sex.lvl) / 2 #Sensitivity/Mettle should be "Sex or Will"
self.etq = self.Social.lvl / 4 #Etiquette
except:
self.Calculate_Skills()
self.sexsta = (self.Sex.lvl + (self.Attributes[1]) / 2 #Sexual Endurance (should be "Vit or Will")
self.vcap = (self.height / 8) + (self.arousal * 0.05) + (self.Sex.intercourse / 10)#Vaginal Capacity
self.libido = (self.Attributes[5] / 2) + (self.Sex.lvl / 4) #Libido/Moral Str (Int/Will or Sex/Will)
self.sensitivity = (self.Attributes[1] + self.Sex.lvl) / 2 #Sensitivity/Mettle should be "Sex or Will"
self.etq = self.Social.lvl / 4 #Etiquette
def Calculate_Skills():
try:
self.Social.seduction.Modifier = self.attractiveness / 4
self.Slavery.train.Modifier = (self.dominance + self.Attributes[6]) / 6
except:
self.Calculate_Stats()
self.Social.seduction.Modifier = self.attractiveness / 4
self.Slavery.train.Modifier = (self.dominance + self.Attributes[6]) / 6
Basically that way if something fails because a value is missing, it'll try to calculate it instead of crashing. If it fails to calculate it then and only then it would crash :P
Yes. Good.
Now lets see
Skillname = Leveling system based "base" value.
Skillname.Modifier = Modifier (usually Attributes[x] / 2)
Skillname.Bonus = Bonuses from items/spells
Skillname.Total = Skillname + Skillname_Modifier + Skillname_Bonus
then
statname_base = racial + base_modifier values
statname_modifier = effects from items or spells
statname = statname_base + statname_modifier
Allright... this is it, this might be the final round, if not it's probably the second-last round. Hit me with your best shot python!! FOR FREEDOM!!!
Note: As soon as i started writing this i saw the code quickly spin out of control too much to be properly tested without a GUI interface. I'm writing this out with my guts here. I mean my code was intimidating before... by now it's just outright scary :S and also the biggest amount of code i have ever written for one program, this one program might in fact be more code than all the smaller programs i've written before over half a year or so D:
Like i said in the above, i'm writing this mostly with my guts, i may write a HUGE chunk of code based more on "instinct" than actual "certainty". The only thing i can do to test the code is to see if it runs without crashing :/ testing every single modifier would take half a day!
But the full version of Calculate_Skills() was successfully written on first try (syntax wise)
After writing it (in syntax only) i decided i had to create the stats.
I got caught up porting my 1.5 project to 2.x in articy so i didn't really continue writing the code.
So easy to slack when you're thinking "i have so little left to the finish line!" right?
I need to be careful of that.
I am sad to say this again but.. I will finish this tomorrow.
...
But tomorrow is 23rd... tomorrow i need to buy some presents D:
No comments:
Post a Comment