| 赞 | 10 |
| VIP | |
| 好人卡 | |
| 积分 | 16 |
| 经验 | |
| 最后登录 | 2026-5-15 |
| 在线时间 | 267 小时 |
- 梦石
- 0
- 星屑
- 1618
- 在线时间
- 267 小时
- 注册时间
- 2019-1-18
- 回帖
- 129
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有账号?注册会员
×
本帖最后由 造小梦 于 2022-4-2 19:51 编辑
如题,我给游戏加了个脚本,可以自定义角色的装备类型及其数量,但当我设定的装备数量大于6时,游戏就会报错,这是怎么回事?求大佬指点[pre
这是报错的地方↓
脚本↓
[pre lang="ruby"]#==============================================================================
# 此脚本来自 rpg.blue
#------------------------------------------------------------------------------
# ■ 新增装备风格
# by:VIPArcher
# 使用说明:在角色备注栏/职业备注栏里备注 <slot_type:x> 则角色变为x号装备风格
# 优先读取职业栏的风格备注。
#------------------------------------------------------------------------------
# ◆ 搭配后知后觉的装备栏扩充脚本风味更佳(需要把他的脚本放在脚本这个上面)
#==============================================================================
$VIPArcherScript ||= {};$VIPArcherScript[:slot_type] = 20140803
#==============================================================================
# ★ 设定部分 ★
#==============================================================================
module VIPArcher
SLOT_TYPE = {
0 => [0,3,4,4,1,2], # 普通
1 => [0,0,3,4,1,2], # 双刀单饰品 (这两个是默认的东西最好别改)
# 从这里开始添加装备风格
2 => [0,0,3,4,4,1,1], # 双刀双饰品
3 => [0,4,4,4,1,2], # 召唤物升级
4 => [0,3,4,1] # 普通召唤物
# 在这里继续添加类型。
} # <= 这个大括号不能删
end
class Game_BattlerBase
#--------------------------------------------------------------------------
# ● 获取装备风格
#--------------------------------------------------------------------------
def slot_type
classes = $data_classes[@class_id]
classes.note =~ /<特殊框架\s*:(.*)>/i
return $1.to_i if $1!= nil
actor.note =~ /<特殊框架\s*:(.*)>/i
return $1.to_i if $1!= nil
features_set(FEATURE_SLOT_TYPE).max || 0
end
end
class Game_Actor < Game_Battler
alias vip_20140803_es equip_slots
#--------------------------------------------------------------------------
# ● 获取装备栏的数组
#--------------------------------------------------------------------------
def equip_slots
return VIPArcher::SLOT_TYPE[slot_type] if
VIPArcher::SLOT_TYPE[slot_type] != nil
vip_20140803_es
end
end
class Window_EquipSlot < Window_Selectable
def actor=(actor)
return if @actor == actor
@actor = actor
create_contents
refresh
end
end[/pre] |
|