注册 | 登录

游侠NETSHOW论坛





楼主: pcbun
打印 上一主题 下一主题

[原创] 国王的恩典:戎装公主封灵魔书MOD 2.4 [复制链接]

帖子
225
精华
0
积分
113
金钱
1505
荣誉
0
人气
0
评议
0
321#
发表于 2010-5-12 23:10:08 |只看该作者
1.2的存档,一仗后,圣骑士和花工没得经验。





附件: 你需要登录才可以下载或查看附件。没有帐号?注册

使用道具 举报

帖子
225
精华
0
积分
113
金钱
1505
荣誉
0
人气
0
评议
0
322#
发表于 2010-5-12 23:13:14 |只看该作者
PS:我混合了很多Mod,不知道有没有影响,大礼包汉化+视角+魔术+自己修改的挖宝。
我把魔术的贪婪能力改了,变成累加挖宝概率。

lvlskill.lua
function lvlskill_greedy_apply(unit)
        g_greedy=g_greedy+1
        if not Attack.act_is_spell(unit,"lvlskill_greedy") then
                Attack.act_apply_spell_begin(unit,"lvlskill_greedy",-100,false)
                Attack.act_apply_spell_end()
        end
end

zsystem.lua
function custom_genbox( racemask ) --眖addon_pets.lua眔
        local mapk = Game.MapLocDifficulty()
  local K = Boxgen.rnd(100)
  --эㄏ备笵ㄣpcbun
  K = K - 10 - 5*tonumber(g_greedy)
    if K < 0 then --э莉眔杆称
      if not Boxgen.object( mapk ) then -- 沐礤痂痼弪? 镳邃戾? 篷腓 礤 胥屙屦桦?, 蝾 溴睃汨
        -- cant add object, add money
        K = K + 10 + 5*tonumber(g_greedy) --Boxgen.parcount( "money", "*7" ) -- 沐礤痂?溴礤?Mini,Small,Average
      end
      return true
    end
  --эㄏ备笵ㄣpcbun

  K = K - 15 - 3*tonumber(g_greedy)
  if K < 0 then -- 镳铖蝾?疋栩铌

    local r = Boxgen.rnd(100)
    local count = 3
    if r < 80 then
      count = 1
    elseif r < 95 then
      count = 2
    end

    if not Boxgen.scroll( Game.MapLocDifficulty(), count ) then
      -- cant add scroll, add money
      K = K + 15 + 3*tonumber(g_greedy) --Boxgen.parcount( "money", "*7" ) -- 沐礤痂?溴礤?Mini,Small,Average
    end

    return true
  end
  
   K = K - 2 - 2*tonumber(g_greedy)
if K < 0 then
    local num = Boxgen.rnd(100)
    if num < 50 then
            Boxgen.parlimit("mana", "1")
    elseif num < 75 then
            Boxgen.parlimit("mana", "2")
    elseif num < 90 then
            Boxgen.parlimit("mana", "3")
    else
            Boxgen.parlimit("mana", "4")
    end
    return true
end

K = K - 2 - 2*tonumber(g_greedy)
if K < 0 then
    local num = Boxgen.rnd(100)
    if num < 50 then
            Boxgen.parlimit("rage", "1")
    elseif num < 75 then
            Boxgen.parlimit("rage", "2")
    elseif num < 90 then
            Boxgen.parlimit("rage", "3")
    else
            Boxgen.parlimit("rage", "4")
    end
    return true
end

K = K - 1 - tonumber(g_greedy)
if K < 0 then
    local num = Boxgen.rnd(100)
    if num < 50 then
            Boxgen.parcount("attack", "1")
    elseif num < 75 then
            Boxgen.parcount("attack", "2")
    elseif num < 90 then
            Boxgen.parcount("attack", "3")
    else
            Boxgen.parcount("attack", "4")
    end
    return true
end

K = K - 1 - tonumber(g_greedy)
if K < 0 then
    local num = Boxgen.rnd(100)
    if num < 50 then
            Boxgen.parcount("defense", "1")
    elseif num < 75 then
            Boxgen.parcount("defense", "2")
    elseif num < 90 then
            Boxgen.parcount("defense", "3")
    else
            Boxgen.parcount("defense", "4")
    end
    return true
end

K = K - 1 - tonumber(g_greedy)
if K < 0 then
    local num = Boxgen.rnd(100)
    if num < 50 then
            Boxgen.parcount("intellect", "1")
    elseif num < 75 then
            Boxgen.parcount("intellect", "2")
    elseif num < 90 then
            Boxgen.parcount("intellect", "3")
    else
            Boxgen.parcount("intellect", "4")
    end
    return true
end

K = K - 3 - 2*tonumber(g_greedy)
if K < 0 then
    local num = Boxgen.rnd(100)
    if num < 50 then
            Boxgen.parcount("leadership", "15")
    elseif num < 75 then
            Boxgen.parcount("leadership", "30")
    elseif num < 90 then
            Boxgen.parcount("leadership", "70")
    else
            Boxgen.parcount("leadership", "150")
    end
    return true
end

  K = K - 5 -3*tonumber(g_greedy)
  if K < 0 then
    local num = Boxgen.rnd(100)
    local r = Boxgen.rnd(3)
    if num < 50 then
            if r == 0 then
              Boxgen.parcount( "rune_might", "1" )
            elseif r == 1 then
              Boxgen.parcount( "rune_magic", "1" )
            else
              Boxgen.parcount( "rune_mind", "1" )
            end
    elseif num < 75 then
            if r == 0 then
              Boxgen.parcount( "rune_might", "2" )
            elseif r == 1 then
              Boxgen.parcount( "rune_magic", "2" )
            else
              Boxgen.parcount( "rune_mind", "2" )
            end
    elseif num < 90 then
            if r == 0 then
              Boxgen.parcount( "rune_might", "3" )
            elseif r == 1 then
              Boxgen.parcount( "rune_magic", "3" )
            else
              Boxgen.parcount( "rune_mind", "3" )
            end
    else
            if r == 0 then
              Boxgen.parcount( "rune_might", "4" )
            elseif r == 1 then
              Boxgen.parcount( "rune_magic", "4" )
            else
              Boxgen.parcount( "rune_mind", "4" )
            end
    end


    return true
  end

  K = K - 10 - 5*tonumber(g_greedy)
  if K < 0 then
    local r = Boxgen.rnd(100)

    if r < 50 then
      Boxgen.parcount( "crystals", "1" )
    elseif r < 75 then
      Boxgen.parcount( "crystals", "2" )
    elseif r < 90 then
      Boxgen.parcount( "crystals", "3" )
    else
      Boxgen.parcount( "crystals", "5" )
    end

    return true
  end

  K = K - 10 - 5*tonumber(g_greedy)
  if K < 0 then
    if not Boxgen.scroll( ) then
      -- cant add scroll, add money
      K = K + 10 + 5*tonumber(g_greedy)--Boxgen.parcount( "money", "*7" )
    end

    return true
  end

  -- Boxgen.parcount( "money", "*7" ) -- 沐礤痂?溴礤?Mini,Small,Average
  local r = Boxgen.rnd(100)
        if r < 40 then
          Boxgen.parcount( "money", "*tonumber(g_greedy)" ) -- 沐礤痂?溴礤?Mini
        elseif r < 75 then
          Boxgen.parcount( "money", "*2*tonumber(g_greedy)" ) -- 沐礤痂?溴礤?Small
        else
                Boxgen.parcount( "money", "*4*tonumber(g_greedy)" ) -- 沐礤痂?溴礤?Average
        end


  return true

end

使用道具 举报

帖子
225
精华
0
积分
113
金钱
1505
荣誉
0
人气
0
评议
0
323#
发表于 2010-5-12 23:14:53 |只看该作者
忘了,我还修改了技能和勋章,个别魔法加了all。。。。。。。

还有新兵种,还有。。我也忘了,反正很多。。。。

[ 本帖最后由 augustus-gm 于 2010-5-12 23:16 编辑 ]

使用道具 举报

帖子
225
精华
0
积分
113
金钱
1505
荣誉
0
人气
0
评议
0
324#
发表于 2010-5-12 23:31:36 |只看该作者
又做了一个测试,地泉全灭敌人,无经验,调换兵种位置,依然两兵无经验。

推测,我队伍中有两个新兵种,盖亚和秘术师,可能没有包含在分配经验的list里面,如何加入?

使用道具 举报

帖子
336
精华
1
积分
518
金钱
752
荣誉
15
人气
0
评议
0
325#
发表于 2010-5-12 23:43:02 |只看该作者
你提到的那些MOD
理论上不会影响
因为这个经验的设计是
在开局给予buff时或中间召唤生物加buff时
便把生物记进加经表中
到终局时计平均值后给生物依次加经
所以没道理会出现你的情况
战斗时这两个兵有没有得到升级buff?
会不会setting.lua改错了?(我觉得这个机会较大,或同时有多个setting.lua?)

我自己测了你的save,也有加入新兵种MOD下去测试
一样是正常升级,没有问题

你可以试一下debug
levelsystem.lua
加经验call的function,在战会经ui经lng调用

另外一提,你改的greedy很邪恶
真真正正的贪婪成性。。。。。
全龙队加挖掘队伍便。。。。。
嘿嘿嘿嘿

先在自已的MOD目录中加一个lua 档,入面加一行checksystem=1
在eachtruncheck中加入一句
看第二个回合显示时有没有齐场中的士兵名字
checklog("Troop:",battleatom[1],battleatom[2],battleatom[3],battleatom[4],battleatom[5])
checklog("Troop:",battleatom[6],battleatom[7],battleatom[8],battleatom[9],battleatom[10])
checklog("Troop num:",battleatomnum)

function afterbattleexpadd()
        local lvlupflag=0
        local lvlupmsg=''
        for i=1,battleatomnum do
                local atom=battleatom --这个是global variable,士兵名字的array
                local exp=math.floor(battleexp/battleatomnum) ---battleexp是经验,battleatomnum是士兵类别数,皆是global variable
                if fv(atom.."lvl")~=nil then
                        local newexp=fv(atom.."exp")+exp
                        local atomlvl=fv(atom.."lvl")
                        local atomlvlexp=trooplvlexp(atom,atomlvl)
                        local atomlvlupflag=0
                        if atomlvlexp~=false then
                                while newexp>trooplvlexp(atom,atomlvl) and atomlvlupflag<5 do  --我唯一想到便是这儿给你前面改了不知甚么,trooplvlexp(atom,atomlvl)给return nil了,要不然要嘛后面的该一起不升,而不是只升几个不升后几个
                                        sv("lvlpoint",fv("lvlpoint")+1)
                                        newexp=newexp-trooplvlexp(atom,atomlvl)
                                        atomlvl=atomlvl+1
                                        sv(atom.."lvl",atomlvl)
                                        if lvlupmsg=='' then
                                                lvlupmsg="<label=trooplvlupmsg>"
                                        end
                                        lvlupmsg=lvlupmsg.."<color=100,255,100><label=cpn_"..atom.."></color>".."<label=expaddafterbattlemsg>"..tostring(atomlvl).."</color><br>"
                                        lvlupflag=1
                                        atomlvlupflag=atomlvlupflag+1
                                end
                                if atomlvlupflag>=5 then
                                        sv(atom.."exp",0)
                                else
                                        sv(atom.."exp",math.floor(newexp))
                                end
                        end
                end
        end
        if lvlupflag~=0 then
                mb(lvlupmsg)
        end
        battleatomnum=0
        battleatom={}
        battleexp=0
        return ''
end

[ 本帖最后由 pcbun 于 2010-5-12 23:57 编辑 ]

使用道具 举报

帖子
336
精华
1
积分
518
金钱
752
荣誉
15
人气
0
评议
0
326#
发表于 2010-5-12 23:44:59 |只看该作者
原帖由 augustus-gm 于 2010-5-12 23:31 发表
又做了一个测试,地泉全灭敌人,无经验,调换兵种位置,依然两兵无经验。

推测,我队伍中有两个新兵种,盖亚和秘术师,可能没有包含在分配经验的list里面,如何加入? ...


地泉是英雄魔法,自然不计算入"所有有升级buff士兵"的范围中 ^_^

使用道具 举报

帖子
225
精华
0
积分
113
金钱
1505
荣誉
0
人气
0
评议
0
327#
发表于 2010-5-12 23:56:23 |只看该作者
原帖由 pcbun 于 2010-5-12 23:43 发表
你提到的那些MOD
理论上不会影响
因为这个经验的设计是
在开局给予buff时或中间召唤生物加buff时
便把生物记进加经表中
到终局时计平均值后给生物依次加经
所以没道理会出现你的情况
战斗时这两个兵有没有得到升级bu ...


老大,我绝对没改过,但是和你写的不一样

function afterbattleexpadd()
        local lvlupflag=0
        local lvlupmsg=''
        for i=1,battleatomnum do
                local atom=battleatom
                local exp=math.floor(battleexp/battleatomnum)
                if fv(atom.."lvl")~=nil then
                        local newexp=fv(atom.."exp")+exp
                        local atomlvl=fv(atom.."lvl")
                        local atomlvlexp=trooplvlexp(atom,atomlvl)
                        if atomlvlexp~=false then
                                while newexp>trooplvlexp(atom,atomlvl) do
                                        newexp=newexp-trooplvlexp(atom,atomlvl)
                                        atomlvl=atomlvl+1
                                        sv(atom.."lvl",atomlvl)
                                        if lvlupmsg=='' then
                                                lvlupmsg="<label=trooplvlupmsg>"
                                        end
                                        lvlupmsg=lvlupmsg.."<color=100,255,100><label=cpn_"..atom.."></color>".."<label=expaddafterbattlemsg>"..tostring(atomlvl).."</color><br>"
                                        lvlupflag=1
                                end
                                sv(atom.."exp",math.floor(newexp))
                        end
                end
        end
        if lvlupflag==1 then
                mb(lvlupmsg)
        end
        battleatomnum=0
        battleatom={}
        battleexp=0
        return ''
end

使用道具 举报

帖子
336
精华
1
积分
518
金钱
752
荣誉
15
人气
0
评议
0
328#
发表于 2010-5-13 00:07:11 |只看该作者

回复 #332 augustus-gm 的帖子

那就结了
用最新版本吧
你的该是2.3左右的版本
中间的改动有些我也忘了
不过有一点便是改进了数人头时的表现的

我个人建议自己改动的地方加自己的特有tag
以后更新了便不怕改的地方找不回来了
要找回来用ultra-edit的search in file便找回来了,很方便
新版本一般除加功能外有很多时都加debug一下typo甚么的
感觉上你的问题换回现时的版本便没有问题了

[ 本帖最后由 pcbun 于 2010-5-13 00:31 编辑 ]

使用道具 举报

帖子
225
精华
0
积分
113
金钱
1505
荣誉
0
人气
0
评议
0
329#
发表于 2010-5-13 00:53:30 |只看该作者
有个bug, dryad的有个技能是respawn,前面少了newability_

使用道具 举报

帖子
77
精华
0
积分
39
金钱
346
荣誉
0
人气
0
评议
0
330#
发表于 2010-5-13 10:02:42 |只看该作者
感谢楼主再次更新,持续关注中,能和新年礼包共存吗?

使用道具 举报

帖子
336
精华
1
积分
518
金钱
752
荣誉
15
人气
0
评议
0
331#
发表于 2010-5-13 10:54:45 |只看该作者
原帖由 yanyidong 于 2010-5-13 10:02 发表
感谢楼主再次更新,持续关注中,能和新年礼包共存吗?


由于新年礼包也有使用到arena.lua
所以依我的说明手动DIY一下便能用了
不过由于他整合进去的魔法MOD使用我过往写的规格,故也可能引致冲突,实际上还没有测试过

使用道具 举报

帖子
225
精华
0
积分
113
金钱
1505
荣誉
0
人气
0
评议
0
332#
发表于 2010-5-13 16:03:17 |只看该作者
原帖由 pcbun 于 2010-5-13 10:54 发表


由于新年礼包也有使用到arena.lua
所以依我的说明手动DIY一下便能用了
不过由于他整合进去的魔法MOD使用我过往写的规格,故也可能引致冲突,实际上还没有测试过 ...

function on_round_start(round, tend)

        --[[も笆タ单bug(pcbun)
        local waitingfixswitch=fv("waitingfixswitch")
        local tempspellname=""
        local olddur=0
        local newdur=0
        if waitingfixswitch==1 then
                for i=0,Attack.act_count()-1 do
                        if Attack.act_spell_count(i)>=1 then
                                for j=0,Attack.act_spell_count(i)-1 do
                                        tempspellname=Attack.act_spell_name(i,j)
                                        olddur=Attack.val_restore(i,tempspellname.."old")
                                        newdur=Attack.act_spell_duration(i,tempspellname)
                                        if olddur~=nil then
                                                if olddur==Attack.act_spell_duration(i,tempspellname) then
                                                        Attack.act_spell_duration(i,tempspellname,newdur-1)
                                                end
                                                if Attack.act_spell_duration(i,tempspellname)==0 then
                                                        Attack.act_del_spell(i,tempspellname)
                                                end
                                        end
                                        if not (olddur==nil and Attack.act_spell_duration(i,tempspellname)==1) then
                                                Attack.val_store(i,tempspellname.."old",Attack.act_spell_duration(i,tempspellname))
                                        end
                                end
                        end
                end
        end

        ]]--
       
       
        --竒喷MODswitch
                local lvlswitch=fv("lvlswitch")
                if lvlswitch==1 then
                        eachturncheck(round)
                        if round==1 then
                    local atom = Attack.atom_spawn(1, 0, "mod_pcbun_lvlup")
                  end
          end
          othereachturncheck(round)
          
    cur_round = round
    if round == 1 then

这是礼包的内容,黑字的部分有用吗,好像新魔术把这部分去掉了。

使用道具 举报

帖子
336
精华
1
积分
518
金钱
752
荣誉
15
人气
0
评议
0
333#
发表于 2010-5-14 07:57:56 |只看该作者

回复 #337 augustus-gm 的帖子

黑字部份是以往AP1.1的等待bug待正
和我提到的无关
提到的魔术MOD是魔书MOD前的另一个作品
由于又在此前由别人整合了魔术MOD
但他整合的却是一个已不再支援的旧版本
而由于新品九章MOD又整合了那个MOD
会使得后面使用新格式整合格式的MOD引致冲突
嘛,解决方法我已发给他了
我看能不能够解决这种"历史残留的问题"吧

使用道具 举报

帖子
62
精华
0
积分
31
金钱
264
荣誉
0
人气
0
评议
0
334#
发表于 2010-5-14 08:13:39 |只看该作者
kan kan kan akneeeeeeeeeeeeeeeeeee

使用道具 举报

帖子
483
精华
0
积分
302
金钱
900
荣誉
6
人气
0
评议
0
335#
发表于 2010-5-14 08:14:52 |只看该作者
原帖由 pcbun 于 2010-5-14 07:57 发表
黑字部份是以往AP1.1的等待bug待正
和我提到的无关
提到的魔术MOD是魔书MOD前的另一个作品
由于又在此前由别人整合了魔术MOD
但他整合的却是一个已不再支援的旧版本
而由于新品九章MOD又整合了那个MOD
会使得后面使 ...

老大,我错了,因为我看不懂编程语句,所以,有时候你给的解决方法,我可能有些不懂,希望老大你能原谅我这个菜鸟!
能得到老大的兼容方式,我真是放松不少啊

使用道具 举报

帖子
336
精华
1
积分
518
金钱
752
荣誉
15
人气
0
评议
0
336#
发表于 2010-5-14 09:57:31 |只看该作者
原帖由 xianren20 于 2010-5-14 08:14 发表

老大,我错了,因为我看不懂编程语句,所以,有时候你给的解决方法,我可能有些不懂,希望老大你能原谅我这个菜鸟!
能得到老大的兼容方式,我真是放松不少啊

...


没事,我是不想同时有几个版本的魔书MOD在使用者间流传
若真有意整合也到停更后才再考虑进行整合不迟
在开发中过早整合会对原MOD的发展产生不良影响

使用道具 举报

帖子
77
精华
0
积分
39
金钱
346
荣誉
0
人气
0
评议
0
337#
发表于 2010-5-14 13:24:37 |只看该作者
pcbun老大,

设置队型那个选项好像没用了,原来的主屏幕右下角那几个相关按钮也不见了,老大是不是打算换个或者去掉队型界面?

另外!!!setting.lua里面的 lvlbaseexp=2000 --第一级的经验需求(若修改也会影响后面的等级经验需求)
这个好像不起作用了,不管怎么改,在实际游戏里,它都是200。

[ 本帖最后由 yanyidong 于 2010-5-14 13:50 编辑 ]
已有 1 人评分 收起 理由
1027227 + 1

总评分:  + 1   查看全部评分

使用道具 举报

帖子
336
精华
1
积分
518
金钱
752
荣誉
15
人气
0
评议
0
338#
发表于 2010-5-14 14:22:50 |只看该作者
忽略了魔书内的阵型设置了,新版已修正回来

经验给我改为定值了
向下拉找到
local lvlexp={200,400,600,8000,1000   ,1500,2000,2500,3500,5000   ,7500,10000,12500,15000,20000   ,25000,30000,35000,40000,50000   ,1100000,1200000,130000,140000,150000   ,160000,170000,180000,190000,20000   ,210000,220000,230000,240000,250000}
200为等级一
400为等级二
如此类推
新版已可重新设置
下调EXP升级是由于想在新版中加入以"升级点"作抽奖的元素
所以减低升级的难度以使能累积更多"升级点"

介面阵列由于双按士兵便可以开启队型取用阵列
不想有太多非必要按钮
所以在新版中取消

以上,感谢回报

[ 本帖最后由 pcbun 于 2010-5-14 14:41 编辑 ]

使用道具 举报

帖子
77
精华
0
积分
39
金钱
346
荣誉
0
人气
0
评议
0
339#
发表于 2010-5-15 11:45:45 |只看该作者
楼主,
新版的下载在哪里?附件那个还是5\13版本的吧?

使用道具 举报

帖子
336
精华
1
积分
518
金钱
752
荣誉
15
人气
0
评议
0
340#
发表于 2010-5-15 13:10:18 |只看该作者
原帖由 yanyidong 于 2010-5-15 11:45 发表
楼主,
新版的下载在哪里?附件那个还是5\13版本的吧?


帥呆了
忘記了上傳了

2020202020

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

手机版|Archiver|游侠NETSHOW论坛 ( 苏ICP备2023007791号 )

GMT+8, 2025-11-9 13:56 , Processed in 0.386886 second(s), 11 queries , Gzip On, Memcache On.

Powered by Discuz! X2

© 2001-2011 Comsenz Inc.

分享到