Mo Commodities Mo Problems

In Clockwork Empires you have a few fundamental game-pieces: agents that do stuff for you (colonists), places on the map they do stuff at (buildings/modules), and things produced by and consumed to build or upkeep the former categories: commodities. In other words, commodities are the food, planks, bricks, and so-on your colony needs to survive and grow. As such, commodities are very important to everything. So it is, by extension, very important indeed that a player knows how many of each commodity they have, what the commodities are good for, and how to make any commodity they don’t have but would quite like to have, thank you very much.

Glorious commodities everywhere just awaiting glorious logistical organization!

Glorious commodities everywhere just awaiting glorious logistical organization!

We’ve been working on tightening up these systems, both in the backend code and in the frontend code for expressing what’s happening in-game to the player. Let’s visit some of the work done toward these ends.

Re-Categorized Commodities

Did you notice that we redid the commodity filter categories? This affects both the commodities screen and how you can filter what goods are stored in stockpiles. Basically, the old categories were a guess thought up several years ago before the game was much of a game. Now that we have a game that’s a game, we can see very much better how commodity flow is used in colonies, so we drew little charts on the whiteboard of where commodities came from and how they get used and came up with the most efficient – but still very broad – categorizations we could. They’re much nicer than before.

commodity_categories

I also got to draw new icons. I love icons.

Construction UI

Ever since moving module construction to the “boxed module” system (where most modules are produced as a single crate that must be deployed on the spot rather than each module requiring a ton of separate ingredients), feedback for what is required to make a module has been fairly poor. You could see that the construction required a boxed module, but that’s obvious. The real question in a player’s mind is: What does that boxed module cost to construct? So now you get something like this:

module_construction_tooltip

The power saw requires a boxed power saw, yes, but you can also see all of the ingredients required to make a boxed power saw: six lacqured planks, four iron plates, two steel ingots, and a bucket of cogs. You also can see if you do or do not have all of these ingredients, so now you know what you need to get if you want to build a power saw.

Tangentially, there’s also a pop-up window describing what construction mode you are in because this was not made explicit. This is probably helpful to newer placers:

module_placement_ui

Commodity Count

We’ve been plagued for some time by a discrepancy between the commodity count you see in the commodities UI not matching the actual number of, say, planks you could find in stockpiles in your colony. In fact, Nicholas went slightly mad over these and become obsessed (“I must have coffee!” he screamed.)

This was essentially a technical implementation problem: Commodities were created and destroyed in various ways and places in code, and player ownership was set or removed in various ways and places in code. Odd cases abound: if a Fishperson is killed and drops a cube of meat outside of civilization, who owns it? If it’s dropped in-civilization, who owns it? If a Bandit steals some goods and is running away, and is killed, how far away is it valid to automatically create an order for a colonist to grab the item? (We certainly don’t want to re-create the Dwarf Fortress lost sock + giant cave spider death march problem.) — And that’s really the fun stuff, the real work was in the boilerplate code for creating and destroying items in the course of everyday workshop production in a way that accounts for job interruption, stacks containing many items, random explosions destroying commodities, and so on.

You’ll be glad to hear that it’s all sorted out now.

Commodity Destruction Order

An interesting case related to the above is the fact that a workshop job with multiple ingredients will first collect all of the bricks, return them to the workbench, destroy them, collect all the cogs, return them to the workbench, destroy them, then spawn the job product. What happens if that job is interrupted at some point? Why, you lose the destroyed items (because they’ve already been destroyed). This could be considered an acceptable cost for allowing work to be interrupted by hostile creatures (as tends to be the case) – but this gets reported as a bug. Why? Because it’s not made clear to the player what’s happened and why. One can imagine a case where we inform the player that their cook has let the cabbage burn due to being chased by a fishperson, but if we’re going to go through the trouble of storing information for a notification we might as well just return the commodity and not introduce an additional cycle of feedback-response.

So, this’ll get cleaned up. What is interesting to me is how players interpreted the events of the game that are an artifact of how the system is implemented as a series of finite state machines, how the development cost of UX is probably equal or greater than pure game logic, and when to decide to use one or the other tool to solve a problem.

Forest Meat

Loading up some long-running player games to look for bugs, I noticed a ton of meat strewn about the sides of the map. This is not ideal for a few reasons: the game is tracking a ton of entities that are barely affecting the game, and if colonists do get around to attempting to haul these low-value chunks of meat home it’ll take them all day to return just one. Plus it’s a bloody mess!

So what was the problem? Well, carnivorous animals weren’t nearly as interested in eating leftover meat as they’re supposed to be! Fixed that up, and now the forest is a much cleaner place – and you may actually have to defend your sausages from roaming foxes.

fox

Aren’t they cute?

It is fascinating how one clean-up function of the simulation going off-kilter can have such a major effect.

Module and Building Dismantling

Yes, you now get your materials back when you dismantle a module or building! This should encourage people to be a little more dynamic about building a small building and feeling comfortable with upgrading to newer, bigger, better stuff once their colony can support it.

The feng shui is all wrong, that workbench is going to have to go!

The feng shui is all wrong, that workbench is going to have to go!

“Doesn’t this make it effectively free to do everything?” you ask. “Sort of!” we answer, a mad gleam in our eyes. Which is why we’re adding a better maintenance system. But we can talk about that another time.

Enjoy the commodities.

Posted in Clockwork Empires | Tagged , , , , ,
7 Comments

7 Responses to “Mo Commodities Mo Problems”

  1. Unforked says:

    All those various chests in the first screenshot are interesting. Are those a secret new thing coming out?

    { reply }
  2. iucounu says:

    Re the commodity destruction: this was baffling me, so thank you for explaining! However it seems counterintuitive to me. Let’s say you’re building an iron oven.

    You get the iron pipes and take them to the workbench and you bend and weld them into the pipes required for an oven: fine, you have destroyed the pipes and produced Oven Part A.

    You get the iron plates and take them to the workbench and you hammer and shape them into the casing of an oven: you destroy the plates and produce Oven Part B.

    If you are then interrupted by bandits while fetching the bricks required for Oven Part C, it seems counterintuitive to then disregard Parts A and B which are sitting on the workbench waiting to be assembled. When my metalworker gets his head together after the invasion, why can’t he go, oh, just the bricks bit to go and I’ve done this job? It seems odd.

    { reply }
    • AdminDavid Baumgart says:

      The point of the FSM structure is that what step in the process you are IS the data about how far along with you. So rather than there being a stored part A, B, and C, it’s a question of being at step 1, 2, or 3.

      The problem, naturally, is if the process is disturbed you lose your place entirely – and the materials used to get to that place – and have to start all over. So that’s what we’ll fix.

      (VERY early in development we discussed having intermediate commodities for each step in production processes, but it turns out this would be extremely expensive in terms of assets and data – imagine every recipe in the game requiring an additional 1-3 unique objects made and defined in the job database. It’d multiply system complexity by … a lot. Which is best avoided in the interest of stability and in finishing the game.)

      { reply }
  3. Aaron says:

    I still have the commodity count issue. The UI will indicated I have 400+ logs & 200+ planks but my beds will not get repaired & new building foundations will not get built. I look at my stock piles and sure enough there are no logs or planks. As soon as I order colony to get lumber and make planks beds get fixed and buildings finish construction. The UI indicates I now have even more logs 500+ and planks 300+ but i know I used everything I just collected. Is there any command to have the commodities recounted? Like an audit? I have this same issue with ore and ingots too. Is there a timeline for this to get fixed?

    { reply }
    • AdminDavid Baumgart says:

      You will need to start a new game in Beta 52A to have a ‘clean’ commodity count.

      There are various other related issues generally to do with UI that confuse expression of what the counts mean, and we’re cleaning those up.

      { reply }

Leave a Reply to AdminDavid Baumgart { cancel }

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