Limitations

Limitations

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

Post Reply
User avatar
Rayden
Posts: 377
Joined: 01 May 2005, 13:15

Limitations

Post by Rayden »

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
Last edited by Rayden on 02 May 2005, 01:13, edited 1 time in total.
User avatar
Dragon45
Posts: 2883
Joined: 16 Aug 2004, 04:36

Post by Dragon45 »

User avatar
Buggi
Posts: 875
Joined: 29 Apr 2005, 07:46

Post by Buggi »

Well, not unlimited. They're stored as int's which means just over 2 billion of each.

:shock:
Torrasque
Posts: 1022
Joined: 05 Oct 2004, 23:55

Post by Torrasque »

YEah, please, update the code to have unsigned int. I can't continue my mod with this limitation....
User avatar
Rayden
Posts: 377
Joined: 01 May 2005, 13:15

Post by Rayden »

lol
User avatar
Rayden
Posts: 377
Joined: 01 May 2005, 13:15

Post by Rayden »

i have added a new question which isn't covered by FAQ
User avatar
Buggi
Posts: 875
Joined: 29 Apr 2005, 07:46

Post by Buggi »

Direct from UnitDef.h

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;
};
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 :wink:
User avatar
Rayden
Posts: 377
Joined: 01 May 2005, 13:15

Post by Rayden »

Interesting, but i still can't find the variable for "Sight Range". Is there a variable that defines when a unit comes gets visible on screen?.

I would like to know that because i have a unit which didn't work properly in Old TA (Long Range Sight Post) because sight range was limited to 400.
User avatar
Buggi
Posts: 875
Joined: 29 Apr 2005, 07:46

Post by Buggi »

Um, dude...

float losRadius;
float airLosRadius;

los... Line Of Sight... @.@;;
User avatar
Rayden
Posts: 377
Joined: 01 May 2005, 13:15

Post by Rayden »

los = line of sight .. thanks :) didn't noticed that
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Post by Caydr »

So... are there two seperate values now, los and airlos?

Oh, also, is line of sight spherical or cylindrical? i.e. can a unit see an infinite distance above itself as in TA or just within a sphere the size of its LoS?
Phoenix
Posts: 12
Joined: 03 May 2005, 09:16

Post by Phoenix »

I would say within the sphere it has is it LOS.

I was messing around with the freedom fighter on commander script. And i held down the LOS button passing over the commander. Once i came in range of the commander in LOS. It appeared. So i think it is the sphere of the LOS.
Post Reply

Return to “Game Development”