DangWoodchuck Posted June 1, 2016 Share Posted June 1, 2016 (edited) 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 June 1, 2016 by DangWoodchuck Link to comment https://forums.kleientertainment.com/forums/topic/67806-how-does-one-buff-a-creature-in-mods/ Share on other sites More sharing options...
FelixTheJudge Posted June 1, 2016 Share Posted June 1, 2016 function monsterpostinit (inst) -- whatever you want inside here. end AddPrefabPostInit("yourmonster", monsterpostinit) these go inside modmain. Link to comment https://forums.kleientertainment.com/forums/topic/67806-how-does-one-buff-a-creature-in-mods/#findComment-778658 Share on other sites More sharing options...
DangWoodchuck Posted June 1, 2016 Author Share Posted June 1, 2016 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? Link to comment https://forums.kleientertainment.com/forums/topic/67806-how-does-one-buff-a-creature-in-mods/#findComment-778659 Share on other sites More sharing options...
FelixTheJudge Posted June 1, 2016 Share Posted June 1, 2016 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. Link to comment https://forums.kleientertainment.com/forums/topic/67806-how-does-one-buff-a-creature-in-mods/#findComment-778660 Share on other sites More sharing options...
DangWoodchuck Posted June 1, 2016 Author Share Posted June 1, 2016 (edited) 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 June 1, 2016 by DangWoodchuck Link to comment https://forums.kleientertainment.com/forums/topic/67806-how-does-one-buff-a-creature-in-mods/#findComment-778686 Share on other sites More sharing options...
FelixTheJudge Posted June 1, 2016 Share Posted June 1, 2016 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. Link to comment https://forums.kleientertainment.com/forums/topic/67806-how-does-one-buff-a-creature-in-mods/#findComment-778713 Share on other sites More sharing options...
Aquaterion Posted June 1, 2016 Share Posted June 1, 2016 in ds/data/scripts/modutil.lua you can see all the functions you the things you can use in modmain.lua, such as; AddStategraphPostInit() AddComponentPostInit() AddBrainPostInit() Link to comment https://forums.kleientertainment.com/forums/topic/67806-how-does-one-buff-a-creature-in-mods/#findComment-778726 Share on other sites More sharing options...
Mobbstar Posted June 1, 2016 Share Posted June 1, 2016 Alternatively, you can change the "Tuning" variables directly. This might affect other mods as well. e.g. (modmain.lua): GLOBAL.TUNING.QUACKEN_HEALTH = 24000 Link to comment https://forums.kleientertainment.com/forums/topic/67806-how-does-one-buff-a-creature-in-mods/#findComment-778828 Share on other sites More sharing options...
DarkXero Posted June 1, 2016 Share Posted June 1, 2016 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. Link to comment https://forums.kleientertainment.com/forums/topic/67806-how-does-one-buff-a-creature-in-mods/#findComment-778834 Share on other sites More sharing options...
FelixTheJudge Posted June 2, 2016 Share Posted June 2, 2016 Thank u guys for being infinitely more knowledgeable. Link to comment https://forums.kleientertainment.com/forums/topic/67806-how-does-one-buff-a-creature-in-mods/#findComment-778988 Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now