Hi
I thought I would share how I run the game and my "Notification" criteria for D2Stats (Barb --> based on following the build "The TLDR 2H Barb")
Steps 1 to 4: will change
Priority,
Affinity Delegation (Processor cores) AND
Powerplan for the game
and D2Stats
1. Creating and saving: Main Batch file to execute
everything.
Open new Notepad file and type the code in the following
spoiler (
star/asterisk =
replace with your
windows username)
► Show Spoiler
@echo off
C:
CD "C:\Users\******\AppData\Local\Programs\medianxllauncher"
:loop1
tasklist /FI "IMAGENAME eq Median XL Launcher.exe" 2>NUL | Find /I /N "Median XL Launcher.exe" > NUL
if %errorlevel%==1 goto end1
WMIC process where name="Median XL Launcher.exe" call setpriority "128"
goto :exit1
:end1
START "" /affinity F0 "C:\Users\******\AppData\Local\Programs\medianxllauncher\Median XL Launcher.exe"
ping 127.0.0.1 -n 6 > nul
WMIC process where name="Median XL Launcher.exe" call setpriority "128"
goto loop1
:exit1
WMIC process where name="Median XL Launcher.exe" call setpriority "128"
CD "C:\Diablo II\"
START "" "C:\Diablo II\D2Stats.exe"
C:
CD "C:\Users\******\Document\D2sigmaSetup\"
:loop2
tasklist /FI "IMAGENAME eq Game.exe" 2>NUL | Find /I /N "Game.exe" > NUL
if %errorlevel%==1 goto end2
WMIC process where name="Game.exe" call setpriority "128"
goto :exit2
:end2
ping 127.0.0.1 -n 6 > nul
WMIC process where name="Game.exe" call setpriority "128"
goto loop2
:exit2
START "" "C:\Users\******\Document\D2sigmaSetup\D2MainD2.ahk"
WMIC process where name="Game.exe" call setpriority "128"
powershell -executionpolicy bypass -file "C:\Users\******\Document\D2sigmaSetup\set_GameX_affinity_priority.ps1"
Taskkill /IM CONHOST.exe /F
EXIT
From the code:
"C:\Users\******\AppData\Local\Programs\medianxllauncher"Depending on where you saved the Launcher, you will maybe need to amend this line to (besides username) the location of the launcher.
"C:\Users\******\Document\D2sigmaSetup\" & "C:\Users\******\Document\D2sigmaSetup\D2MainD2.ahk"This is where I keep my AutoHotkey folder and AHK (& PS/PowerShell) file I use for D2 Sigma --> to rotate between skills and buffs. (I recommend everyone to create one, as it will save lots of time, and will be useful during your exploration in Sigma Universe).
Just rename this section to your win username or remove both these rows if you're not going to use AHK.
"C:\Users\******\Document\D2sigmaSetup\set_GameX_affinity_priority.ps1"This is where I store my PowerShell file to amend: Process&Core-setup (the code for that file can be found further down --> step 3).
2. Saving the BAT-file
A: Save this file as what ever&where ever you want.
B: You will need to rename the type of file to:
BATExample: "D2Sigma
.Bat"
3. Creating and saving: PowerShell batch file to execute amendment of:
Priority of the Process & Affinity/Core delegation & Change of Powerplan.
Open new Notepad file and type the code in the following
spoiler:
► Show Spoiler
# elevate privileges if we are not running as Administrator, so we can set affinity of Windows owned processes
# source:
http://superuser.com/questions/108207/h ... inistratorparam([switch]$Elevated)
function Test-Admin {
$currentUser = New-Object Security.Principal.WindowsPrincipal $([Security.Principal.WindowsIdentity]::GetCurrent())
$currentUser.IsInRole([Security.Principal.WindowsBuiltinRole]::Administrator)
}
if ((Test-Admin) -eq $false) {
if ($elevated) {
'tried to elevate to full privileges, did not work, aborting'
} else {
'running my self again with full privileges'
Start-Process powershell.exe -Verb RunAs -ArgumentList ('-executionpolicy bypass -noprofile -file "{0}" -elevated' -f ($myinvocation.MyCommand.Definition))
}
exit
}
'running with full privileges'
# set affinity of all processes to CPU 3 and CPU 4
# it prints processes that it was unable to set affinity of
# source:
https://digitaljive.wordpress.com/2011/ ... owershell/# 1 (CPU 1)
# 2 (CPU 2)
# 4 (CPU 3)
# 8 (CPU 4)
# 16 (CPU 5)
# 32 (CPU 6)
# 64 (CPU 7)
# 128 (CPU 8)
# “Idle” {[uint32]$priorityin = 64; break}
# “BelowNormal” {[uint32]$priorityin = 16384; break}
# “Normal” {[uint32]$priorityin = 32; break}
# “AboveNormal” {[uint32]$priorityin = 32768; break}
# “HighPriority” {[uint32]$priorityin = 128; break}
# “RealTime” {[uint32]$priorityin = 256; break}
# 240 = sista fyra av 8 kärnor
$affinity = 16 + 32 + 64 + 128
$priority = 128
'setting all processes to affinity: '+$affinity
'processes unable to set affinity of: '
$allProcesses = Get-Process "Game", "Median XL", "Game.exe", "Median XL.exe", "Median XL Launcher.exe", "Median XL Launcher", "D2Stats.exe", "D2Stats"
foreach ($process in $allProcesses)
{
try {
$process.ProcessorAffinity = $affinity
$process.priorityclass = $priority
$p = gwmi -NS root\cimv2\power -Class win32_PowerPlan -Filter "ElementName ='H��restanda'"
$p.Activate()
}
catch {
$process
$process.priorityclass = $priority
$p = gwmi -NS root\cimv2\power -Class win32_PowerPlan -Filter "ElementName ='H��restanda'"
$p.Activate()
}
}
From the code:
$p = gwmi -NS root\cimv2\power -Class win32_PowerPlan -Filter "ElementName ='H��restanda'"As I'm using a laptop, I need to change the powerplan when I'm playing games, (& ofc where the adapter is connected to the outlet).
Change "H��restanda" to your gaming powerplan (if you have one).
Or simply remove this/these lines, if you don't want to change/dont have powerplan.
4. Saving the PS1-file
A: Save this file by naming it "set_GameX_affinity_priority" and make sure the directory (where you save the file) is the same as stated in the BAT-file:
Code line: powershell -executionpolicy bypass -file "
C:\Users\******\Document\D2sigmaSetup\set_GameX_affinity_priority.ps1"
Thus the folder to save the file: "C:\Users\******\Document\D2sigmaSetup\" (or the directory you have manually changed in the BAT-file for "set_GameX_affinity_priority.ps1".
B: You will need to rename the type of file to:
ps1Example: "set_GameX_affinity_priority
.PS1"
----------
5. My endgame D2Stats Notifier for the
Barbarian class, can be found in the following
spoiler:
Remember, save your old "Notifier setup in a text document as backup, in case you regret using mine.Just paste the text to your notifier tab
► Show Spoiler
1 2 3 4 unique
sacred unique # Sacred uniques
"Ring$" unique # Unique jewelry
"Amulet$" unique # Unique jewelry
"Jewel$" rare # Unique jewelry
"Jewel$" unique # Unique jewelry
"Quiver" unique
set
"Belladonna"
"Shrine \(10" # Shrines
#"Quiver" rare
"Ring$" rare # Rare rings and amulets
"Amulet$" rare # Rare rings and amulets
"Jewel$" rare # Rare rings and amulets
sacred eth superior rare
"Signet of (Skill|Learning)"
"Greater Signet"
"Emblem"
"Trophy"
"Cycle"
"Enchanting"
"Wings"
"Runestone|Essence$" # Teganze runes
"Great Rune" # Great runes
"Orb\|" # UMOs
"(Edyrem) Key"
"Oil of Conjuration"
"Lucion|Fool|Mystic Shard|Gods|Glorious| Ear"
"Ring of the Five"
"Eye"
"Apple" white
"Elixir of Experience" #if still in game ?
"Scroll of Inifuss" gold
"Wirt's Leg" white
"The Butcher's Tooth" gold
"Optical Detector" gold
"Horadric Malus" gold
"Arcane" orange
"Horadric Staff" gold
"Amulet of the Viper" gold
"Large Signet" orange
"Dark Tome" orange
"Scroll of Kings" gold
"A Jade Figurine" gold
"Khalim's Eye" gold
"Khalim's Brain" gold
"Book of Skill" gold
"Lam Esen's Tome" gold
"Khalim's Heart" gold
"Khalim's Flail" gold
"Catalyst" orange
"Infusion" orange
"Elemental Prism" gold
"Sunstone" gold
"Brain" green
"The Gidbinn" gold
"Cube" gold
"Horazon's Focus" gold
"^(Jewel)$" rare
"^(Amulet)$" rare
"^(Ring)$" rare
"Signet of (Skill|Learning)"
"^(Ancient|Full Plate|Gothic|Greaves|Gauntlets|Avenger|Gilded|Crown|Plated|Gothic Shield)" superior sacred eth rare
"^(Labrys)" superior sacred eth
"^(Scythe|Balanced|Pike|Great Sword|Giant Sword|Giant Axe|War Axe|Kriegsmesser|Hammerhead)" superior sacred eth rare
"^(Ancient|Full Plate|Gothic|Greaves|Gauntlets|Avenger|Gilded|Crown|Plated|Gothic Shield)" sacred eth rare yellow
"^(Labrys)" sacred rare eth yellow
"^(Scythe|Balanced|Pike|Great Sword|Giant Sword|Giant Axe|War Axe|Kriegsmesser|Hammerhead)" sacred eth rare yellow
"^(Light Plate|Great Helm | Heavy Belt|Chain Gloves|Chain Boots|Light Plated Boots|Assault Helmet|Spetum|Scythe|Balanced Axe|Bronze Sword|Valaska|Labrys)" superior sacred eth rare
"^(Light Plate|Great Helm | Heavy Belt|Chain Gloves|Chain Boots|Light Plated Boots|Assault Helmet|Spetum|Scythe|Balanced Axe|Bronze Sword|Valaska|Labrys)" sacred rare eth rare yellow
"^(Ancient|Full Plate|Gothic|Greaves|Gauntlets|Avenger|Gilded|Crown|Plated|Gothic Shield)" sacred rare
"^(Labrys)" sacred
"^(Scythe|Balanced|Pike|Great Sword|Giant Sword|Giant Axe|War Axe|Kriegsmesser|Hammerhead)" sacred rare
"^(Ancient|Full Plate|Gothic|Greaves|Gauntlets|Avenger|Gilded|Crown|Plated|Gothic Shield)" sacred rare yellow
"^(Labrys)" sacred rare yellow
"^(Scythe|Balanced|Pike|Great Sword|Giant Sword|Giant Axe|War Axe|Kriegsmesser|Hammerhead)" sacred rare yellow
"^(Light Plate|Great Helm | Heavy Belt|Chain Gloves|Chain Boots|Light Plated Boots|Assault Helmet|Spetum|Scythe|Balanced Axe|Bronze Sword|Valaska|Labrys)" sacred rare
"^(Light Plate|Great Helm | Heavy Belt|Chain Gloves|Chain Boots|Light Plated Boots|Assault Helmet|Spetum|Scythe|Balanced Axe|Bronze Sword|Valaska|Labrys)" sacred rare yellow
"Ancient" sacred rare
"Full Plate" sacred rare
"Gothic" sacred rare
"Greaves" sacred rare
"Gauntlets" sacred rare
"Avenger" sacred rare
"Gilded" sacred rare
"Crown" sacred rare
"Plated" sacred rare
"Kriegsmesser" sacred rare
"Labrys" sacred rare
"Hammerhead" sacred rare
"Scythe" sacred rare
"Balanced" sacred rare
"Pike" sacred rare
"Great Sword" sacred rare
"Giant Sword" sacred rare
"Giant Axe" sacred rare
"War Axe" sacred rare
"Light Plate" sacred rare
"Great Helm" sacred rare
"Gothic Shield" sacred rare
"Heavy Belt" sacred rare
"Chain Gloves" sacred rare
"Chain Boots" sacred rare
"Light Plated Boots" sacred rare
"Assault Helmet" sacred rare
"Spetum" sacred rare
"Bronze Sword" sacred rare
"Valaska" sacred rare
"Crystal Sword" sacred rare
"Short Sword" sacred rare
"Scimitar" sacred rare
"Saber" sacred rare
"Falchion" sacred rare
"Broad Sword" sacred rare
"Long Sword" sacred rare
"War Sword" sacred rare
"Two-Handed Sword" sacred rare
"Claymore" sacred rare
"Bastard Sword" sacred rare
"Flamberge" sacred rare
"Hand Axe" sacred rare
"Axe" sacred rare
"Double Axe" sacred rare
"Military Pick" sacred rare
"Large Axe" sacred rare
"Broad Axe" sacred rare
"Battle Axe" sacred rare
"Great Axe" sacred rare
"Club" sacred rare
"Spiked Club" sacred rare
"Mace" sacred rare
"Morning Star" sacred rare
"Flail" sacred rare
"War Hammer" sacred rare
"Scepter" sacred rare
"Grand Scepter" sacred rare
"War Scepter" sacred rare
"Javelin" sacred rare
"Pilum" sacred rare
"Short Spear" sacred rare
"Glaive" sacred rare
"Throwing Spear" sacred rare
"Dagger" sacred rare
"Dirk" sacred rare
"Kriss" sacred rare
"Blade" sacred rare
"Throwing Knife" sacred rare
"Flying Knife" sacred rare
"Balanced Knife" sacred rare
"Throwing Axe" sacred rare
"Balanced Axe" sacred rare
"Jawbone Cap" sacred rare
"Ancient Armor" sacred rare
"Full Plate Mail" sacred rare
"Buckler" sacred rare
"Small Shield" sacred rare
"Large Shield" sacred rare
"Kite Shield" sacred rare
"Tower Shield" sacred rare
"Bone Shield" sacred rare
"Spiked Shield" sacred rare
"Plated Belt" sacred rare
"Bull Shield" sacred rare
"Bronze Shield" sacred rare
"Gilded Shield" sacred rare
"Fanged Helm" sacred rare
"Horned Helm" sacred rare
"Avenger Guard" sacred rare
"Spatha" sacred rare
"Backsword" sacred rare
"Ida" sacred rare
"Mammen Axe" sacred rare
"Hammerhead Axe" sacred rare
"Ono" sacred rare
"No Rune"
"Yul Rune"
"Thai Rune"
"Rha Rune"
"Xar Rune"
"Nih Rune"
"Lai Rune"
"On Rune"
"Taha Rune"
"Ghal Rune"
"Qor Rune"
"Krys Rune"
"Auhe Rune"
"Sha'ad Rune"
# Hide items
hide 1 2 3 4 low normal superior magic rare
hide sacred low superior normal magic
hide "^(Ring|Amulet|Jewel)$" magic
hide "Quiver" normal magic
hide "^(Amethyst|Topaz|Sapphire|Emerald|Ruby|Diamond|Skull|Onyx|Bloodstone|Turquoise|Amber|Rainbow)$"
hide "Rainbow Stone"
hide "^Chipped"
hide "^Flawless"
hide "^Perfect"
hide "(Super) Healing Potion"
hide "(Greater) Healing Potion"
show "(Full Rejuvenation) Potion"
hide "(Rejuvenation) Potion"
hide "(Healing|Mana) Potion"
hide "^Key$"
hide "Signet of (Gold)"
hide "^(El|Eld|Tir|Nef|Eth|Ith|Tal|Ral|Ort|Thul|Amn|Sol|Shael|Dol|Hel|Io|Lum|Ko|Fal|Lem|Pul|Mal|Ist|Gul|Vex|Ohm|Lo|Sur|Ber|Jah|Cham|Zod|Sha|Lah|Kur|Ix|Thur|Nas|Ath|Kra|Vith|No|Yul|Thai|Rha|Xar|Nih) Rune$"
hide "^Gold$"
#Weapons
hide "Maul|Great Maul|Short Staff|Long Staff|Gnarled Staff|Battle Staff|War Staff|Short Bow|Maple Bow|Hunter's Bow|Long Bow|Composite Bow|Short Battle Bow|Long Battle Bow|Short War Bow|Long War Bow|Stag Bow|Reflex Bow|Crossbow|Maiden Spear|Maiden Pike|Maiden Javelin|Katar|Wrist Blade|Hatchet Hands|Cestus|Claws|Blade Talons|Scissors Katar|Naginata|Raptor Scythe|Bonesplitter|Hexblade|Spirit Edge|Dart Thrower|Trebuchet|Wand|Bonebreaker|Goedendag|Angel Star|Hand of God|Holy Lance|Tepoztopilli|Eagle Orb|Sacred Globe|Smoked Sphere|Clasped Orb|Jared's Stone|Warp Blade" sacred
hide "Maul|Great Maul|Short Staff|Long Staff|Gnarled Staff|Battle Staff|War Staff|Short Bow|Maple Bow|Hunter's Bow|Long Bow|Composite Bow|Short Battle Bow|Long Battle Bow|Short War Bow|Long War Bow|Stag Bow|Reflex Bow|Crossbow|Maiden Spear|Maiden Pike|Maiden Javelin|Katar|Wrist Blade|Hatchet Hands|Cestus|Claws|Blade Talons|Scissors Katar|Naginata|Raptor Scythe|Bonesplitter|Hexblade|Spirit Edge|Dart Thrower|Trebuchet|Wand|Bonebreaker|Goedendag|Angel Star|Hand of God|Holy Lance|Tepoztopilli|Eagle Orb|Sacred Globe|Smoked Sphere|Clasped Orb|Jared's Stone|Warp Blade" sacred rare
#Armors
hide "Cap|Skull Cap|Helm|Full Helm|Great Helm|Great Helm|Circlet|Coronet|Tiara|Diadem|Mask|Bone Helm|Sash|Light Belt|Belt|Heavy Belt|Leather Gloves|Heavy Gloves|Chain Gloves|Light Gauntlets|Boots|Heavy Boots|Chain Boots|Light Plated Boots|Morion|Cervelliere|Einherjar Helm|Spangenhelm|Athulua's Hand|Phoenix Shield|Setzschild|Parma|Aspis|Totem Shield|Bladed Shield|Wolf Head|Hawk Helm|Antlers|Falcon Mask|Spirit Mask|Preserved Head|Zombie Head|Unraveller Head|Gargoyle Head|Demon Head|Hundsgugel|Blackguard Helm|Targe|Rondache|Heraldic Shield|Aerin Shield|Crown Shield|Gambeson|Kazarghand|Lamellar Armor|Banded Plate|Ceremonial Armor" sacred
hide "Cap|Skull Cap|Helm|Full Helm|Great Helm|Great Helm|Circlet|Coronet|Tiara|Diadem|Mask|Bone Helm|Sash|Light Belt|Belt|Heavy Belt|Leather Gloves|Heavy Gloves|Chain Gloves|Light Gauntlets|Boots|Heavy Boots|Chain Boots|Light Plated Boots|Morion|Cervelliere|Einherjar Helm|Spangenhelm|Athulua's Hand|Phoenix Shield|Setzschild|Parma|Aspis|Totem Shield|Bladed Shield|Wolf Head|Hawk Helm|Antlers|Falcon Mask|Spirit Mask|Preserved Head|Zombie Head|Unraveller Head|Gargoyle Head|Demon Head|Hundsgugel|Blackguard Helm|Targe|Rondache|Heraldic Shield|Aerin Shield|Crown Shield|Gambeson|Kazarghand|Lamellar Armor|Banded Plate|Ceremonial Armor" sacred rare
This will cause much, much less junk on the ground (by hiding the items) = More focus on battle/action.
Important: You still need to check if mobs/bosses drop rewards, as I haven't added them all (yet).
-------
Happy hunting for everyone!