Transports
Moderator: Moderators
- SanadaUjiosan
- Conflict Terra Developer
- Posts: 907
- Joined: 21 Jan 2010, 06:21
Transports
Ok, transports are not doing what I want them to do, so I'm going to list my problem, and give a hypothetical situation so you guys can explain how it really works.
I want my transport to carry several units, but it only picks up a few of them. The transportSize and transportMass are both set to 100,000, and these units I'm trying to pick up are really small.
So, hypothetical situation:
Transport wants to pick up 10 units. These units have a 2x2 footprint, and have a mass of 5 each.
So what would I set transportSize and transportMass to? I really don't understand exactly how those work, but I'm going to guess I'd set the Size to 4, and the Mass to 50.
I want my transport to carry several units, but it only picks up a few of them. The transportSize and transportMass are both set to 100,000, and these units I'm trying to pick up are really small.
So, hypothetical situation:
Transport wants to pick up 10 units. These units have a 2x2 footprint, and have a mass of 5 each.
So what would I set transportSize and transportMass to? I really don't understand exactly how those work, but I'm going to guess I'd set the Size to 4, and the Mass to 50.
Re: Transports
From http://springrts.com/wiki/Units:FBI
TransportCapacity
The number of units the transport can carry
If this tag is not present, then any attach-unit and drop-unit command in the script will be ignored.
TransportMass
this is the maximum weight a tranporter can transport, default 100000
TransportSize
The size of units that the transport can pick up, based on the unit-to-be-loaded's FootPrintX and FootPrintZ.
edit, so to directly answer your question:
TransportCapacity
The number of units the transport can carry
If this tag is not present, then any attach-unit and drop-unit command in the script will be ignored.
Code: Select all
transportcapacity=5;
this is the maximum weight a tranporter can transport, default 100000
Code: Select all
transportmass=100000;
The size of units that the transport can pick up, based on the unit-to-be-loaded's FootPrintX and FootPrintZ.
Code: Select all
transportsize=3;
Code: Select all
transportcapacity=10;
transportmass=50;
transportsize=4;
- SanadaUjiosan
- Conflict Terra Developer
- Posts: 907
- Joined: 21 Jan 2010, 06:21
Re: Transports
So, it works the way I thought.
But my real transport still won't pick up more than 5 units. Like I said, it's set to capacity = 15, mass = 100,000 and size = 100,000. And these units I'm wanting to pick up have a 2x2 footprint and 32.5 mass. I don't understand.
But my real transport still won't pick up more than 5 units. Like I said, it's set to capacity = 15, mass = 100,000 and size = 100,000. And these units I'm wanting to pick up have a 2x2 footprint and 32.5 mass. I don't understand.
Re: Transports
In Spring, contrary to TA, transport capacity is not the number of units, but the sum of all footprints. At least so it was when I last tried, years ago.
- SanadaUjiosan
- Conflict Terra Developer
- Posts: 907
- Joined: 21 Jan 2010, 06:21
Re: Transports
Is there like a hardcoded limit to how many units a transport can carry?
Re: Transports
No. Zwzsg is correct, looking at CTransportUnit::AttachUnit(CUnit* unit, int piece) in the source codeSanadaUjiosan wrote:Is there like a hardcoded limit to how many units a transport can carry?
Code: Select all
TransportedUnit tu;
tu.unit=unit;
tu.piece=piece;
tu.size=unit->xsize/2;
tu.mass=unit->mass;
transportCapacityUsed+=tu.size;
transportMassUsed+=tu.mass;
So to answer you:
transportsize = 2, -- footprintX of the transporteesTransport wants to pick up 10 units. These units have a 2x2 footprint, and have a mass of 5 each.
transportcapacity = 20, -- number of transportees * their footprintX
transportmass = 50, -- number of transportees * their mass
- SanadaUjiosan
- Conflict Terra Developer
- Posts: 907
- Joined: 21 Jan 2010, 06:21
Re: Transports
That did it. Thanks a lot for straightening that out Flozi.
Now that that is straightened out, I can't help but notice that figuring out how much you want your transport to be able to carry can get kind of complicated, especially if you're dealing with a lot of different footprint sizes.
Aka, I'm no math whiz.
Is there a tag I can put in the unit def that's sort of like "can't be transported", but is instead something like "Only 1 per transport"? What I'm shooting for is that I only want 1 of my "big unit" to be able to fit, but I'd like a good number of my smaller, more peon-like mechs to be able to fit. If there's not, that's fine. I'll just have to get clever and try my best to get what I want.
Thanks again though, this transport has been an enormous pain.
Now that that is straightened out, I can't help but notice that figuring out how much you want your transport to be able to carry can get kind of complicated, especially if you're dealing with a lot of different footprint sizes.
Aka, I'm no math whiz.
Is there a tag I can put in the unit def that's sort of like "can't be transported", but is instead something like "Only 1 per transport"? What I'm shooting for is that I only want 1 of my "big unit" to be able to fit, but I'd like a good number of my smaller, more peon-like mechs to be able to fit. If there's not, that's fine. I'll just have to get clever and try my best to get what I want.
Thanks again though, this transport has been an enormous pain.
Re: Transports
The easiest way to do that is to get clever with the unit masses. For example trucks and halftracks in S44 can carry 1 light infantry gun, as well as a bunch of infantry. (Although in the current dev versions it is done via a script hack.)
Anyway, essentially make your big unit half the transportmass of the transporter + 1, so it could only pick up 1, as well as a bunch of your peons, with have a much smaller transport mass.
As for transports being a royal pain - welcome to Spring.
Certainly transports are one of the worst things inherited from TA.
Anyway, essentially make your big unit half the transportmass of the transporter + 1, so it could only pick up 1, as well as a bunch of your peons, with have a much smaller transport mass.
As for transports being a royal pain - welcome to Spring.

- SanadaUjiosan
- Conflict Terra Developer
- Posts: 907
- Joined: 21 Jan 2010, 06:21
Re: Transports
Playtest with friend revealed my transports are dumb. Super tired so I'm going to be terse. They were having trouble unloading.
Are land transports easier? I'm getting tired of this dumb air transport just not working.
Are land transports easier? I'm getting tired of this dumb air transport just not working.