Project 1999

Project 1999 (/forums/index.php)
-   Blue Server Chat (/forums/forumdisplay.php?f=17)
-   -   EQ Trilogy Compatibility Layer (/forums/showthread.php?t=288754)

Secrets 01-14-2018 12:20 PM

EQ Trilogy Compatibility Layer
 
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

Quote:

Originally Posted by Rygar (Post 2638310)
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

Quote:

Originally Posted by Secrets (Post 2638319)
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

Quote:

Originally Posted by Secrets (Post 2638319)
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

Quote:

- Night Blindness system
This totally needs to be made mandatory on P99. Please!

Mblake1981 01-14-2018 04:53 PM

Classic Art Style & Ultrawide Screens
 
Quote:

Originally Posted by Secrets (Post 2638287)
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. :)


All times are GMT -4. The time now is 06:39 PM.

Powered by vBulletin®
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.