• Please note: In an effort to ensure that all of our users feel welcome on our forums, we’ve updated our forum rules. You can review the updated rules here: http://forums.wolflair.com/showthread.php?t=5528.

    If a fellow Community member is not following the forum rules, please report the post by clicking the Report button (the red yield sign on the left) located on every post. This will notify the moderators directly. If you have any questions about these new rules, please contact support@wolflair.com.

    - The Lone Wolf Development Team

Rewards vs Advancements

Gumbytie

Well-known member
I am not I realized these were different in HeroLab until I whipped up this code for Rewards.

At character creation:
1. The setting allows a character to pick "Literate" as a Reward.
2. Pick a new Language as a Reward.

After locking the Character, these should ALSO be options during Advancement. However, they show up as Reward options at creation but not after locking and looking for them under Advancement Options.

So I must assume that Rewards code and Advancement code are separate? If so, how do you make a Reward an option for an Advancement as well?

I can't find anything in the Editor that looks to give me an option to look at an Advancement. I admit, I am old and vision is shot, so feel free to correct me :)
 
Hmmm, yeah. There isn't an Editor tab for Advances. Don't know that's been asked for before. Two ways, either create a blank .user file with the Editor, or use a text editor and create a text file with the following header:
<?xml version="1.0" encoding="UTF-8"?>
<document signature="Hero Lab Data">

And the following footer:
</document>

Save it with a .user file extension. Then put something like this in between the header and footer:

<thing
id="advLiteracy"
name="Gain Literacy"
compset="Advance"
description="Add Literacy and select a new language at a d4 rating.">
<fieldval field="advAction" value="New Skill"/>
<fieldval field="advDynamic" value="component.Skill & Skill.skLanguage"/>
<fieldval field="advCost" value="1"/>
<tag group="Advance" tag="AddNew"/>
<tag group="DomainTerm" tag="Focus"/>
<!-- Modify tagexpr to deny skills that have already been added to the character -->
<eval index="1" phase="Render" priority="1000">
<before name="Assign Dynamic Tagexpr"/><![CDATA[
~get the list of all unique skills on the hero and assemble it as a list of precluded tags
var tagexpr as string
foreach pick in hero from Skill where "!Hide.Skill"
if (eachpick.isunique <> 0) then
tagexpr &= " & !Skill." & eachpick.idstring
endif
nexteach

~if there are any tags to exclude, append them to the tagexpr appropriately
if (empty(tagexpr) = 0) then
field[advDynamic].text &= tagexpr
endif
]]></eval>

<!-- SWADE allows adding 2 Skills for an Advance, cut the cost in half -->
<eval index="1" phase="Effects" priority="1000" name="Adjust AdvCost"><![CDATA[
if (hero.tagis[source.AdventureEd] <> 0) then
field[advCost].value = .5
endif
]]></eval>
<!-- Attach the child entity for tracking the advance -->
<child entity="Advance">
<tag group="Advance" tag="MustChoose"/>
</child>
</thing>

The tags for Advances are thus:
"Gizmo" <!-- Used on the gizmo that represents each advancement-->
"MustChoose" <!-- Used to require selection of an attribute, skill, etc. -->
"Newest" <!-- Identifies the most recent advancement on character -->
"Increase" <!-- Advancement increases the value of the associated trait -->
"Decrease" <!-- Advancement decreases the value of the associated trait -->
"AddNew" <!-- Advancement adds a new trait to the character -->
"Notation" <!-- Advancement provides place for a notation by the user -->
"Injury" <!-- Advancement assigns a permanent injury -->


Now, this is a first cut at one to add a Language Skill, I haven't tried it. You'll also want to bootstrap the Literacy Edge. Now. since you are doing Deluxe, it depends on whether you treat Languages as Skills or as their own separate Item. That's variable, so it adds another level of complexity.
 
Now that is a serious bunch of code :)

I should mention that this ties into the other question I had about starting languages, meaning this version is for Deluxe and uses lgLanguage, not the actual language skill like in SWADE.

Mind you, I will be trying this out on a SWADE game later once the kinks in this are worked out.

Okay, so for now, copying exactly into a .user file (have made plenty of those) I get some errors when I do the Quick Reload Data Files under Develop dropdown. All of them were regarding the:

Code:
	<fieldval field="advAction" value="New Skill"/>
	<fieldval field="advDynamic" value="component.Skill & Skill.skLanguage"/>
	<fieldval field="advCost" value="1"/>

So if I strip those out, the script does show up in Advancement tab, woohoo. But I am assuming it breaks after that due to those missing fieldvals. The Advance is Overspent, and in the chooser box "Select New Trait/Ability" the list is essentially everything on the character. I see some choices for languages:

  • Language (replaces the Knowledge skill and are specific to languages. The player chooses the language known, which indicates the ability to speak, read, and write the language.)
  • Language Slots (- no description -)
  • Languages (select this adjustment to apply a bonus/penalty to your number of languages.)

But damn, right out that gate, Cape, that is a pretty awesome start. So I will kick it around and muddle but you may have some thoughts as well.
 
Back
Top