Lone Wolf Development Forums

Lone Wolf Development Forums (http://forums.wolflair.com/index.php)
-   HL - Authoring Kit (http://forums.wolflair.com/forumdisplay.php?f=58)
-   -   Set Min-Max by Race (http://forums.wolflair.com/showthread.php?t=38649)

Kevlyn February 21st, 2013 07:47 PM

Set Min-Max by Race
 
I'm trying to learn how to build a game system and I've been following along in the Savage Worlds, but the game I'm trying to model has minimum/maximum attributes that are racial dependent.

I may be missing the boat, but I'm not exactly sure of how to do this. I know I would want to store the modifiers to the attributes in the race data, and I can add them as variables in the script section. But how do I modify the min/max per attribute, instead of the default behavior that stops all attributes at the min/max values set in traits.str?

Any help getting me started would be awesome!

evildmguy February 22nd, 2013 03:59 AM

In my thing_races.dat, I defined a race:

Code:

<thing
          id="racFraal"
          name="Fraal"
          compset="Race"
          isunique="yes"
          description="Fraal race from core book">
          <bootstrap thing="skResolve"/>
          <bootstrap thing="skVehicle"/>
          <bootstrap thing="skBKnow"/>
          <bootstrap thing="skAware"/>
          <bootstrap thing="skInteract"/>
          <bootstrap thing="abASF"/>
        </thing>

Then, I defined abASF (ability Ability Scores Fraal) as :

Code:

<thing
          id="abASF"
          name="Ability Scores Fraal"
          compset="Ability"
          isunique="yes"
          description="Description">
          <tag group="Hide" tag="Ability"/>
          <eval index="1" phase="PreTraits" priority="5000">
            <before name="Calc trtFinal"/><![CDATA[
                hero.child[attrStr].field[trtMinimum].value = 4
                hero.child[attrStr].field[trtMaximum].value = 11
                hero.child[attrDex].field[trtMinimum].value = 4
                hero.child[attrDex].field[trtMaximum].value = 11
                hero.child[attrCon].field[trtMinimum].value = 4
                hero.child[attrCon].field[trtMaximum].value = 10
                hero.child[attrInt].field[trtMinimum].value = 9
                hero.child[attrInt].field[trtMaximum].value = 15
                hero.child[attrWil].field[trtMinimum].value = 9
                hero.child[attrWil].field[trtMaximum].value = 16
                hero.child[attrPer].field[trtMinimum].value = 4
                hero.child[attrPer].field[trtMaximum].value = 15               
                ]]></eval>
        </thing>

So, that's how I did it.

edg

Kevlyn February 22nd, 2013 04:35 AM

Aha!
 
I knew you'd probably be the one to reply. Thanks so much for helping me to get going!

evildmguy February 22nd, 2013 05:49 AM

Glad to help! And I'm glad it did help. I was worried it was too specific to my own project to help you out.

edg

Kevlyn February 23rd, 2013 06:49 AM

Now I'm just not getting anywhere on using the minimums. I've set them as suggested, I've created the bootstrap items for each one. I then commented out the following.

Code:

~field[trtMinimum].value = 1
And changed trtMaximum defvalue to 25, which should be sufficient for now to encompass all the races.

I cannot figure out how to enforce the min/max values, though.

evildmguy February 23rd, 2013 07:07 AM

If you are using the skeletal files, it will do so automatically, as long as you have set the minimum and maximum.

When the min or max is reached, the thing will get the tag Helper.Minimum or Helper.Maximum. If they have those tags, they can't be improved or advanced.

edg

Kevlyn February 23rd, 2013 07:17 AM

I'm using the skeleton files, and its definitely not stopping me from exceeding racial maximum, I can scale all the way up through the defvalue of 25 and down to 0 again because I commented out the minimum of 1.

evildmguy February 23rd, 2013 07:31 AM

Do you have this:

Code:

    <!-- If the trait is at its minimum/maximum, assign a tag to preclude further advancements -->
    <eval index="2" phase="Final" priority="5000"><![CDATA[
      ~base our test on the adjusted trait value, sans any in-play adjustments
      var trait as number
      trait = field[trtUser].value + field[trtBonus].value
      if (trait <= field[trtMinimum].value) then
        perform assign[Helper.Minimum]
      elseif (trait >= field[trtMaximum].value) then
        perform assign[Helper.Maximum]
        endif
      ]]></eval>

on your trait?

Kevlyn February 23rd, 2013 07:36 AM

Yeah, its still there. I even went so far, since most of my changes were to a couple of other files (skills, mostly), that I started a new set of data files because I thought maybe I mucked something up. But there's no enforcement of the min/max values I try to bootstrap by race. I'm baffled at this stage, so I'm trying various things to see what I can do.

It's almost like the minimums aren't getting applied.

So, to that end I have the following items:

Code:

  <thing
    id="racHuman"
    name="Human"
    compset="Race"
    isunique="yes"
    description="Be a human.  It's fun.">

    <bootstrap thing="abHuman"/>

    </thing>

And the bootstrap
Code:

  <thing
    id="abHuman"
    name="Human Abilitiy Scores"
    compset="Ability"
    isunique="yes"
    description="Be a human.  It's fun.">
    <tag group="Hide" tag="Ability"/>
    <!-- If the race confers any special abilities, bootstrap them here
    <eval index="1" phase="PreTraits" priority="5000">
      <before name="Calc trtFinal"/><![CDATA[
              hero.child[attrStr].field[trtMinimum].value = 3
        hero.child[attrStr].field[trtMaximum].value = 18
        hero.child[attrCon].field[trtMinimum].value = 3
        hero.child[attrSiz].field[trtMinimum].value = 8
        hero.child[attrDex].field[trtMinimum].value = 3
        hero.child[attrInt].field[trtMinimum].value = 8
        hero.child[attrPow].field[trtMinimum].value = 3
        hero.child[attrCha].field[trtMinimum].value = 3
      ]]></eval>
    -->

    </thing>


evildmguy February 23rd, 2013 08:02 AM

aha! I think I might see it.

<!-- and --> are comment delimiters. So, move the --> to after the "bootstrap them here" and see how that works.


All times are GMT -8. The time now is 03:51 AM.

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