Search - api

The moment everyone has been waiting for has finally arrived, the release of My Colony v0.50.0 - the fighting 50!

50 is a nice round number, but is the update nice and round as well? Let's take a look at what is new and what has changed:

My Colony v0.50.0 Changelog

New Stuff
  • New Structures: Bloodletting Station, Spire of Knowledge, Quantum Sugar Cloner, Uranium Silo
  • New Unit: Ancientbug
  • New premium content: Orb of Radiance
Changes
  • GBT: Added cooldown time between GBT trades, increased transaction civics costs, GBT contracts with lot sizes above your trading capacity no longer appear, You can no longer trade in lot sizes above your gifting capacity, The server can now limit the size and price of your trades.
  • Storage Limits added: Aluminum, Uranium, Gold, and Clay now have storage requirements.
  • Resource Decay: Resources left sitting outside of storage will now decay.
  • Collect All: You can now collect all gifts at once with a single click.
  • Message Reporting: There is a new in-game mechanism to report abusive PM's.
  • Rebalancing: Antanium Synthesis Lab and Triantanium Refinery now offer a small amount of storage. Money generation from the Investment Bank and Clothing Sweatshop has been reduced.
  • Tech Window: Each available tech now shows what new structures is contributes to.
  • Online Colonies: Colonies played in online mode now require an internet connection to play.
  • Right Click: Mouse users can now quickly move vehicles using the right click button.
  • UI Changes: A bunch of small UI improvements carried over from Antiquitas v1.0.0 were added.
  • Galactic Emperor Tax: Possibly the last tax the emperor will ever collect!
Additional Notes

I had intended this update to be a big Zolarg content update, but instead was required to spend most of my time making changes to the GBT and it's associated API. As some will know, I've never really been thrilled about having the GBT in the game, and am even less thrilled in having to micromanage it. Ideally people would be able to conduct themselves as adults and treat the GBT system with respect, but I'm afraid that is not what has transpired. The actions of a few bad apples have thus forced my hand to really crack down on the Galactic Board of Trade, and several changes have now been implemented to that effect.

The first issue was involving the actual server API which the game contacts in order to do trade deals on the GBT. I threw the script together quickly to facilitate an in-game trading feature and didn't put any effort into security. This made it easy to exploit. Since the vast majority of players play in offline mode, I never gave it much thought, but over the last week, one of our players with a lot of free time on his hands really took it upon himself to hit the API hard and did a significant amount of damage to the online in-game economy. New security measures have been added, but they are not present in older versions of the game, and the server API cannot be fully patched without cutting off access for older versions of the game. For this reason, in one weeks time, access to online play from any version of My Colony older than v0.50.0 will be disabled. So if you play online, please update as soon as the release is available on your platform.

Here is also a first and only warning on this matter. Every call to the API is now logged and any user taking advantage of any exploit will be permanently banned from the service altogether. All of your colonies will be banned as will any device that you have been logged as having connecting to the service with. I do not care if you paid for premium or not, you can still play the game offline.

Other issues with the GBT involve using it for storage or using it as a means of transporting large amounts of goods from one colony or another. I don't consider this an exploit, but new measures have been put in place to block it from being used in this manner. The purpose of the GBT is to facilitate trades between colonies and nothing more. Using it for other purposes interferes with the pricing structure of the market and has an impact on the in-game economy for any player who plays the game online.

There is a new Galactic Trade Authority bot that monitors all trades on the GBT and logs trades which are considered grossly out of step with the current market realities. There is no auto-banning or "three strikes your out" feature associated with this. Everything is logged and will be reviewed by a human moderator (me). If it is decided that you are taking advantage of the system, your access to the GBT may be blocked.

There was also a new Galactic Emperor tax levied. This is the Emperor's highest tax ever, coming in at 95% of everything over $750m, and 100% of everything over $10b. This was imposed because of the API hacker who auto-purchased every contract on the market, leaving some players with an ungodly amount of money. If you got your money legitimately, then I am sorry, but this is the way it is. You can thank the abusers for the tax.

The good news is that as of this update, the resources of an individual colony can now be edited directly by the server if need be. For that reason, there probably will not have to be anymore global galactic emperor taxes levied. Because of this change though, all colonies in online mode are now required to have a constant internet connection. Really, this should have been a requirement from the start. If you cannot be constantly online, then consider playing the game in offline mode.

There have also been issues with users sending abusive messages through the in-game messaging system, including threats and other forms of harassment. To combat this I have added a new reporting feature which you can see in all new mail messages that arrive. Message reports will be reviewed by a human, and if you are conducting yourself in a manner which I do not feel is right for the game, then you will be banned from the service.

Anyway, like I said before, I really hate having to be a nanny here for the game. I'd much rather spend my time adding new content and features. If you don't like the new changes and don't want to see any more controls added in the future, then please encourage your fellow players to use their heads when playing the game. The API isn't there for my own benefit, I'd just as soon get rid of online play altogether, as it caused more headache than it is worth. The feature exists entirely for the benefit of those who want to play online, but if it can't be handled properly I have no problem taking it away. The vast majority of users play offline and wouldn't even notice if it was removed.

On to better things, you will notice some UI improvements that have been carried over from Antiquitas (which is now available and you should download (and 5 star) from here: http://apps.ape-apps.com/antiquitas/ ). Zolarg also received a few new things, with more coming in the next release. There is a new Ancientbug which is their version of the E.T. Builder, and their first alien structure is the Quantum Sugar Cloner which is a vast improvement over the Sugar Farm and takes up far less room. Insectoids will be getting a lot more alien content in the next few updates.

Also, there are only a couple of resources left now that do not require storage, and that will be soon changing. Keep that in mind and plan your colonies accordingly.

Between now and the end of the year, the updates are going to focus on Zolarg content. Once 2018 hits, the Reptilians will be making their way into My Colony, and the way they operate is going to be a bit different than the other races. They will make the difference between Humans and Zolarg seem insignificant. But until then, enjoy the update as there is still a lot more to come!
7y ago
Added a new public API for checking GBT contracts:

For All Resources
https://mc1.my-colony.com/api.php?pf=4&g=1

For Specific Resource
https://mc1.my-colony.com/api.php?pf=4&g=1&r=25

Returns active GBT contracts in JSON format. Example output:
[{"resource":"Antanium","seller":"Cyberkayu","sellercharter":"T0gtaz50","quantity":"150000","price":"87742500","expires":"2017-11-28 02:09:07","offerflag":"0"}]
Note: When you specify a resource in the API call, you do so using &r=x, where x is the id number of the resource. You can get the resource ID numbers from the previously documented GBT Prices API call which you can read about here: https://www.ape-apps.com/viewpage.php?p=584

Output Fields
  • resource: the name of the resource
  • seller: the colony selling the resource
  • sellercharter: the sellers' charter code
  • quantity: the size of the trade
  • price: total asking price of the trade. divide by 100 to get the lot price.
  • expires: server time that the contract will expire and be returned to the seller
  • offerflag: if this is 0, it is a resource sell. if it is 1, it is an offer-to-buy contract
6y ago
Even with no API installed on their server at all, forum and website owners can utilize a forumfiend.json file to easily set up automatic configuration and customization parameters to control how their forum or website looks and behaves by default when run under Forum Fiend. Simply place file in the root of your website called forumfiend.json containing a valid formatted .json data object with any of the following parameters. All parameters are optional, and a complete example file is displayed at the bottom.

FieldDescription
nameOverall name of the site or forum as it appears on the main Forum Fiend listing.
iconAn absolute URL to either a .png or .ico file that represents for forum or site.
bannerAn absolute URL to a .png file that represents a sidebar banner image for the site, suggested resolution of 300x150.
colorA valid hex color (ex. #ff0000) representing the overall theme color of the forum or site.
ff_chat_idName of a chat channel on Ape Chat to be used by this forum or site. If specified, a chat slide-out will appear with the specified chat channel. Using chat requires an Ape Apps account.
g_analyticsA Google Analytics id for tracking views and impressions when your site is accessed using Forum Fiend.
start_urlAn absolute URL that points to where Forum Fiend should open, could be the Forums section of your site.
disable_apiEither 1 or 0 (for yes/no). Default is 0. See details below.

Sample forumfiend.json file:
{
"name": "Epic Forums",
"icon": "https://epicforums.com/icon.ico",
"banner": "https://epicforums.com/banner.png",
"color": "#f44336",
"ff_chat_id": "epicforums",
"g_analytics": "UA-XXXXXXXX",
"start_url": "https://epicforums.com/forum/",
"disable_api": "0"
}
disable_api Field Info

Forum Fiend was originally built around the open source Tapatalk API and was thus able to interface with any site that had the Tapatalk API installed. Sometime around 2014/2015, Tapatalk got some of that sweet, sweet venture capital money and stopped publishing public information related to their API, and even had their lawyers send Ape Apps a cease and desist request over Forum Fiend.

Because of this, no further development has been made on the Tapatalk API interface for Forum Fiend, and the system is based around the last published open source edition of the API from around 2014. Therefore, the Tapatalk interface is no longer maintained or supported in Forum Fiend, and can not be guaranteed to work correctly on any install that is more recent than 2014.

Forum developers are encouraged to use the WebView interface (by setting disable_api to "1") and calling Forum Fiend's native features using the Javascript interface instead, which is documented elsewhere in this forum. If you still want your forum to use the Tapatalk interface, you can omit the disable_api field or set it to "0", but know that it has not been updated in a long time, is no longer receiving support or updates, and some features may not work properly. Please test your site in the app to verify.

Feel free to leave feedback/comments/suggestions on any features you would like to see added/improved/changed with the forumfiend.json interface.
3y ago
The online map at https://mc1.my-colony.com/map/ doesn't work anymore.

Apparently when the website changed subdomain, some js links weren't changed. (Is it really 2 years and nobody noticed or was the js changed recently after the migration?)

The error is in galmap.js at lines 198, 240, 289 and 364:
198c198
< var apiURL = "https://www.my-colony.com/api.php?pf=2&g=1&c=" + charter;
---
> var apiURL = "https://mc1.my-colony.com/api.php?pf=2&g=1&c=" + charter;
240c240
< window.open("https://www.my-colony.com/colonies/" + selectedColony.charter + "/","_blank");
---
> window.open("https://mc1.my-colony.com/colonies/" + selectedColony.charter + "/","_blank");
289c289
< var apiURL = "https://www.my-colony.com/api.php?pf=3&g=1&sx=" + x + "&sy=" + y;
---
> var apiURL = "https://mc1.my-colony.com/api.php?pf=3&g=1&sx=" + x + "&sy=" + y;
364c364
< var apiURL = "https://www.my-colony.com/api.php?pf=2&g=1&c=" + charter;
---
> var apiURL = "https://mc1.my-colony.com/api.php?pf=2&g=1&c=" + charter;
Tested with https://mc1.my-colony.com/map/mbHpVVuDyx.html
1y ago
An API returning all the currents sectors in use would be great (with total population in it, main race occupying it... for example).

I am building a program and I could check each sector if they were in a small area but since the zolarg worlds are located at something like -200... (if I'm not mistaken) it is impossible.

The "sector map" API without the coordinates parameters returns the 0;0 sector.. https://www.my-colony.com/api.php?pf=3&g=1

I hope you understand what I mean. If such an API is possible, please make it avalaible ! Thank you !

By the way I wonder how you check for the top 10 populations since they are from different sectors... https://www.my-colony.com/colonies/
Sobeirannovaocc said:I confirm the duplicated ballots bug.

Now, can we have a federations api ? :) or alternatively a field in the colony info api

Edit : you should also force clients to upgrade to latest version, or disallow obsolete versions, so that people won't stay in older versions to get trillions gdp or not having the data fetched from the server on loading (allowing cheats)


There will be an API eventually.

For the duplicate ballots, on the "bright side" the server will absolutely not allow voting twice on the same petition, so the fix should be simple.

Clients are somewhat forced to upgrade, in that the server API only allows stats to be published from the last few recent versions of the game. So right now, anything before v0.72.0 gets rejected from the server. I can't totally cut the older versions off right at release, since there is lag time between release and when people get the updates, especially on mobile.

GDP will be normalized soon enough. And I guess if somebody wants to never update to keep their old fake number on the 'top colonies' list, their colony will eventually get scrubbed due to inactivity once the API stops accepting their version.
6y ago
Update 20220330: This API has been depreciated in favor of the New Player Info API which gives additional information.

https://mc1.my-colony.com/api.php?pf=6&g=1&u=bastecklein
(replace bastecklein with desired username)

Returns JSON formatted array data containing a list of all user's colonies on the server.

[{
"name":"Domination",
"charter":"jGTKNfWT",
"independent":"April 19, 2017",
"population":"189595",
"founded":"April 8, 2017",
"screenshot":"https:\/\/www.my-colony.com\/screenshots\/ss-606928.jpg",
"lastactive":"2019-10-10 21:06:08",
"account":"bastecklein"
},
{
"name":"New Munson",
"charter":"4stQvrHA",
"independent":"October 14, 2018",
"population":"12343",
"founded":"April 12, 2018",
"screenshot":"https:\/\/www.my-colony.com\/screenshots\/ss-882625.jpg",
"lastactive":"2019-09-09 20:12:27",
"account":"bastecklein"
},
{
"name":"Imperial Munson",
"charter":"8Ksj9SAy",
"independent":"0",
"population":"8507",
"founded":"September 2, 2018",
"screenshot":"https:\/\/www.my-colony.com\/screenshots\/ss-900950.jpg",
"lastactive":"2019-10-15 02:00:22",
"account":"bastecklein"},
... ]

From there, you can drill down even further using the Colony Info API on one of the charter codes.
5y ago
Site owners are able to customize how their forum or website looks and behaves when accessed under Forum Fiend. This is an overview on the customization options available to site owners and developers.

Firstly, if absolutely no site owner action is taken at all, Forum Fiend will still attempt to derive your site's name, icon, and theme color from the meta data of your website. These items are taken from your site's title tag, it's favicon, and the theme-color meta tag.

High-Level Configuration

The easiest way to customize a site under Forum Fiend, one which requires no development experience whatsoever, is to upload a forumfiend.json file to the root directory of your site. Any site that is accessed by a fair number of users through Forum Fiend should take the time to include this simple file. The forumfiend.json file allows you to set high level parameters for your site, as well as branding logos and theme customizations. Creating the file should take no more than a couple of minutes, and you can see a complete guide in the following thread:

Complete forumfiend.json Reference

Access Methods

Forum Fiend can display a forum using either the Tapatalk API or through a custom WebView interface. Tapatalk access is based on the outdated open source version of the Tapatalk API and is no longer maintained. If your forum already uses Tapatalk, it may work just fine under Forum Fiend, and you are encouraged to test it out to be sure. Note that the Tapatalk interface has not been updated since 2014 and will not be receiving support or updates in the future, as newer versions of the API are no longer open source.

The Forum Fiend WebView

Forum developers or site owners with JavaScript experience can further customize their site under Forum Fiend using the custom WebView API interface methods. Site owners who have Tapatalk installed on their system but prefer to use the custom WebView under Forum Fiend can do so by setting the disable_api to "1" in their forumfiend.json file.

The Forum Fiend WebView has a user agent string of ForumViewerCore. Developers can check the user agent to determine if their site is being accessed under Forum Fiend. Some implementations may want to alter UI or Stylesheets based on the presence of Forum Fiend.

Forum Fiend will also add a global ForumViewerCoreInterface JavaScript object to your site for accessing WebView API methods. Thus, the presence of Forum Fiend can also be detected in JavaScript by checking for the existence of the window.ForumViewerCoreInterface object.

setProperty Interface

Forum Fiend will add a window.ForumViewerCoreInterface.setProperty(key,value) function to your website that will allow you to customize several aspects of the Forum Fiend interface. Below is a reference to things you can do with the setProperty function, as well as some code examples. All keys and values must be text strings.

User Account

To personalize your forum or site for your Forum Fiend users, you can display their logged account username and avatar on the main forum listing screen. Use the following two properties to set the user's details.

keyvalues
fvc-logged-usernameusername or "0" for not logged in
fvc-logged-avatarfull URL to avatar image file (png,jpg,gif supported) or "0" for no avatar

window.ForumViewerCoreInterface.setProperty("fvc-logged-username","little bobby");
window.ForumViewerCoreInterface.setProperty("fvc-logged-avatar","https://mysite.com/avatar-bobby.png");

Pagination Bar

Forum Fiend can provide a pagination bar at the bottom of the screen with controls for first/last/next/previous page. The following table lists the pagination related properties, followed by a code example.

keyvalues
fvc-show-pagination"true" or "false"
fvc-pagination-pagedispex: "5 of 10"
fvc-pagination-firsturl: "https://mysite.com/viewpage?p=1&pg=1"
fvc-pagination-lasturl: "https://mysite.com/viewpage?p=1&pg=10"
fvc-pagination-nexturl: "https://mysite.com/viewpage?p=1&pg=6"
fvc-pagination-previousurl: "https://mysite.com/viewpage?p=1&pg=4"

window.ForumViewerCoreInterface.setProperty("fvc-show-pagination","true");
window.ForumViewerCoreInterface.setProperty("fvc-pagination-pagedisp","5 of 10");
window.ForumViewerCoreInterface.setProperty("fvc-pagination-first","https://mysite.com/viewpage?p=1&pg=1");
window.ForumViewerCoreInterface.setProperty("fvc-pagination-last","https://mysite.com/viewpage?p=1&pg=10");
window.ForumViewerCoreInterface.setProperty("fvc-pagination-next","https://mysite.com/viewpage?p=1&pg=6");
window.ForumViewerCoreInterface.setProperty("fvc-pagination-previous","https://mysite.com/viewpage?p=1&pg=4");

Colors and Theme

There are several properties related to the appearance of the site under Forum Fiend.

keyvalues
fvc-themeTitle/Status Bar Colors, hex string
fvc-page-foregroundgeneral foreground (text) color, hex string
fvc-page-backgroundgeneral background color, hex string

window.ForumViewerCoreInterface.setProperty("fvc-theme","#2196F3");
window.ForumViewerCoreInterface.setProperty("fvc-foreground","#212121");
window.ForumViewerCoreInterface.setProperty("fvc-background","#CFD8DC");

Slide-Out Menu

The left-hand slide-out menu can be customized using the window.ForumViewerCoreInterface.addMenuItem(name,icon,url,color) function. The following lists the parameter values expected for the function.

parameterdescription
nameThe name of the menu item. If set to "CLEARMENU" will reset all custom menu items.
iconabsolute url to a png icon for the menu item
urlabsolute url to navigate to when the menu item is selected
coloroptional hex color mask for the icon, or null

window.ForumViewerCoreInterface.addMenuItem("CLEARMENU",null,null,null);
window.ForumViewerCoreInterface.addMenuItem("Latest Posts","https://mysite.com/latest-icon.png","https://mysite.com/latest.php",null);
window.ForumViewerCoreInterface.addMenuItem("Exciting Section","https://mysite.com/exciting-icon.png","https://mysite.com/viewpage.php?p=50",null);

Application Toolbar

The top actionbar/toolbar of the Forum Fiend app can also be customized using the window.ForumViewerCoreInterface.addToolbarItem(name,url,icon,secondary) function.

parameterdescription
nameThe name of the menu item. If set to "CLEARTOOLBAR" will reset all custom menu items.
urlabsolute url to navigate to when the menu item is selected
icona named icon, reference below, ex "back" or "chat"
secondaryboolean value, if true will force the toolbar item into the drop down menu

window.ForumViewerCoreInterface.addToolbarItem("CLEARTOOLBAR",null,null,null);
window.ForumViewerCoreInterface.addToolbarItem("New Post","https://mysite.com/newpost.php","add",false);
window.ForumViewerCoreInterface.addToolbarItem("Sign Out","https://mysite.com/signout.php",null,true);

Named Icons

Here is a list of available named icons you can try out. These can be used for both Toolbar and Menu items, but toolbar items require a named icon (menu icons can be a URL).
selectall,stopwatch,sort,relationship,ruler,pdf,chat,build,search,feedback,merge,envelope,allapps,viewall,filter,threedotshoriz,calendar,system,yescheck,nocheck,font,record,location,nolocation,movie,notes,description,bookmark,notifications,gavel,home,person,unlock,directions,print,undo,rss,showresults,personalize,share,sponsor,fanmail,premium,achievements,scores,import,movetofolder,page,back,add,delete,export,new,save,open,send,clear,emoji2,play,rename,volume,info,contactinfo,important,library,zerobars,help,people,emoji,shop,money,audio,fourbars,sync,switch,like,refresh,list,calculator,map,savelocal,copy,camera,fullscreen,flag,highlight,color,preview,previewlink,settings,rotatecamera,crop,backtowindow,lock,skull,microphone,video
3y ago
Hello,

I wrote an OOP API in PHP around the public API. It requires php 7.2.

If anyone is interested, here it is:

https://packagist.org/packages/rikudou/my-colony-api
6y ago
The site does have a database for keeping history (the game doesn't keep history), but it's true that if your charter doesn't appear in the game API it won't appear in the website.
It appears here https://www.my-colony.com/api.php?pf=2&g=1&c=61FtdH5i , you can see the sector is 0,0 but it doesn't appear in the sectors API https://www.my-colony.com/api.php?pf=3&g=1&sx=0&sy=0 and that's the problem. Only Bast can solve it
Just continuing the discussion from the in-game chat - files are currently saved on MyColony (and assuming other games via encoded JSON). This takes up a lot of space because the object schema is included every payload, and causes corruption issues as there is no transaction-based record management.

Switching to a database would help this. It'd require exposing an API end-point and putting a RDBMS (like MariaDB) behind it:

https://medium.com/@avanthikameenakshi/building-restful-api-with-nodejs-and-mysql-in-10-min-ff740043d4be

https://www.codementor.io/julieisip/learn-rest-api-using-express-js-and-mysql-db-ldflyx8g2

The API call could wrap the command in a transaction to ensure no data gets lost, and the database will be more effective at saving disk space as it does not save the schema with each save. The DB could be optimized further since it's a write-heavy service:

https://mariadb.com/resources/blog/how-to-tune-mariadb-write-performance/
5y ago
There are some changes coming soon to the My Colony website that will impact individual colonial/regional websites as well as the public My Colony API. Beginning with the release of My Colony v1.9.0, all API calls are being migrated to a new subdomain, and the current My Colony website is moving as well.

The change is as follows:

Current Location: https://www.my-colony.com
New Location: https://mc1.my-colony.com

Essentially, all URLs should remain the same, except for the www is changing to mc1. The current My Colony public api will remain at the current location for a few weeks, but will then be going offline, so all API calls should be moved to the mc1 subdomain.

The current primary www domain is going to be reworked as a portal to all My Colony Universe games, including Colony Wars, Colonial Tycoon, Death 3d, My Starship, Deimos, End of the Earth, High Noon, Sarge, and the upcoming My Colony 2. This will include not only information on all of the above titles, but also extensive backstory/lore information on the entire universe and all of the characters, presented in a Wiki style format. The new mc1 subdomain is primarily going to be used to hold colony websites and texture mods for MC1.
4y ago
https://mc1.my-colony.com/api.php?pf=8&g=1&u=bastecklein
(replace bastecklein with desired username)

This is an updated version of the now depreciated Player Info API. New version now returns an object detailing whether or not the account exists, what colonies are available, and the time that the user was last online.
{"exists":true,"colonies":[{"name":"Domination","charter":"0hZgBkjn","independent":"April 19, 2017","population":"288521","founded":"April 8, 2017","screenshot":"https:\/\/www.my-colony.com\/screenshots\/ss-949442.jpg","lastactive":"2022-03-29 23:21:02","account":"bastecklein"},{"name":"Imperial Munson","charter":"8Ksj9SAy","independent":"December 5, 2019","population":"34943","founded":"September 2, 2018","screenshot":"https:\/\/www.my-colony.com\/screenshots\/ss-900950.jpg","lastactive":"2021-12-21 14:31:40","account":"bastecklein"},{"name":"Zolargia","charter":"7qkXSuCr","independent":"June 12, 2017","population":"33733","founded":"March 10, 2017","screenshot":"https:\/\/www.my-colony.com\/screenshots\/ss-616107.jpg","lastactive":"2021-12-21 14:33:26","account":"bastecklein"},{"name":"Pixelville","charter":"sjlK2GZ9","independent":"December 7, 2019","population":"8779","founded":"November 25, 2016","screenshot":"https:\/\/www.my-colony.com\/screenshots\/ss-44837.jpg","lastactive":"2022-03-22 18:21:01","account":"bastecklein"},{"name":"Cap Test","charter":"Ik4MEoNu","independent":"0","population":"2193","founded":"December 3, 2021","screenshot":"https:\/\/www.my-colony.com\/screenshots\/0","lastactive":"2022-02-13 19:45:28","account":"bastecklein"},{"name":"Wetland","charter":"kfnejuF4","independent":"December 14, 2019","population":"350","founded":"December 16, 2018","screenshot":"https:\/\/www.my-colony.com\/screenshots\/ss-975471.jpg","lastactive":"2022-02-07 22:01:15","account":"bastecklein"},{"name":"Booshland","charter":"82RdbsyZ","independent":"0","population":"18","founded":"March 6, 2022","screenshot":"https:\/\/www.my-colony.com\/screenshots\/0","lastactive":"2022-03-07 02:18:56","account":"bastecklein"}],"laston":"2022-03-29 23:21:02"}
From there, you can drill down even further using the Colony Info API on one of the charter codes.
2y ago
https://mc1.my-colony.com/api.php?pf=3&g=1&sx=0&sy=0&limit=100&ind=1
(limit and ind parameters optional)

Parameters:

sx: Sector X coord
sy: Sector Y coord
limit: Return top X colonies (by population) (optional)
ind: When ind=1, return only independent (Commonwealth Capitol) colonies (optional)

Without optional parameters (return whole sector): https://www.my-colony.com/api.php?pf=3&g=1&sx=0&sy=0

Note: Each sector is an x,y grid 2000x2000 in size, ranging from -1000:-1000 to

Returns JSON formatted sector data array:
[{"name":"United Earth","charter":"earth","capitol":"1","population":"124689321","maptype":"n\/a","theme":"#4B92DB","x":"0","y":"0"},
{"name":"dusty","charter":"8Dgg0e6H","capitol":"1","population":"149162","maptype":"Red Planet","theme":"#b35900","x":"544","y":"-232"},
{"name":"Prosperity","charter":"hMXn8PVe","capitol":"1","population":"148616","maptype":"Red Planet","theme":"#1976D2","x":"453","y":"-24"}]
  • data array, ordered by population:
  • name: colony name
  • charter: charter code
  • capitol: 1 or 0, is this colony a commonwealth capitol
  • population: the population of the colony
  • maptype: what kind of planet it is (Red Planet, Lunar, etc)
  • theme: theme color for the colony, hex code
  • x: x location within the sector
  • y: y location within the sector
7y ago
Hi guys,
Is there any way to use the API for selling items in the GBOT? Looks like the API can only be used for reading items, is that right? Wanted to check before I wasted hours trying come up with something.
Cheers!
7y ago
eejit said:Hi guys,
Is there any way to use the API for selling items in the GBOT? Looks like the API can only be used for reading items, is that right? Wanted to check before I wasted hours trying come up with something.
Cheers!


its only for viewing prices.
7y ago
https://mc1.my-colony.com/api.php?pf=5&g=1

This is a simple API that displays which colonies are currently live-streaming.
[{"colony":"Eminer","charter":"ZGigpea7","user":"QQ"}]
Returns a simple array containing colony name, charter code, and account name. From there, you can access the live stream by visiting the colony website based on the charter code.

https://www.my-colony.com/colonies/charter code goes here/
6y ago
Sobeirannovaocc said:Did I read federations ?

Edit : compressing a creative map took a very long time, at least way more than it used to.
Edit 2 : save file corrupted after quiting chrome and launching it back
Edit 3 : I selected "load game.." and then the corrupted save, and it loaded normally.

Edit 4 :) Streaming is working fine but we don't see the menus

Edit 5 : Can we have an API for the colonies currently streaming ? I could query each one individually but that wouldn't be very efficient for sure. So an API returning a list would be great!


https://www.ape-apps.com/viewpage.php?p=26406

I am also going to expand the colony info api shortly.
6y ago
I think it is client side bug:
With Fiddler: POST https://www.my-colony.com/api.php HTTP/1.1 f=3&g=1&c=XXXXXXX&relcd=91


{"colonyid":"935XXX","colonyname":"Mars","civilization":"United Earth","race":"Human","maptype":"Red Planet"}

So at first it resolves the parent(XXX is a masking done here) Thereafter when registers:

POST https://www.my-colony.com/api.php HTTP/1.1
f=32&g=1&n=Newname&p=undefined&relcd=91

{"id":0,"charter":"VZKOACbR","guid":"10E8A8BE-4E45-75C8-8E42-951366CEE0F5"}

So probably there is a workaround if I ask fiddler to substitute undefined with my charter code.

What worries me a bit is that there is absolutely no authentication on the corresponding API calls.
5y ago
I think it is client side bug:
With Fiddler: POST www.my-colony.com/api.php HTTP/1.1 f=3&g=1&c=XXXXXXX&relcd=91


{"colonyid":"935XXX","colonyname":"Mars","civilization":"United Earth","race":"Human","maptype":"Red Planet"}

So at first it resolves the parent(XXX is a masking done here) Thereafter when registers:

POST www.my-colony.com/api.php HTTP/1.1
f=32&g=1&n=Newname&p=undefined&relcd=91

{"id":0,"charter":"VZKOACbR","guid":"10E8A8BE-4E45-75C8-8E42-951366CEE0F5"}

So probably there is a workaround if I ask fiddler to substitute undefined with my charter code.

What worries me a bit is that there is absolutely no authentication on the corresponding API calls.
5y ago
Issue as the title stated.

For any commonwealthes, creating a new colony using a charter code will cause the new colony relocated to their home civilization's AI commonwealth, after being indicated as ' colony of Undefined '.

I think it is client side bug:
With Fiddler: POST www.my-colony.com/api.php HTTP/1.1 f=3&g=1&c=XXXXXXX&relcd=91


{"colonyid":"935XXX","colonyname":"Mars","civilization":"United Earth","race":"Human","maptype":"Red Planet"}

So at first it resolves the parent(XXX is a masking done here) Thereafter when registers:

POST www.my-colony.com/api.php HTTP/1.1
f=32&g=1&n=Newname&p=undefined&relcd=91

{"id":0,"charter":"VZKOACbR","guid":"10E8A8BE-4E45-75C8-8E42-951366CEE0F5"}

So probably there is a workaround if I ask fiddler to substitute undefined with my charter code.

What worries me a bit is that there is absolutely no authentication on the corresponding API calls.
5y ago
Hi,

It would be great if we could have a player info API, like https://www.my-colony.com/api.php?pf=6&g=1&u=Sobeirannovaocc which would return a list of the colonies of the player (just like https://www.my-colony.com/users.php?u=Sobeirannovaocc but in JSON format) or an error message if it does not exist.
@bastecklein allow me to ask you that once more after 2 years, but recently we discovered a new sector was being "populated" https://www.my-colony.com/api.php?pf=3&g=1&sx=0&sy=-3 . If I don't know the sector, colonies don't appear in Coloniae and the game stats are wrong as well.

I guess I could make a program that checks the neighbours of each sector but there are some that are very far like the zolarg ones.

The api should just return a list of sectors (no need for population or other stats)
An exciting new feature is now working in the Voxel Paint Progressive Web App (PWA) that allows you to launch and open .vpp files by simply double-clicking them on your computer, as would work with a normal installed desktop application. Voxel Paint now supports *.vpp file type association, but there are a couple of things you need to do first in order to set it up.


The first requirement is that you need to enable the new File Handling API in the experimental features of either Chrome or Edge. Browse to either chrome://flags or edge://flags (respectively) and find and enable the #file-handling-api flag.

Next, Voxel Paint has to be "installed" on your system as a PWA. This is simple enough. If you browse to the Voxel Paint web app (https://www.apewebapps.com/voxel-paint/), you will see an Install or App Available notice in the right side of the address bar. There might also be an Install option in the Help dropdown menu. Once you do this, Voxel Paint will look and behave as a normal application on your system.

Although still in the experimental stages, the File Handling API is a great new feature coming to modern browsers that will go a long way towards giving PWA's feature parity with many existing desktop applications, and I look forward to implementing the file associations feature with other apps in my catalog over the coming months!

#voxelpaint
3y ago
After a 6 year slumber, Forum Fiend is finally back, and has been updated to v1.4.0 and should be hitting all Android and Kindle Fire devices shortly! Huzzah!

Many Ape Apps users have only been around since the My Colony days and may not be aware of Forum Fiend, but it was once one of my top apps by far. Created all the way back in 2013 and born out of my even older Discussions mobile forum software, Forum Fiend utilized the (then) open-source Tapatalk API to allow users to browse their favorite online forum sites and communities on their phones, without having to go through the heavy nickel-and-dime official Tapatalk app itself.

Users loved Forum Fiend because it offered all of the features of Tapatalk without the big overhead and with a cleaner and easier to use interface. Of course, Tapatalk hated the competition so much that in early 2015 they close-sourced their API and had their lawyer send me a cease and desist order. So that was pretty much the end of Forum Fiend.

One feature Forum Fiend had that Tapatalk didn't was an optional WebView interface that allowed users to add non-Tapatalk supporting forums to the app as well, so they could keep absolutely everything in one place. This new release is featured around that WebView interface, and greatly expands it with new features that site owners can take advantage of if they choose to do so. Development information for site owners can be found on this thread.

The new Forum Fiend also contains special code for Ape Apps forum sites (specifically, the website you are looking at right now), making it a great way to view this website on your mobile device.

With many online forums now employing responsive designs, use of the Tapatalk API in 2021 no longer seems necessary. Still, Forum Fiend offers a great way for users to combine all of their forum websites into one place, and for forum owners to add some extra customization features to their sites.

#forumfiend
3y ago
To be exact , Coloniae sync is called ADU in Coloniae and it works : https://coloniae.space/adu/HWPx9Xrt (although the name is wrong, it's the name of the other colony because it's fetched from https://coloniae.space/colonies/HWPx9Xrt... but account is correct)
Being listed on Coloniae has nothing to do with this parameter that you activate in game, it happens if you are listed on the sectors api : https://mc1.my-colony.com/api.php?pf=3&g=1&sx=0&sy=0 which is not the case for HWPx9Xrt.
In fact if you look at https://mc1.my-colony.com/api.php?pf=2&g=1&c=HWPx9Xrt , it is listed as location 0,0 sector 0,0 which is a bug. This is not the first time it has happened, but it is the first time that the charter was used before by someone else
https://mc1.my-colony.com/api.php?pf=2&g=1&c=0hZgBkjn
(replace 0hZgBkjn with desired charter code)

Returns JSON formatted data on specified colony, as well as mother colony and list of child colonies.

{
"charter":"EfbgdYs6",
"name":"EMERALD CITY",
"civilization":"United Earth",
"race":"Human",
"maptype":"Red Planet",
"founded":"December 16, 2016",
"independence":"December 18, 2016",
"population":24718,
"gdp":1484542777812088300,
"unemployment":0,
"mapstage":4,
"playson":"web",
"lastactive":"2017-04-28 09:42:03",
"theme":"#2867ed",
"screenshot":"https://www.my-colony.com/screenshots/ss-146399.jpg",
"website":"https://www.my-colony.com/colonies/EfbgdYs6/",
"sector":"0,1",
"location":"-90,-442",
"rrr":72,
"mothercolony": {
"name":"United Earth",
"charter":"earth",
"website":"https://www.my-colony.com/colonies/earth/",
"relations":100,
"sector":"0,0",
"location":"0,0"
},
"childcolonies": [
{
"name":"TouristsDieHere",
"charter":"GE7RmoX0",
"population":76189,
"website":"https://www.my-colony.com/colonies/GE7RmoX0/",
"relations":92,
"sector":"0,0",
"location":"0,0"
}
]
}
  • charter: charter code
  • name: colony name
  • civilization: what civ they are playing as, like United Earth or Zolarg Empire (so far)
  • race: what species they are.  so far there are human and zolarg.  eventually there may be more than one civilization per race
  • maptype: what map they are playing, like Red Planet, Lunar, etc
  • founded: when the colony was founded
  • independence: when they gained independence, or "0" if they are not independent
  • population: their population
  • gdp: their total gdp
  • unemployment: unemployment rate, times 100, ie  5% would be 5 and not .05
  • mapstage: what their atmosphere level based stage is
  • playson: what platform they last used, like web, android, ios, windows, desktop 
  • lastactive: timestamp of when they last played
  • theme: the theme color they chose in their colony website options
  • screenshot: if they uploaded a screenshot, the url will be here
  • website: the url to their colony website
  • sector: the x,y coordinate of what sector their colony is located in
  • location: the x,y coordinate of where they are located within the above sector
  • rrr: the RRR index of the colony ( http://forum.ape-apps.com/showthread.php?tid=1994 )
  • mothercolony.name: name of their mothercolony
  • mothercolony.charter: charter for their mothercolony
  • mothercolony.population: the population of their mothercolony
  • mothercolony.website: mothercolony website
  • mothercolony.relations: the relation percentage the colony has with their motherland, times 100, ie 95% = 95, not .95
  • mothercolony.sector: the x,y coordinate of the sector their mother colony is in
  • mothercolony.location: the x,y coordinate the mother colony is in within their sector
  • mothercolony.rrr: the RRR index of the colony ( http://forum.ape-apps.com/showthread.php?tid=1994 )
  • childcolonies (array, from largest to smallest):
  • childcolonies[x].name: name of child colony
  • childcolonies[x].charter: child colony charter code
  • childcolonies[x].population: child colony population
  • childcolonies[x].website: website for the child colony
  • childcolonies[x].relations: percent relation that the child colony has with parent, times 100, ie 95% = 95, not .95
  • childcolonies[x].sector: x,y coordinate of the sector child colony is in
  • childcolonies[x].location: x,y coordinate of the child colony location within their sector
7y ago
https://mc1.my-colony.com/api.php?pf=1&g=1

Returns JSON formatted pricing for all GBT prices. The format for each record looks like this:

{"id":"7","name":"Aluminum","price":"750000","detailed":{"last":"75000","rolling":"12861869","min":"1","max":"200000000","emergency":"750000"}}
  • id: server id of the resource
  • name: resource name
  • price: legacy price.  used only for old My Colony clients.  Not reliable.
  • detailed.last: sell price of the last trade
  • detailed.rolling: rolling average price over last 3 days
  • detailed.min: lowest purchase price from the last 3 days
  • detailed.max: highest purchase price from the last 3 days
  • detailed.emergency: rarely used.  sometimes the client will fall back to the emergency price if the market gets too crazy
7y ago
Are you just wanting like a true/false response when you put in the charter code?

Right now you can somewhat infer their online status by checking the lastactive field on the colony info api:
https://www.my-colony.com/api.php?pf=2&g=1&c=EfbgdYs6
7y ago
A cap on the amount of trades per colony would not work. Lot sizes would be in the millions and tens of millions. Nobody would be able to buy anything except for the huge colonies who would just be trading resources among themselves.

The cap of 50,000 is required until the majority of players are on v0.50.0 of My Colony which is not even done yet. There is an exploit in the API allowing trades to be auto-purchased in bulk via script, but I cannot completely patch it without cutting off everybody else's access to the GBT. You can thank one of your peers here for ruining this for everybody else. If I'm not mistaken, the guy taking the heaviest advantage of it hangs out on your 'FFF' discord channel.

You can spam trades if you wish but the new version of the client it going to make spamming very tedious and annoying to do, plus posting a bunch of trades in rapid succession will probably cause the GBT to put a hold on your account for review.

Anyway, the GBT API has been under daily attack now for the last 3 days, so something had to be done. Believe me I would have much rather not had to do anything at all.
7y ago
bastecklein said:A cap on the amount of trades per colony would not work. Lot sizes would be in the millions and tens of millions. Nobody would be able to buy anything except for the huge colonies who would just be trading resources among themselves.

The cap of 50,000 is required until the majority of players are on v0.50.0 of My Colony which is not even done yet. There is an exploit in the API allowing trades to be auto-purchased in bulk via script, but I cannot completely patch it without cutting off everybody else's access to the GBT. You can thank one of your peers here for ruining this for everybody else. If I'm not mistaken, the guy taking the heaviest advantage of it hangs out on your 'FFF' discord channel.

You can spam trades if you wish but the new version of the client it going to make spamming very tedious and annoying to do, plus posting a bunch of trades in rapid succession will probably cause the GBT to put a hold on your account for review.

Anyway, the GBT API has been under daily attack now for the last 3 days, so something had to be done. Believe me I would have much rather not had to do anything at all.


Would you tell me who this is?
7y ago
This post is about My Colony downloaded from the Windows Store. It does not impact the desktop Native Client downloaded from the Ape Market.

This spring when Microsoft releases the "Redstone 4" update to Windows 10, My Colony will switch from being a completely packaged 'Universal Windows' app to a 'Hosted Web App,' or Progressive Web App. Most end users should notice very little difference, other than the slide-out menu and popup dialogs looking a bit different than before.

This change reduces the Windows 10 app package from over 200mb to about 1.5mb. It also speeds up development time, as repackaging the app for Windows 10 will no longer have to be done for every release, and end users will receive the latest updates without even having to download an app update.

Most users of the Windows 10 app probably do not even realize that the app had been a Hosted Web App from its first release all the way up to v0.40.0 which was released just a few months ago (in August). For those who do not know, a Hosted Web App is essentially just a web browser window linked to the Web version of My Colony. What makes it different than just using the web browser is that Hosted Web Apps also have access to native Windows API's, such as the ability to save games to the local file-system, making them a bit more capable than just playing the game through a normal browser. The Hosted Web App container also theoretically has less overhead than a full web browser.

The reason I switched away from using the Hosted Web App model last fall was because I wanted the Windows client to be more stable than the Web client during updates. As many players on the Web know, things can get messed up during the few days that an update is taking place. In addition, the Hosted Web App would not always work properly when the user did not have a good internet connection.

So why switch back? The next major release of Windows (Redstone 4) brings support for Service Workers, one of the key components of Progressive Web Apps. Service Workers, among other things, allow a website to cache data in a way that makes them 100% usable whether there is an internet connection or not, just like an app downloaded from the store. Chrome already supports Service Workers which are active on the Web version of My Colony (which is why Web users need to do a 'Hard Reload' any time changes are made during development cycles). Also, I have recently made changes to Ape Web Apps which will allow me to keep the Hosted Windows version of the app back on the current stable version until the in-development update is ready for release.

Finally, a major factor in the decision comes down to the future of the "Universal Windows Platform" (UWP) itself. Truthfully, not too many people download My Colony from the Windows Store. Many organizations have been ditching their Windows Store apps recently, and it is easy to see why. Now that Microsoft has totally abandoned the Windows Phone, the UWP platform really doesn't make much sense any longer, particularly considering how gimped the UWP API is compared to traditional Windows Desktop applications. The difference in capabilities between a UWP app and a Web App are minor, and a game like My Colony really does not benefit much from being packaged as a full UWP app anyway. Given this and just the time and effort it takes to package, compile, and submit a new UWP release of My Colony every week, it just makes more sense to convert this game back to a Hosted Web App like it was before.

I actually think that Progressive Web Apps are going to be the future for a lot of things anyway. I am also looking into turning the iPhone version of My Colony into a Hosted Web App at some point, as the game's usage on iPhone is also fairly low. Android will probably not be switched over though, since it accounts for about 90% of My Colony players and I don't want to nuke the server. The Native Client desktop versions will also not be converted at any time. I feel like those are the versions that will still be around in 20 years when all of the app stores and mobile platforms are history.

Now maybe someday when My Colony is a mature game and I am not making such frequent updates, I will convert it back to a full packaged UWP app. But right now when I am updating the game every week, it just takes a lot of time to be constantly updating the game on every platform.
6y ago
OOP is object oriented programming, API is application programming interface, PHP is a language.
6y ago
Hi, since you added the owner on a colony's website, can you also add it in the API ?

Edit : also, the links about the rrr are dead
Did I read federations ?

Edit : compressing a creative map took a very long time, at least way more than it used to.
Edit 2 : save file corrupted after quiting chrome and launching it back
Edit 3 : I selected "load game.." and then the corrupted save, and it loaded normally.

Edit 4 :) Streaming is working fine but we don't see the menus

Edit 5 : Can we have an API for the colonies currently streaming ? I could query each one individually but that wouldn't be very efficient for sure. So an API returning a list would be great!
Welcome
Ape Apps, LLC 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