じ☆ve冰风 发表于 2026-7-24 13:20:49

Weaponless Aktor XP

Weaponless Aktor XP

by Kyonides​

Introduction

Perhaps you didn't notice it before but RMXP has no default ATK or PDEF or MDEF or EVA value for actors.
You're supposed to equip a weapon or some piece of armor in order to get those badly needed points.
Well, not anymore!

Now you can set an initial value and even change it during gameplay!


The Script

Please read the comments embedded in the script.

                Ruby:       
# * Weaponless Aktor XP * #
# * Weaponless & Armorless Actor's Base Stats for XP * #
#   Scripter : Kyonides Arkanthes
#   2024-01-02

# * How to Configure the Script * #

# If you want to set Aluxes's or Basil's Base ATK to any value other than zero,
# go type something like this:

# ATK= { 1 => 5, 2 => 4, etc. }

# Aluxes' ID is 1 and Basil's is 2.
# It is the same procedure for any of the 4 weaponless stats.

# * How to Set a Default Value * #

# Let us say that you want to set a different Base ATK value for anybody else
# other than Aluxes and Basil. Then type anything like the following line:

# ATK.default = 2

# This means that Gloria and Hilda would get 3 ATK points even if they forgot
# to bring any staff or rod with them!

# * Other Script Calls * #

# - Step 1: Find an Actor - 2 Methods
# actor = $game_actors
# actor = $game_party.actors

# - Step 2: Change any of his or her initial stats:
# actor.init_atk += 10
# actor.init_pdef += 10
# actor.init_mdef += 10
# actor.init_eva += 10

module WeaponlessAktor
ATK= { 1 => 5 }
PDEF = { 1 => 5 }
MDEF = { 1 => 5 }
EVA= { 1 => 5 }
ATK.default = 0
PDEF.default = 0
MDEF.default = 0
EVA.default = 0
end

class Game_Actor
alias :kyon_gm_act_base_stats_setup :setup
alias :kyon_gm_act_base_stats_base_atk :base_atk
alias :kyon_gm_act_base_stats_base_pdef :base_pdef
alias :kyon_gm_act_base_stats_base_mdef :base_mdef
alias :kyon_gm_act_base_stats_base_eva :base_eva
def setup(actor_id)
    @init_atk= WeaponlessAktor::ATK
    @init_pdef = WeaponlessAktor::PDEF
    @init_mdef = WeaponlessAktor::MDEF
    @init_eva= WeaponlessAktor::EVA
    kyon_gm_act_base_stats_setup(actor_id)
end

def base_atk
    kyon_gm_act_base_stats_base_atk + @init_atk
end

def base_pdef
    kyon_gm_act_base_stats_base_pdef + @init_pdef
end

def base_mdef
    kyon_gm_act_base_stats_base_mdef + @init_mdef
end

def base_eva
    kyon_gm_act_base_stats_base_eva + @init_eva
end
attr_accessor :init_atk, :init_pdef, :init_mdef, :init_eva
end


Terms & Conditions

Free for use in ANY game.
Due credit is mandatory.
That's it!



本贴来自国际rpgmaker官方论坛作者:kyonides处,因国际论坛即将永久关站,为了存档多年珍贵资料,署名转载到本论坛存档,由于官方帖子为英文原帖,需要中文翻译请点击论坛顶部切换语言为中文就可以将帖子翻译成中文浏览,方便大家随时查看,原文地址:https://forums.rpgmakerweb.com/threads/weaponless-aktor-xp.164386/
页: [1]
查看完整版本: Weaponless Aktor XP