Jump to content
New account registrations are disabed. This website is now an archive. Read more here.
Sign in to follow this  
Leon

Atk, Pdef, and Mdef based off of Strength, Dex, and Int.

Recommended Posts

Ok, Wyz requested I make a script that gives you attack, along with physical and magical defense when you have no items equipped. I decided to oblige and write it up (in less than 10 minutes... that's sad...) for him. Anyway, here it is:

 

#===============================================================================
#  Barehands
#  Version: 2.2
#  Dec. 8th, 2009
#-------------------------------------------------------------------------------
#  This script allows you to add to Attack, Phys Defense, and Mag Defense
#  based on the users Strength, Dexterity, and Intellect, respectively.
#
#  Instructions:
#    Just change the modifiers in the module to set them.  1 equals the base
#    stat.
#
#===============================================================================

module Modifier
 Strength = 0.4
 Dexterity = 0.3
 Intellect = 0.3
end


#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
#  * Game_Actor
#~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
class Game_Actor < Game_Battler

 alias leon_wyzstat_gameactor_baseatk base_atk
 alias leon_wyzstat_gameactor_basepdef base_pdef
 alias leon_wyzstat_gameactor_basemdef base_mdef

 def base_atk
   n = leon_wyzstat_gameactor_baseatk
  # if n == 0
     #Multiplies strength by a number.  1 = strength, higher for more atk, lower for less.
     #Use decimals as shown.
     n += $data_actors[@actor_id].parameters[2, @level] * Modifier::Strength 
     n = n.round
     return n
  # else
  #   return n
  # end
 end

 def base_pdef
   n = leon_wyzstat_gameactor_basepdef
  # if n == 0
     #Multiplies dexterity by a number. 1 = dexterity, higher for more Pdef, lower for less.
     #Use decimals as shown.
     n += $data_actors[@actor_id].parameters[3, @level] * Modifier::Dexterity
     n = n.round
     return n
   #else
   #  return n
   #end
 end

 def base_mdef
   n = leon_wyzstat_gameactor_basemdef
   #if n == 0
     #Multiplies intellect by a number.  1 = intellect, higher for more mdef, lower for less.
     #Use decimals as shown.
     n += $data_actors[@actor_id].parameters[5, @level] * Modifier::Intellect 
     n = n.round
     return n
   #else
   #  return n
   #end
 end
end

Share this post


Link to post
Share on other sites

YAY for Leon. I just gave it a run and it works perfect. Thanks alot. :D

Share this post


Link to post
Share on other sites

Grandor, post your idea in the thread where I have for "Need Script Ideas". I am rather interested.

Share this post


Link to post
Share on other sites

Err...this doesn't require SDK does it? I mean...I'm kinda used to scripts nowadays requiring SDK...but as none of my scripts are SDK compatible...I kinda can't use SDK scripts...

Share this post


Link to post
Share on other sites

Well, if you don't have the SDK, then it probably works without it...SDK is a system that Sephirothspawn and a few others made called the "Standard Development Kit" for scripts...it is made so that scripts will all work together...but as 90% of scripts were made before SDK...it is hard to get scripts that work with SDK...not to mention you can't edit the Title screen or anything...so you can't use any scripts that edit those...

Share this post


Link to post
Share on other sites

Well than I'm guessing it don't use SDK than because I sure don't have it lol.

Share this post


Link to post
Share on other sites

-nods- that's what I figured...it has the aliasing like an SDK script, but the SDK log lines aren't in there, so I figured that meant there was no need to have SDK...

Share this post


Link to post
Share on other sites

alias has nothing to do with SDK, to let oyu know. It allows you to edit a method without having to rewrite it.

Share this post


Link to post
Share on other sites

Yeah, I know...just 90% of the scripts I have ever seen with aliasing have SDK as well...so...I tend to question aliasing scripts ^^"

Share this post


Link to post
Share on other sites

That's a pretty good update there. Could come in handy. And it still has my name all over it. :D

Share this post


Link to post
Share on other sites

Script has been updated. The change is instead of being bare-handed to make the stat take over the other stat (ie, being bare handed to use strength for attack) it takes a portion of strength and adds it TO attack.

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...