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

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

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

二四七.观赏秃鹫(用蛛丝种笼中的秃鹫,喂腐烂食物产种子,喂肉生高鸟蛋)

  1.用记事本打开游戏目录\data\DLC0001\scripts\prefabs\spoiledfood.lua文件,在inst:AddComponent("inspectable")的下一行插入inst:AddComponent("tradable")

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

  local function makecage(inst)

  local pt = inst:GetPosition()

  local cage = SpawnPrefab("silk")

  cage.Transform:SetPosition(pt.x, pt.y, pt.z)

  cage.AnimState:SetBank("birdcage")

  cage.AnimState:SetBuild("bird_cage")

  cage.AnimState:PlayAnimation("idle")

  cage.AnimState:SetMultColour(0/255,255/255,0/255,1)

  MakeObstaclePhysics(cage, .5 )

  cage:RemoveComponent("tradable")

  cage:RemoveComponent("stackable")

  cage:RemoveComponent("inventoryitem")

  cage:RemoveComponent("upgrader")

  cage:RemoveComponent("deployable")

  cage:RemoveTag("cattoy")

  cage:AddComponent("named")

  cage.components.named:SetName("Buzzard")

  cage:AddComponent("lootdropper")

  cage:AddComponent("workable")

  cage.components.workable:SetWorkAction(ACTIONS.HAMMER)

  cage.components.workable:SetWorkLeft(3)

  cage.components.workable:SetOnFinishCallback(function(cage, worker)

  SpawnPrefab("collapse_big").Transform:SetPosition(cage.Transform:GetWorldPosition())

  GetPlayer().SoundEmitter:PlaySound("dontstarve/common/destroy_wood")

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

  local ents = TheSim:FindEntities(pos.x,pos.y,pos.z, 2)

  for k,v in pairs(ents) do

  if v:HasTag("cageanimal") then

  v:Remove()

  end

  end

  cage:Remove()

  end )

  cage:AddComponent("trader")

  cage.components.trader:SetAcceptTest(function(cage, item)

  if item.prefab == "spoiled_food" or item.prefab == "meat" or item.prefab == "smallmeat" then

  return true

  end

  return false

  end )

  cage.components.trader.onaccept = function(cage, giver, item)

  GetPlayer().SoundEmitter:PlaySound("dontstarve_DLC001/creatures/buzzard/taunt")

  if item.prefab == "spoiled_food" then

  for k = 1, math.random(5) do

  local names = {"carrot_seeds","corn_seeds","pumpkin_seeds","eggplant_seeds","durian_seeds","pomegranate_seeds","dragonfruit_seeds","watermelon_seeds","seeds"}

  local name = names[math.random(#names)]

  cage.components.lootdropper:SpawnLootPrefab(name)

  end

  end

  if item.prefab == "meat" or item.prefab == "smallmeat" then

  cage.components.lootdropper:SpawnLootPrefab("tallbirdegg")

  end

  end

  cage:AddTag("cages")

  local animal = SpawnPrefab("silk")

  animal.AnimState:SetBank("buzzard")

  animal.AnimState:SetBuild("buzzard_build")

  animal.AnimState:PlayAnimation("idle", true)

  animal.Transform:SetFourFaced()

  animal.Physics:SetActive(false)

  animal.entity:AddSoundEmitter()

  animal:AddTag("NOCLICK")

  animal:RemoveComponent("tradable")

  animal:RemoveComponent("stackable")

  animal:RemoveComponent("inventoryitem")

  animal:RemoveComponent("upgrader")

  animal:RemoveComponent("deployable")

  animal:RemoveTag("cattoy")

  local follower = animal.entity:AddFollower()

  follower:FollowSymbol( cage.GUID, "swap_object", -10, -220, -0.1 )

  animal:DoPeriodicTask(10, function(animal)

  animal.AnimState:PlayAnimation("caw")

  animal.SoundEmitter:PlaySound("dontstarve_DLC001/creatures/buzzard/taunt")

  animal:DoTaskInTime(1.5, function() animal.AnimState:PlayAnimation("idle", true) end )

  end )

  animal:AddTag("cageanimal")

  end

  local function OnDeploy (inst, pt)

  makecage(inst)

  inst.components.stackable:Get():Remove()

  end

  inst:AddComponent("deployable")

  inst.components.deployable.ondeploy = OnDeploy

  local function onsave(inst, data)

  if inst:HasTag("cages") then

  data.cages = true

  end

  if inst:HasTag("cageanimal") then

  data.cageanimal = true

  end

  end

  local function onload(inst, data)

  if data and data.cages then

  makecage(inst)

  inst:Remove()

  end

  if data and data.cageanimal then

  inst:Remove()

  end

  end

  inst.OnSave = onsave

  inst.OnLoad = onload

  即可用蛛丝种关在笼中的秃鹫(拿着1个蛛丝对地面点鼠标右键,如果拿着多个,则不会种出来),喂它腐烂食物,会掉落随机品种的植物种子,喂大肉、小肉会生高鸟蛋。不想要观赏秃鹫了,用锤子砸掉即可

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

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

本文是否解决了您的问题

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

  • 网上擦边不用露脸 缺乏性资源遂成为性资源的囧图
    网上擦边不用露脸 缺乏性资源遂成为性资源的囧图

  • 阿曼达塞弗里德自曝 她在新片裸戏中戴了
    阿曼达塞弗里德自曝 她在新片裸戏中戴了"假体肛门"

  • 将微胖还给真正胖的人 聚焦练腿姿势的动态图
    将微胖还给真正胖的人 聚焦练腿姿势的动态图

攻略合集
人物图鉴

相关内容

在线玩推荐更多

游民星空

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

下载APP