Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

> Poison Damage Help, Simple Code Change, Just Seeking Guidance and Help
amerk
post Apr 2 2012, 09:23 PM
Post #1


Level 56
Group Icon

Group: Global Mod
Posts: 1,784
Type: None
RM Skill: Undisclosed
Rev Points: 15




This would seem like such a small thing, but I haven't had much luck in finding this out. Also, I'm sure there are scripts that can do what I'd like, but it would seem like a waste for such a small snippet of code if I don't plan to implement the other features of the script. Plus, adding in a snippet (or changing the default script within my own project, not the RTP) would get me more into understanding a bit how scripts work.

Okay, with that said, what I am trying to do is alter the amount of damage you receive with the poison state. Simple enough, I know, but completely lost on a guy who doesn't understand scripting.

What I want is for damage to take 1 HP off per step while on the field (outside of battle) for the actors who have the Poison State applied. In battle, I want 20% damage applied for each turn that an actor has the Poison State applied, which I think will create a bit more urgency for a player to apply a heal as opposed as to just waiting it out.

Now, I think I can solve the latter (in battle) issue. If I'm not mistaken I look for this snippet of code.


def slip_damage_effect
if slip_damage? and @hp > 0
@hp_damage = apply_variance(maxhp / 10, 10)
@hp_damage = @hp - 1 if @hp_damage >= @hp
self.hp -= @hp_damage
end
end
end


And change the 3rd line to

@hp_damage = apply_variance(maxhp / 20, 10)

However, outside of battle, I believe it takes 10 HP for each step that Poison State is applied, and I don't know where to change that so it's just 1 per step.

Also, backing up to my percentage change for in battle, I'm guessing the number 10 on the right side of the comma is the variance. I know (to some degree) how variance works, what I don't know is if that variance is in percentages (10% variance) or in HP (10 HP variance). If it's in percentages, I'll leave it alone, but if it's a variance of actual HP, I may want to boost that up as well to say around 50 HP.


__________________________
Go to the top of the page
 
+Quote Post
   

Posts in this topic


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: 25th May 2013 - 10:57 PM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker