View Single Post
Duggan
Senior Member
Volunteer Data File Contributor
 
Join Date: Nov 2009
Posts: 1,226

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