GlitterWorld Prime (GWP)Adam L November 04, 2017
The mod's original description
Anything you want, delivered anywhere in the universe in under 24 hours!
Requires Micro-electronics and at least one Orbital Trade Beacon, then build the uplink and the console, silver is required to subscribe to GlitterWorld Prime, subscriptions need to be renewed each Quadrum.
GlitterWorld Prime enables you to trade items for silver in an intergalactic market place - buy or sell everything!
Build the Prime uplink satellite and Prime Console from the misc tab and start your intergalactic trading today - please wait 1 day (in game time) for your items/silver to reach you via drop pod.
This is where my RimWorld modding journey started.
A mod for RimWorld, consisiting of two parts, The C# "client" which is the mod itself, and the backend written in Python and uses Redis for storage.
The client simply "extended" the game's built-in trade dialog and hijacked the underlying data sources.
A clever hack, but paid a hefty performance penalty, especially if the user had hundreds of mods.
The client and server communicate using JSON over REST, and unfortunately due to the broken Mono implementation used in Unity, was rather slow.
The data explosion
The backend side used Redis to store all the market data, and while it was fast, sufferred with enormous memory requirements due to the explosion of items caused by players having many, many mods.
Everytime a new mod was released or one was updated that added a new building material, it caused a factorial increase in the number of items.
This is because if you add a new type of "metal" to the game, every item that can be built with metal gets a new variant, and in the game it creates a unique definition for every single variant of every objects which must be stored and sent over the wire.
Take a chair for example, it can be made of any wood material, it can be one of 6 different quality levels and can be painted in several colours.
So it becomes:
Number of Materials x 6 Qualities x Number of Colours and assuming 6 materials and colours, gives us 216 chairs...
This issue, combined with JSON's key repetition and Python's speed meant that simply getting the quantity and prices of all the items you have became extremely slow due to the sheer volume of data being sent and the number of lookups required.
It became obvious after some months that this approach was not going to be sustainable,
However, when I wrote the mod, it was not intended to be used in conjunction with any other mods except ones that were Quality of Life additions, not ones that added items. For the reasons I just mentioned and due to issues regarding balancing. Some mods are just ridiculously overpowered or completely destroy the balance of the market, e.g. just allowing huge amounts of resources to be generated with no effort or cap.
My original source is here on GitHub and has been subsequently forked and continued by OdysseyScorpio
Both GWP and ISE still have an active friendly community on Discord
Back to top