Help - Search - Members - Calendar
Full Version: YEM - "Shell" Notetag
RPG RPG Revolution Forums > Scripting > Script Development and Support
Pillanious
I was playing around with the tags a little bit, and I've apparently been misreading the <hp dmg taken: x%> and <mp dmg taken x%> tags. I assumed the latter meant "if damage taken is as a result of mp being used, modify it by x percent" - however, it seems that said tag is actually referring to damage done to the target's MP.


I'm wondering if anyone's aware of a tag to simply reduce damage done via. magic, and not just HP damage in general? It seems like it should be extremely obvious, but I haven't stumbled across it as of yet.


Any help would be greatly appreciated. smile.gif

To clarify - What I'm trying to create is a "Shell" sort of spell, that reduces magic damage taken by 50% - as well as a 'protect' sort of spell that reduces physical damage taken by 50%.

It seems like I'll need a separate tag for both smile.gif
heisenman
QUOTE
I'm wondering if anyone's aware of a tag to simply reduce damage done via. magic, and not just HP damage in general? It seems like it should be extremely obvious, but I haven't stumbled across it as of yet.

Use Resistance tags, no?
<res: +25>

QUOTE
To clarify - What I'm trying to create is a "Shell" sort of spell

Mmh Shell is a status not a spell, so put the tag in the status' notebox, not the skill's.
Pillanious
QUOTE (heisenman @ Feb 16 2012, 04:26 AM) *
QUOTE
I'm wondering if anyone's aware of a tag to simply reduce damage done via. magic, and not just HP damage in general? It seems like it should be extremely obvious, but I haven't stumbled across it as of yet.

Use Resistance tags, no?
<res: +25>

QUOTE
To clarify - What I'm trying to create is a "Shell" sort of spell

Mmh Shell is a status not a spell, so put the tag in the status' notebox, not the skill's.



Ahh, my fault for mis-explaining - apparently the fatigue is catching up with me.

I did place the tag in the status notebox - and <res: +25> doesn't quite do what I want it to.

Essentially I'm wanting to reduce all magical damage by 50% with one spell (shell) and all physical with another (protect). So a tag such as (for example) <physical dmg: -50%> and <magical dmg: -50%> would come to mind. Of course, I'm not exactly sure how to add such a tag - and therein lies the problem. Boosting the RES stat by 25 isn't a 25% reduction when some characters have, say, 90 RES - and others have 250. smile.gif

heisenman
Don't those tags works with percentages as well? Something like <res: +50%>?
Pillanious
QUOTE (heisenman @ Feb 16 2012, 04:46 AM) *
Don't those tags works with percentages as well? Something like <res: +50%>?


Aye, they do - but that poses two other problems.

For example: Let's say you deal 350 damage with a spell to a monster with ~480 Res.

Increasing that RES by 50% does not decrease the damage by 50%, as resistance follows a similar formula to atk/def (4*atk - 2*def = dmg) (2*spi - 1*res = dmg).

Therefore (citing another example) (2*125) - (1*62) = 188, but if we bolstered that res by 50%... we'd have (in essence) (2*125) - (1.5*62) = 157 - which is not anywhere near a 50% damage reduction.


This also poses a problem when the target reaches 999 RES. Because that's the stat cap, once you exceed a certain base RES, the spell becomes completely worthless - As well, if the status boosts the target's res too high, it causes all magical damage to be nullified: which isn't something I want to happen sad.gif

I suppose another option would be to change the formula so that res caps at 100, and each point of res is a strict 1% damage reduction... but I think there has to be a simpler way to do things.
heisenman
Mmh you're right, I misunderstood your request :/
I don't have VX at the moment I don't remember if there were other tags to specifically affect incoming magic damage...

I think giving magic skills a neutral magic element and then setting the state to decrease the damage dealt by that element might be an inelegant solution?
Pillanious
Created my own melody tag that seems to work perfectly.

I attached it below for anyone else that wants it - and I'll throw it into the script submissions forum as well biggrin.gif

CODE
     #------------------------------------------------------------------------
      #<react effect: <(string) shell x%>
      # - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - -
      #This causes <stat> damage to be reduced to X percent
      #---Example --- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
      #<react effect: spi shell 50%>
      #<react effect: atk shell 50%>
      #-----------------------------------------------------------------------
      when /(.*)[ ]SHELL[ ](\d+)([%ï¼…])/i
         percent = $2.to_i
          case $1.upcase
          when "ATK"; if atkstat = atk
                      @hp_damage = @hp_damage * percent / 100
                      end
          when "SPI"; if atkstat = spi
                      @hp_damage = @hp_damage * percent / 100
                      end
          when "RES"
            next unless $imported["RES Stat"]
                      if atkstat = res
                      @hp_damage = @hp_damage * percent / 100
                      end
          when "DEX"
            next unless $imported["RES Stat"]
                      if atkstat = dex
                      @hp_damage = @hp_damage * percent / 100
                      end
          when "AGI"; if atkstat = agi
                      @hp_damage = @hp_damage * percent / 100
                      end
          else; next
          end
          damage = @hp_damage



The only state for which I couldn't get it to work was DEF. Gave me a syntax error whenever I tried using "if atkstat = def". All-in-all, though, I'm pretty happy I figured it out biggrin.gif

~ This is solved, by the way - so please feel free to close it at will smile.gif
heisenman
I'm glad you found a solution (:

CODE
when /(.*)[ ]SHELL[ ](\d+)([%��…])/i

I think there's a little pasting error here.
Kread-EX
Closed as per request.
Kread-EX
Re-opened by request.
Pillanious
QUOTE (Kread-EX @ Feb 16 2012, 03:48 PM) *
Re-opened by request.


Thank you, Kread!

CODE
#------------------------------------------------------------------------
#<react effect: <phrase shell x%>
# - - - - - - - - - - - - - - - - - - - - - - - - - - - -- - - - - - - -
#This causes SPI damage to be reduced to X percent.
#---Example --- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
#<react effect: spi shell 50%>
#<react effect: atk shell 80%>
#-----------------------------------------------------------------------
when /(.*)[ ]SHELL[ ](\d+)([%%])/i
percent = $2.to_i
case $1.upcase
when "ATK"; if atkstat = atk
@hp_damage = @hp_damage * percent / 100
end
when "SPI"; if atkstat = spi
@hp_damage = @hp_damage * percent / 100
end
when "RES"
next unless $imported["RES Stat"]
if atkstat = res
@hp_damage = @hp_damage * percent / 100
end
when "DEX"
next unless $imported["RES Stat"]
if atkstat = dex
@hp_damage = @hp_damage * percent / 100
end
when "AGI"; if atkstat = agi
@hp_damage = @hp_damage * percent / 100
end
else; next
end
damage = @hp_damage


Above is the notetag on which I've been working so far.

The tag works - except that regardless of the method by which the damage is dealt, it's reducing it by the percentage selected.

It's basically ignoring the (for example) "when "SPI"; if atkstat = spi" statement.

Does anyone have any suggestions, perhaps? I'd assume there's a different string required to define the stat used by the incoming attack that I'm not aware of smile.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2013 Invision Power Services, Inc.