• 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

Race Coding assistance

Mjolnirh

Active member
I am Creating the Githzarei as a player race.
in the version I am using you choose one of the following as innate psionics at 1st level feather fall, jump, or shield and then one of the other two at 3rd level.

Fist question:
for the bootstrap condition count:Classes.Ranger >= 3
what is the value for all classes ie. count:Classes.all >= 3 or count:Classes.any >= 3

second question how do i code those choices as picks when those level requirements are met?
 
From the authoring Tutorial:

if (#totallevelcount[] >= 3) then
do something
endif

I didn't quite understand the second question. The player gets to choose a spell? Or are you asking how to add them once he gets the level?
 
They are innate psionic abilities. At first level they choose one of the thee choices. Then at 3rd one of the remaining 2.
 
They are innate psionic abilities. At first level they choose one of the thee choices. Then at 3rd one of the remaining 2.
This would be better served by using Custom Abilites assigned to your class. Then setup the Custom Ability array values of zero = 1, two = 2 on your Class Helper.

That will be WAY easier than using bootstrap conditions.
 
for some reason (#totallevelcount[] >= 3) didn't work out in the bootstrap condition, however (count:Classes.? >= 3) works, I found that in the varient racial trait tab, Devils tongue for the Tiefling uses the method I was looking for.

Thanks for your Help!! :)
 
for some reason (#totallevelcount[] >= 3) didn't work out in the bootstrap condition, however (count:Classes.? >= 3) works, I found that in the varient racial trait tab, Devils tongue for the Tiefling uses the method I was looking for.

Thanks for your Help!! :)

The condition on a bootstrapped item is a tag expression, not a script. Macros can only be called from a script.
 
Coding assistance

trying to add a text value to a text field in an eval script

if (#totallevelcount[] >= 7) then
hero.child[iThaas].field[wDamExtra].text["plus 1d6 radiant"]
endif

can't seem to get this to parse

I also tried

hero.child[iThaas].field[wDamExtra].text = hero.child[iThaas].field[wDamExtra].text = "plus 1d6 radiant"
 
This is the macro for extradamage also:

#extradamage[target weapon,damage text,source's name]
 
if (#totallevelcount[] >= 8) then
#extradamage[hero.child[iThaas], " plus 1d6 radiant", field[thingname].text]
endif

Brilliant! Thank You Mergon!
 
ok so how do I use this

~ abText begins with "The brown dog is jumping on the brown boat."
field[abText].text = replace(field[abText].text, "brown", "red", 1)

~ Result is "The red dog is jumping on the brown boat."

to replace 1d6 with 2d6 at level 11?

once I get these Field associations down, I'll be good lol

previous code:

if (#totallevelcount[] >= 8) then
#extradamage[hero.child[iThaas], " plus 1d6 radiant", field[thingname].text]
endif
 
Last edited:
The following code should do what you want:

var iLevel as number
var sText as string
if (iLevel >= 8) then
iLevel = #totallevelcount[]
if (iLevel >= 11) then
sText = "2d6"
else
sText = "1d6"
endif
endif

sText = " plus " & sText & " radiant"
#extradamage[hero.child[iThaas], sText, field[thingname].text]
 
Last edited:
ok that worked for those two so I thought I'd try a select case for multiple entries, lol didn't work

var iLevel as number
var sText as string
iLevel = #totallevelcount[]
Select Case ilevel

Case >= 8
sText = "1d6"
Case >= 11
sText = "2d6"
Case >= 16
sText = "3d6"
Case >= 20
sText = "4d6"
Case else
sText = "1d6"

end select
 
ok I got it oddly enough here are the scripts that worked.

var bonbon as number

if (#totallevelcount[] >= 8) then
bonbon = 1
endif
if (#totallevelcount[] >= 12) then
bonbon = 2
endif
if (#totallevelcount[] >= 17) then
bonbon = 3
endif

hero.child[iThaas].field[Bonus].value = hero.child[iThaas].field[Bonus].value + bonbon

var iLevel as number
var sText as string
iLevel = #totallevelcount[]
if (iLevel >= 8) then
sText = "1d6"
endif
if (iLevel >= 11) then
sText = "2d6"
endif
if (iLevel >= 16) then
sText = "3d6"
endif
if (iLevel >= 20) then
sText = "4d6"
endif


sText = " plus " & sText & " radiant"
#extradamage[hero.child[iThaas], sText, field[thingname].text]
 
ok I got it oddly enough here are the scripts that worked.

var bonbon as number

if (#totallevelcount[] >= 8) then
bonbon = 1
endif
if (#totallevelcount[] >= 12) then
bonbon = 2
endif
if (#totallevelcount[] >= 17) then
bonbon = 3
endif

hero.child[iThaas].field[Bonus].value = hero.child[iThaas].field[Bonus].value + bonbon

var iLevel as number
var sText as string
iLevel = #totallevelcount[]
if (iLevel >= 8) then
sText = "1d6"
endif
if (iLevel >= 11) then
sText = "2d6"
endif
if (iLevel >= 16) then
sText = "3d6"
endif
if (iLevel >= 20) then
sText = "4d6"
endif


sText = " plus " & sText & " radiant"
#extradamage[hero.child[iThaas], sText, field[thingname].text]

When you have a lot of if statements testing the same value, using elseifs can make the code clearer and easier tot read. Like so:

Code:
if (iLevel >= 20) then
  sText = "4d6"
elseif (iLevel >= 16) then
  sText = "3d6"
elseif (iLevel >= 11) then
  sText = "2d6"
elseif (iLevel >= 8) then
  sText = "1d6"
  endif

sText = " plus " & sText & " radiant"
#extradamage[hero.child[iThaas], sText, field[thingname].text]
 
Yeah I tried the elseif statement but it would not update with level up

One thing I do notice different about your code than the one I tried though is that you put the higher numbers first
 
Back
Top