Page 1 of 1

[boskid][2.0.47] Inserters can face diagonally

Posted: Thu May 29, 2025 11:58 pm
by BattleFluffy
Blueprint string:

Code: Select all

0eNpljt0KgzAMRt8l151YZ4v2VYYMf8IIaJS2jknpu6/Vi13s7ks430kCDPOOmyX2YALQuLID8wjg6MX9nHfcLwgGiB1ajxaiSHnCDxgZOwHInjzh1TqH48n7MiTSSPHXFrCtLhVWzu4kuVWNbgol4Mj5Xqjkn8jieDE63yCPS5L8XhXwRutOQOmqrdtWaVVKVdYxfgGT80SY

This blueprint can be force-built over an existing inserter to make the inserter face diagonally.
diagonal inserter.png
diagonal inserter.png (156.12 KiB) Viewed 4011 times
The diagonal inserter can also take items from a diagonal tile, and place them at a diagonal tile. It's a fully functional diagonal inserter.
Image

Peeking inside the blueprint with the code below, I can see that internally, the inserter's "direction" is set to 6.

Code: Select all

/sc local str="0eNpljt0KgzAMRt8l151YZ4v2VYYMf8IIaJS2jknpu6/Vi13s7ks430kCDPOOmyX2YALQuLID8wjg6MX9nHfcLwgGiB1ajxaiSHnCDxgZOwHInjzh1TqH48n7MiTSSPHXFrCtLhVWzu4kuVWNbgol4Mj5Xqjkn8jieDE63yCPS5L8XhXwRutOQOmqrdtWaVVKVdYxfgGT80SY";     local bp_to_table=function(instr)      --[[version and the body part]]   local version=string.sub(instr,1,1);   local body=string.sub(instr,2);   --[[then decode it]]   local json_str=helpers.decode_string(body);   --[[then turn it into table]]   local output=helpers.json_to_table(json_str);      return output; end  --[[and this could test if it print properly]] game.player.print( serpent.block( bp_to_table(str) ) );
direction 6.png
direction 6.png (89.76 KiB) Viewed 4011 times
Direction 6 is southeast, I think:
https://lua-api.factorio.com/stable/def ... .direction

The behavior I would expect is that inserters only support "north", "south", "east" and "west" directions. Importing this blueprint should produce an error.

Re: [2.0.47] Inserters can face diagonally

Posted: Fri May 30, 2025 3:03 am
by eugenekay
This is just how Inserters work. The Vanilla tools only allow Cardinal setups, but you can do anything with Blueprints or Custom Mods. Having this Blueprint produce an error would break existing setups using such mods.

Good Luck!

Re: [2.0.47] Inserters can face diagonally

Posted: Fri May 30, 2025 9:29 am
by BattleFluffy
The above behavior IS produced in Vanilla. No mods involved.

If that was the dev's perspective then the real bug would be that the Rotate (R) key does not rotate to the intermediate directions.

Somehow I don't think that's what they intended though.

Re: [2.0.47] Inserters can face diagonally

Posted: Fri May 30, 2025 9:54 am
by boskid
Thanks for the report. Issue is now fixed for 2.0.54.

Re: [boskid][2.0.47] Inserters can face diagonally

Posted: Fri May 30, 2025 1:45 pm
by BattleFluffy
Thanks! Amazing response time. You guys are the greatest :>

Re: [boskid][2.0.47] Inserters can face diagonally

Posted: Fri May 30, 2025 5:50 pm
by phidias0303
👎🏻

Re: [boskid][2.0.47] Inserters can face diagonally

Posted: Fri May 30, 2025 6:00 pm
by boskid
phidias0303 wrote: Fri May 30, 2025 5:50 pm👎🏻
Would you like to explain?

Re: [boskid][2.0.47] Inserters can face diagonally

Posted: Fri May 30, 2025 6:29 pm
by eugenekay
The Blueprint in the Bug Report no longer “works” in 2.0.54, it now imports as a “straight” inserter. This was previously a neat, albeit unintentional, technique for achieving diagonal inserter setups without resorting to an Inserter mod. However, in a predictable demonstration of XKCD 1172: Workflow, this Bug Report has lead to it being removed from Vanilla. Hence, SadTrombone.mp3

There are some other “not normally possible” setups that can be created with Blueprint string hacking, like setting Item Requests in non-Logistic chests… I haven’t posted these Lua API edge cases because they don’t actually cause a crash - and are useful!

Re: [boskid][2.0.47] Inserters can face diagonally

Posted: Fri May 30, 2025 6:49 pm
by Hares
Damn. This looks so cool.

Re: [boskid][2.0.47] Inserters can face diagonally

Posted: Fri May 30, 2025 7:24 pm
by Hares
eugenekay wrote: Fri May 30, 2025 6:29 pm There are some other “not normally possible” setups that can be created with Blueprint string hacking, like setting Item Requests in non-Logistic chests…
You can request items as ghost requests via in-game logic. Check this out:

05-30-2025, 22-24-06.png
05-30-2025, 22-24-06.png (2.83 MiB) Viewed 3280 times

Re: [boskid][2.0.47] Inserters can face diagonally

Posted: Fri May 30, 2025 7:32 pm
by eugenekay
Hares wrote: Fri May 30, 2025 7:24 pmYou can request items as ghost requests via in-game logic. Check this out:


05-30-2025, 22-24-06.png

Yes, this is what I was describing? It is finicky to Blueprint these in some Slot types; my point was that you can “get away with more” by editing the Blueprint String than is possible in Vanilla. This Bug Report seems to be a case of one of these “features” being removed.

I don’t mind too much - it is still possible with Mods.

Re: [boskid][2.0.47] Inserters can face diagonally

Posted: Fri May 30, 2025 7:46 pm
by Hares
eugenekay wrote: Fri May 30, 2025 7:32 pm Yes, this is what I was describing? It is finicky to Blueprint these in some Slot types; my point was that you can “get away with more” by editing the Blueprint String than is possible in Vanilla. This Bug Report seems to be a case of one of these “features” being removed.

I don’t mind too much - it is still possible with Mods.
I didn't edit the BP string. I just created this within the game.
  1. Place a ghost somewhere outside of bot network
  2. Add ghost requests within ghost buildings
  3. Blueprint it
  4. Done

Re: [boskid][2.0.47] Inserters can face diagonally

Posted: Fri May 30, 2025 10:47 pm
by k1ng440
This wasn't hurting anyone :(

Re: [boskid][2.0.47] Inserters can face diagonally

Posted: Sat May 31, 2025 4:06 am
by cyx2020f
Existing diagonal inserters from old saves and blueprints in the blueprint shelf can still be used. Will the dev fix? (I don't think so, as adjusting every entity in the map to match its prototype definition will probably break blueprints when switching mod sets, for example adjustable inserters. (I have already seen that, people installed bob logistics and broke all the space age blueprints that use turbo belts, as there is a migration from bob logistics to migrate `turbo` to `bob-turbo`. No way to cleanly unistall bob logistics and I made a mod to revert that prototype migration.))

Re: [boskid][2.0.47] Inserters can face diagonally

Posted: Sat May 31, 2025 4:29 am
by cyx2020f
eugenekay wrote: Fri May 30, 2025 6:29 pm The Blueprint in the Bug Report no longer “works” in 2.0.54, it now imports as a “straight” inserter. This was previously a neat, albeit unintentional, technique for achieving diagonal inserter setups without resorting to an Inserter mod. However, in a predictable demonstration of XKCD 1172: Workflow, this Bug Report has lead to it being removed from Vanilla. Hence, SadTrombone.mp3

There are some other “not normally possible” setups that can be created with Blueprint string hacking, like setting Item Requests in non-Logistic chests… I haven’t posted these Lua API edge cases because they don’t actually cause a crash - and are useful!
It was never possible to import a blueprint that contain diagonal inserters - even before this fix. They will be aligned to 4 directions when importing. The only way to share a diagonal inserter blueprint is to put it in a save, in public blueprint shelf or in a chest, and share the save to others. This version only fixed that you can set its direction diagonal via script. Old diagonal inserters, either in a map or in a blueprint will not be affected.