饥荒实用修改技巧更新 下载本文

WOODWALL_HEALTH = 200, STONEWALL_HEALTH = 400, 修改为:

HAYWALL_HEALTH = 1000, WOODWALL_HEALTH = 2000, STONEWALL_HEALTH = 4000,

即可增加墙的耐久力10倍

四十九.墙壁永固(自己可砸,怪物无法破坏) 用

inst.components.health:SetInvincible(true)

即可让墙壁永固

五十.让游戏中的一天更漫长(1天从真实世界的8分钟修改为16分钟)

用记事本打开游戏目录\\data\\scripts\\tuning.lua文件,将local seg_time = 30修改为local seg_time = 60即可

五十一.修改白天、傍晚、黑夜占一天的比例

用记事本打开游戏目录\\data\\scripts\\tuning.lua文件,查找以下内容:

local day_segs = 10 白天小时数 local dusk_segs = 4 傍晚小时数 local night_segs = 2 黑夜小时数

修改每行最后的数字,即可

\\data\\scripts\\prefabs\\walls.lua

inst:AddTag("noauradamage")的下一行插入以下内容:

修改白天、傍晚、黑夜占一天的比例,总数不要超过16

五十二.地图全开(游戏中按Ctrl +1)

用记事本打开游戏目录\\data\\scripts\\main.lua文件,在KnownModIndex:Load(function() end)的下一行插入以下内容:

TheInput:AddKeyUpHandler(KEY_1, function() if TheInput:IsKeyDown(KEY_CTRL) then

local MainCharacter = TheSim:FindFirstEntityWithTag("player") local map = TheSim:FindFirstEntityWithTag("minimap") if MainCharacter and map then

local x, y, z = MainCharacter.Transform:GetWorldPosition() map.MiniMap:ShowArea(x, y, z, 10000) end end end );

即可在游戏中按Ctrl + 1使地图全开。这不是我的研究,是转载来的,以方便大家

五十三.缩短草、树杈、芦苇、洞穴花长出时间

用记事本打开游戏目录\\data\\scripts\\tuning.lua文件,将以下内容: GRASS_REGROW_TIME = total_day_time*3, SAPLING_REGROW_TIME = total_day_time*4, REEDS_REGROW_TIME = total_day_time*3, FLOWER_CAVE_REGROW_TIME = total_day_time*3, 修改为:

GRASS_REGROW_TIME = total_day_time*1, SAPLING_REGROW_TIME = total_day_time*1, REEDS_REGROW_TIME = total_day_time*1, FLOWER_CAVE_REGROW_TIME = total_day_time*1,

即可让这几种植物1天长1次

五十四.种草不用施肥

用记事本打开游戏目录\\data\\scripts\\prefabs\\grass.lua文件,将以下内容:

inst.components.pickable:MakeBarren()

inst.components.pickable.makebarrenfn = makebarrenfn inst.components.pickable.makefullfn = makefullfn inst.components.pickable.max_cycles = 20 inst.components.pickable.cycles_left = 20 修改为:

inst.components.pickable:MakeEmpty()

--inst.components.pickable.makebarrenfn = makebarrenfn --inst.components.pickable.makefullfn = makefullfn --inst.components.pickable.max_cycles = 20 --inst.components.pickable.cycles_left = 20

即可种草不用施肥

五十五.用芦苇种植芦苇(分株种植)

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

local function OnDeploy (inst, pt)

local reeds = SpawnPrefab("reeds") if reeds then

reeds:PushEvent("growfromcutreeds") reeds.Transform:SetPosition(pt.x, pt.y, pt.z) inst.components.stackable:Get():Remove() end end

inst:AddComponent("deployable") inst.components.deployable.ondeploy = OnDeploy

即可用芦苇种植芦苇(分株种植),如果想移植,原来的芦苇根不想留,用火炬烧掉即可

五十六.用木头、木炭、灰种植石矿(可持续发展)

1.用木头种第一种石矿(只有石头):用记事本打开游戏目录\\data\\scripts\\prefabs\\log.lua文件,在inst:AddComponent("stackable")的下一行插入以下内容:

local function OnDeploy (ins

t, pt)

local rock_flintless = SpawnPrefab("rock_flintless") if rock_flintless then

rock_flintless:PushEvent("growfromlog") rock_flintless.Transform:SetPosition(pt.x, pt.y, pt.z) inst.components.stackable:Get():Remove() end end

inst:AddComponent("deployable") inst.components.deployable.ondeploy = OnDeploy

2.用木炭种第二种石矿(带硝石的):用记事本打开游戏目录\\data\\scripts\\prefabs\\charcoal.lua文件,在inst:AddComponent("inspectable")的下一行插入以下内容:

local function OnDeploy (inst, pt)

local rock1 = SpawnPrefab("rock1") if rock1 then

rock1:PushEvent("growfromcharcoal") rock1.Transform:SetPosition(pt.x, pt.y, pt.z) inst.components.stackable:Get():Remove() end end

inst:AddComponent("deployable") inst.components.deployable.ondeploy = OnDeploy

3.用灰种第三种石矿(带黄金的):用记事本打开游戏目录\\data\\scripts\\prefabs\\ash.lua文件,在inst.AnimState:PlayAnimation("idle")的下一行插入以下内容:

local function OnDeploy (inst, pt)

local rock2 = SpawnPrefab("rock2") if rock2 then