• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Adding Classes, Races, Monssters, Traits, Feats, and more!

Speeds are in fact specials, but there are several different tabs for specials depending on their source (I.E. Class specials, racial specials, etc). The Climb speed is on the Ability tab in the editor (the very first one).
 
Okay - didn't understand the basic ability tab that was there, thanks :D

Also...the difference between your code and my code is that yours is dynamic in its calculation whereas mine is just a "if he's at this level, it's this speed" and also yours can account for already higher climb speeds. Would mine submit to a higher climb speed or would that speed have to have a higher priority or later timing?
 
Here's how I'd probably approach it.

Code:
~ Set our listname based on xIndex
var climbspeed as number
climbspeed = (field[xIndex].value + 1) * 10
field[listname].text = "Climb (" & climbspeed & ")"

~ Only do the rest if we're high enough level
doneif (tagis[Helper.ShowSpec] = 0)

~ Only do the rest if we're not disabled
doneif (tagis[Helper.SpcDisable] <> 0)

~ Only do the rest if we're the first copy
doneif (tagis[Helper.FirstCopy] = 0)

~ We'll just use the same variable from before, overwritting it's value
climbspeed = (field[xCount].value + 1) * 10

~ Now we'll set our climb speed equal to what is granted by this ability, or it's current value, whichever is higher
hero.child[xClimb].field[abValue].value = maximum(hero.child[xClimb].field[abValue].value, climbspeed)

Okay so I've been pouring over this trying to figure out how the logic is working and I think I'm getting it. Where it says "doneif", I thought it meant this function could be triggered if it fulfills these prerequisites (ie 'this will be done if...'). But I was wrong, right? It's rather that the script stops if any of these conditions fall through (ie 'the script is done if...'). So if it doesn't have the FirstCopy tag or ShowSpec tag (ie (tagis[Helper.ShowSpec] = 0) or (tagis[Helper.FirstCopy] = 0), then the script stops, and it's the same if the disabled tag is anything other than 0 (ie (tagis[Helper.SpcDisable] <> 0)).
I think that's what those 3 lines meant so tell me if I'm wrong.

So then the next assumption, based on the point that the script ends after the 4th line if there isn't a [Helper.FirstCopy] tag, is that the first 4 lines are meant to function as the script that will be run at each application of the special, right? Whereas the last 5 are meant to usurp the first 4 lines but only function on the first copy? But I'm a little confused by the [Helper.ShowSpec] tag. "When a class has enough levels that the class ability should be gained, that copy gains a Helper.ShowSpec tag" is what you said and you also have the Helper.ShowSpec doneif script in there... but regardless of how many Helper.Showspec tags the special has, won't it never run because after the first special no other special will have the Helper.FirstCopy tag? What I'm trying to ask is that as long as the Helper.FirstCopy doneif script is there then isn't that all you need to keep the last 5 lines of the script from running? Or do the Helper.ShowSpec and the Helper.SpcDisable keep something from running that the Helper.FirstCopy doneif wouldn't?

Sorry this isn't literally about getting anything to work, I'm just trying to understand scripting better so I might not have to ask as many questions.
I understand you might have just been including all three so I could see them.

I think I understand, now, though, that the Helper.ShowSpec is there to only allow specials with the ShowSpec tag applied (ones the character qualifies for by level), that the Helper.SpcDisable tag is there so that it won't run if it has the SpcDisable tag (ie if something unexpected is inadvertently disabling it), and that the Helper.FirstCopy tag is used to run a script reserved to only be used the first time the special is applied.

Thanks for teaching me these - I think it'll be a lot easier to control scripts with em!
Oh right: One last question. In the first 4 lines you put down:
climbspeed = (field[xIndex].value + 1) * 10
Whereas in the last 5 you put:
climbspeed = (field[xCount].value + 1) * 10
What's the difference between the xIndex and xCount and why do you use the xCount for the first copy but the xIndex for every other copy?
 
Last edited:
You're setting the climb speeds value = to some value, so depending on the timing of whatever else was adding a climb speed, it could overwrite even if the previous speed was higher. It's seldom a good idea to do that with something that so many things could potentially operate upon. I'd go with either setting it up with a maximum() so the highest value of all things applying a climb speed is retained, or if you wanted this to be a bonus to climb speed that stacks with anything else, use += and set the priority late enough that it will come after almost anything else.
 
I get that importance of determining how this climb speed will be applied (as its own or as stack able) but what was the difference in xIndex and xCount? You said, "Set our listname based on xIndex" so I assume that means you need to use xIndex for it...so if we're using the last 5 scripts to overwrite the first 4, would that mean we use a different source - xCount - because xCount overwrites xIndex even though we were using xIndex as the base for the listname?
 
Okay so I've been pouring over this trying to figure out how the logic is working and I think I'm getting it. Where it says "doneif", I thought it meant this function could be triggered if it fulfills these prerequisites (ie 'this will be done if...'). But I was wrong, right? It's rather that the script stops if any of these conditions fall through (ie 'the script is done if...'). So if it doesn't have the FirstCopy tag or ShowSpec tag (ie (tagis[Helper.ShowSpec] = 0) or (tagis[Helper.FirstCopy] = 0), then the script stops, and it's the same if the disabled tag is anything other than 0 (ie (tagis[Helper.SpcDisable] <> 0)).
I think that's what those 3 lines meant so tell me if I'm wrong.

Yes, that's correct. If the evaluation inside the () is true, then this eval scrip ends there, without proceeding further.


So then the next assumption, based on the point that the script ends after the 4th line if there isn't a [Helper.FirstCopy] tag, is that the first 4 lines are meant to function as the script that will be run at each application of the special, right? Whereas the last 5 are meant to usurp the first 4 lines but only function on the first copy? But I'm a little confused by the [Helper.ShowSpec] tag. "When a class has enough levels that the class ability should be gained, that copy gains a Helper.ShowSpec tag" is what you said and you also have the Helper.ShowSpec doneif script in there... but regardless of how many Helper.Showspec tags the special has, won't it never run because after the first special no other special will have the Helper.FirstCopy tag? What I'm trying to ask is that as long as the Helper.FirstCopy doneif script is there then isn't that all you need to keep the last 5 lines of the script from running? Or do the Helper.ShowSpec and the Helper.SpcDisable keep something from running that the Helper.FirstCopy doneif wouldn't?

Sorry this isn't literally about getting anything to work, I'm just trying to understand scripting better so I might not have to ask as many questions.
I understand you might have just been including all three so I could see them.

I think I understand, now, though, that the Helper.ShowSpec is there to only allow specials with the ShowSpec tag applied (ones the character qualifies for by level), that the Helper.SpcDisable tag is there so that it won't run if it has the SpcDisable tag (ie if something unexpected is inadvertently disabling it), and that the Helper.FirstCopy tag is used to run a script reserved to only be used the first time the special is applied.

Yes, I think you understand. If your class ability is gained at 1st level, you don't need the check for Helper.ShowSpec (because you will always be high enough level and always want to apply the effects of the script), but if it is gained at later levels then you want to stop it from executing at earlier levels.

Thanks for teaching me these - I think it'll be a lot easier to control scripts with em!
Oh right: One last question. In the first 4 lines you put down:
climbspeed = (field[xIndex].value + 1) * 10
Whereas in the last 5 you put:
climbspeed = (field[xCount].value + 1) * 10
What's the difference between the xIndex and xCount and why do you use the xCount for the first copy but the xIndex for every other copy?

xCount is the number of specials that are currently active (that is, not disabled, replaced, or too high level). xIndex is the order of bootstrapping for this class ability.

Ability A is bootstrapped at 3rd (Copy A1), 6th (Copy A2), and 9th (Copy A3).

A1 always has xIndex = 1 (since it is bootstrapped at the earliest level)
A2 always has xIndex = 2 (since it is bootstrapped at the middle level)
A3 always has xIndex = 3 (since it is bootstrapped at the latest level)

This makes xIndex a good field to look at if you're setting the listname of a class ability (this is the name that is shown in the list of level abilities on your class tag). The livename is the name that is shown in the specials tab and on any output (like character sheets or generated statblocks).

xCount will vary based on the level of your character, and is only generated if this is the copy with Helper.FirstCopy. It defaults to 1 though, so at 1st level A1 (with Helper.FirstCopy) has xCount = 1 (the default), once you reach 6th level A1 has xCount = 2, and A2 has xCount = 1. At 9th level and above A1 has xCount = 3 and A2/A3 both have xCount = 1.

Clear as mud?
 
I think so - I'll have to save the rules for those 2 (plus the additional info for the livename and listname)... I should really take a programming class next semester. What programming language is this, anyway? I might be able to get some help from my suitemate as well if he knows enough about this one.

EDIT: btw... no worries: this even clearer than mud ;)
 
I don't have any formal training myself, but I believe it's called XML.
XML is not really a programming language its "Extended Markup Language" actually and is an extension of HTML. Used more for machines to give information to each other.

HL uses a basic scripting language they invented that does a really nice job of working with the Concepts of XML which is elements and tags. The custom character sheets use XSLT which is a open source standard for translating XML from one language into another form including reports or web pages.

Most modern languages have built in tools that can splice apart XML or build it and deal with the "Objects" that XML is capable of containing within itself.

Long story short many modern languages like Java or Objective C would give you good basics in programming. And even allow for programming for iPhones or Droids. :)

But I am not aware of anything else that uses the "exact" scripting language that HL uses.
 
Sorry I haven't been posting much. I have both been more busy in school/non-school ralted projects and I also haven't been feeling well or getting good sleep. Currently the avatar project is on hold. During Spring Break I wanna get a bunch more of it done, get my Modular Madness project done, draw for that contest, and maybe draw the paladin my friend requested.
 
XML is not really a programming language its "Extended Markup Language" actually and is an extension of HTML. Used more for machines to give information to each other.

Sorry but this is a quote that bugs me. XML isnt an extension of HTML. This is a myth that has been around for quite some time. But it is a myth.

XML actually stands for "Extensible Markup Language", and it is the natural evolution of markeup languages that existed before HTML ever existed. In fact XML is a languaged based off of SGML ( which existed long before HTML and the rise of the popularity of the internet). HTML is also a language written off of SGML.

The rest of ShadowChemosh's explanation is completely valid, and sorry for nitpicking. I can be an ass.
 
Last edited:
Back
Top