Jump to content

Is there a real API documentation?


hottehead

Recommended Posts

@hottehead

The sidebar will eventually become difficult to navigate when it's filled with more pages. I suggest we get a plugin that collapses sub-pages into their parent to make it easier (unless it's possible without one).

 

Edit: Also, how do you add pages to the side bar? I've added pages through the CP and assumed they would automatically update there, but that doesn't seem to be the case. A quick google search was less than useful, but from what I gathered, I'm assuming you'll have to code them in manually.

 

Edit 2: Just added a bunch of pages. There's a page for every component now and almost half of all prefabs. Whew. Didn't realize there were so many.

Hope you'll be making frequent backups too, just in case.

 

Edit 3: Made blank pages for all Behaviors, Brains, Components, and almost all Prefabs.

Link to comment
Share on other sites

@hottehead

The sidebar will eventually become difficult to navigate when it's filled with more pages. I suggest we get a plugin that collapses sub-pages into their parent to make it easier (unless it's possible without one).

 

Edit: Also, how do you add pages to the side bar? I've added pages through the CP and assumed they would automatically update there, but that doesn't seem to be the case. A quick google search was less than useful, but from what I gathered, I'm assuming you'll have to code them in manually.

 

Edit 2: Just added a bunch of pages. There's a page for every component now and almost half of all prefabs. Whew. Didn't realize there were so many.

Hope you'll be making frequent backups too, just in case.

 

Edit 3: Made blank pages for all Behaviors, Brains, Components, and almost all Prefabs.

 

Wow, lots of files! Nice. Lets fill them =) I will install a backup routine asap.

 

Sidebar will definitly be too filled. I will make it collapse asap. Adding pages is done via "Appereance->Menu" 

 

Do you know how to handle wordpress? If so, I'd like to give you administrator rights. 

Link to comment
Share on other sites

Wow, lots of files! Nice. Lets fill them =) I will install a backup routine asap.

Yup, will get to that soon as I add Screens, Stategraphs, and Widgets. I think it'll be easier that way as we won't have to make new pages every time we reference another section of the code/game.

 

Sidebar will definitly be too filled. I will make it collapse asap. Adding pages is done via "Appereance->Menu" 

I don't believe I have access to that, unless it's hidden somewhere. I looked through the the options provided in the CP.

 

Do you know how to handle wordpress? If so, I'd like to give you administrator rights. 

I haven't used it much before now, but I'm sure I can figure it out. I've used other site builders and made some from scratch before. Everything in the CP seems fairly straight forward.

 

We should change the name to something like "Don't Starve Unofficial API Documentation" because the current one is way too vague, as @Mobbstar mentioned (other thread).

 

 

Edit: We now have pages for all widgets, behaviours, brains, components, prefabs (missing few), screens, and stategraphs. I also added another section for information on mod files (modinfo.lua etc) and file structure (where to put them). It's still incomplete as of now, though.

 

Link to comment
Share on other sites

Finally Im done guys! Menus collapse, user roles are set up (see this site). We only need a proper URL and we are good to go. Everyone who has registered until now is promoted to be at least an author. This means you are allowed to edit/add/delete all pages and accept reviews from contributors. Be responsible.

 

Please give some ideas for the URL and please check if it is still free and affordable. No need for an expensive domain.

 

How about:   www.ds-unofficial-api.net  ?

Link to comment
Share on other sites

@hottehead

 

These are still available too, as of this post.

  • dontstarveapi.com
  • dontstarveapi.net

 

I think we should try to keep it short and simple so it's easy to remember right away. Though we might need permission from Klei to use such a name.

 

But.. as for the pricing, I don't think we will be able to support it for very long, even if it's relatively cheap, unless someone is willing to put that much into it. We can stick to a free domain name for now. (dontstarveapi.tk is available)

Link to comment
Share on other sites

@hottehead

 

These are still available too, as of this post.

  • dontstarveapi.com
  • dontstarveapi.net

 

I think we should try to keep it short and simple so it's easy to remember right away. Though we might need permission from Klei to use such a name.

 

But.. as for the pricing, I don't think we will be able to support it for very long, even if it's relatively cheap, unless someone is willing to put that much into it. We can stick to a free domain name for now. (dontstarveapi.tk is available)

 

Your domains look good. What is the best way to contact Klei for this issue?

 

The domains cost 15 Euro/Year which is totally fine for me. I will pay it for the first year. Just didnt want to pay 50 or 100 Euros.

Link to comment
Share on other sites

Though we might need permission from Klei to use such a name.

What is the best way to contact Klei for this issue?

 

Read [this] first.

It seems unlikely to me that Klei would make the docs official and take responsibility, but it's worth asking when only the domain itself is called that, as the site clearly states "unofficial" first (we need to fix the latter still :p). In short: Does the domain count as the name?

If it does, we'd have to find a name that is rather easy to remember and yet implies that it's inofficial.

 

Sending an E-Mail sounds less ambiguous than an open forum discussion to me. There's a contact button on the page linked.

Link to comment
Share on other sites

Read [this] first.

It seems unlikely to me that Klei would make the docs official and take responsibility, but it's worth asking when only the domain itself is called that, as the site clearly states "unofficial" first (we need to fix the latter still :razz:). In short: Does the domain count as the name?

If it does, we'd have to find a name that is rather easy to remember and yet implies that it's inofficial.

 

Sending an E-Mail sounds less ambiguous than an open forum discussion to me. There's a contact button on the page linked.

 

I have contacted them via the contact form and asked if we can call it "www.dontstarveapi.net/com".  Lets see what they reply. I also linked them here and to the site. Im also sure they wont make it official, if so they would have already done this.

 

 

BTW: Just saw this description. Funny! Who wrote this?

 

 

Hunger This component lets your prefab starve over time. That’s the entire game concept in a single component.
Link to comment
Share on other sites

The domains cost 15 Euro/Year which is totally fine for me. I will pay it for the first year. Just didnt want to pay 50 or 100 Euros.

Then I've got good news. I'll contact you through pm.

 

 

@Mobbstar, Oh, I was looking for that page, thanks!

Quoting from there,

Bad Application Name: "Don't Starve Wiki."

Good Application Name: "Unofficial Don't Starve Wiki" or "Guide for Don't Starve" or "Bob's Don't Starve Map App."

So, as you said, if the domain counts as a name too, we'll probably need to come up with something else.

 

 

 

BTW: Just saw this description. Funny! Who wrote this?

 

Hahaha! I'm pretty sure that was Mobbstar, he used that in his component thread too.

Link to comment
Share on other sites

This looks like could be a great source of information,

but some of it seems a bit underdocumented.

 

For example: the Fundamental Blocks on Lua seems straightforward enough.

http://128.199.40.198/wordpress/lua/fundamental-blocks/

 

But the next section http://128.199.40.198/wordpress/lua/syntax/colon-and-dot/

states "The dot syntax is for implementing ordinary child methods."

But nothing I found defined what an 'ordinary child method' means.

 

and "The colon syntax is for implementing methods that pass a self variable as the first parameter."

what is a self variable, why would it need to be passed as a first parameter.

 

 

 

Link to comment
Share on other sites

It seems a lot of the pages have either not been made yet? Or are they just pending approval?

It's still a work in progress. The site was created near the end of January, and we have not had enough time since then to complete all pages. As of now, over 1,000 pages are still drafts, and 1 is pending review.

 

@MidrealmDM Thank you for pointing that out, I'll try to further clarify those points. As previously mentioned, it still needs a lot of work before it's complete.

 

Edit: Page updated with more info.

Link to comment
Share on other sites

Feel free to correct me if I'm wrong here(in fact, please do!)

 

With regard to the dot-vs-colon page, I think it might be a little confusing to refer "tables with function references stored in fields" as modules. Modules, as I understand, are (potentially, not necessarily) specialized tables designed to be used with the module/package system of lua (such as using loaders or require or the package functions or the module function).

 

I have the bad habit of calling them objects due to in Javascript virtually everything being a descendant of the prototypical object object, but that's bad too, even though they are technically objects along with the function, userdata, and thread data types.  They're really just tables with methods.

Link to comment
Share on other sites

@Corrosive

I understand your perspective, but you may be thinking of modules as more complex than they are or need to be.

From the definition of lua modules, we can see that simple tables with functions in them are also considered modules (albeit usually in a dedicated file). The point of modules in programming is to distribute sections of code for maintainability and reusability.

 

By that definition, an object with children functions is essentially a module too. In the most logical cases, it's purpose is to separate a section of code from the rest, depending on its functionality. If the object is never returned or exported from the file to be used elsewhere, external files won't be able to utilize it. Within the same file, though, it can be used just as any other module.

The first example in this article demonstrates using a lua module in the same file that it was created.

 

Although, for the sake of presenting complete information, perhaps we should mention the fact that the syntax can be used for simple objects too, even if the object doesn't use any other module functionality.

Feel free to modify the page as you wish.

 

Disclaimer, I'm not an expert on this issue.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
  • Create New...