Gubbey

Registered Users
  • Content count

    7
  • Joined

  • Last visited

Community Reputation

3 Neutral

About Gubbey

  • Rank
    Junior Member
  1. 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): 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
  2. Actually, a way simpler way to do it (while also preventing slowing from spider creep) would be to add the following line of code under your character prefab's master_postinit function: inst.components.locomotor:SetSlowMultiplier( 1 ) This sets the speed of the prefab when it is slowed by any source. Setting it to "1" is basically saying that if your character is slowed, they'll move at 1x their original speed.
  3. In honey_trail.lua, near the top is the function OnUpdate: "for i, v in ipairs(TheSim:FindEntities(x, y, z, rad, { "locomotor" }, { "flying", "playerghost", "INLIMBO" })) do" is a loop that only executes if it "finds entities" WITH the tag specified on the left (locomotor) and WITHOUT the tags specified on the right (flying, playerghost, INLIMBO). This means in the prefab file for your character, you can use inst:AddTag to create a new tag for them. Let's call it "honeywalker." Then, copy honey_trail.lua into your own mod prefab folder, and alter the above code like so: Simply add "honeywalker" on the right. This lets the OnUpdate function know not to apply the speed multiplier to your prefab, since they have the honeywalker tag.
  4. In dynamicmusic.lua, there's a table for TRIGGERED_DANGER_MUSIC. This determines what music should play during "special" situations, such as being near the Bee Queen or the Moon Caller event. My mod directly edits dynamicmusic.lua in order to have special music play for my boss; however this is awful for a variety of reasons, such as incompatibility with future updates and other mods that alter dynamicmusic.lua, like the awesome Dusk and Night Music mod. MY QUESTION IS: Is there some kind of function a la AddRecipe that allows me to add music events without editing dynamicmusic.lua? I assume it cannot be directly accessed from modmain.lua since the table itself is local. Thank you in advance for any help/clarification!