PDA

View Full Version : Calculating exact weights of items



Yollia
08-18-2013, 03:27 PM
I just posted a script on the Lich repo (called "weightcalc") that allows you to calculate exact weights of items. What it actually does is calculate the weight of the stuff you are carrying, so you need to do some subtraction yourself: first you calculate the weight of your stuff WITHOUT the item in your inventory, then you get the item and recalculate the weight of your stuff. There are some caveats:

1. You MUST NOT be wearing armor.
2. You MUST be unencumbered.
3. You MUST NOT be wearing Strength or be using anything that increases your carrying capacity.
4. Your STR and CON stats MUST NOT be enhanced.
5. You MUST have about your weight in silver in your bank account (160 silver = 1 pound).

Let me walk through an example.

I'm carrying too much stuff to be unencumbered after taking my armor off, so I gave some stuff to Zocaid.

My goal was to calculate the weight of a steel spring I found in a box.

First I gave it to Zocaid:

You offer your steel spring to Zocaid, who has 30 seconds to accept the offer. Click CANCEL to prematurely cancel the offer.
>
Zocaid has accepted your offer and is now holding a steel spring.

Then I ran the script:

>;weightcalc
--- Lich: weightcalc active.
[weightcalc: Please make sure you are not wearing armor or enhancives, and do not have the spell Strength on.]
[weightcalc: Also make sure you are unencumbered.]
[weightcalc: Pausing script so you can check (;unpause all to resume)...]
--- Lich: weightcalc paused.

>;unpause all
--- Lich: weightcalc unpaused.
[weightcalc: Body weight = 230.0]
[weightcalc: Carrying capacity = 93.15]
[weightcalc: Heading to bank...]
--- Lich: go2 active.

Script took me to the bank. It will do some depositing and withdrawing and checking of encumbrance, don't be alarmed. Eventually you'll get something like this:

[weightcalc: Exactly 7711 silver to achieve carrying capacity.]
[weightcalc: Therefore you are carrying 44.95 pounds of junk.]

Good stuff. Now I got the spring back from Zocaid...

Zocaid offers you a steel spring. Click ACCEPT to accept the offer or DECLINE to decline it. The offer will expire in 30 seconds.
>acc
You accept Zocaid's offer and are now holding a steel spring.

Running the script again yielded:

[weightcalc: Exactly 7631 silver to achieve carrying capacity.]
[weightcalc: Therefore you are carrying 45.45 pounds of junk.]

We have 45.45 - 44.95 = 0.5, so the steel spring weighs exactly half a pound.


Enjoy.

-Yollia

phantasm
05-12-2015, 10:16 PM
This is impressive I didn't realize you could calculate the exact weight of items like that.

elcidcannon
05-12-2015, 10:26 PM
rarely heard statement - awesome necro