Stockpiles and Gabions

It’s instructive to just sit down for a quick, relaxing game of Clockwork Empires and then make a note of all of the little things that one finds frustrating or otherwise demanding improvement. As a result of this particular exercise, gabions are now built in assignments in the upcoming experimental build, rather than as individual elements. (Once certain graphics code is made to work again, we can also leverage this code to do things like brick walls and fences, so that at long last we may be Perfectly Safe.) I think we still need to do some more UI work on the gabion line placer tool in order to make it something you would actually want to use, though; however, large walls are now a thing you can have. Following the same line of thought – “does this annoy me? YES” – I finally fixed the overseer counter so that it only displays overseers and not artisan workers (including but not limited to vicars, artisans, naturalists, barbers, and basically anybody not in Her Majesty’s 5th Regiment of Swole); artisans now get their own idle counter. (We probably need to change the term “artisan” soon as well, as it doesn’t make a whole lot of sense anymore.) This way, you can see how many people are doing the base work of resource mangling, and how many people need to get new stockpile jobs assigned to them. Management!

Get to it, layabouts!

Get to it, layabouts!

I have also spent a certain amount of time this week rewriting the stockpile code, which I’m hoping to have rolled out in the next experimental. There are two parts to this.

The first part of the impending stockpile rewrite is changing the internal logic for how the jobs system handles stockpile jobs. In the current build (Alpha 42), they just exist. Containers put jobs up in the jobs system trying to get into a stockpile; items put jobs up trying to get into stockpiles, or containers. Obviously, this just doesn’t work very well. (Also of note: a nasty bug in Alpha 42 means that only one person can use an entire stockpile at a time! No wonder nobody’s hauling stuff.)

Victor simply can't keep himself away from the sausages, apparently.

Victor simply can’t keep himself away from the sausages, apparently.

Moving forward, we are now using what we call THE LAWS OF STOCKPILES. When a worker does not have an assignment job, either in their assignment or in a new assignment, they will try to do the following things (in order):

  1. If there is a stockpile, and that stockpile has an item in the stockpile that does not match the stockpile filter, remove the item; put it in another stockpile. If no other stockpile exists, put it on the ground.
  2. If two objects in the stockpile can be consolidated into an equivalent stack, consolidate them.
  3. If a stockpile square is empty, put something in it (the closest thing) that obeys the stockpile filters.
  4. Run the existing logic: put goods in containers. However – and this is experimental! – only do this if the target good is in civilization.

The end result should be that everything ends up nicely stacked, and in a stockpile. We’ll see how it goes.

Productivity! Tiny charts! Toggling!

Productivity! Tiny charts! Toggling!

The rest of the month is more quality-of-life improvements, or at least code that will lead to quality-of-life improvements. With the new military health/morale displays in, people can at least see why their soldiers are running and this seems to have improved things a great deal; however, to clean out some of the nastiness in the military code and to be able to expand it (say, with things like better guns and so on and so forth) we need to have support for running a general decision tree before we kick into the jobs system. (AI code for shooting sort of wants to be a decision tree.) We are also going to be putting in better code for tying a list of jobs to an “office” building – so, for instance, a colonist seeking spiritual cleansing and irrigation can post a job in the Chapel, and wait for somebody to pick it up (or get upset that they were unable to get a meeting with the vicar, and throw a tantrum, and and and and etc.) Huzzah!

 

8 Comments

8 Responses to “Stockpiles and Gabions”

  1. Sam Atkins says:

    I’m amazed on two accounts:
    – Firstly, that a colonist can be named ‘Zeus Hat’, as in the final picture.
    – Secondly, that there are absolutely no jokes made about this in the blog post. (Not even in the tags!)

    #ZeusHat2015

    { reply }
  2. Daniel F says:

    “I, Stockpile” by Nicholas Vining

    { reply }
  3. Tikigod says:

    Good to see you ran with the ‘4 laws of Stockbotics’ idea. But even after pointing it out on the forums you STILL didn’t start the laws at the zeroth law! *shakes head in disappointment*

    Good write up and really looking forward to the next experimental build when it’s ready… which will hopefully be soon. 🙂

    { reply }
  4. Alex says:

    What’s wrong with “bolt of cloth” in Alpha42? Most commodities is stacked in stockpile, but not a cloth. Every item of cloth stored by one, not in stacks.

    { reply }
  5. Dibis says:

    I still get raided by a whole squad of stahlmarkians at the start of the game

    { reply }
  6. Lomgren says:

    As I was reading the tags, I was like “Ooh, I get to make an R. reference”, and then was disappointed to see that it was already made.

    I guess we now need Cthulhutronic brains or something to make up for it.

    { reply }

Leave a Reply

Your email address will not be published. Required fields are marked *