Creature Refinement (Savage)

From HLKitWiki
Revision as of 02:34, 7 February 2009 by Rob (Talk | contribs) (Validation Rules)

Jump to: navigation, search

Context: HL KitAuthoring Examples … Savage Worlds Walk-Through 

Overview

We've now got the ability to define and customize creatures in place. However, there are still a fair number of tasks we need to complete before creatures are fully handled. The sections below address these remaining issues.

Managing Abilities

  • race-specific abilities
  • creature-specific abilities
    • shared abilities with races
    • separate file to hold all of the general/shared abilities
  • default abilities that can be added to any creature
    • identifying the abilities distinctly from other abilities via tag

Defining Complete Creatures

  • walk-through of three different creatures

New Abilities Tab

  • allow user to specify facets of dynamic abilities that are needed (value/text)
  • User.NeedText and User.NeedValue tags

Cleanup the Interface

  • Resource Revisions
  • Basics Tab
  • Skills Tabs

Validation Rules

If the user elects to construct a creature, the specific creature type needs to be specified. We need a validation rule to verify this is done. We already a thing defined with a validation rule to verify a race is selected. We can easily clone that thing and adapt it for use with the creature type chooser, resulting in the thing shown below.

<thing
  id="valCreatur"
  name="Creature Type"
  compset="Simple">
  <tag group="Helper" tag="Bootstrap"/>

  <evalrule index="1" phase="Validate" priority="8000" message="Must be selected"><![CDATA[
    ~if we have a creature type selected, we're good
    if (hero.tagis[Creature.?] <> 0) then
      @valid = 1
      done
      endif
    ]]></evalrule>

  </thing>

Unfortunately, we have a small problem still. If we create a normal character, we always get a validation error about the creature type. If we create a creature, we always get a validation error about the race. Each of these validation rules needs to be applied only when the appropriate character type is in use. One solution would be to utilize an appropriate ContainerReq on each of the validation things. An easier solution is to test whether we have a creature within the Eval Rule script. The revised script code for the "valRace" and "valCreatur" things is shown below.

~if we have a race selected or we are a creature, we're good
if (hero.tagis[Race.?] + hero.tagis[Hero.Creature] <> 0) then
  @valid = 1
  done
  endif
~if we have a creature type selected or we're not a creature, we're good
if (hero.tagis[Creature.?] + !hero.tagis[Hero.Creature] <> 0) then
  @valid = 1
  done
  endif

Output Revisions

  • show "creature type" instead of Race within character sheet
  • same for statblock output

Custom Creatures

  • define a "custom" creature that allows the author to create whatever he wants
  • define a "custom" ability that allows the author to annotate the behaviors without actually creating a new ability in the Editor
    • just like custom containers