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

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

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

二五三.小病小灾(主角会感冒、食物中毒,吃曼德拉草可痊愈)

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

  local function OnEat(inst, food)

  if food and food.prefab ~= "mandrake" then

  if math.random()<0.1 then

  if not inst:HasTag("poisoning") and not inst:HasTag("fever") then

  inst:AddTag("poisoning")

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

  inst.components.health:DoDelta(-inst.components.health.maxhealth*.2)

  inst.components.sanity:DoDelta(-inst.components.sanity.max*.5)

  inst.components.locomotor.walkspeed = TUNING.WILSON_WALK_SPEED*.3

  inst.components.locomotor.runspeed = TUNING.WILSON_RUN_SPEED*.3

  inst.components.combat:SetAttackPeriod(TUNING.WILSON_ATTACK_PERIOD*5)

  inst.poison = inst:DoPeriodicTask(10, function()

  inst.components.hunger:DoDelta(-20)

  inst.components.locomotor:Stop()

  inst.AnimState:PlayAnimation("pickup")

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

  end )

  end

  end

  end

  if food.prefab == "mandrake" then

  if inst:HasTag("poisoning") then inst:RemoveTag("poisoning") end

  if inst:HasTag("fever") then inst:RemoveTag("fever") end

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

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

  inst.AnimState:SetMultColour(255/255,255/255,255/255,1)

  inst.components.locomotor.walkspeed = TUNING.WILSON_WALK_SPEED

  inst.components.locomotor.runspeed = TUNING.WILSON_RUN_SPEED

  inst.components.combat:SetAttackPeriod(TUNING.WILSON_ATTACK_PERIOD)

  end

  end

  inst.components.eater:SetOnEatFn(OnEat)

  local function OnDay(inst)

  if inst:HasTag("poisoning") then

  inst:RemoveTag("poisoning")

  inst.AnimState:SetMultColour(255/255,255/255,255/255,1)

  inst.components.locomotor.walkspeed = TUNING.WILSON_WALK_SPEED

  inst.components.locomotor.runspeed = TUNING.WILSON_RUN_SPEED

  inst.components.combat:SetAttackPeriod(TUNING.WILSON_ATTACK_PERIOD)

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

  end

  if not inst:HasTag("fever") then

  if math.random()<0.1 then

  inst:AddTag("fever")

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

  inst.components.sanity:DoDelta(-inst.components.sanity.max*.5)

  inst.components.locomotor.walkspeed = TUNING.WILSON_WALK_SPEED*.3

  inst.components.locomotor.runspeed = TUNING.WILSON_RUN_SPEED*.3

  inst.components.combat:SetAttackPeriod(TUNING.WILSON_ATTACK_PERIOD*5)

  inst.fever = inst:DoPeriodicTask(15, function()

  inst.components.health:DoDelta(-inst.components.health.maxhealth*.05)

  inst.components.locomotor:Stop()

  inst.AnimState:PlayAnimation("idle_shiver_pre")

  inst.AnimState:PushAnimation("idle_shiver_loop")

  inst.AnimState:PushAnimation("idle_shiver_pst", false)

  end )

  end

  else

  inst:RemoveTag("fever")

  inst.AnimState:SetMultColour(255/255,255/255,255/255,1)

  inst.components.locomotor.walkspeed = TUNING.WILSON_WALK_SPEED

  inst.components.locomotor.runspeed = TUNING.WILSON_RUN_SPEED

  inst.components.combat:SetAttackPeriod(TUNING.WILSON_ATTACK_PERIOD)

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

  end

  end

  inst:ListenForEvent( "daytime", function() OnDay(inst) end, GetWorld())

  即可让游戏有更加真实的体验,主角会感冒,浑身因发烧而呈红色,行动迟缓,生命值不断下降,如不注意补血,则有生命危险。另外,在吃食物时,也有一定概率发生食物中毒,浑身呈绿色,行动迟缓,且不断出现腹泻,饥饿值下降速度加快。无论感冒还是食物中毒,只要你抗过一天,基本都能痊愈,如果服用曼德拉草,则可立即痊愈。如果修改了“小诊所”,也可以给护士5个黄金治疗疾病。不要与“伍迪吃疯肉立即变海狸且随身物品不掉落”一同修改

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

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

本文是否解决了您的问题

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

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

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

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

攻略合集
人物图鉴

相关内容

在线玩推荐更多

游民星空

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

下载APP