Jump to content

Recommended Posts

@Fnull

image.png.464c6d68d4e2c7816852cc79e5b21767.png

The "API" is all in the LUA files accessible in:  Steam/steamapps/common/Don't Starve Together/data/databundles/scripts.zip

Extract 'em out of the zip and you'll be on your way to getting started with reading over what's what.

 

As for what's available in the modmain.lua file for your mod, check out scripts/mods.lua and scripts/modutil.lua.

You can use modding as a launch pad into learning LUA by reading over the game's prefabs/components/etc and seeing how it's structured.  Or looking at other mods, though be weary about copy-pasting from other mods and then reuploading to the workshop; copyright is a thing.

  • Like 1
  • GL Happy 1
9 hours ago, CarlZalph said:

@Fnull

image.png.464c6d68d4e2c7816852cc79e5b21767.png

The "API" is all in the LUA files accessible in:  Steam/steamapps/common/Don't Starve Together/data/databundles/scripts.zip

Extract 'em out of the zip and you'll be on your way to getting started with reading over what's what.

 

As for what's available in the modmain.lua file for your mod, check out scripts/mods.lua and scripts/modutil.lua.

You can use modding as a launch pad into learning LUA by reading over the game's prefabs/components/etc and seeing how it's structured.  Or looking at other mods, though be weary about copy-pasting from other mods and then reuploading to the workshop; copyright is a thing.

thanks answer

1 hour ago, Fnull said:

I have seen the code, but did not find the relevant API documentation, such as a specific introduction to the role of a function and the meaning of its parameters

There isn't any official API, the best we get is the scripts the game runs on and the forums here.

2 hours ago, Fnull said:

Ohhh,NO

Yeah, the functions the game runs on doesn't have any official API reference to look over.

The barrier to entry for modding is a bit higher in that you'll need to know or learn LUA and then figure out the systems in place.

There's been some attempts in the past to create an auto-generated API before but they all tended to stop being updated or didn't provide enough information to make them useful.

Depending on what you want to do with the game there's so many possible solutions to going about getting it done, feel free to ask questions here.

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