饥荒 全人物解锁及主角自动回血等实用修改教程

《饥荒》这款生存游戏,很多玩家都想觉得游戏有些难,就想修改一些内容,比如解锁全人物,主角自动回血,主角不会饿之类的,下面小编为大家奉上最全的修改教程,内容简单易懂,希望各位玩家喜欢。目录

饥荒 全人物解锁及主角自动回血等实用修改教程

九十五.游牧生涯(带牛毛帽让牛群跟随,牛不集体攻击主角)

  1.用记事本打开游戏目录\data\DLC0001\scripts\prefabs\hats.lua文件,将下列内容:

  local function beefalo_equip(inst, owner)

  onequip(inst, owner)

  owner:AddTag("beefalo")

  end

  local function beefalo_unequip(inst, owner)

  onunequip(inst, owner)

  owner:RemoveTag("beefalo")

  end

  local function beefalo()

  local inst = simple()

  inst.components.equippable:SetOnEquip( beefalo_equip )

  inst.components.equippable:SetOnUnequip( beefalo_unequip )

  inst:AddComponent("insulator")

  inst.components.insulator:SetInsulation(TUNING.INSULATION_LARGE)

  inst:AddComponent("waterproofer")

  inst.components.waterproofer:SetEffectiveness(TUNING.WATERPROOFNESS_SMALL)

  inst:AddComponent("fueled")

  inst.components.fueled.fueltype = "USAGE"

  inst.components.fueled:InitializeFuelLevel(TUNING.BEEFALOHAT_PERISHTIME)

  inst.components.fueled:SetDepletedFn(generic_perish)

  return inst

  end

  替换为:

  local function beefalo_disable(inst)

  if inst.updatetask then

  inst.updatetask:Cancel()

  inst.updatetask = nil

  end

  local owner = inst.components.inventoryitem and inst.components.inventoryitem.owner

  owner.components.leader:RemoveFollowersByTag("beefalo")

  end

  local function beefalo_update(inst)

  local owner = inst.components.inventoryitem and inst.components.inventoryitem.owner

  if owner and owner.components.leader then

  local x,y,z = owner.Transform:GetWorldPosition()

  local ents = TheSim:FindEntities(x,y,z, TUNING.SPIDERHAT_RANGE, {"beefalo"})

  for k,v in pairs(ents) do

  if v.components.follower and not v.components.follower.leader and not owner.components.leader:IsFollower(v) and owner.components.leader.numfollowers < 50 then

  owner.components.leader:AddFollower(v)

  end

  end

  end

  end

  local function beefalo_enable(inst)

  inst.updatetask = inst:DoPeriodicTask(0.5, beefalo_update, 1)

  end

  local function beefalo_equip(inst, owner)

  onequip(inst, owner)

  beefalo_enable(inst)

  owner:AddTag("beefalo")

  end

  local function beefalo_unequip(inst, owner)

  onunequip(inst, owner)

  beefalo_disable(inst)

  owner:RemoveTag("beefalo")

  end

  local function beefalo_perish(inst)

  beefalo_disable(inst)

  inst:Remove()

  end

  local function beefalo()

  local inst = simple()

  inst.components.equippable:SetOnEquip( beefalo_equip )

  inst.components.equippable:SetOnUnequip( beefalo_unequip )

  inst:AddComponent("insulator")

  inst.components.insulator.insulation = TUNING.INSULATION_LARGE

  inst:AddComponent("waterproofer")

  inst.components.waterproofer:SetEffectiveness(TUNING.WATERPROOFNESS_SMALL)

  inst:AddComponent("fueled")

  inst.components.fueled.fueltype = "USAGE"

  inst.components.fueled:InitializeFuelLevel(TUNING.BEEFALOHAT_PERISHTIME)

  inst.components.fueled:SetDepletedFn(beefalo_perish)

  return inst

  end

  2.用记事本打开游戏目录\data\scripts\prefabs\beefalo.lua文件,将return not guy:HasTag("beefalo") and替换为return not guy:HasTag("beefalo") and not guy:HasTag("player") and

  3.将return dude:HasTag("beefalo") and not dude:HasTag("player") and not dude.components.health:IsDead()替换为return dude:HasTag("beefalo") and dude:HasTag("player") and not dude.components.health:IsDead()

  4.将inst.components.locomotor.walkspeed = 1.5替换为inst.components.locomotor.walkspeed = 3

  即可带牛毛帽让牛群跟随,杀牛它们不会集体反击,也提高了牛走路的速度。加上“牛产便便速度增加1倍”、“喂牛蔬菜无限产黄油”、“牛醒着也可剪牛毛”的修改(见本修改技巧),就可以烧着便便取暖,吃牛肉、黄油,经营自己的牛群吧

相关内容请关注:饥荒专区

作者:易宁     责任编辑:Shy夏夏

本文是否解决了您的问题

APP精彩推荐打开游民APP查看更多

  • 路边捡到野生黑丝的后果 研究合体下一步的囧图
    路边捡到野生黑丝的后果 研究合体下一步的囧图

  • onlyfans性感女星:我总收入已经达到1亿美元
    onlyfans性感女星:我总收入已经达到1亿美元

  • 三上悠亚谈理想型老公 一代女神的动态图
    三上悠亚谈理想型老公 一代女神的动态图

攻略合集
人物图鉴

相关内容

在线玩推荐更多

游民星空

打开App阅读体验更佳,攻略、资讯实时更新

下载APP