Junior Member
Join Date: Aug 2018
Posts: 5
|
I'm trying to create a Mythic template which in turn makes all skills class skills. I also have RGG - Horrifically Overpowered Feats & friends, so I checked 'Skill Domination' feat to find that it does nothing(most of these feats appear to not actually make mechanical changes, probably for good reason).
I have been struggling with this, Hero Lab Scripting, far longer than I care to admit(read: years). I'm a programmer in more than a dozen different languages, including VB, and I still can't seem to wrap my head around 'HLScript'. It's rather frustrating but I figured it's finally time to embrace humility and ask for assistance. The eval script I've been trying to create is currently at First/500, but I will probably move it if I can find a better timing slot for it. Code:
~ cycle through skills foreach pick in hero from BaseSkill ~ make class skill ~#makeclassskill[eachpick.thingid.?] ~ didn't work; maybe this? ~field[abText].text = eachpick.thingid.? ~#makeclassskill[field[abText].text] ~ or maybe this?? ~var skid as string ~skid = eachpick.thingid.? ~#makeclassskill[skid] ~ obvious frustration.... ~#makeclassskill[hero.child[AllSkills].thingid] ~ maybe pulltags/pushtags..? ~ hah! j/k, I don't know how those work nexteach I may be going about this the wrong way entirely and so would appreciate any direction that could be provided. I'm relatively certain that I'm overcomplicating all of this, particularly since I keep trying to learn based on my experience in other languages, but I don't know what else to do and so I keep waiting for it to somehow just 'click', yet it never does. Please rescue my sanity before there is none left. |
#1 |
Senior Member
Join Date: Jan 2007
Location: NW Arkansas
Posts: 1,321
|
Hmmm.... I think this might work.....
Right before your foreach, declare a temp variable: Code:
var myId as string Code:
myId = eachpick.tagids[thingid.?] Working on - |
#2 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
In the end all #makeclassskill[] macro is doing is assigning a tag to a skill. In this case that macro expects to get a non-string based Unique ID.
In example: Code:
#makeclasskill[skAcrobat] But you don't really need the macro you can use the assign[] method to assign a specific tag to the Pick you find in the loop. That code looks like this: Code:
~ loop through all skill Picks foreach pick in hero from BaseSkill ~ make skill a class skill perform eachpick.assign[Helper.ClassSkill] nexteach 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. |
#3 |
Senior Member
Join Date: Jan 2007
Location: NW Arkansas
Posts: 1,321
|
Thanks Shadow. I keep forgetting a lot of macros don’t use string values.
Do you know of a way to set that up so a macro can if dealing with eachpick, etc? I’m still diving a bit deeper than before into the various constructs and haven’t come across that if it is... Working on - |
#4 |
Senior Member
Volunteer Data File Contributor
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,729
|
Quote:
In your definition file you could do the following: Code:
<scriptmacro name="makeclassskill2" param1="pick" result="perform #pick.assign[Helper.ClassSkill]"/> Then the foreach loop would be: Code:
~ loop through all skill Picks foreach pick in hero from BaseSkill ~ make skill a class skill #makeclassskill2[eachpick] nexteach Code:
#makeclassskill2[eachpick] Code:
perform eachpick.assign[Helper.ClassSkill] So above the Pahthfinder #makeclassskill[] macro goes from this Code:
#makeclasskill[skAcrobat] Code:
perform hero.childfound[skAcrobat].assign[Helper.ClassSkill] 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: Aug 2018
Posts: 5
|
Thank you both very much. I was thinking things like '#makeclassskill[]' operated like functions rather than as macros. It makes sense that it would stringify the parameter now. This insight has allowed me to make more progress on other things as well, so thanks once again.
|
#6 |
|
|