| 赞 | 9 |
| VIP | |
| 好人卡 | |
| 积分 | 17 |
| 经验 | |
| 最后登录 | 2025-3-31 |
| 在线时间 | 485 小时 |
- 梦石
- 0
- 星屑
- 1748
- 在线时间
- 485 小时
- 注册时间
- 2006-1-7
- 回帖
- 996
|
加入我们,或者,欢迎回来。
您需要 登录 才可以下载或查看,没有账号?注册会员
×
最近痴迷战棋游戏
搜索了论坛,目前XP有三个版本吧
一个是叶子的《阿尔西斯战记》
这个版本的回合轮换是类似于CP制的,不太符合传统战棋的设定
一个是基于柳柳的《仙剑战棋》之上的《战棋2.0》
这个版本因为加了太多东西了,有点太乱了,我眼都看花了
综上,我不太打算以这两个为蓝本追加内容和改造,反而是看上了
《ZTBS》战棋系统:https://rpg.blue/thread-140670-1-1.html
不过ZTBS依然有很多问题,所以我决定,跟这个系统钢一钢。
今天就拿EXP的计算开刀
用过或者看过ZTBS的应该都知道,ZTBS有两种EXP计算方式
【一】谁杀的经验归谁。也就是说,如果你给怪磨掉大部分血,队友过来K个头,你的经验就没了。
这个就让人很气啊对不对,打个LOL就算队友人头怪,我好歹也有助攻呢
【二】K头的人拿全额exp,其他队友按比例拿经验。
这个方法看似挺好的,但是你实际用起来就会发现,这可真是分猪肉啊,就连没摸过怪的队友都有猪肉吃
所以,我更改了EXP的计算方式,去掉了前两种计算方式(因为太诡异了,我想,不会有人希望留着吧)
【NEW】谁杀的谁拿全额经验。
对敌人造成过伤害的,会按照比例拿经验。比如敌人敌人满额经验1000,maxhp=100,你打掉10hp,那么你拿(10/100)*1000=100点经验。
如果你用了AOE技能,那么每一个敌人的比例经验都会计算进来。
并且追加了经验显示。
具体改造方法如下:
【第一步】脚本【主处理】中, def get_exp_etc(target) 完全替换以下
[fold=主处理中] def get_exp_etc(target)
@level_up = {} if @level_up == nil
@gold = 0 if @gold == nil
@treasures = [] if @treasures == nil
for actor in $game_system.tactics_actors.values
if actor == @attacker
exp = target.exp
@exp = 0 if @exp == nil
@exp1 = 0
pre_level = actor.level
if target.hp > 0
if target.hp != target.maxhp
@exp1 += Integer(exp*(target.maxhp - target.hp)/target.maxhp)
else
@exp1 += 0
end
else
@exp1 += exp
end
actor.exp += @exp1 if !actor.cant_get_exp?
@exp += @exp1
if actor.level > pre_level
if @level_up[actor] == nil
@level_up[actor] = [pre_level, actor.level]
else
@level_up[actor][1] = actor.level
end
end
end
end
# 如果敌方战斗不能
if target.is_a?(Game_Enemy) and target.dead?
# 金钱获得
$game_party.gain_gold(target.gold)
@gold += target.gold
# 物品获得
if target.item_id > 0
item = $data_items[target.item_id]
end
if target.weapon_id > 0
item = $data_weapons[target.weapon_id]
end
if target.armor_id > 0
item = $data_armors[target.armor_id]
end
# 获取物品概率
if rand(100) < target.treasure_prob
case item
when RPG::Item
@treasures.push(item)
$game_party.gain_item(item.id, 1)
when RPG::Weapon
@treasures.push(item)
$game_party.gain_weapon(item.id, 1)
when RPG::Armor
@treasures.push(item)
$game_party.gain_armor(item.id, 1)
end
end
end
# 追加了EXP的显示
if !defined? result_window
@level_up = nil
@gold = nil
@exp = nil
@treasures = nil
end
end[/fold]
【第二部】脚本【我方动作】中,def update_step10中注释掉以下内容
[fold=全都注释掉,不要了] # 如果敌方战斗不能
#if @attacker.is_a?(Game_Enemy) and @attacker.dead?
# 获得经验值
# get_exp_etc(@attacker)
#end[/fold]
为啥注释掉,我稍微解释一下。这个是敌方行动回合。如果不注释的话,我不确定有没有问题。注释掉的话,最多敌人被毒死的时候经验浪费了而已。
目前我没什么好办法记录这个毒的buff来自谁,所以浪费就先浪费吧。
因为目前系统不存在反击,所以不存在反击反死的问题。所以先酱紫吧。如果以后加入了反击、反震等等能搞死敌人的,再说吧。
【第三部】以下是追加一个经验显示。因为我的【升级提示】脚本完全修改过,所以就直接全放出来了。
如果你想要经验提示的话,就拿去替换掉原来的全部内容。
当然,你可以试一试原来的什么样,看看哪个好,然后酌情选用吧。
[fold]#==============================================================================
# [ZTBS] -Zenith Tactical Battle System-
# ~+7:升级提示 by 水夜
# 汉化 by liqunsz
# ver1.01 Zenith Creation (http://zenith.ifdef.jp/)
#------------------------------------------------------------------------------
# 实现在地图上的战略性的战斗。
#==============================================================================
class Scene_Map
# 不演奏升级提示的SE时要写nil
LEVEL_UP_SE = "136-Light02"
#--------------------------------------------------------------------------
# ● 结果窗表示
#--------------------------------------------------------------------------
def result_window
if @level_up == nil or @gold == nil or @treasures == nil or @exp == nil
return false
end
# 获得金钱、物品窗表示
if @treasures.size == 0
width = 140
elsif
width = 240
end
height = 64 + @treasures.size * 32
if @gold != 0
height += 32
end
window = Window_Base.new(0, 64, width, height)
window.contents = Bitmap.new(window.width - 32, window.height - 32)
window.back_opacity = 160
window.opacity = 0
y = 0
#测试一下吧
if @exp != 0 and @exp != nil
#经验
cx = window.contents.text_size("EXP").width
window.contents.font.color = window.normal_color
window.contents.draw_text(4, y, window.width-44-cx, 32, @exp.to_s, 2)
window.contents.font.color = window.system_color
window.contents.draw_text(window.width-32-cx, y, cx, 32, "EXP", 2)
y += 32
end
if @gold != 0
# 金钱
cx = window.contents.text_size($data_system.words.gold).width
window.contents.font.color = window.normal_color
window.contents.draw_text(4, y, window.width-44-cx, 32, @gold.to_s, 2)
window.contents.font.color = window.system_color
window.contents.draw_text(window.width-32-cx, y, cx, 32, $data_system.words.gold, 2)
y += 32
end
# 物品
#y += 32
for item in @treasures
window.draw_item_name(item, 4, y)
y += 32
end
if @level_up.keys.size > 0
# 演奏 SE
if LEVEL_UP_SE != nil and LEVEL_UP_SE != ""
Audio.se_play("Audio/SE/" + LEVEL_UP_SE, 80, 100)
end
# 等级提升窗作成
height = [352, 64+@level_up.keys.size*32].min
window2 = Window_Base.new(window.width+48, 64, 320, height)
window2.contents = Bitmap.new(window2.width - 32, 32+@level_up.keys.size*32)
window2.back_opacity = 160
window2.opacity = 0
window2.contents.font.color = window.system_color
window2.contents.draw_text(0, 0, window2.width-32, 32, "-LEVEL UP-", 1)
y = 32
for actor in @level_up.keys
window2.draw_actor_name(actor, 4, y)
window2.contents.font.color = window2.system_color
window2.contents.draw_text(168, y, 24, 32, "Lv")
window2.contents.draw_text(228, y, 24, 32, "→")
window2.contents.font.color = window2.normal_color
lv1 = @level_up[actor][0].to_s
window2.contents.draw_text(192, y, 32, 32, lv1, 2)
lv2 = @level_up[actor][1].to_s
window2.contents.draw_text(254, y, 32, 32, lv2)
y += 32
end
end
# 显示结果
loop do
# 刷新游戏画面
Graphics.update
# 更新输入信息
Input.update
if window.opacity < 255
window.opacity += 25
window.x += 1
if window2 != nil
window2.opacity += 25
window2.x += 1
end
next
end
if Input.press?(Input::DOWN) and window2 != nil
max = [window2.contents.height - (window2.height - 32), 0].max
window2.oy = [window2.oy + 6, max].min
elsif Input.press?(Input::UP) and window2 != nil
max = [window2.contents.height - (window2.height - 32), 0].max
window2.oy = [window2.oy - 6, 0].max
end
break if Input.trigger?(Input::C)
end
# 解放
window.dispose
window = nil
if window2 != nil
window2.dispose
window2 = nil
end
@level_up = nil
@gold = nil
@treasures = nil
return true
end
end
[/fold]
以上,就暂时完成了EXP的改造。
未来的话我想给EXP的改造追加辅助类技能经验获取
就比如说,你队友一直在奶人,没工夫打人,那么难道他不配获得经验吗?
目前想法是朝着《炎龙骑士团》那样,加buff,debuff,奶,都会获得经验。
所以EXP应该不止这一个,【ZTBS改造计划】也不止一期。
不知道有没有小伙伴一起期待和支持的。
如果有兴趣的话也可以和我一起改造。因为我现在有时间完全是因为【为(疫)情所困】,不知道能坚持多久。
PS:其实已经追加了一个显示战斗者详细信息的页面,不过我觉得还没调整到最好,所以暂不放出。
|
|