Jump to content

API dump

Recommended Posts

I've been digging and that seems to be most of what you can access in Lua.

Feel free to add to it and please help improving it.


I didn't get the return type and parameters for most of the API. That would be a great starting point.




Admins, I do not know if this is OK with you guys. If not, I'll remove it.
Link to comment
Share on other sites

I very highly doubt the admins would have any reason to remove this. It's simply documentation for the API within the game. It's all raw lua files, anyway.


Anyways, I'll contribute to this. I know many of these functions. Not going to hurry, though.


One complaint; in a ton of places you have " . " where it should be " : " That's a pretty big deal as far as usage is concerned.


Edited by debugman18
Link to comment
Share on other sites

I'm asking because they might not approve the way I got it or they simply don't want an API published right now.


It's all raw Lua files. There's no decryption, (once upon a time the files were compilled Lua, and modders decompiled them happily anyways) so why would the method of obtaining the API dump matter?


As for not wanting an API published right now, Don't Starve is not a new game. Go check out the Mods and Tools section for Don't Starve (sans Together) and tell me they don't want people documenting the API.


Sorry if that sounds pushy or negative, but I wanted to clarify those non-issues, both for you and for modders who may wander into this topic.


Link to comment
Share on other sites

It is not all Lua and the list did not come from those files.


There is a native part that still does a lot of things in the game and some devs might not like it being exposed for whatever reason. I just asked because I did not find any rule about the topic.


I  know Don't Starve is not new. It surprises me that there is nothing like this listing yet, even with all those experienced modders out there.


Lets hope people really give a hand, because it is a lot of work and I probably won't be able to do it all.  :encouragement:


Link to comment
Share on other sites

@ZehZehZeh, Well, I wouldn't put too much time into it unless you really need to know the details on a few specific functions. PeterA and MarkL have plans to release an official API at some point that is hopefully not too far in the future. 




Is it going to be more like actual documentation than the sample mods and tutorials? Not that there's anything wrong with those, but documentation would be better for a wider spectrum of modders.



Link to comment
Share on other sites

@debugman18, Like actual documentation. The term they used was "generate" it, so I'd expect it to be something auto-generated like Javadoc or something, rather than custom-written descriptions for what everything does. But really if we just know the arguments to the functions, that's a huge step in being able to figure them out by testing :D 

Link to comment
Share on other sites

It's not about knowing all the functions, it's about making them available to everyone. I just needed those that dealt with the minimap, as you saw in my other post.


That is nice to hear that they plan on releasing some kind of API. I hope they do it sooner than later. It's weird that they didn't bother doing that sooner as that kind of documentation helps a lot, even internally.


It is possible to gather the parameters right now, but it would be a lot of work. You got to check the inner workings of each function call and that is a lot of ASM digging.

Link to comment
Share on other sites

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