BuildingTypes: Difference between revisions
m changed defaults of XAnimPowered to correct vaues (again, because i missed some) |
mNo edit summary |
||
Line 44: | Line 44: | ||
| {{Ini|Rules}} || Object's ID || {{f|WaterBound|link}} || boolean || 0 || | | {{Ini|Rules}} || Object's ID || {{f|WaterBound|link}} || boolean || 0 || | ||
|- | |- | ||
| {{Ini|Rules}} || Object's ID || {{f|Adjacent|link}} || | | {{Ini|Rules}} || Object's ID || {{f|Adjacent|link}} || int|| 3 || | ||
|- | |- | ||
| {{Ini|Rules}} || Object's ID || {{f|Capturable|link}} || boolean || 0 || | | {{Ini|Rules}} || Object's ID || {{f|Capturable|link}} || boolean || 0 || |
Latest revision as of 22:35, 15 August 2019
[BuildingTypes] in TS through YR defines an array of structures that exist in the game. Unlike most other object arrays in the game, this one's order is very important - AI Scripts can only attack a specific BuildingType via its index in this array. So, reordering it is not advised. However, there are several errors in the default array that really should be corrected by any modder. See next section.
Note that structures can be loaded into the game even without being in this list, if they are referenced by a tag that points to a BuildingType. For example, setting PrismType=ATESLA is enough to assure ATESLA will be loaded as a valid structure even without being in this array. However, this is not a good idea - such objects have no guaranteed load order, so you cannot be sure what index to address them by.
The corrected BuildingTypes arrays
Westwood messed up a lot of object arrays in the rules(md).ini. While this proved no problem for them, due to their map editor, which was built to parse the INIs the same way RA2 did, and was actually usable unlike FinalAlert, and their AI Editor, this can cause a lot of problems for modders that write all their scripts by hand.
I have previously posted the corrected Animations array for YR, and now I'm posting the corrected BuildingTypes arrays as well. When you write AI scripts, you can just use the exact number on the left of the building, no need to do funky +1 conversions (131072 in fact does affect the functionality, see ScriptActions#Building Indices).
See corrected BuildingTypes arrays for: Tiberian Sun, Red Alert 2, Yuri's Revenge
Applicable INI Flags
These tables show all INI flags applicable1 to BuildingTypes. The flags are grouped by the internal classes the flags are inherited from, and then listed in the order they are read in by the game. You can re-sort the rows by column values by clicking the arrow icons in the column headings. Each flag can be clicked to visit its page for detailed information.
Please note that this section is accurate only for Yuri's Revenge. All other C&C games use different sets of flags.
1 ↑ "Applicable" in this context means "read from the INI files". Certain flags listed here don't have any effect ingame , but they are read and in certain cases cause a crash if not present. Again, refer to each flag's individual page for detailed information.
INI File | Section | Key | Value Type | Default Value | Adds to list |
---|---|---|---|---|---|
Rules(md).ini | Object's ID | Name | string(48 symbols) | ID | |
Rules(md).ini | Object's ID | UIName | string(31 symbol) | "" |
INI File | Section | Key | Value Type | Default Value | Adds to list |
---|---|---|---|---|---|
Rules(md).ini | Object's ID | Image | string (31 symbol) | Object's ID | |
Rules(md).ini | Object's ID | AlphaImage | string (31 symbol) | "" | |
Rules(md).ini | Object's ID | CrushSound | Sound (128 symbols) | "" | |
Rules(md).ini | Object's ID | AmbientSound | Sound (128 symbols) | "" | |
Rules(md).ini | Object's ID | Crushable | boolean | 0 | |
Rules(md).ini | Object's ID | Bombable | boolean | 1 | |
Rules(md).ini | Object's ID | NoSpawnAlt | boolean | 0 | |
Rules(md).ini | Object's ID | AlternateArcticArt | boolean | 0 | |
Rules(md).ini | Object's ID | RadarInvisible | boolean | 0 | |
Rules(md).ini | Object's ID | Selectable | boolean | 1 | |
Rules(md).ini | Object's ID | LegalTarget | boolean | 1 | |
Rules(md).ini | Object's ID | Armor | Armor | 0 | |
Rules(md).ini | Object's ID | Strength | int | 0 | |
Rules(md).ini | Object's ID | Immune | boolean | 0 | |
Rules(md).ini | Object's ID | Insignificant | boolean | 0 | |
Rules(md).ini | Object's ID | HasRadialIndicator | boolean | 0 | |
Rules(md).ini | Object's ID | RadialColor | Color | 0,0,0 | |
Rules(md).ini | Object's ID | IgnoresFirestorm | boolean | 0 | |
Art(md).ini | Object's Image | UseLineTrail | boolean | 0 | |
Art(md).ini | Object's Image | LineTrailColor | Color | 0,0,0 | |
Art(md).ini | Object's Image | LineTrailColorDecrement | int | 16 | |
Art(md).ini | Object's Image | Theater | boolean | 0 | |
Art(md).ini | Object's Image | NewTheater | boolean | 0 | |
Art(md).ini | Object's Image | Voxel | boolean | 0 |