r/kittensgame • • Sep 03 '15

Thinking of doing some scripting

Is there an API anywhere so I can see what functions are available?

0 Upvotes

5 comments sorted by

2

u/letharion Sep 04 '15

You might also be able to work out how to do most things by looking at this script I wrote some time: https://gist.github.com/letharion/188dee28c349c6e610fd

1

u/Cavemanfreak Sep 04 '15

This was really helpful! Thanks a bunch!

1

u/letharion Sep 04 '15

I don't actively use or work on it anymore, but if you're interested in collaborating on it, let me know, and maybe we can work something out. :)

4

u/bloodrizer Sep 03 '15

All api is accessible through the gamePage global variable.

gamePage has a number of tab managers that provide an access to a different models (gmaePage.village, gamePage.resPool, gamePage.buildings, etc).

For the most part UI communicate with the core logic through those managers and their methods.

I suggest to review gamePage structure in the js console and check the code ( it should be pretty much self-explaining).

1

u/13EchoTango Sep 03 '15

There's a bit bucket link in the sidebar