FORUM ARCHIVED

"percent" or "percentage"?

Discussion in 'Modding' started by Bohandas, Aug 2, 2013.

  1. Bohandas

    Bohandas Member

    "percent" and "percentage" both appear in core spells. Which should be used when?
     
    Kazeto likes this.
  2. Syphonix

    Syphonix Member

    Percentage is for inside skills and buffs. Percent is for everything else.
     
    Kazeto likes this.
  3. Essence

    Essence Will Mod for Digglebucks

    I do believe that Nicholas molested the code a while back so that percent actually works everywhere, and percentage still works inside skills and buffs. Don't hold me to that though.
     
    Kazeto likes this.
  4. Syphonix

    Syphonix Member

    This had me curious, so I just slightly altered the XML on my current project. I replace "percentage" with "percent" inside a skill trigger and a buff trigger. Both fired every single time, ignoring the "percent." This didn't appear to work, unless it was an added function for something else I can't think of?
     
    Kazeto likes this.
  5. Essence

    Essence Will Mod for Digglebucks

    Thus the whole "don't hold me to that" part. Obviously I'm making crap up again. Sorry! :blush:
     
    Kazeto and Syphonix like this.
  6. Bohandas

    Bohandas Member

    By "buffs" do you mean just the stuff inside of <buff> tags, or things like targetHitEffectBuff (when it occurs outside of a skill definition) too?
     
    Kazeto likes this.
  7. Syphonix

    Syphonix Member

    targetHitEffectBuff should only happen inside a <buff> or a skill. So you won't use percentage anywhere else but in a skill or a <buff>.

    In skillsDB.xml, you will only ever use "percentage."
    In <buff>s, you will (likely) only use "percentage."

    The thing that connects them both in this usage is the trigger effects that aren't just a vanilla "trigger." For example:

    <targetHitEffectBuff>
    <playerHitEffectBuff>
    <dodgeBuff>
    <blockBuff>

    And so on. SkillsDB.xml will never use <trigger>, so it will never use "percent." <buff>s can technically contain <trigger>s, but they are considered part of the <spell>, not the <buff>.
    If you're using a plain ole' <trigger> then you use "percent." For example:

    <effect type="trigger" spell="Stahp" percent="50"/>
     
    Kazeto likes this.