Lone Wolf Development Forums  

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

Notices

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Duggan
Senior Member
Volunteer Data File Contributor
 
Join Date: Nov 2009
Posts: 1,502

Old September 23rd, 2017, 07:06 AM
In Planet Mercenary, the system I'm working on, there are essentially two advances. Either you gain a point in three distinct skills (two of which you're supposed to have used in the course of the scenario, but of course that's not really part of the program logic), or you buy a skill specialty. I'm working on the latter right now, and hitting some issues.

Background info
  • Specializations exist as picks in a gizmo on the related skill. That was the easiest way to set up dialogs to pick specialties off of character creation so that only Specialties related to a skill where displayed.
  • Most Specialties are unique, but there are two that are not and have a domain.
  • You cannot have more Specialties than you have ranks in a skill.

Exclusion expression
The skeleton code has code for excluding unique items we've already added before:
Code:
foreach pick in hero where "component.Skill"
  foreach pick in eachpick.gizmo where "component.Specialty & !Hide.Specialty"
  
    if (each.isunique <> 0) then
      tagexpr &= " & !Specialty." & each.idstring
      endif
    nexteach
  nexteach
For my character with two specialties already, that means an exclusion expression like "& !Specialty.spLongBeam & !Specialty.spMechJury" which is neat and tidy and works.

That works just fine, but I want to only display skills where it's possible to add a specialty, so I have code to try to exclude specialties which can't be added because there aren't sufficient skill ranks. I wound up with the following:
Code:
foreach pick in hero where "component.Skill"
  var skillID as string
  var skillrank as number
  var speccount as number
  skillID = eachpick.idstring
  skillrank = eachpick.field[trtFinal].value
  speccount = eachpick.tagcount[User.HasSpec]
  debug skillrank & ", " & speccount
  if (speccount < skillrank) then
    foreach pick in eachpick.gizmo where "component.Specialty & !Hide.Specialty"
      debug eachpick.idstring
      if (each.isunique <> 0) then
        tagexpr &= " & !Specialty." & each.idstring
      endif
    nexteach
  else
  ~  debug skillID
    foreach thing in Specialty where "Skill." & skillID
      tagexpr &= " & !Specialty." & eachthing.idstring
    nexteach
  endif
nexteach
That, for the same character, produces an exclusion string of "& !Specialty.spAirEvad & !Specialty.spAirNav & !Specialty.spAirPurs & !Specialty.spAirStnt & !Specialty.spAthClmb & !Specialty.spAthFlght & !Specialty.spAthJump & !Specialty.spAthPurs & !Specialty.spAthRun & !Specialty.spAthStr & !Specialty.spAthSwim & !Specialty.spCarbBeam & !Specialty.spCarbNL & !Specialty.spCarbProj & !Specialty.spDecBluff & !Specialty.spDecDisg & !Specialty.spDecDist & !Specialty.spEconLcl & !Specialty.spEconPlan & !Specialty.spEconSec & !Specialty.spEmpGamb & !Specialty.spEmpGInfo & !Specialty.spEmpInfl & !Specialty.spEmpRSoph & !Specialty.spEngArch & !Specialty.spEngHab & !Specialty.spEngPlVeh & !Specialty.spEngVess & !Specialty.spExpBld & !Specialty.spExpDet & !Specialty.spExpDearm & !Specialty.spExpPlac & !Specialty.spGrndEvad & !Specialty.spGrndNav & !Specialty.spGrndPurs & !Specialty.spGrndStnt & !Specialty.spHvyBeam & !Specialty.spHvyNL & !Specialty.spHvyProj & !Specialty.spHistMil & !Specialty.spHistPoli & !Specialty.spHistRel & !Specialty.spHistSoph & !Specialty.spInspLead & !Specialty.spInspOra & !Specialty.spInspSed & !Specialty.spIntCoer & !Specialty.spIntInter & !Specialty.spIntTort & !Specialty.spLarcBE & !Specialty.spLarcPLoc & !Specialty.spLarcPPoc & !Specialty.spLarcSlgt & !Specialty.spLongBeam & !Specialty.spMechJury & !Specialty.spMedBatt & !Specialty.spMedFAid & !Specialty.spMedSurg & !Specialty.spMeleeCom & !Specialty.spMeleeEx & !Specialty.spMeleeUn & !Specialty.spMeleeWr & !Specialty.spNegBlck & !Specialty.spNegHagg & !Specialty.spNegPers & !Specialty.spPercHear & !Specialty.spPercMag & !Specialty.spPercSght & !Specialty.spPercSmll & !Specialty.spPercTste & !Specialty.spPercThrm & !Specialty.spPercTch & !Specialty.spPerfAct & !Specialty.spPerfCom & !Specialty.spPerfDnce & !Specialty.spPerfSong & !Specialty.spPistBeam & !Specialty.spPistNL & !Specialty.spPistProj & !Specialty.spScatBeam & !Specialty.spScatNL & !Specialty.spScatProj & !Specialty.spSpcEvad & !Specialty.spSpcNav & !Specialty.spSpcPurs & !Specialty.spSpcStnt & !Specialty.spStaWBall & !Specialty.spStaWBeam & !Specialty.spStaWMiss & !Specialty.spStlthHid & !Specialty.spStlthTai & !Specialty.spThrwAero & !Specialty.spThrwGren & !Specialty.spThrwImpr & !Specialty.spWatrEvad & !Specialty.spWatrNav & !Specialty.spWatrPurs & !Specialty.spWatStnt & !Specialty.spWillFort & !Specialty.spWillTena & !Specialty.spXenoWrld", which is long, but looks to hit all of the points. Except, well, it's not working. Every Specialty shows up, including the ones that were excluded before. Am I running into a limit on how large the field can be? It still prints without being cut off in the debug window. Maybe a limit for using it for tag exclusion? If I manually input a value of about half of those, it does work, which is suggestive.

I suppose I could rewrite the code as being "here's the list of things you can pick," but then I have the opposite issue of someone with 1 in each skill having every non-picked specialty on the list.

Or is there perhaps a way to set up subsequent changer tables so that they pick a skill, and then pick a relevant Specialty, like how the character creation does it?

Where does the Advance go?
Right now, the specialty isn't showing up, presumably because it didn't get added to the relevant skill. Where does it get assigned to? The Gizmo? The Advance thing? I'm having little luck figuring it out via the documentation and the debug window, although I'm still plugging away.

----

I previously had a small issue with how to display Specialty values differently (since they're not specifically being brought up from the skills), but a look at the Savage World code provided a solution there.

Thank you.
Duggan is offline   #1 Reply With Quote
 

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:57 PM.


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