battlebrothers吧 关注:21,840贴子:283,650
  • 15回复贴,共1

菜鸟关于改武器数据一问

只看楼主收藏回复

本人正尝试把巫师mod里某巨剑的技能AP消耗-1但不知道怎改好, 有没有大佬可以愿意帮忙? 谢谢
以下是文件里的数据
this.guts_greatsword <- this.inherit("scripts/items/weapons/weapon", {
m = {
StunChance = 0
},
function create()
{
this.weapon.create();
this.m.ID = "weapon.guts_greatsword";
this.m.Name = "Greatsword";
this.m.Description = "A long two-handed blade that makes for a versatile weapon.";
this.m.Categories = "Sword, Two-Handed";
this.m.IconLarge = "weapons/melee/inventory_guts_sword_02.png";
this.m.Icon = "weapons/melee/inventory_guts_sword_02_70x70.png";
this.m.SlotType = this.Const.ItemSlot.Mainhand;
this.m.BlockedSlotType = this.Const.ItemSlot.Offhand;
this.m.ItemType = this.Const.Items.ItemType.Weapon | this.Const.Items.ItemType.MeleeWeapon | this.Const.Items.ItemType.TwoHanded;
this.m.IsAgainstShields = true;
this.m.IsAoE = true;
this.m.AddGenericSkill = true;
this.m.ShowQuiver = false;
this.m.ShowArmamentIcon = true;
this.m.ArmamentIcon = "icon_guts_sword_03";
this.m.Value = 1700;
this.m.ShieldDamage = 12;
this.m.Condition = 60.0;
this.m.ConditionMax = 60.0;
this.m.StaminaModifier = -10;
this.m.RegularDamage = 65;
this.m.RegularDamageMax = 85;
this.m.ArmorDamageMult = 1.0;
this.m.DirectDamageMult = 0.25;
this.m.ChanceToHitHead = 5;
}
function onEquip()
{
this.weapon.onEquip();
local skillToAdd = this.new("scripts/skills/actives/overhead_strike");
skillToAdd.setStunChance(this.m.StunChance);
this.addSkill(skillToAdd);
this.addSkill(this.new("scripts/skills/actives/split"));
this.addSkill(this.new("scripts/skills/actives/swing"));
local skillToAdd = this.new("scripts/skills/actives/split_shield");
skillToAdd.setFatigueCost(skillToAdd.getFatigueCostRaw() + 5);
this.addSkill(skillToAdd);
}
});


IP属地:中国香港1楼2024-10-09 21:59回复
    自頂


    IP属地:中国香港2楼2024-10-09 22:34
    回复
      这个文件只能修改武器面板数值,修改技能要到actives文件夹里找对应技能名字文件修改,技能名字this。new字段后面后面都告诉你了自己对照着去找


      IP属地:上海来自iPhone客户端3楼2024-10-09 23:08
      收起回复
        不过修改了技能效果是公用的,比如你改了劈盾技能的属性,那么所有带劈盾的武器都会受影响


        IP属地:上海来自iPhone客户端4楼2024-10-09 23:19
        收起回复
          原版所有武器的劈盾用的都是同一个active。你要改其他参数还好说,new之后改一下对象参数就好,但是AP消耗制作组是通过是否锁定副手位来区分,你想单独改的话有点点小麻烦。
          下面的ActionPointCost 就是你要改的东西,让我实现的话我会再加一个标志位参数用来区分巨剑和其他双手武器,或者索性给巨剑单独做一个劈盾技能,应该还简单点。
          this.split_shield <- this.inherit("scripts/skills/skill", {
          .............
          function onAfterUpdate( _properties )
          {
          this.m.FatigueCostMult = this.m.ApplyAxeMastery && _properties.IsSpecializedInAxes ? this.Const.Combat.WeaponSpecFatigueMult : 1.0;
          if (this.getContainer().getActor().getItems().getItemAtSlot(this.Const.ItemSlot.Mainhand) != null && this.getContainer().getActor().getItems().getItemAtSlot(this.Const.ItemSlot.Mainhand).getBlockedSlotType() != null)
          {
          this.m.ActionPointCost = 6;
          }
          else
          {
          this.m.ActionPointCost = 4;
          }
          }
          ...........


          IP属地:江苏5楼2024-10-10 00:59
          收起回复
            还有个土方法,你在装备里加个属性,+3AP,或者+2AP


            IP属地:浙江6楼2024-10-10 10:58
            回复
              function onUpdateProperties( _properties )
              {
              this.weapon.onUpdateProperties(_properties);
              _properties.ActionPoints += 3;
              }


              IP属地:浙江7楼2024-10-10 10:59
              回复
                火手里不少武器就有例子,一楼这种addskill之前加一行skilltoadd.actionpointcost-=1;就可以了


                IP属地:广东来自Android客户端8楼2024-10-10 11:25
                回复
                  那就简单了,还是以长柄斧的劈盾举例
                  ....
                  local split_shield = this.new("scripts/skills/actives/split_shield"); //注:new一个对象
                  split_shield.setApplyAxeMastery(true); //和你的需求无关,这是给劈盾动作里一个标志位设置用的
                  split_shield.m.MaxRange = 2; //注:以下就是你要参考的内容 比如你想改的参数是ActionPointCost
                  split_shield.m.FatigueCost += 10;//注:比如原版的这一条,使疲劳消耗在原来的基础上+10
                  split_shield.m.Icon = "skills/active_67.png";
                  split_shield.m.IconDisabled = "skills/active_67_sw.png";
                  split_shield.m.Overlay = "active_67";//
                  this.addSkill(split_shield);//注:把动作附加到武器上
                  .....
                  如果你的mod没有对这三个动作的ActionPointCost做什么新的逻辑设置,那你可以这样写
                  local skillToAdd = this.new("scripts/skills/actives/overhead_strike");
                  ....
                  skillToAdd.m.ActionPointCost -= 1; //加上这一句
                  .....
                  this.addSkill(skillToAdd);
                  split swing 同理,先new出来存到变量里,设完后再addSkill变量


                  IP属地:江苏9楼2024-10-10 11:26
                  回复
                    谢谢各位大佬!


                    IP属地:中国香港来自Android客户端10楼2024-10-10 11:56
                    回复
                      不用谢,菜鸟


                      IP属地:重庆来自iPhone客户端11楼2024-10-12 14:31
                      回复
                        呀哈哈,樓上這不是當戰狼被笑到把人拉黑的吧友嗎。不如說都沒幫忙在這說什麼不用謝,謝你之前提供的笑料嗎
                        發發繁體看看會不會又觸發應激


                        IP属地:中国香港来自Android客户端12楼2024-10-12 15:58
                        回复