The Request System. (Patreon)
Content
Let me first quickly introduce myself. I am Orion, most if you will have never met me (online and in RL). I manage most of the backend systems the Minecolonies development team uses to create our mod.
However I am also the developer of something called the "Request System". Raycoms already introduced it in his last post, and this last week I have been hard at work to finish it. In this post I will introduce to the new system, that has been under development for nearly a year, and compare it to the old one. Since this Post might get a bit technical at somepoint or another I apoligize beforehand.
The current system:
When you run a Colony right now, each building has a list of ItemStacks its citizens require to progress, as well as a set of True/False flags that indicate if a Tool of somekind, or Food is needed.
This works decently well if you just want the DMan (Deliveryman) to hand the building what ever it needs, however when you want to automate this process, this simple list is not going to be enough.
Enter the stage: "Request System":
The request system replaces these lists and flags with a colony central system, that assigns "requests" to "resolvers". These "request"'s might literally be anything, from the start we support, out of the box: Stacks, Food, Burnables, Deliveries and Tools.
A "resolver" on the other hand is something that can process the "request", the DMan is the "resolver" for Deliveries, were the Warehouse can resolve anything that is an IDeliverable (anything that can be a Stack, so a Tool, Food or Stack, etc).
The new system is intelligent in that if two "resolver"s van resolve the same request it will try the one with a higher priority first, which Food is a good example for: Food is an IDeliverable and in most cases the Warehouse will have the highest priority, but the Baker can resolve this too. It will try the Warehouse first, and then will ask the Baker/Cook to make the food.
What are the advantages of the new system:
Well, first of all, its something that is not embedded in any existing system at all, it is standalone and as such can be maintained, updated and upgraded without interfering in normal Minecolonies operations. In fact its sourcecode has been part of Minecolonies releases for a while, yet it took a very long time to port every citizen, building and colony implementation to use it.
Second of all, it is expandable, we only need to add a small piece of code to create a new requestable, as long as we have something that can resolve it.
And last but not least, it finally gives a face to what a citizen wants: It comes with a GUI on each building indicating what each of its citizens needs right now. No longer will the citizen just stand their do nothing and you have no idea what he needs.
So where is it:
Right now we are finishing up the core implementation, this means that the system can handle ItemStacks that are in the warehouse and deliveries, however since we want this system to get out there as fast as possible, this means that some features that you guys are currently using, might break, or not be in the mod anymore, untill we get the time to port them.
We apoligize for this, however we think it is better to give you guys a system that works and does its job in the way we, and you guys, want it to, before we start to build on it.
I hope that i can finish most of the core, so that a test release can go out to our tester. When they give the all clear we hope to have a version out in a week or two.
Greets,
Orion