Jump to content

Cave worldgen stuck with mod enabled


Recommended Posts

Hello! The problem is exactly as the topic title says - when I have my mod enabled, non-cave worldgen works perfectly; however, when I have caves enabled it gets stuck while generating the world. The mod does add a new set piece (static layout) to world gen, so I'm guessing this is somehow the source of the problem for reasons I'm not getting. So I'll include the contents of modworldgenmain.lua in addition to modmain.lua (respectively):

Spoiler

local Layouts = GLOBAL.require("map/layouts").Layouts
local StaticLayout = GLOBAL.require("map/static_layout")

Layouts["Merm Shrine"] = StaticLayout.Get("map/static_layouts/merm_shrine")

AddSetPiecePreInitAny = function(name, count, tasks)

AddLevelPreInitAny(function(level)
if not level.set_pieces then
level.set_pieces = {}
end

level.set_pieces[name] = { count = count, tasks = tasks }
end)
end

local tasks={"Merms ahoy", "Guarded Squeltch", "Squeltch", "Swamp start", "Lots-o-Tentacles" }

AddSetPiecePreInitAny("Merm Shrine",1,tasks)

 

Spoiler

--This is how we tell the game we've created a new prefab.
PrefabFiles = {
	--This is the name of our prefab file in scripts/prefabs
	"kraken",
    "kraken_tentacle",
    "kraken_projectile",
    "dark_honey_trail",
    "inbred",
    "zealot",
    "voidstaff",
    "voidball",
    "merm_altar",
    "positronbeam_dark",
    "onyx",
}

Assets = {
	Asset("SOUNDPACKAGE", "sound/kraken.fev"),
	Asset("SOUND", "sound/kraken.fsb"),
	Asset("SOUNDPACKAGE", "sound/inbred.fev"),
	Asset("SOUND", "sound/inbred.fsb"),

	Asset("ANIM", "anim/quacken.zip"),
	Asset("ANIM", "anim/quacken_tentacle.zip"),

	Asset("ANIM", "anim/ink_projectile.zip"),
	Asset("ANIM", "anim/ink_puddle.zip"),
	Asset("ANIM", "anim/dark_honey_trail.zip"),

	Asset("ANIM", "anim/inbredmerm_actions.zip"),
	Asset("ANIM", "anim/inbredmerm_basic.zip"),
	Asset("ANIM", "anim/inbredmerm_build.zip"),

	Asset("ANIM", "anim/zealot_build.zip"),

	Asset("ANIM", "anim/swap_voidstaff.zip"),
	Asset("ANIM", "anim/voidstaff.zip"),
	Asset("ANIM", "anim/voidball.zip"),

	Asset("ANIM", "anim/merm_altar.zip"),

	Asset("ANIM", "anim/moonbase_fx_dark.zip"),

	Asset("ANIM", "anim/onyx.zip"),
	Asset("ATLAS", "images/inventoryimages/onyx.xml"),

	Asset("ATLAS", "images/inventoryimages/merm_altar.xml"),
}

local require = GLOBAL.require
local STRINGS = GLOBAL.STRINGS
local Ingredient = GLOBAL.Ingredient
local RECIPETABS = GLOBAL.RECIPETABS
local ACTIONS = GLOBAL.ACTIONS

--lavaspit = function(act)
--	local x,y,z = act.doer.Transform:GetWorldPosition()
--end

--This seems to somehow be causing crashes, never been able to reproduce them tho
--At any rate it is now entirely unnecessary now that I've reworked the spit
--behaviors to use the hairball action.
--AddAction("LAVASPIT", "spit", lavaspit)

RECIPETABS = GLOBAL.RECIPETABS
Recipe = GLOBAL.Recipe
Ingredient = GLOBAL.Ingredient
TECH = GLOBAL.TECH

--GLOBAL.STRINGS.MODS.ZEALOT = {
--	MERM_ZEALOT_GETEM = {},
--	MERM_ZEALOT_BATTLECRY = {},
--	MERM_ZEALOT_DEATH = {}
--}

GLOBAL.STRINGS.MERM_ZEALOT_GETEM = 
    {
        "Kill them.",
        "Many must fall.",
        "They demand blood.",
        "Our next sacrifice.",
        "With me, brothers.",
        "End this one.",
        "As you command..."
    }

GLOBAL.STRINGS.MERM_ZEALOT_BATTLECRY = 
    {
        "Y'LW'NAFH N'GHFT.",
        "MNAHN'T GOF'NN.",
        "FM'LATGH, GRAH'N.",
        "NYARLATHOTEP FOGRAAHG.",
        "Kill the outsider!",
        "We are salvation!",
        "Kneel, mortal vermin."
    }

GLOBAL.STRINGS.MERM_ZEALOT_DEATH = 
    {
        "Take me, Abyss!",
        "How... dare you...",
        "Destroy this body...",
        "I am... free...",
        "Salvation...",
        "You will suffer...",
        "We will survive..."
    }

GLOBAL.STRINGS.MERM_ZEALOT_FOUNDSTAFF = 
    {
        "I've found it!",
        "Master!",
        "Salvation! Salvation!",
        "Sing to me! Please!",
        "I am unworthy!",
        "Return to us!",
        "For the Abyss!"
    }

GLOBAL.STRINGS.NAMES.KRAKEN_TENTACLE = "Arm of the Abyss"
GLOBAL.STRINGS.CHARACTERS.GENERIC.DESCRIBE.KRAKEN_TENTACLE = "Horrible... It's too horrible..."
GLOBAL.STRINGS.CHARACTERS.WILLOW.DESCRIBE.KRAKEN_TENTACLE = "It might snuff out every flame in the world..."
GLOBAL.STRINGS.CHARACTERS.WOLFGANG.DESCRIBE.KRAKEN_TENTACLE = "Wolfgang scared! Nooo!"
GLOBAL.STRINGS.CHARACTERS.WENDY.DESCRIBE.KRAKEN_TENTACLE = "I am... not afraid..."
GLOBAL.STRINGS.CHARACTERS.WX78.DESCRIBE.KRAKEN_TENTACLE = "ERROR. ERROR. ERROR. ERROR."
GLOBAL.STRINGS.CHARACTERS.WICKERBOTTOM.DESCRIBE.KRAKEN_TENTACLE = "I'm afraid this is beyond anyone's ability to understand..."
GLOBAL.STRINGS.CHARACTERS.WOODIE.DESCRIBE.KRAKEN_TENTACLE = "Can we leave it be?... Please?"
GLOBAL.STRINGS.CHARACTERS.WAXWELL.DESCRIBE.KRAKEN_TENTACLE = "A monument to my failings as both a god and a human being."
GLOBAL.STRINGS.CHARACTERS.WATHGRITHR.DESCRIBE.KRAKEN_TENTACLE = "A warrior... does not cry..."
GLOBAL.STRINGS.CHARACTERS.WEBBER.DESCRIBE.KRAKEN_TENTACLE = "We don't like this... W-WE DON'T LIKE THIS!!!"

GLOBAL.STRINGS.NAMES.KRAKEN = "Emissary of the Abyss"
GLOBAL.STRINGS.CHARACTERS.GENERIC.DESCRIBE.KRAKEN = "They were all right... I am a hack... A fraud..."
GLOBAL.STRINGS.CHARACTERS.WILLOW.DESCRIBE.KRAKEN = "Why did I give him up for this? He loved me..."
GLOBAL.STRINGS.CHARACTERS.WOLFGANG.DESCRIBE.KRAKEN = "Wolfgang is coward. Wolfgang deserves this."
GLOBAL.STRINGS.CHARACTERS.WENDY.DESCRIBE.KRAKEN = "Abigail... A-Abigail! ABIGAIL!!!"
GLOBAL.STRINGS.CHARACTERS.WX78.DESCRIBE.KRAKEN = "I DO NOT WANT TO DIE."
GLOBAL.STRINGS.CHARACTERS.WICKERBOTTOM.DESCRIBE.KRAKEN = "... Pulse quickens... humors churn... body reacts..."
GLOBAL.STRINGS.CHARACTERS.WOODIE.DESCRIBE.KRAKEN = "It's eating at me from within... Feeling faint..."
GLOBAL.STRINGS.CHARACTERS.WAXWELL.DESCRIBE.KRAKEN = "I deserve this, and worse. I'm sorry, Charlie."
GLOBAL.STRINGS.CHARACTERS.WATHGRITHR.DESCRIBE.KRAKEN = "A life wasted at performance... Useless to the end."
GLOBAL.STRINGS.CHARACTERS.WEBBER.DESCRIBE.KRAKEN = "Why does everyone hate me? Even Ma and Da..."

GLOBAL.STRINGS.NAMES.INBRED = "Altered Merm"
GLOBAL.STRINGS.CHARACTERS.GENERIC.DESCRIBE.INBRED = "Smells fishy. And angry."
GLOBAL.STRINGS.CHARACTERS.WILLOW.DESCRIBE.INBRED = "A fish running on all fours? I've seen it all."
GLOBAL.STRINGS.CHARACTERS.WOLFGANG.DESCRIBE.INBRED = "Fishy man crawls like dog!"
GLOBAL.STRINGS.CHARACTERS.WENDY.DESCRIBE.INBRED = "A grotesque, malignant saraband of fantastic nightmare."
GLOBAL.STRINGS.CHARACTERS.WX78.DESCRIBE.INBRED = "FISH GUARD DOGS"
GLOBAL.STRINGS.CHARACTERS.WICKERBOTTOM.DESCRIBE.INBRED = "They've regressed into an even more primal state."
GLOBAL.STRINGS.CHARACTERS.WOODIE.DESCRIBE.INBRED = "Dumb as a log, these things are."
GLOBAL.STRINGS.CHARACTERS.WAXWELL.DESCRIBE.INBRED = "Exposure to their gods has... affected them."
GLOBAL.STRINGS.CHARACTERS.WATHGRITHR.DESCRIBE.INBRED = "Could always do with a little spearfishing."
GLOBAL.STRINGS.CHARACTERS.WEBBER.DESCRIBE.INBRED = "Even the other guys aren't THIS stinky."

GLOBAL.STRINGS.NAMES.ZEALOT = "Merm Zealot"
GLOBAL.STRINGS.CHARACTERS.GENERIC.DESCRIBE.ZEALOT = "Not looking to get sacrificed!"
GLOBAL.STRINGS.CHARACTERS.WILLOW.DESCRIBE.ZEALOT = "Jeez, what a creep."
GLOBAL.STRINGS.CHARACTERS.WOLFGANG.DESCRIBE.ZEALOT = "Funny fish man! Tell another joke!"
GLOBAL.STRINGS.CHARACTERS.WENDY.DESCRIBE.ZEALOT = "They serve the dark machinations of their twisted gods."
GLOBAL.STRINGS.CHARACTERS.WX78.DESCRIBE.ZEALOT = "I MOCK YOUR FOOLISH RITUALS"
GLOBAL.STRINGS.CHARACTERS.WICKERBOTTOM.DESCRIBE.ZEALOT = "Piscene holy men, serving an unknown deity."
GLOBAL.STRINGS.CHARACTERS.WOODIE.DESCRIBE.ZEALOT = "What's he goin' on aboot, eh?"
GLOBAL.STRINGS.CHARACTERS.WAXWELL.DESCRIBE.ZEALOT = "They seem to believe the Abyss can save them from Them."
GLOBAL.STRINGS.CHARACTERS.WATHGRITHR.DESCRIBE.ZEALOT = "I reject your false gods!"
GLOBAL.STRINGS.CHARACTERS.WEBBER.DESCRIBE.ZEALOT = "Can't they just go door to door like back at home?"

GLOBAL.STRINGS.NAMES.VOIDSTAFF = "Eclipse Caller's Staff"
GLOBAL.STRINGS.CHARACTERS.GENERIC.DESCRIBE.VOIDSTAFF = "It seems to be calling out for something."
GLOBAL.STRINGS.CHARACTERS.WILLOW.DESCRIBE.VOIDSTAFF = "Why would we want to CREATE darkness?"
GLOBAL.STRINGS.CHARACTERS.WOLFGANG.DESCRIBE.VOIDSTAFF = "Is whispering to me!"
GLOBAL.STRINGS.CHARACTERS.WENDY.DESCRIBE.VOIDSTAFF = "I've invited something evil into the staff."
GLOBAL.STRINGS.CHARACTERS.WX78.DESCRIBE.VOIDSTAFF = "MY MOONBASE MADE IT WORSE."
GLOBAL.STRINGS.CHARACTERS.WICKERBOTTOM.DESCRIBE.VOIDSTAFF = "Something stirs within the gem."
GLOBAL.STRINGS.CHARACTERS.WOODIE.DESCRIBE.VOIDSTAFF = "I think you belong in there, eh?"
GLOBAL.STRINGS.CHARACTERS.WAXWELL.DESCRIBE.VOIDSTAFF = "Let's keep this out of the hands of the Zealots."
GLOBAL.STRINGS.CHARACTERS.WATHGRITHR.DESCRIBE.VOIDSTAFF = "It summons forth an all-consuming darkness!"
GLOBAL.STRINGS.CHARACTERS.WEBBER.DESCRIBE.VOIDSTAFF = "We have enough voices in our head as-is."

GLOBAL.STRINGS.NAMES.VOIDBALL = "Absolute Nothingness"
GLOBAL.STRINGS.CHARACTERS.GENERIC.DESCRIBE.VOIDBALL = "Let's stay away from that."
GLOBAL.STRINGS.CHARACTERS.WILLOW.DESCRIBE.VOIDBALL = "That thing'll snuff out more than flames."
GLOBAL.STRINGS.CHARACTERS.WOLFGANG.DESCRIBE.VOIDBALL = "Scary ball of death!"
GLOBAL.STRINGS.CHARACTERS.WENDY.DESCRIBE.VOIDBALL = "Vast vistas of emptiness call out to me."
GLOBAL.STRINGS.CHARACTERS.WX78.DESCRIBE.VOIDBALL = "NO PHYSICAL PRESENCE DETECTED"
GLOBAL.STRINGS.CHARACTERS.WICKERBOTTOM.DESCRIBE.VOIDBALL = "Where does it lead? Only a fool would find out."
GLOBAL.STRINGS.CHARACTERS.WOODIE.DESCRIBE.VOIDBALL = "Steady, Lucy. Won't hurt us if we stay back."
GLOBAL.STRINGS.CHARACTERS.WAXWELL.DESCRIBE.VOIDBALL = "They didn't like me dabbling in this magic."
GLOBAL.STRINGS.CHARACTERS.WATHGRITHR.DESCRIBE.VOIDBALL = "The darkness consumes!"
GLOBAL.STRINGS.CHARACTERS.WEBBER.DESCRIBE.VOIDBALL = "We feel like we shouldn't have done that."

GLOBAL.STRINGS.NAMES.MERM_ALTAR = "Wretched Altar"
GLOBAL.STRINGS.CHARACTERS.GENERIC.DESCRIBE.MERM_ALTAR = "This is what they pray to?"
GLOBAL.STRINGS.CHARACTERS.WILLOW.DESCRIBE.MERM_ALTAR = "Worship what you want, but this is going too far!"
GLOBAL.STRINGS.CHARACTERS.WOLFGANG.DESCRIBE.MERM_ALTAR = "Fish men are scary!"
GLOBAL.STRINGS.CHARACTERS.WENDY.DESCRIBE.MERM_ALTAR = "Deep into that darkness peering, long I stood there, wondering, fearing..."
GLOBAL.STRINGS.CHARACTERS.WX78.DESCRIBE.MERM_ALTAR = "THEY OFFER MEATBAGS TO ROCKS. FASCINATING."
GLOBAL.STRINGS.CHARACTERS.WICKERBOTTOM.DESCRIBE.MERM_ALTAR = "A ghastly display of theological fervor."
GLOBAL.STRINGS.CHARACTERS.WOODIE.DESCRIBE.MERM_ALTAR = "Those fish guys are some sick puppies, eh?"
GLOBAL.STRINGS.CHARACTERS.WAXWELL.DESCRIBE.MERM_ALTAR = "It sleeps for now. Thank goodness."
GLOBAL.STRINGS.CHARACTERS.WATHGRITHR.DESCRIBE.MERM_ALTAR = "How barbaric!"
GLOBAL.STRINGS.CHARACTERS.WEBBER.DESCRIBE.MERM_ALTAR = "Even the bullies don't deserve this."

GLOBAL.STRINGS.NAMES.ONYX = "Black Gem"
GLOBAL.STRINGS.CHARACTERS.GENERIC.DESCRIBE.ONYX = "This gem seems evil."
GLOBAL.STRINGS.CHARACTERS.WILLOW.DESCRIBE.ONYX = "Not even fire would light this up."
GLOBAL.STRINGS.CHARACTERS.WOLFGANG.DESCRIBE.ONYX = "You stay in there, scary monster!"
GLOBAL.STRINGS.CHARACTERS.WENDY.DESCRIBE.ONYX = "Hateful eyes peer out from within."
GLOBAL.STRINGS.CHARACTERS.WX78.DESCRIBE.ONYX = "ACHROMATIC ROCK."
GLOBAL.STRINGS.CHARACTERS.WICKERBOTTOM.DESCRIBE.ONYX = "Appears to be a parallel-banded form of chalcedony."
GLOBAL.STRINGS.CHARACTERS.WOODIE.DESCRIBE.ONYX = "Don't much like it in there, eh?"
GLOBAL.STRINGS.CHARACTERS.WAXWELL.DESCRIBE.ONYX = "I have a lot of questions for you, old friend."
GLOBAL.STRINGS.CHARACTERS.WATHGRITHR.DESCRIBE.ONYX = "I have sealed the monster inside this rock!"
GLOBAL.STRINGS.CHARACTERS.WEBBER.DESCRIBE.ONYX = "Stop looking at us like that!"

local onyx = Ingredient( "onyx", 1)
onyx.atlas = "images/inventoryimages/onyx.xml"

STRINGS.RECIPE_DESC.VOIDSTAFF = "Summon a horrible darkness."
AddRecipe("voidstaff", {Ingredient("nightmarefuel", 4), Ingredient("livinglog", 2), onyx }, RECIPETABS.ANCIENT, TECH.ANCIENT_FOUR, nil, nil, nil, 1, nil, "images/inventoryimages/voidstaff.xml", "voidstaff.tex")

STRINGS.RECIPE_DESC.MERM_ALTAR = "To revere the eldritch."
AddRecipe("merm_altar", {Ingredient("moonrocknugget", 8), Ingredient("pigskin", 4), onyx }, RECIPETABS.MAGIC, TECH.MAGIC_THREE, "merm_altar_placer", nil, nil, nil, nil, "images/inventoryimages/merm_altar.xml", "merm_altar.tex")

 

I've also included the rest of the mod below in the .zip file. What I want to know is: How can I make it stop freezing the cave worldgen? I don't want to add the setpiece to the caves, I just want the mod to work while caves are enabled. Thank you very much in advance!

CthulhuThing.zip

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
  • Create New...