Junior Member
Join Date: Jan 2016
Posts: 25
|
Hi There,
I'm working on a some custom "Rings of Eloquence", and have copied out all the pertinent bits to provide the skill bonuses (using the uncopy-able one from a supplement). What I'm trying to do is add the 4 custom languages, so that they show up in the character's languages known, and have successfully determined that each of the languages needs to be "bootstrapped" in. So this is working. I've also determined, thanks to the wonderful "401" conditions page figured out that I can use "fieldval:gIsEquip <> 0" to only action the bootstrap if the magic ring is listed as equipped. So this is working. What isn't working is detecting whether the bootstrapped language is already present on the character or not... I've been trying to use "SpeakLang.lFirstSpch" and "hero#SpeakLang.lFirstSpch" do not provide any results. The compiler won't let me put the timing any later than Pre-Levels 10000, so I'm at a loss... How do I get the condition to detect that 1) the language in question doesn't already exist on the character, so that when the ring is equipped, it adds the language in the bootstrap. This is what I currently have for my lFirstSpch bootstrap Code:
fieldval:gIsEquip <> 0 & hero#SpeakLang.lFirstSpch = 0 |
#1 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
This bootstrap condition is a little off. You got it really close!
SpeakLang.lFirstSpch is a tag and you can simply check for the presence or absence of the tag without adding any = 0 stuff. To check for 'no tag' you use ! in front of the tag name: Code:
fieldval:gIsEquip <> 0 & !SpeakLang.lFirstSpch Code:
fieldval:gIsEquip <> 0 & count:SpeakLang.lFirstSpch = 0 Code:
debug hero.tagis[SpeakLang.lFirstSpch] Going to have to do a little bit of a work around to get this to work as you will have to "manually" check for the existence of the language yourself. First/400: Code:
~ If language found set abValue5 to 1 so we can check in the bootstrap If (hero.childlives[lFirstSpch] = 1) Then field[abValue5].value = 1 Endif Code:
fieldval:gIsEquip <> 0 & fieldval:abValue5 <> 0 Hope that helps. Hero Lab Resources: Pathfinder - d20pfsrd and Pathfinder Pack Setup 3.5 D&D (d20) - Community Server Setup 5E D&D - Community Server Setup Hero Lab Help - Hero Lab FAQ, Editor Tutorials and Videos, Editor & Scripting Resources. Created by the community for the community - Realm Works kickstarter backer (Alpha Wolf) and Beta tester.- d20 HL package volunteer editor. |
#2 |
Junior Member
Join Date: Jan 2016
Posts: 25
|
Thank you ShadowChemosh.
I rather suspected it was a timing problem, as the syntax that you provided for the condition, was a solution I had tried at one point, which failed, evidently because of the timing problem. As for the First/400 code, I'm assuming this is an eval script? I do have one more question, and it stems from the use of the abValue5. The Ring of Eloquence grants 4 separate languages, and my current solution is to use 4 separate bootstraps for each granted language, with the objective being to only add the given language if it doesn't exist. I have a wacky idea using "pipe-delimited strings" being loaded into abValue5 for each found language, and then using the "pos" command to locate the first occurence of the given language. Can I load strings into abValue5? |
#3 |
Junior Member
Join Date: Jan 2016
Posts: 25
|
I took a quick stab a trying to push a string into the abValue5 variable. Suffice to say it doesn't work. (not unexpected mind you).
In looking at the fields (using the debug info screen), at least for this specific magical item (ring), it would seem that the abValue2 through abValue5 don't change, or seem to not be used. Leading me to think that I should be pretty safe to to use them as 'flag fields' for each of the four languages I'm putting into this "Ring of Eloquence". Are there any pitfalls I should be aware of, considering it was indicated that abValue5 is the least used, in using abValue2, abValue3 and abValue4? Alternatively, would it better/safer to create some unique fields or tags, to store these unique flags for myself? Last edited by karpana; May 10th, 2018 at 06:13 AM. |
#4 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
Quote:
In this case it sounds like you can easily use 2-5 as flag values to control the other bootstraps. Quote:
But you can make up new tags. The easy way in the editor is near the bottom look for "User Tags" which always start with group "Custom.?". You could create your own tags and instead of setting a value into abValue fields you could assign the tag to the hero and then check for that in the bootstrap condition. Code:
~ If language found set Custom.lFirstSpch tag on Hero container If (hero.childlives[lFirstSpch] = 1) Then perform hero.assign[Custom.lFirstSpch] Endif Code:
fieldval:gIsEquip <> 0 & !Custom.lFirstSpch First/400 Code:
~ Pull the LangSpeak tag from each Base Language Pick to our self foreach pick in hero from BaseLang perform eachpick.pulltags[LangSpeak.?] nexteach ~ Push all collected LangSpeak tags from our self to the hero perform hero.pushtags[LangSpeak.?] First/600 Code:
~ Remove all LangSpeak tags from hero so we don't get double perform hero.delete[LangSpeak.?] Bootstrap: Code:
fieldval:gIsEquip <> 0 & !LangSpeak.lFirstSpch Hero Lab Resources: Pathfinder - d20pfsrd and Pathfinder Pack Setup 3.5 D&D (d20) - Community Server Setup 5E D&D - Community Server Setup Hero Lab Help - Hero Lab FAQ, Editor Tutorials and Videos, Editor & Scripting Resources. Created by the community for the community - Realm Works kickstarter backer (Alpha Wolf) and Beta tester.- d20 HL package volunteer editor. |
||
#5 |
Junior Member
Join Date: Jan 2016
Posts: 25
|
Solid Examples ShadowChemosh. Thank you!
I'll pore of these a bit more tonight when I get in front of an HL Editor. abValueX seems the simplest way, but I think going with Custom.X might equally set my needs. |
#6 |
Junior Member
Join Date: Jan 2016
Posts: 25
|
ShadowChemosh
I'm thinking this might be something I've done wrong, at least with using the custom tags, but I'm finding that the following four statements always return "1" unless the eval script (which is on the magic ring), is set to "pre-level/10000". The result of which, is that because the Bootstrap Condition, which can't run any later than "pre-level/10000", I end up with the problem that the bootstrap conditions always return true, (I'm assuming because they essentially run before for the eval, even when also set to "pre-level/10000"), and thus all four languages are always added, even though lFirstSpch already exists on the character. Thoughts or ideas? Edit: I've attached a copy of four of the languages on my character Common ... Added as part of race Druidic ... Added as part of class FirstSpeech ... Added as part of high Int (via the Background Tab) Ignan ... added as a result of having ranks in linguisitics (via the Personal Tab) Looks like, apart from Common, they're all running in "Pre-Level/10000" :/ Code:
debug "eval2" debug hero.childlives[lFirstSpch] debug hero.childlives[lDraconic] debug hero.childlives[luIobarian] debug hero.childlives[lGiant] If (hero.childlives[lFirstSpch] = 1) Then perform hero.assign[Custom.lFirstSpch] Endif If (hero.childlives[lDraconic] = 1) Then perform hero.assign[Custom.lDraconic] Endif If (hero.childlives[luIobarian] = 1) Then perform hero.assign[Custom.luIobarian] Endif If (hero.childlives[lGiant] = 1) Then perform hero.assign[Custom.lGiant] Endif Last edited by karpana; May 10th, 2018 at 03:10 PM. Reason: Added image of timing |
#7 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
Can you attach your .user file to this thread. It will just make it way easier to make sure we are both on the same page. Plus I can play around with the file real quick to see what is going on....
Hero Lab Resources: Pathfinder - d20pfsrd and Pathfinder Pack Setup 3.5 D&D (d20) - Community Server Setup 5E D&D - Community Server Setup Hero Lab Help - Hero Lab FAQ, Editor Tutorials and Videos, Editor & Scripting Resources. Created by the community for the community - Realm Works kickstarter backer (Alpha Wolf) and Beta tester.- d20 HL package volunteer editor. |
#8 |
Junior Member
Join Date: Jan 2016
Posts: 25
|
Sure thing...
Equipment -> Ring -> Karp_RoE_1 |
#9 |
Senior Member
Lone Wolf Staff
Join Date: May 2005
Posts: 13,243
|
Your eval script and your bootstrap conditions are both at Pre-Level/10000 - the eval script needs to come first, so maybe Pre-Level/9990. If two things are at the same time, it's random which one HL will execute first.
|
#10 |
|
|