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

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.

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.