PDA

View Full Version : EQ Trilogy Compatibility Layer


Secrets
01-14-2018, 12:20 PM
Here's a project I have been working on: The EQ Trilogy client compatibility layer.


https://i.imgur.com/eOPj4uQ.jpg

Inspired by the Titanium UI made by a popular EQ streamer, I've started working on a compatibility layer that allows you to connect to TAKProject using the Trilogy client as opposed to the EQMac Client. This is an entirely clientsided modification; it requires no changes on the behalf of the TAKProject server, and can potentially be modified in the future to work with any older netcode supported server. NOTE: P99 compatibility could be possible if Rogean or Haynar were to add support for the old netcode while still supporting the new one that Trilogy uses, but is otherwise not possible right now. EQEmu support will require the TAKProject server to be complete as they are otherwise not going to share their codebase until the end of Planes of Power.

Currently, there is support for logging and and basic movement. There's gonna be text chat next, and much more to finish after that.

Here is a video of the stuff in action:
https://www.youtube.com/watch?v=xNmVmerLQu4


Why Trilogy over Titanium?
The Trilogy client is one of the few clients that still has actual era-specific client dangers within. I'd consider it an enthusiast client, whereas Titanium is mainly aimed at modern compatibility and ease-of-access for P99 users.

Some of the features, off the top of my head, that are supported in Trilogy but not Titanium:
- Old, Authentic Stone UI with f10 quick switching support to Velious-era UI.
- Sound for interaction with UI elements
- Night Blindness system
- Inventory viewport
- Classic NPC proximity sounds ("Might I have some copper please?" from beggars, spectre idle noises, scarecrow idle laughs)
- Classic environment effects (UFO in Temple of Life, Everfrost wind tunnels)
- Positional midi activation. (Qeynos example: "Qeynos" midi activation when only in newbie yard and not below Crow's, ambient track that plays when at Temple of Life, multiple tracks per zone)
- Variations on NPC/PC appearance - "White Shirt" human, "Winged" Statue of Rallos Zek / Imps, Epic Mage Pet Transparency
- No support for XML-based UI

In addition to the functionality, there is also the feature set of the Titanium client that will always be imperfect when compared to an era-specific client. Ultimately, Titanium has destroyed the feel and adds a layer convenience of the game.

It would take considerable effort to modify Titanium's graphics and feature support, some of which P99 has already done, to ensure a truly classic experience. TAKProject's willingness to open source their work once Planes of Power is complete gives their project a leg-up on Project 1999, as it will be configurable enough once released for anyone to make their own server as accurate as P99 currently is.

Why Trilogy over EQMac?
EQMac's Windows client doesn't handle the Graphics DLL that well when compared to the ddraw wrapper for EQ Trilogy. It is hacked together to the point where the inventory pane does not work, and merchants will crash the entire game client at times. There are far better graphics upgrades that are possible for DX7 / ddraw compared to DX8, which hasn't had much work in terms of compatibility layers. In addition, DX7 supports era-specific software emulation of hardware graphics tasks, which means that the range of devices supported are ultimately greater.

That's great and I like your project, how does this work?
The project is a multi-part setup. There are four components to this project currently, and they will be condensed (someday when i'm less lazy and further along):

Binary edits to eqgame.exe
Ultimately, these will be patched out via a ddraw dll much later in the project's life, but this allows the client to inject a foreign DLL into the process. It also patches the initial 'handshake' with the world process to use a 200-byte buffer for the initial handshake with a TAKProject server, instead of the 196-byte buffer it normally is.

wsock32.dll aka 'EQEmuLoginHook'
Ah, yes, the old 'that's a fucking virus my dude' method of injection. Eventually going to be moved into ddraw.dll similar to how Rogean's DSETUP.dll works for EQ Titanium, this is responsible for replacing the old "EQWindows" program that used to be used circa 2001 to start multiple instances of EverQuest. This allows the program to be run in a window, and is also responsible for blocking some forms of window input when the client is not in focus. This is needed because dinput is set to a mode to capture 'all' input to the window by default. This project is the result of 2 weeks of work about 3 years ago. I've recently ported it to Trilogy last year, and a copy of the project is located on Github: https://github.com/SecretsOTheP/EQEmuLoginHook/

eqgame.dll aka 'EQTrilogy Compatibility Layer'
This is the result of 3 days of work, slapped haphazardly together, in order to make the old EQStream system from EQEmulator's codebase encode and decode packets incoming and outgoing from the client.

This hooks core networking functions in the EQ Trilogy (or whatever client is targeted) and causes it to:
1) Translate the EQ message (or "opcode" in emulator terms) into an EQ message of the type the server or client actually expects when it goes in and out of the client,
2) Translate the EQ packet data structure (or "buffer/size" in emulator terms) of the packet into one the client or server understands by rearranging the data appropriately,
3) Clean up the previous buffer, and call the appropriate "send message" or "handle world message" functions in the client so that no memory issues or leaks occur.

This is the 'core neworking' library and prior to this was previously server only. We can now do this on the client, with a bit of trickery and assembly knowledge.

ddraw.dll aka 'that DLL that functions as an injector and fixer-upper someday'
Currently only used to repair DirectDraw functionality within Trilogy to improve framerates and duplicate calls, this library will someday replace and combine all above methods into one neat little package. There's no downside to doing it the way I am doing it now, but it's one of those 'would be nice' things so that less streams are crossed between libraries. Never cross the streams.

I like this a lot and I'm a friggin nerd; how can I contribute?
I plan on open sourcing the networking stuff when TAKProject open sources their codebase. Until then, it's pretty much going to be a closed source project due to the level of abuse that is possible with it. Could you imagine if you never sent a 'lol im drowning' packet, or a 'lol i fell' packet because you commented out the send handler for that packet? Stuff like that is what I am trying to avoid, per TAKProject's request.

You're welcome to stay up to date with this project in this thread and I also am posting it under #cool-stuff in EQEmulator's discord. Please don't PM me there; post in the channel. I have a job unlike the entire guilds of Awakened/Aftermath that requires attention. https://discord.gg/QHsm7CD

The EQ Trilogy network compatibility layer will have limited binary releases when I complete milestones. You're welcome to download and contribute to the DX7/DDraw/DInput/WinAPI part of things located in EQEmuLoginHook, if that's your forte though. I'm sure it sucks and can be improved.


Lastly?
Lastly, would like to give some shoutouts to some awesome people who made this little endeavor possible.
Harakiri, Yeahlight, Cofrubren, and Tazadar of EQClassic.org - For everything you've done to document the opcodes/structures in your public release. Without these folks, this wouldn't have been as quickly done as it is now.
unnamed twitch streamer - for being the inspiration behind this project. :cow2:
Akkadius - for saying "ok" to me in Discord several times.
Haynar, Robregen, Speedz, Torven, cavedude of PEQ and TAKProject.net - continue doing awesome stuff and keeping the EQMac dream alive. You guys rock.
Rogean & Nilbog - for keeping the lights on in this forum and keeping the vision alive in the hearts and minds of classic EQ enthusiasts.

loramin
01-14-2018, 12:37 PM
Pretty cool project Secrets. Not sure I like the idea of playing with the old school UI (even if it is the Velious one), but it certainly would be more classic (and having night blindness would make me feel more like a "real" Barbarian ;) ).

zodium
01-14-2018, 12:50 PM
Very immersive!

Rygar
01-14-2018, 12:54 PM
Getting me excited here. Implement classic UI and later Velious UI as an option Nilbog / Rogean!

Secrets
01-14-2018, 01:07 PM
Getting me excited here. Implement classic UI and later Velious UI as an option Nilbog / Rogean!

Unfortunately it's a long, long ways away from that. While not impossible it'd require significant work (on both mine and P99 staff's end) to get it implemented in EQ Titanium's netcode.

skarlorn
01-14-2018, 01:17 PM
Unfortunately it's a long, long ways away from that. While not impossible it'd require significant work (on both mine and P99 staff's end) to get it implemented in EQ Titanium's netcode.

So...?

Get started working hard. I'm expecting 6 day weeks 10 hrs a day not including your 15 minute lunch break. I'm not paying anything for nothing!

*snaps fingers imperiously*

Rygar
01-14-2018, 02:02 PM
Unfortunately it's a long, long ways away from that. While not impossible it'd require significant work (on both mine and P99 staff's end) to get it implemented in EQ Titanium's netcode.

Put me in coach!

Izmael
01-14-2018, 04:41 PM
- Night Blindness system

This totally needs to be made mandatory on P99. Please!

Mblake1981
01-14-2018, 04:53 PM
https://i.imgur.com/eOPj4uQ.jpg

The Trilogy client is one of the few clients that still has actual era-specific client dangers within. I'd consider it an enthusiast client, whereas Titanium is mainly aimed at modern compatibility and ease-of-access for P99 users.

- Old, Authentic Stone UI with f10 quick switching support to Velious-era UI.
- Sound for interaction with UI elements
- Night Blindness system --- Racial Abilities
- Inventory viewport
- Classic NPC proximity sounds ("Might I have some copper please?" from beggars, spectre idle noises, scarecrow idle laughs)
- Classic environment effects (UFO in Temple of Life, Everfrost wind tunnels)
- Positional midi activation. (Qeynos example: "Qeynos" midi activation when only in newbie yard and not below Crow's, ambient track that plays when at Temple of Life, multiple tracks per zone)
- Variations on NPC/PC appearance - "White Shirt" human, "Winged" Statue of Rallos Zek / Imps, Epic Mage Pet Transparency

The subtle things that are removed when the min/max approach gets a grip on the game world. I use Classic HD enhancement, PaulG sounds mods and Cucumbers QQ UI. If these talented folks built a Granite UI that looks correct with interaction/functionality it would be excellent.

erfg12
01-14-2018, 09:53 PM
Very exciting stuff! I'm always willing to help if testing is needed. :)

Dolalin
01-15-2018, 02:23 AM
Will the same anti-cheat protections be viable with this older client as with Titanium?

Secrets
01-15-2018, 02:40 AM
Will the same anti-cheat protections be viable with this older client as with Titanium?

Something like P99 does can be done easily in any closed-source client modification. As this is more of an 'open-ended' mod that I'd like to eventually share with other programmers, this kind of thing is outside of the scope of what I am trying to do.

Short answer: Yes. There's no MQ2 for the client in question and no XML-based interface, so it'd be extremely hard for even someone like eqmule to put together anything of value MQ2-wise for this client. That's not to say it's not impossible to do a MySEQ style application, but it severely limits the capability of what you can do with the client.

Cheating in EverQuest beyond 'SEQ'-style applications are easily detected on the server, regardless of any client-side protections and will never be a concern.

Also, as the target project for this is TAKProject, which has GM-enforced rotations, cheating will never be a concern as you only get a personal advantage as opposed to a leg up on another guild.

Secrets
01-15-2018, 06:22 AM
https://www.youtube.com/watch?v=HVBMvZx30Po

doors/lifts now work. sup

khandman
01-15-2018, 09:02 AM
Does the screen 'freeze' whenever a Windows UAC prompt is brought into focus?

This is one of the annoyances with the Titanium client where when I am playing if a UAC comes into focus for credentials, it causes the screen to freeze even though you can still hear audibly action going on in the background. My fix for this annoyance is to switch screen modes, Fullscreen -> Windowed, or visa versa.

Because you mentioned earlier that this project allows the running in a window, I wondered if it would suffer from this kind of annoyance.

Cheers

d3r14k
01-15-2018, 09:34 AM
That screenshot really flashes back some thick nostalgia. Oh...memories of the first time I logged into this game. Back when we were all horrible at EQ and knew nothing about the game. When we'd romp over to LFay only to get gang banged by brownies. I'm not sure exactly how we even managed with that thing starting out. The viewing area is so damn small.

Side question if you happen to see this: I know via the old "super-classic" UI, when opening your spell book you'd have to stare at your spells and make sure the "Meditate" button was pushed in. Is that an issue with this UI? I know this was remedied later by sitting = meditation, so it's probably an irrelevant question.

In closing, you said it was a ways off, but I'd love to use this to some degree when the product is finished. I have no coding or computer aptitude, so the only thing I can do is wish you well! It makes me happy that people are still working on things like this.

I have a job unlike the entire guilds of Awakened/Aftermath that requires attention.

Oh and even a zinger tossed in there!? I like you.

indiscriminate_hater
01-15-2018, 10:41 AM
https://www.youtube.com/watch?v=HVBMvZx30Po

doors/lifts now work. sup

A+ toon name

Secrets
01-15-2018, 11:42 AM
Does the screen 'freeze' whenever a Windows UAC prompt is brought into focus?

I don't use UAC so I wouldn't know, sorry :(

My guess is it'd work but perform a 'device reset' and have similar functionality to hitting ctrl alt delete in Win10, which currently doesn't cause a freeze or crash, but instead makes the UI look trippy until you move the mouse over the screen like some Windows 98 application freeze used to do.

Kaino
01-15-2018, 01:25 PM
start a patreon, i want this

Sorn
01-15-2018, 02:01 PM
This is cool. Right now TAKP's mac client is a little on the buggy side for me (I'm on a mac, also), so I'd be interested in trying out the Trilogy client just to see if that's better.

Getting it to work with p99 is probably just a pipe dream :(

Lulz~Sect
01-15-2018, 02:19 PM
Xhe’s doing Tunare’s work

Mblake1981
01-15-2018, 03:49 PM
Side question if you happen to see this: I know via the old "super-classic" UI, when opening your spell book you'd have to stare at your spells and make sure the "Meditate" button was pushed in. Is that an issue with this UI? I know this was remedied later by sitting = meditation, so it's probably an irrelevant question.

Until level 20 milestone when you got your surname, then you could sit down and med without the book being open. Had to listen for trouble around you. I don't remember how it functioned with the Velious UI.

d3r14k
01-15-2018, 04:05 PM
Until level 20 milestone when you got your surname, then you could sit down and med without the book being open. Had to listen for trouble around you. I don't remember how it functioned with the Velious UI.

Good call. I was ultra new around the vanilla timeline (as was everyone else, I guess), so I can't say I ever got past level 20 until after they made the change.

nilbog
01-15-2018, 07:10 PM
I was going to award classic points, but this goes beyond that.

Secrets will henceforth be known as a classic points generator.

Danth
01-15-2018, 07:29 PM
Secrets' screenshot shows the candle that human (and I presume barbarian and Erudite) characters started with. Thing was pretty dim and didn't help a whole lot.

Danth

Secrets
01-15-2018, 07:32 PM
Until level 20 milestone when you got your surname, then you could sit down and med without the book being open. Had to listen for trouble around you. I don't remember how it functioned with the Velious UI.

The UI will switch to the stone brick UI when typing /book - there is no meditate button on the velious UI, only the stone brick UI.

https://i.imgur.com/4yCEgft.png

Secrets
01-15-2018, 07:38 PM
Secrets' screenshot shows the candle that human (and I presume barbarian and Erudite) characters started with. Thing was pretty dim and didn't help a whole lot.

Danth

Indeed; the candle sucks! I actually have a character stuck in the bottom of the Rogue's guild in Qeynos because I cannot find my way out of the pit. The danger is real.

Here's DX7:

https://i.imgur.com/9N9GjI7.png

Here's DX8:

https://i.imgur.com/ch7LMQH.png

nilbog
01-15-2018, 07:39 PM
In August 2000, they removed the necessity of clicking the 'meditate' button while spellbook was open, and also removed the /meditate command. Meditating still required the spellbook to be open, prior to level 35.

AUGUST 30, 2000

Opening your spellbook will automatically cause you to begin meditating providing that you have the skill.
Removed the /meditate command since it is no longer necessary.Pre-35 spellbook meditating was removed altogether in 2002.

MARCH 19, 2002

Spell casters no longer need to see their spell book when meditating. Once a character has the meditation skill, it will function when the character is sitting down.

Danth
01-15-2018, 07:39 PM
You had to meditate with the book open (ie, you couldn't see anything) until level 35. This remained the case throughout the classic period.

The button was a separate thing. At first you had to press it to turn on meditate but that was patched and made automatic at an earlier date. I don't remember exactly when but it was gone by early Velious. EDIT: August 2000 for button removal, per Nilbog.

The only thing that was really wrong with the periscope window UI (aside from the annoying single chat window) was that buff icons were rather large and took up excessive amounts of screen space on the right side of the view area. You could click a button to hide them but then you wouldn't notice when short duration buffs faded. Although the view area itself was relatively small, when not blocked by buffs the actual view was greater than on a modern widescreen. Widescreen resolutions letterbox the view and effectively cut off the top and bottom of the screen, while the overlaid UI elements cover up that much more of it.

Danth

Rygar
01-15-2018, 08:23 PM
Until level 20 milestone when you got your surname, then you could sit down and med without the book being open. Had to listen for trouble around you. I don't remember how it functioned with the Velious UI.

I believe this to be false to a degree... During my classicQuest research it apparently was level 35, then changed again to 20.

Edit: it looks like master Nilbog beat me to it

khandman
01-15-2018, 10:59 PM
I don't use UAC so I wouldn't know, sorry :(

My guess is it'd work but perform a 'device reset' and have similar functionality to hitting ctrl alt delete in Win10, which currently doesn't cause a freeze or crash, but instead makes the UI look trippy until you move the mouse over the screen like some Windows 98 application freeze used to do.

Hi hi

I don't think Ctrl Alt Del would cause the same behaviour as I described unless that action invokes the consent.exe, but with UAC off or disabled then it may be a non issue.

Secrets
01-16-2018, 12:19 PM
Hi hi

I don't think Ctrl Alt Del would cause the same behaviour as I described unless that action invokes the consent.exe, but with UAC off or disabled then it may be a non issue.

Ctrl Alt Delete causes a device reset in Win10, which is why consent.exe does what it does.

Both are technically fullscreen applications.

paulgiamatti
01-16-2018, 01:56 PM
I hope one day this could be a required client to access P99.

#dreamsofgreen

Secrets
01-16-2018, 03:08 PM
Merchants work. No more mage guildmaster merchants. Still gotta fix stack sizes clientsided, but they're at least calculated on the server.

https://www.youtube.com/watch?v=IKjQQLAAU1M

Secrets
01-16-2018, 03:22 PM
Fixed stack sizes. Works with merchants.

https://www.youtube.com/watch?v=8C57BdhDzCw

Mblake1981
01-16-2018, 03:48 PM
This. This is necessary for complete immersion.

I hope one day this could be a required client to access P99.

mhmm.

P99 launcher that plays the original intro. Two screens with 989 studios and Verant, replace those with p99 Dev Team and Day Break. Skip them by pressing enter key just like back in the day. Original log in and server select screens. Original character creation and select screens. Tutorial option.

Sage Truthbearer
01-16-2018, 05:54 PM
Some of the features, off the top of my head, that are supported in Trilogy but not Titanium:
- Old, Authentic Stone UI with f10 quick switching support to Velious-era UI.
- Sound for interaction with UI elements
- Night Blindness system
- Inventory viewport
- Classic NPC proximity sounds ("Might I have some copper please?" from beggars, spectre idle noises, scarecrow idle laughs)
- Classic environment effects (UFO in Temple of Life, Everfrost wind tunnels)
- Positional midi activation. (Qeynos example: "Qeynos" midi activation when only in newbie yard and not below Crow's, ambient track that plays when at Temple of Life, multiple tracks per zone)
- Variations on NPC/PC appearance - "White Shirt" human, "Winged" Statue of Rallos Zek / Imps, Epic Mage Pet Transparency
- No support for XML-based UI

And classic name plates. The Titanium client introduced a drop shadow on the text. Ruins my immersion.

Snagglepuss
01-16-2018, 09:45 PM
I remember getting lost in the tunnel to Sure Fall Glade all the time. I’d put off selling because I’d get so mad. Why is it all black! I need to buy a lantern!

Cylock
01-16-2018, 09:51 PM
Looks good secrets :)

Old_PVP
01-16-2018, 09:58 PM
Ahh, now that's the classic UI I know and love. P99 needs this STAT!

Sillyturtle
01-16-2018, 11:09 PM
Secrets, can I give you hugs? With my mouth?

/wink

Following the development of this with extreme interest. :)

jimm0thy
01-18-2018, 06:10 PM
This is amazing. I was following the EQClassic project for awhile and have a physical copy of Trilogy. Can't wait for this to get further along

Ravager
01-19-2018, 05:58 PM
Eagerly anticipating a truly classic EQ server. Happy to see the dream is alive.

Aquelin
01-23-2018, 12:08 AM
Nice work, Secrets! Would love if the supposed Green server was able to make use of this. Miss those classic skies and lighting!! :(

clacbec
02-06-2018, 07:01 PM
This

nitoo
04-12-2018, 03:00 AM
Ha, so there is a true classic EQ in the works then !

I was so desperate to experience the game as I have in its beginning, this gives me a bit of hope...

coolget
04-12-2018, 06:12 PM
kewl