home *** CD-ROM | disk | FTP | other *** search
/ Hráč 1998 February / Hrac_18_1998-02_cd.bin / DEMA / BZone / bzondemo.exe / data / addon / aipdef.h next >
C/C++ Source or Header  |  1998-01-19  |  4KB  |  99 lines

  1. ///////////////////////////////////////////////////////////////////////////////
  2. // UCP Data Structure
  3. // -------------------
  4. // Default Unit Construction Program Definition.
  5. // When no other task demands a Construction Program, build according
  6. // to this program.
  7. struct UNIT_CONSTRUCTION_PROGRAM
  8. {
  9.     char account_name[80];                // The names of the budgetary accounts
  10.     int budget;                                        // How much money gets fed into account
  11.   int max_reserve;
  12. };
  13.  
  14. #define UNLIMITED -1
  15.  
  16. #define MAX_UCP_LENGTH 20
  17.  
  18. ///////////////////////////////////////////////////////////////////////////////
  19. // ACCOUNT Data Structure
  20. // -------------------
  21. // Default Unit Construction Program Definition.
  22. // When no other task demands a Construction Program, build according
  23. // to this program.
  24. struct ACCOUNT
  25. {
  26.     int priority;                                    // What level of priority does this element have
  27.     char item_name[80];                        // What sort of thing should we buy/build?
  28.     int build_type;                                // Do we want fixed amounts, ratios, or what?
  29.     int build_amount;                            // How much of something (or what ratio) do we want.
  30. };
  31.  
  32. #define NUMBER_TO_HAVE 0
  33. #define NUMBER_TO_BUILD 1
  34. #define RATIO_TO_BUILD 2
  35. #define RATIO_TO_HAVE 3
  36.  
  37. #define MAX_ACCOUNT_LENGTH 50
  38.  
  39.  
  40. ///////////////////////////////////////////////////////////////////////////////
  41. // Force Matching Data Structure
  42. // -------------------
  43. // Unit Force matching modification definition.
  44. // All units in the game have a calculated unit strength which is roughly
  45. // (Damage_Dealt * Hitpoints)/Rate_of_fire (there is a minimum strength, too)
  46. // this allows the designer to assign coefficients to the strengths of particular
  47. // units (such as "Tachyon Tank" 2.0, which would double the apparent strength).
  48. struct FORCE_MATCHING
  49. {
  50.     char unit_name[80];                // The name of the unit type
  51.   float multiplier;         // How much by which to multiply its strength
  52. };
  53.  
  54. #define MAX_FORCE_MATCHING 100
  55.  
  56.  
  57.  
  58. ///////////////////////////////////////////////////////////////////////////////
  59. // Unit Match-up Data Structure
  60. // -------------------
  61. // Unit Force matching modification definition.
  62. // All units in the game have a calculated unit strength which is roughly
  63. // (Damage_Dealt * Hitpoints)/Rate_of_fire (there is a minimum strength, too)
  64. // this allows the designer to assign coefficients to the strengths of particular
  65. // units (such as "Tachyon Tank" 2.0, which would double the apparent strength).
  66. struct MATCH_UPS
  67. {
  68.     char unit_name[80];                // The name of the unit type we may see
  69.     char match_up_name[80];      // The sort of unit to build to match this
  70. };
  71.  
  72. #define MAX_MATCH_UPS 100
  73.  
  74.  
  75.  
  76. /////////////////////////////////////////////////////////////////////////////
  77. // BUILDING MATCHING
  78. // --------------
  79. // Which buildings do we want to emphasize & target with this aip?
  80. // Note that this can be used for BOTH the AI team's unit strengths and
  81. // the opponents'
  82. // Where would we want to build the buildings if we could build them?
  83. /////////////////////////////////////////////////////////////////////////////
  84. struct BUILDING_MATCHING
  85. {
  86.     char unit_name[80];                // The name of the unit type
  87.   float multiplier;         // How much by which to multiply its strength
  88.   int  build_pos;         // How much by which to multiply its strength
  89. };
  90.  
  91. #define MAX_BUILDINGS 100
  92.  
  93. #define DONT_CARE 0
  94. #define CENTER_OF_BASE 1
  95. #define PERIMETER 2
  96. #define OUTSIDE_OF_BASE 3
  97. #define NEAR_ENEMY_BASE 4
  98. #define NEAR_ENEMY_TROOPS 5
  99.