* C1F & B1S switched to static pathing * Improved overall robustness * improved A layout check consistency * added A layout check consistency & CTA rebuff * Home now a loop, B now first seal to pop. * Trash clear at pentagram, B1S, C1F loop added. * Changed DeSeis attack pattern so MERC can kill * tweaked diablo spawn timer & vizier attack pattern * fixed minor pickit error. * fixed Layout B Check loop & improved C1F * improved C1F pathing home * improved B layout check by removing trash kill * added C2G static path to infector & loop home * tweaked pathing * lots of pathing tweaks to increase consistency * Clarified Logger.Info * Fixed A1L Tele to Lava Bug * Fixed A1Y Tele Lava bug * Fixed B2U missing pentagram on loop back * fixed logger * Completely reworked layout checks * Reworked C seal layout check * fixed ending up too low at Diablo * optimized loop home for C * added all seals * removed duplicate trash sequence at C * Fixed B2U looping home, added essence * Template Check Threshold raised for Layout Checks * Reverted A layout check back to inital version * Aggressive Layout Checks implemented. * Replaced Pentagram Templates to improve [602] * Fixed loops for new pent layout * Reverted A layout checks back to initial version * merged 6.1? i hope it worked. * Pressure Test: A2Y 98% layout check success * Massive improvements on Layout Checks * Integrated Skizot's A4 merchants * Fixed an error on A1L. * fixed a small error on final pickit * Slight Cleanup * tweaked A2Y nodes to avoid lava jumps * Added B2U Seal Logging * Add templ. to 611 & 610 to fix stuck pather * WiZ/SwePow suggestions * Some more tweaking * Trying to improve B layout checks (not full run) * Seal B logic pressure test (no full run) * added timeouts to weak traversenodes (no full run) * Pacifist Version - just checking layouts no bosses * Pure Layoutcheck Pressure Test (double checks) * Pacifist mode: Layout Check * Update bot.py * Added Templates to improve Layoutchecks * Tweaked B2U Templates (Pacifist Version) * add B2U nodes & calibration to impr. layout check * added nodes to layout checks * Added A1L Calibration Node for Layoutcheck * Full running script * Fixed Calibrations - Full Run * fixed mousover keyerror * yet another mousover * fixed a pather issue on B1S, full run * yet another mousover. full run. * mousover... ful run * yet another mousover. full run * fixed C2G looping across pentagram * Update game.ini * WiZ testing * added seal_node to sealdance * added C1F layoutcheck nodes * Added Wiz Speedrun * tweaked wait in sealdance * A1L-Static path to Pentagrram * added A2Y hop 622 * A2Y static path home * B1S static path home * changed C1F fake template * added new C1F seals & static home * Speed or no speed Using kill_cs_trash config * fixed a 36b key error * Random guess actually is random now It wasnt random at all before so trying out if this is better * Minor fixes and tweaks * B2U - Static Path Home * Redworked C1F - not stable yet * Seal order B,C,A and DeSeis fix There was copy/paste bug in DeSeis making it use wrong atk_len and then I also tuned the attacks a bit. * fixed final B2U issue, should be stable now! * added B2U 644_646 static path * added mapping * A seals fixed hopefully More testing tomorrow! * run diablo py Yours is the diabloC, I didnt have time to compare them before sleep and wanted you to have both in case * so this should be super stable now! * Reverted A1L & A2Y Seal Order (but kept WiZ Idea) * Reverted Seal Order * Added Rudi TP :) * all loop home now * added TP template to loop * typo * stashs & shrine gfx, TP counter * removed pent_6 (many false positives looping home) * clean up for aeon * fixed typos * New A2Y & C2G home pathing * Reworked C1F 704 to avoid stuck * Ready to test! * fixed pather clicking outside D2R * Tweaked Seal A * Loot to Sealdance() & A2Y tweaks * removed FALSE from TP fail * Updated Readme.md * remove env * clean up code * account for used tp * Removed Dia C1F 700s and replaced with 650s * Moved Seals, Fights & Pickit to Hammerdin file * #Trapsin now supported for Arcane and CS #Trapsin now optionally uses defensive spells Cloak of Shadows and Mind Blast #Trapsin now waits for Shadow Warrior before using CTA * Update readme * Working version * added trapsin * added nova sorc * added nova sorc * added light & nova sorc * added clear trash, issue on 1 function * Added Clearing Trash * added 1 tele stop between WP & Pentagram * fixed mistake on i_char * CS Trash is now available for beta testing * fixed a minor issue * percised some debug logging * Added CS Trash for Necro, Trapsin, Sorc (no blizz) * added CS trash to Necro, Trapsin, Sorc_Light _Nova * # moved functions from chars back to diablo.py # removed CS for all chars execept hammerdin # added seal_layout to sealboss functions # added location to cs_kill_trash functions * removed pickit from hammerdin.py * trying to fix some attribute errors for pre_move * forgot to add _char for pather.traverse_nodes * added & removed some ._char, now it runs :) * fixed a missing argument & cleaned up * clear_trash=1 implemented & working * added more kill_trash options * added more debug info & generic kill trash spots * fixed some debugger errors * hammerdin done * updated readme for cs_trash * #merged A1L and A2Y pathing to char.py # added A2Y static pathing to Pentagram * fixed some errors ... * A1L & A2Y work with new pathing logic * Ok generic Diablo.py should now work * and hammerdin.py aswell * full run * moved C1F static path to hammerdin.py * fixed an error for pathing * Improved A LC consistency to >99% * Colors! * added 2 A1L LC templates * moved pickit to hammerdin.py * 4min runs * removed timeouts. 88% killrate right now. * Added Logparser (thanks famE) * separated log parser columns * tweaked log parser * changed positions of de seis kill screenshots * added clearing trash between Pent & LC * fixed missing _self * Added option for cs_town_visits between seals * Improved B1S loop home & tweaked some messages * fixed an error not clearing seals & added colors * removed 632 duplication & not needed LC templates * added clear trash to A & B LC * added pickup at 646 * added PENT_2 Template & removed fail shrine checks * Added C2G Templates currently only 82% good runs * Added Hybrid Calibration Nodes * re-added templates for LC * added 1px to WP->PENT traverse to avoid missing it * tweaked home from 632 for not missing pent * added more redemption before 632 calibration * merged individual seals to one function * fixed seal template error * Added LC function. Fixed C2G & Loop to Pent-Stable * added atk_len for diablo * fixed typo so log parser stats are right * added & increased threshold to LC calibration * fixed new LC threshold oO - should push less often * reverted B LC back to initial order * log parser tweaks * added shrine check to pather.py * replaced 630640 with 647 * added B1S LC templates & changed shrine check * swapped LC for B (current had 75%) * reworked cs_trash up to LC * log parse counts templates used * Fixed B Layout checks * log parser now w. templates. shrine check added * just changes to debug names & adding a nicer table for botty start :P * #best match & time_out=0.1, #return false on nodes #new shrine ROI * Force Stashing before running Dia, logger wording * shrine check less frequent. char.py cleaned up * reworked trash layout B * added 603 ROF1 templates * added info to params.ini to reduce Q&A in discord * # added stash every run param # transferred trash choreography to char.py # reverted some template changes. * Ready to merge. Not perfect, but much better! * small fix before merging * Update nova_sorc.py * Update basic.py * added missing templates causing an error @602 * C2G: static path LC 661 & comment screenshots * various changes--changed some info to debug, changed floats in config, adjusted runs_per_stash logic * autoformatting made me commit * nodes for trash between pent & seal. A works B is bad. * fix bool -> bool(int( * added calibration nodes for trash pent>seal * Full run for testing efficacy of new trash nodes * fixed a pathing issue * reverted back to old method for trash. * Ready for merge. Co-authored-by: WiZ <32465449+SwePow@users.noreply.github.com> Co-authored-by: aeon0 <aeon4@pm.me> Co-authored-by: mgleed <aliigleed16@gmail.com>
19 KiB
Pixelbot for Diablo 2 Resurrected. This project is for informational and educational purposes only and is not meant for online usage. Feel free to dig around, add stuff, make PRs, or ask questions should you get stuck!
Download here and got to have a Discord nowadays I guess 🤷♂️
Getting started & Prequists
- D2r needs to be in English Language,
- Botty currently works with 720p D2r window (will be adjusted automatically on auto settings)
1) Graphics and Gameplay Settings
All settings will automatically be set when you execute main.exe and press the hotkey for "Adjust D2R settings" (default f9). It is not a 100% thing, in rare cases you might still have to fiddle around with your brightness. I suggest using the "Graphic Debugger" to verify your settings.
Note: Make sure that no other external programs adapt your graphics settings (HDR, Geforce Experience, etc.)
2) Supported builds
Check the documentation for param.ini further down. Different Sorc builds, Hammardin, Barb, Trapsin are already implemented to different extents. It is quite straightforward to implement new classes. Give it a go if you like!
3) Start Location
Open up D2R and wait till you are at the hero selection screen. Make sure the char you running with is selected and will be in any of Act 3, 4 or 5 in the respective difficulty you set in the param.ini once the bot starts the game.
4) Start Botty
You can either run from python. Follow development.md for that. Or you download the a prebuilt release here (the .rar file!). Start main.exe in the botty folder. Focus your D2R window and press the start key (default f11). You can always force stop botty with f12. Note: Botty will use the /nopickup command in the first game to avoid pickup up trash while traversing. This command will only allow item pickup when "show items" is active.
Graphic Debugger
To check if you graphic settings are good and if the bot would pick up items there is a Graphic Debugger Mode. Start botty and press F10 (Default key). This will open up a (mostly black) window. Start a game in D2R and go to A5. You should see some templates with blue circles detected and scores printed out to the console. To check item finding, throw some items of different types on the ground. The debug window should show the item names with black background. If you throw an item on the ground that should be picked up, it will have a red circle. The console will print out the scores for each item that would be picked up. Scores should be well above 0.9 for these items.

Development
Check out the development.md docu for infos on how to build from source and details of the project structure and code.
param.ini
All botty configuration files are located in the config folder. To ease the switch to new botty versions, you can also overwrite any of the .ini fields in a custom.ini file. When a new version of botty is released you just copy the file to the new version without having to port all your param.ini changes to the new version. Example:
; custom.ini - overwrites 3 params in the param.ini
[general]
name=MyCustomName
[routes]
run_pindle=1
run_shenk=0
| [general] | Descriptions |
|---|---|
| name | Name used in terminal and discord messages |
| custom_message_hook | Add your own message hook here to get messages about drops and botty status updates, discord webhook is default |
| logger_lvl | Can be any of [info, debug] and determines how much output you see on the command line |
| max_game_length_s | Botty will attempt to stop whatever its doing and try to restart a new game. Note if this fails, botty will attempt to shut down D2R and Bnet |
| max_consecutive_fails | Botty will stop making games if the number of consecutive fails reaches this max value |
| randomize_runs | 0: the order will be as seen in the params.ini. 1: the order will be random |
| difficulty | Set to normal nightmare or hell for game difficulty |
| message_api_type | Which api to use to send botty messages. Supports "generic_api" (basic discord), or "discord" (discord embeds with images). |
| discord_status_count | Number of games between discord status messges being sent. Leave empty for no status reports. |
| discord_status_condensed | Toggles condensed view of Discord status messages. 0 Full text, 1 Condensed text. |
| info_screenshots | If 1, the bot takes a screenshot with timestamp on every stuck / chicken / timeout / inventory full event. This is 1 by Default, so remember to clean up the folder every once in a while |
| loot_screenshots | If 1, the bot takes a screenshot with timestamp everytime he presses show_items button and saves it to loot_screenshots folder. Remember to clear them once in a while... |
| saved_games_folder | Optional folder path of Diablo 2 : Ressurrected saved games that will be used to overwrite when running the "auto settings" |
| d2r_path | Optional path to find the d2r.exe, if not set will be default to "C:\Program Files (x86)\Diablo II Resurrected\D2R.exe" when attempting to restart |
| restart_d2r_when_stuck | Set to 1 and botty will attempt to restart d2r in the case that botty is unable to recover its state (e.g: game crash) |
| [routes] | Descriptions |
|---|---|
| run_trav | Run Trav in each new game. Select "1" to run it "0" to leave it out. Specific trav gear is suggested |
| run_pindle | Run Pindle in each new game. Select "1" to run it "0" to leave it out. |
| run_eldritch | Run Eldritch in each new game. Select "1" to run it "0" to leave it out. |
| run_shenk | Run shenk in each new game. Select "1" to run it "0" to leave it out. |
| run_nihlathak | Run Nihlathak in each new game. Select "1" to run it "0" to leave it out. (Teleport required) |
| run_arcane | Run Arcane Sanctuary in each new game. Select "1" to run it "0" to leave it out. (Teleport required) |
| run_diablo | Run Diablo in each new game. Select "1" to run it "0" to leave it out. (Teleport required) |
| [char] | Descriptions |
|---|---|
| type | Build type. Currently only "sorceress" or "hammerdin" is supported |
| casting_frames | Depending on your char and fcr you will have a specific casting frame count. Check it here: https://diablo2.diablowiki.net/Breakpoints and fill in the right number. Determines how much delay there is after each teleport for example. If your system has some delay e.g. on vms, you might have to increase this value above the suggest value in the table! |
| num_loot_columns | Number of columns in inventory used for loot (from left!). Remaining space can be used for charms |
| show_items | Hotkey for "show items" |
| inventory_screen | Hotkey to open inventory |
| force_move | Hotkey for "force move" |
| stand_still | Hotkey for "stand still". Note this can not be the default shift key as it would interfere with the merc healing routine |
| tp | Hotkey for using a town |
| belt_rows | Integer value of how many rows the char's belt has |
| show_belt | Hotkey for "show belt" |
| potion1 | Hotkey to take potion in slot 1 |
| potion2 | Hotkey to take potion in slot 2 |
| potion3 | Hotkey to take potion in slot 3 |
| potion4 | Hotkey to take potion in slot 4 |
| cta_available | 0: no cta available, 1: cta is available and should be used during prebuff |
| weapon_switch | Hotkey for "weapon switch" (only needed if cta_available=1) |
| battle_order | Hotkey for battle order from cta (only needed if cta_available=1) |
| battle_command | Hotkey for battle command from cta (only needed if cta_available=1) |
| stash_gold | Bool value to stash gold each time when stashing items |
| gold_trav_only | Hacky config that will restrict gold pickup to trav only. misc_gold must be set to 1 for this to have any effect |
| use_merc | Set to 1 for using merc. Set to 0 for not using merc (will not revive merc when dead), default = 1 |
| atk_len_arc | Attack length for hdin/sorc fighting arcane |
| atk_len_trav | Attack length for hdin fighting trav (note this atk length will be applied in 4 different spots each) |
| atk_len_pindle | Attack length for hdin or number of attack sequences for sorc when fighting pindle |
| atk_len_eldritch | Attack length for hdin or number of attack sequences for sorc when fighting eldritch |
| atk_len_shenk | Attack length for hdin or number of attack sequences for sorc when fighting shenk |
| atk_len_nihlathak | Attack length for hdin or number of attack sequences for sorc when fighting nihlathak |
| atk_len_cs_trashmobs | Attack length for hdin or number of attack sequences when fighting Trash Mobs in Chaos Sanctuary (Diablo) |
| atk_len_diablo_vizier | Attack length for hdin or number of attack sequences when fighting Sealboss A "Vizier of Chaos" in Chaos Sanctuary (Diablo) |
| atk_len_diablo_deseis | Attack length for hdin or number of attack sequences when fighting Sealboss B "Lord De Seis" in Chaos Sanctuary (Diablo) |
| atk_len_diablo_infector | Attack length for hdin or number of attack sequences when fighting Sealboss C "Infector of Souls" in Chaos Sanctuary (Diablo) |
| atk_len_diablo_infector | Attack length for hdin or number of attack sequences when fighting Diablo in Chaos Sanctuary |
| kill_cs_trash | If 1, most Trash mob packs from Chaos Sancturay Entrance to Pentagram are cleared. If 0, the run starts at Pentagram and just kills Sealbosses & Diablo (default) |
| cs_town_visits | If 1, it will go to town, buy pots & stash items between clearing the seals, set 0 to deactivate (default) |
| take_health_potion | Health percentage when healing potion will be used. e.g. 0.6 = 60% helath |
| take_mana_potion | Mana percentage when mana potion will be used |
| take_rejuv_potion_health | Health percentag when rejuv potion will be used |
| take_rejuv_potion_mana | Mana percentag when rejuv potion will be used |
| heal_merc | Merc health percentage when giving healing potion to merc |
| heal_rejuv_merc | Merc health percentage when giving rejuv potion to merc |
| chicken | Will chicken (leave game) when player health percentage drops below set value, range 0 to 1. Set to 0 to not chicken. |
| merc_chicken | Will chicken (leave game) when merc health percentage drops below set value, range 0 to 1. Set to 0 to not chicken. |
| belt_rejuv_columns | Number of belt columns for rejuv potions |
| belt_hp_columns | Number of belt columns for healing potions |
| belt_mp_columns | Number of belt columns for mana potions |
| pre_buff_every_run | 0: Will only prebuff on first run, 1: Will prebuff after each run/boss |
| runs_per_stash | 0: Will only stash after intentional item pickup, 1+: Will force stash after # of runs set here (recommend at least 4 in case of accidental pickups) |
| runs_per_repair | 0: Will only repair when needed, 1+: Will force repair after # of runs set here |
| id_items | Will identify items at cain before stashing them. Cain must be rescued for this to work. |
| open_chests | Open up chests in some places. E.g. on dead ends of arcane. Note: currently bad runtime. |
| fill_shared_stash_first | Fill stash tabs starting from right to left, filling personal stash last |
| gamble_items | List of items to gamble when stash fills with gold. Leave blank to disable. Supported items currently include circlet, ring, coronet, talon, amulet |
| [transmute] | Descriptions |
|---|---|
| transmute_every_x_game | How often to run transmute routine (currently transmutes flawless gems into perfect gems). Transmute routine depends on stashing routine it will only start after items stashing is done. E.g. so it could take more than X games to perform transmutes if there were no items to stash at the time. Default: 20 |
| stash_destination | Stash tabs by priority to place the results of the transmute. Default: 3,2,1,0. (It means the result will be first placed in stash 3 untils it's full, then to stash 2, etc. 0 - personal tab) |
Builds
| [sorceress] | Descriptions |
|---|---|
| teleport | Required Hotkey for teleport |
| frozen_armor | Optional Hotkey for frozen armor (or any of the other armors) |
| energy_shield | Optional Hotkey for energy shield |
| thunder_storm | Optional Hotkey for thunder storm |
| [light_sorc] | Descriptions |
|---|---|
| chain_lightning | Optional Hotkey for chain_lightning (must be bound to left skill) |
| lightning | Required Hotkey for lightning (must be bound to right skill) |
| [blizz_sorc] | Descriptions |
|---|---|
| ice_blast | Optional Hotkey for ice_blast (must be bound to left skill) |
| blizzard | Required Hotkey for Blizzard (must be bound to right skill) |
| [nova_sorc] | Descriptions |
|---|---|
| nova | Required Hotkey for Nova (must be bound to right skill) |
| [hammerdin] | Descriptions |
|---|---|
| teleport | Optional Hotkey for teleport. If left empty hammerdin will run instead of teleport. |
| concentration | Required Hotkey for Concentration |
| holy_shield | Required Hotkey for Holy Shield |
| blessed_hammer | Required Hotkey for Blessed Hammer. (must be bound to left skill!) |
| redemption | Optional Hotkey for Redemption |
| vigor | Optional Hotkey for Vigor |
| cleansing | Optional Hotkey for Cleansing |
| [trapsin] | Descriptions |
|---|---|
| teleport | Optional Hotkey for teleport. If left empty trapsin will run instead of teleport. |
| skill_left | Optional Hotkey for Left Skill |
| burst_of_speed | Optional Hotkey for Burst of Speed |
| fade | Optional Hotkey for Fade |
| shadow_warrior | Optional Hotkey for Shadow Warrior |
| lightning_sentry | Required Hotkey for Lightning Sentry |
| death_sentry | Required Hotkey for Death Sentry |
| cloak_of_shadows | Optional Hotkey for Cloak of Shadows |
| mind_blast | Optional Hotkey for Mind Blast |
| [barbarian] | Descriptions |
|---|---|
| teleport | Optional Hotkey for teleport. If left empty barb will run instead of teleport. |
| leap | Required Hotkey for Leap |
| shout | Required Hotkey for Shout |
| war_cry | Required Hotkey for War Cry |
| find_item | Optional Hotkey for Find Item |
| cry_frequency | Time in seconds between each cast of war_cry. Set to 0.0 if max fcr should be used |
| [Necro] | Descriptions |
|---|---|
| teleport | leave this blank for now, teleport/static pathing is currently not supported |
| skill_left | Required Hotkey for attack (bonespear/teeth) |
| bone_armor | Required Hotkey for Bone Armor |
| clay_golem | Required Hotkey for Clay Golem |
| raise_skeleton | Required Hotkey for Raise Skeleton |
| amp_dmg | Required Hotkey for Amplify Damage |
| corpse_explosion | Required Hotkey Corpse Explosion |
| raise_revive | Required Hotkey revive |
| clear_pindle_packs | clears mobs before pindle |
| [dclone] | Descriptions |
|---|---|
| region_ips | Start of the region ip you want to filter for. e.g. EU Server = 37.244.11, 37.244.48 |
| dclone_hotip | Hot ip you are looking for. Botty will stay in game and message you if a message_hook is set |
| [advanced_options] | Descriptions |
|---|---|
| pathing_delay_factor | A linear scaling factor, between 1 and 10, applied to pathing delays. |
| message_headers | Headers that are sent with each messages |
| message_body_template | Message body of the post message sent |
Support this project
Support it by contributing in any technical way, giving feedback, bug reports or submitting PRs.
