Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

> 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
   
 
Start new topic
Replies
Kread-EX
post Feb 16 2012, 12:48 PM
Post #2


(=___=)/
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 #3


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: 22nd May 2013 - 09:52 PM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker