《饥荒》海难DLC控制台代码汇总 作弊码修改方法介绍
发布时间:2019-02-07 作者:悟饭小编 1192 人看过 已有[0+ ]人评论

《饥荒》海难DLC目前已经发布有一段时间,很多玩家都已体验游戏,海难DLC控制台代码怎么用?接下来为大家带来玩家“Leeds我去我去”分享的控制台代码大全,以供玩家们参考。

地图全开(游戏中按Ctrl+1)
用记事本打开游戏目录\data\DLC0002\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\DLC0002\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\scripts\prefabs\rocks.lua文件,
1.在{'nitre', 0.25},的下一行插入以下内容:
{'goldnugget', 1.00},
{'goldnugget', 1.00},
{'goldnugget', 1.00},
2.在{'goldnugget', 0.25},的下一行插入以下内容:
{'goldnugget', 1.00},
{'goldnugget', 1.00},
{'goldnugget', 1.00},
3.在{'rocks', 0.6},的下一行插入以下内容:
{'goldnugget', 1.00},
{'goldnugget', 1.00},
{'goldnugget', 1.00},
4.在{'rocks', 0.4},的下一行插入以下内容:
{'goldnugget', 1.00},
{'goldnugget', 1.00},
{'goldnugget', 1.00},
5.在{'rocks', 0.2},的下一行插入以下内容:
{'goldnugget', 1.00},
{'goldnugget', 1.00},
{'goldnugget', 1.00},
即可在采矿时多掉3块黄金

农田收获更多产品

用记事本打开游戏目录\data\DLC0002\scripts\components\crop.lua 文件,将以下内容: harvester.components.inventory:Give Item(product) 替换为: harvester.components.inventory:GiveItem(SpawnPrefab(self.product_prefab)) harvester.components.inventory:GiveItem(SpawnPrefab(self.product_prefab)) harvester.components.inventory:GiveItem(SpawnPrefab(self.product_prefab)) 即 可 一 次 收 获 3 个 产 品 , 想 收 获 多 少 , 就 复 制 多 少 行 harvester.components.inventory:GiveItem(SpawnPrefab(self.product_prefab))即可

煮一锅收多个料理
用记事本打开游戏目录\data\DLC0002\scripts\components\stewer.lua文件,将以下内容:
harvester.components.inventory:GiveItem(loot, nil, Vector3(TheSim:GetScreenPos(self.inst.Transform:GetWorldPosition())))
替换为:
harvester.components.inventory:GiveItem(SpawnPrefab(self.product))
harvester.components.inventory:GiveItem(SpawnPrefab(self.product))
harvester.components.inventory:GiveItem(SpawnPrefab(self.product))
即可煮一锅收3个料理,想收多少,就复制多少行harvester.components.inventory:GiveItem(SpawnPrefab(self.product))即可

冰箱永久保鲜
用记事本打开游戏目录\data\DLC0002\scripts\tuning.lua文件,将
PERISH_FRIDGE_MULT = .5,替换为PERISH_FRIDGE_MULT = 0,
即可让放入冰箱的食物永久保鲜。如果将0改为负数比如-5,则可使不新鲜的食物回复新鲜度

晾肉架一次收多块干肉
用记事本打开游戏目录\data\DLC0002\scripts\components\dryer.lua文件,将以下内容:
harvester.components.inventory:GiveItem(loot, nil, Vector3(TheSim:GetScreenPos(self.inst.Transform:GetWorldPosition())))
替换为:
harvester.components.inventory:GiveItem(SpawnPrefab(self.product))
harvester.components.inventory:GiveItem(SpawnPrefab(self.product))
harvester.components.inventory:GiveItem(SpawnPrefab(self.product))
即可晾1块肉收3块干肉,想收多少,就复制多少行harvester.components.inventory:GiveItem(SpawnPrefab(self.product))即可

收获蜂箱不被蛰
用记事本打开游戏目录\data\DLC0002\scripts\prefabs\beebox.lua文件,将inst.components.childspawner:ReleaseAllChildren(picker)替换为--inst.components.childspawner:ReleaseAllChildren(picker)
即可在收获蜂箱不被蛰

背包可冷藏食品
1.普通背包可冷藏食品:用记事本打开游戏目录\data\DLC0002\scripts\prefabs\backpack.lua文件,在inst:AddComponent("inspectable")的下一行插入inst:AddTag("fridge")
2.小猪包可冷藏食品:用记事本打开游戏目录\data\DLC0002\scripts\prefabs\piggyback.lua文件,在inst:AddComponent("inspectable")的下一行插入inst:AddTag("fridge")

花瓣种花(花可移植)
用记事本打开游戏目录\data\DLC0002\scripts\prefabs\petals.lua文件,在inst:AddComponent("inspectable")的下一行插入以下内容:
local function OnDeploy (inst, pt)
SpawnPrefab("flower").Transform:SetPosition(pt.x, pt.y, pt.z)
inst.components.stackable:Get():Remove()
end
inst:AddComponent("deployable")
inst.components.deployable.ondeploy = OnDeploy
即可用花瓣种花,使花可方便移植

用蘑菇种蘑菇(蘑菇可移植)
用记事本打开游戏目录\data\DLC0002\scripts\prefabs\mushrooms.lua文件,inst.AnimState:PlayAnimation(data.animname.."_cap")的下一行插入以下内容:
local function OnDeploy (inst, pt)
SpawnPrefab(data.animname.."_mushroom").Transform:SetPosition(pt.x, pt.y, pt.z) inst.components.stackable:Get():Remove()
end
inst:AddComponent("deployable")
inst.components.deployable.ondeploy = OnDeploy
即可用红蘑菇种红蘑菇,用蓝蘑菇种蓝蘑菇,用绿蘑菇种绿蘑菇,即蘑菇可移植

同时携带多个背包(背包可库存)
1.同时携带多个普通背包:用记事本打开游戏目录\data\DLC0002\scripts\prefabs\backpack.lua文件,将inst.components.inventoryitem.cangoincontainer = false替换为inst.components.inventoryitem.cangoincontainer = true
2.同时携带多个小猪包:用记事本打开游戏目录\data\DLC0002\scripts\prefabs\piggyback.lua文件,将inst.components.inventoryitem.cangoincontainer = false替换为inst.components.inventoryitem.cangoincontainer = true

如果游戏崩溃了,就修改回去就行。

复活石无限使用(主角永生)
用记事本打开游戏目录\data\DLC0002\scripts\prefabs\resurrectionstone.lua文件,在inst:Remove()的下一行插入以下内容:
SpawnPrefab("resurrectionstone").Transform:SetPosition(inst.Transform:GetWorldPosition())
主角复活后,再点身下的复活石,可使复活石再次完整

提高主角攻击力
用记事本打开游戏目录\data\DLC0002\scripts\tuning.lua文件,将local wilson_attack = 34替换为local wilson_attack = 500
即可将主角攻击力由34提高到500,数字可自行调整

快速制造物品
用记事本打开游戏目录\data\DLC0002\scripts\actions.lua文件,将BUILD = Action(),替换为BUILD = Action(0, true),
即可跳过制造物品的动画,快速制造物品

主角自动回血
用记事本打开游戏目录\data\DLC0002\scripts\prefabs\player_common.lua文件,在inst.components.health:SetMaxHealth(TUNING.WILSON_HEALTH)的下一行插入以下内容:
inst.components.health:StartRegen(30, 10)
即可让主角自动回血,其中30为血量,10为10秒回血一次,可自行调整

全部物品无限使用(工具、武器、盔甲、魔杖、护身符、衣服、帽子、照明物品等全部无限使用)
1.用记事本打开游戏目录\data\DLC0002\scripts\widgets\itemtile.lua文件,将下列内容:
if invitem.components.fueled then
self:SetPercent(invitem.components.fueled:GetPercent())
end
if invitem.components.finiteuses then
self:SetPercent(invitem.components.finiteuses:GetPercent())
end
if invitem.components.perishable then
if self:HasSpoilage() then
self:SetPerishPercent(invitem.components.perishable:GetPercent())
else
self:SetPercent(invitem.components.perishable:GetPercent())
end
end
if invitem.components.armor then
self:SetPercent(invitem.components.armor:GetPercent())
end
替换为:
--if invitem.components.fueled then
--self:SetPercent(invitem.components.fueled:GetPercent())
--end
--if invitem.components.finiteuses then
--self:SetPercent(invitem.components.finiteuses:GetPercent())
--end
if invitem.components.perishable then
if self:HasSpoilage() then
self:SetPerishPercent(invitem.components.perishable:GetPercent())
else
self:SetPercent(invitem.components.perishable:GetPercent())
end
end
--if invitem.components.armor then
--self:SetPercent(invitem.components.armor:GetPercent())
--end
2.用记事本打开游戏目录\data\scripts\components\finiteuses.lua文件,将self:SetUses(self.current - (num or 1))替换为self:SetUses(self.current - 0)
3.用记事本打开游戏目录\data\DLC0002\scripts\components\fueled.lua文件,将self.consuming = true替换为self.consuming = false
4.用记事本打开游戏目录\data\scripts\components\armor.lua文件,将下列内容:
function Armor:SetCondition(amount)
self.condition = amount
替换为:
function Armor:SetCondition(amount)
self.condition = self.maxcondition
即可让全部物品无限使用。其中火堆和石头营火会无限燃烧,直到睡过帐篷或下地洞后熄灭

相关推荐
云标签
使用悟饭游戏厅下载
一站畅玩经典电玩
超强联机对战平台
发现海量精品游戏
千万粉丝品质信赖
使用悟饭游戏厅下载
一站畅玩经典电玩
超强联机对战平台
发现海量精品游戏
千万粉丝品质信赖
使用悟饭游戏厅下载

扫一扫安装

使用悟饭游戏厅下载
1. 下载悟饭手机客户端
2. 安装悟饭手机客户端到手机中
3. 在手机客户端中找到游戏并下载
4. 下载游戏完成后开始游戏
使用悟饭游戏厅下载
一站畅玩经典电玩
超强联机对战平台
发现海量精品游戏
千万粉丝品质信赖
微信扫码免费玩
支持各类经典游戏金手指功能
立即下载