Page 1 of 1
Start locations
Posted: Sat Mar 03, 2007 5:20 am
by Saint
I noticed the documentation says multiple start location support is broken.
Well, exactly how do I modify this start location that all players go to right now? I'm using a custom map so I need them to go elsewhere.
Posted: Sat Mar 03, 2007 5:28 am
by giwo
It's not exactly broken, just happens to be a client feature that is disabled by default (I think the loss of that functionality went hand-in-hand with the addition of the AOS features).
It would be fairly simple, however, to write a Gump that comes up on startup to select a starting location.
Posted: Sat Mar 03, 2007 5:35 am
by Saint
giwo wrote:It's not exactly broken, just happens to be a client feature that is disabled by default (I think the loss of that functionality went hand-in-hand with the addition of the AOS features).
It would be fairly simple, however, to write a Gump that comes up on startup to select a starting location.
Well I don't necessarily care about making a gump right now, I just find it annoying to have to walk around before getting to a city.
How could I just disable all the AOS features anyway? I've been wanting to do that and if it fixes this then even better.
Posted: Sat Mar 03, 2007 6:04 am
by giwo
Hmm, OSI may have removed the capability to choose for yourself from the newest clients. I tried changing the features, and couldn't get it to give me the screen to select a start location.
As for playing with client features, there are two areas. Line 3270 of CPacketSend.cpp, and Line 2225 of CPacketSend.cpp.
Posted: Sat Mar 03, 2007 6:06 am
by giwo
For the time being, to just change the hardcoded start location, try line 627 of pcmanage.cpp
Posted: Sat Mar 03, 2007 4:30 pm
by Cavalier
On official servers you get a choice of starting location, but its all foobar'ed around with some characters starting in Haven (aka Oclo) and others starting wherever you picked.
Posted: Sat Mar 03, 2007 5:11 pm
by Saint
Well I did manage to change the start location now in the code.
But, disabling client features still doesn't work. Is that all clientside? Uncontrollable? nothing changes in game, and here is what I've done:
Code: Select all
CPEnableClientFeatures::CPEnableClientFeatures()
{
//Enable locked client features (3 bytes)
//· BYTE cmd
//· BYTE[2] feature#
// 0x01 T2A upgrade, enables chatbutton
// 0x02 Enables LBR update. (of course LBR installation is required)
// (plays MP3 instead of midis, 2D LBR client shows new LBR monsters, ... )
// 0x04 Unknown, never seen it set (single char?)
// 0x08 Unknown, set on OSI servers that have AOS code - no matter of account status (doesn~Rt seem to ~Sunlock/lock~T anything on client side)
// 0x10 Enables AOS update (necro/paladin skills for all clients, malas map/AOS monsters if AOS installation present)
// 0x20 Sixth Character Slot
// 0x40 Samurai Empire?
// 0x80 Elves?
// 0x100
// 0x200
// 0x400
// 0x800
// 0x1000
// 0x2000
// 0x4000
// 0x8000 Since client 4.0 this bit has to be set, otherwise bits 3..14 are ignored.
// Thus 0 neither T2A NOR LBR, equal to not sending it at all,
// 1 is T2A, chatbutton,
// 2 is LBR without chatbutton,
// 3 is LBR with chatbutton~E
// 8013 LBR + chatbutton + AOS enabled
// Note1: this message is send immediately after login.
// Note2: on OSI servers this controls features OSI enables/disables via ~Supgrade codes.~T
// Note3: a 3 doesn~Rt seem to ~Shurt~T older (NON LBR) clients.
pStream.ReserveSize( 0 );
pStream.WriteByte( 0, 0xB9 );
#if defined( _MSC_VER )
#pragma todo( "Currently all client support is hardcoded. Move this into the ini when possible." )
#endif
// pStream.WriteShort( 1, 0x80FB ); // all features + sixth char
pStream.WriteShort( 1, 0x01 ); // No new features
}
And I don't see the significance of line 3270 in CPacketSend.cpp, or it's surrounding area. Did you mean another file?
Code: Select all
void CPCharAndStartLoc::NumberOfLocations( UI08 numLocations )
{
// was 305 +, now 309 +
UI16 packetSize;
if( pStream.GetByte( 3 ) > 5 )
packetSize = (UI16)(369 + 63 * numLocations);
else
packetSize = (UI16)(309 + 63 * numLocations);
pStream.ReserveSize( packetSize ); //Line 3270
pStream.WriteShort( 1, packetSize );
// If we are going to support the 6char client flag then we need to make sure we push this offset furtner down.
if( pStream.GetByte( 3 ) > 5 )
pStream.WriteByte( 364, numLocations );
else
pStream.WriteByte( 304, numLocations );
pStream.WriteShort( packetSize - 2, ( 0x08 | 0x20 | 0x40 | 0x80 | 0x100 ) );
}
Posted: Sat Mar 03, 2007 7:36 pm
by giwo
Unfortunately the packet documentation on the CPEnableClientFeatures leaves something to be desired, but I did play with it myself and found I was able to get it to disallow me from making a ninja and such.
As for line 3270, those are character-based features, If you look at the surrounding functions, you'll see the documentation on exactly what each of those flags, (0x08, 0x20, 0x40, 0x80, and 0x100) do, exactly. One of the noticeable changes I saw when I set that to 0x00 was the old-style UO names (which UOX3 can still send) began to appear again.
Posted: Sat Mar 03, 2007 7:50 pm
by Xuri
Aahhh... how nice wouldn't it be with ini-settings for some (or all of) these various features.. *dreams*
Posted: Sat Mar 03, 2007 8:36 pm
by giwo
It's quite possible, I just need accurate documentation of exactly what each flag does, so I don't have to write the code, then rewrite the code, then rewrite the code.

Posted: Wed Mar 07, 2007 5:29 am
by Saint
I just realized client features are no longer hardcoded, when did this happen and where do you make the settings?
Posted: Wed Mar 07, 2007 6:34 am
by giwo
uox.ini, CLIENTFEATURES and SERVERFEATURES, but you'll need to understand how to set individual bits to customize it manually.
Posted: Wed Mar 07, 2007 5:11 pm
by Saint
So,
CLIENTFEATURES=33019
SERVERFEATURES=488
33019 = 1000 0000 1111 1011
488 = 0000 0001 1110 1000
I think I understand it now, the hexidecimal stuff just confused me
so then I figure no client features would be
1000 0000 0000 0000 = 32768
Where are the server features bits explained?
Posted: Thu Mar 08, 2007 4:14 am
by giwo
Absolutely no features would actually just be 0. But yeah, you've got the idea with the 1's and 0's.

Posted: Thu Mar 08, 2007 5:50 am
by Saint
What's the difference between client features and server features?
Posted: Fri Mar 09, 2007 3:06 am
by giwo
Currently, for our purposes, nothing. However eventually, were you to host multiple UOX servers, any of the "server" features are specific to each server. Notice in the INI we did not attach these to the servers in the serverlist, which means those settings are global for the time being.
When I see someone successfully run a public UOX server with multiple worlds, then I'll make that functionality customizable for each of the worlds.
