So I've been exploring the file trying to figure out how the animations and moving effects (Particle and Animation) work.
What I really need clarified is:
- How the external appearances variables are used
- How to use "runningLoop"
- How to parts sticking out of the original block (Like the sails, sails or the large propeller's exhaust)
Hi! I'm gonna start trying to answer your questions at a high level. Feel free to ask for further detail.
So each module has a basic appearance, which is an image or sequence of images from a spritesheet at the 16x16 tile level. It can also have additional external appearances, which are things like chimneys and sails sticking out. These are appearances plus a tile-level offset.
runningLoop is an audio loop that gets played while a module is running.
For an example, look at LARGE_PROPELLER. It has an appearance, which is a short animation of the internals of the propeller running. It's 2x3 tiles in size, same as the module size.
It then also has two external appearances.
The first one is the chimney, which is not animated. It has an offset of y = -2 because it's on top of the module. It's 2x2 in size.
The second is the propeller, which is animated. It has an offset of x = -1 and y = -1 because it's behind the module and is also taller than the basic size of the module. It's 1x4 in size.
The runningLoop specifies a sound effect. The effect can consist of multiple layers, though only one is used here. It can also have multiple variations, but again, there's just one sound, engine_1600. There's then some additional information for changing the pitch and volume of the sound depending on whether it's your propeller or the enemy's, and how fast it's going.
There is also something to specify which/when external appearances are animated, right? or is that just tied into when the module itself should animate?
With that propeller example, the propeller only spins when a ship is moving.
Although a suggestion I have is having the ability to "Override" when an animation is run.
So when the variable "AnimationCriteria" is unchanged the animation runs through the normal logic, but when changed it runs through the changed logic, e.g:
This means the ship must be off the ground, have coal and be running to animate.
This can be expanded to things like "contactingEnemyShip" or "noCoal".
(If this idea is added it should be only used when defining an animation's frames to stop overlap).
Actually I ran into an issue myself concerning death animations. It's not as much of an issue, considering the AI wont target defeated craft.
If I have a Monster with a custom death animation that can land, when it dies on the ground it dies as if it's in the air - because the death animation was designed that way. But not really a huge issue with my development.
Zarkonnen an example of the idea being used can be the issue above.
If this idea is used, Psyringe could make a death animation for the ground and use the criteria "notGrounded" for the air death animation and "isGrounded" for the ground death animation.
Warrant Officer
So I've been exploring the file trying to figure out how the animations and moving effects (Particle and Animation) work.
What I really need clarified is: - How the external appearances variables are used - How to use "runningLoop" - How to parts sticking out of the original block (Like the sails, sails or the large propeller's exhaust)
Aerial Emperor
Hi! I'm gonna start trying to answer your questions at a high level. Feel free to ask for further detail.
So each module has a basic appearance, which is an image or sequence of images from a spritesheet at the 16x16 tile level. It can also have additional external appearances, which are things like chimneys and sails sticking out. These are appearances plus a tile-level offset.
runningLoop is an audio loop that gets played while a module is running.
For an example, look at LARGE_PROPELLER. It has an appearance, which is a short animation of the internals of the propeller running. It's 2x3 tiles in size, same as the module size.
It then also has two external appearances.
The first one is the chimney, which is not animated. It has an offset of y = -2 because it's on top of the module. It's 2x2 in size.
The second is the propeller, which is animated. It has an offset of x = -1 and y = -1 because it's behind the module and is also taller than the basic size of the module. It's 1x4 in size.
The runningLoop specifies a sound effect. The effect can consist of multiple layers, though only one is used here. It can also have multiple variations, but again, there's just one sound, engine_1600. There's then some additional information for changing the pitch and volume of the sound depending on whether it's your propeller or the enemy's, and how fast it's going.
Air Lord, Engineering Corps
There is also something to specify which/when external appearances are animated, right? or is that just tied into when the module itself should animate?
With that propeller example, the propeller only spins when a ship is moving.
Warrant Officer
Thanks, Zarkonnen, but as Firebird11 said above, is there something that specifies when an animation should run?
Aerial Emperor
The animation runs if the module is active. Whether a module counts as active is a slightly convoluted piece of logic that goes like this:
If those conditions are met, the module is animated.
Warrant Officer
Ah, that makes sense.
Although a suggestion I have is having the ability to "Override" when an animation is run. So when the variable "AnimationCriteria" is unchanged the animation runs through the normal logic, but when changed it runs through the changed logic, e.g:
"AnimationCriteria": ["notGrounded", "hasCoal", "isRunning"]
This means the ship must be off the ground, have coal and be running to animate. This can be expanded to things like "contactingEnemyShip" or "noCoal". (If this idea is added it should be only used when defining an animation's frames to stop overlap).
Commodore
Actually I ran into an issue myself concerning death animations. It's not as much of an issue, considering the AI wont target defeated craft.
If I have a Monster with a custom death animation that can land, when it dies on the ground it dies as if it's in the air - because the death animation was designed that way. But not really a huge issue with my development.
Warrant Officer
Zarkonnen an example of the idea being used can be the issue above.
If this idea is used, Psyringe could make a death animation for the ground and use the criteria "notGrounded" for the air death animation and "isGrounded" for the ground death animation.
It is understandable if it's not do-able.