Member
Join Date: Nov 2010
Posts: 70
|
So, I'm taking a look at some existing Eval scripts trying to figure out how to do something, and I'm consistently seeing this line, or something similar:
Code:
perform linkage[varies].delete[fInclude.fWepMnk] (I'm making a Monk archetype that removes some of the typical Monk proficiencies, but the "Monk Weapon Proficiencies" is still showing up normally on the feats--it seems to be bootstrapped in directly instead of being done through weapon proficiencies, and I can't figure out how to remove it.) Related, but as an aside, are there any docs besides the authoring wiki and the help files in the editor? Javadoc-style or something similar that basically just shows all the commands the editor can use? Yet another question edited in since nobody's been around to answer yet -- Is it possible to do comparisons on thing names/shortnames? As in: Code:
foreach pick in hero from BaseSpell ~validif (eachpick.field[shortname]="Cure Moderate Wounds") @valid nexteach Last edited by Steev42; June 8th, 2012 at 07:07 PM. |
#1 |
Member
Join Date: Nov 2010
Posts: 70
|
Replying to my own last question, since I figured it out, for posterity.
Code:
~ find the cure moderate wounds spell var cmw as string cmw = "Cure Moderate Wounds" foreach pick in hero from BaseSpell var spellname as string spellname = eachpick.field[shortname].text validif (compare(cmw,spellname) = 0) nexteach |
#2 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
Much better to use tag ids than text strings - then you don't have to worry that in someone's home game, cure moderate has been renamed "Touch of Sarenrae":
Code:
foreach pick in hero from BaseSpell where "thingid.spCureMod2 | thingid.spCureMod3 | all the other cure moderate spells out there" @valid = 1 nexteach Also, you say you're trying a script, but you don't say what phase and priority you're trying it at - that's always critical when you're trying to alter the way an existing thing works. |
#3 |
Member
Join Date: Nov 2010
Posts: 70
|
I guess it's tradeoffs on that one. I went with searching the text string in case the spell was modified to a 1st or 4th level version somewhere, or some class added it as such in the future. I felt that was a more likely circumstance then having the spell renamed. Guess could use both, though.
As for the priority/phase, I usually find something that does a similar thing, and basically copy that info from there. For the one in question, I ended up using "First (Users)"/500. The linkage[varies] was being used at least in archetypes and class specials. So limited to how something interacts with a class, then? |
#4 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,213
|
I recommend that you don't use the first or first (users) phases without a good reason - too many settings haven't been set when it's still that early. Don't use priorities less than 1000 for the same reason - early in a phase there are still things being determined.
Yep - linkage [varies]. means "on the class we're making variations to", and then the rest of that line is the instructions to execute. |
#5 |
|
|