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 August 26th, 2017, 09:00 AM
So, in my data files for Planet Mercenary, I currently have two different ways to augment skills and specialties, as lifted from the 4E files, and one way to add a specialty, which I think I lifted from the Savage Worlds tutorial. They all seem to add the items differently, which seems to impact what tags are present. I was wondering if you could clarify that the differences are:

First, I was setting up the either-or choices for the various backgrounds, and I lifted a bootstrap / autotag combo from the 4E files as follows:

For example, this is the current Chaplain entry (which isn't quite right because I still need to figure out a way to allow for a choice from a skill type):

Quote:
<thing
id="cmdChapln"
name="Chaplain"
compset="CmdPckge"
isunique="yes"
description="The Chaplain provides both moral support and a moral compass. Morale and morality! Sometimes it falls to the Chaplain to point out what horrible people the other officers could become if they follow a given path. Other times the Chaplain must bring his carbine to his shoulder and clear a path with righteous indignation!">

<tag group="SkillBonus" tag="skDodge"/>
<tag group="SkillBonus" tag="skHistory"/>

<bootstrap thing="spHistRel"/>

<bootstrap thing="fRPlusSk">
<autotag group="SkillBonus" tag="skInspire"/>
<autotag group="SkillBonus" tag="skPerform"/>
<autotag group="explicit" tag="1"/>
</bootstrap>

<bootstrap thing="fRPlusSk">
<autotag group="SkillBonus" tag="skPistol"/>
<autotag group="SkillBonus" tag="skCarbine"/>
<autotag group="SkillBonus" tag="skDodge"/>
<!-- If I were to spell out the combat options, this would be longer, but I'd prefer to pull in all skills tagged with skCombat -->
<autotag group="explicit" tag="2"/>
</bootstrap>
</thing>
The intent is to have immediate +2 Skill Bonuses to Dodge and History, add a History (Religion) Specialty, and then allow the user to select between adding +2 to Inspire or Perform, and then +2 to any one Combat skill. The specialty is currently handled by directly adding the Thing via a bootstrap. The single skill bonuses are using Tag to add a tag and the choice between two skills is handled via bootstrapping a Thing which has a series of Autotags for the choices (which eventually add SkillBonuses). The relevant bits (I think):

Quote:
<thing
id="fRPlusSk"
name="+2 to Skill"
compset="SkillBonus"
description="Gives a +2 bonus to the selected skill.">
<fieldval field="usrCandid1" value="component.Skill"/>
<tag group="Hide" tag="Special"/>
<eval index="1" phase="PreTraits" priority="5000">
<before name="Calc trtFinal"/><![CDATA[
~build the candidate expression out of our SkillBonus tags
if (tagis[SkillBonus.?] <> 0) then
field[usrCandid1].text &= " & (" & tagids[SkillBonus.?, " | "] & ")"
endif

perform field[usrChosen1].chosen.field[trtBG].modify[+,2,"Background"]
]]></eval>
</thing>
Quote:
<!-- BGTrait - all background traits — backgrounds, command packages, and races —
derive from this to provide common properties -->
<component
id="BGTrait"
name="Background trait"
autocompset="no"
panellink="basics">
<eval index="1" phase="Setup" priority="3000" name="BG tag final">
<before name="Size final"/><![CDATA[
var expr as string
if (tagis[SkillBonus.?] <> 0) then
expr = tagids[SkillBonus.?, " | "]
foreach pick in hero from Skill where expr
perform eachpick.field[trtBG].modify[+,2,""]
nexteach
endif
]]></eval>
</component>
I know one way of looking at things is that "If it works, that's fine", but a) it bothers me having what seems to be three different ways of doing this (and might need a fourth) and b) Right now, my attempt to provide all of the Skill Bonuses from race, background, and command packages in a table is failing because only the +2 Choice ones are showing up despite what I think should be working by showing all SkillBonuses:

Quote:
<!-- Skill Bonus portal. Used to list skill bonuses from backgrounds, races, and
command packages, and to allow for choices. -->
<portal
id="skBonuses"
style="tblInvis"
width="240">
<table_fixed
component="UserSelect"
showtemplate="MenuSlPick"
showsortset="explicit"
alwaysupdate="yes">
<list><![CDATA[
(!User.NeedChosen | Helper.ChosenOpt)
]]></list>
<headertitle><![CDATA[
@text = "Skill Bonuses"
]]></headertitle>
</table_fixed>
</portal>
Quote:
<template
id="MenuSlPick"
name="Configurable Pick"
compset="UserSelect"
marginhorz="5"
marginvert="3">

<portal
id="name"
style="lblLeft"
showinvalid="yes">
<label
ismultiline="yes"
field="name">
</label>
</portal>

<portal
id="thinglist"
style="menuSmall">
<menu_things
field="usrChosen1"
component="none"
candidatefield="usrCandid1"
usepicksfield="usrSource1"
maxvisible="10"
sortset="explicit">
</menu_things>
</portal>

<position><![CDATA[
~set up our height; our width is pre-initialized for us
height = portal[thinglist].height

~if this is a "sizing" calculation, we're done
doneif (issizing <> 0)

~position our tallest portal at the top
portal[thinglist].top = 0

~center the other portals on the tallest one
perform portal[name].centeron[vert,thinglist]

portal[name].left = 0
portal[name].width = 100

portal[thinglist].left = portal[name].right + 3
portal[thinglist].width = width - portal[name].width - 3
]]></position>

</template>
TL;DR: Is there a good standard way to handle all of these in a fairly common way? And how do I get these things to show up in the table of adjustments? Am I best off having multiple tables one after the other, for each of the items? This is one of those things where it seems to just work in 4E files, but that might be because the same name is often used for Tags, Things, Templates, etc, which makes it tricky to trace.
Duggan is offline   #1 Reply With Quote
RavenX
Senior Member
Volunteer Data File Contributor
 
Join Date: Jan 2011
Location: Nowhere, Virginia
Posts: 3,425

Old August 27th, 2017, 06:31 PM
Code:
if (tagis[SkillBonus.?] <> 0) then
expr = tagids[SkillBonus.?, " | "]
foreach pick in hero from Skill where expr
perform eachpick.field[trtBG].modify[+,2,""]
nexteach
endif
The line of code I've outlined in red is why your only seeing a +2 bonus applied. You're telling the software that for any SkillBonus tag it should apply a +2 bonus via the modify part of this script. If you are using the SkillBonus tag group to determine the value of the bonus, you need to rig it up to apply the proper bonus.

Also, the foreach loop might not even be necessary, you could rig this in an eval script on the skills component and cut the foreach loop out of the equation completely.

For example, using if () then statements to cycle through your tags...

If (tagis[SkillBonus.1] <> 0) then
perform eachpick.field[trtBG].modify[+,1,""]
elseif (tagis[SkillBonus.2] <> 0) then
perform eachpick.field[trtBG].modify[+,2,""]
endif

You can cycle through all your Skill Bonus tags, telling hero lab to apply the bonus based on the presence of a specific tag within your foreach statement. This should fix the issue of only applying a +2 bonus.

Also, the foreach loop is possibly completely unnecessary. If you rig hero lab to forward SkillBonus tags to the skills themselves you can have an eval script on your skill component that does all the trait modifications without needing that foreach loop.

You can do this by rigging a skill linkage and having your background traits establish the linkage. Then in an eval script use linkage[basis].setfocus and perform focus.assign[SkillBonus.X] to the skill directly...

RavenX

Currently working on the Exalted 2e datafiles.

Last edited by RavenX; August 27th, 2017 at 06:37 PM.
RavenX is offline   #2 Reply With Quote
Duggan
Senior Member
Volunteer Data File Contributor
 
Join Date: Nov 2009
Posts: 1,040

Old August 27th, 2017, 07:03 PM
Ah. I was slightly unclear. The problem isn't that they're all +2, but that only the fRPlusSk items are showing up on the skBonuses table.

Ultimately, part of the problem, I think, is that I'm still not really clear on what's being added where to make this all work. ^_^ Like I think it's saying that there's a SkillBonus tag, but I never defined such a tag. Or is that what autotag does?
Duggan is offline   #3 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 11,999

Old August 28th, 2017, 08:24 AM
You're throwing large blocks of code out, but I can't see where you've described the game rules you're trying to implement.
Mathias is offline   #4 Reply With Quote
Duggan
Senior Member
Volunteer Data File Contributor
 
Join Date: Nov 2009
Posts: 1,040

Old August 28th, 2017, 09:45 AM
What I'm trying to implement is in the first code block and the following text. The Chaplain package offers :
  • +2 Skill Bonuses to Dodge and History
  • a History (Religion) Specialty
  • +2 to either Inspire or Perform
  • +2 to any one Combat skill

Right now, the +2 Skill bonus to Dodge and History work (but don't show up in my list). The specialty works as-is, but I can't get it implemented in the Editor so far (most examples using Tags). The choice between Inspire and Perform works for the most part (there are some odd glitches when the change cross the min-max border as documented in one of my other posts) and show up. And I'm still puzzling out a good way to set up the +2 to a combat skill so that I don't have to spell out the choices.

I basically have two questions:
1) What is the difference between "tag" and "autotag"? Does autotag create the tag in question before adding it?
2) Why isn't the skBonuses table showing the Dodge and History items?
Duggan is offline   #5 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 11,999

Old August 28th, 2017, 09:59 AM
When assigning a tag to a thing, the element is called <tag>. When assigning a tag to a bootstrap, the element is called <autotag>. Behind the scenes, things are being handled in different ways, but to the user, there's not much difference - the tag gets assigned to that pick once the pick is added to the character.

Can I see the identity tags you've defined for your skills component?
Mathias is offline   #6 Reply With Quote
Duggan
Senior Member
Volunteer Data File Contributor
 
Join Date: Nov 2009
Posts: 1,040

Old August 28th, 2017, 01:16 PM
Certainly.

Quote:
<group
id="Skill"
dynamic="yes">
<value id="skCarbine" name="Carbines"/>
<value id="skDodge" name="Dodge"/>
<value id="skExplsves" name="Explosives"/>
<value id="skHvyWeap" name="Heavy Weapons"/>
<value id="skLongGun" name="Long Gun"/>
<value id="skMelee" name="Melee"/>
<value id="skPistol" name="Pistols"/>
<value id="skScatter" name="Scatterguns"/>
<value id="skStaWeap" name="Stationed Weapons"/>
<value id="skThrown" name="Thrown Weapons"/>
<value id="skChem" name="Chemistry"/>
<value id="skCompute" name="Computers"/>
<value id="skEcon" name="Economics"/>
<value id="skEng" name="Engineering"/>
<value id="skExpSci" name="Experimental Sciences"/>
<value id="skHistory" name="History"/>
<value id="skInsight" name="Insight"/>
<value id="skMech" name="Mechanic"/>
<value id="skMedic" name="Medicine"/>
<value id="skRes" name="Research"/>
<value id="skXeno" name="Xenobiology"/>
<value id="skAirVeh" name="Air Vehicles"/>
<value id="skAthlete" name="Athletics"/>
<value id="skEndure" name="Endurance"/>
<value id="skGrndVeh" name="Ground Vehicles"/>
<value id="skLarceny" name="Larceny"/>
<value id="skPercept" name="Perception"/>
<value id="skSpcVeh" name="Space Vehicles"/>
<value id="skStealth" name="Stealth"/>
<value id="skWatVeh" name="Water Vehicles"/>
<value id="skContract" name="Contracts"/>
<value id="skDeceive" name="Deceive"/>
<value id="skEmpathy" name="Empathy"/>
<value id="skInspire" name="Inspire"/>
<value id="skIntim" name="Intimidate"/>
<value id="skNegot" name="Negotiate"/>
<value id="skPerform" name="Perform"/>
<value id="skWillpow" name="Willpower"/>
</group>
Unless you mean the identity elements in the Skill, in which case they are the following:
Quote:
<!-- Each skill needs its own identity tag so existing skills can be identified during advancement -->
<identity group="Skill"/>

<!-- Each skill can also be selected as a background/command package/race bonus.
This bonus does count against the maximum at character creation. -->
<identity group="SkillBonus"/>
Duggan is offline   #7 Reply With Quote
Mathias
Senior Member
Lone Wolf Staff
 
Join Date: May 2005
Posts: 11,999

Old August 28th, 2017, 01:49 PM
I meant the second of those.

There should not be a group named Skill in tags.1st - you're defining all those tags as identity tags on the component, so having it in tags.1st, too is redundant.

If you've got an identity tag of SkillBonus on the skills component, I see no reason these scripts should be failing.

Time to start adding debug lines and figure out what's going on in your script.
Mathias is offline   #8 Reply With Quote
Duggan
Senior Member
Volunteer Data File Contributor
 
Join Date: Nov 2009
Posts: 1,040

Old August 28th, 2017, 03:46 PM
Thank you. I hadn't found the page about debug statements before now.
Duggan is offline   #9 Reply With Quote
Duggan
Senior Member
Volunteer Data File Contributor
 
Join Date: Nov 2009
Posts: 1,040

Old August 28th, 2017, 04:46 PM
And <identity> is a tag in and of itself... suddenly a bunch of things start to make more sense.
Duggan is offline   #10 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 06:10 PM.


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