ScriptUO

Official ScriptUO EasyUO Scripts => Scripting Chat => Topic started by: Gemviper on October 06, 2015, 06:12:38 PM

Title: Maxweight script setup - question
Post by: Gemviper on October 06, 2015, 06:12:38 PM
- A player backpack can hold 550 stones maximum even if the character is strong enough to carry more

- A player can weigh 590 stones maximum when counting worn gear(550 pack plus 40 more for gear that isn't counted against the 550 weight cap if it's worn)

- A typical fully geared player with 140 strength total that is carrying the max 550 stones in his pack will weight somewhere between 580 and 590 stones and the in game status bar will say 580/590, you're not overloaded.

If you open the EUO status bar, however, it says that MAXWEIGHT is only 530 stones despite the game status bar saying 550 is available in the pack, there's a 20 stone discrepancy between EUO max pack weight and the in game max pack weight.

Scripting using maxweight results in a failed attempt at 531 stones even if you could carry 550 in your pack in total. Where is this 20 stone reduction coming from? Is this a bug? The stats being displayed for my character are accurate in EUO but the #Maxweight for my pack is not, it's 20 stone short.
Title: Re: Maxweight script setup - question
Post by: Gemviper on October 06, 2015, 11:58:45 PM
I suppose I could change the code to count weight in a different way than by using #Maxweight but that's what it's there for, I wish I knew where the missing 20 stone has gone. I stopped trying to figure it out but 20 stone is quite a few good items at idoc so if someone figures it out, eventually, do tell!
Title: Re: Maxweight script setup - question
Post by: Crome969 on October 07, 2015, 03:37:14 AM
There could be so many ways how this could be calculated or displayed wrong. I can count you up a few possiblities :

1) The Client Display Wrong.
2) The EasyUO Display Wrong.
3) The Client Stores a SubWeight like for Stamina Check or whatever anywhere and EasyUO reads from wrong Memory Location.
4) EasyUO reads correct but displays Wrong (or do some sub calculations like for StaminaCheck).


You could start to strike out the possible ways by comparing how other tools read maxweight by checking
tools like UOSteam\Razor\Stealth (they read packets) if they get same maxweight then it is something on EUO. If they get also incorrect MaxWeight, it could be Client sends different data and EUO do some subchecks and manipulate data.
Title: Re: Maxweight script setup - question
Post by: 12TimesOver on October 07, 2015, 04:03:07 AM
What is the race of the character in question? There used to be a bug for elf characters that you had to work around when using #maxweight, that might not be it but it seems that this could still exist.
Title: Re: Maxweight script setup - question
Post by: Gemviper on October 07, 2015, 05:52:17 AM
All my characters are human. I took all armor off to rule that out and nothing changed, it stayed 20 stone off. I did however manage to pick up 550 stone into an empty pack with a test script using max weight, even though it says 530 is maxweight, so it's not affecting me that I know of.
Title: Re: Maxweight script setup - question
Post by: Crome969 on October 07, 2015, 07:09:30 AM
well i dont think easyuo have a weight check on drag\drop so you need to figure out a way to handle it as you need.

I i personaly analysed what would be my "most weight" stack and checked weigth that if i move item that i wont over limit. worked good in past 10 years
Title: Re: Maxweight script setup - question
Post by: Endless Night on October 09, 2015, 08:30:01 AM
If you event property #backpackid    what does it say the weight is ??    If it shows the correct weight you could parse the  string  and forget about #maxweight
Title: Re: Maxweight script setup - question
Post by: The Ghost on October 09, 2015, 11:08:08 AM
I just look at my #maxweight,
Human easyuo show 386 but UO 446 in statbar
Garg     easyuo show 502 but UO 502 in statbar     
elf         easyuo show 481 but UO 481 in statbar             
Title: Re: Maxweight script setup - question
Post by: Gemviper on October 09, 2015, 05:59:20 PM
The nice part of checking against MAXWEIGHT is that the weight updates as you load up items, parsing it any other way and you run into math problems if anything goes wrong.

It seems to be a human character thing, perhaps due to the bonuses humans get not being included? If so this little bug has been around a loooong time :)