Senior Member
|
My leveling code is a mess.
Here's an example: Code:
if (field[resMax].value < 2101) then hero.child[resBtH].field[resMax].value = 0 hero.child[resXP].field[resExtra].value = 2101 hero.child[resLevel].field[resMax].value = 1 elseif (field[resMax].value < 4701) then hero.child[resBtH].field[resMax].value = 1 hero.child[resXP].field[resExtra].value = 4701 hero.child[resLevel].field[resMax].value = 2 elseif (field[resMax].value < 9401) then resExtra of resXP is XP needed for next level. resmax of resLevel is the current characters level. That's for one class of 12, and only to check for the 1st and 2nd level. So, there must be some other way to do it, in non-HL code, I'd try to use an array of some sort. Anyone have advice, because the way I have it right now, I'm close to the max of if/then statements. (Found that out the hard way and had to recode some sections) BoomerET Edit: I see arrayrows and matrixcolumns, maybe that's the way to go? Castles & Crusades Ruleset for Hero Lab Hero Lab (5E D&D) -> Fantasy Grounds Character Converter Last edited by BoomerET; May 1st, 2014 at 08:12 PM. |
#1 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2011
Location: Nowhere, Virginia
Posts: 3,633
|
Quote:
RavenX Pronouns: She/Her Please do not PM me to inquire about datafiles I coded "for personal use" such as Exalted, World of Darkness, AD&D, or Warhammer 40K Roleplaying. I appreciate your interest, but I do not own the Intellectual Property rights to these game systems. Nor do I have permission from any of the Publishers to distribute the data files. As such, I cannot distribute the work I have done with community on these files. They are "for personal use" only. Thank you. I am far too busy these days to answer emails. If you message me here there is no guarantee I will get back to you at all. |
|
#2 |
Senior Member
|
Another thing I've noticed.
I used to hit CTRL-C to compile, then CTRL-R to reload. Now I'm seeing that CTRL-R does a compile and reload, when did that start? BoomerET Castles & Crusades Ruleset for Hero Lab Hero Lab (5E D&D) -> Fantasy Grounds Character Converter |
#3 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2011
Location: Nowhere, Virginia
Posts: 3,633
|
It's always done that for me and I've been doing this for three years now with it.
RavenX Pronouns: She/Her Please do not PM me to inquire about datafiles I coded "for personal use" such as Exalted, World of Darkness, AD&D, or Warhammer 40K Roleplaying. I appreciate your interest, but I do not own the Intellectual Property rights to these game systems. Nor do I have permission from any of the Publishers to distribute the data files. As such, I cannot distribute the work I have done with community on these files. They are "for personal use" only. Thank you. I am far too busy these days to answer emails. If you message me here there is no guarantee I will get back to you at all. |
#4 |
Senior Member
|
Guess I just never noticed it before.
Guess I can stop w/ the CTRL-C Castles & Crusades Ruleset for Hero Lab Hero Lab (5E D&D) -> Fantasy Grounds Character Converter |
#5 |
|
|