Goto http://www.stucuk.netGoto http://www.atlanticaonlinewiki.comGoto http://www.game-requirements.com

Ground Animations

From Original War Support Wiki

Jump to: navigation, search

Tutorials -> Ground Animations

Intro

Ground animations allow you to run a sequence of pictures in your map to e.g. animate a waterfall - kinda like a "local movie". Note that the map must have a GBI for ground animations to display.


Waterfall from the first American mission

Step by step

Create your pictures and be sure to save them as bitmap pictures (.bmp) in 256-colors (8-bit depth). It's very important that the pictures use the same color palette as the image used to make the GBI - else the colors will be misinterpreted by the map.
A color palette converter has been created to make this step easy. See http://forum.stucuk.net/viewtopic.php?f=18&t=2430

Name the first picture something like am02_out0000, the next am02_out0001 and so on. the "_out0000" part is important since it tells in what order the pictures should be displayed. The pictures should all be of the same size (pixel) (it is not yet documented if it is necessary).

Place them in a folder called "GroundAnim" in your mod.

If your map doesn't have a GBI, make it now (see Grndsec).

Open your map and enter the "Map Preferences". Hit the "Ground Animations" tab.



Press the "new" button. A "0" will appear in the list. Mark it and press the "B" button. Browse for the first picture in your "movie" series (the one ending with "_out0000"). Do NOT write in the path yourself - for some reason it screws up.

When you import the pictures the values in the three boxes change. "X" and "Y" change according to the size of the pictures - they are the pictures's position measured in pixels ([0,0] is top left corner). The third value is the number of pictures in the "movie" - if you have named your pictures as described above this should set itself correctly automatically.

Press "Accept" (the first image in the series should display on the map) and remember to save your map.

Now comes the tedious part. Change the X and Y numbers to move the picture in the right position.

Troubleshooting

The image appears with weird colors.
The picture must be saved as (.bmp) in 256-colors (8-bit depth) and must use the same color palette as the image used to make the GBI. Note that most programs (like Windows Paint) tends to convert bitmaps pictures to 24-bit (even if you just copy-paste!) which will make the color palette different when saving back to 8-bit.

After having played with ground animations, when I try to load the map or when I'm interacting with somwthing, I get an error.
Ground animations can screw up a map if they aren't handled with care. Locate your mission's folder and click the map.txt file. In the first section "MAP_DEFINITIONS" you may find something like

ANIMGROUND 1
END_OF_ANIMGROUND

The integer after "ANIMGROUND" tells that the map expects 1 ground animation to be defined but none is defined between the two blocks. Delete the lines and save the file. Locate map.bin in the mission's folder and delete it too (if you start the map and map.txt and map.bin don't agree with each other, map.bin copies its contend to map.txt thus reseting our changes).
Open your map (which should be possible now if ground animations caused the problem). Upon loading the map you will receive a warning that map.bin doesn't exist and you should save your map immediately. Do so.

Personal tools
Clanbase