饥荒 全人物解锁及主角自动回血等实用修改教程
《饥荒》这款生存游戏,很多玩家都想觉得游戏有些难,就想修改一些内容,比如解锁全人物,主角自动回血,主角不会饿之类的,下面小编为大家奉上最全的修改教程,内容简单易懂,希望各位玩家喜欢。
目录
| 《饥荒》巨人的统治精华文章推荐 | |||
一.全人物解锁
用记事本打开游戏目录\data\scripts\playerprofile.lua文件,将下列内容:
return true -- mod character
end
return false
替换为:
return true -- mod character
end
return true
即可解锁全人物进行游戏
二.提高主角血量10倍
用记事本打开游戏目录\data\DLC0001\scripts\tuning.lua文件,
1.将local wilson_health = 150替换为local wilson_health = 1500
2.将WX78_MIN_HEALTH = 100,替换为WX78_MIN_HEALTH = 1000,
3.将WX78_MAX_HEALTH = 400,替换为WX78_MAX_HEALTH = 4000,
4.将下列内容:
WOLFGANG_HEALTH_MIGHTY = 300,
WOLFGANG_HEALTH_NORMAL = 200,
WOLFGANG_HEALTH_WIMPY = 150,
替换为:
WOLFGANG_HEALTH_MIGHTY = 3000,
WOLFGANG_HEALTH_NORMAL = 2000,
WOLFGANG_HEALTH_WIMPY = 1500,
5.将WATHGRITHR_HEALTH = 200,替换为WATHGRITHR_HEALTH = 2000,
6.将WEBBER_HEALTH = 175,替换为WEBBER_HEALTH = 1750,
即可让全部主角血量提高10倍,修改这里也使盔甲的耐久度同步上升10倍
三.主角自动回血
用记事本打开游戏目录\data\DLC0001\scripts\prefabs\player_common.lua文件,在inst.components.health:SetMaxHealth(TUNING.WILSON_HEALTH)的下一行插入以下内容:
inst.components.health:StartRegen(30, 10)
即可让主角自动回血,其中30为血量,10为10秒回血一次,可自行调整
四.增加食物及料理补血量10倍
用记事本打开游戏目录\data\DLC0001\scripts\tuning.lua文件,将以下内容:
HEALING_TINY = 1,
HEALING_SMALL = 3,
HEALING_MEDSMALL = 8,
HEALING_MED = 20,
HEALING_MEDLARGE = 30,
HEALING_LARGE = 40,
HEALING_HUGE = 60,
HEALING_SUPERHUGE = 100,
替换为:
HEALING_TINY = 10,
HEALING_SMALL = 30,
HEALING_MEDSMALL = 80,
HEALING_MED = 200,
HEALING_MEDLARGE = 300,
HEALING_LARGE = 400,
HEALING_HUGE = 600,
HEALING_SUPERHUGE = 1000,
即可增加食物及料理补血量10倍
五.菩萨低眉(主角受怪物攻击毫发无伤,怪物反暴毙)
用记事本打开游戏目录\data\DLC0001\scripts\prefabs\player_common.lua文件,将下列内容:
inst:AddComponent("grue")
inst.components.grue:SetSounds("dontstarve/charlie/warn","dontstarve/charlie/attack")
替换为:
local function OnAttacked(inst, data)
inst.components.health:DoDelta(inst.components.health.maxhealth)
inst.components.sanity:DoDelta(inst.components.sanity.max)
if data.attacker.components.health then
data.attacker.components.health:DoDelta(-3000)
end
end
inst:ListenForEvent("attacked", OnAttacked)
即可让主角受攻击时不掉血、不伤脑,怪物反暴毙,并且主角在黑暗中不会被杀死。这是献给不杀生派玩家的礼物,慈悲也是一种力量。不要与“近卫军”一同修改
六.复活石无限使用(主角永生)
用记事本打开游戏目录\data\DLC0001\scripts\prefabs\resurrectionstone.lua文件,在inst:Remove()的下一行插入以下内容:
SpawnPrefab("resurrectionstone").Transform:SetPosition(inst.Transform:GetWorldPosition())
主角复活后,再点身下的复活石,可使复活石再次完整
七.主角自动补脑(妈妈再也不用担心我的学习)
用记事本打开游戏目录\data\DLC0001\scripts\tuning.lua文件,将下列内容:
SANITY_DAY_GAIN = 0,--100/(day_time*32),
SANITY_NIGHT_LIGHT = -100/(night_time*20),
SANITY_NIGHT_MID = -100/(night_time*20),
SANITY_NIGHT_DARK = -100/(night_time*2),
替换为:
SANITY_DAY_GAIN = 100/(day_time),
SANITY_NIGHT_LIGHT = 100/(night_time),
SANITY_NIGHT_MID = 100/(night_time),
SANITY_NIGHT_DARK = 100/(night_time),
即可让主角自动补脑,地洞里也不例外
八.主角不会饿
用记事本打开游戏目录\data\DLC0001\scripts\tuning.lua文件,将local calories_per_day = 75替换为local calories_per_day = 0
即可从每天减75饥饿值变为不减
九.延缓冻、饿死亡时间
用记事本打开游戏目录\data\DLC0001\scripts\tuning.lua文件,将以下内容:
FREEZING_KILL_TIME = 120,
STARVE_KILL_TIME = 120,
替换为:
FREEZING_KILL_TIME = 1200,
STARVE_KILL_TIME = 1200,
即可延缓冻、饿死亡时间10倍
十.主角不怕火、无惧黑暗
用记事本打开游戏目录\data\DLC0001\scripts\prefabs\player_common.lua文件,将下列内容:
inst:AddComponent("grue")
inst.components.grue:SetSounds("dontstarve/charlie/warn","dontstarve/charlie/attack")
替换为:
--inst:AddComponent("grue")
--inst.components.grue:SetSounds("dontstarve/charlie/warn","dontstarve/charlie/attack")
inst.components.health.fire_damage_scale = 0
即可让主角不怕火、无惧黑暗
十一.提高主角攻击力
用记事本打开游戏目录\data\DLC0001\scripts\tuning.lua文件,将local wilson_attack = 34替换为local wilson_attack = 500
即可将主角攻击力由34提高到500,数字可自行调整
十二.主角可渡海(没有什么可以阻挡,你对自由的向往)
用记事本打开游戏目录\data\DLC0001\scripts\components\playeractionpicker.lua文件,将共2句passable = tile ~= GROUND.IMPASSABLE均替换为passable = tile >= GROUND.IMPASSABLE
即可让主角能通过橙色魔杖、瑞士手杖(见本修改技巧)传送到海上(装备橙色魔杖、瑞士手杖后鼠标右键点海面),并能够行在水上,连地下的沟壑也无法阻挡。注意要替换的语句有2句,千万别只替换了1句哦
十三.主角跑得更快
用记事本打开游戏目录\data\DLC0001\scripts\tuning.lua文件,将以下内容:
WILSON_WALK_SPEED = 4,
WILSON_RUN_SPEED = 6,
替换为:
WILSON_WALK_SPEED = 8,
WILSON_RUN_SPEED = 12,
即可让主角跑步速度增加1倍
十四.背猪皮包、穿大理石盔甲行走速度不减慢
用记事本打开游戏目录\data\DLC0001\scripts\tuning.lua文件,
1.将PIGGYBACK_SPEED_MULT = 0.9,替换为PIGGYBACK_SPEED_MULT = 1,
2.将ARMORMARBLE_SLOW = 0.7,替换为ARMORMARBLE_SLOW = 1,
即可背猪皮包、穿大理石盔甲行走速度不减慢
十五.提高拿手杖行走速度
用记事本打开游戏目录\data\DLC0001\scripts\tuning.lua文件,将CANE_SPEED_MULT = 1.25,替换为CANE_SPEED_MULT = 2.5,
即可将拿手杖行走速度提高1倍
十六.解锁全科技(全人物不用机器就可造全部物品)
1.用记事本打开游戏目录\data\DLC0001\scripts\prefabs\player_common.lua文件,在inst:AddComponent("builder")下一行插入以下内容:
inst.components.builder.science_bonus = 3
inst.components.builder.magic_bonus = 3
inst.components.builder.ancient_bonus = 4
2.用记事本打开游戏目录\data\DLC0001\scripts\prefabs\wickerbottom.lua文件,将inst.components.builder.science_bonus = 1替换为--inst.components.builder.science_bonus = 1
即可让全人物不用机器就可造全部物品,远古物品也不用靠近祭坛就可制造
十七.快速制造物品
用记事本打开游戏目录\data\DLC0001\scripts\actions.lua文件,将BUILD = Action(),替换为BUILD = Action(0, true),
即可跳过制造物品的动画,快速制造物品
十八.地图全开(游戏中按Ctrl+1)
用记事本打开游戏目录\data\DLC0001\scripts\prefabs\player_common.lua文件,在inst:AddComponent("resurrectable")下一行插入以下内容:
TheInput:AddKeyUpHandler(KEY_1, function()
if TheInput:IsKeyDown(KEY_CTRL) then
local map = TheSim:FindFirstEntityWithTag("minimap")
local x,y,z = GetPlayer().Transform:GetWorldPosition()
map.MiniMap:ShowArea(x, y, z, 10000)
end
end)
即可在游戏中按Ctrl + 1使地图全开
十九.加大单格堆叠数量
用记事本打开游戏目录\data\DLC0001\scripts\tuning.lua文件,将以下内容:
STACK_SIZE_LARGEITEM = 10,
STACK_SIZE_MEDITEM = 20,
STACK_SIZE_SMALLITEM = 40,
替换为:
STACK_SIZE_LARGEITEM = 999,
STACK_SIZE_MEDITEM = 999,
STACK_SIZE_SMALLITEM = 999,
即可加大单格堆叠数量至999
二十.增加主角物品条的格子
用记事本打开游戏目录\data\DLC0001\scripts\components\inventory.lua文件,将local MAXSLOTS = 15替换为local MAXSLOTS = 25
即可将主角物品条的格子由15个增加到25个
二十一.双层主角物品条(60格)
1.用记事本打开游戏目录\data\DLC0001\scripts\components\inventory.lua文件,将local MAXSLOTS = 15替换为local MAXSLOTS = 60
2.用记事本打开游戏目录\data\scripts\widgets\inventorybar.lua文件,将self.bg:SetScale(1.15,1,1)替换为self.bg:SetScale(1.86,1.85,1)
3.将下列内容:
local num_intersep = math.floor(num_slots / 5) + 1
local total_w = (num_slots + num_equip)*(W) + (num_slots + num_equip - 2 - num_intersep) *(SEP) + INTERSEP*num_intersep
for k, v in ipairs(self.equipslotinfo) do
local slot = EquipSlot(v.slot, v.atlas, v.image, self.owner)
self.equip[v.slot] = self.toprow:AddChild(slot)
local x = -total_w/2 + (num_slots)*(W)+num_intersep*(INTERSEP - SEP) + (num_slots-1)*SEP + INTERSEP + W*(k-1) + SEP*(k-1)
slot:SetPosition(x,0,0)
table.insert(eslot_order, slot)
local item = self.owner.components.inventory:GetEquippedItem(v.slot)
if item then
slot:SetTile(ItemTile(item))
end
end
for k = 1,num_slots do
local slot = InvSlot(k, HUD_ATLAS, "inv_slot.tex", self.owner, self.owner.components.inventory)
self.inv[k] = self.toprow:AddChild(slot)
local interseps = math.floor((k-1) / 5)
local x = -total_w/2 + W/2 + interseps*(INTERSEP - SEP) + (k-1)*W + (k-1)*SEP
slot:SetPosition(x,0,0)
slot.top_align_tip = W*0.5 + YSEP
local item = self.owner.components.inventory:GetItemInSlot(k)
if item then
slot:SetTile(ItemTile(item))
end
end
替换为:
local num_intersep = math.floor(num_slots / 10) + 1
local total_w = (num_slots -30.85)*(W) + (num_slots -30.85 - 2 - num_intersep) *(SEP) + INTERSEP*num_intersep
for k, v in ipairs(self.equipslotinfo) do
local slot = EquipSlot(v.slot, v.atlas, v.image, self.owner)
self.equip[v.slot] = self.toprow:AddChild(slot)
local x = -total_w/2 + (num_slots*0+14.07)*(W)+num_intersep*(INTERSEP - SEP) + (num_slots-1)*SEP + INTERSEP + W*(k-1) + SEP*(k-1)
slot:SetPosition(x+341,190,0)
table.insert(eslot_order, slot)
local item = self.owner.components.inventory:GetEquippedItem(v.slot)
if item then
slot:SetTile(ItemTile(item))
end
end
for k = 1,30 do
local slot = InvSlot(k, HUD_ATLAS, "inv_slot.tex", self.owner, self.owner.components.inventory)
self.inv[k] = self.toprow:AddChild(slot)
local interseps = math.floor((k-1) / 10)
local x = -total_w/2 + W/2 + interseps*(INTERSEP - SEP) + (k-1)*W + (k-1)*SEP
slot:SetPosition(x,0,0)
local item = self.owner.components.inventory:GetItemInSlot(k)
if item then
slot:SetTile(ItemTile(item))
end
end
for k = 31,60 do
local slot = InvSlot(k, HUD_ATLAS, "inv_slot.tex", self.owner, self.owner.components.inventory)
self.inv[k] = self.toprow:AddChild(slot)
local interseps = math.floor((k-1-30) / 10)
local x = -total_w/2 + W/2 + interseps*(INTERSEP - SEP) + (k-1-30)*W + (k-1-30)*SEP
slot:SetPosition(x,80,0)
local item = self.owner.components.inventory:GetItemInSlot(k)
if item then
slot:SetTile(ItemTile(item))
end
end
即可获得双层主角物品条(60格),注意必须将游戏设置(options) - (Settings) - HUD size项设为0,即显示最小物品条,才可完整显示60格哦
二十二.同时携带多个背包(背包可库存)
1.同时携带多个普通背包:用记事本打开游戏目录\data\DLC0001\scripts\prefabs\backpack.lua文件,将inst.components.inventoryitem.cangoincontainer = false替换为inst.components.inventoryitem.cangoincontainer = true
2.同时携带多个小猪包:用记事本打开游戏目录\data\DLC0001\scripts\prefabs\piggyback.lua文件,将inst.components.inventoryitem.cangoincontainer = false替换为inst.components.inventoryitem.cangoincontainer = true
3.同时携带多个坎普斯背包:用记事本打开游戏目录\data\DLC0001\scripts\prefabs\krampus_sack.lua文件,将inst.components.inventoryitem.cangoincontainer = false替换为inst.components.inventoryitem.cangoincontainer = true
4.同时携带多个冰包:用记事本打开游戏目录\data\DLC0001\scripts\prefabs\icepack.lua文件,将inst.components.inventoryitem.cangoincontainer = false替换为inst.components.inventoryitem.cangoincontainer = true
即可同时携带多个背包
二十三.背包格子增大至39格
用记事本打开游戏目录\data\DLC0001\scripts\prefabs\backpack.lua文件,
1.将下列内容:
for y = 0, 3 do
table.insert(slotpos, Vector3(-162, -y*75 + 114 ,0))
table.insert(slotpos, Vector3(-162 +75, -y*75 + 114 ,0))
替换为:
for y = 0, 12 do
table.insert(slotpos, Vector3(-162, -y*75 + 435 ,0))
table.insert(slotpos, Vector3(-162 +75, -y*75 + 435 ,0))
table.insert(slotpos, Vector3(-162 +150, -y*75 + 435 ,0))
2.将下列内容:
inst.components.container.widgetanimbank = "ui_backpack_2x4"
inst.components.container.widgetanimbuild = "ui_backpack_2x4"
inst.components.container.widgetpos = Vector3(-5,-70,0)
替换为:
--inst.components.container.widgetanimbank = "ui_backpack_2x4"
--inst.components.container.widgetanimbuild = "ui_backpack_2x4"
inst.components.container.widgetpos = Vector3(-25,-50,0)
即可让普通背包格子增大至39格
二十四.制造坎普斯背包
用记事本打开游戏目录\data\DLC0001\scripts\recipes.lua文件,在Recipe("piggyback", {Ingredient("pigskin", 4), Ingredient("silk", 6), Ingredient("rope", 2)}, RECIPETABS.SURVIVAL, TECH.SCIENCE_TWO)的下一行插入以下内容:
Recipe("krampus_sack", {Ingredient("cutgrass", 5),Ingredient("twigs", 5)}, RECIPETABS.SURVIVAL, TECH.NONE)
即可在生存选项(画着绳套)下,用5个草、5个树杈制造坎普斯背包。不要与“巨型超市”一同修改,因为“巨型超市”中已经有坎普斯背包出售
二十五.伍迪砍树不会变海狸
用记事本打开游戏目录\data\DLC0001\scripts\prefabs\woodie.lua文件,将inst.components.beaverness:DoDelta(3)替换为inst.components.beaverness:DoDelta(0)
即可让伍迪砍树不会变海狸
二十六.伍迪吃疯肉立即变海狸且随身物品不掉落
用记事本打开游戏目录\data\DLC0001\scripts\prefabs\woodie.lua文件,
1.将inst.components.inventory:DropEverything()替换为--inst.components.inventory:DropEverything()
2.在inst.Light:SetColour(245/255,40/255,0/255)的下一行插入以下内容:
local function OnEat(inst, food)
if food.prefab == "monstermeat" and not inst.components.beaverness:IsBeaver() then
if not inst.components.beaverness.doing_transform then
inst.components.beaverness:SetPercent(1)
end
end
end
inst.components.eater:SetOnEatFn(OnEat)
即可让伍迪吃疯肉立即变海狸,随身物品还保留在身上(只是看不见),等变回伍迪即可使用。不要在伍迪佩戴橙色护身符时变海狸,否则砍的木头都自动被吸走,海狸无法吃到。不要与“小病小灾”一同修改
二十七.图书管理员不再失眠(老太太可以睡帐篷)
用记事本打开游戏目录\data\DLC0001\scripts\prefabs\wickerbottom.lua文件,将inst:AddTag("insomniac")替换为--inst:AddTag("insomniac")
即可让老太太也可以睡帐篷
二十八.麦斯威尔用魔法书召唤分身不减脑上限
1.用记事本打开游戏目录\data\scripts\prefabs\waxwelljournal.lua文件,将reader.components.sanity:RecalculatePenalty()替换为--reader.components.sanity:RecalculatePenalty()
2.用记事本打开游戏目录\data\scripts\prefabs\shadowwaxwell.lua文件,将下列内容:
inst:ListenForEvent("death", ondeath)
inst:AddComponent("inventory")
inst.components.inventory.dropondeath = false
inst:AddComponent("sanityaura")
inst.components.sanityaura.penalty = TUNING.SHADOWWAXWELL_SANITY_PENALTY
替换为:
--inst:ListenForEvent("death", ondeath)
inst:AddComponent("inventory")
inst.components.inventory.dropondeath = false
--inst:AddComponent("sanityaura")
--inst.components.sanityaura.penalty = TUNING.SHADOWWAXWELL_SANITY_PENALTY
即可在麦斯威尔用魔法书召唤分身时不减脑上限
二十九.瓦丝格雷斯可以吃蔬菜
用记事本打开游戏目录\data\DLC0001\scripts\prefabs\wathgrithr.lua文件,将inst.components.eater:SetCarnivore(true)替换为--inst.components.eater:SetCarnivore(true)
即可让红发妹瓦丝格雷斯不止可以吃肉,也可以吃蔬菜
三十.韦伯不被当成怪物
用记事本打开游戏目录\data\DLC0001\scripts\prefabs\webber.lua文件,将inst:AddTag("monster")替换为--inst:AddTag("monster")
即可让韦伯不被当成怪物,猪人、兔人等中立动物不会主动攻击你
PC
PS4
Switch