亚洲精品欧美日韩-亚洲精品欧美一区二区三区-亚洲精品欧美综合-亚洲精品欧洲精品-亚洲精品欧洲一区二区三区

饑荒海難DLC實用生存代碼一覽 控制臺代碼大全

時間:2015-12-15 10:43:09 來源:當游網 作者:當游網 編輯:rawsyww 字體大小:

饑荒海難DLC上市已有一段時間了,各種代碼也已被玩家們發現。今天,小編就整理了饑荒海難DLC實用控制臺代碼,一起來看看怎么在游戲里生存得更輕松吧。

饑荒海難DLC控制臺代碼大全1

饑荒海難DLC控制臺代碼大全

地圖全開(游戲中按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

即可讓全部物品無限使用。其中火堆和石頭營火會無限燃燒,直到睡過帳篷或下地洞后熄滅

以上就是饑荒海難DLC中的實用代碼大全了,玩家們可以試試看。

下載地址

0

收藏
稿件舉報
分享至:

一路疾馳

游戲類型: 體育競技
開發發行: Alawar Premium
游戲語言: 簡體中文
國家地區: 大陸
發行時間: 2021-10-21
整理時間: 2021-10-19
游戲標簽:

猜你喜歡

同類排行榜