Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Pathfinder Roleplaying Game

Notices

Reply
 
Thread Tools Display Modes
Septerran
Junior Member
 
Join Date: Aug 2018
Posts: 2

Old August 12th, 2018, 10:06 AM
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 am at a loss here. Not knowing the construction of 'thing' or 'pick'(pick is an instance of thing??), I don't know where to find the thingid and even then, I'm not even sure if that's going to work.

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.
Septerran is offline   #1 Reply With Quote
TCArknight
Senior Member
 
Join Date: Jan 2007
Location: NW Arkansas
Posts: 976

Old August 13th, 2018, 08:56 AM
Hmmm.... I think this might work.....

Right before your foreach, declare a temp variable:
Code:
var myId as string
Then, first thing in the loop do
Code:
myId = eachpick.tagids[thingid.?]
Then use myId in the macro: #makeclassskill[myId]

Working on -
TCArknight is offline   #2 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,511

Old August 13th, 2018, 10:27 AM
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]
It can't accept a string or a pointer like eachpick.

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.
ShadowChemosh is online now   #3 Reply With Quote
TCArknight
Senior Member
 
Join Date: Jan 2007
Location: NW Arkansas
Posts: 976

Old August 13th, 2018, 10:55 AM
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 -
TCArknight is offline   #4 Reply With Quote
ShadowChemosh
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2010
Location: Chicago, IL (USA)
Posts: 10,511

Old August 13th, 2018, 11:37 AM
Quote:
Originally Posted by TCArknight View Post
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...
So assuming you need a macro that can access a pointer (and this only works with the authoring kit). Meaning this can not be done for Pathfinder or 5e systems.

In your definition file you could do the following:
Code:
    <scriptmacro
      name="makeclassskill2"
      param1="pick"
      result="perform #pick.assign[Helper.ClassSkill]"/>
I would use a better name than above but works for the example.

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
The compiler just replaces the macro over the code you write. So in the end this:
Code:
#makeclassskill2[eachpick]
becomes this:
Code:
perform eachpick.assign[Helper.ClassSkill]
And then the compiler attempts to compile the script.

So above the Pahthfinder #makeclassskill[] macro goes from this
Code:
#makeclasskill[skAcrobat]
to this
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.
ShadowChemosh is online now   #5 Reply With Quote
Septerran
Junior Member
 
Join Date: Aug 2018
Posts: 2

Old August 18th, 2018, 09:36 AM
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.
Septerran is offline   #6 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 02:37 AM.


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