[h1]Trains in blueprints[/h1] Building trains again and again might be a daunting task. Especially when you start making a lot of mining outposts, artillery/supply trains with filtered cargo wagon slots etc. So I decided that we should extend blueprints to work with trains as well. The first condition was, that trains are only selected when you explicitly allow it in the checkbox, so they don't get in your way when building rail setups. [img]https://steamcdn-a.akamaihd.net/steamcommunity/public/images/clans/12002589/79a82acab7631e92a3554d88c91dfd8d888bf498.png[/img] Checking the button allows the train that was there to be put into the blueprint (similar to the way tiles work). For the sake of simplicity, we decided that once there is any rail in the blueprint, the train in it will be always buildable (as a ghost obviously), even if there are not rails to support the train at the moment. The train ghost will simply stay there and won't be buildable until rails are placed under it in a way so it can be placed. [img]https://steamcdn-a.akamaihd.net/steamcommunity/public/images/clans/12002589/38a08f7998e1ee849bd9bd238bc78f668dd97ebe.png[/img] https://cdn.factorio.com/assets/img/blog/fff-263-train-rails-blueprint.mp4 https://cdn.factorio.com/assets/img/blog/fff-263-train-rails-blueprint.webm If I remove the rails from the blueprint, I get a second type of rail blueprint. In this case, all the parts of need to have rails to support it, this is mainly needed as without rails, there is no rail grid forced, so we should make sure, the train ghost won't be created in some wrong position. [img]https://steamcdn-a.akamaihd.net/steamcommunity/public/images/clans/12002589/3a1d4e1dc324cd6e5473c8d862088337afb4aa7a.png[/img] https://cdn.factorio.com/assets/img/blog/fff-263-train-blueprint.mp4 https://cdn.factorio.com/assets/img/blog/fff-263-train-blueprint.webm The small touch here is, that the blueprint also contains the schedule. With little-bit of improvisation, I can optimize the mine building a lot in the late game. I create a blueprint of mine train station. The stop will be called [i]Mine X[/i]. Both of the trains in the blueprint will have the [i]Mine X[/i] -> [i]Smelting[/i] schedule setup. Once I build the blueprint, I just rename the [i]Mine X[/i] to whatever I want ([i]Mine 12[/i] for example), and the train schedules are updated as well, so I'm almost ready to go. https://cdn.factorio.com/assets/img/blog/fff-263-train-station-blueprint.mp4 https://cdn.factorio.com/assets/img/blog/fff-263-train-station-blueprint.webm The last tweak I'm considering is to allow blueprints to contain the fuel insertion info similar to how they contain the module insertion info for assembling machines now. [h1]Upgrade planner tweaks[/h1] When we showed it, the upgrade planner was [i]Prototype ready[/i], but playtesting uncovered various kind of missing tweaks, and as always the real usability is in the details. Especially since the mod already solves most of these issues, we have to at least be as good as the mod. The first problem was, with underground belts. With the [i]naive[/i] approach of just upgrading entities that are selected, it happened quite a lot, that I upgraded some belt area, but I didn't notice, that some of the underground belts have only one side marked for upgrade, so the belts get disconnected when the upgrade is executed: [img]https://steamcdn-a.akamaihd.net/steamcommunity/public/images/clans/12002589/56f02a556ab72e2f80bf2b0acad1addbdbebd16e.png[/img] This was be usually discovered half an hour later when I was investigating the reason of some part of factory not producing. When it happened few times in a row, it was quite annoying... So the fix was, to make sure that the upgrade planner always upgrades connected underground belts in pairs if possible: [img]https://steamcdn-a.akamaihd.net/steamcommunity/public/images/clans/12002589/6d6d34bb387d21d5b5c614238da848b869e4d33b.png[/img] Part of the tweak is, that the robot upgrades both part of the underground belt as one action, so the items that are "flowing" underground don't have to be touched. The next thing we wanted was to not only upgrade entities, but their also contents, so you can now specify module upgrades in the upgrade planner as well. (Please note, that the upgrade planner/blueprint UI is a work in progress, and this particular screen was not yet addressed by our GUI polishing process). [img]https://steamcdn-a.akamaihd.net/steamcommunity/public/images/clans/12002589/7de3a9fcdb7e896064e5cd7c0618cee05601f4c3.png[/img] Another feature is to be able to upgrade blueprints with the upgrade planner. The upgrade planner mod could do it as well, but we will be able to integrate it better with our GUI better. [img]https://steamcdn-a.akamaihd.net/steamcommunity/public/images/clans/12002589/b8bd6c4f7970653bbbf051b6ae800f8f396865a6.png[/img] [img]https://steamcdn-a.akamaihd.net/steamcommunity/public/images/clans/12002589/55c6f19f390af0b3cde0341f956fce0b0e04515d.png[/img] You can immediately see, that another tweak might be to also upgrade the blueprint icons as well. My thanks goes to [url=https://github.com/galibert]galibert[/url], who created the original pull request of this feature (giving source access to stranger [b]sometimes[/b] helps us) and Rseding91, who fixed the technical problems and added the tweaks mentioned earlier. [h1]Finalizing features and latency state (technical)[/h1] It has been quite a long time since we described our latency hiding system in [url=https://www.factorio.com/blog/post/fff-83]FFF-83[/url]. Since then, we have had to make a tough choice whether to incorporate a new interaction feature into the latency hiding or not as we developed it. With undo, it was kind of implied, that it needs to be incorporated in the latency state system, since you need accurate instant feedback of what you undo-ed, especially when you are undoing few things in a row, and you don't want to do more steps by accident because of the multiplayer delay. Since there are more and more things in the latency state, and they need to interact with each other in a reasonable way, the amount of possible cases starts to grow, so we have to make sure that the corner cases are covered by tests more than in other areas. Let me present you a quite simple case of what you see compared to what is happening in latency state under the hood, this is a simple thing: Start [img]https://steamcdn-a.akamaihd.net/steamcommunity/public/images/clans/12002589/71766bba23cf3f8cb2ff5ff3829fd63b2dcb6dbf.png[/img] Furnace built [img]https://steamcdn-a.akamaihd.net/steamcommunity/public/images/clans/12002589/e2620ff17acd2b6961fe57a18c1c1bfd5efd94b2.png[/img] Marked for deconstruction [img]https://steamcdn-a.akamaihd.net/steamcommunity/public/images/clans/12002589/859bacc6820b351bfaaa5d9fa10d9af04fdaf8e9.png[/img] Undone [img]https://steamcdn-a.akamaihd.net/steamcommunity/public/images/clans/12002589/e2620ff17acd2b6961fe57a18c1c1bfd5efd94b2.png[/img] But when you play in multiplayer, it might easily happen, that after the last undo step, not even the first command to build the actual furnace is in the game yet as the multiplayer latency might be too big. But as the local simulated state must act as it all was done instantly, it needs to solve different kind of situations What you see (latency state) / Actual game state Start / Start [img]https://steamcdn-a.akamaihd.net/steamcommunity/public/images/clans/12002589/71766bba23cf3f8cb2ff5ff3829fd63b2dcb6dbf.png[/img] [img]https://steamcdn-a.akamaihd.net/steamcommunity/public/images/clans/12002589/71766bba23cf3f8cb2ff5ff3829fd63b2dcb6dbf.png[/img] Fake furnace created / Nothing yet [img]https://steamcdn-a.akamaihd.net/steamcommunity/public/images/clans/12002589/e2620ff17acd2b6961fe57a18c1c1bfd5efd94b2.png[/img] [img]https://steamcdn-a.akamaihd.net/steamcommunity/public/images/clans/12002589/71766bba23cf3f8cb2ff5ff3829fd63b2dcb6dbf.png[/img] Fake furnace fake marked for deconstruction / Nothing yet [img]https://steamcdn-a.akamaihd.net/steamcommunity/public/images/clans/12002589/859bacc6820b351bfaaa5d9fa10d9af04fdaf8e9.png[/img] [img]https://steamcdn-a.akamaihd.net/steamcommunity/public/images/clans/12002589/71766bba23cf3f8cb2ff5ff3829fd63b2dcb6dbf.png[/img] Fake furnaces fake mark for deconstruction fake undone / Nothing yet [img]https://steamcdn-a.akamaihd.net/steamcommunity/public/images/clans/12002589/e2620ff17acd2b6961fe57a18c1c1bfd5efd94b2.png[/img] [img]https://steamcdn-a.akamaihd.net/steamcommunity/public/images/clans/12002589/71766bba23cf3f8cb2ff5ff3829fd63b2dcb6dbf.png[/img] Now real furnace fake marked for deconstruction / Furnace built in game state [img]https://steamcdn-a.akamaihd.net/steamcommunity/public/images/clans/12002589/e2620ff17acd2b6961fe57a18c1c1bfd5efd94b2.png[/img] [img]https://steamcdn-a.akamaihd.net/steamcommunity/public/images/clans/12002589/e2620ff17acd2b6961fe57a18c1c1bfd5efd94b2.png[/img] Real furnaces fake mark for deconstruction undone / Furnace marked for deconstruction in game state [img]https://steamcdn-a.akamaihd.net/steamcommunity/public/images/clans/12002589/e2620ff17acd2b6961fe57a18c1c1bfd5efd94b2.png[/img] [img]https://steamcdn-a.akamaihd.net/steamcommunity/public/images/clans/12002589/859bacc6820b351bfaaa5d9fa10d9af04fdaf8e9.png[/img] What you see is what you get / Furnaces mark for deconstruction undone in game state [img]https://steamcdn-a.akamaihd.net/steamcommunity/public/images/clans/12002589/e2620ff17acd2b6961fe57a18c1c1bfd5efd94b2.png[/img] [img]https://steamcdn-a.akamaihd.net/steamcommunity/public/images/clans/12002589/e2620ff17acd2b6961fe57a18c1c1bfd5efd94b2.png[/img] Doing all of these kind of cases right might make a big difference between [i]Prototype ready[/i] and [i]Release ready[/i]. With the undo feature itself, I added 42 different tests and I'm not completely finished. As always, let us know what you think on our [url=https://forums.factorio.com/62811]forum[/url].