Senior Member
Volunteer Data File Contributor
Join Date: Nov 2009
Posts: 1,502
|
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 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 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. |
#11 |
Senior Member
Volunteer Data File Contributor
Join Date: Nov 2009
Posts: 1,502
|
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 |
#12 |
Senior Member
Volunteer Data File Contributor
Join Date: Nov 2009
Posts: 1,502
|
Quote:
And would I be using the "form" action rather than "edit" since it would not be in a gizmo? |
|
#13 |
Senior Member
Join Date: Mar 2013
Location: Greater London, UK
Posts: 2,623
|
Quote:
Farling Author of the Realm Works Import tool, Realm Works Output tool and Realm Works to Foundry module Donations gratefully received via Patreon, Ko-Fi or Paypal |
|
#14 |
Senior Member
Volunteer Data File Contributor
Join Date: Nov 2009
Posts: 1,502
|
Unfortunately, probably not. That's more like what's done with the Domain of skills, which funnily enough I do use for some Specializations...
|
#15 |
Senior Member
Volunteer Data File Contributor
Join Date: Nov 2009
Posts: 1,502
|
Quote:
|
|
#16 |
Senior Member
Volunteer Data File Contributor
Join Date: Nov 2009
Posts: 1,502
|
Quote:
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. |
|
#17 |
Senior Member
Volunteer Data File Contributor
Join Date: Nov 2009
Posts: 1,502
|
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. |
#18 |
Thread Tools | |
Display Modes | |
|
|