Creature Refinement (Savage): Difference between revisions
Line 81: | Line 81: | ||
===Validation Rules=== | ===Validation Rules=== | ||
The first thing we'll notice regarding the validation report is that various resources will sometimes report that they have been overspent. These are the same resources that we disabled for NPC creation, and they must also be disabled for creatures. This can be solved by modifying the Eval Rule on the "Resource" component to consider the rule as valid for any non-PC. The new line of code required is shown below. | |||
<pre> | |||
if (tagis[Helper.NPCImpact] + !hero.tagis[Hero.PC] >= 2) then | |||
</pre> | |||
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. | 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. |
Revision as of 09:48, 7 February 2009
Context: HL Kit … Authoring 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
Due to our changes in how creatures are handled, there are a number of facets of the interface that need some work.
- Basics Tab
headertitle
@text = "Attributes" if (hero.tagis[Hero.Creature] = 0) then @text &= " - " & hero.child[resAttrib].field[resSummary].text endif
hide XP and creation details for creatures
~if we're creating a creature, don't show XP or creation details if (hero.tagis[Hero.Creature] <> 0) then portal[baRank].visible = 0 portal[baCreation].visible = 0 portal[separator1].visible = 0 portal[separator2].visible = 0 endif
- Skills Tabs
headertitle
@text = "Skills" if (hero.tagis[Hero.Creature] = 0) then @text &= " - " & hero.child[resSkill].field[resSummary].text endif
titlebar
*Resource Display Revisions resAddItem Finalize script - no highlighting for any non-PC <pre> if (tagis[Helper.NPCImpact] + !hero.tagis[Hero.PC] >= 2) then
Validation Rules
The first thing we'll notice regarding the validation report is that various resources will sometimes report that they have been overspent. These are the same resources that we disabled for NPC creation, and they must also be disabled for creatures. This can be solved by modifying the Eval Rule on the "Resource" component to consider the rule as valid for any non-PC. The new line of code required is shown below.
if (tagis[Helper.NPCImpact] + !hero.tagis[Hero.PC] >= 2) then
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