Page 1 of 1

eq batch files

Posted: Sat Mar 31, 2018 3:11 am
by nobody2
just in case anyone wanted the powershell command or help setting up a batch file to load all of your toons and automate teh entire process:

_______________eq.bat contents_______________
@echo off
cd c:\games\mq2-rof2\
start EQBCServer.exe
start MacroQuest2.exe
TIMEOUT 2
start "" /b "C:\Users\Desktop\Desktop\EQ\zLogin - Player1.lnk"
TIMEOUT 15
start "" /b "C:\Users\Desktop\Desktop\EQ\Login - Player2.lnk"
TIMEOUT 10
<as many as you need>
TIMEOUT 10
PowerShell "ForEach($PROCESS in GET-PROCESS eqgame) { $PROCESS.ProcessorAffinity=15}"
exit
___________________________________________

the links have the /login:username switch and autologin takes it from there, of course. easy to keep all your individual character links in a folder hidden away.. and easy to edit or make multiple bat files with various combinations of characters. edit and "save as" etc...

The "z" i have in front of player1 is just indicating a different client with max video settings.. i have 2 copies of rof2 installed. one has extremely reduced globalload, vid settings, and even how far they can see is reduced. anything i could to reduce resources. think twice on reducing the large/medium/small memory choice -- if you have tons of RAM, it's better to use the "large" or "normal/medium" [sic] setting. less swapping = faster response. only reduce that if you have limited RAM problems.

i have a fairly old pc... however you do need enough time for the last eq client to load before the powershell command is used in the .batch file. -- just make sure it's loaded and running before the powershell command gets used. 10s should be safe for even an older pc... verify through windows Task manager.. right click eqgame.exe in process list and check "set affinity" is using all cores for the last loaded client.

if you use the powershell command too early, the normal eqclient.ini (CPUAffinityX=Y) will set it to use one core AFTER the powershell command gets used and cancel its intended effect.

"15" is to share the first 4 cores... "255" is to share the first 8 cores... it's a bitmask added up to indicate mulitple cores for use... you can make it use any specific core with an individual # or share across multiple cores by adding them together. e.g. "129" would share between core0 and core7 (1 and 8).

1 -- 1st core (=core0, or 2^0)
2
4
8 -- 4th core (to share across the first four cores is 15 -- refered to as core "3", not "4", you start at "0" for "1")
16
32
64
128 -- 8th (share across all 8 is 255)
256
512
1024
2048 -- 12th
4096
8192
16384
32768 --16th core

No idea if this will work as written above in windows 10... syntax may have changed.. but still possible, i'm sure.

if you have 8+ cores, you could leave some open for firefox or other applications to run in background.. this gives total control of divying up the cores in a specific manner.

when i had each client singled to 1 core or sharing 1, the main box with full graphics was 80-90% peak cpu0 utilization and the 2 cores with 2 toons each were ~40% peak. after i used a shared affinity to all cores for eqgame.exe, it's ~30-35% peak cpu utilization on any one core and ~20% most of the time on each. So, it definitely reduced my overall cpu utilization % while running 6 toons. (values returned by CoreTemp app)

also, i noticed a slight improvement when zoning 6 characters at the same time -- like alll toons using Origin at same time etc.

one note -- do not count virtual cores or similar b.s. as it's own core.. physical cores only. (e.g. intel calls it ?hyperthreading? and my 4cores magically show as 8, but the virtual cores are a gimmick for anything outside of DB's or video encoding -- i.e. huge amounts of math calculations and it *might* be worth it. better to turn that feature off in bios for 99% of users. it has even been shown to be slower with certain programs when it is enabled. just extra heat and an e-peen for 99% of users -- especially for any 3d video game.

2nd note -- maybe duo-cores won't be able to do this? if you can't move around easily, this is an old bug.. it doesn't happen to me, so not sure if it's still a "thing" or not. pretty sure the RoF2 client won't have a probelm. although, with titanium or UF you may want to try with one toon, first.

Re: eq batch files

Posted: Sat Mar 31, 2018 2:18 pm
by Control
nice, thanks for the writeup! I guess you don't get random crashes when sharing cores? Not sure if that affects everyone, but I've ran into it on my last few machines. Changing to 1 instance per core fixes it

Re: eq batch files

Posted: Sun Apr 01, 2018 12:34 am
by nobody2
i've never had a crash. i'm sure it's possible.

i7-2600k older chip. i don't overclock, either. so, just 4 3.4ghz cores. this chip pre-dates rof2 by at least a year, i think... the rof2 client is definiteyl newer.

if i recall, when i first tried titanium years ago with eqemu, panning the camera left and right was impossibly slow or something whacky out of control type problem - can't recall if that was related? think i set it to one core and it was fixed or related to aspect ration changes etc. * or did i change the reso? too many years for my memory to retain the specifics now.

The rof2 client is new enough that it should not have this sort of problem. in june of 2012, multi-core was the norm/heavy majority by then. i wouldn't be so confident with UF or titanium. still worth the try.