Find User here you can look for a user

API for reference?

#1 2018-03-22 17:05:02
Its been a while, buts its good to be back! I remember before I took a break from things my colony, I was attempting to somehow use a discord bot to look up things in the my colony reference. If any one has ideas about this let me know.

Thanks,

Orcinus
#2 2018-03-31 20:39:30
Well you would just use the game data file for the current version. You can find it using the following syntax:

https://www.apewebapps.com/apps/my-colony/0.60.0/game.js

whereby you just change the version number in the URL to reflect the latest release version of the game. The entire file is a JSON object so it should be easy enough to parse.
Owner of Ape Apps
Edited by bastecklein on 2018-03-31 20:40:25
#3 2018-04-04 20:24:13
OK, I think I was thinking about that but didn't know how to/where to start thanks @bastecklein
#4 2018-04-05 15:46:36
I have parts of it working now, but I'm not sure how to get the "description" of various things. It almost seems like its a link or something. Any ideas?
#5 2018-04-06 15:14:02
Oh yes, the Description field is a reference to a string in this file:
https://www.apewebapps.com/apps/my-colony/0.60.0/strings.js

I made this so I could localize My Colony at some point.
Owner of Ape Apps
#6 2020-05-09 12:16:26
bastecklein said:Well you would just use the game data file for the current version. You can find it using the following syntax:

https://www.apewebapps.com/apps/my-colony/0.60.0/game.js

whereby you just change the version number in the URL to reflect the latest release version of the game. The entire file is a JSON object so it should be easy enough to parse.

annoyingly, (using 1.5.0) this does not seem to be the case. if it was JSON I could use
$gamedata = json_decode(file_get_contents('https://www.apewebapps.com/apps/my-colony/1.5.0/game.js'),true)
to get a nice PHP array; as it is I have to use
<script src="https://www.apewebapps.com/apps/my-colony/1.5.0/game.js"></script>
<script>document.getElementById('data').value = JSON.stringify(window.ColonyGame);</script>
<input type="hidden" id="data" name="data">
submit the form and then
$gamedata = json_decode($_POST['data'],true);

Having an actual JSON file would be quite useful.
My Colony Discord Server - https://discord.gg/dvJSKBB
#7 2020-05-11 10:11:43
https://coloniae.space/static/json/gameversions/

hf

also klingon, these json files are made in python using a similar technique using the game.js, albeit less robust but working. I think your way is the best we have

the post was 2 years old though...
Creator of Coloniae

Edited by Sobeirannovaocc on 2020-05-11 10:16:16
#8 2020-05-11 14:10:40
Eventually the game data file is going to be a straight JSON file, as I have been working on a desktop application to edit and generate the game data file for me, so I do not have to make manual edits to it anymore. Don't ask me about a timeframe though!
Owner of Ape Apps
#9 2020-05-11 18:31:55
It almost is JSON. I tried treating it as such in PHP using json_decode. all I had to do was remove the commented out line, remove "window.ColonyGame = " and ";" and change some numbers from .1 to 0.1.
it worked, but it wasn't great.
My Colony Discord Server - https://discord.gg/dvJSKBB
My Colony

#my-colony


#my-colony-podcast
Welcome
Ape Apps is an independent software development company founded in 2010 by Brandon Stecklein. Over the years, Ape Apps has published over 400 apps and games across various platforms. You can get in touch with Brandon on Twitter or by leaving a post on his wall @bastecklein
App of the Day