New setting: canbetransported for buildings?

New setting: canbetransported for buildings?

Requests for features in the spring code.

Moderator: Moderators

User avatar
TradeMark
Posts: 4867
Joined: 17 Feb 2006, 15:58

New setting: canbetransported for buildings?

Post by TradeMark »

I just made a mod from AA 2.11 that you can transport buildings with aircraft.

To make this possible now, you need to set movementclass for the buildings. and also you need to add mass for them, like 99999 so they dont move when something explodes near them.

But this aint so good, because:
- Transportable buildings doesnt leave ghost.
- It gives sometimes movement error messages.
- Units dont know how to circulate buildings, so they gets sometimes stuck to transportable buildings.

It would be much easier if we had that variable.

Would it be much work to add such variable in the unit handler engine?

And if you have better idea to make buildings possible to be transported, please tell it! :shock:

BTW, why its not possible to move labs?
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Post by knorke »

Dont know if you mean this by "movementclass" but KuroTA has turrets that are in fact units with a movespeed of 0. They work quite good..
BTW, why its not possible to move labs?
Someone once did, it looked funny.
User avatar
Guessmyname
Posts: 3301
Joined: 28 Apr 2005, 21:07

Post by Guessmyname »

zwzsg did it with his 'factories that grew legs and walked' thing
esteroth12
Posts: 501
Joined: 18 May 2006, 21:19

Post by esteroth12 »

Guessmyname wrote:zwzsg did it with his 'factories that grew legs and walked' thing
they could also grow wings!
User avatar
TradeMark
Posts: 4867
Joined: 17 Feb 2006, 15:58

Post by TradeMark »

And it was made impossible now because.... it was funny? :?

knorke wrote:Dont know if you mean this by "movementclass" but KuroTA has turrets that are in fact units with a movespeed of 0. They work quite good..
What else stuff they had? And you mean maxvelocity? movespeed variable doesnt exist...

I want every building possible to move as the nanotower was possible to move in AA 2.11. But i just dont get the idea there, ive copied all values from the nanotower FBI file, but it just doesnt work.

And if i make them act as units, then they dont leave ghosts. but somehow nanotower leaves ghost...
User avatar
Das Bruce
Posts: 3544
Joined: 23 Nov 2005, 06:16

Post by Das Bruce »

TradeMark wrote:And it was made impossible now because.... it was funny? :?

knorke wrote:Dont know if you mean this by "movementclass" but KuroTA has turrets that are in fact units with a movespeed of 0. They work quite good..
What else stuff they had? And you mean maxvelocity? movespeed variable doesnt exist...

I want every building possible to move as the nanotower was possible to move in AA 2.11. But i just dont get the idea there, ive copied all values from the nanotower FBI file, but it just doesnt work.

And if i make them act as units, then they dont leave ghosts. but somehow nanotower leaves ghost...
Last I remember nanotower was a factory plus a unit.
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

Then you remember OTA. Since Spring allows mobile units to build mobile units the nanotower is an immobile con veh now.

Spring doesn't allow some abilities to be had by mobile units. Mobile factories aren't possible.
User avatar
Das Bruce
Posts: 3544
Joined: 23 Nov 2005, 06:16

Post by Das Bruce »

I also remember in the spring versions it was capable of building an assist nanolathe or a entrenching nanolathe.
User avatar
TradeMark
Posts: 4867
Joined: 17 Feb 2006, 15:58

Post by TradeMark »

So tell me, how i make buildings possible to be transported?
User avatar
Das Bruce
Posts: 3544
Joined: 23 Nov 2005, 06:16

Post by Das Bruce »

Make it a unit.
Hunter0000
Posts: 197
Joined: 04 Nov 2004, 00:33

Post by Hunter0000 »

TradeMark wrote:So tell me, how i make buildings possible to be transported?
Sorry to say this.. but pretty much either deal with the limitations of using 0speed units or write a patch. The only other thing is zwzsg's method, which if it even still works, so so extreamly hacky... well, err... I see many crashes in its future if use hehe.
User avatar
Das Bruce
Posts: 3544
Joined: 23 Nov 2005, 06:16

Post by Das Bruce »

TransportCAI.cpp

Code: Select all

bool CTransportCAI::CanTransport(CUnit* unit)
{
	CTransportUnit* transport=(CTransportUnit*)owner;

	if(unit->mass>=100000 || unit->beingBuilt)
		return false;
	if(unit->unitDef->canhover || unit->unitDef->floater || unit->unitDef->canfly)
		return false;
	if(unit->xsize > owner->unitDef->transportSize*2)
		return false;
	if(!transport->CanTransport(unit))
		return false;
	if(unit->mass+transport->transportMassUsed > owner->unitDef->transportMass)
		return false;

	return true;
}
Could possibly be reduced to

Code: Select all

bool CTransportCAI::CanTransport(CUnit* unit)
{
	CTransportUnit* transport=(CTransportUnit*)owner;

	if(unit->beingBuilt || !transport->CanTransport(unit) || unit->mass+transport->transportMassUsed > owner->unitDef->transportMass)
		return false;

	return true;
}
The removed ones were arbitrary OTA restrictions. And arbitrary OTA restrictions FTL.
User avatar
TradeMark
Posts: 4867
Joined: 17 Feb 2006, 15:58

Post by TradeMark »

Das Bruce wrote:Make it a unit.
It is unit.
What you mean by that?
User avatar
Das Bruce
Posts: 3544
Joined: 23 Nov 2005, 06:16

Post by Das Bruce »

TradeMark wrote:
Das Bruce wrote:Make it a unit.
It is unit.
What you mean by that?
Mobile unit, like a tank, not a building, like a factory.
User avatar
TradeMark
Posts: 4867
Joined: 17 Feb 2006, 15:58

Post by TradeMark »

How?
User avatar
Kuroneko
Posts: 483
Joined: 03 Jan 2005, 05:32

Post by Kuroneko »

From KuroTA :)
[UNITINFO]
{
UnitName=BOTHFURY;
Version=1.2;
Side=BOTH;
Objectname=BOTHFURY;
Designation=CP-RFT;
Name=Fury;
Description=Transportable Anti-Air Gun;
FootprintX=2;
FootprintZ=2;
BuildCostEnergy=2015;
BuildCostMetal=360;
MaxDamage=765;
MaxWaterDepth=0;
MaxSlope=10;
EnergyUse=0;
BuildTime=8967;
WorkerTime=0;
BMcode=0;
Builder=0;
ThreeD=1;
ZBuffer=1;
NoAutoFire=0;
SightDistance=400;
RadarDistance=0;
SoundCategory=GUARD;
EnergyStorage=50;
MetalStorage=50;
ExplodeAs=LARGE_BUILDINGEX;
SelfDestructAs=MEDIUM_BUILDING;
Category=CORE LEVEL3 strategic weapon NOTAIR NOTSUB ;
TEDClass=TANK;
Copyright=Copyright 1997 Humongous Entertainment. All rights reserved.;
YardMap=ooooooooo;
Corpse=corfury_dead;
GermanDescription=Hochgeschwindigkeits Flak;
UnitNumber=3250;
Frenchdescription=DCA super rapide;
firestandorders=1;
StandingFireOrder=2;
canstop=1;
canmove=1;
ShootMe=1;
DefaultMissionType=GUARD_NOMOVE;
buildangle=9814;
canattack=1;
Weapon1=CORFURY_GUN;
downloadable=1;
wpri_badTargetCategory=NOTAIR;
BadTargetCategory=NOTAIR;
Upright=1;
}
User avatar
KDR_11k
Game Developer
Posts: 8293
Joined: 25 Jun 2006, 08:44

Post by KDR_11k »

I don't think that's it, my infantry has TEDClass=INFANTRY and still moves. Isn't TEDclass just the tab the map editor lists the unit in?
j5mello
Posts: 1189
Joined: 26 Aug 2005, 05:40

Post by j5mello »

the KuroTA turrets work exactly like the Dragon Maw/Claw and the nano towers form AA they are units with a tiny move speed (so they are basically immobile). This allows them to be transportable assuming the transport itself can handle the "mass" of the unit. Of course in AA those units are given a high mass so they can't be transported (nanos have that fix in the next version).
User avatar
Caydr
Omnidouche
Posts: 7179
Joined: 16 Oct 2004, 19:40

Post by Caydr »

TEDClass is Totalannihilation EDitor Class. It's only used for where they appear in that program's menus AFAIK...
User avatar
Argh
Posts: 10920
Joined: 21 Feb 2005, 03:38

Post by Argh »

The only TEDClasses that actually do anything, to my knowledge are PLANT and COMMANDER.
Post Reply

Return to “Feature Requests”