PenUltima Online

It is currently Tue Oct 07, 2008 12:52 am

All times are UTC - 8 hours




Post new topic Reply to topic  [ 22 posts ] 
Author Message
 Post subject: Removing force-walk mode
PostPosted: Sat Aug 02, 2008 7:18 pm 
Offline
POL Developer

Joined: Mon Jan 30, 2006 8:10 am
Posts: 107
When a character reaches low stamina, the client [?] disables running and forces the character to walk. Does anyone have a method around this "feature"?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Aug 03, 2008 2:02 am 
Offline
User avatar

Joined: Fri Feb 10, 2006 12:15 am
Posts: 223
According to my test results, client requires two stamina points to allow running. Less than that, it forces character to walk, even if "always run" option is checked.

Because this is a client side problem, I think its easiest to overcome by modifying server, using stathook, to always show at least 2 stamina points. So, even if character really has only one point left, client thinks there are two and allows running. I don't think this would be even all that confusing to players, when zero is still zero, stamina amount in status bar just skips from 2 to 0, over 1.

That's the method I'd try first, though I haven't yet. If you do, please tell if it worked.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Aug 03, 2008 11:06 am 
Offline
POL Developer

Joined: Mon Jan 30, 2006 8:10 am
Posts: 107
Yes, modifying the Stamina to always be at least 2 (or 10%, I forget which it is) will allow a character to run. The problem is that my game doesn't use "Stamina." I'm using the "Stamina" portion of the packet to send "Item Count" information. That is, the number of items they're carrying / the maximum they can carry. (I wanted to replace the Weight with this information, but the weight info is calculated client-side, unalterable by the server.) This information is often 0/X or 1/X (at least for the first hour of the game). This forces the character to walk, and is unacceptable.

I'm pretty sure this would have to be done via client modification (unless someone has a really creative way to do it via the server).


Top
 Profile  
 
 Post subject:
PostPosted: Sun Aug 03, 2008 12:17 pm 
Offline
User avatar

Joined: Fri Feb 10, 2006 12:15 am
Posts: 223
If by haxing you did mean modifying the game exe, I dare to suggest yet another method: art editing. In status bar, there are three different X/Y slots, is it impossible for you to change the second one to another, say, life or whatever, which probably is nearly always 2 or more, and display the item count in another slot? Art editing would only be needed to change the icons to more describing ones, which wouldn't be all that hard to do.

Of course, I'm not familiar at all of your "shard" (I am understood it's to be more like a new game), so what I suggested could be just undoable - after all, you know your settings better.

Sorry, but right now I cannot think of any better ways.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Aug 03, 2008 9:32 pm 
Offline
POL Developer

Joined: Mon Jan 30, 2006 8:10 am
Posts: 107
I have been editing the art. Right now, my 2nd column, which used to be:
HP / Max HP
Stam / Max Stam
Mana / Max Mana

is now:
HP / Max HP
Item Count / Max Capacity
Ability Points / Max AP

Now, I thought about as you suggested, switching perhaps the HP and IC. However, the fact that IC is 0/# (whenever the player is carrying nothing) would cause the character to die, since the client still thinks that number is HP. So moving HP is out of the question. I thought about switching IC and AP (mana), but forcing the character to walk when he's low on AP (happens every single day) is no solution at all. :-/ Any other ideas?

*edit*
Yes, this is a completely new game, unrelated to UO entirely. :) Forgot to mention that, didn't I.


Top
 Profile  
 
 Post subject: Re: Removing force-walk mode
PostPosted: Sat Aug 23, 2008 9:33 am 
Offline
POL Developer
User avatar

Joined: Sun Feb 12, 2006 9:50 pm
Posts: 836
Location: Indiana, USA
Um, yeah.....

Change the Stamina portion of the packet to be something else that will always be the required if at all possible. For example, let's say you change it to their AP, and start these freaks out with 10AP. Should solve the problem I am thinking.

Now, another method. Look into the client side files (the text based ones for the client controls). There will be the keys possibly for you. If you notice a certain one has the settings to change where things go in the client controlled gumps (you probably are already modifying this file?). Try that out and let us know. I will check up on this post in a few days or a week if I can, see if it helps.

_________________
POL Developer - The Penguin Scripter


Top
 Profile  
 
 Post subject: Re: Removing force-walk mode
PostPosted: Sat Aug 23, 2008 11:47 am 
Offline
POL Developer

Joined: Mon Jan 30, 2006 8:10 am
Posts: 107
Yeah, using it for AP works for when they start out (ie: 10/10 AP), but once they use up their AP (0/10), then they're screwed for a few hours. :)

Right now, I'm keeping it as Item Count, but I'm sending Max(2, ItemCount) in the packet. A little hackish, but oh well. :)

I went through readable files briefly, but nothing jumped out at me as "Oh, this one controls the status gump!" If you know any better, do tell.


Top
 Profile  
 
 Post subject: Re: Removing force-walk mode
PostPosted: Sun Aug 24, 2008 10:45 am 
Offline
POL Developer
User avatar

Joined: Sun Feb 12, 2006 9:50 pm
Posts: 836
Location: Indiana, USA
I wish I could remember the files man, it's been so long and I don't have access to my own PC and UO installs right now (will next month though, lol). There is one that looks like a big mess (one of the larger text files) that has gump and other related settings in it. Unless mistaken, it's the biggest text file (the ones that have all the same extension, but not .txt that's for housing iirc).

_________________
POL Developer - The Penguin Scripter


Top
 Profile  
 
 Post subject: Re: Removing force-walk mode
PostPosted: Sun Aug 24, 2008 12:31 pm 
Offline
POL Developer

Joined: Mon Jan 30, 2006 8:10 am
Posts: 107
Are you talking about "Intrface.def"? I'm under the impression that modern clients (post t2a) don't use that file anymore. I did a couple tests, just to check, and the client seems unaffected by both editing the def, and deleting it.


Top
 Profile  
 
 Post subject: Re: Removing force-walk mode
PostPosted: Sun Aug 24, 2008 10:53 pm 
Offline
User avatar

Joined: Fri Feb 10, 2006 8:08 am
Posts: 327
Location: Myrtle Beach, South Carolina
There's a program out there that removes a few client features(duel clienting, encryption, light levels, etc) called NecroToolz. The source code for it is available on Sourceforge(Don't have a link.). I do have the source but I modified it, so look for it on there and if you can't find it I'll send you what I got.

It includes Remove stamina check - Haven't ever tried it, it might not work for newer clients, but it should help you narrow down where it is in the client.

Edit: Got the link; http://sourceforge.net/project/showfiles.php?group_id=128031
Download UOCH Developer's Edition - that's got what you hopefully are looking for.


Top
 Profile  
 
 Post subject: Re: Removing force-walk mode
PostPosted: Sat Aug 30, 2008 8:46 am 
Offline
POL Developer
User avatar

Joined: Sun Feb 12, 2006 9:50 pm
Posts: 836
Location: Indiana, USA
Like I said, it's been a while, LOL. Montuz's suggestion might help, or, even better, check out Iris the free client (if it's still open source). using an open source client may be the exact thing you need mate.

_________________
POL Developer - The Penguin Scripter


Top
 Profile  
 
 Post subject: Re: Removing force-walk mode
PostPosted: Sat Aug 30, 2008 9:34 am 
Offline
POL Developer

Joined: Mon Jan 30, 2006 8:10 am
Posts: 107
I'm going to look into MontuZ suggestion. I thought about Iris, but between working on my company's game engine, working on my script base, and working on the server core, I don't have the mental fortitude to work on a 4th concurrent project like Iris. :)


Top
 Profile  
 
 Post subject: Re: Removing force-walk mode
PostPosted: Mon Sep 01, 2008 4:38 am 
Offline

Joined: Thu Feb 02, 2006 8:33 am
Posts: 296
Quote:
When a character reaches low stamina, the client [?] disables running and forces the character to walk. Does anyone have a method around this "feature"?


If your game allows this you could set and enable the freemove priv. If you don't use stamina at all this perhaps could be a solution.


Top
 Profile  
 
 Post subject: Re: Removing force-walk mode
PostPosted: Mon Sep 01, 2008 12:49 pm 
Offline
POL Developer

Joined: Mon Jan 30, 2006 8:10 am
Posts: 107
I don't use stamina at all, and I did indeed check into freemove. However, I make extensive use of Frozen for cinematics and such, which would be rendered useless if freemove was enabled. Good thinkin' though. Thanks. :)


Top
 Profile  
 
 Post subject: Re: Removing force-walk mode
PostPosted: Tue Sep 02, 2008 9:42 pm 
Offline

Joined: Sat Feb 04, 2006 5:49 pm
Posts: 770
Location: Chicago, IL USA
I started reading this post when it was first posted then I kinda trailed off so sorry if I'm missing something but to keep stamina from dropping, did you try movecost.cfg or better yet, its enabler MovementUsesStamina in serverspecopt.cfg?


Top
 Profile  
 
 Post subject: Re: Removing force-walk mode
PostPosted: Wed Sep 03, 2008 11:42 am 
Offline
POL Developer

Joined: Mon Jan 30, 2006 8:10 am
Posts: 107
CWO wrote:
I started reading this post when it was first posted then I kinda trailed off so sorry if I'm missing something but to keep stamina from dropping, did you try movecost.cfg or better yet, its enabler MovementUsesStamina in serverspecopt.cfg?

Best go re-read. :) In short: I don't use Stamina; instead I use another stat that takes the place of Stamina, however the client doesn't recognize that it's not Stamina, and continues to treat it like Stamina. Hm.. yeah, best go re-read.


Top
 Profile  
 
 Post subject: Re: Removing force-walk mode
PostPosted: Thu Sep 04, 2008 12:20 pm 
Offline

Joined: Sat Feb 04, 2006 5:49 pm
Posts: 770
Location: Chicago, IL USA
In that case you'd definitely have to send at least 2 "stamina" at all times unless you can break that check in the client. Maybe I can somewhat point you in the direction of a program called UOCH (UO Client Hack). I had it a while back and I think that was the open source one. It removed the client-side stamina check to walk through people (no need for full stamina to walk through others, might also be useful with what you're doing) along with some other things. Maybe it might help you find out a little about stamina checks overall in the client...


Top
 Profile  
 
 Post subject: Re: Removing force-walk mode
PostPosted: Fri Sep 05, 2008 2:35 pm 
Offline
User avatar

Joined: Fri Feb 10, 2006 12:15 am
Posts: 223
Talking of re-re-reading.

Didn't the program MontuZ gave link to have the very same feature?

Anyways, with this information, I'd go with fixed basevalue gump, even if it means player has two health points until he suddenly dies. But now that I think about it, not being able to run when player is low on health sounds like a feature!


Top
 Profile  
 
 Post subject: Re: Removing force-walk mode
PostPosted: Fri Sep 05, 2008 6:01 pm 
Offline
POL Developer

Joined: Mon Jan 30, 2006 8:10 am
Posts: 107
Yes, that wouldn't be so bad. But that would mean my Item Count would have to go into Health, and if you empty your backpack, you'd suddenly die. ;-)


Top
 Profile  
 
 Post subject: Re: Removing force-walk mode
PostPosted: Sat Sep 06, 2008 2:16 am 
Offline
User avatar

Joined: Fri Feb 10, 2006 12:15 am
Posts: 223
Luth wrote:
Yes, that wouldn't be so bad. But that would mean my Item Count would have to go into Health, and if you empty your backpack, you'd suddenly die. ;-)

"Never let go your pair of socks!"

Poor joking aside, if you use container.item_count to display total number of items in backpack, doesn't that mean player would have to give up his backpack to die like mentioned? If it isn't possible (backpack cannot be unequipped like normally in UO), this wouldn't be issue, as GetItemCount(who) always returns 1. See.

Code:
function GetItemCount( who )
    return CInt(who.backpack.item_count);
endfunction


That only returns 0 if player does not have a backpack, otherwise it returns real number of items in backpack (+ 1, the backpack itself, so generally always > 0).

Of course it could be funny to see item count above HP and AP in status bar, and you'd have to send item count 0 to clientwise kill the character (and keep it 0 until resurrected, if either one is really needed these days, I'm not sure?), but still it _could_ be the easiest way to go.

I'm sure you got the idea, again, so I won't go on.


Top
 Profile  
 
 Post subject: Re: Removing force-walk mode
PostPosted: Sat Sep 06, 2008 10:24 am 
Offline
POL Developer

Joined: Mon Jan 30, 2006 8:10 am
Posts: 107
You're quite right, item_count does take into account the container itself. However, that is not the number I wish displayed to the character ("My empty backpack has 1 item?") so I do item_count - 1. :)

Swapping Item Count for HP was never a valid option to begin with for several reasons, not the least of which the ones you mentioned here.

I'm hopeful that between the two programs suggested here I can modify the client to ignore stamina. I just haven't had time to do it yet. :) I just got done rescripting my turn-based battle system to allow for group combat (original version only allowed 1v1), and adding offhand weaponry to the game.


Top
 Profile  
 
 Post subject: Re: Removing force-walk mode
PostPosted: Sat Sep 06, 2008 10:30 am 
Offline
User avatar

Joined: Fri Feb 10, 2006 12:15 am
Posts: 223
Good luck with that, and be sure to tell us if you solve this!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 22 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Style based on FI Subice by phpBBservice.nl