Beginning the My Colony 2 v0.29.0, the game adds a new news ticker to the bottom of the screen, similar to the one found in My Colony 1.
The difference from this news ticker though is that it supports custom news feeds from third party news servers, and the server owner can set up multiple news feed sources that it's players can utilize by setting them up in the Statistics window. This can be a fun way for an MC2 server to differentiate itself from the rest,add some fun for it's players, or even just offer news items in different languages.
Setting up a custom news server is not necessarily a beginner task, but it is not overly difficult either.
You can setup your news server however you like, it just needs to be able to accept a JSON object from the My Colony 2 client as post input, and to print out a JSON object as a result. You should also set the access-control-allow-origin: *
header, so that the client can access your script no matter which platform it is running on, and probably the access-control-allow-headers: Content-Type
This post will be updated as the spec evolves and more features are added, and can also be used for questions, and feature requests.
When a My Colony 2 server first boots up, it will query it's news servers with the following post data:
"hostOS": "os string",
"sid": "guid string for server",
"gid": "guid string for game/mod"
As of MC2 v0.33.0, the game client now also transmits the host operating system, world id (sid) and game identifier (gid) when requesting news feed data. The above code has been updated to reflect the change.
This request for network information expects a JSON formatted response, containing the following items:
"networkName": "My News Network",
is a string array which can contain one or more "taglines," or random headlines that the news ticker will play when there is not much going on. An example could be something like: You are watching MNN - The most trusted name in news
is a string array containing responses that will play when a settlement is having a low health crisis. It includes two properties that will be auto-populated by the engine. ex: There is an ongoing health crisis in #settlementname! Will #ownername do anything about it?
is a string array containing news items for when a player unlocks a new technology. ex: #name has unlocked #tech
is a string array containing items for when a settlement is experiencing high unemployment. ex: #settlementname workers struggle to make ends meet as unemployment soars, #ownername's failed leadership to blame?
is a string array for when the global MC2 server announces what the current largest settlement in the entire My Colony 2 online galaxy is. ex: With a population of #population, #settlementname on #worldname is the largest city in the galaxy!
is a string array containing announcements that a settlement on the world is facing starvation, ex: #ownername goes into hiding as #settlementname residents resort to cannibalism!
is a string array containing news articles about a settlement owner's low approval ratings, ex: Time for #ownername to go? #settlementname residents are fed up with current leadership.
is a string array containing news items about the low security rating in a settlement, ex: #ownername plays the fiddle while crime wave spreads through #settlementname!
is a string array containing items related to a low entertainment/morale rating in a settlement, ex: #settlementname residents blame #ownername as local colonist literally dies of boredom.
is a string array of news items related to a low education rating in a colony, ex: Brain dead in #settlementname? Residents demand education but #ownername fails to deliver.
is a string array for announcements that are made when a player on the server sells a contract through the Galactic Board of Trade, ex: #name sells #count contracts on the Galactic Board of Trade worth $#total.
The News Ticker is an exciting new feature for MC2, and the current feature set in this initial rollout is only the beginning. In the coming updates, the news ticker will also support positive news stories (most of the current ones are negative), as well as an option to query for stories that are unrelated to anything particular in the game, even stories that present a full news article when clicked on.
So let me know what questions/suggestions you have, and feel free to try to roll out your own news server, it really souldn't be too difficult!