Freighting ground units error

For bug reports and fixes, installation issues, and new ideas for technical features.

Moderator: SEOW Developers

Post Reply
Ala13_Mdie
Posts: 33
Joined: Wed 31 Jan 2007 2:01 pm
Location: Alicante, Spain

Freighting ground units error

Post by Ala13_Mdie »

Hi all:

We have realized that when we try to load a couple of AAA (one unit of 2x37mm AAA) into a transport plane (Li-2 or similar), wich transport_capacity was set to 2, program says that the load capacity has been passed and aborts the load commitment.

We have changed the Transport_Capacity value to 3, and then MP let us load this unit into the transport, but it let us load 3 supply points instead of 2, obviously. :wink:

The question is if it is Ok. It seems that the code statement to accept the load order should be something like [Transport_Capacity>=Unit Strenght] (or something like this), but it looks like if the '=' is not over there.

Or maybe, and probably, I'm looseing something anywhere. :oops:

And just another question. Has the transport_weight field something to see with this? In any case, this value is set to 6, enough for 2x37mm AAA? :?:

What's the function of this field?

S!
IV/JG7_4Shades
Posts: 2211
Joined: Mon 08 Jan 2007 11:10 pm
Location: Perth, Western Australia

Post by IV/JG7_4Shades »

Hi Mdie,

The Transport_Capacity field does not measures the number of objects able to be carried. Instead it measures the total *weight* of objects that can be carried. The weight of each object type is determined by the Transport_Weight field in the Object_Specifications table. There may be a bug, but I doubt it since this feature has been in use for some time. Maybe there is a misunderstanding about Transport_Capacity and Transport_Weight.

I don't have my DB at hand, so I'll give a hypothetical example. Suppose a C-47 has Transport_Capacity = 2. You want it to transport a platoon of two ML-20 howitzers, which have Transport_Weight = 2 (per gun). The total weight of the platoon is 2x2 = 4 weight points. This is more than the carrying capacity of the C-47, so it cannot be loaded. But nearby is a platoon of 2 Maxim guns, each weighing 1 weight point. You can load the Maxim platoon since its total weight of 2 is less than or equal to the C-47 freight capacity.

Does this help?

4Shades
IV/JG7_4Shades
SEOW Developer

Image
Ala13_Mdie
Posts: 33
Joined: Wed 31 Jan 2007 2:01 pm
Location: Alicante, Spain

Post by Ala13_Mdie »

Ok, if I have understood it right, a single platoon of 2 37mm AAA (=>Transport_Weight=1/each) should weight 2 (2x1). Isn't it?

Well, in our DB both Li-2 and Ju-52 (changed from the original) have the Transport_Capacity field as 2, so it should be enough for loading the AAA platoon I referred, but it isn?t. :? And that's why I suppose there could be a bug, because if I change (as I did) the Transport_Capacity of Li-2 and Ju-52 to 3, it works. I mean that then I can load that platoon.

We have used this feature before without problems, so it was strange that in the last version it doesn't work like before, and so I'm asking about. :wink:

S!
IV/JG7_4Shades
Posts: 2211
Joined: Mon 08 Jan 2007 11:10 pm
Location: Perth, Western Australia

Post by IV/JG7_4Shades »

Thanks for the confirmation. Brandle seems to think he has seen something similar too.

I'll see if I can find the bug.

Cheers,
'4Shades
IV/JG7_4Shades
SEOW Developer

Image
Ala13_Mdie
Posts: 33
Joined: Wed 31 Jan 2007 2:01 pm
Location: Alicante, Spain

Post by Ala13_Mdie »

I've got it. :D (I think) :oops:

I found this piece of code in MP-Head.js:
(Line 5416 and follows)
if (ExcessCapacity <= 0) {
alert('The requested load manifest exceeds the freight capacity of "'+CO[FID].Description+'".\nLoading request aborted.');
return;
'ExcessCapacity' is defined in line 5385 as:
var ExcessCapacity = CO[FID].TransportCapacity - loadedWeight - loadWeight;
If we take out the 'red equal', the transport can be loaded at its capacity value.

S!

P.D: And it works :lol:
IV/JG7_4Shades
Posts: 2211
Joined: Mon 08 Jan 2007 11:10 pm
Location: Perth, Western Australia

Post by IV/JG7_4Shades »

aah, good job Mdie!!!!
IV/JG7_4Shades
SEOW Developer

Image
Post Reply