r/kittensgame • u/Cavemanfreak • Sep 03 '15
Thinking of doing some scripting
Is there an API anywhere so I can see what functions are available?
0
Upvotes
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
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