Jump to content

Recommended Posts

 OK, so what's going on is that I've been buffing the 3 major bosses (Sealnado, Tiger Shark, and the Quacken) of Shipwrecked as mods for extra difficulty, but I don't know how to assign the modmain.lua or modinfo.lua to add the added buffs to the already existing creatures. I'll also have to know what I'll need to do in order to add content to already existing stategraphs, components, and brains, please.

Edited by DangWoodchuck
4 minutes ago, FelixTheJudge said:

function monsterpostinit (inst)

-- whatever you want inside here.

end


AddPrefabPostInit("yourmonster", monsterpostinit)   


these go inside modmain.

Thanks. Will I have to do a similar command for stategraphs, brains, and components?

2 minutes ago, DangWoodchuck said:

Thanks. Will I have to do a similar command for stategraphs, brains, and components?

bahahahah. Oh boy. I know nothing about stategraphs, brains and components. ; 3;
Hopefully someone more LUA smart can help you there.

2 hours ago, FelixTheJudge said:

function monsterpostinit (inst)

-- whatever you want inside here.

end


AddPrefabPostInit("yourmonster", monsterpostinit)   


these go inside modmain.

On testing this out, I pasted the entirety of my buffed Quacken's prefab code in the place of the function, but the Quacken's behavior is still similar to its default behavior. I also tried to only add the pieces of my buffed Quacken that's different from the default Quacken, and there's still no change. I did have the name of the Quacken (kraken is its code name) in the "AddPrefabPostInit" string, so that can't be the problem. Is there something I'm doing wrong?

Edited by DangWoodchuck
3 hours ago, DangWoodchuck said:

On testing this out, I pasted the entirety of my buffed Quacken's prefab code in the place of the function, but the Quacken's behavior is still similar to its default behavior. I also tried to only add the pieces of my buffed Quacken that's different from the default Quacken, and there's still no change. I did have the name of the Quacken (kraken is its code name) in the "AddPrefabPostInit" string, so that can't be the problem. Is there something I'm doing wrong?

I don't think you can over-ride their behavior from that function. That function is for changing their stats and health and all that.
To chance their behavior I think you have to overright the brain and stategraph of them by adding the brain and stategraph of quacken into your mod folder. There might be another method, but as far as I know AddPrefabPostInit  works with prefabs only and only with things that prefabs can control.

You can also hotswap files.

If you have, say, mods/mymod/scripts/prefabs/kraken.lua, then the game will load that kraken.lua file, instead of the game's one.

Same applies for brains and stategraphs, you put them in mods/mymod/script/stategraphs and mods/mymod/script/brains.

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
×
  • Create New...