Project1
标题:
装备系统增强脚本,战斗失败再读档,装备消失
[打印本页]
作者:
张嘉倪
时间:
2014-11-4 10:03
标题:
装备系统增强脚本,战斗失败再读档,装备消失
为了增加游戏可玩性,安装了66找到的装备系统增强脚本,但是这几天猛然发现在存档后战斗失败重新读档,战斗获得的带前缀装备就突然间消失了。
百度不到类似情况,我安装了较多脚本但都是挑选兼容性较好的,出现这种问题是因为脚本冲突还是我改动的问题?
@maxparamplus = 4 #最大前缀数
@moneyrate = 2 #物品价格计算公式为:原价格 + 前缀权重 * @moneyrate
@transpose = [*1..100].reverse #用于把1变成100,100变成1
@paramsplus = [ #暂时只写了三个前缀,可以自己添加,参照前缀结构
[10,"走形",[[22,0,-0.05]]],# 命中-5%
[10,"古旧",[[23,9,0.9]]],# 经验获得-10%
[10,"笨重",[[22,1,-0.05]]],# 闪避-5%
[10,"残破",[[0,-50]]],# HP减50
[10,"松垮",[[1,-20]]],# MP减20
[20,"凌厉",[[2,10]]], #物理攻击加10
[20,"加固",[[3,10]]], #物理防御加10
[20,"雕花",[[4,10]]], #特技攻击加10
[20,"强化",[[5,10]]], #特技防御加10
[20,"全能",[[0,50],[1,20]]], # HP和MP各加50和20
[20,"极速",[[6,10]]], #敏捷加10
[30,"灵巧",[[22,1,0.05]]],# 闪避+5%
[30,"稳重",[[22,0,0.05]]],# 命中+5%
[50,"破阵",[[23,6,0.2]]], #物理攻击加20%
[50,"强袭",[[23,7,0.2]]], #特技攻击加20%
[50,"悟性",[[23,9,1.2]]],# 经验获得+20%
[60,"射手",[[2,20],[0,50]]], #物理攻击加20
[60,"门神",[[3,20],[0,50]]], #物理防御加20
[60,"枢纽",[[4,20],[1,20]]], #特技攻击加20
[60,"铁闸",[[5,20],[1,20]]], #特技防御加20
[80,"致命",[[22,2,0.1]]], #暴击率+10%
[80,"闪电",[[6,50]]], #敏捷加50
[90,"战神",[[23,6,0.5]]], #物理攻击加50%
[90,"天尊",[[23,7,0.5]]], #特技攻击加50%
[100,"传说",[[21,2,2]]] #物理攻击双倍
]
我只是新加了这几个前缀,请大神解救啊。
作者:
张嘉倪
时间:
2014-11-4 10:15
补充一句,读档后除了带前缀的装备,在宝箱里获得的普通装备完好无损。
我对脚本不懂,如果不知道这个问题怎么改只能把这个脚本删掉了……求解救啊
作者:
345912390
时间:
2014-11-4 12:14
在该脚本的下方加入 以下脚本
module DataManager
#--------------------------------------------------------------------------
# ● 生成存档内容
#--------------------------------------------------------------------------
def self.make_save_contents
contents = {}
contents[:system] = $game_system
contents[:timer] = $game_timer
contents[:message] = $game_message
contents[:switches] = $game_switches
contents[:variables] = $game_variables
contents[:self_switches] = $game_self_switches
contents[:actors] = $game_actors
contents[:party] = $game_party
contents[:troop] = $game_troop
contents[:map] = $game_map
contents[:player] = $game_player
contents[:weapons] = $data_weapons
contents[:armors] = $data_armors
contents
end
#--------------------------------------------------------------------------
# ● 展开存档内容
#--------------------------------------------------------------------------
def self.extract_save_contents(contents)
$game_system = contents[:system]
$game_timer = contents[:timer]
$game_message = contents[:message]
$game_switches = contents[:switches]
$game_variables = contents[:variables]
$game_self_switches = contents[:self_switches]
$game_actors = contents[:actors]
$game_party = contents[:party]
$game_troop = contents[:troop]
$game_map = contents[:map]
$game_player = contents[:player]
$data_weapons = contents[:weapons]
$data_armors = contents[:armors]
end
end
复制代码
欢迎光临 Project1 (https://rpg.blue/)
Powered by Discuz! X3.1