View Single Post
  #19  
Old 07-29-2016, 04:16 PM
fb9 fb9 is offline
Large Bat


Join Date: May 2015
Posts: 14
Post middlemand - further Instructions

Received a pm request to expand upon the mini instructions I had provided a few posts back on how to implement the middlemand utility that mighty Zaela developed. Figure if one person needs it now then untold may need it in the future. Us Linux rookies gotta stick together! :P

Middlemand by Zaela filters the EQemu server list to only display P99 severs -- often fixing the 'blank server selection screen' problem for Linux clients. Note, one can always just try connecting over and over until the servers do display (10-30 times?); tedious, but functional in a pinch! Note, Zaela has also released a 'eqemu login helper' utility that is similar. Link below for those wanting to try that -- I have never tested it. Classic middlemand has been nearly flawless for me. Can't comment further -- he's the mastermind.

Most folks I presume breezed through this install, but for us rookies it can seem a bit more daunting. This is not 'the one and only true way' to accomplish install, but should you to success. Merely [exactly] what I did, individual results may vary, acknowledge some possible shortcuts for the advanced cool kids. [You must be logged in to view images. Log in or Register.]

Step 1 - Download Zaela utility.
Link to Image - Step 1 Download

Browse to https://github.com/Zaela/p99-login-middlemand
Click to download the .zip file. We presume your browser is going to automatically place it in your Home directory /Downloads. (~/Downloads)
If not, you'll need to figure out the 'where' and make adjustments.

Step 2 - Terminal Time.
Link to Image - Step 2 Terminal Commands

Step 2a) Under our user home directory, we make 'bin' directory to later place our compiled binary.
Code:
mkdir ~/bin
Step 2b) Navigate to where we downloaded the utility .zip file. As mentioned in Step 1, it will probably be under your ~/Downloads directory, unless you are configured differently or did something advanced.
When typing the commands, I'll list the 'full text' in the code block, but save yourself the trouble and use Tab key to auto complete text. For example, you can probably just type 'cd Down'<Tab> for this step. If Tab isn't responding then it means there are multiple matches and you need to give it a few more letters. For example, there is probably also a 'Documents' folder, so if you only did 'Do'<Tab> then it would not be certain which directory you are attempting to auto complete for. Along the way if you attempt a Tab shortcut, keep adding letters as needed so that auto complete will work -- you may already have some 'p99' created items that would require you to lengthen the text before Tab works. Capitalization matters for your directory structure, so don't try a lowercase 'downloads' for 'Downloads'.
Code:
cd Downloads
Step 2c) The middlemand download comes bundled up as one .zip file. We will extract it so the contents inside can be utilized. Hint, probably can 'unzip p99'<Tab> as a shortcut so don't have to type it all out. When the file is unpacking, you'll see it scroll a list of all the content being inflated/extracted.
Code:
unzip p99-login-middlemand.zip
Step 2d) Navigate under the newly extracted directory that contains the files. Hopefully by now you are catching on; try 'cd p99'<Tab>
Code:
cd p99-login-middlemand
Step 2e) It is now time to build the utility from source code. Remember your capitalization on 'Makefile'. A few lines will scroll while it processes.
Code:
make -f Makefile
Step 2f) Once compiled, the new program will exist under a 'bin' subdirectory, let's navigate there.
Code:
cd bin
Step 2g) Now we want to copy the compiled program to the bin location we created in Step 2a. Hint; 'cp p99'<Tab>'~/bin'
Code:
cp p99-login-middlemand ~/bin
Step 3) Modify eqhost.txt
Hopefully you know where you installed EQ at on your disk - For me, that start of that path is ~/.wine/drive_c/
I followed the instructions provided by mgellen in the link below; albeit happened to change the exacting path from \Program Files\Everquest to \Games\Everquest.
Figure out where your install is, and browse [or terminal navigate] to it so we can modify your eqhost.txt file with your favorite text editor.

You have already have a shortcut/shell script used to launch the game (again for me, from mgellen post) -- this script will probably contain the path as well. (See step 4 for example text).

This eqhost file comes bundled with the P99 patches, and contains the text:
[LoginServer]
Host=login.eqemulator.net:5998


We will be changing it so that instead of querying login.eqemulator.net for our server list [and having it fail], we are querying our own local computer for that list -- a local list generated by middlemand!

Code:
[LoginServer]
Host=localhost:5998
Note that when applying future P99 updates, you'll need to be mindful of this file wanting to be overwritten if not careful. It won't 'break' anything other than you'll no longer be taking any advantage of all this hard work. Simply 'never' overwrite the file, or modify once again to these newly correct settings.

Step 4) Launch middleman daemon during EQ runtime
One could manually execute middlemand ['~/bin/p99-login-middlemand'] (..which may be a smart way to test it at first to make sure thigns are working!) or even have set it up to always be running in the background, but I really groove on the automated Start-Stop solution provided by mgellen!

As mentioned in Step 3, you happened to follow existing mgellen steps then will have a .sh script that has some action such as:

export WINEPREFIX=$HOME/.wine/
cd ~/.wine/drive_c/blah/blah/pathTo/EverQuest
taskset -c 0 padsp wine eqgame.exe patchme 2>/dev/null


That /blah/blah/pathTo is just a sample -- depends on where you told the game installer to go to.

There is probably more to this file (such as comments), but those are the sample commands that are launching the game.

Following the echo pid/kill advice mgellen provided, we can configure our game launcher to automatically Start and Stop middlemand when playing the game. Formal link below, but cut to the chase for what I have.

p1999-middlemand.sh
Code:
#!/bin/sh
# Launch logonserver middleman daemon
echo Launch middlemand
~/bin/p99-login-middlemand & echo $! >/tmp/p99middle.pid

echo
echo Launch EQ
# if you don't have the script's cwd set, you get XML errors
export WINEPREFIX=$HOME/.wine/
cd ~/.wine/drive_c/blah/blah/pathTo/EverQuest

# Bind to one core of the processor and launch.
# The client will spew a lot of errors, especially every time
# you target a mob, hence the stdout/stderr redirect.
# You probably want to leave off the 2>/dev/null until you're satisfied
# everything is working.

taskset -c 0 padsp wine eqgame.exe patchme 2>/dev/null

echo
echo Close middlemand
# Kill logonserver middleman daemon
kill -9 $(cat /tmp/p99middle.pid)
Step 5) Test, try, enjoy!

Related links, thinkgs that helped me along the way:

Zaela: p99 middleman deamon
http://www.project1999.com/forums/sh...81&postcount=9
https://github.com/Zaela/p99-login-middlemand

Zaela: eqemu login helper
http://www.project1999.com/forums/sh...8&postcount=15
https://github.com/Zaela/eqemu-login-helper

mgellan: middleman only runs while EQ is running
http://www.project1999.com/forums/sh...?p=2166116#170

mgellen: Running EQ under Linux
http://www.project1999.com/forums/sh...ad.php?t=14125

Few bonus notes:
As you'll find mentioned elsewhere for getting this working, VertexShaders=FALSE and WindowedMode=TRUE (plus correct resolution Width/Height values) were critical to getting the game working correctly at all for me. Find your eqclient.ini under the install path and make note of the follow settings. I used '....' to express bulk content that exists in the file but is not relevant us right now. Don't delete that content nor copy/paste exactly what I have below; just reference these values and make purposeful manual changes!
Note, my laptop display is operating at 1366x768 resolution. Your resolution may be different -- we'll want to look it up and make smart choices.

eqclient.ini
Code:
[Defaults]
....
VertexShaders=FALSE
...
WindowedModeXOffset=-1
WindowedModeYOffset=-19
WindowedMode=TRUE

[VideoMode]
Width=1366
Height=768
....
WidthWindowed=1366
HeightWindowed=768
WindowedWidth=1366
WindowedHeight=768
One way to look up your resolution is to use the xrandr tool at the terminal.
Run it to get display details. Add a '| grep current' to possible filter out the extra unneeded details;
Link to Image - xrandr Results
Code:
xrandr | grep current

You'll also note I have a WindowedModeXOffset and WindowedModeXOffset offset listed. These are to shift the Window 'Up and Over' so that it appears mostly fullscreen while being still in Windowed mode. You can manually do this via mouse click-dragging on title bar (might not be able to get 'small' enough numbers that way). My initial quick drag-drop approach resulted in numbers like 4 & -15; expect something along those lines in your file at first. Edit them to 'lower' values if you want to get that window perfectly tight against the edge.

The end.
Thank you for your time. [You must be logged in to view images. Log in or Register.]
Reply With Quote