Gustoiles Posted July 1, 2016 Share Posted July 1, 2016 Hi everybody. I'm a complete newbie in modding. I'm trying to change an existing creature in a mod, so I have copy/paste the file .lua in my /script/prefabs and add the prefabs in modmain too but that doesnt seem to work. The change I made in the file .lua pasted doesn't seem to work. So, the question is in the title : Is that possible to overwrite existing prefab with another prefab in the mod with same name ? Link to comment https://forums.kleientertainment.com/forums/topic/68586-is-that-possible-to-overwrite-existing-prefab/ Share on other sites More sharing options...
Mobbstar Posted July 1, 2016 Share Posted July 1, 2016 You should generally edit existing prefabs using AddPrefabPostInit in modmain.lua AddPrefabPostInit("twigs", function(inst) inst.Transform:SetScale(2,2,2) -- This is just a test: the twig item should be twice the size now end) Link to comment https://forums.kleientertainment.com/forums/topic/68586-is-that-possible-to-overwrite-existing-prefab/#findComment-789164 Share on other sites More sharing options...
Gustoiles Posted July 1, 2016 Author Share Posted July 1, 2016 Oh, thanks, that could work but i have another question, how could i make another setbuild for the existing prefab ? Link to comment https://forums.kleientertainment.com/forums/topic/68586-is-that-possible-to-overwrite-existing-prefab/#findComment-789207 Share on other sites More sharing options...
R1ncewind Posted July 3, 2016 Share Posted July 3, 2016 Mobbstar replied about proper solution. But if you are really want to override prefab - you have to put it into scripts/prefabs/prefab_name.lua and change mod priority to lower than mod where prefab already exists. Link to comment https://forums.kleientertainment.com/forums/topic/68586-is-that-possible-to-overwrite-existing-prefab/#findComment-789737 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