Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - d20 System

Notices

Reply
 
Thread Tools Display Modes
kazlady
Junior Member
 
Join Date: Dec 2014
Posts: 19

Old December 2nd, 2014, 10:10 PM
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.
Attached Files
File Type: zip GirlsDND.zip (1.5 KB, 0 views)
kazlady is offline   #1 Reply With Quote
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 3,146

Old December 5th, 2014, 07:25 AM
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?
Sendric is offline   #2 Reply With Quote
kazlady
Junior Member
 
Join Date: Dec 2014
Posts: 19

Old December 5th, 2014, 08:43 AM
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 by kazlady; December 5th, 2014 at 09:08 AM. Reason: whoops
kazlady is offline   #3 Reply With Quote
kazlady
Junior Member
 
Join Date: Dec 2014
Posts: 19

Old December 5th, 2014, 09:04 AM
Quote:
Originally Posted by Sendric View Post
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?
Attached Files
File Type: zip GirlsDND.zip (1.9 KB, 2 views)
kazlady is offline   #4 Reply With Quote
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 3,146

Old December 5th, 2014, 09:56 AM
Quote:
Originally Posted by kazlady View Post
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
Sendric is offline   #5 Reply With Quote
kazlady
Junior Member
 
Join Date: Dec 2014
Posts: 19

Old December 5th, 2014, 10:19 AM
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.
kazlady is offline   #6 Reply With Quote
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 3,146

Old December 5th, 2014, 10:39 AM
Quote:
Originally Posted by kazlady View Post
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.

Quote:
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.
Sendric is offline   #7 Reply With Quote
kazlady
Junior Member
 
Join Date: Dec 2014
Posts: 19

Old December 5th, 2014, 10:50 AM
Quote:
Originally Posted by Sendric View Post
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.
kazlady is offline   #8 Reply With Quote
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 3,146

Old December 5th, 2014, 10:54 AM
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
Sendric is offline   #9 Reply With Quote
Sendric
Senior Member
 
Join Date: Jul 2010
Posts: 3,146

Old December 5th, 2014, 10:55 AM
Quote:
Originally Posted by kazlady View Post
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.
Sendric is offline   #10 Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 11:54 PM.


Powered by vBulletin® - Copyright ©2000 - 2024, vBulletin Solutions, Inc.
wolflair.com copyright ©1998-2016 Lone Wolf Development, Inc. View our Privacy Policy here.