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
> Get status' values changings of skills
cometstar
post May 25 2012, 12:40 PM
Post #1


Level 5
Group Icon

Group: Member
Posts: 60
Type: None
RM Skill: Undisclosed




I want a script ,embedded in battler class, can determine the increment or decrement of staus' values of the battler(like ATK ,STR, INT ....)
caused by skill or item and store every chaning value in a variable in the battler's class
to be able to read it and show it in someway ; either in a window or by using PupUp damage....
this would not be difficult ,but I don't have enought expirence in RGSS.
Go to the top of the page
 
+Quote Post
   
Night_Runner
post May 27 2012, 05:14 AM
Post #2


Level 50
Group Icon

Group: +Gold Member
Posts: 1,520
Type: Scripter
RM Skill: Undisclosed




I was thinking of changing the status screen, so there's a base attack, base pdef, etc, and then there's another column for the final atk, the final pdef etc.

Does that sound okay, or did you want it somewhere else?


__________________________
K.I.S.S.
Want help with your scripting problems? Upload a demo! Or at the very least; provide links to the scripts in question.

Most important guide ever: Newbie's Guide to Switches
Go to the top of the page
 
+Quote Post
   
cometstar
post May 27 2012, 12:39 PM
Post #3


Level 5
Group Icon

Group: Member
Posts: 60
Type: None
RM Skill: Undisclosed




Yes.
It is.
it shows base or current value and next to it shows new value
or it shows only the names of changed value and changing value (either plus or minus)
anyone will be good.

thank you for your replay my many requests
Go to the top of the page
 
+Quote Post
   
Night_Runner
post May 28 2012, 05:08 AM
Post #4


Level 50
Group Icon

Group: +Gold Member
Posts: 1,520
Type: Scripter
RM Skill: Undisclosed




I've implemented the second option, using the plus or minus.
I just thought that it's fairly easy to intuit the information that's being displayed

CODE
#==============================================================================
# ** XP: Night_Runner's Evented Page Conditions
#------------------------------------------------------------------------------
# History:
#  Date Created: 28/May/2012
#  Created for: cometstar
#   @> http://www.rpgrevolution.com/forums/index.php?showtopic=56506
#
# Description:
#  This script allows shows the base stat in the status window, and then the
#  changes to it (by skills, weapons, states, etc)
#
# How to Install:
#  Highlight and copy the entire script.
#  In your game's editor, select Tools >> Script Editor.
#  Along the left hand side scroll to the bottom, right click on on
#  'Main' and select 'Insert'.
#  Paste in the blank window on the right.
#==============================================================================



#==============================================================================
# ** Window_Base
#------------------------------------------------------------------------------
#  Edited to show changes to stats
#==============================================================================

class Window_Base
  #--------------------------------------------------------------------------
  # * Draw Parameter
  #     actor : actor
  #     x     : draw spot x-coordinate
  #     y     : draw spot y-coordinate
  #     type  : parameter type (0-6)
  #--------------------------------------------------------------------------
  def draw_actor_parameter(actor, x, y, type)
    types = ['atk', 'pdef', 'mdef', 'str', 'dex', 'agi', 'int']
    type = types[type]
    name = eval("$data_system.words.#{type}")
    base = eval("actor.base_#{type}")
    bonus = eval("actor.#{type}") - base
    bonus_text = (bonus >= 0 ? " +" : " ") + bonus.to_s
    bonus_text_width = self.contents.text_size(bonus_text).width
    self.contents.font.color = system_color
    self.contents.draw_text(x, y, 120, 32, name)
    self.contents.font.color = normal_color
    wdth = 156 - bonus_text_width
    self.contents.draw_text(x, y, wdth, 32, base.to_s, 2)
    if bonus > 0
      self.contents.font.color = Color.new(255, 0, 0)
    elsif bonus < 0
      self.contents.font.color = Color.new(0, 255, 0)
    end
    self.contents.draw_text(x, y, 156, 32, bonus_text, 2)
  end
end



#==============================================================================
# ** End of Script.
#==============================================================================


But if you prefer I can easily show the current value, with the new value next to it, maybe formatted like
ATK 20 -> 25
Which also gets the message across?
I'll let you decide happy.gif


__________________________
K.I.S.S.
Want help with your scripting problems? Upload a demo! Or at the very least; provide links to the scripts in question.

Most important guide ever: Newbie's Guide to Switches
Go to the top of the page
 
+Quote Post
   
cometstar
post May 28 2012, 01:58 PM
Post #5


Level 5
Group Icon

Group: Member
Posts: 60
Type: None
RM Skill: Undisclosed




Thank you for your pacient on my requests.
This job is good ,I'll try it and hopefully it'll work.
since you made the second way ,then it's well and perfect for my purpose
THANK YOU for your appreciated effort.
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: 19th May 2013 - 06:47 PM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker