Lone Wolf Development Forums  

Go Back   Lone Wolf Development Forums > Hero Lab Forums > HL - Authoring Kit

Notices

Reply
 
Thread Tools Display Modes
Duggan
Senior Member
Volunteer Data File Contributor
 
Join Date: Nov 2009
Posts: 1,040

Old November 26th, 2017, 12:21 PM
I finally got the opportunity to get back to this, and I am hitting a wall again. Currently Skill Specialties added via the form accessed from the Skill add a pick to the skill, and a tag on the Skill. The Eval statement on Specialty also forwards the tag down so that it reaches the Hero. Similarly, Specialties added via the Background, Command Package, and Sophont items add a tag to the Hero and a pick. Now the catch is, I'm really not certain how to get the two to mesh together.

When all of the Specialties were being pulled from the Skills and their gizmos, the code to display a list of them on the Skill Summary space went like this:
Code:
var skillText as string
foreach pick in hero from Skill
  foreach pick in eachpick.gizmo from Specialty
    ~ debug eachpick.field[spcTabName].text
    skillText = skillText & eachpick.field[spcTabName].text & "{br}"
    nexteach
  nexteach
  
@text = skillText
To instead display the items added from the background traits, it's the following:
Code:
var skillText as string
       
foreach pick in hero from Specialty
  debug "Specialty for summary: " & eachpick.field[spcTabName].text
  skillText = skillText & eachpick.field[spcTabName].text & "{br}"
  nexteach
  
@text = skillText
Yes, I could probably do both and just concatenate the text, but it's maddening that all of the tags are in one place (on the Hero), plus that doesn't fix how to get the form off of the Skill to pull in the items already on the player when deciding what Specialties can be added.

Worse comes to worse, I can go back to the way I was initially doing things where Specialties were picked out of a big table of all of the Specialties, not off of the Skills, which worked well enough, but that's not aesthetically pleasing to say the least.
Duggan is offline   #11 Reply With Quote
Duggan
Senior Member
Volunteer Data File Contributor
 
Join Date: Nov 2009
Posts: 1,040

Old November 26th, 2017, 04:24 PM
Ah. I found a solution for creating the list of Specialties. Now, to figure out how to build that table up...

Code:
var skillText as string
var specIds as string

specIds = hero.tagids[Specialty.?, " | "]
debug "Hero Specialty tags: " & specIds

foreach thing in Specialty where specIds
  debug "Specialty for summary: " & eachthing.field[spcTabName].text
  skillText = skillText & eachthing.field[spcTabName].text & "{br}"
  nexteach
  
@text = skillText
Duggan is offline   #12 Reply With Quote
Duggan
Senior Member
Volunteer Data File Contributor
 
Join Date: Nov 2009
Posts: 1,040

Old November 26th, 2017, 04:39 PM
Quote:
Originally Posted by Mathias View Post
Forms don't have to show picks within the gizmo - you can press a button on one pick that opens up a list of picks on the hero - like all the specialties. That's how Shadowrun handles it. And then just build a text list of the specialties for that skill for display on that skill.

That way, the advancements for specialties add them to the hero, like everything else, and then the skills figure out what specialties they've got.
I think this is the way I'm probably going to have to do this. Is there any way to be able to add a button to the skills, something like the following, that will allow me to restrict the list to items related to that skill on the hero?



And would I be using the "form" action rather than "edit" since it would not be in a gizmo?
Attached Images
File Type: png Skill with Spec button.png (15.5 KB, 24 views)
Duggan is offline   #13 Reply With Quote
Farling
Senior Member
 
Join Date: Mar 2013
Location: Greater London, UK
Posts: 1,328

Old November 27th, 2017, 01:04 AM
Quote:
Originally Posted by Duggan View Post
I think this is the way I'm probably going to have to do this. Is there any way to be able to add a button to the skills, something like the following, that will allow me to restrict the list to items related to that skill on the hero?



And would I be using the "form" action rather than "edit" since it would not be in a gizmo?
Would something like is done with Pathfinder Knowledge skills useful? They have a "Knowledge (other)" skill where there is some "free text" that appears on the skill line which can be set to anything the user likes.

Farling

Author of the CSV2RW tool (http://forums.wolflair.com/showthread.php?t=58156)
Farling is offline   #14 Reply With Quote
Duggan
Senior Member
Volunteer Data File Contributor
 
Join Date: Nov 2009
Posts: 1,040

Old November 27th, 2017, 03:17 AM
Unfortunately, probably not. That's more like what's done with the Domain of skills, which funnily enough I do use for some Specializations...
Duggan is offline   #15 Reply With Quote
Duggan
Senior Member
Volunteer Data File Contributor
 
Join Date: Nov 2009
Posts: 1,040

Old November 27th, 2017, 05:49 AM
Quote:
Originally Posted by Mathias View Post
Wait, bootstrapping by script? I'm sorry I didn't notice that earlier to keep you from spending time on that. You cannot use a script to create something that needs to run its own scripts, because HL sets up a list of scripts and the order to run them in before running any of them, so it can't add new scripts to that list later on, so it can't have a pick added by a script.
Hmm... related to this, I was recently given some third-party content for the game which allows for a choice of Specialization (things like a Law Enforcement Officer Background granting a single Non-Lethal proficiency). Setting up an entry with a drop-down, as I do with the skills, is pretty easy, but then to add it... although maybe I could find a way to hook into the Advance mechanics?
Duggan is offline   #16 Reply With Quote
Duggan
Senior Member
Volunteer Data File Contributor
 
Join Date: Nov 2009
Posts: 1,040

Old December 7th, 2017, 09:55 AM
Quote:
Originally Posted by Mathias View Post
If you make it an entity, you cannot use an advancement to add picks within that gizmo, because the displacement used by advancements can only be to the hero, not to a different container.
Coming back to this, I reread the section on displacement and how it can allow a pick on a gizmo to be accessible on the main hero. This sounds very much like something I would like to have.

Looking at the code for advancements, it looks like defining the displacement might be as simple as <autotag group="Helper" tag="Displace"/>. I'm guessing something else picks that up.

The wiki mentions a displace element, but I have not located code for that yet. ^_^ But that's leading me down a rabbit hole of wiki entries, so hopefully something will come up there.

In a semi-related side-note, as mentioned above, I'm also trying to figure out a way to implement a choice of Specialization, which would require a way to add an option among various picks. I'm thinking that this might wind up kind of like Advances with a construct for "SpecPick" or something like that that gets attached to the player, and gets locked down after character creation.
Duggan is offline   #17 Reply With Quote
Duggan
Senior Member
Volunteer Data File Contributor
 
Join Date: Nov 2009
Posts: 1,040

Old December 8th, 2017, 09:48 AM
Bingo! I modified Specialty to include a "<displace target="hero">TRUE</displace>" line and now everything chosen from the Specialty table in the skills shows up! I now see that the tag is used to indicate whether a given item should be displaced. Now, I just need to get the table reached by the button by the skills to realize that it should only display the items the hero doesn't already have...

After that, I plan to build something like an Advance to hold the various bonus abilities from Sophont type, Background, Command Package, etc to allow for things like a choice of Specialization (the code I have works for skills, but that's because it just needs to adjust ranks, not add a pick), which may have the happy side effect of also cleaning up my code a little.
Duggan is offline   #18 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 03:34 AM.


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