Adding an Empty 'fluid_boxes' key resolves non-rotating Assembling Machines

This subforum contains all the issues which we already resolved.
Post Reply
honestabelink
Manual Inserter
Manual Inserter
Posts: 4
Joined: Thu Mar 28, 2019 8:23 am
Contact:

Adding an Empty 'fluid_boxes' key resolves non-rotating Assembling Machines

Post by honestabelink »

'Types/Animation4Way' specifies that you may optionally include directional animations, in the north,east,south,west keys.
north
Type: Types/Animation

Optional. If omitted, the game will not look for any other directions and instead try to load the whole definition as one Types/Animation and apply it to all directions.

east
Type: Types/Animation...
But, even if you define 'Types/Animation4Way' with the proper directional keys and animation definitions, you will find 'assembling-machine' ignores this data and just defaults to the north view, with no rotation available.

Weirdly...

Adding the key 'fluid_boxes' to the 'assembling-machine' definition, EVEN IF EMPTY, corrects the issue. (rotations return, rotation events are raised, etc)

There is apparently some logic checking for 'fluid_boxes' and only if it's found does it load the rest of the directional animations.

Links :
https://wiki.factorio.com/Types/Animation4Way
https://wiki.factorio.com/Prototype/Cra ... #animation

Thanks for your time

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

Re: Adding an Empty 'fluid_boxes' key resolves non-rotating Assembling Machines

Post by Rseding91 »

Thanks for the report. Assembling machines don't use direction if they don't have fluid connections so if anything it using directions when fluid_boxes is defined but empty would be the issue here.
If you want to get ahold of me I'm almost always on Discord.

honestabelink
Manual Inserter
Manual Inserter
Posts: 4
Joined: Thu Mar 28, 2019 8:23 am
Contact:

Re: Adding an Empty 'fluid_boxes' key resolves non-rotating Assembling Machines

Post by honestabelink »

Thanks for the speedy response @Rseding91 :)
Assembling machines don't use direction if they don't have fluid connections
Is there a reason it was designed this way?

I only ask cause from a modders perspective, if I define the 4 directional animations from 'Types/Animation4Way', I expect to have these animations available to me by default. I found it unexpected that I have to include a 'fluid_boxes' key to get the rotating to work.

This is also an undocumented behavior, https://wiki.factorio.com/Prototype/Cra ... #animation

If you plan to leave the requirement for 'fluid_boxes' to make the directional animations available, then I'd recommend updating the docs to reflect the requirement.

My recommendation though would be to remove the requirement. 'Types/Animation4Way' defining directional animations should be respected.
so if anything it using directions when fluid_boxes is defined but empty would be the issue here.
Perhaps I am misunderstanding, but this is not entirely true.

For example

Code: Select all

        fluid_boxes =
        {
            {
            production_type = "input",
            pipe_covers = pipecoverspictures(),
            base_area = 10,
            base_level = -1,
            pipe_connections = {{ type="input", position = {0, -3} }}
            },
            off_when_no_fluid_recipe = false
        },
Results in a entity that can freely rotate, if directional animations are defined. (even without a recipe that uses a fluid)

Code: Select all

        fluid_boxes =
        {
            {
            production_type = "input",
            pipe_covers = pipecoverspictures(),
            base_area = 10,
            base_level = -1,
            pipe_connections = {{ type="input", position = {0, -3} }}
            },
            off_when_no_fluid_recipe = true
        },
Results in a entity that can not freely rotate. It requires a recipe accepting a fluid to be able to rotate. As this is when the fluid_boxes become active.

Code: Select all

        fluid_boxes =
        {
        },
Results strangely, in a entity that can freely rotate, again even without a recipe that uses a fluid.

Again it is appearing like fluid_boxes is the thing defining whether or not rotating should be available. Which I understand, but I don't think it's appropriate to ignore directional animations by default.

Thanks again for your time
Last edited by honestabelink on Thu Mar 28, 2019 12:25 pm, edited 1 time in total.

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

Re: Adding an Empty 'fluid_boxes' key resolves non-rotating Assembling Machines

Post by Bilka »

honestabelink wrote:
Thu Mar 28, 2019 12:14 pm
If you plan to leave the requirement for 'fluid_boxes' to make the directional animations available, then I'd recommend updating the docs to reflect the requirement.
I already updated the wiki page after you made your first post.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

honestabelink
Manual Inserter
Manual Inserter
Posts: 4
Joined: Thu Mar 28, 2019 8:23 am
Contact:

Re: Adding an Empty 'fluid_boxes' key resolves non-rotating Assembling Machines

Post by honestabelink »

Thanks @Bilka, I was unaware :)

We have a workaround so it's not a big issue. Though I am a little curious how empty fluid_boxes key are handled internally. But all good here.

Great work you guys :)
Have a nice day

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

Re: Adding an Empty 'fluid_boxes' key resolves non-rotating Assembling Machines

Post by Rseding91 »

honestabelink wrote:
Thu Mar 28, 2019 12:14 pm
Thanks for the speedy response @Rseding91 :)
Assembling machines don't use direction if they don't have fluid connections
Is there a reason it was designed this way?
Assembling machines are designed to be symmetrical so if they don't have fluid inputs there's no mechanical difference in directions. So, the game just doesn't accept any direction except north for assembling machines without fluidboxes.
If you want to get ahold of me I'm almost always on Discord.

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

Re: Adding an Empty 'fluid_boxes' key resolves non-rotating Assembling Machines

Post by Bilka »

In the next version, a crafting machine with an empty fluid_boxes key will no longer be rotatable. Thank you for the report.
I'm an admin over at https://wiki.factorio.com. Feel free to contact me if there's anything wrong (or right) with it.

honestabelink
Manual Inserter
Manual Inserter
Posts: 4
Joined: Thu Mar 28, 2019 8:23 am
Contact:

Re: Adding an Empty 'fluid_boxes' key resolves non-rotating Assembling Machines

Post by honestabelink »

@Rseding91 Thanks for the info. It's a really good point about the mechanical side of things. My only counter would be that aesthetically some asymmetric visual designs would benefit from being able to rotate. But I couldn't agree more, visually something largely asymmetric may imply directionality which is incorrect when it comes to loading items into assembling machines. That is more important.

I'll be rethinking my designs :)

@Bilka thanks for the update :)

hedgerc
Burner Inserter
Burner Inserter
Posts: 9
Joined: Sat Nov 11, 2017 5:33 pm
Contact:

Re: Adding an Empty 'fluid_boxes' key resolves non-rotating Assembling Machines

Post by hedgerc »

Not sure if this is related and may be a question for Angel but changing the recipie to a floatation device in Angel's rotates the device 180 degrees. This also happens with other fluid items in Angels. This is unexpected behaviour, of course. This means a blueprint I create (300 flotation devices) requires me to manually disconnect from fluid system (and thank you, thank you for blocking fluid mixing.) and then reconnect manually.


Note: just about to nudge 6000 hours on Factorio. 5902 and counting. You guys are wonderful.

Post Reply

Return to “Resolved Problems and Bugs”