Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

More .net Scripts

Seeing as it's up and I don't know when it will next go down I'm getting all the scripts that I can find that I bookmarked and posting them here. If anyone doesn't want me to post a certain script I'll delete it from my post.

Credit: Ccoa

Look for this method in Game_Actor:
Code:
#--------------------------------------------------------------------------
# * Change EXP
# exp : new EXP
#--------------------------------------------------------------------------
def exp=(exp)
@exp = [[exp, 9999999].min, 0].max
# Level up
while @exp >= @exp_list[@level+1] and @exp_list[@level+1] > 0
@level += 1
# Learn skill
for j in $data_classes[@class_id].learnings
if j.level == @level
learn_skill(j.skill_id)
end
end
end
# Level down
while @exp < @exp_list[@level]
@level -= 1
end
# Correction if exceeding current max HP and max SP
@hp = [@hp, self.maxhp].min
@sp = [@sp, self.maxsp].min
end

Change it to look like this:
Code:
#--------------------------------------------------------------------------
# * Change EXP
# exp : new EXP
#--------------------------------------------------------------------------
def exp=(exp)
@exp = [[exp, 9999999].min, 0].max
# Level up
while @exp >= @exp_list[@level+1] and @exp_list[@level+1] > 0
@level += 1
# Learn skill
for j in $data_classes[@class_id].learnings
if j.level == @level
learn_skill(j.skill_id)
end
end
# heal
@hp = self.maxhp
@sp = self.maxsp
end
# Level down
while @exp < @exp_list[@level]
@level -= 1
end
# Correction if exceeding current max HP and max SP
@hp = [@hp, self.maxhp].min
@sp = [@sp, self.maxsp].min
end

Credit: Wingard (for finding it)

Code:
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
#_/  ◆限界突破 - KGC_LimitBreak◆
#_/----------------------------------------------------------------------------
#_/ 各種設定値の上限を変更します。
#_/ (とんでもない値を設定するとバグる可・#092;性・り)
#_/============================================================================
#_/ ≪クラス設定詳細化[ClassDetailSetting]≫より上
#_/ ≪装備拡張[EquipExtension]≫より下
#_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/

#==============================================================================
# ★ カスタマイズ項目 ★
#==============================================================================

module KGC
# ◆・#092;力値補正値(百分率)
# ・#092;力値がデータベースの設定値の○%になる。
# (上限値が高い場合に使用。データベースの値を使う場合は 100)
LB_MAXHP_REVISE = 430 # MAXHP
LB_MAXSP_REVISE = 210 # MAXSP
LB_STR_REVISE = 100 # 腕力
LB_DEX_REVISE = 100 # 器用さ
LB_AGI_REVISE = 100 # 素早さ
LB_INT_REVISE = 100 # 魔力

# ◆ダメージ値補正
# MAXHP補正値に応じてダメージ値を自動調整する。
# (ダメージ量がおかしいときは false)
LB_DAMAGE_CORRECT = true

# ◆敵のHP上限
LB_ENEMY_HP_LIMIT = 9999999
# ◆敵のSP上限
LB_ENEMY_SP_LIMIT = 99999
# ◆敵の「腕力, 器用さ, 素早さ, 魔力」上限
LB_ENEMY_ETC_LIMIT = 9999

# ◆アクターのレベル上限
# アクターID順に配列に格納(最初は nil)
LB_ACTOR_LV_LIMIT = [nil]
# ◆上限未指定アクターのレベル上限
# 上限未指定(nil)のアクターはこの値を使用。
LB_ACTOR_LV_LIMIT_DEFAULT = 512
# ◆アクターの経験値上限
LB_ACTOR_EXP_LIMIT = 9999999999
# ◆アクターのHP上限
LB_ACTOR_HP_LIMIT = 99999
# ◆アクターのSP上限
LB_ACTOR_SP_LIMIT = 99999
# ◆アクターの「腕力, 器用さ, 素早さ, 魔力」上限
LB_ACTOR_ETC_LIMIT = 9999

# ◆レベル 100 以降の・#092;力値計算式
# 【lv…現レベル p[x]…レベルxの・#092;力値】
# この計算結果をレベル 99 の・#092;力値に加算。
LB_ACTOR_LV100_CALC = "(p[2] - p[1]) * (lv - 99)"

# ◆所持金上限
LB_GOLD_LIMIT = 99999999
# ◆アイテム所持数上限
LB_ITEM_LIMIT = 99
end

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

$imported = {} if $imported == nil
$imported["LimitBreak"] = true

if $game_special_elements == nil
$game_special_elements = {}
$data_system = load_data("Data/System.rxdata")
end

module LimitBreak
#--------------------------------------------------------------------------
# ● ・#092;力値補正済みバトラー取得
#--------------------------------------------------------------------------
def self.get_revised_battler(battler)
bt = battler.clone
hp_limit = battler.is_a?(RPG::Enemy) ?
KGC::LB_ENEMY_HP_LIMIT : KGC::LB_ACTOR_HP_LIMIT
sp_limit = battler.is_a?(RPG::Enemy) ?
KGC::LB_ENEMY_SP_LIMIT : KGC::LB_ACTOR_SP_LIMIT
etc_limit = battler.is_a?(RPG::Enemy) ?
KGC::LB_ENEMY_ETC_LIMIT : KGC::LB_ACTOR_ETC_LIMIT
bt.maxhp = [bt.maxhp * KGC::LB_MAXHP_REVISE / 100, hp_limit].min
bt.maxsp = [bt.maxsp * KGC::LB_MAXSP_REVISE / 100, sp_limit].min
bt.str = [bt.str * KGC::LB_STR_REVISE / 100, etc_limit].min
bt.dex = [bt.dex * KGC::LB_DEX_REVISE / 100, etc_limit].min
bt.agi = [bt.agi * KGC::LB_AGI_REVISE / 100, etc_limit].min
bt.int = [bt.int * KGC::LB_INT_REVISE / 100, etc_limit].min
return bt
end
end

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

#==============================================================================
# ■ Game_Battler (分割定・#96; 1)
#==============================================================================

class Game_Battler
#--------------------------------------------------------------------------
# ● MaxHP の取得
#--------------------------------------------------------------------------
def maxhp
n = [[base_maxhp + @maxhp_plus, 1].max, KGC::LB_ENEMY_HP_LIMIT].min
@states.each { |i| n *= $data_states[i].maxhp_rate / 100.0 }
n = [[Integer(n), 1].max, KGC::LB_ENEMY_HP_LIMIT].min
return n
end
#--------------------------------------------------------------------------
# ● MaxSP の取得
#--------------------------------------------------------------------------
def maxsp
n = [[base_maxsp + @maxsp_plus, 0].max, KGC::LB_ENEMY_SP_LIMIT].min
@states.each { |i| n *= $data_states[i].maxsp_rate / 100.0 }
n = [[Integer(n), 1].max, KGC::LB_ENEMY_SP_LIMIT].min
return n
end
#--------------------------------------------------------------------------
# ● 腕力の取得
#--------------------------------------------------------------------------
def str
n = [[base_str + @str_plus, 1].max, KGC::LB_ENEMY_ETC_LIMIT].min
@states.each { |i| n *= $data_states[i].str_rate / 100.0 }
n = [[Integer(n), 1].max, KGC::LB_ENEMY_ETC_LIMIT].min
return n
end
#--------------------------------------------------------------------------
# ● 器用さの取得
#--------------------------------------------------------------------------
def dex
n = [[base_dex + @dex_plus, 1].max, KGC::LB_ENEMY_ETC_LIMIT].min
@states.each { |i| n *= $data_states[i].dex_rate / 100.0 }
n = [[Integer(n), 1].max, KGC::LB_ENEMY_ETC_LIMIT].min
return n
end
#--------------------------------------------------------------------------
# ● 素早さの取得
#--------------------------------------------------------------------------
def agi
n = [[base_agi + @agi_plus, 1].max, KGC::LB_ENEMY_ETC_LIMIT].min
@states.each { |i| n *= $data_states[i].agi_rate / 100.0 }
n = [[Integer(n), 1].max, KGC::LB_ENEMY_ETC_LIMIT].min
return n
end
#--------------------------------------------------------------------------
# ● 魔力の取得
#--------------------------------------------------------------------------
def int
n = [[base_int + @int_plus, 1].max, KGC::LB_ENEMY_ETC_LIMIT].min
@states.each { |i| n *= $data_states[i].int_rate / 100.0 }
n = [[Integer(n), 1].max, KGC::LB_ENEMY_ETC_LIMIT].min
return n
end
#--------------------------------------------------------------------------
# ● MaxHP の設定
# maxhp : 新しい MaxHP
#--------------------------------------------------------------------------
def maxhp=(maxhp)
@maxhp_plus += maxhp - self.maxhp
@maxhp_plus = [[@maxhp_plus, -KGC::LB_ENEMY_HP_LIMIT].max, KGC::LB_ENEMY_HP_LIMIT].min
@hp = [@hp, self.maxhp].min
end
#--------------------------------------------------------------------------
# ● MaxSP の設定
# maxsp : 新しい MaxSP
#--------------------------------------------------------------------------
def maxsp=(maxsp)
@maxsp_plus += maxsp - self.maxsp
@maxsp_plus = [[@maxsp_plus, -KGC::LB_ENEMY_SP_LIMIT].max, KGC::LB_ENEMY_SP_LIMIT].min
@sp = [@sp, self.maxsp].min
end
#--------------------------------------------------------------------------
# ● 腕力の設定
# str : 新しい腕力
#--------------------------------------------------------------------------
def str=(str)
@str_plus += str - self.str
@str_plus = [[@str_plus, -KGC::LB_ENEMY_ETC_LIMIT].max, KGC::LB_ENEMY_ETC_LIMIT].min
end
#--------------------------------------------------------------------------
# ● 器用さの設定
# dex : 新しい器用さ
#--------------------------------------------------------------------------
def dex=(dex)
@dex_plus += dex - self.dex
@dex_plus = [[@dex_plus, -KGC::LB_ENEMY_ETC_LIMIT].max, KGC::LB_ENEMY_ETC_LIMIT].min
end
#--------------------------------------------------------------------------
# ● 素早さの設定
# agi : 新しい素早さ
#--------------------------------------------------------------------------
def agi=(agi)
@agi_plus += agi - self.agi
@agi_plus = [[@agi_plus, -KGC::LB_ENEMY_ETC_LIMIT].max, KGC::LB_ENEMY_ETC_LIMIT].min
end
#--------------------------------------------------------------------------
# ● 魔力の設定
# int : 新しい魔力
#--------------------------------------------------------------------------
def int=(int)
@int_plus += int - self.int
@int_plus = [[@int_plus, -KGC::LB_ENEMY_ETC_LIMIT].max, KGC::LB_ENEMY_ETC_LIMIT].min
end
end

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

#==============================================================================
# ■ Game_Battler (分割定・#96; 3)
#==============================================================================

class Game_Battler
#--------------------------------------------------------------------------
# ● 通常攻撃の効果適用
#--------------------------------------------------------------------------
alias attack_effect_KGC_LimitBreak attack_effect
def attack_effect(attacker)
# 元のHPを保存
last_hp = self.hp

# 元の処理を実行
result = attack_effect_KGC_LimitBreak(attacker)

# ダメージを受けた場合
if result && self.damage.is_a?(Numeric) && self.damage > 0
# ダメージ値調整
if KGC::LB_DAMAGE_CORRECT
self.damage = self.damage * KGC::LB_MAXHP_REVISE * 3 / 400
if $imported["BonusGauge"]
self.base_damage = self.base_damage * KGC::LB_MAXHP_REVISE * 3 / 400
end
end
# HP減少処理
self.hp = last_hp
self.hp -= self.damage
end
return result
end
#--------------------------------------------------------------------------
# ● スキルの効果適用
#--------------------------------------------------------------------------
alias skill_effect_KGC_LimitBreak skill_effect
def skill_effect(user, skill)
# 元のHPを保存
last_hp = self.hp

# 元の処理を実行
result = skill_effect_KGC_LimitBreak(user, skill)

# 気力増減属性を持っていない、かつ割合ダメージではない場合
if result && !skill.element_set.include?($game_special_elements["spirit_id"]) &&
($imported["RateDamage"] && KGC.check_damage_rate(skill) == nil) &&
($imported["SPCostAlter"] && KGC.check_sp_rate(skill) == nil)
# ダメージを受けた場合
if self.damage.is_a?(Numeric)
# ダメージ値調整
if KGC::LB_DAMAGE_CORRECT
self.damage = self.damage * KGC::LB_MAXHP_REVISE * 3 / 400
end
self.base_damage = self.damage if $imported["BonusGauge"]
# HP減少処理
self.hp = last_hp
self.hp -= self.damage
end
end
return result
end
end

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

#==============================================================================
# â–  Game_Actor
#==============================================================================

class Game_Actor < Game_Battler
#--------------------------------------------------------------------------
# ● EXP 計算
#--------------------------------------------------------------------------
def make_exp_list
actor = $data_actors[@actor_id]
@exp_list[1] = 0
pow_i = 2.4 + actor.exp_inflation / 100.0
(2..(self.final_level + 1)).each { |i|
if i > self.final_level
@exp_list[i] = 0
else
n = actor.exp_basis * ((i + 3) ** pow_i) / (5 ** pow_i)
@exp_list[i] = @exp_list[i-1] + Integer(n)
end
}
end
#--------------------------------------------------------------------------
# ● EXP の変更
# exp : 新しい EXP
#--------------------------------------------------------------------------
def exp=(exp)
if $imported["ExpGoldIncrease"]
inc_exp = 100
# ステート[経験値○%]判定
self.states.compact.each { |state|
if $data_states[state].name =~ $game_special_states["inc_exp"]
inc_exp *= $1.to_i
inc_exp /= 100
end
}
exp = exp * inc_exp / 100
end
@exp = [[exp, KGC::LB_ACTOR_EXP_LIMIT].min, 0].max
# レベルアップ
while @exp >= @exp_list[@level+1] and @exp_list[@level+1] > 0
@level += 1
# スキル習得
$data_classes[@class_id].learnings.each { |j|
if j.level == @level
learn_skill(j.skill_id)
end
}
end
# レベルダウン
while @exp < @exp_list[@level]
@level -= 1
end
# レベルが 100 以上の場合
if @level >= 100
# レベル 100 以降の・#092;力値を生成
self.restore_parameter
end
# 現在の HP と SP が最大値を超えていたら修正
@hp = [@hp, self.maxhp].min
@sp = [@sp, self.maxsp].min
end
#--------------------------------------------------------------------------
# ● パラメータを再生成
#--------------------------------------------------------------------------
def restore_parameter
return if @level < 100
$data_actors[@actor_id].parameters.resize(6, @level + 1)
(0..5).each { |k|
# ・#092;力値未設定の場合
if $data_actors[@actor_id].parameters[k, @level] == 0
# 該当レベルでの・#092;力値を計算
calc_text = KGC::LB_ACTOR_LV100_CALC
calc_text.gsub!(/lv/i) { "@level" }
calc_text.gsub!(/p\[(\d+)\]/i) { "$data_actors[@actor_id].parameters[k, #{$1.to_i}]" }
n = $data_actors[@actor_id].parameters[k, 99]
n += eval(calc_text)
$data_actors[@actor_id].parameters[k, @level] = [n, 32767].min
end
}
end
#--------------------------------------------------------------------------
# ● MaxHP の取得
#--------------------------------------------------------------------------
def maxhp
n = [[base_maxhp + @maxhp_plus, 1].max, KGC::LB_ACTOR_HP_LIMIT].min
@states.each { |i| n *= $data_states[i].maxhp_rate / 100.0 }
n = [[Integer(n), 1].max, KGC::LB_ACTOR_HP_LIMIT].min
return n
end
#--------------------------------------------------------------------------
# ● 基本 MaxHP の取得
#--------------------------------------------------------------------------
def base_maxhp
restore_parameter if $data_actors[@actor_id].parameters[0, @level] == nil
n = $data_actors[@actor_id].parameters[0, @level]
n *= KGC::LB_MAXHP_REVISE
return n / 100
end
#--------------------------------------------------------------------------
# ● MaxSP の取得
#--------------------------------------------------------------------------
def maxsp
n = [[base_maxsp + @maxsp_plus, 0].max, KGC::LB_ACTOR_SP_LIMIT].min
@states.each { |i| n *= $data_states[i].maxsp_rate / 100.0 }
n = [[Integer(n), 1].max, KGC::LB_ACTOR_SP_LIMIT].min
return n
end
#--------------------------------------------------------------------------
# ● 基本 MaxSP の取得
#--------------------------------------------------------------------------
def base_maxsp
restore_parameter if $data_actors[@actor_id].parameters[1, @level] == nil
n = $data_actors[@actor_id].parameters[1, @level]
n *= KGC::LB_MAXSP_REVISE
return n / 100
end
#--------------------------------------------------------------------------
# ● 基本腕力の取得
#--------------------------------------------------------------------------
alias base_str_KGC_LimitBreak base_str
def base_str
restore_parameter if $data_actors[@actor_id].parameters[2, @level] == nil

if $imported["EquipExtension"]
# 元の処理を実行
n = base_str_KGC_LimitBreak
else
n = $data_actors[@actor_id].parameters[2, @level]
weapon = $data_weapons[@weapon_id]
n += weapon != nil ? weapon.str_plus : 0
(1..4).each { |i|
eval("armor = $data_armors[@armor#{i}_id];".concat(
"n += armor != nil ? armor.str_plus : 0"))
}
end
return [[n * KGC::LB_STR_REVISE / 100, 1].max, KGC::LB_ACTOR_ETC_LIMIT].min
end
#--------------------------------------------------------------------------
# ● 基本器用さの取得
#--------------------------------------------------------------------------
alias base_dex_KGC_LimitBreak base_dex
def base_dex
restore_parameter if $data_actors[@actor_id].parameters[3, @level] == nil

if $imported["EquipExtension"]
# 元の処理を実行
n = base_dex_KGC_LimitBreak
else
n = $data_actors[@actor_id].parameters[3, @level]
weapon = $data_weapons[@weapon_id]
n += weapon != nil ? weapon.dex_plus : 0
(1..4).each { |i|
eval("armor = $data_armors[@armor#{i}_id];".concat(
"n += armor != nil ? armor.dex_plus : 0"))
}
end
return [[n * KGC::LB_DEX_REVISE / 100, 1].max, KGC::LB_ACTOR_ETC_LIMIT].min
end
#--------------------------------------------------------------------------
# ● 基本素早さの取得
#--------------------------------------------------------------------------
alias base_agi_KGC_LimitBreak base_agi
def base_agi
restore_parameter if $data_actors[@actor_id].parameters[4, @level] == nil

if $imported["EquipExtension"]
# 元の処理を実行
n = base_agi_KGC_LimitBreak
else
n = $data_actors[@actor_id].parameters[4, @level]
weapon = $data_weapons[@weapon_id]
n += weapon != nil ? weapon.agi_plus : 0
(1..4).each { |i|
eval("armor = $data_armors[@armor#{i}_id];".concat(
"n += armor != nil ? armor.agi_plus : 0"))
}
end
return [[n * KGC::LB_AGI_REVISE / 100, 1].max, KGC::LB_ACTOR_ETC_LIMIT].min
end
#--------------------------------------------------------------------------
# ● 基本魔力の取得
#--------------------------------------------------------------------------
alias base_int_KGC_LimitBreak base_int
def base_int
restore_parameter if $data_actors[@actor_id].parameters[5, @level] == nil

if $imported["EquipExtension"]
# 元の処理を実行
n = base_int_KGC_LimitBreak
else
n = $data_actors[@actor_id].parameters[5, @level]
weapon = $data_weapons[@weapon_id]
n += weapon != nil ? weapon.int_plus : 0
(1..4).each { |i|
eval("armor = $data_armors[@armor#{i}_id];".concat(
"n += armor != nil ? armor.int_plus : 0"))
}
end
return [[n * KGC::LB_INT_REVISE / 100, 1].max, KGC::LB_ACTOR_ETC_LIMIT].min
end
#--------------------------------------------------------------------------
# ● レベルの変更
# level : 新しいレベル
#--------------------------------------------------------------------------
def level=(level)
# 上下限・#96;ェック
level = [[level, self.final_level].min, 1].max
# EXP を変更
self.exp = @exp_list[level]
end
#--------------------------------------------------------------------------
# ● 最終レベルの取得
#--------------------------------------------------------------------------
def final_level
return KGC::LB_ACTOR_LV_LIMIT[@actor_id] != nil ? KGC::LB_ACTOR_LV_LIMIT[@actor_id] : KGC::LB_ACTOR_LV_LIMIT_DEFAULT
end
end

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

#==============================================================================
# â–  Game_Enemy
#==============================================================================

class Game_Enemy < Game_Battler
#--------------------------------------------------------------------------
# ● 基本 MaxHP の取得
#--------------------------------------------------------------------------
alias base_maxhp_KGC_LimitBreak base_maxhp
def base_maxhp
n = base_maxhp_KGC_LimitBreak
n *= KGC::LB_MAXHP_REVISE
return n / 100
end
#--------------------------------------------------------------------------
# ● 基本 MaxSP の取得
#--------------------------------------------------------------------------
alias base_maxsp_KGC_LimitBreak base_maxsp
def base_maxsp
n = base_maxsp_KGC_LimitBreak
n *= KGC::LB_MAXSP_REVISE
return n / 100
end
#--------------------------------------------------------------------------
# ● 基本腕力の取得
#--------------------------------------------------------------------------
alias base_str_KGC_LimitBreak base_str
def base_str
n = base_str_KGC_LimitBreak
n *= KGC::LB_STR_REVISE
return n / 100
end
#--------------------------------------------------------------------------
# ● 基本器用さの取得
#--------------------------------------------------------------------------
alias base_dex_KGC_LimitBreak base_dex
def base_dex
n = base_dex_KGC_LimitBreak
n *= KGC::LB_DEX_REVISE
return n / 100
end
#--------------------------------------------------------------------------
# ● 基本素早さの取得
#--------------------------------------------------------------------------
alias base_agi_KGC_LimitBreak base_agi
def base_agi
n = base_agi_KGC_LimitBreak
n *= KGC::LB_AGI_REVISE
return n / 100
end
#--------------------------------------------------------------------------
# ● 基本魔力の取得
#--------------------------------------------------------------------------
alias base_int_KGC_LimitBreak base_int
def base_int
n = base_int_KGC_LimitBreak
n *= KGC::LB_INT_REVISE
return n / 100
end
end

#★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★☆★

#==============================================================================
# â–  Game_Party
#==============================================================================

class Game_Party
#--------------------------------------------------------------------------
# ● ゴールドの増加 (減少)
# n : 金額
#--------------------------------------------------------------------------
def gain_gold(n)
# 所持金の限界値変更
@gold = [[@gold + n, 0].max, KGC::LB_GOLD_LIMIT].min
end
#--------------------------------------------------------------------------
# ● アイテムの増加 (減少)
# item_id : アイテム ID
# n : 個数
#--------------------------------------------------------------------------
def gain_item(item_id, n)
# ハッシュの個数データを更新
if item_id > 0
@items[item_id] = [[item_number(item_id) + n, 0].max, KGC::LB_ITEM_LIMIT].min
end
end
#--------------------------------------------------------------------------
# ● 武器の増加 (減少)
# weapon_id : 武器 ID
# n : 個数
#--------------------------------------------------------------------------
def gain_weapon(weapon_id, n)
# ハッシュの個数データを更新
if weapon_id > 0
@weapons[weapon_id] = [[weapon_number(weapon_id) + n, 0].max, KGC::LB_ITEM_LIMIT].min
end
end
#--------------------------------------------------------------------------
# ● 防具の増加 (減少)
# armor_id : 防具 ID
# n : 個数
#--------------------------------------------------------------------------
def gain_armor(armor_id, n)
# ハッシュの個数データを更新
if armor_id > 0
@armors[armor_id] = [[armor_number(armor_id) + n, 0].max, KGC::LB_ITEM_LIMIT].min
end
end
end

Credit: SephirothSpawn

Look In Window_ShopSell, under def refresh

Change these lines:
Code:
for i in 1...$data_items.size
if $game_party.item_number(i) > 0
@data.push($data_items[i])
end
end
for i in 1...$data_weapons.size
if $game_party.weapon_number(i) > 0
@data.push($data_weapons[i])
end
end
for i in 1...$data_armors.size
if $game_party.armor_number(i) > 0
@data.push($data_armors[i])
end
end

With These lines:
Code:
for i in 1...$data_items.size
if $game_party.item_number(i) > 0
unless $data_items[i].element_set.include?(ID)
@data.push($data_items[i])
end
end
end
for i in 1...$data_weapons.size
if $game_party.weapon_number(i) > 0
unless $data_weapons[i].element_set.include?(ID)
@data.push($data_weapons[i])
end
end
end
for i in 1...$data_armors.size
if $game_party.armor_number(i) > 0
unless $data_armors[i].guard_element_set .include?(ID)
@data.push($data_armors[i])
end
end
end

In Window_Item, find these lines:
Code:
for i in 1...$data_items.size
if $game_party.item_number(i) > 0
@data.push($data_items[i])
end
end

Replace with these:
Code:
for i in 1...$data_items.size
if $game_party.item_number(i) > 0
unless $data_items[i].element_set.include?(ID)
@data.push($data_items[i])
end
end
end

Change ID to the ID of the attribute you don't want to include. Then apply the attribute to the items you don't want to appear there.

Credit: Saucetenuto (and Syvkal for fixing some bugs)

In Game_Player, in the method 'update', you'll find a block of code that looks like this:
Code:
unless moving? or $game_system.map_interpreter.running? or
@move_route_forcing or $game_temp.message_window_showing
case Input.dir4
when 2
move_down
when 4
move_left
when 6
move_right
when 8
move_up
end
end

Replace it with this:
Code:
unless moving? or $game_system.map_interpreter.running? or
@move_route_forcing or $game_temp.message_window_showing
if $game_map.terrain_tag(@x, @y) == ID and passable?(@x, @y, @direction)
dir = @direction
else
dir = Input.dir4
end

case dir
when 2
move_down
when 4
move_left
when 6
move_right
when 8
move_up
end
end

Change ID to the terrain tag you want to be slippy.


Now for the section so you don't walk while moving across the ice.

In Game_Character 1, add this function:
Code:
def refresh_walk_anime(old_x, old_y)
if $game_map.terrain_tag(old_x, old_y) == 1 and
$game_map.terrain_tag(@x, @y) != 1
@walk_anime = true
elsif $game_map.terrain_tag(@x, @y) == 1
@walk_anime = false
end if self.is_a?(Game_Player)
end

Then in game character 3, look for the four functions:
Code:
def move_down(turn_enabled = true)
turn_down if turn_enabled

if passable?(@x, @y, 2)
turn_down
@y += 1
increase_steps
else
check_event_trigger_touch(@x, @y+1)
end
end

def move_left(turn_enabled = true)
turn_left if turn_enabled

if passable?(@x, @y, 4)
turn_left
@x -= 1
increase_steps
else
check_event_trigger_touch(@x-1, @y)
end
end

def move_right(turn_enabled = true)
turn_right if turn_enabled

if passable?(@x, @y, 6)
turn_right
@x += 1
increase_steps
else
check_event_trigger_touch(@x+1, @y)
end
end

def move_up(turn_enabled = true)
turn_up if turn_enabled

if passable?(@x, @y, 8)
turn_up
@y -= 1
increase_steps
else
check_event_trigger_touch(@x, @y-1)
end
end

And replace them with:
Code:
def move_down(turn_enabled = true)
turn_down if turn_enabled

if passable?(@x, @y, 2)
turn_down
@y += 1
refresh_walk_anime(@x, @y-1)
increase_steps
else
check_event_trigger_touch(@x, @y+1)
end
end

def move_left(turn_enabled = true)
turn_left if turn_enabled

if passable?(@x, @y, 4)
turn_left
@x -= 1
refresh_walk_anime(@x+1, @y)
increase_steps
else
check_event_trigger_touch(@x-1, @y)
end
end

def move_right(turn_enabled = true)
turn_right if turn_enabled

if passable?(@x, @y, 6)
turn_right
@x += 1
refresh_walk_anime(@x-1, @y)
increase_steps
else
check_event_trigger_touch(@x+1, @y)
end
end

def move_up(turn_enabled = true)
turn_up if turn_enabled

if passable?(@x, @y, 8)
turn_up
@y -= 1
refresh_walk_anime(@x, @y+1)
increase_steps
else
check_event_trigger_touch(@x, @y-1)
end
end

It now works without any errors (thanks to me ^_^ )
 

Hero

Member

I already have the module. The script works fine and all but it doesn't exceed lv.99 like in the screenshot did.
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top