|
1 | 1 | Prototypes |
2 | 2 | ========== |
| 3 | +Prototypes are data definitions used for everything in the game. |
| 4 | +They are loaded with the map, and are immutable. |
| 5 | + |
| 6 | +Each prototype is identified by its id, which is a hash of its name (the full path in the source files). |
| 7 | + |
| 8 | +Resource Prototype |
| 9 | +------------------ |
| 10 | +Defines properties of a resource - aka a crate/pallet/barrel that would exist in the world. |
| 11 | + |
| 12 | +Recipe Prototype |
| 13 | +---------------- |
| 14 | +Defines a transformation of resources, units, and upgrades. |
| 15 | +It contains amounts and ids of inputs and outputs. |
| 16 | +Also defines the duration of the recipe. |
| 17 | +Recipes are processed in buildings/units. |
| 18 | + |
| 19 | +Some recipes have a *place-over* requirement, which is an id of a unit, that the building must be placed on, in order for the recipe to be available. |
| 20 | + |
| 21 | +Construction Prototype |
| 22 | +---------------------- |
| 23 | +Constructions are similar to recipes, but are manually placed into the world by the player. |
| 24 | +It contains amounts of input resources, and has exactly one output unit/building. |
| 25 | + |
| 26 | +Unit Prototype |
| 27 | +-------------- |
| 28 | +Both buildings and units are treated as units in the game. |
| 29 | +Some neutral objects, such as trees, rocks, ore deposits, etc. are all also units. |
| 30 | + |
| 31 | +The prototype contains combat related properties, movement (speeds), building radius, a list of available recipes, and a list of applicable upgrades. |
| 32 | +Additionally, there are several boolean properties, which modify behavior or requirements of the unit/building. |
| 33 | + |
| 34 | +Upgrade Prototype |
| 35 | +----------------- |
| 36 | +Upgrades improve combat or economy of specified units/buildings of the same player. |
| 37 | +The upgrade itself defines the improvements that it will apply, and units have a list of upgrades that may be applied to them. |
| 38 | + |
| 39 | +The upgrades are temporary, and will disappear after specified duration. |
| 40 | +Multiple same upgrades stack together, up to a specified limit. |
| 41 | + |
| 42 | +Race Prototype |
| 43 | +-------------- |
| 44 | +Each player selects one race that they play as. |
| 45 | +The race defines their starting resources and units, and a list of available constructions. |
| 46 | + |
| 47 | +Note that neither resources, recipes, units, or upgrades are inherently associated with any particular race. |
| 48 | +There are no restrictions on units that the player may control, if they get hold of them. |
| 49 | + |
| 50 | +Tags |
| 51 | +---- |
| 52 | +All prototypes may have associated some tags with them. |
| 53 | +Tags are short strings (mapped to unique ids), that are provided by the game/map/mods to help programs understand the nuances of that particular prototype. |
| 54 | +Tags are *not* used by the game, except by the built-in AI/bot, which uses tags to alter behavior of some units. |
| 55 | +Tags may be used by both Bots and Scripts. |
0 commit comments