Last_epilogue Posted April 16, 2023 Share Posted April 16, 2023 Hi there, so I want to change a lot of one brain files. I got tired of using AddBrainPostInit and just create a new script/brains folder and put my file in. Now the problem is I don't know how to write the modmain so the game would use my file instead of the original one. I've been trying to use AddClassPostConstruct but doesn't seem to work. Can anyone help me with that? Link to comment https://forums.kleientertainment.com/forums/topic/147182-how-to-overwrite-brain-file-in-modmain/ Share on other sites More sharing options...
Rickzzs Posted April 16, 2023 Share Posted April 16, 2023 you don't need a modmain for a file to override. Link to comment https://forums.kleientertainment.com/forums/topic/147182-how-to-overwrite-brain-file-in-modmain/#findComment-1630286 Share on other sites More sharing options...
Last_epilogue Posted April 17, 2023 Author Share Posted April 17, 2023 (edited) 2 hours ago, Rickzzs said: you don't need a modmain for a file to override. So I'll just create a [mymodname-scripts-brains-mymodbrain.lua] file and put it in the mod file? Do I need to create an empty modmain? Edited April 17, 2023 by Last_epilogue Link to comment https://forums.kleientertainment.com/forums/topic/147182-how-to-overwrite-brain-file-in-modmain/#findComment-1630302 Share on other sites More sharing options...
Rickzzs Posted April 17, 2023 Share Posted April 17, 2023 Override method: put your file in exactly the same path, with exactly the same name. You only need a modinfo.lua, but in case the game require a modmain.lua you can create an empty one. Link to comment https://forums.kleientertainment.com/forums/topic/147182-how-to-overwrite-brain-file-in-modmain/#findComment-1630346 Share on other sites More sharing options...
Last_epilogue Posted April 17, 2023 Author Share Posted April 17, 2023 3 hours ago, Rickzzs said: Override method: put your file in exactly the same path, with exactly the same name. You only need a modinfo.lua, but in case the game require a modmain.lua you can create an empty one. Sorry for keep asking but I just looked and my file seem to be in both DLC0002 and DLC0003 files (and not in prefab file). What should I do to "put my file in the same path"? Link to comment https://forums.kleientertainment.com/forums/topic/147182-how-to-overwrite-brain-file-in-modmain/#findComment-1630361 Share on other sites More sharing options...
Rickzzs Posted April 17, 2023 Share Posted April 17, 2023 just in scripts/. If in DLCs they are different you need to handle the difference. Link to comment https://forums.kleientertainment.com/forums/topic/147182-how-to-overwrite-brain-file-in-modmain/#findComment-1630432 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