Lone Wolf Development Forums

Lone Wolf Development Forums (http://forums.wolflair.com/index.php)
-   HL - Savage Worlds (http://forums.wolflair.com/forumdisplay.php?f=59)
-   -   Rewards vs Advancements (http://forums.wolflair.com/showthread.php?t=67928)

Gumbytie July 29th, 2023 01:38 PM

Rewards vs Advancements
 
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 :)

CapedCrusader July 30th, 2023 12:02 PM

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 &amp; 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.

Gumbytie July 30th, 2023 01:22 PM

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 &amp; 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.


All times are GMT -8. The time now is 08:06 AM.

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