Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

 
Reply to this topicStart new topic
> YEM - "Shell" Notetag, Possible error with variable definition?
Pillanious
post Feb 16 2012, 01:06 AM
Post #1


Level 8
Group Icon

Group: Revolutionary
Posts: 125
Type: Musician
RM Skill: Beginner




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

This post has been edited by Pillanious: Feb 16 2012, 12:50 PM
Go to the top of the page
 
+Quote Post
   
heisenman
post Feb 16 2012, 01:26 AM
Post #2


Level 13
Group Icon

Group: Revolutionary
Posts: 237
Type: None
RM Skill: Undisclosed




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.


__________________________
Complainers gonna complain
Go to the top of the page
 
+Quote Post
   
Pillanious
post Feb 16 2012, 01:36 AM
Post #3


Level 8
Group Icon

Group: Revolutionary
Posts: 125
Type: Musician
RM Skill: Beginner




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

Go to the top of the page
 
+Quote Post
   
heisenman
post Feb 16 2012, 01:46 AM
Post #4


Level 13
Group Icon

Group: Revolutionary
Posts: 237
Type: None
RM Skill: Undisclosed




Don't those tags works with percentages as well? Something like <res: +50%>?


__________________________
Complainers gonna complain
Go to the top of the page
 
+Quote Post
   
Pillanious
post Feb 16 2012, 01:59 AM
Post #5


Level 8
Group Icon

Group: Revolutionary
Posts: 125
Type: Musician
RM Skill: Beginner




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.
Go to the top of the page
 
+Quote Post
   
heisenman
post Feb 16 2012, 02:20 AM
Post #6


Level 13
Group Icon

Group: Revolutionary
Posts: 237
Type: None
RM Skill: Undisclosed




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?


__________________________
Complainers gonna complain
Go to the top of the page
 
+Quote Post
   
Pillanious
post Feb 16 2012, 02:23 AM
Post #7


Level 8
Group Icon

Group: Revolutionary
Posts: 125
Type: Musician
RM Skill: Beginner




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

This post has been edited by Pillanious: Feb 16 2012, 05:29 AM
Go to the top of the page
 
+Quote Post
   
heisenman
post Feb 16 2012, 06:01 AM
Post #8


Level 13
Group Icon

Group: Revolutionary
Posts: 237
Type: None
RM Skill: Undisclosed




I'm glad you found a solution (:

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

I think there's a little pasting error here.


__________________________
Complainers gonna complain
Go to the top of the page
 
+Quote Post
   
Kread-EX
post Feb 16 2012, 09:06 AM
Post #9


(=___=)/
Group Icon

Group: +Gold Member
Posts: 4,136
Type: Scripter
RM Skill: Undisclosed




Closed as per request.


__________________________
FRACTURE - a SMT inspired game (demo) made by Rhyme, Karsuman and me. Weep and ragequit.

My blog.

Click here for my e-peen


Go to the top of the page
 
+Quote Post
   
Kread-EX
post Feb 16 2012, 12:48 PM
Post #10


(=___=)/
Group Icon

Group: +Gold Member
Posts: 4,136
Type: Scripter
RM Skill: Undisclosed




Re-opened by request.


__________________________
FRACTURE - a SMT inspired game (demo) made by Rhyme, Karsuman and me. Weep and ragequit.

My blog.

Click here for my e-peen


Go to the top of the page
 
+Quote Post
   
Pillanious
post Feb 16 2012, 12:50 PM
Post #11


Level 8
Group Icon

Group: Revolutionary
Posts: 125
Type: Musician
RM Skill: Beginner




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 post has been edited by Pillanious: Feb 16 2012, 12:55 PM
Go to the top of the page
 
+Quote Post
   

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 20th June 2013 - 12:32 AM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker