Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if true # << Make true to use this script, false to disable.
- #===============================================================================
- #
- # ☆ $D13x - Natures (personalities)
- # -- Author : Dekita
- # -- Version : 1.0
- # -- Level : Easy / Normal
- # -- Requires : N/A
- # -- Engine : RPG Maker VX Ace.
- #
- #===============================================================================
- # ☆ Import
- #-------------------------------------------------------------------------------
- $D13x={}if$D13x==nil
- $D13x[:Natures]=true
- #===============================================================================
- # ☆ Updates
- #-------------------------------------------------------------------------------
- # D /M /Y
- # o3/o4/2o14 - Started && Finished,
- #
- #===============================================================================
- # ☆ Introduction
- #-------------------------------------------------------------------------------
- # This script is to recreate the 'natures' feature from pokemon.
- #
- # The nature can change the stats your actors dramatically, by a percentage
- # rate. Natures are randomly chosen when an actor first joins the party.
- #
- # Obviously, I have included the ability for natures to control any other
- # stat you could have, including all stats created by my other scripts.
- #
- # Additionally, you can change the actors nature using simple script calls. :)
- #
- # Please be aware, this modified param_plus rather than param_base.
- # Therefore, my Stat control / element control etc.. scripts are required.
- #
- # This script was made to fully compliment all other stat modification scripts I
- # have written for the $D13x Engine.
- #
- #===============================================================================
- # ★☆★☆★☆★☆★☆★☆★☆★ TERMS AND CONDITIONS: ☆★☆★☆★☆★☆★☆★☆★☆★☆
- #===============================================================================
- # 1. You MUST give credit to "Dekita" !!
- # 2. You are NOT allowed to repost this script.(or modified versions)
- # 3. You are NOT allowed to convert this script.
- # 4. You are NOT allowed to use this script for Commercial games.
- # 5. ENJOY!
- #
- # "FINE PRINT"
- # By using this script you hereby agree to the above terms and conditions,
- # if any violation of the above terms occurs "legal action" may be taken.
- # Not understanding the above terms and conditions does NOT mean that
- # they do not apply to you.
- # If you wish to discuss the terms and conditions in further detail you can
- # contact me at http://dekitarpg.wordpress.com/
- #
- #===============================================================================
- # ☆ Instructions
- #-------------------------------------------------------------------------------
- # Place Below " ▼ Materials " and Above " ▼ Main " in your script editor.
- #
- #===============================================================================
- # ☆ Script Calls
- #-------------------------------------------------------------------------------
- # ACTOR.reset_all_nature_data
- # ACTOR.change_nature(nature_id)
- # ACTOR.nature[:name]
- # ACTOR.nature[:mods]
- #
- # ACTOR = $game_actors[ACTOR_ID] OR $game_party.members[ID]
- # reset_all_nature_data :
- # Resets nature data and randomly determines new nature from possible list.
- #
- # change_nature(nature_id) :
- # Changes the actors nature to Type[id], providing Type[id] exists.
- #
- # nature[:name] :
- # Returns the name of this actors nature.
- #
- # nature[:mods] :
- # Returns the array of this actors nature modifications.
- # This would require some scripting knowledge to fully use.
- #
- # EXAMPLES::
- # $game_actors[1].change_nature(5)
- # would change actor 1's nature to nature Type[ 5 ]
- #
- # $game_party.leader.nature[:name]
- # would return the name of the party leaders nature.
- #
- #===============================================================================
- # ☆ HELP
- #-------------------------------------------------------------------------------
- # ALL rate's are 1.0 by default. Meaning that the stat will be multiplied
- # by 1.0.
- #
- #===============================================================================
- module Natures ; Type=[]# << DO NOT DELETE
- #===============================================================================
- #-----------------------------------------------------------------------------
- # Vocab
- #-----------------------------------------------------------------------------
- Vocab = 'Personality:'
- #-----------------------------------------------------------------------------
- # Vocab Text Color
- #-----------------------------------------------------------------------------
- Textc = Text_Color::White
- #-----------------------------------------------------------------------------
- # Icon = [icon index, icon hue]
- #-----------------------------------------------------------------------------
- Icon = [63,0]
- #-----------------------------------------------------------------------------
- # [:param , id, rate],
- # [:x_param , id, rate],
- # [:s_param , id, rate],
- # [:atk_ele , id, rate],
- # [:def_ele , id, rate],
- # [:spds_stat , id, rate]
- # [:atk_lvl , rate],
- # [:def_lvl , rate],
- # [:max_tp , rate],
- #-----------------------------------------------------------------------------
- # Adamant
- #-----------------------------------------------------------------------------
- Type[0] = {
- :name => 'Adamant',
- :mods => [
- [:param , 2, 1.1],
- [:param , 4, 0.9],
- ],# << :mods
- }# << Type[id]
- #-----------------------------------------------------------------------------
- # Bashfull
- #-----------------------------------------------------------------------------
- Type[1] = {
- :name => 'Bashfull',
- :mods => [
- ],# << :mods
- }# << Type[id]
- #-----------------------------------------------------------------------------
- # Bold
- #-----------------------------------------------------------------------------
- Type[2] = {
- :name => 'Bold',
- :mods => [
- [:param , 2, 0.9],
- [:param , 3, 1.1],
- ],# << :mods
- }# << Type[id]
- #-----------------------------------------------------------------------------
- # Brave
- #-----------------------------------------------------------------------------
- Type[3] = {
- :name => 'Brave',
- :mods => [
- [:param , 2, 1.1],
- [:param , 6, 0.9],
- ],# << :mods
- }# << Type[id]
- #-----------------------------------------------------------------------------
- # Calm
- #-----------------------------------------------------------------------------
- Type[4] = {
- :name => 'Calm',
- :mods => [
- [:param , 2, 0.9],
- [:param , 5, 1.1],
- ],# << :mods
- }# << Type[id]
- #-----------------------------------------------------------------------------
- # Careful
- #-----------------------------------------------------------------------------
- Type[5] = {
- :name => 'Careful',
- :mods => [
- [:param , 4, 0.9],
- [:param , 5, 1.1],
- ],# << :mods
- }# << Type[id]
- #-----------------------------------------------------------------------------
- # Docile
- #-----------------------------------------------------------------------------
- Type[6] = {
- :name => 'Docile',
- :mods => [
- ],# << :mods
- }# << Type[id]
- #-----------------------------------------------------------------------------
- # Gentle
- #-----------------------------------------------------------------------------
- Type[7] = {
- :name => 'Gentle',
- :mods => [
- [:param , 2, 0.9],
- [:param , 5, 1.1],
- ],# << :mods
- }# << Type[id]
- #-----------------------------------------------------------------------------
- # Hardy
- #-----------------------------------------------------------------------------
- Type[8] = {
- :name => 'Hardy',
- :mods => [
- ],# << :mods
- }# << Type[id]
- #-----------------------------------------------------------------------------
- # Hasty
- #-----------------------------------------------------------------------------
- Type[9] = {
- :name => 'Hasty',
- :mods => [
- [:param , 3, 0.9],
- [:param , 6, 1.1],
- ],# << :mods
- }# << Type[id]
- #-----------------------------------------------------------------------------
- # Impish
- #-----------------------------------------------------------------------------
- Type[10]= {
- :name => 'Impish',
- :mods => [
- [:param , 3, 1.1],
- [:param , 4, 0.9],
- ],# << :mods
- }# << Type[id]
- #-----------------------------------------------------------------------------
- # Jolly
- #-----------------------------------------------------------------------------
- Type[11]= {
- :name => 'Jolly',
- :mods => [
- [:param , 4, 0.9],
- [:param , 6, 1.1],
- ],# << :mods
- }# << Type[id]
- #-----------------------------------------------------------------------------
- # Lax
- #-----------------------------------------------------------------------------
- Type[12]= {
- :name => 'Lax',
- :mods => [
- [:param , 3, 1.1],
- [:param , 5, 0.9],
- ],# << :mods
- }# << Type[id]
- #-----------------------------------------------------------------------------
- # Lonely
- #-----------------------------------------------------------------------------
- Type[13] = {
- :name => 'Lonely',
- :mods => [
- [:param , 2, 1.1],
- [:param , 3, 0.9],
- ],# << :mods
- }# << Type[id]
- #-----------------------------------------------------------------------------
- # Mild
- #-----------------------------------------------------------------------------
- Type[14] = {
- :name => 'Mild',
- :mods => [
- [:param , 3, 0.9],
- [:param , 4, 1.1],
- ],# << :mods
- }# << Type[id]
- #-----------------------------------------------------------------------------
- # Modest
- #-----------------------------------------------------------------------------
- Type[15] = {
- :name => 'Modest',
- :mods => [
- [:param , 2, 0.9],
- [:param , 4, 1.1],
- ],# << :mods
- }# << Type[id]
- #-----------------------------------------------------------------------------
- # Naive
- #-----------------------------------------------------------------------------
- Type[16] = {
- :name => 'Naive',
- :mods => [
- [:param , 5, 0.9],
- [:param , 6, 1.1],
- ],# << :mods
- }# << Type[id]
- #-----------------------------------------------------------------------------
- # Naughty
- #-----------------------------------------------------------------------------
- Type[17] = {
- :name => 'Naughty',
- :mods => [
- [:param , 2, 1.1],
- [:param , 5, 0.9],
- ],# << :mods
- }# << Type[id]
- #-----------------------------------------------------------------------------
- # Quiet
- #-----------------------------------------------------------------------------
- Type[18] = {
- :name => 'Quiet',
- :mods => [
- [:param , 4, 1.1],
- [:param , 6, 0.9],
- ],# << :mods
- }# << Type[id]
- #-----------------------------------------------------------------------------
- # Quirky
- #-----------------------------------------------------------------------------
- Type[19] = {
- :name => 'Quirky',
- :mods => [
- ],# << :mods
- }# << Type[id]
- #-----------------------------------------------------------------------------
- # Rash
- #-----------------------------------------------------------------------------
- Type[20]= {
- :name => 'Rash',
- :mods => [
- [:param , 4, 1.1],
- [:param , 5, 0.9],
- ],# << :mods
- }# << Type[id]
- #-----------------------------------------------------------------------------
- # Relaxed
- #-----------------------------------------------------------------------------
- Type[21] = {
- :name => 'Relaxed',
- :mods => [
- [:param , 3, 1.1],
- [:param , 6, 0.9],
- ],# << :mods
- }# << Type[id]
- #-----------------------------------------------------------------------------
- # Sassy
- #-----------------------------------------------------------------------------
- Type[22]= {
- :name => 'Sassy',
- :mods => [
- [:param , 5, 1.1],
- [:param , 6, 0.9],
- ],# << :mods
- }# << Type[id]
- #-----------------------------------------------------------------------------
- # Serious
- #-----------------------------------------------------------------------------
- Type[23]= {
- :name => 'Serious',
- :mods => [
- ],# << :mods
- }# << Type[id]
- #-----------------------------------------------------------------------------
- # Timid
- #-----------------------------------------------------------------------------
- Type[24] = {
- :name => 'Timid',
- :mods => [
- [:param , 2, 0.9],
- [:param , 6, 1.1],
- ],# << :mods
- }# << Type[id]
- #####################
- # CUSTOMISATION END #
- end #####################
- #☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★#
- # #
- # http://dekitarpg.wordpress.com/ #
- # #
- #★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆#
- #===============================================================================#
- # ARE YOU MODIFYING BEYOND THIS POINT? \.\. #
- # YES?\.\. #
- # OMG, REALLY? \| #
- # WELL SLAP MY FACE AND CALL ME A DRAGONITE.\..\.. #
- # I REALLY DIDN'T THINK YOU HAD IT IN YOU.\..\.. #
- #===============================================================================#
- module Vocanicon
- #===============================================================================
- #-----------------------------------------------------------------------------
- # Format = ["Name:" , Text_Color::White, icon, hue]
- #-----------------------------------------------------------------------------
- Nature = [Natures::Vocab,Natures::Textc,Natures::Icon[0],Natures::Icon[1]]
- end
- #===============================================================================
- class Game_Actor < Game_Battler
- #===============================================================================
- #-----------------------------------------------------------------------------
- #
- #-----------------------------------------------------------------------------
- alias :setup_natures :setup
- alias :parp_natures :param_plus
- alias :xpar_natures :xparam_plus if $D13x[:Stats_Control]
- alias :spar_natures :sparam_plus if $D13x[:Stats_Control]
- alias :atke_natures :atk_ele_plus if $D13x[:Elems_Control]
- alias :defe_natures :def_ele_plus if $D13x[:Elems_Control]
- alias :atdf_natures :atl_dfl_plus if $D13x[:Atk_Def_Lvs]
- alias :spds_natures :spds_plus if $D13x[:ISPDS]
- alias :max_tp_plusn :max_tp_plus if $D13x[:TP_Control]
- #-----------------------------------------------------------------------------
- #
- #-----------------------------------------------------------------------------
- attr_accessor :nature
- #-----------------------------------------------------------------------------
- #
- #-----------------------------------------------------------------------------
- def setup(actor_id)
- reset_all_nature_data
- setup_natures(actor_id)
- end
- #-----------------------------------------------------------------------------
- #
- #-----------------------------------------------------------------------------
- def reset_all_nature_data
- setup_nature_data
- setup_nature_stat_mods
- set_nature_bonuses
- end
- #-----------------------------------------------------------------------------
- #
- #-----------------------------------------------------------------------------
- def setup_nature_data
- @nature = setup_random_nature
- end
- #-----------------------------------------------------------------------------
- #
- #-----------------------------------------------------------------------------
- def setup_random_nature
- modu = Natures::Type
- modu[rand modu.size]
- end
- #-----------------------------------------------------------------------------
- #
- #-----------------------------------------------------------------------------
- def setup_nature_stat_mods
- @nature_atl_dfl = [1.0] * 2
- @nature_param = [1.0] * 8
- @nature_xparam = [1.0] * 10
- @nature_sparam = [1.0] * 10
- @nature_atk_ele = [1.0] * $data_system.elements.size
- @nature_def_ele = [1.0] * $data_system.elements.size
- @nature_spds_stats = [1.0] * 8
- @nature_spds_stats = [1.0] * SPDS::Commands.size if $D13x[:ISPDS]
- @nature_max_tp = 1.0
- end
- #-----------------------------------------------------------------------------
- #
- #-----------------------------------------------------------------------------
- def change_nature(id)
- modu = Natures::Type[id]
- return unless modu
- @nature = modu
- setup_nature_stat_mods
- set_nature_bonuses
- end
- #-----------------------------------------------------------------------------
- # Get Added Value of Parameter
- #-----------------------------------------------------------------------------
- def param_plus(param_id)
- parp_natures(param_id) * @nature_param[param_id]
- end
- if $D13x[:Stats_Control]
- #---------------------------------------------------------------------------
- # Get Added Value of x-Parameter
- #---------------------------------------------------------------------------
- def xparam_plus(xparam_id)
- xpar_natures(xparam_id) * @nature_xparam[xparam_id]
- end
- #---------------------------------------------------------------------------
- # Get Added Value of s-Parameter
- #---------------------------------------------------------------------------
- def sparam_plus(sparam_id)
- spar_natures(sparam_id) * @nature_sparam[sparam_id]
- end
- end # if $D13x[:Stats_Control]
- if $D13x[:Elems_Control]
- #---------------------------------------------------------------------------
- # Get Added Value of def-Element
- #---------------------------------------------------------------------------
- def def_ele_plus(element_id)
- defe_natures(element_id) * @nature_def_ele[element_id]
- end
- #---------------------------------------------------------------------------
- # Get Added Value of atk-Element
- #---------------------------------------------------------------------------
- def atk_ele_plus(element_id)
- atke_natures(element_id) * @nature_atk_ele[element_id]
- end
- end # if $D13x[:Elems_Control]
- if $D13x[:Atk_Def_Lvs]
- #---------------------------------------------------------------------------
- # Atk Lv | Def Lv ++
- #---------------------------------------------------------------------------
- def atl_dfl_plus(id)
- atdf_natures(id) * @nature_atl_dfl[id]
- end
- end # if $D13x[:Atk_Def_Lvs]
- if $D13x[:ISPDS]
- #---------------------------------------------------------------------------
- # Get SPDS Stats Plus
- #---------------------------------------------------------------------------
- def spds_plus(id)
- spds_natures(id) * @nature_spds_stats[id]
- end
- end # if $D13x[:ISPDS]
- if $D13x[:TP_Control]
- #---------------------------------------------------------------------------
- # Atk Lv | Def Lv ++
- #---------------------------------------------------------------------------
- def max_tp_plus
- (max_tp_plusn * @nature_max_tp).to_i
- end
- end # if $D13x[:TP_Control]
- #-----------------------------------------------------------------------------
- # Set Nature Bonuses
- #-----------------------------------------------------------------------------
- def set_nature_bonuses
- @nature[:mods].each do |i|
- case i[0]
- when :param then @nature_param [i[1]] = i[2] if $D13x[:Stats_Control]
- when :x_param then @nature_xparam [i[1]] = i[2] if $D13x[:Stats_Control]
- when :s_param then @nature_sparam [i[1]] = i[2] if $D13x[:Stats_Control]
- when :atk_ele then @nature_atk_ele[i[1]] = i[2] if $D13x[:Elems_Control]
- when :def_ele then @nature_def_ele[i[1]] = i[2] if $D13x[:Elems_Control]
- when :atk_lvl then @nature_atl_dfl[0] = i[1] if $D13x[:Atk_Def_Lvs]
- when :def_lvl then @nature_atl_dfl[1] = i[1] if $D13x[:Atk_Def_Lvs]
- when :spds_stat then @nature_spds_stats[i[1]] = i[2] if $D13x[:ISPDS]
- when :max_tp then @nature_max_tp = i[1] if $D13x[:TP_Control]
- end
- end
- end
- end
- #==============================================================================#
- # http://dekitarpg.wordpress.com/ #
- #==============================================================================#
- end # if true # << Make true to use this script, false to disable.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement