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

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

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

二一一.无限进化(给远古祭坛500个黄金,升级主角血量、饥饿、脑最大值各100点)

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

  inst:AddComponent("health")

  inst.components.health:SetMaxHealth(TUNING.WILSON_HEALTH)

  inst.components.health.nofadeout = true

  -------

  inst:AddComponent("hunger")

  inst.components.hunger:SetMax(TUNING.WILSON_HUNGER)

  inst.components.hunger:SetRate(TUNING.WILSON_HUNGER_RATE)

  inst.components.hunger:SetKillRate(TUNING.WILSON_HEALTH/TUNING.STARVE_KILL_TIME)

  inst:AddComponent("sanity")

  inst.components.sanity:SetMax(TUNING.WILSON_SANITY)

  inst.components.sanity.onSane = OnSane

  inst.components.sanity.onInsane = OnInsane

  替换为:

  local function newupgrades(inst)

  inst.components.health.maxhealth = TUNING.WILSON_HEALTH + inst.level_num*100

  inst.components.hunger.max = TUNING.WILSON_HUNGER + inst.level_num*100

  inst.components.sanity.max = TUNING.WILSON_SANITY + inst.level_num*100

  end

  inst.level_num = 0

  inst:AddComponent("health")

  inst.components.health:SetMaxHealth(TUNING.WILSON_HEALTH + inst.level_num*100)

  inst.components.health.nofadeout = true

  inst:AddComponent("hunger")

  inst.components.hunger:SetMax(TUNING.WILSON_HUNGER + inst.level_num*100)

  inst.components.hunger:SetRate(TUNING.WILSON_HUNGER_RATE)

  inst.components.hunger:SetKillRate(TUNING.WILSON_HEALTH/TUNING.STARVE_KILL_TIME)

  inst:AddComponent("sanity")

  inst.components.sanity:SetMax(TUNING.WILSON_SANITY + inst.level_num*100)

  inst.components.sanity.onSane = OnSane

  inst.components.sanity.onInsane = OnInsane

  newupgrades(inst)

  local function onsave(inst, data)

  data.level_num = inst.level_num

  end

  local function onload(inst, data)

  inst.level_num = data.level_num or 0

  inst.components.health.maxhealth = TUNING.WILSON_HEALTH + inst.level_num*100

  inst.components.hunger.max = TUNING.WILSON_HUNGER + inst.level_num*100

  inst.components.sanity.max = TUNING.WILSON_SANITY + inst.level_num*100

  if data.health and data.health.health then inst.components.health.currenthealth = data.health.health end

  if data.hunger and data.hunger.hunger then inst.components.hunger.current = data.hunger.hunger end

  if data.sanity and data.sanity.current then inst.components.sanity.current = data.sanity.current end

  end

  inst.OnSave = onsave

  inst.OnLoad = onload

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

  local function ShouldAcceptItem(inst, item)

  local player = GetPlayer()

  if player.components.inventory:Has("goldnugget", 500) then

  if item.prefab == "goldnugget" then

  return true

  end

  end

  return false

  end

  local function OnGetItemFromPlayer(inst, giver, item)

  if item.prefab == "goldnugget" then

  giver.components.inventory:ConsumeByName("goldnugget", 499)

  giver.level_num = giver.level_num + 1

  inst.SoundEmitter:PlaySound("dontstarve/characters/wx78/levelup")

  giver.HUD.controls.status.heart:PulseGreen()

  giver.HUD.controls.status.stomach:PulseGreen()

  giver.HUD.controls.status.brain:PulseGreen()

  giver.HUD.controls.status.brain:ScaleTo(1.3,1,.7)

  giver.HUD.controls.status.heart:ScaleTo(1.3,1,.7)

  giver.HUD.controls.status.stomach:ScaleTo(1.3,1,.7)

  giver.components.health.maxhealth = TUNING.WILSON_HEALTH + giver.level_num*100

  giver.components.hunger.max = TUNING.WILSON_HUNGER + giver.level_num*100

  giver.components.sanity.max = TUNING.WILSON_SANITY + giver.level_num*100

  giver.components.health:DoDelta(giver.components.health.maxhealth)

  giver.components.hunger:DoDelta(giver.components.hunger.max)

  giver.components.sanity:DoDelta(giver.components.sanity.max)

  end

  end

  inst:AddComponent("trader")

  inst.components.trader.onaccept = OnGetItemFromPlayer

  inst.components.trader:SetAcceptTest(ShouldAcceptItem)

  即可给远古祭坛500个黄金(拿着黄金对远古祭坛按鼠标左键),升级主角血量、饥饿、脑最大值各100点,升级无上限,身上黄金不足500时不会升级。如果缺少黄金,可以修改“菜市场”、“肉食店”、“流动商贩”、“杂货收购行”、“收藏品黑市”、“收藏品期货市场”等交易系统赚取黄金(见本修改技巧)。用机器人(wx78)、大力士(沃尔夫冈)作主角时,不要修改此项

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

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

本文是否解决了您的问题

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

  • 《生化9》女主死亡画面流出!或是系列最血腥?
    《生化9》女主死亡画面流出!或是系列最血腥?

  • 腾讯关闭天美蒙特利尔工作室!成立5年没有自己作品
    腾讯关闭天美蒙特利尔工作室!成立5年没有自己作品

  • 36斤活羊烤完只剩6.9斤引争议 商家称属正常损耗
    36斤活羊烤完只剩6.9斤引争议 商家称属正常损耗

攻略合集
近期更新
人物图鉴

相关内容

在线玩推荐更多

游民星空

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

下载APP