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

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

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

一七四.霸王枪(瓦丝格雷斯矛升级为霸王枪,鼠标左键远距离突刺并撤回,右键挑飞敌人,敌人会喷血)

  用记事本打开游戏目录\data\DLC0001\scripts\prefabs\spear_wathgrithr.lua文件,

  1.在local function onequip(inst, owner)的下一行插入以下内容:

  inst.fire = SpawnPrefab( "campfirefire" )

  local follower = inst.fire.entity:AddFollower()

  follower:FollowSymbol( owner.GUID, "swap_object", 20, -88, 1 )

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

  inst.fire.Transform:SetScale(0.8, 0.8, 0.8)

  inst.fire:RemoveComponent("heater")

  inst.fire.persists = false

  2.在local function onunequip(inst, owner)的下一行插入以下内容:

  inst.fire:Remove()

  inst.fire = nil

  3.将下列内容:

  inst:AddComponent("weapon")

  inst.components.weapon:SetDamage(TUNING.WATHGRITHR_SPEAR_DAMAGE)

  -------

  inst:AddComponent("finiteuses")

  inst.components.finiteuses:SetMaxUses(TUNING.WATHGRITHR_SPEAR_USES)

  inst.components.finiteuses:SetUses(TUNING.WATHGRITHR_SPEAR_USES)

  inst.components.finiteuses:SetOnFinished( onfinished )

  替换为:

  local function canattack(inst, target)

  if TheInput:IsMouseDown(MOUSEBUTTON_RIGHT) then

  GetPlayer().AnimState:PlayAnimation("atk")

  SpawnPrefab("groundpoundring_fx").Transform:SetPosition(GetPlayer().Transform:GetWorldPosition())

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

  GetPlayer().SoundEmitter:PlaySound("dontstarve_DLC001/creatures/glommer/foot_ground")

  local pt01 = GetPlayer():GetPosition()

  local pt02 = target:GetPosition()

  target.Transform:SetPosition((pt02.x-pt01.x)*0.5+pt02.x, 0, (pt02.z-pt01.z)*0.5+pt02.z)

  local blood = SpawnPrefab("splash")

  blood.Transform:SetPosition(target.Transform:GetWorldPosition())

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

  blood.Transform:SetScale(2, 2, 2)

  if target.components.locomotor then target.components.locomotor:Stop() end

  if target.components.combat then target.components.combat:SetTarget(GetPlayer()) end

  if target.components.health then

  target.components.health:DoDelta(-100)

  if target.components.health:GetPercent() < 0.3 then

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

  end

  end

  end

  return true

  end

  local function onattack(inst, attacker, target)

  local pt1 = attacker:GetPosition()

  local pt2 = target:GetPosition()

  GetPlayer().SoundEmitter:PlaySound("dontstarve_DLC001/creatures/glommer/foot_ground")

  attacker:DoTaskInTime(0.01, function()

  attacker.Transform:SetPosition(pt2.x, pt2.y, pt2.z)

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

  SpawnPrefab("groundpoundring_fx").Transform:SetPosition(target.Transform:GetWorldPosition())

  if target.components.locomotor then target.components.locomotor:Stop() end

  attacker:StartThread(function()

  for k = 1, 3 do

  local blood = SpawnPrefab("splash")

  blood.Transform:SetPosition(pt2.x, 1.5, pt2.z)

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

  blood.Transform:SetScale(2, 2, 2)

  Sleep(.1)

  end

  end )

  if target.components.health and target.components.health:GetPercent() < 0.3 then

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

  end

  end )

  attacker:DoTaskInTime(0.3, function()

  attacker.Transform:SetPosition(pt1.x, pt1.y, pt1.z)

  end )

  end

  inst:AddComponent("weapon")

  inst.components.weapon:SetDamage(300)

  inst.components.weapon:SetRange(15, 20)

  inst.components.weapon:SetOnAttack(onattack)

  inst.components.weapon:SetCanAttack(canattack)

  即可让瓦丝格雷斯矛升级为霸王枪,装备霸王枪,鼠标左键点敌人(按住可连续攻击),会远距离突刺敌人,刺中后迅速撤回原位,不给敌人还击的机会。鼠标右键点敌人,可将敌人挑飞,按住右键扫过一群敌人,可防止被围攻。使用霸王枪时,敌人会喷血,场面极其惨烈,如果你是儿童,请捂住眼睛使用。瓦丝格雷斯矛可修改“全人物可制造瓦丝格雷斯矛、瓦丝格雷斯帽”获得

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

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

本文是否解决了您的问题

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

  • 霉霉公开热门单曲录制幕后素颜照 网友:这有点吓人
    霉霉公开热门单曲录制幕后素颜照 网友:这有点吓人

  • kun哥再发力!PS+3月会免领衔大作揭晓
    kun哥再发力!PS+3月会免领衔大作揭晓

  • 三上悠亚发性感新照!大白美腿配超诱惑姿势
    三上悠亚发性感新照!大白美腿配超诱惑姿势

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

相关内容

在线玩推荐更多

游民星空

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

下载APP