[0.18.17] 8-way rotation cursor visualisation and ghost placement problems

Bugs that are actually features.
Post Reply
User avatar
Earendel
Factorio Staff
Factorio Staff
Posts: 711
Joined: Sun Nov 23, 2014 11:57 am
Contact:

[0.18.17] 8-way rotation cursor visualisation and ghost placement problems

Post by Earendel »

These issues relate to turrets with the "building-direction-8-way" flag.

What does work: Get the entity from the editor, place 8 entities in a line pressing after each one. The entities will be placed with orientation in 8 increments and the graphics appear to display correctly. Also, if pressing R on a placed entity it correctly rotates though all 8 directions and updates the graphics.

Problem 1: Even though the displayed orientation is correct, the direction defines are limited to the cardinal directions. i.e. 0.375 is south but should be SouthEast.

Problem 2: While placing the entities and pressing r after each one, even though the placed entity is correct, the placement visualisation is not correct and will only display the 4 cardinal direction versions.

Problem 3: When placing a ghost instead of a real entity, the orientation is always 0 and the direction north, even though the real entity would be placed directly. To be clear, this is not just snapping out of 45 degree increments, even south will place a ghost with north.

Problem 4: If you pipette any of the 8 directions of a placed entity, the cursor direction will always be north and won't match the direction of the pipetted entity

Problem 5: When making a blueprint of the entities with diagonal orientations, the virtual entities in the blueprints snap to the closest cardinal direction so when the blueprint is constructed the result won't match the original.

Steps to recreate:
Make duplicate prototypes of the laser-turret entity and item with new names and update the minable/place_result properties.
Set the "building-direction-8-way" flag on the entity.
Replace all direction_count = 4 with direction_count = 8. For each sprite where the direction count was changed, set the height to half what it was before (this is just so you can see a visual difference).
Load the game, go into editor mode, search for the new entity.

Place 8 of them in a row rotating after each one. Note that the was wrong for half of the placements. Also, SouthEast is displayed as South in the debug info and so on.

Then start a new row but ghost-place each one, again rotate after each placement. Note that all placements are wrong except north.

Get out of editor mode and copy-paste the first row to make a third row. Note that half the ghosts are wrong.

Pipette any non-north entity and note the orientation is wrong.

Why is this important?
I'm trying to make a structure that has 8 placement direction options. It cannot rotate a top-turret section once placed and won't have any normal turret-like properties such as an attack. I'm using a turret as a base only because turrets seem to have better 8-way rotation support than other usable entity types I've found. I know 8-way rotation works for some other types (car, corpse, rail segments, rail signals) but they are even less suitable for various reasons (can't be blueprinted, 2-tile snapping, restricted placement to rails, etc).
super-secret-structure.png
super-secret-structure.png (222.6 KiB) Viewed 1473 times

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

Re: [0.18.17] 8-way rotation cursor visualisation and ghost placement problems

Post by Bilka »

Have you tried setting turret_base_has_direction to true? If you just copy from the laser turret, that property will be false.
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
Earendel
Factorio Staff
Factorio Staff
Posts: 711
Joined: Sun Nov 23, 2014 11:57 am
Contact:

Re: [0.18.17] 8-way rotation cursor visualisation and ghost placement problems

Post by Earendel »

I'll try and report back.

User avatar
Earendel
Factorio Staff
Factorio Staff
Posts: 711
Joined: Sun Nov 23, 2014 11:57 am
Contact:

Re: [0.18.17] 8-way rotation cursor visualisation and ghost placement problems

Post by Earendel »

I'll try and report back.

Edit:
Setting turret_base_has_direction solves all of the problems, so that is fantastic.

That means that what I reported earlier is possibly not important, but it does seem internally inconsistent.

Thanks for the response.

Post Reply

Return to “Not a bug”