Author Topic: Chassis Weight... how to calculate it...  (Read 2344 times)

Offline goose

  • *
  • Posts: 10015
  • Rep: 1
    • View Profile
    • Awards
Chassis Weight... how to calculate it...
« on: October 28, 2008, 11:40:45 AM »
Hey guys. Ive  bee working on the new new bot exchange... I want to be able to calculate the weight of the bot(mostly just for a challenge).

I was wondering if any of you modders figured out how the game calculates the weight of the chassis.

I have a hunch that it has something to do with surface area(sum of each side) but im not sure

I know it also has to do with the armor, but thats probably a simple multiplier at the end of the algorithm.

Before I jump in and spend a few hours figuring it out I was wondering if any of you have played with it.
sippin' on my Honeydew bubble tea.
party in my tummy. yummy, yummy.

Offline Naryar

  • Posts: 23267
  • Rep: 20
  • hybrids oui oui
    • http://www.youtube.com/us
  • Awards BOTM Winner
    • View Profile
    • Awards
  • Skype: TheMightyNaryar
Chassis Weight... how to calculate it...
« Reply #1 on: October 28, 2008, 12:57:42 PM »
Yea, i think too that chassis weight is basically the sum of all the surface areas of the sides multiplied by a constant (that depends of the armor).

and a plastic chassis is 2/3 lighter than the same aluminium chassis (DSA). found it many times. so yeah it is a single multiplier.

I think either someone should be able to find the formula, either approximate it by making several different chassis of precise sizes, get their weight and calculate (not that difficult theorically)

I began the second solution, but that is looong and i gave up.

Offline Gigafrost

  • *
  • Posts: 805
  • Rep: 0
  • You'll never know what I'll think of next.
    • View Profile
    • Awards
Chassis Weight... how to calculate it...
« Reply #2 on: October 28, 2008, 08:29:04 PM »
A possible solution...?

Let Total Weight(X) = Number of Sides(A) x Weight of Armor(B) + Total Number of Weapons(C) x Total Weight of weapons(D)

All of which are constants.

Moreover, in simplicity: X = AB + CD, but this would only refer to the bot when not in battle. Of course, this value would change when under damage variables.

So If X is not = F(After battle)

Then X would be equal to X(Total weight) / Total Hitpoints of Damage dealt to Weapons for F (H of F) x Total Hitpoints of Weapons (W)/ Total Hitpoints of Weapons (W). Or in other words,  F = X/ (H of F x W) / W.

 Due to the fact that after the battle is over, the bot may lose parts, and in turn, lose weight.

Offline Serge

  • *
  • Posts: 1530
  • Rep: 13
    • View Profile
    • http://www.q3k.org/
    • Awards
Chassis Weight... how to calculate it...
« Reply #3 on: October 29, 2008, 04:59:23 PM »
AFAIK this is very basic:

Weight = BottomPanelArea * ArmorClass + ComponentWeight

Or instead of just taking the area of the bottom panel, it may try to take the (arithmetic?) mean of the bottom AND top panel areas.
home | twitter | yt | gmf de/compiler | component freedom | xmpp: q3k@q3k.org | email: q3k@q3k.org

Offline goose

  • *
  • Posts: 10015
  • Rep: 1
    • View Profile
    • Awards
Chassis Weight... how to calculate it...
« Reply #4 on: October 29, 2008, 05:42:06 PM »
it cant be that simple. I have not had a chance to look it over yet.
If it was only the bottom panel, 2 bots with the same bottom panel  but different heights and/or top panels would have the same weight
It cant be the just the mean either, the hight would be ignored.
you are on to something though. If I figure out the bottom, top, and the height I will be able to get all the other sides.


and giga... not sure what all that is, but colorful. (every bot with the same  amount of sides does not have the same chassis weight)
sippin' on my Honeydew bubble tea.
party in my tummy. yummy, yummy.

Offline Serge

  • *
  • Posts: 1530
  • Rep: 13
    • View Profile
    • http://www.q3k.org/
    • Awards
Chassis Weight... how to calculate it...
« Reply #5 on: November 11, 2008, 08:31:00 AM »
From PyRA2:

Code: [Select]
   def _calcWeight(self):
        self._weight = self._mesh.getArea() * self._armourweight

In layman's terms: ChassisWeight = AreaOfMesh * ArmourWeight
home | twitter | yt | gmf de/compiler | component freedom | xmpp: q3k@q3k.org | email: q3k@q3k.org

Offline goose

  • *
  • Posts: 10015
  • Rep: 1
    • View Profile
    • Awards
Chassis Weight... how to calculate it...
« Reply #6 on: November 11, 2008, 03:52:54 PM »
nice! I dont have to reinvent the wheel. Ill just use the function from PYRA2.

thanks Serge.
sippin' on my Honeydew bubble tea.
party in my tummy. yummy, yummy.

Offline Trovaner

  • *
  • Posts: 1222
  • Rep: 32
    • View Profile
    • Awards
Chassis Weight... how to calculate it...
« Reply #7 on: November 26, 2008, 11:14:59 AM »
I was trying to do something like this a couple weeks ago and I came to the same conclusions about how RA2 calculates bot weight (but I didn't know that it was listed in PyRA2). The EXE calculates the surface area then multiplies it by the armor's weight value then adds the component weight values for the total weight value.

In fact, I learned that if you divide the total weight of the bot chassis (in game) by the armor's weight value then multiply it by the armor's strength value and round it then you get the total HP value of your bot.