Jump to content

Recommended Posts

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?

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 by ap95

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)

 

  • Like 1

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...