Difference between revisions of "More Cleanup (Savage)"

From HLKitWiki
Jump to: navigation, search
(New page: {{context|Authoring Examples|Savage Worlds Walk-Through}} ===Overview=== Our list of things we came up with previously is almost fully addressed. Let's take this opportunity to do anothe...)
 
(Damage and Non-Wildcards)
Line 38: Line 38:
  
 
===Damage and Non-Wildcards===
 
===Damage and Non-Wildcards===
 +
 +
On the "In-Play" tab, we make the assumption that all characters can take four levels of damage. However, this only applies to wildcards. Non-wildcards take one hit and go down. After looking into this a little bit further, it seems that we've made this assumption through the data files. We need to properly handle the situation where a character has a different maximum number of wounds based on the wildcard designation.
 +
 +
The first thing we need to do is setup a new field into which we can save the appropriate maximum number of wounds. Since the field value is based solely on the wildcard state of the character, we can use a Calculate script on the field to easily determine the value. We need to be sure to schedule the script early, since other scripts will rely on this value. This yields a field that looks like the following.
 +
 +
<pre>
 +
<field
 +
  id="acMaxWound"
 +
  name="Maximum Wounds"
 +
  type="derived">
 +
  <calculate phase="Initialize" priority="1000"><![CDATA[
 +
    ~if we're a wildcard, we can take 4 wounds, else only one
 +
    if (field[acIsWild].value <> 0) then
 +
      @value = 4
 +
    else
 +
      @value = 1
 +
      endif
 +
    ]]></calculate>
 +
  </field>
 +
</pre>
 +
 +
With the field in place, we can now go through the data files and identify places where the field needs to be utilized. We'll do a search for references to the "acWounds" field to locate places where a change may be needed. It turns out there are two places within the "Actor" component and another two places within the "In-Play" tab.
 +
 +
The Finalize script for the "acDmgSumm" field uses a hard-coded value of four when determining whether to show the wounds as "Inc". We can replace the four with a reference to the "acMaxWound" field. The new line of code should look like below.
 +
 +
<pre>
 +
if (wounds <= -field[acMaxWound].value) then
 +
</pre>
 +
 +
Similar logic is utilized within the Finalize script for the "acDmgTac" field. Again, we replace the four with a reference to the field.
 +
 +
Shifting our focus to the "In-Play" tab, both the "wounds" and "wndsustain" portals reference a hard-coded value of four. Both of these references need to be replaced with the field. The new line of code for the Label script in the "wounds" portal is shown below.
 +
 +
<pre>
 +
if (wounds > -field[acMaxWound].value) then
 +
</pre>
 +
 +
All of the handling for wounds is now properly differentiating between wildcards and non-wildcards.
  
 
===Lead Summary Script===
 
===Lead Summary Script===

Revision as of 19:26, 30 January 2009

Context: HL KitAuthoring Examples … Savage Worlds Walk-Through 

Overview

Our list of things we came up with previously is almost fully addressed. Let's take this opportunity to do another round of testing everything and see if there's anything we missed last time. Then we can knock off the remaining little things on our list.

Another Assessment

-red X next to dead things on taccon

-add menu tracking and selection for Scholar and Profesional/Expert/Master edges

   -add to character sheet

-Parry must handle a Fighting stat of "d12+X", which adds half of X, rounded down

-Toughness must handle a Vigor stat of "d12+X" the same way

-build in editor support for users to add custom material

-cleanup of all unused mechanisms from Skeleton files

-delete stuff from files that is not needed for SW

-add all creatures from the bestiary as a stock portfolio - see page 125

-If a linked skill does not exist (e.g. Shooting), must apply -2 adjustment for weapon

-superpower skill names are too long to fit in skills list on character sheet

       -move them down with domain-based skills

-name on skills tab must use the "thingname" else domain is included in name

-title above attriubtes on Basics tab needs to include amount spent

-foreign gizmos are being counted towards total number of arcane powers chosen

-add arcane powers resource onto Basics tab only when an arcane edge is taken

Damage and Non-Wildcards

On the "In-Play" tab, we make the assumption that all characters can take four levels of damage. However, this only applies to wildcards. Non-wildcards take one hit and go down. After looking into this a little bit further, it seems that we've made this assumption through the data files. We need to properly handle the situation where a character has a different maximum number of wounds based on the wildcard designation.

The first thing we need to do is setup a new field into which we can save the appropriate maximum number of wounds. Since the field value is based solely on the wildcard state of the character, we can use a Calculate script on the field to easily determine the value. We need to be sure to schedule the script early, since other scripts will rely on this value. This yields a field that looks like the following.

<field
  id="acMaxWound"
  name="Maximum Wounds"
  type="derived">
  <calculate phase="Initialize" priority="1000"><![CDATA[
    ~if we're a wildcard, we can take 4 wounds, else only one
    if (field[acIsWild].value <> 0) then
      @value = 4
    else
      @value = 1
      endif
    ]]></calculate>
  </field>

With the field in place, we can now go through the data files and identify places where the field needs to be utilized. We'll do a search for references to the "acWounds" field to locate places where a change may be needed. It turns out there are two places within the "Actor" component and another two places within the "In-Play" tab.

The Finalize script for the "acDmgSumm" field uses a hard-coded value of four when determining whether to show the wounds as "Inc". We can replace the four with a reference to the "acMaxWound" field. The new line of code should look like below.

if (wounds <= -field[acMaxWound].value) then

Similar logic is utilized within the Finalize script for the "acDmgTac" field. Again, we replace the four with a reference to the field.

Shifting our focus to the "In-Play" tab, both the "wounds" and "wndsustain" portals reference a hard-coded value of four. Both of these references need to be replaced with the field. The new line of code for the Label script in the "wounds" portal is shown below.

if (wounds > -field[acMaxWound].value) then

All of the handling for wounds is now properly differentiating between wildcards and non-wildcards.

Lead Summary Script