EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   General::General Discussion (https://www.eqemulator.org/forums/forumdisplay.php?f=586)
-   -   Anyone interested in client development? (https://www.eqemulator.org/forums/showthread.php?t=33432)

Taurinus2 02-16-2012 11:07 PM

Go for it.

When it came time to learn the asio library I decided to do a fun project to bang out some code with. I wrote a CLI client/server remote tool for my private server that features a handful of opcodes and a single port being utilized on either end. A modest project, but one that was finished in one sitting with all planned features.

Also, PixelEngineer, now that I am thinking of it, you will need a tighter timing mechanism because you are going to need to track your frame deltas. I say this because I foresee you needing to preempt certain operations if you do not have enough time to complete for that frame. Let's say for instance you arrive at some processing logic and you see that your delta is 15ms, you know that you must defer and return immediately (60hz = 16.6ms/frame). This assumes single-threaded execution with regard to that particular logic and your rendering but I believe that the principle will still be applicable in any case.

PixelEngineer 02-18-2012 01:30 AM

Great suggestions guys. You are welcome to start on the server/network component. :D

Also, a small update:

- Added support for fragment 29, which deals with regions with water, lava, PVP, etc.
- Added rendering support (temp) for these different regions.
- Plus/Minus keys now do not effect look sensitivity.
- F1 now takes screenshots
- Split, and moved the various text files (CHANGELOG, BUGS, LICENSE, README)

The underwater effect needs some tweaking and the specifics might be found in some of the unknowns in this fragment. I mainly added the fog effect so I could test the accuracy of the implementation.

http://i.imgur.com/CMFH7.png

It also implemented the PVP zones. As someone who has never been in Qeynos, can someone verify that the red X's were not areas that you would be in the PVP area? Only the green highlighted area is denoted in the zone files as the PVP area.

http://i.imgur.com/mOrOk.jpg

Thanks!

Derision 02-18-2012 05:44 AM

If you go in game, to the locations you have marked with an X, and then move back toward the centre of the arena, the client automatically generates the mesage 'You have entered an Arena (PvP) area', so I would say you have it right.

PixelEngineer 02-18-2012 06:02 AM

Quote:

Originally Posted by Derision (Post 207356)
If you go in game, to the locations you have marked with an X, and then move back toward the centre of the arena, the client automatically generates the mesage 'You have entered an Arena (PvP) area', so I would say you have it right.

Fantastic, thank you.

ableard 03-05-2012 02:40 PM

So I have picked his up out of ccuriosity. I have VC 2010, typical versions running of eqemu, no opengl.
We I run in VS the window pops a nd closes. I get no signficant error or messages. Do I need to obtain any opengl distributables?
I have added .s3d file into debug folder, changed ini.
thanks

Taurinus2 03-07-2012 04:55 PM

OpenGL is a standard lib but you do need drivers that provide opengl acceleration.

With VS, you will find that the working directory for targets launched from within VS is the project root and not the target directories.

Putting the .s3d and configuration file into the debug/release folder should work if you invoke lantern from shell or console.

PixelEngineer 03-07-2012 11:16 PM

Can you copy/paste your log.txt file here or if it's huge, PM me with it. I will post the fix here.

PixelEngineer 03-08-2012 06:04 AM

Is anyone here experienced in reverse engineering files? I have been going through and documenting every type of file the client uses. There is one file however, which seems to stump me. The file is denoted by:

<shortname>_sounds.eff

This file is a counterpart to the other file <shortname>_sndbnk.eff which lists files that are either emitted or looped. This file is in plain text.

I am not that experienced in reverse engineering and wanted to know what you guys recommend. I assume the file contains things like x, y, z positions, sound file name, volume, radius and that sort of thing.

It's possibly ZLIB compressed or just a bizarre file format. It has no discernable header so I doubt it's a specific file format. Searches for .eff bring up EverQuest effect format but there are no specifics.

Any help/advice would be greatly appreciate. (hint hint Windcatcher)

:D

Cheers!

Taurinus2 03-08-2012 11:50 AM

Installing an api hook against the client and logging seek/read against files of that extension would be a start. That's half the picture, anyway. The other half is a memory scanner that locates what was just read in the client's memory. You can then trace execution from that point.

ableard 03-08-2012 07:53 PM

thanks for the reply.

Taurinus2 the .s3d is indeed in /debug

Log file

<---> Logfile Initialized on 3-5-2012 at 10:57:24
<---> Preferences from lantern.ini have been read.
<---> Loading zone: gfaydark
<---> Screen width: 640 - Screen height: 480
<-!-> Could not load the PFS archive!
<-!-> Could not initialize the S3D file!
<-!-> Fatal Error: Unable to load zone data!
<---> Fatal Error: Unable to initialize Lantern!

PixelEngineer 03-10-2012 03:45 AM

Quote:

Originally Posted by ableard (Post 207930)
thanks for the reply.

Taurinus2 the .s3d is indeed in /debug

Log file

<---> Logfile Initialized on 3-5-2012 at 10:57:24
<---> Preferences from lantern.ini have been read.
<---> Loading zone: gfaydark
<---> Screen width: 640 - Screen height: 480
<-!-> Could not load the PFS archive!
<-!-> Could not initialize the S3D file!
<-!-> Fatal Error: Unable to load zone data!
<---> Fatal Error: Unable to initialize Lantern!

If you're in Windows, the .s3d should be in the same folder as the SLN. Try moving it there. The error there (so glad I did error logging) is from the .s3d not being found.

PixelEngineer 03-10-2012 03:46 AM

Quote:

Originally Posted by Taurinus2 (Post 207911)
Installing an api hook against the client and logging seek/read against files of that extension would be a start. That's half the picture, anyway. The other half is a memory scanner that locates what was just read in the client's memory. You can then trace execution from that point.

Thank you.

Do you have a guide on how to do this?

Derision 03-10-2012 08:52 AM

Quote:

Originally Posted by PixelEngineer (Post 207898)
Is anyone here experienced in reverse engineering files? I have been going through and documenting every type of file the client uses. There is one file however, which seems to stump me.

The file is denoted by:

<shortname>_sounds.eff

I had a look a this, since it piqued my interest.

First of all, since you suggested it may be ZLIB compressed, I wrote a quick program to read one of the files and then move through it byte by byte and attempt a ZLIB decompress.
That failed, so it wasn't zlib compressed.

The next thing I did was open up eqgame.exe in IDA and found where the string %s_sounds.eff was referenced and looked at the dissasembly.

I could see that it reads the file 84 bytes at a time, and indeed, the few files that I looked at were all multiples of 84 bytes.

Next thing I did was write a quick program to read one of the files, 84 bytes at a time, and print out each group of 4 bytes as both an int and a float.

I could see from my output some floats that looked very like groups of co-ordinates to me, so I went in game and did a #goto to some of them to verify
there appeared to be a sound emitted in that location (some were obvious, like camp fires or steam geysers).

Anyway, this is what I figured out:

Code:

Offset
00                int8 Unknown[12]
12                int32 Sequence Number ?                // Increments by one for each entry in the file
16                float Y
20                float X
24                float Z
28                float Radius?                        // Radius from position that sound can be heard ?
32                int8 Unknown[52]


PixelEngineer 03-12-2012 03:13 AM

Quote:

Originally Posted by Derision (Post 207976)
I had a look a this, since it piqued my interest.

First of all, since you suggested it may be ZLIB compressed, I wrote a quick program to read one of the files and then move through it byte by byte and attempt a ZLIB decompress.
That failed, so it wasn't zlib compressed.

The next thing I did was open up eqgame.exe in IDA and found where the string %s_sounds.eff was referenced and looked at the dissasembly.

I could see that it reads the file 84 bytes at a time, and indeed, the few files that I looked at were all multiples of 84 bytes.

Next thing I did was write a quick program to read one of the files, 84 bytes at a time, and print out each group of 4 bytes as both an int and a float.

I could see from my output some floats that looked very like groups of co-ordinates to me, so I went in game and did a #goto to some of them to verify
there appeared to be a sound emitted in that location (some were obvious, like camp fires or steam geysers).

Anyway, this is what I figured out:

Code:

Offset
00                int8 Unknown[12]
12                int32 Sequence Number ?                // Increments by one for each entry in the file
16                float Y
20                float X
24                float Z
28                float Radius?                        // Radius from position that sound can be heard ?
32                int8 Unknown[52]


Absolutely gorgeous. Thank you so much. I have IDA in my toolbox but I don't really have a great understanding of how to use it. Did you read a guide on it or something?

That leaves virtually no files in the original EverQuest that are unknown now. I am in the process of interviewing for a job so that can explain my absence. I am still however, working on this project and am redoing the way the zones load with WLD classes with several levels of inheritance for their specific purpose.

Thank you again Derision. Very much appreciated.

Taurinus2 03-12-2012 03:38 PM

You payed 1000USD for a license to software you don't know how to use? How did you get your developer confirmation for it?:???:

If you got it through an unauthorized channel (would seem the case) then I can say with high confidence that you are root-kit'd (by someone other than yourself).


All times are GMT -4. The time now is 11:27 AM.

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