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

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

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

一六四.高爆地雷(指南针放在地上作地雷)

  用记事本打开游戏目录\data\scripts\prefabs\compass.lua文件,在inst:AddComponent("inventoryitem")的下一行插入以下内容

  inst.components.inventoryitem:SetOnDroppedFn(function()

  inst:RemoveTag("startkill")

  if inst.task then inst.task:Cancel() inst.task = nil end

  end )

  inst.components.inventoryitem:SetOnPickupFn(function()

  inst:RemoveTag("startkill")

  if inst.task then inst.task:Cancel() inst.task = nil end

  end )

  inst.components.inventoryitem:SetOnPutInInventoryFn(function()

  inst:RemoveTag("startkill")

  if inst.task then inst.task:Cancel() inst.task = nil end

  end )

  local function OnDeploy (inst, pt)

  inst:AddTag("startkill")

  inst.Physics:Teleport(pt:Get())

  inst.task = inst:DoPeriodicTask(0.1, function(inst)

  local target = FindEntity(inst, 2, function(guy)

  return guy.components.combat and guy.components.health and not guy.components.health:IsDead() and not guy:HasTag("player") and not guy:HasTag("smallbird") and not guy:HasTag("chester")

  end )

  if target then

  GetPlayer().SoundEmitter:PlaySound("dontstarve/creatures/eyeballturret/shotexplo")

  SpawnPrefab("collapse_small").Transform:SetPosition(inst.Transform:GetWorldPosition())

  SpawnPrefab("explode_small").Transform:SetPosition(inst.Transform:GetWorldPosition())

  local pos = Vector3(inst.Transform:GetWorldPosition())

  GetClock():DoLightningLighting()

  GetPlayer().components.playercontroller:ShakeCamera(inst, "FULL", 0.7, 0.02, .5, 40)

  target.components.health:DoDelta(-3000)

  inst:Remove()

  end

  end )

  end

  inst:AddComponent("deployable")

  inst.components.deployable.ondeploy = OnDeploy

  inst.components.deployable.min_spacing = 2

  inst:AddComponent("stackable")

  inst.components.stackable.maxsize = 999

  local function onsave(inst, data)

  if inst:HasTag("startkill") then

  data.startkill = true

  end

  end

  local function onload(inst, data)

  if data and data.startkill then

  inst:AddTag("startkill")

  inst.task = inst:DoPeriodicTask(0.1, function(inst)

  local target = FindEntity(inst, 2, function(guy)

  return guy.components.combat and guy.components.health and not guy.components.health:IsDead() and not guy:HasTag("player") and not guy:HasTag("smallbird") and not guy:HasTag("chester")

  end )

  if target then

  GetPlayer().SoundEmitter:PlaySound("dontstarve/creatures/eyeballturret/shotexplo")

  SpawnPrefab("collapse_small").Transform:SetPosition(inst.Transform:GetWorldPosition())

  SpawnPrefab("explode_small").Transform:SetPosition(inst.Transform:GetWorldPosition())

  local pos = Vector3(inst.Transform:GetWorldPosition())

  GetClock():DoLightningLighting()

  GetPlayer().components.playercontroller:ShakeCamera(inst, "FULL", 0.7, 0.02, .5, 40)

  target.components.health:DoDelta(-3000)

  inst:Remove()

  end

  end )

  end

  end

  inst.OnSave = onsave

  inst.OnLoad = onload

  即可拿起指南针用鼠标右键部署在空地上,敌人踩上后会爆炸,主角、自养高鸟、狗箱不会触发。指南针在生存选项(画着绳套)下,用1个黄金、1张纸制造

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

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

本文是否解决了您的问题

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

  • 《红色沙漠》IGN临时评6分!110小时后尚未完成评测
    《红色沙漠》IGN临时评6分!110小时后尚未完成评测

  • 几乎全光!《生化9》女主大尺度MOD:医用口罩当内衣
    几乎全光!《生化9》女主大尺度MOD:医用口罩当内衣

  • 《红色沙漠》游民评测8.6分 可它真的太“大”了
    《红色沙漠》游民评测8.6分 可它真的太“大”了

攻略合集
人物图鉴

相关内容

在线玩推荐更多

游民星空

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

下载APP