Friday Facts #208 - Tips and tricks improvement

Posted by kovarex & Klonan on 2017-09-15, all posts

Hello, it's another Friday, so time for another Friday Facts.

Lets try to unify the crafting categories kovarex

As we were discussing the GUI/UX rewrite (which is going to be covered in detail in future FFF), we came across the crafting categories implementation. We have 4 in base game, but with few mods, it can go up to 20+ which is quite hard to manage in a GUI that is still practical and looks nice.

Making its own sub-category for transport belts and putting them there is (probably) fine, but if it is done this way (5dim code), it only moves the vanilla transports belts there. However if some other mod adds transport belts, they will still stay in the old category, making it all messy.

data.raw.item["transport-belt"].subgroup = "transport-belt"
data.raw.item["transport-belt"].order = "a"
data.raw.item["fast-transport-belt"].subgroup = "transport-belt"
data.raw.item["fast-transport-belt"].order = "b"
data.raw.item["express-transport-belt"].subgroup = "transport-belt"
data.raw.item["express-transport-belt"].order = "c"

This is a typical situation, where the fact that our data definition is done in a scripting language can be taken advantage of. We can just replace the previous code by more generic variant.

for index, recipe in pairs(data.raw.recipe) do
  -- Assuming the name of the entity is the same as name of the recipe, it could be solved more precisely
  if data.raw["transport-belt"][recipe.name] then
    recipe.subgroup = "transport-belt"
  end 
end

The code goes through all the recipes and whenever its result is a transport belt, it is moved to the correct category. This way, all the possible other transport belts added by other mods will go there and my change of categories doesn't actually make more problems than it solves. This is a shoutout to the mod devs so they try to be reasonable with the crafting categories, so it doesn't happen that often that <something>-1, <something>-2, <something>-3 is on one place, but <something>-4 is somewhere else, just because it was introduced by a different mod. Either try to keep things in their official categories as long as possible, or recategorize properly.

Tips and tricks improvement Klonan

The tips and tricks GUI is perhaps one of the greatest sources to teach players about some of the obscure convenience features we have added to the game over the years:

  • Fast replacing furnaces, inserters, assembling machines etc.
  • Copy-pasting entity information, recipes, schedules etc.
  • How to turn on detailed view (alt-mode).
  • The hotkeys for the quickbar.
  • And the rest...

It is a shame then that this GUI is rarely read by the player, and this is our fault. It is easy to see the main reasons why:

  1. It is only shown at the start of a new game, when many of the tips are not relevant.
  2. Once it is closed, it cannot be reopened without starting a new game.
  3. Many of the tips are outdated, old, or just plain ugly.

So with this in mind, I set to correcting things as best I could. Since the tips and tricks have been in the game for a very long time, this involved moving some of the information around to make it work in multiplayer, but because they don't affect the gamestate, determinism was not a concern. After adding a hotkey to bring the tips back up, it feels very natural now to hit the hotkey on and off just to quickly check them. Another improvement I made was a button to go backwards through the tips, and to loop once you've reached the last one.

Then it comes to the visuals. The biggest flaw is that most of the images are out of date, and taken on differing terrains - many are not even the same size as the others. This not only affects the size of the GUI, but gives the unpolished feel to the whole system. The other issue is the layout of the widgets in the GUI. With an invaluable mock-up from Albert, defining the styles and arranging necessary elements wasn't too much of a struggle. So the main task now is to recapture and go over the images, and recreate them in a consistent visual style.

After freshening up the current tips, I will feel better about adding more, without the worry that "Nobody will ever read them". No doubt the GUI will still change, especially with the GUI rewrite in the works, so I wouldn't get too attached to the exact way it looks now.

End of the guide

Back in 2016 just before Steam launch, we didn't really have a good online guide for the game. We had the wiki but it was somewhat underdeveloped, and not geared towards a new player to the game. So the guide was the perfect resource for us, and it has served our newer players extremely well.

Unfortunately in the 18 months since its introduction, a lot of the materials on the guide have become outdated. It would no doubt be a losing battle to try to keep it updated as we are continually adding and changing things in the game, so we have decided to take down the guide from public access. The wiki has received a lot of care from Gangsir and Bilka, and is a much better resource for players of all skill levels, so it is now our recommended destination.

As always, let us know what you think on our forum.