[2.0.47] Character animations "flying" and "flying_with_gun" not playing or overriding "landing" and "take_off"
Posted: Wed May 07, 2025 7:11 pm
Hello!
I was making a silly little character skin mod when I stumbled upon issues with the "flying" and "flying_with_gun" character animations.
I have attached two videos and the log file.
----
"What did you do?"
I have set all possible animations listed in the doc (lua-api.factorio.com - 2.0.47) for the prototype "CharacterArmorAnimation", minus "flying" and "flying_with_gun". (10 out of the 12 animations)
Then I have animated -> generated a set of spritesheets for "flying" and integrated it with lua.
I haven't done anything for "flying_with_gun" yet.
Then I launched the game to test it in my testing save file. Once with ["flying_with_gun"] = nil; and once with ["flying_with_gun"] = ["running_with_gun"].
"What happened?"
Two things:
When "flying_with_gun" is nil: "flying" never plays. "idle_in_air" plays instead. No errors whatsoever.
When "flying_with_gun" is set: "flying" plays. But they ("flying" and "flying_with_gun") replace both the "take_off" and "landing" animations.
"What did you expect to happen instead?"
I was expecting "flying" to play even though "flying_with_gun" is not set. And when "flying" or "flying_with_gun" do play, I was expecting "take_off" and "landing" to have priority over them.
"Does it happen always, once, or sometimes?"
So far, given the context and conditions, always.
----
Video "nil.mp4".
"flying_with_gun" is set to nil. "flying" doesn't play. Everything else works.
Video "running_with_gun.mp4".
"flying_with_gun" is set to "running_with_gun". "flying" plays, but both "flying" animations override "take_off" and "landing".
(The only reason I have set "flying_with_gun" to "running_with_gun" is because it's the only legal animation I can set it to with my current sheets, really)
I was making a silly little character skin mod when I stumbled upon issues with the "flying" and "flying_with_gun" character animations.
I have attached two videos and the log file.
----
"What did you do?"
I have set all possible animations listed in the doc (lua-api.factorio.com - 2.0.47) for the prototype "CharacterArmorAnimation", minus "flying" and "flying_with_gun". (10 out of the 12 animations)
Then I have animated -> generated a set of spritesheets for "flying" and integrated it with lua.
I haven't done anything for "flying_with_gun" yet.
Then I launched the game to test it in my testing save file. Once with ["flying_with_gun"] = nil; and once with ["flying_with_gun"] = ["running_with_gun"].
"What happened?"
Two things:
When "flying_with_gun" is nil: "flying" never plays. "idle_in_air" plays instead. No errors whatsoever.
When "flying_with_gun" is set: "flying" plays. But they ("flying" and "flying_with_gun") replace both the "take_off" and "landing" animations.
"What did you expect to happen instead?"
I was expecting "flying" to play even though "flying_with_gun" is not set. And when "flying" or "flying_with_gun" do play, I was expecting "take_off" and "landing" to have priority over them.
"Does it happen always, once, or sometimes?"
So far, given the context and conditions, always.
----
Video "nil.mp4".
"flying_with_gun" is set to nil. "flying" doesn't play. Everything else works.
Video "running_with_gun.mp4".
"flying_with_gun" is set to "running_with_gun". "flying" plays, but both "flying" animations override "take_off" and "landing".
(The only reason I have set "flying_with_gun" to "running_with_gun" is because it's the only legal animation I can set it to with my current sheets, really)