1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175
|
/* This file is part of the Spring engine (GPL v2 or later), see LICENSE.html */
#ifndef MOD_INFO_H
#define MOD_INFO_H
#include <string>
#include "Sim/Path/PFSTypes.h"
class CModInfo
{
public:
CModInfo()
: allowTeamColors(true)
, allowAircraftToLeaveMap(true)
, allowPushingEnemyUnits(false)
, allowCrushingAlliedUnits(false)
, allowUnitCollisionDamage(false)
, constructionDecay(true)
, constructionDecayTime(1000)
, constructionDecaySpeed(1.0f)
, multiReclaim(1)
, reclaimMethod(1)
, reclaimUnitMethod(1)
, reclaimUnitEnergyCostFactor(0.0f)
, reclaimUnitEfficiency(1.0f)
, reclaimFeatureEnergyCostFactor(0.0f)
, reclaimAllowEnemies(true)
, reclaimAllowAllies(true)
, repairEnergyCostFactor(0.0f)
, resurrectEnergyCostFactor(0.5f)
, captureEnergyCostFactor(0.0f)
, paralyzeOnMaxHealth(true)
, transportGround(1)
, transportHover(0)
, transportShip(0)
, transportAir(0)
, fireAtKilled(1)
, fireAtCrashing(1)
, flankingBonusModeDefault(0)
, losMipLevel(0)
, airMipLevel(0)
, losMul(1.0f)
, airLosMul(1.0f)
, requireSonarUnderWater(true)
, featureVisibility(FEATURELOS_NONE)
, luaThreadingModel(2)
, pathFinderSystem(PFS_TYPE_DEFAULT)
{}
void Init(const char* modArchive);
/**
* The archive file name.
* examples: "Supreme Annihilation U32 V1.0.sdz", "BA704.sd7", "133855d253e657e9406122f346cfe8f1.sdp"
*/
std::string filename;
/**
* The human readable name (including version).
* The lower-case version of this is used for dependency checking.
* examples: "Supreme Annihilation U32 V1.0", "Balanced Annihilation V7.04", "Balanced Annihilation V7.11"
*/
std::string humanName;
/**
* The short name (not including version).
* examples: "SA", "BA", "BA"
*/
std::string shortName;
/**
* The version
* examples: "U32 V1.0", "7.04", "7.11"
*/
std::string version;
std::string mutator;
std::string description;
bool allowTeamColors;
// Movement behaviour
bool allowAircraftToLeaveMap; // determines if gunships are allowed to leave map boundaries
bool allowPushingEnemyUnits; // determines if enemy (ground-)units can be pushed during collisions
bool allowCrushingAlliedUnits; // determines if allied (ground-)units can be crushed during collisions
bool allowUnitCollisionDamage; // determines if units take damage from (skidding) collisions
// Build behaviour
/// Should constructions without builders decay?
bool constructionDecay;
/// How long until they start decaying?
int constructionDecayTime;
/// How fast do they decay?
float constructionDecaySpeed;
// Reclaim behaviour
/// 0 = 1 reclaimer per feature max, otherwise unlimited
int multiReclaim;
/// 0 = gradual reclaim, 1 = all reclaimed at end, otherwise reclaim in reclaimMethod chunks
int reclaimMethod;
/// 0 = Revert to wireframe, gradual reclaim, 1 = Subtract HP, give full metal at end, default 1
int reclaimUnitMethod;
/// How much energy should reclaiming a unit cost, default 0.0
float reclaimUnitEnergyCostFactor;
/// How much metal should reclaim return, default 1.0
float reclaimUnitEfficiency;
/// How much should energy should reclaiming a feature cost, default 0.0
float reclaimFeatureEnergyCostFactor;
/// Allow reclaiming enemies? default true
bool reclaimAllowEnemies;
/// Allow reclaiming allies? default true
bool reclaimAllowAllies;
// Repair behaviour
/// How much should energy should repair cost, default 0.0
float repairEnergyCostFactor;
// Resurrect behaviour
/// How much should energy should resurrect cost, default 0.5
float resurrectEnergyCostFactor;
// Capture behaviour
/// How much should energy should capture cost, default 0.0
float captureEnergyCostFactor;
// Paralyze behaviour
/// paralyze unit depending on maxHealth? if not depending on current health, default true
bool paralyzeOnMaxHealth;
// Transportation behaviour
/// 0 = all ground units cannot be transported, 1 = all ground units can be transported (mass and size restrictions still apply). Defaults to 1.
int transportGround;
/// 0 = all hover units cannot be transported, 1 = all hover units can be transported (mass and size restrictions still apply). Defaults to 0.
int transportHover;
/// 0 = all naval units cannot be transported, 1 = all naval units can be transported (mass and size restrictions still apply). Defaults to 0.
int transportShip;
/// 0 = all air units cannot be transported, 1 = all air units can be transported (mass and size restrictions still apply). Defaults to 0.
int transportAir;
// Fire-on-dying-units behaviour
/// 1 = units fire at enemies running Killed() script, 0 = units ignore such enemies
int fireAtKilled;
/// 1 = units fire at crashing aircrafts, 0 = units ignore crashing aircrafts
int fireAtCrashing;
/// 0=no flanking bonus; 1=global coords, mobile; 2=unit coords, mobile; 3=unit coords, locked
int flankingBonusModeDefault;
// Sensor behaviour
/// miplevel for los
int losMipLevel;
/// miplevel to use for airlos
int airMipLevel;
/// units sightdistance will be multiplied with this, for testing purposes
float losMul;
/// units airsightdistance will be multiplied with this, for testing purposes
float airLosMul;
/// when underwater, units are not in LOS unless also in sonar
bool requireSonarUnderWater;
enum {
FEATURELOS_NONE = 0, FEATURELOS_GAIAONLY, FEATURELOS_GAIAALLIED, FEATURELOS_ALL,
};
/// feature visibility style: 0 - no LOS for features, 1 - gaia features visible
/// 2 - gaia/allied features visible, 3 - all features visible
int featureVisibility;
// Lua threading model: Controls which Lua MT optimizations the mod will use by default (see LuaConfig.h for details)
int luaThreadingModel;
// which pathfinder system (DEFAULT/legacy or QTPFS) the mod will use
int pathFinderSystem;
};
extern CModInfo modInfo;
#endif // MOD_INFO_H
|