Senior Member
Join Date: Feb 2013
Posts: 357
|
I am working on a thing and I can't figure out the coding. What it is supposed to do is allow you to select from level 0 wizard spells and allow you to cast it 3/day as a spell-like ability. It would then attach that id into the SpInfo tag for the spell to show up in the description.
This is what I have so far: Code:
var spell as string var cast as string var info as string spell = tagis[sClass.Wizard] & tagis[sLevel.0] field[usrCandid1].text = "thingid." & spell cast = field[usrChosen1].chosen.tagis[thingid.?] info = "SpInfo." & cast perform assignstr[info] I have a Patreon and PayPal. Donations are appreciated but are not mandatory. They are only to show support while I program stuff. Last edited by Illyahr; February 16th, 2021 at 05:46 PM. |
#1 |
Senior Member
Join Date: Jul 2010
Posts: 3,147
|
I would think you'd want your usrCandid1 field to look like this:
Code:
component.BaseSpell & sClass.Wizard & sLevel.0 & !Helper.Obsolete |
#2 |
Senior Member
Join Date: Jul 2010
Posts: 3,147
|
Quote:
Example: Code:
var spell as string var cast as string var info as string spell = tagis[sClass.Wizard] & tagis[sLevel.0] field[usrCandid1].text = "thingid." & spell cast = field[usrChosen1].chosen.tagis[thingid.?] info = "SpInfo." & cast perform assignstr[info] debug info |
|
#4 |
Senior Member
Join Date: Feb 2013
Posts: 357
|
Quote:
Code:
var disc as string var trunc as number disc = field[fChosen].chosen.tagids[User.?] trunc = length(disc)-4 disc = right(disc, trunc) disc = "SpecSource" & disc perform hero.child[fMartStudE].assignstr[disc] I have a Patreon and PayPal. Donations are appreciated but are not mandatory. They are only to show support while I program stuff. |
|
#5 |
Senior Member
Join Date: Jul 2010
Posts: 3,147
|
Quote:
http://forums.wolflair.com/showthread.php?t=21688 Not everything applies to d20, but it should help you better understand some of the mechanics. Basically, though, this is what those two lines do: Quote:
Quote:
disc = User.TagID trunc = length(disc)-4 [10 characters -4 = 6] disc = right(disc, trunc) [6 characters starting from right = ".TagID" |
|||
#6 |
Senior Member
Join Date: Jul 2010
Posts: 3,147
|
|
#8 |
|
|