• 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

Uncanny Trickster

kazlady

Member
So I have been trying to create the data for the Uncanny Trickster. I am very new to coding and Hero Lab. I have gotten all of the "Things" created but I don't even know where to start to add the code which will actually add the correct bonuses. Anyone able to help?

I have attached a zip file with my user file. I think that's how this works. Please let me know if you need anything else.
 

Attachments

Apparently I'm blind because you had not one, but two posts. Again, I apologize for completely missing them. I assume this file is not the completed product?
 
Please disregard

It's close. All I have left is to figure out how to create a dropdown of skill tricks on the hero and use the selection in the dropdown to increment the number of charges
 
Last edited:
Apparently I'm blind because you had not one, but two posts. Again, I apologize for completely missing them. I assume this file is not the completed product?

Not to worry. I have a lot of time on my hands so a ton of trial and error is getting me through. That file is the starting file with just the objects created. I have since finished adding the "Bonus Trick" ability. Here is the file in it's current state. I am now working on creating the "Favorite trick" ability. You'll need Lawful_G's Complete Scoundrel user files as he added all of the skill tricks though I'm sure you already have it.

I think the best way to implement favorite trick would be a dropdown that populates with all of the skill tricks a hero has selected. When the user selects a trick from the dropdown, it would increment the number of available charges. Unfortunately, being so new to coding and Hero Lab, I'm not getting that far very quickly. Any suggestions?
 

Attachments

Any suggestions?

Yes. Here is what you want to put in the Custom Expression field:

Code:
component.BaseSklTr

Leave the restriction as you have it (All picks on hero).

For your eval script (to increase the number of charges), use the following:

Final Phase/1000
Code:
doneif (field[usrChosen1].ischosen = 0)

field[usrChosen1].chosen.field[hTotal].value += 1
 
WOOHOO!! Worked perfectly. The dropdown populated exactly the way I wanted it to.

Next step is to make it so each skill trick can only be selected once. I don't think the UniqueID thing will work here because I have to grant "Favorite Trick" up to 3 times. I'm thinking I need an if statement in the eval script that omits any skills that already have more than 1 charge.

On a side note, most of the problems I'm having are a lack of vocabulary. Is there a glossary of objects I could be referring to? Like something that tells me how to refer to the charges field or describes the object hierarchy in the editor so I can figure out how to get one thing to talk to another? Like I said. I am a complete noob at this so any help is appreciated.
 
Next step is to make it so each skill trick can only be selected once. I don't think the UniqueID thing will work here because I have to grant "Favorite Trick" up to 3 times. I'm thinking I need an if statement in the eval script that omits any skills that already have more than 1 charge.

That method probably won't work because once you select something, it would then no longer qualify. I would keep everything the same for Favorite Trick 2, but with the added eval script:

Post-Levels/1000
Code:
doneif (hero.childfound[cFavTrick1].field[usrChosen1].ischosen = 0)

var srchxpr as string

srchxpr = hero.childfound[cFavTrick1].field[usrChosen1].chosen.tagids[thingid.?]

field[usrCandid1].text &= " & !" & srchxpr

I'll work on what you need for the third one and post below.

On a side note, most of the problems I'm having are a lack of vocabulary. Is there a glossary of objects I could be referring to? Like something that tells me how to refer to the charges field or describes the object hierarchy in the editor so I can figure out how to get one thing to talk to another? Like I said. I am a complete noob at this so any help is appreciated.

Not really. There are some resources, such as the Help page which you can access via the Help menu from the editor. There is also Mathias's scripting resource thread for Pathfinder found at http://forums.wolflair.com/showthread.php?t=21688

Pathfinder has more than d20, so you have to be careful, but most of what is stated there does apply. I reference if quite often. It's also good to check out other things from the community set that do something similar to what you are doing to see how that was coded.

Finally, another trick is to look at the fields and tags on things from the portfolio. You can do this a couple of different ways. For instance, in the Skills tab, you can right-click on a skill or skill trick, and select "Show Debug Tags" or "Show Debug Fields". You can also access them through the Develop menu:

Develop -> Floating Info Windows -> Show Selection Tags (or Fields)

Selecting one of these will bring up a menu of all the things attached to that hero. You can then select which thing you want to look at. If this option is grayed out, select Enable Data File Debugging. This will also allow you to reload code in the portfolio using CTRL-R.
 
That method probably won't work because once you select something, it would then no longer qualify. I would keep everything the same for Favorite Trick 2, but with the added eval script:

Post-Levels/1000
Code:
doneif (hero.childfound[cFavTrick1].field[usrChosen1].ischosen = 0)

var srchxpr as string

srchxpr = hero.childfound[cFavTrick1].field[usrChosen1].chosen.tagids[thingid.?]

field[usrCandid1].text &= " & !" & srchxpr

Worked like a charm. After we get level 3 done, how do I make the Upgrade - Hide from list feature work? I checked it on lvl 2 and 3 but it didn't hide them. The only examples I could find on the forums were from Pathfinder and used the Helper tags and if I understand correctly, D20 doesn't use the helper tags.
 
Favored Trick, third level script:

Post-Levels 1001
Code:
if (hero.childfound[cFavTrick1].field[usrChosen1].ischosen <> 0) then

 var srchxpr as string
 srchxpr = hero.childfound[cFavTrick1].field[usrChosen1].chosen.tagids[thingid.?]

 field[usrCandid1].text &= " & !" & srchxpr

endif

if (hero.childfound[cFavTrick2].field[usrChosen1].ischosen <> 0) then

 var srchxpr2 as string
 srchxpr2 = hero.childfound[cFavTrick2].field[usrChosen1].chosen.tagids[thingid.?]

 field[usrCandid1].text &= " & !" & srchxpr2

endif
 
After we get level 3 done, how do I make the Upgrade - Hide from list feature work? I checked it on lvl 2 and 3 but it didn't hide them. The only examples I could find on the forums were from Pathfinder and used the Helper tags and if I understand correctly, D20 doesn't use the helper tags.

What are you trying to make it do? D20 does use Helper tags. The hide from list feature adds the tag Helper.SpecUp which removes the item from the Specials tab in the portfolio.
 
right now, regardless of how many levels of uncanny trickster have been taken, if I don't have a levelcount check in the eval script, it grants all bonuses even if they aren't qualified yet. I thought the hide from list would suppress the bonuses until they actually reached that level.
 
right now, regardless of how many levels of uncanny trickster have been taken, if I don't have a levelcount check in the eval script, it grants all bonuses even if they aren't qualified yet. I thought the hide from list would suppress the bonuses until they actually reached that level.

If I am understanding you correctly, the problem is that at first level, if someone chooses something from the level 3 version of Favorite Trick, the bonus is applied. We can squash this by adding the following at the top of the scripts for the level 2 and level 3 abilities:

Code:
if (tagis[Helper.ShowSpec] = 0) then
 field[usrCandid1].text = ""
else

then at the very bottom:

Code:
endif
 
so level 3 worked. Now for some finesse.

Problem 1: the level 2 and 3 abilities all show up on the Uncanny Trickster tab (which I think is normal) and their bonuses are applied even if the ability hasn't been granted yet (I don't think that's normal. I'm thinking I need a pre-req script?)

Problem 2: the user is able to select something from the levels she doesn't qualify for and it still grants the bonus even though she doesn't qualify. This is the same for all abilities. I thought it was just how the system worked. That's why I have the eval scripts on "Bonus trick" checking what level the character is.
Code:
#skillbonus[kSklTrick] += #levelcount[UncnTrck]

Problem 3: If I select a higher level ability and then decide I want to take it at a lower level, I can't return the field to the default "no selection" so given the above problem, there are more bonuses applied than there should be.

Problem 4: If problem 3 happens, the selected skill trick gets extra bonuses. Any skill trick can only be chosen once for this ability so can't get more than a +1. Possibly need a conditional statement to check if the trick is higher than 1?

Problem 5 (and now we're just getting picky): The UncTrickster tab doesn't turn red when there are selections to be made. I think that means the validation step doesn't see it as a violation?
 
I would probably need to see some examples of these issues before I can really tackle them. I'm heading out now, but I will be back Monday morning. If you've posted an example by then, I'll take a look at possible solutions.
 
Back
Top