make more entity prototypes support rotation

Place to ask discuss and request the modding support of Factorio. Don't request mods here.
Post Reply
war877
Burner Inserter
Burner Inserter
Posts: 7
Joined: Wed Jul 19, 2017 3:47 am
Contact:

make more entity prototypes support rotation

Post by war877 »

TL;DR
Allow storage containers and lamps and power poles to be rotated.
What ?
These types should be non-rotatable by default, but would enhance modding flexibility if they could be rotated.
Why ?
I currently have need of rotating non-square storage containers and lamps. Getting such objects to rotate without rotation is complicated and probably bad for UPS. EDIT: power poles as well.

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: make more entity prototypes support rotation

Post by ssilk »

This makes no sense.

- not possible to make rectangular light sources, and I also don’t see a reason why, just add more lights together.
- there are already mods, which use rectangular containers, and that mods seem to have no problems to rotate
- power poles have pseudo-rotation (rotate into position after placing)
- I generally don’t understand why something needs to be rotated, when it looks equally from all directions :)
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

Koub
Global Moderator
Global Moderator
Posts: 7175
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: make more entity prototypes support rotation

Post by Koub »

ssilk wrote:
Wed Nov 17, 2021 6:04 am
This makes no sense.

- not possible to make rectangular light sources, and I also don’t see a reason why, just add more lights together.
- there are already mods, which use rectangular containers, and that mods seem to have no problems to rotate
- power poles have pseudo-rotation (rotate into position after placing)
- I generally don’t understand why something needs to be rotated, when it looks equally from all directions :)
I don't agree with you Ssilk. I can't speak on the moddability of what can be rotated or not, and can't say if this would be doable or not code wise, but it totally makes sense for a modder to want to be able to mod rotatable lights or containers in for custom non square lights/containers.
One can argue that constant combinators don't "need" to be rotated, yet they can be out of the box.
Whatever placeable entity should be allowed to be rotatable, if the modder designs it so.
Koub - Please consider English is not my native language.

mrvn
Smart Inserter
Smart Inserter
Posts: 5682
Joined: Mon Sep 05, 2016 9:10 am
Contact:

Re: make more entity prototypes support rotation

Post by mrvn »

ssilk wrote:
Wed Nov 17, 2021 6:04 am
- I generally don’t understand why something needs to be rotated, when it looks equally from all directions :)
Do power poles, lights, chests need to look equal from all directions? Do the circuit connection need to be in the same spot all the time?

Rectangular objects certainly don't look the same horizontal and vertical.

Please add the power switch to that list. Why can't I rotate that one? It clearly would look different when rotated.

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: make more entity prototypes support rotation

Post by ssilk »

Koub wrote:
Wed Nov 17, 2021 12:11 pm
One can argue that constant combinators don't "need" to be rotated,
? But constant combinator can be rotated?
Whatever placeable entity should be allowed to be rotatable, if the modder designs it so.
I'm not longer in modding, so I dunno/not 100% sure: as far as I remember there is no reason, that any entity cannot be rotated. It just needs grafics and some configuration, but it might work out of the box.
Someone may correct me if I'm wrong, please. 8-)
mrvn wrote:
Wed Nov 17, 2021 4:36 pm
ssilk wrote:
Wed Nov 17, 2021 6:04 am
- I generally don’t understand why something needs to be rotated, when it looks equally from all directions :)
Do power poles, lights, chests need to look equal from all directions? Do the circuit connection need to be in the same spot all the time?
Not the point here. If the entity has no grafics for rotation, the game cannot invent one. :) If a modder rotates an entity, that has only one graphics, it might not work. ;) Sounds stupid, but eventually part of the problem.
Please add the power switch to that list. Why can't I rotate that one? It clearly would look different when rotated.
Ah, yes, good point, now this suggestion becomes more flesh. Could it be, that a combinators are only rotatable in two directions.

But I fear we need more expert knowledge to discuss this, because as said above I think this is partly working. Or may be totally wrong.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

Koub
Global Moderator
Global Moderator
Posts: 7175
Joined: Fri May 30, 2014 8:54 am
Contact:

Re: make more entity prototypes support rotation

Post by Koub »

ssilk wrote:
Wed Nov 17, 2021 10:58 pm
? But constant combinator can be rotated?
2021-11-18 00_03_26-Factorio 1.1.46.jpg
2021-11-18 00_03_26-Factorio 1.1.46.jpg (39.11 KiB) Viewed 2869 times
Koub - Please consider English is not my native language.

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: make more entity prototypes support rotation

Post by ssilk »

Hm. I should look better before I post. :roll:
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

FuryoftheStars
Smart Inserter
Smart Inserter
Posts: 2483
Joined: Tue Apr 25, 2017 2:01 pm
Contact:

Re: make more entity prototypes support rotation

Post by FuryoftheStars »

ssilk wrote:
Wed Nov 17, 2021 10:58 pm
If the entity has no grafics for rotation, the game cannot invent one. :) If a modder rotates an entity, that has only one graphics, it might not work. ;) Sounds stupid, but eventually part of the problem.
From what little I'm able to figure out looking through the entities file, I believe this is exactly it. Rotatability does seem to appear to depend on the graphics being created for it. I don't see anything for a general "can rotate" true/false flag anywhere.
My Mods: Classic Factorio Basic Oil Processing | Sulfur Production from Oils | Wood to Oil Processing | Infinite Resources - Normal Yield | Tree Saplings (Redux) | Alien Biomes Tweaked | Restrictions on Artificial Tiles

Bilka
Factorio Staff
Factorio Staff
Posts: 3123
Joined: Sat Aug 13, 2016 9:20 am
Contact:

Re: make more entity prototypes support rotation

Post by Bilka »

Whether an entity can be rotated (sometimes conditionally, e.g. turrets or crafting machines) depends on the entity type. Neither containers, power switches or lamps can be rotated.

Moved to modding interface requests.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

User avatar
Lubricus
Filter Inserter
Filter Inserter
Posts: 294
Joined: Sun Jun 04, 2017 12:13 pm
Contact:

Rotatable chests

Post by Lubricus »

It would be nice to have moded rectangular chests and still be able to rotate blueprints 90 degrees.
It's a request to make mods work better without being an API request. Vanilla chests is quadrates so they don't need to be rotated but moded ones may need it. In particular I am planning to use the merge chest mod to save UPS in my Py factory but then I either have to make an vertical and horizontal version of all stations or merge the chests after the BP is built. It's also makes it harder to duplicate existing builds when needed.

FuryoftheStars
Smart Inserter
Smart Inserter
Posts: 2483
Joined: Tue Apr 25, 2017 2:01 pm
Contact:

Re: Rotatable chests

Post by FuryoftheStars »

My Mods: Classic Factorio Basic Oil Processing | Sulfur Production from Oils | Wood to Oil Processing | Infinite Resources - Normal Yield | Tree Saplings (Redux) | Alien Biomes Tweaked | Restrictions on Artificial Tiles

User avatar
ssilk
Global Moderator
Global Moderator
Posts: 12888
Joined: Tue Apr 16, 2013 10:35 pm
Contact:

Re: make more entity prototypes support rotation

Post by ssilk »

merged with existing thread

Thanks to Fury, search would take me much longer without this hint to this board.
Cool suggestion: Eatable MOUSE-pointers.
Have you used the Advanced Search today?
Need help, question? FAQ - Wiki - Forum help
I still like small signatures...

Rseding91
Factorio Staff
Factorio Staff
Posts: 13171
Joined: Wed Jun 11, 2014 5:23 am
Contact:

Re: make more entity prototypes support rotation

Post by Rseding91 »

Largely the issues with making something rotatable that the base game never needs to be rotated are:

A) the entity code has to support it in a path base-game never runs (error prone)
B) the entity needs to use more RAM to store the direction for every entity even when not used by the base game
C) the save file has to save/load the direction even when it isn't being used by base game

B and C are the main factors why things don't support direction. A can largely be addressed with tests but still isn't ideal.
If you want to get ahold of me I'm almost always on Discord.

User avatar
Lubricus
Filter Inserter
Filter Inserter
Posts: 294
Joined: Sun Jun 04, 2017 12:13 pm
Contact:

Re: make more entity prototypes support rotation

Post by Lubricus »

Rseding91 wrote:
Sat Dec 18, 2021 3:52 pm
Largely the issues with making something rotatable that the base game never needs to be rotated are:

A) the entity code has to support it in a path base-game never runs (error prone)
B) the entity needs to use more RAM to store the direction for every entity even when not used by the base game
C) the save file has to save/load the direction even when it isn't being used by base game

B and C are the main factors why things don't support direction. A can largely be addressed with tests but still isn't ideal.
Is it possible to use Composition design pattern or something to make it possible to mix and match properties for entities more? Or will it be to messy and inefficient?

Post Reply

Return to “Modding interface requests”