Fantasy Grounds Fridays Pre
  1. #1

    Error on the charsheet

    I noticed an error on both the standard character sheet and the Advanced sheet further down on this forum.

    Flatfooted AC doesn't ignore your dexterity modifier -- you don't get your dex BONUS, but you still take a dex PENALTY.

    I have dex 8 -- if I'm naked and flatfooted, my AC is 9, not 10. You can never have flatfooted AC that's higher than your normal AC (unless you have some bizarre special ability, of course).

    So, does anyone know how to do a conditional in XML?

    The code lists the elements of Flatfooted AC:
    <source name="acsizebonus" op="+" />
    <source name="acarmorbonus" op="+" />
    <source name="acshieldbonus" op="+" />
    <source name="acnaturalbonus" op="+" />
    and so on.

    How would I handle adding <source name="acdexbonus" op="+" /> only when it's less than 0?

  2. #2
    Quote Originally Posted by Keenath
    So, does anyone know how to do a conditional in XML?
    Yes, I can help you out with this, but I need more information on what you are trying to do. I am a 1st edition user so I've never had to deal with this Flatfooted bonus.
    When you say:
    Quote Originally Posted by Keenath
    How would I handle adding <source name="acdexbonus" op="+" /> only when it's less than 0?
    Is "it's" refering to the acdexbonus or the Flatfooted AC?
    If you elaborate a little more I can show you how to do the conditional.

  3. #3
    Flatfooted is a condition that means you've been suprised. Until you act for the first time, you are flatfooted, which means (among other things) that you lose your dexterity bonus to AC.

    Normally, your AC is equal to 10 plus your armor bonus plus your dexterity modifier plus any other odds and ends. Modifier is a neutral term used to describe a number that could be a bonus or a penalty. Depending on your ability scores, your dex modifier could be +2, but it could also be 0 or -1. That number, whatever it is, is referred to as a dex modifier.

    When you're flatfooted, you lose your dex bonus to AC, but you don't lose a penalty. Meaning, if you have a dex modifier of +1 and are not wearing armor, your normal AC is 11, but your flatfooted AC is 10. Contrariwise, if you have a dex modifier of -1, your normal AC is 9, and your flatfooted AC is 9. If you are particularly quick on your feet, that speed doesn't benefit you when flatfooted, but you don't get more agile from being unaware. As written, that's exactly what the code is doing!


    So, codewise:

    There is a value called acdexbonus (which is slightly misnamed, it's actually the AC Dex Modifier, not just the bonus).

    The Touch AC is defined this way:
    <numbercontrol name="actouch">
    <bounds rect="17,118,17,15" />
    <nodrop />
    <nodrag />
    <noreset />
    <source name="acdexbonus" op="+" />
    <source name="acsizebonus" op="+" />
    <source name="acdeflectionbonus" op="+" />
    <source name="acmiscbonus" op="+" />
    <source name="acbasehelper" valuemap="0:10" />
    </numbercontrol>

    I need to add an additional source, "acdexbonus", but only if acdexbonus is a negative number. If acdexbonus is greater than zero, it is ignored by the Touch AC equation.

    Is "it's" refering to the acdexbonus or the Flatfooted AC?
    If you elaborate a little more I can show you how to do the conditional.
    While I understand why you're asking, I really didn't need the precisely correct answer. I'm a decent programmer, I just don't know XML! If I have an example, though, I can work out what needs to go where.
    Last edited by Keenath; October 2nd, 2006 at 06:14.

  4. #4
    you could use a new numbercontrol like this:

    <source name="dexteritytotal" op="+" valuemap="0:-5,1:-5,2:-4,3:-4,4:-3,5:-3,6:-2,7:-2,8:-1,9:-1,10:0,11:0,12:0,13:0,14:0,15:0,16:0,17:0,18:0,19: 0,20:0,21:0,22:0,23:0,24:0,25:0,26:0,27:0,28:0,29: 0,30:0" />

    and name it what you want and then add an entry like this:

    <source name="whateverbonus" op="+" />
    Alea Iacta Est
    The Die is Cast!

  5. #5
    Quote Originally Posted by Keenath
    While I understand why you're asking, I really didn't need the precisely correct answer. I'm a decent programmer, I just don't know XML! If I have an example, though, I can work out what needs to go where.
    What I would do is create an invisble numbercontrol and call it acdexbonus_yn and using the acdexbonus as the sourcename assign all negative numbers to 0 and all positive numbers to 1. Then create another numbercontrol called acdexmodifier and add the acdexbonus and then multiply this by acdexbonus_yn. This acdexmodifier would then be added to your actouch. If the acdexbonus was negative it would add nothing and if the acdexbonus was positive it would add the positive number. The reason I would do it like this is so that any control I wanted to null out as a result of this modifier being negative could be done quite simply by multiplying times acdexbonus_yn. It is more cumbersome than what tdwyer11b suggested, but can be used throughout your charactersheet as a conditional. If you'd like me to give an example I could.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Starfinder Playlist

Log in

Log in