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
|
/* 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() { ResetState(); }
void ResetState();
void Init(const std::string& modFileName);
/**
* 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;
std::string humanNameVersioned;
/**
* 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;
// Movement behaviour
bool allowDirectionalPathing; //< determines if ground speed going downhill != going uphill
bool allowAircraftToLeaveMap; //< determines if gunships are allowed to leave map boundaries
bool allowAircraftToHitGround; //< determines if aircraft (both types) can collide with terrain
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
bool allowUnitCollisionOverlap; //< determines if unit footprints are allowed to semi-overlap during collisions
bool allowSepAxisCollisionTest; //< determines if (ground-)units perform collision-testing via the SAT
bool allowGroundUnitGravity; //< determines if (ground-)units experience gravity during regular movement
bool allowHoverUnitStrafing; //< determines if (hover-)units carry their momentum sideways when turning
// 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 and gradual reclaim, 1 = Subtract HP and 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;
float unitExpMultiplier;
float unitExpPowerScale;
float unitExpHealthScale;
float unitExpReloadScale;
// Paralyze behaviour
/// time it takes for paralysis to decay by 100% in seconds
float paralyzeDeclineRate;
/// 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;
/// 0 = transported units cannot be manually or automatically targeted
int targetableTransportedUnits;
// 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;
/// miplevel to use for radar, sonar, seismic, jammer, ...
int radarMipLevel;
/// when underwater, units are not in LOS unless also in sonar
bool requireSonarUnderWater;
/// when unit->alwaysVisible is true, it is visible even when cloaked
bool alwaysVisibleOverridesCloaked;
/// ignore enemies when checking decloak if they are further than their spherical sight range
bool decloakRequiresLineOfSight;
/// should _all_ allyteams share the same jammermap
bool separateJammers;
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;
// PFS
/// which pathfinder system (NOP, DEFAULT/legacy, or QT) the mod will use
int pathFinderSystem;
float pfRawDistMult;
float pfUpdateRate;
bool allowTake;
};
extern CModInfo modInfo;
#endif // MOD_INFO_H
|