Skip to content

Commit

Permalink
Added New Heist Gems and save state functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
Richard authored and Richard committed Sep 17, 2020
1 parent 631f73c commit e9fc4f9
Show file tree
Hide file tree
Showing 8 changed files with 592 additions and 235 deletions.
8 changes: 0 additions & 8 deletions LevelingGuide.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,6 @@ WinGet, PoEWindowHwnd, ID, ahk_group PoEWindowGrp
global old_log := ""
global trigger := false

global numPart := 1
global CurrentPart = "Part I"
global CurrentAct = "Act I"
global CurrentZone = "01 Twilight Strand"
global CurrentLevel = "01"

global CurrentGem = "02"

global onStartup := 1

#Include, %A_ScriptDir%\lib\draw.ahk
Expand Down
17 changes: 16 additions & 1 deletion PatchNotes.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,21 @@
# Leveling Guide - Patch Notes

### 3.11 League
### Heist League

* Current state of level and zone are saved based on build
** Restarting the tool will not reset state
** Changing builds will go to the state for that build
* Added On-Death key
** Useful for taking a screen shot or saving a video steam after dying
** Could also be used to rage quite

#### Minor improvements

* Gem setups now appear one level before becoming available to make planning easier
* Discord Channel was created to answer questions and share builds
* Vulkan now works better

### Harvest League

* Added settings menu
** All settings can now be modified graphically or with INI file
Expand Down
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,14 @@ This guide auto hides after a few seconds (this can be increased or removed in s

Any of the hotkeys can also be disabled by deleting their value in the settings menu.

### Discord

If you find any bugs please feel free to log an issue on GitHub or send me a message on Reddit u/JusKillmeQik.

If you find any bugs please feel free to log an issue on GitHub or send me a message on Reddit u/JusKillmeQik. All of this is based off of a post by u/Poland144 who borrowed code from many other people to make this happen. I completely re-wrote all of the functions and cleaned up the code to make it more readable and removed some unnecessary bloat. I also added in more of Engineering Eternity's notes to the overlay for beginners. The script automatically reads in up to 6 images, so feel free to delete or add images you want in the overlay. Just make sure they are 110 pixels wide by 60 pixels tall. It also took quite a bit to add the automation, but I think I got all of the bugs worked out. I'm hoping the community uses the source or uploads pull requests to make it even better. If you'd like to donate to my efforts there is a link at the top of this page.
We also now have a Discord channel where you can ask questions or share builds: https://discord.gg/fzHj3BT


All of this is based off of a post by u/Poland144 who borrowed code from many other people to make this happen. I completely re-wrote all of the functions and cleaned up the code to make it more readable and removed some unnecessary bloat. I also added in more of Engineering Eternity's notes to the overlay for beginners. The script automatically reads in up to 6 images, so feel free to delete or add images you want in the overlay. Just make sure they are 110 pixels wide by 60 pixels tall. It also took quite a bit to add the automation, but I think I got all of the bugs worked out. I'm hoping the community uses the source or uploads pull requests to make it even better. If you'd like to donate to my efforts there is a link at the top of this page.

*Cheers!*

Expand Down
29 changes: 29 additions & 0 deletions lib/config.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ global KeyHideGems := "!g"
global KeyShowSyndicate := "F5"
global KeyShowTemple := "F6"

global KeyOnDeath := "+^s"

global KeySettings := "F10"

global tree_toggle := 0
Expand All @@ -51,6 +53,13 @@ global LG_toggle := 0
global activeCount := 0
global active_toggle := 1

;State
global numPart := 1
global CurrentPart = "Part I"
global CurrentAct = "Act I"
global CurrentZone = "01 Twilight Strand"
global CurrentLevel = "01"
global CurrentGem = "02"

;*** Create INI if not exist
ININame=%A_scriptdir%\config.ini
Expand Down Expand Up @@ -143,6 +152,25 @@ IniRead, KeyHideTree, %ININame%, ToggleKey, KeyHideTree, %KeyHideTree%
IniRead, KeyHideGems, %ININame%, ToggleKey, KeyHideGems, %KeyHideGems%
IniRead, KeyShowSyndicate, %ININame%, ToggleKey, KeyShowSyndicate, %KeyShowSyndicate%
IniRead, KeyShowTemple, %ININame%, ToggleKey, KeyShowTemple, %KeyShowTemple%
IniRead, KeyOnDeath, %ININame%, ToggleKey, KeyOnDeath, %KeyOnDeath%

INIMeta=%A_scriptdir%\builds\%overlayFolder%\gems\meta.ini
IniRead, numPart, %INIMeta%, State, numPart, %numPart%
IniRead, CurrentPart, %INIMeta%, State, CurrentPart, %CurrentPart%
IniRead, CurrentAct, %INIMeta%, State, CurrentAct, %CurrentAct%
IniRead, CurrentZone, %INIMeta%, State, CurrentZone, %CurrentZone%
IniRead, CurrentLevel, %INIMeta%, State, CurrentLevel, %CurrentLevel%
IniRead, CurrentGem, %INIMeta%, State, CurrentGem, %CurrentGem%

SaveState() {
global
IniWrite, %numPart%, %INIMeta%, State, numPart
IniWrite, %CurrentPart%, %INIMeta%, State, CurrentPart
IniWrite, %CurrentAct%, %INIMeta%, State, CurrentAct
IniWrite, %CurrentZone%, %INIMeta%, State, CurrentZone
IniWrite, %CurrentLevel%, %INIMeta%, State, CurrentLevel
IniWrite, %CurrentGem%, %INIMeta%, State, CurrentGem
}

WriteAll() {
global
Expand Down Expand Up @@ -185,4 +213,5 @@ WriteAll() {
IniWrite, %KeyHideGems%, %ININame%, ToggleKey, KeyHideGems
IniWrite, %KeyShowSyndicate%, %ININame%, ToggleKey, KeyShowSyndicate
IniWrite, %KeyShowTemple%, %ININame%, ToggleKey, KeyShowTemple
IniWrite, %KeyOnDeath%, %ININame%, ToggleKey, KeyOnDeath
}
8 changes: 7 additions & 1 deletion lib/draw.ahk
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
Gui, Level:Color, %backgroundColor%
Gui, Level:Font, s%points%, %font%
Gui, Level:Add, Edit, x0 y0 h%control_height% w%level_width% r1 GlevelSelectUI, Level
Gui, Level:Add, UpDown, x%controlSpace% vCurrentLevel GlevelSelectUI Range1-100, 1
Gui, Level:Add, UpDown, x%controlSpace% vCurrentLevel GlevelSelectUI Range1-100, %CurrentLevel%
Gui, Level:Show, h%exp_height% w%level_width% x%xPosLevel% y%yPosLevel% NA, Level

;The names of the images have to be created now so that ShowAllWindows doesn't make empty ones that show up in the Alt Tab bar
Expand Down Expand Up @@ -188,6 +188,8 @@ partSelectUI() {
}
trigger := true
WinActivate, ahk_id %PoEWindowHwnd%

SaveState()
}


Expand All @@ -207,6 +209,7 @@ actSelectUI() {
UpdateImages()
}
WinActivate, ahk_id %PoEWindowHwnd%
SaveState()
}


Expand All @@ -222,6 +225,7 @@ zoneSelectUI() {
UpdateImages()
}
WinActivate, ahk_id %PoEWindowHwnd%
SaveState()
}


Expand All @@ -230,6 +234,7 @@ levelSelectUI() {
global
Gui, Level:Submit, NoHide
SetExp()
SaveState()
}


Expand All @@ -239,6 +244,7 @@ gemSelectUI() {
Gui, Gems:Submit, NoHide
SetGems()
WinActivate, ahk_id %PoEWindowHwnd%
SaveState()
}


Expand Down
Loading

0 comments on commit e9fc4f9

Please sign in to comment.