Animations
Author(s): MrHam88.
This page summarises the main types of animations present in Generation IV Nintendo DS Pokémon games that are relevant for ROM hacking mapping purposes.
Animation Types
As outlined in the summary page here, there are five types of possible animations that can be used in the Generation IV Nintendo DS Pokémon games. This page will provide more context and detail around the first three types:
- Geometry SRT
- Texture SRT
- Texture Patterns
Geometry Scale Rotate Translate (SRT)
These are skeletal animations, where parts of 3D models are moving relative to others (a good example from HGSS are the windmills in New Bark Town). They are also used in other non-mapping animations (such as the Lugia/Ho-oh model on the start game screen of SoulSilver and HeartGold respectively).
This animation data is held in .nsbca
(Nitro System Binary Character Animation) files relevant to Buildings.
These animations are intrinsically linked to the model (e.g. building) that they are animating. Best practice is to configure these using a 3D modelling tool such as Blender, which can be used for the model and the animation. It is worth noting that different versions of the NNS Blender plugin are recommended for buildings (with one 'bone' per object) as opposed to complex animations such as the start game screen legendary Pokémon (which may require multiple 'bones' per object).
The following are some video tutorials that provide further context and instructions on the correct use of Geometry SRT animations:
- How to make Animated Buildings for Pokemon DS games
- Creating custom title screen with bone animations in Pokemon Platinum
Texture Scale Rotate Translate (SRT)
These are UV map animations, where the UV map position is essentially moved across the faces/polygons it is applied to (a good example from HGSS are the river and pond surfaces).
This animation data is held in .nsbta
(Nitro System Binary Texture Animation) files relevant to maps (via global .nsbta
files used in every areadata) and buildings (individual .nsbta
files).
These animations are linked to a 'positioned' (HGSS) material in the map .nsbtx
(for global .nsbta
), or to a named material in the buildings. Custom .nsbta
animations can be designed and created using 3D modelling tools such as Blender, and it is also possible to edit an existing .nsbta
file using CTRMap (usually not a tool used in Generation IV mapping: see Generation V Getting Started Wiki page for details).
New global .nsbta
can be added, replaced or deleted to the ROM using the Building Editor in PDSMS, on the "Area Data Editor" tab. They can also be assigned to specific Areadata here, or in DSPRE. To assign "no animations" to an areadata in DSPRE, use an ID of 65535
.
HGSS uses global
.nsbta
, DPPt does not, and.nsbta
are only used in these games for buildings.
The following are some video tutorials that provide further context and instructions on the correct use of Texture SRT animations:
Global NSBTA in HGSS
Specifically in HGSS, texture SRT animations that apply to map elements (not buildings), are determined by the order of animations in the global .nsbta
file associated to the areadata in use, and the order of the materials in the map files (.nsbmd
).
There are two global .nsbta
in the vanilla HGSS, and it is also possible to assign an invalid global .nsbta
(using an ID of 65535
) to remove all Texture SRT animations from that Header and associated maps.
- Global NSBTA 0 (typically used for most external map locations)
- Global NSBTA 1 (typically used for some, but not all, internal cave locations)
Typically urban interiors (houses, shops etc.) have the global
.nsbta
set to an invalid value to disable them.
When creating custom maps (and therefore) custom .nsbmd
files in PDSMS, it is important to align the materials order with the global .nsbta
to be used.
This can be achieved by ordering the materials in PDSMS's Materials Editor so that the top 'x' match the order and quantity in the global .nsbta
. The Always include in IMD
checkbox in the Materials Editor is uised to ensure that these specific materials are always present in the .imd
(the file that is then used to define values in the .nsbmd
), even if they materials are not used in the map. This, and the actual order of the materials is crucial for avoiding animation errors in HGSS.
Importantly for HGSS, the names of the materials don't matter at all, only the position.
When using vanilla Global NSBTA 0, the following order of materials should be used:
- S-shaped top right to bottom left, then top left to bottom right movement
- Up-and-down small movement (slightly vertically offset)
- Right-to-left movement
- Up-and-down small movement
- Diagonal bottom left movement to top right
- Diagonal top right to bottom left movement
- Same as position 1
- Same as position 3
When using vanilla Global NSBTA 1, the following order of materials should be used:
- S-shaped top right to bottom left, then top left to bottom right movement
- Right-to-left movement
- Up-and-down small movement
- Diagonal bottom left movement to top right
- Diagonal top right to bottom left movement
When using a custom global .nsbta
, the order should match that in the custom .nsbta
configuration.
Texture Patterns
These are "flipbook" or sequence animations, where a series of image textures are displayed in sequence, where the relative time any given image texture is visible can vary (an example of this from HGSS are the red and white flowers placed on many grass areas).
This animation data is held in .nsbtp
(Nitro System Binary Texture Pattern) files relevant to Buildings, and a .bin
file relevant to maps.
The process for creating a texture pattern varies slightly where the intended use is for a map element/tile or a building. The below tutorials provide the methods for both.
The following are some tutorials that provide further context and instructions on the correct use of Texture Pattern animations:
Fixing Texture Pattern Palettes when using Custom NSBTX
Since texture pattern animations use a series of textures (not just the first one that's used in a tile in PDSMS), the palette used by the full range of images in the pattern will likely have more colours. These means that if a custom .nsbtx
is created with one of the named textures that uses pattern animations, the palette from the custom .nsbta
will result in incorrect colours being displayed when the animation play.
Therefore it is advisible to selectively take the palette from these specific materials from a vanilla .nsbtx
file and replace the custom .nsbtx
entries of the same name. This replacing of textures and/or palettes can be achieved using the PDSMS NSBTX Editor to open the .nsbtx
and then import the "good" textures and palettes from an exported vanilla .nsbtx
, delete the original and re-save the .nsbtx
file.
In HGSS there are nine Pattern Animations in the mapping bin file. These relate specifically to the following materials, if these are used on a custom map, they should be replaced with vanilla texture/palettes:
- sea_on
- swave_p
- swave_un
- sea_rock
- sea_rock_m
- flower01
- flower02
- dsea_on
- r_sea_rock
Textures 1-7 are commonly found in the main overworld in HGSS, Textures 1, 4-5, 8-9 are used in some caves.