Limitations
Moderator: Moderators
Limitations
OLD *** Is this still limitated to 250 (or near that number) id's in TA:Spring? ***
NEW -> Is Sight range still limited to 400? I guess this wasn't in FAQ
NEW -> Is Sight range still limited to 400? I guess this wasn't in FAQ
Last edited by Rayden on 02 May 2005, 01:13, edited 1 time in total.
Direct from UnitDef.h
That should clear everything up. :D
btw, float has the range 3.4E +/- 38 (7 digits)
+/- 340,000,000,000,000,000,000,000,000,000,000,000,000
7 digits just means it's precision is that.
So pi would be 3.141592
an int, or int32 on most modern systems has the range:
├óÔé¼ÔÇ£2,147,483,648 to 2,147,483,647
an unsigned in takes all - values away giving you the range:
0 to 4,294,967,295
and a long, or int64 has the range:
├óÔé¼ÔÇ£9,223,372,036,854,775,808 to 9,223,372,036,854,775,807
and bool's are true/false
I would recommend the dev team move to __intXX for numbers so Dave can convert it more easily
Code: Select all
struct UnitDef
{
std::string name;
std::string humanName;
std::string filename;
bool loaded;
int id; //unique id for this type (type? -Buggi) of unit
unsigned int unitimage;
int aihint;
float metalUpkeep;
float energyUpkeep;
float metalMake; //metal will allways be created
float makesMetal; //metal created when unit is on & energy
float energyMake;
float metalCost;
float energyCost;
float buildTime;
float extractsMetal;
float extractRange;
float windGenerator;
float tidalGenerator;
float metalStorage;
float energyStorage;
float power;
float health;
unsigned int category;
float speed;
float turnRate;
int moveType;
bool upright;
float controlRadius;
float losRadius;
float airLosRadius;
float losHeight;
int radarRadius;
int sonarRadius;
int jammerRadius;
bool stealth;
float buildSpeed;
float buildDistance;
float mass;
float maxSlope;
float maxHeightDif; //maximum terraform height this building allows
float minWaterDepth;
float waterline;
float maxWaterDepth;
float armoredMultiple;
int armorType;
UnitModelDef model;
std::vector<std::string> sweapons;
std::vector<WeaponDef*> weapons;
std::map<int,std::string> buildOptions;
std::string type;
std::string tooltip;
std::string wreckName;
std::string deathExplosion;
std::string selfDExplosion;
int selfDCountdown;
bool canfly;
bool canmove;
bool canhover;
bool floater;
bool builder;
bool activateWhenBuilt;
bool onoffable;
//aircraft stuff
float wingDrag;
float wingAngle;
float drag;
float frontToSpeed;
float speedToFront;
float myGravity;
float maxBank;
float maxPitch;
float turnRadius;
float wantedHeight;
bool hoverAttack;
float maxAcc;
float maxDec;
float maxAileron;
float maxElevator;
float maxRudder;
MoveData* movedata;
unsigned char* yardmap; //Used for open ground blocking maps.
int xsize; //each size is 8 units
int ysize; //each size is 8 units
float loadingRadius; //for transports
int transportCapacity;
int transportSize;
bool canCloak; //if the unit can cloak
bool startCloaked; //if the units want to start out cloaked
float cloakCost; //energy cost per second to stay cloaked when stationary
float cloakCostMoving; //energy cost per second when moving
float decloakDistance; //if enemy unit come within this range decloaking is forced
bool canKamikaze; //self destruct if enemy come to close
float kamikazeDist;
bool targfac;
bool canDGun;
bool needGeo;
bool isFeature;
unsigned int noChaseCategory;
struct
{
GuiSound select;
GuiSound ok;
GuiSound arrived;
GuiSound build;
GuiSound repair;
GuiSound working;
GuiSound underattack;
GuiSound cant;
GuiSound activate;
GuiSound deactivate;
}sounds;
};
btw, float has the range 3.4E +/- 38 (7 digits)
+/- 340,000,000,000,000,000,000,000,000,000,000,000,000
7 digits just means it's precision is that.
So pi would be 3.141592
an int, or int32 on most modern systems has the range:
├óÔé¼ÔÇ£2,147,483,648 to 2,147,483,647
an unsigned in takes all - values away giving you the range:
0 to 4,294,967,295
and a long, or int64 has the range:
├óÔé¼ÔÇ£9,223,372,036,854,775,808 to 9,223,372,036,854,775,807
and bool's are true/false
I would recommend the dev team move to __intXX for numbers so Dave can convert it more easily
