ap95 Posted October 6, 2021 Share Posted October 6, 2021 So, I've got a pet complaint, and was able to fix it by adding two lines to an existing LUA File. I'd like to make it into a mod, and I'm not really sure how. Is there an API command to do that? Or would it have to be a "Make a new item with the same stats" type mod? Link to comment https://forums.kleientertainment.com/forums/topic/134280-the-equivalent-to-adding-lines-to-a-lua-file/ Share on other sites More sharing options...
Monti18 Posted October 6, 2021 Share Posted October 6, 2021 It depends on what you want to do. Most things can be easily done, for example if you want to change a certain prefab you can do it with AddPrefabPostInit. You would need to tell more so that we can help you Link to comment https://forums.kleientertainment.com/forums/topic/134280-the-equivalent-to-adding-lines-to-a-lua-file/#findComment-1502365 Share on other sites More sharing options...
ap95 Posted October 6, 2021 Author Share Posted October 6, 2021 (edited) This is literally it: C:\Program Files (x86)\Steam\steamapps\common\Don't Starve Together\data\databundles\scripts.zip\scripts\prefabs\minotaurhorn.lua inst:AddComponent("stackable") inst.components.stackable.maxsize = TUNING.STACK_SIZE_LARGEITEM Edited October 6, 2021 by ap95 Link to comment https://forums.kleientertainment.com/forums/topic/134280-the-equivalent-to-adding-lines-to-a-lua-file/#findComment-1502434 Share on other sites More sharing options...
BlueBeka Posted October 7, 2021 Share Posted October 7, 2021 Basically you just need to make a mod with the following modmain.lua file: AddPrefabPostInit("minotaurhorn", function(inst) if GLOBAL.TheWorld.ismastersim then inst:AddComponent("stackable") inst.components.stackable.maxsize = TUNING.STACK_SIZE_LARGEITEM end end) 1 Link to comment https://forums.kleientertainment.com/forums/topic/134280-the-equivalent-to-adding-lines-to-a-lua-file/#findComment-1502504 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