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
> Question about modifying EVA calculator in script editor
ILoveJesus131
post Jun 3 2011, 10:44 PM
Post #1



Group Icon

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




I want to change the EVA calculation in Game_Actor by calling whatever method gets AGI and modifying it with that. I wanted to know if the base_agi method in Game_Actor gets the current AGI you can find on a character's status screen, or does it return only the lowest possible AGI you can get at that lvl from the paramaters growth chart. If the latter can someone tell me what method to use to return a player's current parameters individually?

Also, I would like to modify HIt Rate with agility in Game_Actor. Can someone explain to me this section of Game_actor so I can make this possible.

CODE
#--------------------------------------------------------------------------
# * Get Hit Rate
#--------------------------------------------------------------------------
def hit
if two_swords_style
n1 = weapons[0] == nil ? 95 : weapons[0].hit
n2 = weapons[1] == nil ? 95 : weapons[1].hit
n = [n1, n2].min
else
n = weapons[0] == nil ? 95 : weapons[0].hit
end
return n
end


Thanks.
Go to the top of the page
 
+Quote Post
   
Atiebatie99
post Jun 4 2011, 07:01 AM
Post #2



Group Icon

Group: Member
Posts: 1
Type: Scripter
RM Skill: Skilled




If you wanna know the current AGI you can use this:
CODE
$game_party.members[ACTOR_ID].agi

See, I didn't knew this way to recieve the current agi, but when I looked to Scene_Status and Window_Status and Window_Base I received this way to know the current AGI wink.gif
The only thing is, that I'm not sure it was one of your requests xD

The answer on your other request (also not sure if I understood it good tongue.gif) is this:
CODE
#--------------------------------------------------------------------------
  # * Get Hit Rate
  #--------------------------------------------------------------------------
  def hit
    if two_swords_style                                                      # If two swords style is enabled.
      n1 = weapons[0] == nil ? 95 : weapons[0].hit              # n1 = 95 : weapons from player : weapons from
      n2 = weapons[1] == nil ? 95 : weapons[1].hit              # the databse. The same for n2
      n = [n1, n2].min                                                             # So n = n1, n2 and the .min means that it returns the smallest item
    else                                                                                 # If there's no two sword style
      n = weapons[0] == nil ? 95 : weapons[0].hit                # N = 95 : weapons[0].hit 0 means first .
    end                                                                                  
    return n                                                                           # Return N
  end

I made comments with text in it wink.gif
Hope it helps!
Go to the top of the page
 
+Quote Post
   
ILoveJesus131
post Jun 4 2011, 01:51 PM
Post #3



Group Icon

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




QUOTE (Atiebatie99 @ Jun 4 2011, 07:01 AM) *
If you wanna know the current AGI you can use this:
CODE
$game_party.members[ACTOR_ID].agi

See, I didn't knew this way to recieve the current agi, but when I looked to Scene_Status and Window_Status and Window_Base I received this way to know the current AGI wink.gif
The only thing is, that I'm not sure it was one of your requests xD



It is now something I needed to know. I want to display current EVA percentage in the status window and that command looks like it will help me get that done. I had a hard time trying to call methods from battler and actor from the window classes without messing up heirarchy, but with that public method you gave I shouldn't have a problem. Thank you.

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: 18th June 2013 - 11:23 PM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker