| |
RA2/YR Structures: What are they?
by MooMan65. Published: 2/15/03. Last update: 3/10/03.
This tutorial describes the basic use of structures in the game, what the formatting of the files are that they use, and
most importantly, how to add them into your own game so you can use them. The INI code which supports these new structures
is not included here, and is beyond the scope of this article.
Structures
are anything in the game that can be built from
the Buildings or Armory
tabs from the sidebar (as well as the many unbuildable
structures in-game like civilian buildings). They are always stationary
images which make up your base and most maps with an urban
setting. Each structure
usually has a specific purpose in the game
whether it be to construct units, provide power, protect your
base or simply to establish the appropriate atmosphere in a
map. The classifications
'structure' also covered overlay-based structures
like Walls and Pavement, they behave differently
in-game, but still have the basic ground rules
for every other structure.
The
standard file format used by structures is the
almighty .SHP file. These are kind of like
archived of one or multiple .PCX images (not
compressed) contined within the one file. This is
very useful as, being a 2D game, Red Alert
2/Yuri's Revenge use a lot of standard images.
Structures can also use .VXL (or Voxel) and .HVA
files also, they are used for structures with
turrets like the Sentry Gun. Voxel files were
introduced in Tiberian Sun to somewhat add a
crude 3D element into a standard 2D game.
Structures
usually use a standard naming configuration for
its .SHP files to make it both easy on modder and
player. If you have downloaded any structures now
and looked at their files you should see what
looks like at first glace a bunch of random
letters making up the name. Well actually there
is a reason why it's laid out like that. Here's
some examples below:
GACNST.SHP
NAMISL_A.SHP
YAPOWRMK.SHP
Let's
color-code it so it's split up into the
categories that mean something, the first three
color codes are required by all filenames, but
some files also contain certain things after the
third colour:
GACNST??.SHP
- G - This first
letter tells you which side the structure
is available to. You have a choice
between:
G- Allies
N - Soviets
Y - Yuri
C - Civilian
Note: G
and N are named the way they are from GDI
and Nod from Tiberian Sun when they first
introduced this naming convention,
Westwood Pacific (later became EA
Pacific), did not bother to remove those
two and kept them for when they modified
the Tiberian Sun engine into Red Alert 2.
- A - The second
letter tells you what theater the .SHP
file should be displayed in. By theater I
mean the climate of the map you are
playing, whether it be Temperate, Snow, Desert etc. The possible letters are below:
G
- Default*
T - Temperate
A - Snow (Artic)
U - Urban
The
following are for Yuri's Revenge only:
D - Desert
N - NewUrban
L - Lunar
*Default is used whenever a
specific theater file is not found for
the map. So for example if a structure
includes GG and GA groups of images, it
will use the GA ones specifically on Snow
maps, and GG everywhere else since there
are no specific images for them. Usually
those two are the only types of theater
names you need, as there normally is no
difference in building appearance for the
rest of the theaters (saves space as well
on your Hard Drive). However some
structures, especially civilian and tech
buildings, leave rubble behind which that
image is specific to the theater, and so
you need all theater names covered.
- CNST - The last
critical part of the filename is usually
a four letter code that tells you what
structure it is. This code is also used
for the ARTMD.INI entry to tell the game
that this entry are for these group of
images. CNST in this case stands for
Construction Yard. So from the current
information we know that this file
contains the Snow images for the Allied
Construction Yard!
- ?? - On some files
as part of the structure package there
are certain suffix's after the main code.
While we know those three terms above
will give you the structure information
for every theater in the game, there
still are other files involved in
structures such as animations, bibs and
buildups. This suffix tells you and the
game what the file is used for, and then
should be called in the ARTMD.INI file
for that structure for it to be used
in-game. The list of possible suffix's
are below:
_?
- Animations (the ? can be a latter
usually from A to E but there are special
cases which you can look for yourself.)
MK - Buildup (this is reserved for the
buildup animation of the structure when
it is placed down on the map.)
BB - Bib (some structures use bibs
so parts of the structure are considered
flat and can be moved across by units.
This includes the Service Depot's Pad and
Airforce Command HQ's pads.)
Of course these are simply the naming
criteria used in the majority by
Westwood/EA. You can actually do whatever
suffix's you want, as long as you call
them properly through the ARTMD.INI file.
I tell you this as it's much easier for
everyone to continue the trend. All my
structure downloads here on MODDEN use
this system, and most other people do to.
I
said before that .SHP files are a collection of
one or multiple .PCX files, so why multiple?
Well, each .SHP file contains all the images
needed for a specific purpose, such as an
animation. Think of .SHP's as animated .GIF
files, although the game is sophisticated enough
to know when the .SHP file should be looping on
simply to display one of the images contained in
the .SHP on the screen. Overall there are three
kinds of .SHP files relating to structures.
- Animations:
Animation .SHP's are like animated
.GIF's, they contain multiple images
that, when looping, it looks like part of
the structure is doing its 'stuff'. The
ARTMD.INI file tells the game what image
range to use inside the animation file
for a specific animation of the
structure. Meaning multiple animations
can be read from the same .SHP file. This
is most commonly done when the structure
is at half health (the building becomes
damaged). Usually an animation .SHP
contains the images needed for the
non-damages state of the structure,
followed by the half-damaged, and finally
the shadow frames for both sets of
animations. The ARTMD.INI then tells the
game which range of frames to use. eg.
Animation A has 100 images inside it, 50
of those imags are shadows and 50 are the
animation itself. 25 out of the first 50
are for the non-damaged animation, the
next 25 for the damaged animation, the
following 25 are the shadows for the
non-damaged animation, and the last 25
are shadows for the damaged animation.
Shadows are called for automatically from
the game, so the first 25 frames will
automatically use the first 25 frames of
shadows if you tell the game that the
specific animation has shadows.
- Object:
Next are object .SHP files. These include
normal structure images and bibs. Object
files only tell the game to display one
frame of itself at a certain point in
time, it is not meant to be an animation.
Again there is an order to which the
frames should be in so the game displays
the correct image at the right time.
Frame
1 - Normal Image (this image is displayed
as the standard non-damages structure
image when you first build it.)
Frame 2 - Damages Image (contains the
image of the same structure when damaged
at half strength.)
Frame 3* - Garrison
Image
(Frame 3 is used for when the structure
is garrisoned by infantry units. However
for structures that don't normally allow
garrisonning, like player structures,
usually have a duplicated Frame 2 in this
frame.)
Frame 4** -
Debris Image (If the structure is
designed to leave behind debris this is
the frame that the graphics go in.
Structures that don't leave debris omit
this frame entirely.)
Finally, the last 3 or 4 frames
(depending on if you have a Frame 4 or
not) contains the shadows for each stage.
Frame 1 uses the first shadow image while
Frame 2 uses the second and so forth.
*Bib object images do not
contain this frame at all.
**You should notice that the
debris frame is usually a mess of strange
colours, that is because the image is in
a different palette to the standard
structure one. It is in the palette of
the specific theater, hence why
structures with debris need every single
theater file called for, and not simply
to use the global G one.
- Overlay:
Finally we have Overlay .SHP's, which
include Walls. Since Pavement does not
exist in RA2/YR I will only cover walls
in this section. There actually are not
too many third-party downloads of extra
overlay .SHP's so you may not have to
deal with these much. Overlay files are
somewhat a mixture between the two above,
it contains multiple images like the
Animation, but only displaying one
normally like an Object. The best way to
look at these is to use examine an
existing wall .SHP image. It contains
images for every possible corner and
straight piece for it as well as damages
and shadow frames as normal. Overlays are
a bit tricky to add, since they involve ToOverlay= art logic, so I won't be
covering them with this tutorial.
You
should now be completly familiar with the layout
and reasons behind what structures are and what
files and graphics make them what they are. I'm
sure advanced modders knew all about this from
the beginning, but basic tutorials are that get
new modders to work hard.
| |