正版饥荒饥荒切斯特死了怎么办办

当前位置: >
饥荒格罗姆怎么杀怎么养 格罗姆死了怎么办
来源:&&作者:喵喵么么&&时间: 14:38
饥荒格拉姆怎么获得?格拉姆怎么养、有什么用呢?获得这个东西以后你可以养着它也可以杀了它,这东西非常有用。
饥荒格拉姆有什么用呢?
一可以当宠物,而且过一段时间可以拉(?)出粘液,吃下去会+1饥饿 +50血 扣20精力。你不要吃也可以当提灯,矿工帽的燃料,他死了会掉翅膀,和你之前的花做远古铃铛(要铃铛图纸解锁,图纸可以在风滚草得到也可以砸格罗姆雕像得到)雕像砸了格罗姆在月圆之夜就不会来了。不砸掉可以在月圆之夜再去拿花吸引格罗姆。
饥荒格拉姆怎么获得?
找到桦树林以后,那就找到格洛姆了和大王花。大你采了花他会自动跟着你(其实是跟着花),虽然有六只眼,但还是很萌的。
饥荒格罗姆怎么杀呢?按一下【Ctrl】试试强制攻击,按键是默认的,强制攻击格罗姆就是不掉血,可能是随从无敌mod,我的也是,每次都得用炸药,把随从无敌mod关了就好了,不是游戏本身的bug哦~
开了随从无敌mod就无法杀死格罗姆,会有冲突的。
饥荒格罗姆怎么养才不会死呢?格罗姆会吃花拉便便,拉便便很慢,几天一次,得有耐心。除非需要格洛姆加san值的buff或者心理上的治愈,建议把格洛姆的花放在家里或其他安全的地方。
如果要上古铃铛的话,可以直接把它杀了,然后准备即将到来的小偷。
以上就是饥荒格罗姆怎么杀怎么养 格罗姆死了怎么办的全部内容,祝大家玩的愉快。
更多资讯请关注。
本网登载图片出于更直观传递信息之目的,并不代表本网赞同其观点和对其真实性负责,如该图片涉及任何第三方合法权利,请及时与我们()联系。
热门单机下载排行饥荒联机版中死亡后变成幽灵怎么办 变成幽灵可以做的事介绍_图文攻略_全通关攻略_高分攻略_百度攻略
饥荒游戏中玩家死亡变成了幽灵,那么我们要怎么办呢?变成幽灵可以做什么?下面百度攻略&笨手机小编就来为大家解开这个疑惑,一起来了解下。问:《饥荒》变成幽灵怎么办?答:在饥荒联机版中当玩家死亡之后会变成幽灵,其实这个算是联机版中的BUG,而大家可以利用BUG做一些事情:精彩内容,尽在百度攻略:1。让花变成恶魔花、让猪变成疯猪、免费刷树精和开矿。2。用来拉仇恨,拆猪房和放火。3。幽灵可探路,虽然不能马上在地图中显示,但是当你重新进入游戏的时候,你会看到幽灵走过的路程已经被保存。精彩内容,尽在百度攻略:4。一个坟墓支持刷新多次,幽灵在坟墓附近可能会召唤到幽灵,幽灵能帮你干架。以上就是今天百度攻略&笨手机小编为大家带来的饥荒联机版变成幽灵可以做的事介绍,希望对玩家们有所帮助精彩内容,尽在百度攻略:
饥荒-相关攻略推荐
饥荒-其他攻略
饥荒-新手攻略
饥荒-人物详解当前位置:&&&&&&&&&&&&饥荒鬼女的姐姐死了怎么复活饥荒鬼女的姐姐死了怎么复活
问:《饥荒》游戏中,鬼女的姐姐死了怎么复活?答:不少玩家遇到这样的情况:跟姐姐散步,来几只牦牛挡住了姐姐的去路,姐姐一个大招,一个牛也没带走,自己却死了,好几天过去了,姐姐都没复活……这要怎么让姐姐复活呢?下面,游戏城小编为你解答。  晚上有机率出现。17版姐姐变成了一朵花,花开完了把花放地上,再杀一只怪,姐姐就出来了,PS:除非被杀,不然一直都在,白天也在。
相关问答 13:32 13:45 11:31 11:40 13:48 11:37
手机游戏推荐
相关攻略相关补丁
本类最新更新 12345678910
热门动作冒险推荐星级:推荐星级:推荐星级:推荐星级:推荐星级:饥荒手机版快死了怎么办 饥荒IOS总是死怎么办
发表时间:&&出处:本站整理 &&责任编辑:otaku&&标签:
饥荒手机版快死了怎么办?这个游戏很让人抓狂,死了要重来。那么怎么才能不死呢?下面otaku就为大家带来荒IOS总是死怎么办问题详解。一起来看看吧。
(复活除外)有各种各样的死法,本人懒不一一排列了。说几个新人容易遇见的和措施。
1:晚上遇见查理 措施:夜不在深,有光则行。
2:饿死 措施:实在不行可以吃桦树种子
3:被怪物打死 措施:装备不好就不要总惹怪。
4:捡东西被杀了。 措施:沼泽这种地方死了很多人的原因一半是怪物多,一半是捡东西时被触手怪KO了。所以,捡东西时要看好有木有怪。
5:冻死 措施:新手3件套找大象,深夜放个火堆,走位杀掉,然后做象衣。或者做兔皮耳罩。冬天没事最好待火堆那
6:晒死 措施:撑伞or冰火堆or仙人掌花
7:被boss打死 措施:找到boss最好新手3件套and走位杀之
8:烧死 措施:看到火请闪开,火蜻蜓穿蜗牛盔甲走位杀之,火蜻蜓盔甲可以放火。
相关热门游戏推荐:
想得到更多更好的《花千骨》的精美礼包么?
289掌游网《花千骨》官网地址:
有杀气童话玩家QQ交流群:
微信扫一扫,免费秒领礼包
点击查询最新礼包,限量礼包免费领取、独家礼包、福利好礼,轻松获得。
公众号查询:zhangyouwang289 (扫我) QQ群号:
责编:otaku289掌游网在手 ,礼包资讯应有尽有。
近期热门游戏
关注最强手游神器
[ 尽享独家礼包 ]饥荒是个自由度很高的游戏,shark工作组确实厉害,不过新手面对无穷尽的死亡还是很头疼。
下面两句mod里的代码注释后可以防止删档,当任务死亡后只需要按esc正常quit,小退下重进就可以了从最近的存档恢复。
目录每个版本都不一样,只要在安装目录下搜索到gamelogic.lua文件就可以了。
在OnPlayerDeath方法中注释所有调用HandleDeathCleanup的方法就可以了。
注释方法就是在句首加上&--&。
最后贴上最新版的完整代码,覆盖前友情提醒先备份原版的代码。
require "mods"
require "playerprofile"
require "saveindex"
require "screens/mainscreen"
require "screens/deathscreen"
require "screens/popupdialog"
require "screens/bigpopupdialog"
require "screens/endgamedialog"
Print (VERBOSITY.DEBUG, "[Loading frontend assets]")
local start_game_time = nil
TheSim:SetRenderPassDefaultEffect( RENDERPASS.BLOOM, "data/shaders/anim_bloom.ksh" )
TheSim:SetErosionTexture( "data/images/erosion.tex" )
--this is suuuuuper placeholdery. We need to think about how to handle all of the different types of updates for this
local function DoAgeWorld()
for k,v in pairs(Ents) do
--spoil all of the spoilables
ponents.perishable then
v.components.perishable:Perish()
--send things to their homes
ponents.homeseeker ponents.homeseeker.home then
ponents.ponents.childspawner then
v.components.ponents.childspawner:GoHome(v)
ponents.ponents.spawner then
v.components.ponents.spawner:GoHome(v)
ponents.fueled then
v.components.fueled:MakeEmpty()
local function LoadAssets(fe)
local be_prefabs = {"hud", "forest", "cave", "ceiling", "maxwell", "fire", "character_fire", "shatter"}
local fe_prefabs = {"frontend"}
local recipe_prefabs = {}
for k,v in pairs(Recipes) do
table.insert(recipe_prefabs, v.name)
if v.placer then
table.insert(recipe_prefabs, v.placer)
if fe then
print ("LOAD FE")
TheSim:LoadPrefabs(fe_prefabs)
TheSim:UnloadPrefabs(be_prefabs)
TheSim:UnloadPrefabs(recipe_prefabs)
print ("LOAD FE: done")
print ("LOAD BE")
TheSim:UnloadPrefabs(fe_prefabs)
TheSim:LoadPrefabs(be_prefabs)
TheSim:LoadPrefabs(recipe_prefabs)
print ("LOAD BE: done")
function GetTimePlaying()
if not start_game_time then
return GetTime() - start_game_time
function CalculatePlayerRewards(wilson)
local Progression = require "progressionconstants"
print("Calculating progression")
--increment the xp counter and give rewards
local days_survived = GetClock().numcycles
local start_xp = wilson.profile:GetXP()
local reward_xp = Progression.GetXPForDays(days_survived)
local new_xp = math.min(start_xp + reward_xp, Progression.GetXPCap())
local all_rewards = Progression.GetRewardsForTotalXP(new_xp)
for k,v in pairs(all_rewards) do
wilson.profile:UnlockCharacter(v)
wilson.profile:SetXP(new_xp)
print("Progression: ",days_survived, start_xp, reward_xp, new_xp)
return days_survived, start_xp, reward_xp, new_xp
local function HandleDeathCleanup(wilson, data)
local game_time = GetClock():ToMetricsString()
if SaveGameIndex:GetCurrentMode() == "survival" then
local playtime = GetTimePlaying()
playtime = math.floor(playtime*1000)
SetTimingStat("time", "scenario", playtime)
SendTrackingStats()
local days_survived, start_xp, reward_xp, new_xp = CalculatePlayerRewards(wilson)
ProfileStatsSet("xp_gain", reward_xp)
ProfileStatsSet("xp_total", new_xp)
SubmitCompletedLevel() --close off the instance
ponents.health.invincible = true
wilson.profile:Save(function()
SaveGameIndex:EraseCurrent(function()
scheduler:ExecuteInTime(3, function()
TheFrontEnd:PushScreen(DeathScreen(days_survived, start_xp))
elseif SaveGameIndex:GetCurrentMode() == "adventure" then
SaveGameIndex:OnFailAdventure(function()
scheduler:ExecuteInTime(3, function()
TheFrontEnd:Fade(false, 3, function()
local params = json.encode{reset_action="loadslot", save_slot = SaveGameIndex:GetCurrentSaveSlot(), playeranim="failadventure"}
TheSim:SetInstanceParameters(params)
TheSim:Reset()
elseif SaveGameIndex:GetCurrentMode() == "cave" then
scheduler:ExecuteInTime(2, function()
TheFrontEnd:Fade(false, 2, function()
for k,v in pairs(Ents) do
if v.prefab == "cave_exit" then
GetPlayer().Transform:SetPosition(v.Transform:GetWorldPosition())
DoAgeWorld()
SaveGameIndex:SaveCurrent(function()
SaveGameIndex:OnFailCave(function()
local params = json.encode{reset_action="loadslot", save_slot = SaveGameIndex:GetCurrentSaveSlot(), playeranim="failcave"}
TheSim:SetInstanceParameters(params)
TheSim:Reset()
local function OnPlayerDeath(wilson, data)
local cause = data.cause or "unknown"
local will_resurrect = ponents.resurrectable ponents.resurrectable:CanResurrect()
TheMixer:PushMix("death")
wilson.HUD:Hide()
local game_time = GetClock():ToMetricsString()
RecordDeathStats(cause, GetClock():GetPhase(), ponents.sanity.current, ponents.hunger.current, will_resurrect)
ProfileStatsAdd("killed_by_"..cause)
ProfileStatsAdd("deaths")
--local res = TheSim:FindFirstEntityWithTag("resurrector")
if will_resurrect then
scheduler:ExecuteInTime(4, function()
TheMixer:PopMix("death")
ponents.resurrectable:DoResurrect() then
ProfileStatsAdd("resurrections")
--HandleDeathCleanup(wilson, data)
--HandleDeathCleanup(wilson, data)
function SetUpPlayerCharacterCallbacks(wilson)
--set up on ondeath handler
wilson:ListenForEvent( "death", function(inst, data) OnPlayerDeath(wilson, data) end)
wilson:ListenForEvent( "quit",
function()
Print (VERBOSITY.DEBUG, "I SHOULD QUIT!")
TheMixer:PushMix("death")
wilson.HUD:Hide()
local playtime = GetTimePlaying()
playtime = math.floor(playtime*1000)
RecordQuitStats()
SetTimingStat("time", "scenario", playtime)
ProfileStatsSet("time_played", playtime)
SendTrackingStats()
SendAccumulatedProfileStats()
TheSim:SetInstanceParameters()
TheSim:Reset()
wilson:ListenForEvent( "daycomplete",
function(it, data)
if ponents.health:IsDead() then
RecordEndOfDayStats()
ProfileStatsAdd("nights_survived_iar")
SendAccumulatedProfileStats()
end, GetWorld())
--[[wilson:ListenForEvent( "daytime",
function(it, data)
if ponents.health:IsDead() and not wilson.is_teleporting then
--print("Day has arrived...")
--SaveGameIndex:SaveCurrent()
end, GetWorld())
wilson:ListenForEvent("builditem", function(inst, data) ProfileStatsAdd("build_item_"..data.item.prefab) end)
wilson:ListenForEvent("buildstructure", function(inst, data) ProfileStatsAdd("build_structure_"..data.item.prefab) end)
local function StartGame(wilson)
TheFrontEnd:GetSound():KillSound("FEMusic") -- just in case...
start_game_time = GetTime()
SetUpPlayerCharacterCallbacks(wilson)
local deprecated = { turf_webbing = true }
local replace = {
farmplot = "slow_farmplot", farmplot2 = "fast_farmplot",
farmplot3 = "fast_farmplot", sinkhole= "cave_entrance",
cave_stairs= "cave_entrance"
function PopulateWorld(savedata, profile, playercharacter, playersavedataoverride)
playercharacter = playercharacter or "wilson"
Print(VERBOSITY.DEBUG, "PopulateWorld")
Print(VERBOSITY.DEBUG,
"[Instantiating objects...]" )
local wilson = nil
if savedata then
--figure out our start info
local spawnpoint = Vector3(0,0,0)
local playerdata = {}
if savedata.playerinfo then
if savedata.playerinfo.x and savedata.playerinfo.z then
local y = savedata.playerinfo.y or 0
spawnpoint = Vector3(savedata.playerinfo.x, y, savedata.playerinfo.z)
if savedata.playerinfo.data then
playerdata = savedata.playerinfo.data
if playersavedataoverride then
playerdata = playersavedataoverride
local newents = {}
--local world = SpawnPrefab("forest")
local world = nil
local ceiling = nil
if savedata.map.prefab == "cave" then
world = SpawnPrefab("cave")
ceiling = SpawnPrefab("ceiling")
world = SpawnPrefab("forest")
--spawn the player character and set him up
TheSim:LoadPrefabs{playercharacter}
wilson = SpawnPrefab(playercharacter)
assert(wilson, "could not spawn player character")
wilson:SetProfile(Profile)
wilson.Transform:SetPosition(spawnpoint:Get())
--this was spawned by the level file. kinda lame - we should just do everything from in here.
local ground = GetWorld()
if ground then
if GetCeiling() then
GetCeiling().MapCeiling:SetSize(savedata.map.width, savedata.map.height)
GetCeiling().MapCeiling:SetFromString(savedata.map.tiles)
GetCeiling().MapCeiling:Finalize(TheSim:GetSetting("graphics", "static_walls") == "true")
ground.Map:SetSize(savedata.map.width, savedata.map.height)
if savedata.map.prefab == "cave" then
ground.Map:SetPhysicsWallDistance(0.75)--0) -- TEMP for STREAM
ground.Map:SetPhysicsWallDistance(0)--0.75)
ground.Map:SetFromString(savedata.map.tiles)
ground.Map:Finalize()
if savedata.map.nav then
print("Loading Nav Grid")
ground.Map:SetNavSize(savedata.map.width, savedata.map.height)
ground.Map:SetNavFromString(savedata.map.nav)
print("No Nav Grid")
ground.hideminimap = savedata.map.hideminimap
ground.topology = savedata.map.topology
ground.meta = savedata.meta
assert(savedata.map.topology.ids, "[MALFORMED SAVE DATA] Map missing topology information. This save file is too old, and is missing neccessary information.")
for i=#savedata.map.topology.ids,1, -1 do
local name = savedata.map.topology.ids[i]
if string.find(name, "LOOP_BLANK_SUB") ~= nil then
table.remove(savedata.map.topology.ids, i)
table.remove(savedata.map.topology.nodes, i)
for eid=#savedata.map.topology.edges,1,-1 do
if savedata.map.topology.edges[eid].n1 == i or savedata.map.topology.edges[eid].n2 == i then
table.remove(savedata.map.topology.edges, eid)
if ground.topology.level_number ~= nil then
require("map/levels")
if levels.story_levels[ground.topology.level_number] ~= nil then
profile:UnlockWorldGen("preset", levels.story_levels[ground.topology.level_number].name)
wilson:AddComponent("area_aware")
--wilson:AddComponent("area_unlock")
if ground.topology.override_triggers then
wilson:AddComponent("area_trigger")
ponents.area_trigger:RegisterTriggers(ground.topology.override_triggers)
for i,node in ipairs(ground.topology.nodes) do
local story = ground.topology.ids[i]
-- guard for old saves
local story_depth = nil
if ground.topology.story_depths then
story_depth = ground.topology.story_depths[i]
if story ~= "START" then
story = string.sub(story, 1, string.find(story,":")-1)
if Profile:IsWorldGenUnlocked("tasks", story) == false then
ponents.area_unlock:RegisterStory(story)
ponents.area_aware:RegisterArea({idx=i, type=node.type, poly=node.poly, story=story, story_depth=story_depth})
if node.type == "Graveyard" or node.type == "MistyCavern" then
if node.area_emitter == nil then
local mist = SpawnPrefab( "mist" )
mist.Transform:SetPosition( node.cent[1], 0, node.cent[2] )
ponents.emitter.area_emitter = CreateAreaEmitter( node.poly, node.cent )
if node.area == nil then
node.area = 1
ponents.emitter.density_factor = math.ceil(node.area / 4)/31
ponents.emitter:Emit()
if savedata.map.persistdata ~= nil then
ground:SetPersistData(savedata.map.persistdata)
ponents.area_aware:StartCheckingPosition()
wilson:SetPersistData(playerdata, newents)
ponents.health.currenthealth == 0 then
ponents.health.currenthealth = 1
if savedata.playerinfo and savedata.playerinfo.id then
newents[savedata.playerinfo.id] = {entity=wilson, data=playerdata}
--set the clock (LEGACY! this is now handled via the world object's normal serialization)
if savedata.playerinfo.day and savedata.playerinfo.dayphase and savedata.playerinfo.timeleftinera then
GetClock().numcycles = savedata.playerinfo and savedata.playerinfo.day or 0
if savedata.playerinfo and savedata.playerinfo.dayphase == "night" then
GetClock():StartNight(true)
elseif savedata.playerinfo and savedata.playerinfo.dayphase == "dusk" then
GetClock():StartDusk(true)
GetClock():StartDay(true)
if savedata.playerinfo.timeleftinera then
GetClock().timeLeftInEra = savedata.playerinfo.timeleftinera
-- Force overrides for ambient
local retune = require("tuning_override")
retune.OVERRIDES["areaambientdefault"].doit(savedata.map.prefab)
-- Check for map overrides
if ground.topology.overrides ~= nil and ground.topology.overrides ~= nil and GetTableSize(ground.topology.overrides) & 0 then
for area, overrides in pairs(ground.topology.overrides) do
for i,override in ipairs(overrides) do
if retune.OVERRIDES[override[1]] ~= nil then
retune.OVERRIDES[override[1]].doit(override[2])
--instantiate all the dudes
for prefab, ents in pairs(savedata.ents) do
local prefab = replace[prefab] or prefab
if not deprecated[prefab] then
for k,v in ipairs(ents) do
v.prefab = v.prefab or prefab -- prefab field is stripped out when entities are saved in global entity collections, so put it back
SpawnSaveRecord(v, newents)
--post pass in neccessary to hook up references
for k,v in pairs(newents) do
v.entity:LoadPostPass(newents, v.data)
GetWorld():LoadPostPass(newents, savedata.map.persistdata)
--Run scenario scripts
for guid, ent in pairs(Ents) do
ponents.scenariorunner then
ponents.scenariorunner:Run()
--Record mod information
ModManager:SetModRecords(savedata.mods or {})
if SaveGameIndex:GetCurrentMode() ~= "adventure" and GetWorld().components.age and GetPlayer().components.age then
local player_age = GetPlayer().components.age:GetAge()
local world_age = GetWorld().components.age:GetAge()
if world_age &= 0 then
GetWorld().components.age.saved_age = player_age
elseif player_age & world_age then
local catch_up = player_age - world_age
print ("Catching up world", catch_up)
LongUpdate(catch_up, true)
--this is a cheesy workaround for coming out of a cave at night, so you don't get immediately eaten
if SaveGameIndex:GetCurrentMode() == "survival" and not GetWorld().components.clock:IsDay() then
local light = SpawnPrefab("exitcavelight")
light.Transform:SetPosition(GetPlayer().Transform:GetWorldPosition())
Print(VERBOSITY.ERROR, "[MALFORMED SAVE DATA] PopulateWorld complete" )
Print(VERBOSITY.DEBUG, "[FINISHED LOADING SAVED GAME] PopulateWorld complete" )
return wilson
local function DrawDebugGraph(graph)
-- debug draw of new map gen
local debugdrawmap = CreateEntity()
local draw = debugdrawmap.entity:AddDebugRender()
draw:SetZ(0.1)
for idx,node in ipairs(graph.nodes) do
local colour = graph.colours[node.c]
for i =1, #node.poly-1 do
draw:Line(node.poly[i][1], node.poly[i][2], node.poly[i+1][1], node.poly[i+1][2], colour.r, colour.g, colour.b, 255)
draw:Line(node.poly[1][1], node.poly[1][2], node.poly[#node.poly][1], node.poly[#node.poly][2], colour.r, colour.g, colour.b, 255)
draw:Poly(node.cent[1], node.cent[2], colour.r, colour.g, colour.b, colour.a, node.poly)
draw:String(graph.ids[idx].."("..node.cent[1]..","..node.cent[2]..")",
node.cent[1], node.cent[2], node.ts)
draw:SetZ(0.15)
for idx,edge in ipairs(graph.edges) do
if edge.n1 ~= nil and edge.n2 ~= nil then
local colour = graph.colours[edge.c]
local n1 = graph.nodes[edge.n1]
local n2 = graph.nodes[edge.n2]
if n1 ~= nil and n2 ~= nil then
draw:Line(n1.cent[1], n1.cent[2], n2.cent[1], n2.cent[2], colour.r, colour.g, colour.b, colour.a)
--OK, we have our savedata and a profile. Instatiate everything and start the game!
function DoInitGame(playercharacter, savedata, profile, next_world_playerdata, fast)
--print("DoInitGame",playercharacter, savedata, profile, next_world_playerdata, fast)
TheFrontEnd:ClearScreens()
LoadAssets(false)
assert(savedata.map, "Map missing from savedata on load")
assert(savedata.map.prefab, "Map prefab missing from savedata on load")
assert(savedata.map.tiles, "Map tiles missing from savedata on load")
assert(savedata.map.width, "Map width missing from savedata on load")
assert(savedata.map.height, "Map height missing from savedata on load")
assert(savedata.map.topology, "Map topology missing from savedata on load")
assert(savedata.map.topology.ids, "Topology entity ids are missing from savedata on load")
--assert(savedata.map.topology.story_depths, "Topology story_depths are missing from savedata on load")
assert(savedata.map.topology.colours, "Topology colours are missing from savedata on load")
assert(savedata.map.topology.edges, "Topology edges are missing from savedata on load")
assert(savedata.map.topology.nodes, "Topology nodes are missing from savedata on load")
assert(savedata.map.topology.level_type, "Topology level type is missing from savedata on load")
assert(savedata.map.topology.overrides, "Topology overrides is missing from savedata on load")
assert(savedata.playerinfo, "Playerinfo missing from savedata on load")
assert(savedata.playerinfo.x, "Playerinfo.x missing from savedata on load")
--assert(savedata.playerinfo.y, "Playerinfo.y missing from savedata on load")
--y is often omitted for space, don't check for it
assert(savedata.playerinfo.z, "Playerinfo.z missing from savedata on load")
--assert(savedata.playerinfo.day, "Playerinfo day missing from savedata on load")
assert(savedata.ents, "Entites missing from savedata on load")
if savedata.map.roads then
Roads = savedata.map.roads
for k, road_data in pairs( savedata.map.roads ) do
RoadManager:BeginRoad()
local weight = road_data[1]
if weight == 3 then
for i = 2, #road_data do
local ctrl_pt = road_data[i]
RoadManager:AddControlPoint( ctrl_pt[1], ctrl_pt[2] )
for k, v in pairs( ROAD_STRIPS ) do
RoadManager:SetStripEffect( v, "data/shaders/road.ksh" )
RoadManager:SetStripTextures( ROAD_STRIPS.EDGES, "data/images/roadedge.tex",
"data/images/roadnoise.tex" )
RoadManager:SetStripTextures( ROAD_STRIPS.CENTER, "data/images/square.tex",
"data/images/roadnoise.tex" )
RoadManager:SetStripTextures( ROAD_STRIPS.CORNERS, "data/images/roadcorner.tex", "data/images/roadnoise.tex" )
RoadManager:SetStripTextures( ROAD_STRIPS.ENDS,
"data/images/roadendcap.tex", "data/images/roadnoise.tex" )
RoadManager:GenerateVB(
ROAD_PARAMETERS.NUM_SUBDIVISIONS_PER_SEGMENT,
ROAD_PARAMETERS.MIN_WIDTH, ROAD_PARAMETERS.MAX_WIDTH,
ROAD_PARAMETERS.MIN_EDGE_WIDTH, ROAD_PARAMETERS.MAX_EDGE_WIDTH,
ROAD_PARAMETERS.WIDTH_JITTER_SCALE, true )
for i = 2, #road_data do
local ctrl_pt = road_data[i]
RoadManager:AddControlPoint( ctrl_pt[1], ctrl_pt[2] )
for k, v in pairs( ROAD_STRIPS ) do
RoadManager:SetStripEffect( v, "data/shaders/road.ksh" )
RoadManager:SetStripTextures( ROAD_STRIPS.EDGES, "data/images/roadedge.tex",
"data/images/pathnoise.tex" )
RoadManager:SetStripTextures( ROAD_STRIPS.CENTER, "data/images/square.tex",
"data/images/pathnoise.tex" )
RoadManager:SetStripTextures( ROAD_STRIPS.CORNERS, "data/images/roadcorner.tex", "data/images/pathnoise.tex" )
RoadManager:SetStripTextures( ROAD_STRIPS.ENDS,
"data/images/roadendcap.tex", "data/images/pathnoise.tex" )
RoadManager:GenerateVB(
ROAD_PARAMETERS.NUM_SUBDIVISIONS_PER_SEGMENT,
ROAD_PARAMETERS.MIN_EDGE_WIDTH*4, ROAD_PARAMETERS.MAX_EDGE_WIDTH*4,
0, false )
for i = 2, #road_data do
local ctrl_pt = road_data[i]
RoadManager:AddSmoothedControlPoint( ctrl_pt[1], ctrl_pt[2] )
for k, v in pairs( ROAD_STRIPS ) do
RoadManager:SetStripEffect( v, "data/shaders/river.ksh" )
RoadManager:SetStripTextures( ROAD_STRIPS.EDGES, "data/images/square.tex",
"data/images/river_bed.tex" )
RoadManager:SetStripTextures( ROAD_STRIPS.CENTER, "data/images/square.tex",
"data/images/water_river.tex" )
RoadManager:SetStripUVAnimStep( ROAD_STRIPS.CENTER, 0, 0.25 )
RoadManager:SetStripWrapMode( ROAD_STRIPS.EDGES, WRAP_MODE.CLAMP_TO_EDGE, WRAP_MODE.WRAP )
--RoadManager:SetStripTextures( ROAD_STRIPS.CORNERS, "data/images/roadcorner.tex", "data/images/pathnoise.tex" )
--RoadManager:SetStripTextures( ROAD_STRIPS.ENDS,
"data/images/roadendcap.tex", "data/images/pathnoise.tex" )
RoadManager:GenerateVB(
ROAD_PARAMETERS.NUM_SUBDIVISIONS_PER_SEGMENT,
0, false )
RoadManager:GenerateQuadTree()
SubmitStartStats(playercharacter)
--some lame explicit loads
Print(VERBOSITY.DEBUG, "DoInitGame Loading prefabs...")
Print(VERBOSITY.DEBUG, "DoInitGame Adjusting audio...")
TheMixer:SetLevel("master", 0)
--apply the volumes
Print(VERBOSITY.DEBUG, "DoInitGame Populating world...")
local wilson = PopulateWorld(savedata, profile, playercharacter, next_world_playerdata)
if wilson then
TheCamera:SetTarget(wilson)
StartGame(wilson)
TheCamera:SetDefault()
TheCamera:Snap()
Print(VERBOSITY.WARNING, "DoInitGame NO WILSON?")
if Profile.persistdata.debug_world
if savedata.map.topology == nil then
Print(VERBOSITY.ERROR, "OI! Where is my topology info!")
DrawDebugGraph(savedata.map.topology)
local function OnStart()
Print(VERBOSITY.DEBUG, "DoInitGame OnStart Callback... turning volume up")
SetHUDPause(false)
if not TheFrontEnd:IsDisplayingError() then
local hud = PlayerHud()
TheFrontEnd:PushScreen(hud)
hud:SetMainCharacter(wilson)
--clear the player stats, so that it doesn't count items "acquired" from the save file
GetProfileStats(true)
RecordSessionStartStats()
--after starting everything up, give the mods additional environment variables
ModManager:SimPostInit(wilson)
GetPlayer().components.health:RecalculatePenalty()
if ( SaveGameIndex:GetCurrentMode() ~= "cave" and (SaveGameIndex:GetCurrentMode() == "survival" or SaveGameIndex:GetSlotWorld() == 1) and SaveGameIndex:GetSlotDay() == 1 and GetClock():GetNormTime() == 0) then
if GetPlayer().components.inventory.starting_inventory then
for k,v in pairs(GetPlayer().components.inventory.starting_inventory) do
local item = SpawnPrefab(v)
if item then
GetPlayer().components.inventory:GiveItem(item)
if fast then
SetHUDPause(true,"InitGame")
if Settings.playeranim == "failcave" then
GetPlayer().sg:GoToState("wakeup")
GetClock():MakeNextDay()
elseif Settings.playeranim == "failadventure" then
GetPlayer().sg:GoToState("failadventure")
GetPlayer().HUD:Show()
elseif GetWorld():IsCave() then
GetPlayer().sg:GoToState("caveenter")
GetPlayer().HUD:Show()
elseif Settings.playeranim == "wakeup" or playercharacter == "waxwell" or savedata.map.nomaxwell then
GetPlayer().sg:GoToState("wakeup")
GetPlayer().HUD:Show()
--announce your freedom if you are starting as waxwell
if playercharacter == "waxwell" and SaveGameIndex:GetCurrentMode() == "survival" and (GetClock().numcycles == 0 and GetClock():GetNormTime() == 0) then
GetPlayer():DoTaskInTime( 3.5, function()
GetPlayer().components.talker:Say(GetString("waxwell", "ANNOUNCE_FREEDOM"))
elseif (GetClock().numcycles == 0 and GetClock():GetNormTime() == 0) or Settings.maxwell ~= nil then
local max = SpawnPrefab("maxwellintro")
local speechName = "NULL_SPEECH"
if Settings.maxwell then
speechName = Settings.maxwell
elseif SaveGameIndex:GetCurrentMode() == "adventure" then
if savedata.map.override_level_string == true then
local level_id = 1
if GetWorld().meta then
level_id = GetWorld().meta.level_id or level_id
speechName = "ADVENTURE_"..level_id
speechName = "ADVENTURE_"..SaveGameIndex:GetSlotWorld()
speechName = "SANDBOX_1"
ponents.maxwelltalker:SetSpeech(speechName)
ponents.maxwelltalker:Initialize()
max.task = max:StartThread(function() ponents.maxwelltalker:DoTalk() end)
--PlayNIS("maxwellintro", savedata.map.maxwell)
local title = STRINGS.UI.SANDBOXMENU.ADVENTURELEVELS[SaveGameIndex:GetSlotLevelIndexFromPlaylist()]
local subtitle = STRINGS.UI.SANDBOXMENU.CHAPTERS[SaveGameIndex:GetSlotWorld()]
local showtitle = SaveGameIndex:GetCurrentMode() == "adventure" and title
if showtitle then
TheFrontEnd:ShowTitle(title,subtitle)
TheFrontEnd:Fade(true, 1, function()
SetHUDPause(false)
TheMixer:SetLevel("master", 1)
TheMixer:PushMix("normal")
TheFrontEnd:HideTitle()
--TheFrontEnd:PushScreen(PopupDialogScreen(STRINGS.UI.HUD.READYTITLE, STRINGS.UI.HUD.READY, {{text=STRINGS.UI.HUD.START, cb = function() OnStart() end}}))
end, showtitle and 3, showtitle and function() SetHUDPause(false) end )
if savedata.map.hideminimap ~= nil then
hud.minimap:DoTaskInTime(0, function(inst) inst.MiniMap:ClearRevealedAreas(savedata.map.hideminimap) end)
if savedata.map.teleportaction ~= nil then
local teleportato = TheSim:FindFirstEntityWithTag("teleportato")
if teleportato then
local pickPosition = function()
local portpositions = GetRandomInstWithTag("teleportlocation", teleportato, 1000)
if portpositions then
return Vector3(portpositions.Transform:GetWorldPosition())
return Vector3(savedata.playerinfo.x, savedata.playerinfo.y or 0, savedata.playerinfo.z)
teleportato.action = savedata.map.teleportaction
teleportato.maxwell = savedata.map.teleportmaxwell
teleportato.teleportpos = pickPosition()
--DoStartPause("Ready!")
Print(VERBOSITY.DEBUG, "DoInitGame complete")
if PRINT_TEXTURE_INFO then
c_printtextureinfo( "texinfo.csv" )
TheSim:Quit()
------------------------THESE FUNCTIONS HANDLE STARTUP FLOW
local function DoLoadWorld(saveslot, playerdataoverride)
local function onload(savedata)
DoInitGame(SaveGameIndex:GetSlotCharacter(saveslot), savedata, Profile, playerdataoverride)
SaveGameIndex:GetSaveData(saveslot, SaveGameIndex:GetCurrentMode(saveslot), onload)
local function DoGenerateWorld(saveslot, type_override)
local function onComplete(savedata )
local function onsaved()
local success, world_table = RunInSandbox(savedata)
if success then
DoInitGame(SaveGameIndex:GetSlotCharacter(saveslot), world_table, Profile, SaveGameIndex:GetPlayerData(saveslot))
SaveGameIndex:OnGenerateNewWorld(saveslot, savedata, onsaved)
local world_gen_options =
level_type = type_override or SaveGameIndex:GetCurrentMode(saveslot),
custom_options = SaveGameIndex:GetSlotGenOptions(saveslot,SaveGameIndex:GetCurrentMode()),
level_world = SaveGameIndex:GetSlotLevelIndexFromPlaylist(saveslot),
profiledata = Profile.persistdata,
if world_gen_options.level_type == "adventure" then
world_gen_options["adventure_progress"] = SaveGameIndex:GetSlotWorld()
elseif world_gen_options.level_type == "cave" then
world_gen_options["cave_progress"] = SaveGameIndex:GetCurrentCaveLevel()
TheFrontEnd:PushScreen(WorldGenScreen(Profile, onComplete, world_gen_options))
local function LoadSlot(slot)
TheFrontEnd:ClearScreens()
if SaveGameIndex:HasWorld(slot, SaveGameIndex:GetCurrentMode(slot)) then
DoLoadWorld(slot, SaveGameIndex:GetModeData(slot, SaveGameIndex:GetCurrentMode(slot)).playerdata)
LoadAssets(true)
if SaveGameIndex:GetCurrentMode(slot) == "survival" and SaveGameIndex:IsContinuePending(slot) then
local function onsave()
DoGenerateWorld(slot)
local function onSet(character)
SaveGameIndex:SetSlotCharacter(slot, character, onsave)
TheFrontEnd:PushScreen(CharacterSelectScreen(Profile, onSet, true, SaveGameIndex:GetSlotCharacter(slot)))
DoGenerateWorld(slot)
----------------LOAD THE PROFILE AND THE SAVE INDEX, AND START THE FRONTEND
local function OnFilesLoaded()
UpdateGamePurchasedState( function()
--print( "[Settings]",Settings.character, Settings.savefile)
if Settings.reset_action then
if Settings.reset_action == "loadslot" then
if not SaveGameIndex:GetCurrentMode(Settings.save_slot) then
LoadAssets(true)
TheFrontEnd:ShowScreen(MainScreen(Profile))
LoadSlot(Settings.save_slot)
elseif Settings.reset_action == "printtextureinfo" then
LoadAssets(true)
DoGenerateWorld(1)
LoadAssets(true)
TheFrontEnd:ShowScreen(MainScreen(Profile))
if PRINT_TEXTURE_INFO then
SaveGameIndex:DeleteSlot(1,
function()
local function onsaved()
local params = json.encode{reset_action="printtextureinfo", save_slot = 1}
TheSim:SetInstanceParameters(params)
TheSim:Reset()
SaveGameIndex:StartSurvivalMode(1, "wilson", {}, onsaved)
LoadAssets(true)
TheFrontEnd:ShowScreen(MainScreen(Profile))
Profile = PlayerProfile()
SaveGameIndex = SaveIndex()
Print(VERBOSITY.DEBUG, "[Loading profile and save index]")
Profile:Load( function()
SaveGameIndex:Load( OnFilesLoaded )
--dont_load_save in profile
阅读(...) 评论()

我要回帖

更多关于 饥荒格罗姆死了怎么办 的文章

 

随机推荐