1. Factorio
  2. News

Factorio News

Friday Facts #342 - The new old tutorial

Read this post on our website.


As stated in previous FFF's we will be making some changes to the demo and tutorial content in the game. I wanted to clarify exactly what is being removed and what it is being replaced with, as this content is almost ready for release. If you would like to catch up on the topic, you can read Kovarex's piece in FFF-327, but I will also summarize it here.

Right now the NPE/Introduction is the scenario that is used as the demo (0.17) and as the tutorial in the full game (0.17 stable, 0.18 experimental). If anyone has played the tutorial in the last 12 months, this is probably what you have played.

The First steps campaign was a series of three levels which used to make up the demo and tutorial in 0.16 and earlier. They were introduced in 2014. We have been working on revamping these levels to bring them up to 0.18 standards.

Very soon the NPE/Introduction will be removed and the First Steps campaign will be reinstated, both as the full game tutorial and the demo.

[h3]What has been changed in the levels?[/h3]
The plan was to change these levels as little as possible while updating them to modern Factorio standards. That is harder than it sounds given these levels were created in 2014.

As stated in FFF-241, there were many things we felt were inconsistent in the First Steps campaign. One of the largest ones was that there were many different and confused channels of information. The newer version has given each channel a purpose and a format.

The most distracting, and the most popular was the character monologues. Some of the messages in each channel were written in the first person, as if the character is talking to themselves. All the instances of this occurring in the Yellow speech bubbles and objective panel are gone or moved to the console. The rule here is that nothing that is actually necessary should come via this channel. To communicate to the player that this is story text, I added a speaker prefix.



The most necessary and most annoying channel was the Yellow speech bubbles. There are situations where it is absolutely necessary to pause the game and tell the player something. Since we have no other technology designed for this purpose, I just resorted to removing as many of them as possible. They only appear where necessary, although I would still like to get rid of more of them.

The final channel is the Objective window. The rule here is, if the player tabbed through all the speech bubbles without looking, and did not read the story text, they should still be able to finish the level. The text should not be in the first person, and we can speak directly to the player.

Due to much more rigorous and dedicated internal testing (Boskid), we caught a lot of corner cases where players can become stuck. The tutorials also now take into account new and updated game features. For example, previously the pickaxe was used to demonstrate crafting, so some extra attention had to be paid to when the player crafts the stone furnace for the first time.

The maps have been updated to look much more like what the random generator creates in freeplay. The new remnants make a great impression here.



Now that the quickbar does not automatically populate, we had to be more careful about when the player has their inventory open. The new standard for new players is: open inventory, take item, close inventory, place item, open inventory, place remaining items, close inventory. Giving new players the option to add quickbar links as early as possible is a challenge because every time you add a new concept, the player must expend some of their attention keeping it in mind. Not only that, but using the quickbar actually removes a perfect opportunity for the new player to practice interacting with the inventory.
[h3]Why are we changing it?[/h3]
Kovarex discussed his reasoning in FFF-327, but a lot of people asked me for more information to help them understand. Post mortems are uncomfortable but necessary so I will try to summarize his point and add one of my own.

The NPE/Introduction was created to widen the audience of Factorio. It takes new players a long time to get into the game and many stop playing before 'getting it'. The strategy was to show new players (both in the demo and tutorial) more of the mid game. After finishing the scenario Kovarex realised that the experience was not in line with his vision for the game.

When he told me how he felt, I think he was surprised that I agreed with his decision to remove it. Vision alignment is very important, especially in a demonstrator product. It isn't something you can just 'fix' when the project is almost finished.

This is not to say that the NPE/Introduction failed in its goals. It did appeal to a wider audience and player feedback at the end of development was overwhelmingly positive. I received a lot of feedback from genuine first time demo players pledging to buy the game immediately and also from story focused, non-sandbox players who were craving more. But as Kovarex said in his FFF, the cost of this was too high.

In light of the full length campaign being cancelled (see V453000s part in FFF-331), this is the biggest reason why I think the NPE/Introduction would have failed as a demo. We would have been offering an experience in the demo which was targeted to a wide audience, but the quest loving players were not going to get any extra content if they buy the game. A literal "It isn't what it says on the tin" situation.

A full post mortem would be much longer than this, and I would have liked to discuss much more about the things that went right. On the up side, a lot was learned from this project and that can only make the game better in the future.
[h3]When is it coming?[/h3]
The new old First steps tutorial is almost ready for release, we are still doing some general polishing and internal testing, and if all goes to plan, it will be released within the next few weeks. However that doesn't mean the work is necessarily finished, as no doubt we will need to tweak, polish and fix a lot more things as player feedback starts rolling in.

Alongside this addition, we will also be removing the NPE, and doing a general cleanup of the now unneeded data changes. This may affect some mods which have dependencies on some new campaign assets. We might leave some assets in if they are significant enough (for instance the Compilatron), so if you are a modder and something in the NPE is of special interest to you, please let us know.

Version 0.18.18 released

Changes


  • Adjusted steam engine and turbine collision boxes so player can walk between two steam engines.
  • Roboports allow exporting both logistics and robot stats at the same time. more
Graphics


  • Added offshore pump remnants.
  • Added new dying effects for biters, spitters, worms, and spawners.


Gui


  • Added confirmation box for deleting blueprint book.
Sounds


  • New or updated sound effects include:
  • Transport belts - new concept for these sounds.
  • Turrets rotation sounds and fold/unfold.
  • Weapons improved and made more powerful, e.g. submachine gun, shotgun, gun turret, vehicle machine gun, Laser and electric beam.
  • Particles: Water splashes, Tree debris.
  • Various mix level tweaks including the train, enemies.
  • Attenuations (audible distance) adjusted for entities such as Pipe, Substation and Offshore Pump.
  • New sound when walking over ore patches.
  • Default Sound Settings Updated:
  • Music, Game Effects and Walking sound lowered, Environment sounds and Master Level raised.
  • Zoom audible distance and volume levels adjusted.
  • Maximum Environment Sounds increased (edited).
Bugfixes


  • Fixed mining entity with randomized mining result amount would never return the largest defined amount. more
  • Fixed crash when loading replay. more
  • Fixed reading LuaPlayer::entity_copy_source when the player is dead. more
  • Fixed that upgrading and delivering modules at the same time didn't work right. more
  • Fixed a crash when closing the game while some GUIs are shown. more
  • Fixed crash when setting max_group_gathering_time and min_group_gathering_time to the same value. more
  • Fixed discharge defense equipment had the wrong sprite in the equipment grid. more
  • Fixed that artillery wagons wouldn't show out of ammo icons. more
  • Fixed that modded cargo wagon colors wouldn't copy correctly through blueprints. more
  • Fixed furnaces with recipes using fluid ingredients could cause crash. more
  • Fixed a crash when removing a player that has modded associated character entities. more
Modding


  • Furnaces now ignore off_when_no_fluid_recipe property of their fluid box definition. Fluid boxes will not be disabled based on enabled recipes. more
  • Changed colored concrete tiles to be non-mineable.
Scripting


  • Added LuaEquipmentPrototype::automatic.
  • Added "include_entities", "include_trains", "include_station_names", and "include_modules" fields to LuaItemStack::create_blueprint.
  • Added LuaRoboportControlBehaviour::read_logistics and read_robot_stats
  • Removed LuaRoboportControlBehaviour::mode_of_operations


You can get experimental releases by selecting the 'experimental' beta branch under Factorio's properties in Steam.

Friday Facts #341 - Audio, Artillery, Attenuation

Read this post on our website.

Sound design update (Ian)

One advantage of switching to home working during the COVID-19 crisis is the ability to listen to the game using speakers rather than headphones, and this has proved useful in balancing the relative levels of the game. Val has also been getting to grips with Lua, and this has led him to working on attenuations, which have been proving problematic. For instance, we noticed that sounds such as the radar were getting cut off when you walked away from them, rather than fading out cleanly.

I investigated and discovered we had a maximum environment sound limit of 15, by raising this to 50 we have eliminated many of these problems. But then the downside is that there are now more sounds playing and therefore more clutter to mix and balance.

Pink squares indicate which sounds are active.=

Limit of 15 nearby sounds.

Limit of 50 nearby sounds.


Rseding has been working through the list of sound design programming tasks, for instance we finally have the sound for the artillery turret rotation integrated into the game (which was featured in FFF-252 quite a while ago).

https://cdn.factorio.com/assets/img/blog/fff-341-artillery.mp4
Real in-game footage of the new artillery sounds

In other news, we have an updated concept for the transport belts. We listened to feedback from the community that they were still a bit too present and annoying. The idea of the new sounds is that they will drift into the distance a bit more and become unnoticed (until you try to fall asleep).

More fun sounds include water splashes, electric and laser beams, more powerful weapons such as the gun turret and vehicle machine gun. And our old robot sounds have come back as additions.

If all goes to plan, we will merge the sound changes into master very soon, and once we've done all our pre-release checks, release it to the 0.18 experimental.

After that, I plan to spend time on UI sounds, and also balancing the overall levels to get them more in line with other games, which is trickier than normal given the lack of audio middleware. However we have also made some changes to the default sound settings that move us in the right direction.

Attenuation (Val)

Lately Ian and I were occupied with mixing and sound attenuation of the game. Attenuation of the sounds is a great tool for mixing a game. Using it you can make all sounds more located, take a certain place, you can clearly hear what object you are passing by, and sounds don’t overlap each other as much. Another bonus is that reaching an object won’t shock you with the full volume of its sound, as it is audible at a distance and ramps up in volume. All that brings you a clearer mix of everything you hear in the game.

While checking the offshore pump and I noticed that pipes produced a small part of their loop when I walked near them, even if there was no water flow inside.

https://cdn.factorio.com/assets/img/blog/fff-341-fluid-sound.mp4
The pipe is making a sound, even though no fluid is flowing

Rseding told me that it must be a conflict of the entity working_sound in combination with the max_sounds_per_type we use to limit the number of certain types of sounds playing at the same time. After thinking a while, I decided to remove the max_sounds_per_type and added a audible_distance_modifier with a very small value for pipes. I tested that, and for my happiness it worked well in this case.

There are probably another 100 little issues like this in the sound design, it is not as simple as replacing all the audio samples, and we are getting there. This is also why your feedback and bug reports on the sound changes are extremely useful to us, as we need to take care of as many areas as we can before 1.0 arrives.

Friday Facts #340 - Deep desyncs

Read this post on our website.

Not mentioning it would be weird

I really think everybody has heard all about this and nothing else over the last few weeks, but yes, the Coronavirus.

For now, with Factorio, everything seems okay. We are all working from home, the team is still going, and so far we are following our plan quite well. We released the Character GUI and Statistics GUI last week, and some improvements such as new water splashes and leaf animations this week. Things are still moving along.

However it is still early days, we haven't really had any experience having the whole team work remotely, so there may be some challenges we need to tackle as time goes on. At the moment we don't know whether this will affect our 1.0 release date, I guess it will one way or the other, but for now we aren't announcing any changes.

[h3]Business as usual[/h3]
Apart from the development side still running, our e-shop is also remaining operational, and we have just restocked on all variants of our t-shirts. While we can't guarantee anything, if you order from us at this time, we should still be able to get your t-shirts to you.

Deep desyncs

Last week there we had quite a few more players than usual, and Krastorio 2 was released, which meant a lot more hours into a lot more areas of the game. During the week, Boskid and I received quite a few desync reports with mods. Generally we believe, that it is probably the mods causing the problem, as it is quite easy to cause a desync with the control scripting if you don't know some very important gotchas.

But still, we decided to investigate to help the players find out which mod is causing the problems.

[h3]Serpent cyclic references[/h3]
One quite tricky desync we found, is related to cyclic references, and the way serpent serialises the global Lua data.

Take the example here of the Construction Drones mod. You have a player which dispatches the drones to go do work; the player needs to keep track of what drones he owns, and the drones need to remember which player they belong to.



Now this works fine during runtime, you can access the drone from the player object, and access the player from the drone object. When the game is saved, Serpent goes through all the data in 'global' and serialises it for later. To handle the cyclic references, if serpent detects that it has 'seen' an object already, it writes a placeholder value, and comes back to fix it later.

The problem, is that serpent chose nil as the placeholder value. In Lua, writing a table value as nil is the same as deleting the key, and the key won't be seen when looping the table in the future. When serpent then goes back to 'fix-up' the placeholder values, it ends up with each peer saving a different table ordering (because of some even deeper technicalities with our custom version of Lua).

So the problem is deep and was quite hard to find, but the fix is quite simple. Boskid simply changed the placeholder value from nil to 0, and now the iteration order is saved and loaded correctly every time.

[h3]Unit group max speed[/h3]
Another report came in from a player using Krastorio 2 and Rampant mods. This one on the surface really seemed like the mods fault, since all the diffs in the desync reports were related to unit positions, and the Rampant mod is all about units.

The desync was extremely fragile, and was very hard to reproduce, but eventually Boskid managed to narrow it down. This is a screenshot taken on the exact tick that the desync occurred.



What jumped out to me as immediately suspicious, is that the biter is only just moving onto the creep. This is because the creep (from Krastorio 2) gives the units a speed bonus when walking on it. I did a quick experiment by commenting out the tile bonus code in the engine, and the desync did not occur again.

But of course removing the code here would only treat the symptom, and the cause will be something deeper (FFF-296). So with lots of patience, Boskid narrowed it down further and further, deep into the movement and unit behaviour logic. What we found, is that the unit is part of a unit group, and this group was caching the value of its 'max speed' based on the fastest unit in the group. However this value was not saved with the save game, but was recalculated each time the game was loaded. Since the unit was walking on creep, it has a higher max speed, so the group calculated a higher max speed when the game was loaded.

Now this logic has been in the game since unit groups began, but it only became a problem more recently. In versions of Factorio 0.16 and before, a units max speed was always going to be based on its prototype, which does not change after the game is loaded. With version 0.17 we added 2 (really nice) mod capabilities:
  • Allowing units to be affected by tiles;
  • Allowing scripts to change unit speeds directly.
It didn't come up as a problem initially, as the freeplay base game doesn't really use these capabilities.

Well every change has the potential to break things. Since we know the only 2 cases where the units speed can change, Oxyd made it so that the unit will notify the group to recalculate its max speed when it is necessary.

Version 0.18.16 released

Graphics


  • New water splash effects using water particles instead of an animation.
  • New animations for leaf particles.
Bugfixes


  • Fixed the tank not being properly centered to its bounding box (graphical issue).
  • Fixed GUI windows not drawing properly when they can't fit the screen width. more
  • Fixed glowing Heat pipe ending sprites. more
  • Fixed some character bonuses in bonus GUI not being printed correctly. more
  • Fixed character GUI player color sliders not changing chat colors more
  • Fixed that hotkeys wouldn't work while using the character logistics GUI in some cases. more
  • Fixed a desync related to unit speed changing while part of a unit group. more
  • Fixed some Trigger Effects not showing correct repeat count in tooltips. more
Scripting


  • Added LuaEntity::effective_speed
  • Added LuaControl::is_flashlight_enabled
  • The 'on_ai_command_completed' event will now fire for distraction commands.
  • Added 'was_distracted' to the 'on_ai_command_completed' event. If true, it means the completed command was a distraction command.


You can get experimental releases by selecting the '0.18.x' beta branch under Factorio's properties in Steam.