LBR flag hack for MP3 music


Posts: 6
Joined: Tue Apr 24, 2012 5:34 pm
PostPosted: Tue Apr 24, 2012 5:51 pm
Hi,

I would like to know how difficult it would be to modify the client to always enable MP3 support even when the LBR flag was not set in the 0xB9 packet received from the server.
If it is not set then it forces to play MIDI music from the 'Music' folder.
When set it forces the client to play MP3 music from the 'Music\Digital' folder and uses the 'Music\Digital\Config.txt' file to map the music ids received from 6D packets to the MP3 files.

Packet Name: Enable locked client features
Last Modified: 2011-10-25 11:24:59
Modified By: Tomi

Packet: 0xB9
Sent By: Server
Size: 3/5 Bytes

Packet Build
Original Legacy Client Version
BYTE[1] 0xB9
BYTE[2] Feature Bitflag

From Legacy Client 6.0.14.2+
BYTE[1] 0xB9
BYTE[4] Feature Bitflag

Subcommand Build
N/A

Notes
feature flags:

0x01: enable T2A features: chat, regions
0x02: enable renaissance features
0x04: enable third dawn features
0x08: enable LBR features: skills, map
0x10: enable AOS features: skills, map, spells, fightbook
0x20: 6th character slot
0x40: enable SE features
0x80: enable ML features: elven race, spells, skills
0x100: enable 8th age splash screen
0x200: enable 9th age splash screen
0x400: enable 10th age
0x800: enable increased housing and bank storage
0x1000: 7th character slot
0x2000: enable KR faces
0x4000: enable trial account
0x8000: enable 11th age
0x10000: enable SA features: gargoyle race, spells, skills
0x20000: enable HSA features
0x40000: enable Gothic housing tiles
0x80000: enable Rustic housing tiles

This packet is send immediatly after login.
If you need several features you have to summ the flags.


Older notes (not sure which are correct!):

if (MSB not set)
Bit# 1 T2A upgrade, enables chatbutton
Bit# 2 enables LBR update. (of course LBR installation is required)(plays MP3 instead of midis, 2D LBR client shows new LBR monsters,...)
if (MSB set)
Bit# 3 T2A upgrade, enables chatbutton
Bit# 4 enables LBR update
Bit#5 enables AOS update (Aos monsters/map (AOS installation required for that) , AOS skills/necro/paladin/fight book stuff - works for ALL clients 4.0 and above)


Examples:
ML: B980FB
AOS-7AV: B9803B
AOS: B9801B
LBR: B90003

Posts: 36
Joined: Thu Apr 05, 2012 2:46 am
PostPosted: Tue Apr 24, 2012 9:21 pm
I'll take a look at it later. If you can confirm that the UOSA client already has this hack, then a.) somebody here definitely knows about it, and b.) it will be easy to add to my patcher.

Site Admin
Posts: 372
Joined: Wed Apr 08, 2009 6:35 am
PostPosted: Tue Apr 24, 2012 9:31 pm
I once wrote a proof-of-concept hack for always enabling the AOS features for 5.0.8.3. It's the same theory.

The Packet Distributor is your friend here : http://www.joinuo.com/forums/viewtopic.php?f=28&t=706
But unless you know assembler it's not going to do you any good.

I'll also try to look at it again, it's been a year atleast :(.
<Derrick> RunUO AI is kind of a functional prototype, which i have hacked into something resembling OSI behavior, but only by complitcating everything

Posts: 36
Joined: Thu Apr 05, 2012 2:46 am
PostPosted: Wed Apr 25, 2012 7:43 am
Nice script. I've been an Olly guy for a long time, but I had to dig out IDA again to try your script. Copying code blocks from this forum is no good for Python though (not in Firefox anyways), I had to quote it and then copy from between the tags in the forum reply.

Posts: 6
Joined: Tue Apr 24, 2012 5:34 pm
PostPosted: Wed Apr 25, 2012 7:48 am
I'll take a look at it later. If you can confirm that the UOSA client already has this hack, then a.) somebody here definitely knows about it, and b.) it will be easy to add to my patcher.

The way the UOSA client plays MP3 music is a a bit different from what I would like it to be like. It doesn't play any MP3 files located in 'Music\Digital'.
The UOSA client plays MP3s directly from the 'Music' folder and the file names need to be named exactly like the MIDI counterparts. No customization possible through a 'Config.txt' file to say if certain songs need to loop or not.
The playback also acts exactly the same than the MIDI playback. Once a song has completed playing it starts to play certain other songs and loops them. As far as I know you don't have control over this.
The LBR way of playing music is to have silence after a song has completed unless it has ",loop" specified in the Config.txt file. In that case it plays the same song again and not other random music.

Posts: 36
Joined: Thu Apr 05, 2012 2:46 am
PostPosted: Wed Apr 25, 2012 8:14 am
Gotcha. Thanks for explaining. I saw your post over at UOSA but didn't entirely understand what you were talking about until now.

Site Admin
Posts: 372
Joined: Wed Apr 08, 2009 6:35 am
PostPosted: Wed Apr 25, 2012 10:14 am
The way the UOSA client plays MP3 music is a a bit different from what I would like it to be like. It doesn't play any MP3 files located in 'Music\Digital'.
The UOSA client plays MP3s directly from the 'Music' folder and the file names need to be named exactly like the MIDI counterparts.
The UOSA client contains a music patch made by Dagon. He has not logged on to UOSA forums for more than a year. We've discussed his patch before it came out and I'll probably still have PM's about the internals.

I was working at the same time for a different type of approach using BASS (un4seen):
http://forums.uosecondage.com/viewtopic.php?f=32&t=15395I never released it since I liked Dagon's patch. Simple and did the job. But heck, instead of having my code rotting away on my hard disk. I'll just release it here on these forums later.

But forcing LBR is a nice idea anyways :)

LeonZA, what client versions do plan to "target"?
<Derrick> RunUO AI is kind of a functional prototype, which i have hacked into something resembling OSI behavior, but only by complitcating everything

Posts: 6
Joined: Tue Apr 24, 2012 5:34 pm
PostPosted: Wed Apr 25, 2012 10:57 am
LeonZA, what client versions do plan to "target"?

I think the last version before the Kingdom Reborn changes came in. Before 6.0.0.0. So probably 5.0.9.1.
I also would like to know why 5.0.8.3 was chosen for UOSA istead of say 5.0.9.1. Were there any unwanted changes that happend after 5.0.8.3? If there were then 5.0.8.3 would be my choice otherwise 5.0.9.1.

But forcing LBR is a nice idea anyways :)

I was wondering if there would be any impact if the server set the flag anyway. If there is not impact then we probably don't even need to hack the client.
I am not exactly sure if there were any new skills between T2A and LBR. Were there any UI changes between T2A and LBR?

Site Admin
Posts: 455
Joined: Tue Jun 17, 2008 2:33 pm
PostPosted: Wed Apr 25, 2012 10:10 pm
I will have to check to confirm this, but I belive the 5.0.8.x client is the last one that supports the StringQuery packet 0xAC, this is the menu (not gump) that pops up to let you enter text, and can also limit entry on a maximum number. The Bounty menu on OSI used this menu type.

I'm not sure what all is enabled in the client when the LBR flag is sent, but these flags do control client side game content. The T2A flag enables the Chat button on the paper doll.

Posts: 36
Joined: Thu Apr 05, 2012 2:46 am
PostPosted: Thu Apr 26, 2012 11:10 am
I have two different approaches to the patch I'd like to test (one in the packet handler, and one in the actual music area), but the actual testing environment is pissing me off and I don't have a lot of time to spare. I set up a runuo server with LeonZA's patches, and compiled a custom runuo to send me hardcoded features packet, but I swear the music packets aren't doing anything.

No matter what my client loops the same mp3, even if t2a is only sent, and whether i've patched the client or not.
Next

Return to UO Client

Who is online

Users browsing this forum: No registered users and 1 guest

cron