Nox Futura - Workflow and Stockpiles

· ☕ 4 min read

In theory, should now point at my page. I hope that works, redirects aren’t always my friend.

There have been a lot of small changes this week:

  • Tweaked some VS settings to make my debug builds a bit more like my publish builds, and suddenly VS’s profiler shows me slow-down on a per-line basis. Not sure what I did, but I like it!
  • Fluid dynamics uses a compute shader. It spreads out pretty nicely. Very similar results to the CPU-based build from last week, but a LOT faster.
  • Cordex got a new Voxel model, closer to what I had in mind (but still not quite there yet). There’s some Easter eggs hidden in the model that may amuse people. Improved the spaceship texturing.
  • Emphasize z-based lighting more, after cleaning up the lighting code and wrestling a bit with sun angles.
  • Added a cache to the code that builds composite voxel model lists for on-screen entities. It’s a LOT faster now. I’d noticed a slowdown when I added a few hundred NPCs, and that takes care of it.
  • Fixed tooltip displays of stacks of items. It wasn’t showing the number of items correctly.
  • When a settler produces an item, it now properly aquires a quality based on how well they performed the work.
  • Relaxed the “1 settler using a workshop at a time” rule; it didn’t make sense to have settlers going on long treks to find wood, and claiming the sawmill the whole time. I really liked what this did to play, so it became a general thing.
  • Enabled the visibility system to greyscale areas you can’t see, and not render NPCs in them.
  • Fixed ramps leaving holes in the planet.

The first major change is the work order system. To recap a bit, you build workshops with various items (e.g. a carpenter shop requires wood blocks). Workshops have reactions associated with them; these can be automatic (such as making wooden blocks out of wood logs), or manual (you have to request them). A reaction takes 0-n inputs (which can include power), produces 0-n side-effects (such as making smoke), and produces 0-n items. (These are all defined in the raws, so it’s really easy to mod them without touching the C++ code). For example, make wooden bed takes a wood block and makes a simple bed. There are hundreds of these.

When you want to make an item, you either use the menu to select Workflow or press W. You now get a screen that uses my global UI code. The first tab shows you jobs that are queued up (and lets you cancel them). The second tab shows you everything you can currently make (with a text filter for search) and lets you add jobs. The final tab lets you select a “keep in stock” number for each thing you know how to do; a system periodically checks inventory and automatically adds jobs if you don’t have the required number of things. For example, if you always want to have 5 simple beds in stock, you could find “Make Simple Bed” in the list and up the “in stock” number to 5; your settlers will then try to keep 5 beds in stock. (Beds are an item, that when built becomes a building; deploying a bed removes it from the inventory count). This is very much a quality of life enhancement, and takes a lot of the tedium away from stock control.

The second major change is to the stockpile system. Now that you can easily have lots of items, it makes sense to be able to manage them! For now, the stockpile system is simple and a bit of a GUI monster - it needs a lot of work. You can create stockpiles, click buttons for what they hold and click on the map (or use the keyboard) to assign tiles. Tiles are rendered with a stockpile background, and settlers will move appropriate items to the stockpile. It’s a good start, but there’s a lot more to do to model the supply chain complexity I want!

Share this post
Support the author with