From cd6751314d6a0125ebaa4eebab39d19be4eaeba7 Mon Sep 17 00:00:00 2001 From: Lailloken <61888437+Lailloken@users.noreply.github.com> Date: Sun, 15 Dec 2024 07:52:33 +0100 Subject: [PATCH 1/5] v1.56.1 - main file --- Lailloken UI.ahk | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/Lailloken UI.ahk b/Lailloken UI.ahk index 4d39909c..718f7384 100644 --- a/Lailloken UI.ahk +++ b/Lailloken UI.ahk @@ -574,6 +574,25 @@ LLK_ArraySort(array) Return parse2 } +LLK_CloneObject(object) +{ + local + + For key, val in object + If !IsNumber(key) + is_array := 1 + + If is_array + new_object := [] + Else new_object := {} + + For key, val in object + If !IsObject(val) + new_object[key] := val + Else new_object[key] := LLK_CloneObject(val) + Return new_object +} + LLK_Error(ErrorMessage, restart := 0) { MsgBox, % ErrorMessage @@ -641,6 +660,25 @@ LLK_HasKey(object, value, InStr := 0, case_sensitive := 0, all_results := 0, rec Return } +LLK_HasRegex(object, regex, all_results := 0, check_key := 0) +{ + local + + If !IsObject(object) + Return + parse := [] + For key, val in object + If RegExMatch(!check_key ? val : key, regex) + { + If !all_results + Return key + Else parse.Push(key) + } + + If all_results && parse.Count() + Return parse +} + LLK_HasVal(object, value, InStr := 0, case_sensitive := 0, all_results := 0, recurse := 0, check_decimals := 0) ; check_decimals is a band-aid fix for very specific use-cases where X and X.000[...] need to be distinguished { local @@ -1126,7 +1164,7 @@ Startup() GroupAdd, poe_window, ahk_class POEWindowClass GroupAdd, poe_window, ahk_exe GeForceNOW.exe - + GroupAdd, poe_ahk_window, ahk_class POEWindowClass GroupAdd, poe_ahk_window, ahk_class AutoHotkeyGUI GroupAdd, poe_ahk_window, ahk_exe GeForceNOW.exe From 9228a21d7e399eaadf2d42bbd11b939fc1fddb7b Mon Sep 17 00:00:00 2001 From: Lailloken <61888437+Lailloken@users.noreply.github.com> Date: Sun, 15 Dec 2024 07:53:50 +0100 Subject: [PATCH 2/5] v1.56.1 - modules --- modules/GUI.ahk | 148 ++++++++++++++++ modules/hotkeys.ahk | 3 +- modules/item-checker.ahk | 8 +- modules/lootfilter.ahk | 354 +++++++++++++++++++++++++++++--------- modules/map-info.ahk | 203 ++++++++++++++++------ modules/ocr.ahk | 37 +--- modules/omni-key.ahk | 18 +- modules/recombination.ahk | 2 +- modules/settings menu.ahk | 120 ++++++++----- 9 files changed, 678 insertions(+), 215 deletions(-) diff --git a/modules/GUI.ahk b/modules/GUI.ahk index 5ebb9033..80446139 100644 --- a/modules/GUI.ahk +++ b/modules/GUI.ahk @@ -623,6 +623,153 @@ LLK_ToolTip(message, duration := 1, x := "", y := "", name := "", color := "Whit vars.tooltip.wait := 0 } +RGB_Convert(RGB) +{ + local + + If InStr(RGB, " ") + { + Loop, Parse, RGB, % A_Space + If (A_Index < 4) + converted .= Format("{:02X}", A_LoopField) + Return converted + } + For index, val in ["red", "green", "blue"] + %val% := Format("{:i}", "0x" SubStr(RGB, 1 + 2*(index - 1), 2)) + Return [red, green, blue] +} + +RGB_Picker(RGB := "") +{ + local + global vars, settings + static palette, hwnd_r, hwnd_g, hwnd_b, hwnd_edit_r, hwnd_edit_g, hwnd_edit_b, hwnd_final, sliders + + If !palette + { + palette := [] + palette.Push(["330000", "660000", "990000", "CC0000", "FF0000", "FF3333", "FF6666", "FF9999", "FFCCCC"]) + palette.Push(["331900", "663300", "994C00", "CC6600", "FF8000", "FF9933", "FFB266", "FFCC99", "FFE5CC"]) + palette.Push(["333300", "666600", "999900", "CCCC00", "FFFF00", "FFFF33", "FFFF66", "FFFF99", "FFFFCC"]) + palette.Push(["193300", "336600", "4C9900", "66CC00", "80FF00", "99FF33", "B2FF66", "CCFF99", "E5FFCC"]) + palette.Push(["003300", "006600", "009900", "00CC00", "00FF00", "33FF33", "66FF66", "99FF99", "CCFFCC"]) + palette.Push(["003319", "006633", "00994C", "00CC66", "00FF80", "33FF99", "66FFB2", "99FFCC", "CCFFE5"]) + palette.Push(["003333", "006666", "009999", "00CCCC", "00FFFF", "33FFFF", "66FFFF", "99FFFF", "CCFFFF"]) + palette.Push(["001933", "003366", "004C99", "0066CC", "0080FF", "3399FF", "66B2FF", "99CCFF", "CCE5FF"]) + palette.Push(["000033", "000066", "000099", "0000CC", "0000FF", "3333FF", "6666FF", "9999FF", "CCCCFF"]) + palette.Push(["190033", "330066", "4C0099", "6600CC", "7F00FF", "9933FF", "B266FF", "CC99FF", "E5CCFF"]) + palette.Push(["330033", "660066", "990099", "CC00CC", "FF00FF", "FF33FF", "FF66FF", "FF99FF", "FFCCFF"]) + palette.Push(["330019", "660033", "99004C", "CC0066", "FF007F", "FF3399", "FF66B2", "FF99CC", "FFCCE5"]) + palette.Push(["000000", "202020", "404040", "606060", "808080", "A0A0A0", "C0C0C0", "E0E0E0", "FFFFFF"]) + } + + If (A_Gui = "RGB_palette") + { + Loop, Parse, % "rgb" + If (RGB = hwnd_%A_LoopField%) + GuiControl,, % hwnd_edit_%A_LoopField%, % (input := LLK_ControlGet(RGB)) + Else If (RGB = hwnd_edit_%A_LoopField%) + { + If ((input := LLK_ControlGet(RGB)) > 255) + { + GuiControl, -gRGB_Picker, % RGB + GuiControl,, % RGB, % (input := 255) + GuiControl, +gRGB_Picker, % RGB + } + GuiControl,, % hwnd_%A_LoopField%, % input + } + Return + } + + hwnd_GUI := {} + Gui, RGB_palette: New, -Caption -DPIScale +LastFound +ToolWindow +AlwaysOnTop +Border HWNDhwnd +E0x02000000 +E0x00080000 HWNDhwnd_palette + Gui, RGB_palette: Color, Black + Gui, RGB_palette: Font, % "s" settings.general.fSize " cWhite", % vars.system.font + Gui, RGB_palette: Margin, % settings.general.fWidth, % settings.general.fWidth + + For index0, val0 in palette + For index, val in val0 + { + style := (A_Index = 1) ? "Section " (index0 != 1 ? "ys x+-1" : "") : "xs y+" (LLK_IsBetween(index, 5, 6) ? settings.general.fWidth / 5 : -1), columns := index0 + Gui, RGB_palette: Add, Text, % style " Center 0x200 BackgroundTrans HWNDhwnd_" val " w" settings.general.fWidth * 2 " h" settings.general.fWidth * 2 " c" (index >= 5 ? "Black" : "White"), % (RGB = val) ? "X" : "" + If (RGB = val) + marked := val + Gui, RGB_palette: Add, Progress, % "xp yp Disabled Background606060 c" val " w" settings.general.fWidth * 2 " h" settings.general.fWidth * 2 " HWNDhwnd", 100 + hwnd_GUI[hwnd] := """" val """" + } + + For index, val in RGB_Convert(RGB) + { + letter := (index = 1 ? "R" : (index = 2 ? "G" : "B")) + Gui, RGB_palette: Add, Text, % "Section Border Center " (index = 1 ? "x" settings.general.fWidth " y+-1" : "xs y+-1") " w" settings.general.fWidth*3, % letter + Gui, RGB_palette: Add, Slider, % "ys x+-1 hp Border Range0-255 Tooltip gRGB_Picker HWNDhwnd_" letter " w" settings.general.fWidth*20 - 9, % val + Gui, RGB_palette: Font, % "s" settings.general.fSize - 4 + Gui, RGB_palette: Add, Edit, % "ys Number Right Limit3 x+-1 hp cBlack gRGB_Picker HWNDhwnd_edit_" letter " w" settings.general.fWidth*3 - 1, % val + Gui, RGB_palette: Font, % "s" settings.general.fSize + } + Gui, RGB_palette: Add, Progress, % "Disabled xs y+-1 Section hp HWNDhwnd_final Background606060 c" (Blank(RGB) ? "000000" : RGB) " w" settings.general.fWidth*3, 100 + Gui, RGB_palette: Add, Text, % "ys x+-1 Border HWNDhwnd_save 0x200", % " " Lang_Trans("global_apply") " " + + Gui, RGB_palette: Show, % "NA x10000 y10000" + WinGetPos,,, w, h, ahk_id %hwnd_palette% + xPos := vars.general.xMouse - (vars.general.xMouse - vars.monitor.x + w >= vars.monitor.w ? w - settings.general.fWidth : settings.general.fWidth) + yPos := vars.general.yMouse - (vars.general.yMouse - vars.monitor.y + h >= vars.monitor.h ? h - settings.general.fWidth : settings.general.fWidth) + + ControlFocus,, ahk_id %hwnd_save% + Gui, RGB_palette: Show, % "x" xPos " y" yPos + While (vars.general.wMouse != hwnd_palette) && !timeout + { + If !start + start := A_TickCount + If (A_TickCount >= start + 1000) && (vars.general.wMouse != hwnd_palette) + timeout := 1 + Sleep 10 + } + While Blank(picked_rgb) && (vars.general.wMouse = hwnd_palette) + { + KeyWait, LButton, D T0.1 + If !ErrorLevel && hwnd_GUI.HasKey(vars.general.cMouse) + hover_last := vars.general.cMouse, rgb := StrReplace(hwnd_GUI[hover_last], """") + Else If !ErrorLevel && (vars.general.cMouse = hwnd_save) + { + picked_rgb := current_rgb + } + Else + { + current_rgb := "" + Loop, Parse, % "rgb" + current_rgb .= Format("{:02X}", LLK_ControlGet(hwnd_%A_LoopField%)) + GuiControl, +c%current_rgb%, % hwnd_final + If (current_rgb != marked) + GuiControl, Text, % hwnd_%marked%, % "" + If (hwnd_%current_rgb%) + { + GuiControl, Text, % hwnd_%current_rgb%, % "X" + marked := current_rgb + } + Sleep 10 + Continue + } + KeyWait, LButton + If (rgb != rgb_last) + { + rgb_last := rgb, sliders := RGB_Convert(rgb) + For index, val in ["r", "g", "b"] + { + GuiControl,, % hwnd_%val%, % sliders[index] + GuiControl,, % hwnd_edit_%val%, % sliders[index] + GuiControl, Text, % hwnd_%marked%, % "" + GuiControl, Text, % hwnd_%rgb%, % "X" + marked := rgb + } + } + } + KeyWait, LButton + Gui, RGB_palette: Destroy + Return picked_rgb +} + +/* RGB_Picker(current_rgb := "") { local @@ -690,6 +837,7 @@ RGB_Picker(current_rgb := "") Gui, RGB_palette: Destroy Return picked_rgb } +*/ ToolTip_Mouse(mode := "", timeout := 0) { diff --git a/modules/hotkeys.ahk b/modules/hotkeys.ahk index 1b513c97..b4100f50 100644 --- a/modules/hotkeys.ahk +++ b/modules/hotkeys.ahk @@ -505,7 +505,8 @@ LButton::LLK_Overlay(vars.hwnd.mapinfo.main, "destroy") *SC003:: *SC004:: *SC005:: -*SC039::Mapinfo_Rank(A_ThisHotkey) +*SC039:: +*RButton::Mapinfo_Rank(A_ThisHotkey) #If (vars.system.timeout = 0) && settings.maptracker.loot && (vars.general.xMouse > vars.monitor.x + vars.monitor.w/2) ;ctrl-clicking loot into stash and logging it diff --git a/modules/item-checker.ahk b/modules/item-checker.ahk index 45b1f224..0f01665f 100644 --- a/modules/item-checker.ahk +++ b/modules/item-checker.ahk @@ -184,9 +184,9 @@ Iteminfo(refresh := 0) ; refresh: 1 to refresh it normally, 2 for clipboard pars item.class_copy := item.class := StrReplace(A_LoopField, Lang_Trans("items_class") " ") ;StrReplace(StrReplace(A_LoopField, "item class: "), " ", "_") If InStr(A_LoopField, Lang_Trans("items_rarity"), 1) item.rarity := StrReplace(A_LoopField, Lang_Trans("items_rarity") " ") - If (A_Index = 3) + If (A_Index = 3) || !item.class && (A_Index = 2) item.name := StrReplace(StrReplace(A_LoopField, "superior "), "synthesised ") ;remove 'superior' and 'synthesised' from the name - If (A_Index = 4) + If (A_Index = 4) || !item.class && (A_Index = 3) item.itembase := StrReplace(A_LoopField, "synthesised ") ;remove 'synthesised' from the base-type } } @@ -2344,12 +2344,14 @@ Iteminfo_Trigger(mode := 0) ;handles shift-clicks on items and currency for the Sleep 350 If settings.hotkeys.rebound_alt && settings.hotkeys.item_descriptions SendInput, % "{" settings.hotkeys.item_descriptions " down}^{c}{" settings.hotkeys.item_descriptions " up}" + Else If vars.poe_version + SendInput, ^{c} Else SendInput, !^{c} ClipWait, 0.1 If Clipboard { If settings.mapinfo.trigger && (Omni_Context(1) = "mapinfo") - Iteminfo_Close(), Mapinfo_Parse(), Mapinfo_GUI() + Iteminfo_Close(), Mapinfo_Parse(1, vars.poe_version), Mapinfo_GUI() Else If settings.iteminfo.trigger LLK_Overlay(vars.hwnd.mapinfo.main, "destroy"), Iteminfo() } diff --git a/modules/lootfilter.ahk b/modules/lootfilter.ahk index 94fb3ce5..aff3d5c9 100644 --- a/modules/lootfilter.ahk +++ b/modules/lootfilter.ahk @@ -3,17 +3,21 @@ local global vars, settings - If !FileExist("ini\lootfilter.ini") - IniWrite, % settings.general.fSize, ini\lootfilter.ini, settings, font-size + If !FileExist("ini" vars.poe_version "\lootfilter.ini") + IniWrite, % settings.general.fSize, % "ini" vars.poe_version "\lootfilter.ini", settings, font-size If !vars.lootfilter vars.lootfilter := {"config_folder": SubStr(vars.system.config, 1, InStr(vars.system.config, "\",, 0))}, settings.lootfilter := {} - ini := IniBatchRead("ini\lootfilter.ini") + ini := IniBatchRead("ini" vars.poe_version "\lootfilter.ini") settings.lootfilter.fSize := !Blank(check := ini.settings["font-size"]) ? check : settings.general.fSize LLK_FontDimensions(settings.lootfilter.fSize, font_height, font_width), settings.lootfilter.fHeight := font_height, settings.lootfilter.fWidth := font_width LLK_FontDimensions(settings.lootfilter.fSize - 4, font_height, font_width), settings.lootfilter.fHeight2 := font_height, settings.lootfilter.fWidth2 := font_width settings.lootfilter.active := !Blank(check := ini.settings["active filter"]) && FileExist(vars.lootfilter.config_folder . check ".filter") ? check : "" + settings.lootfilter.GUI_color := !Blank(check := ini.settings["GUI color"]) ? check : "404040" + settings.lootfilter.hLabel := Ceil(settings.lootfilter.fHeight * 1.5) + While Mod(settings.lootfilter.hLabel, 5) + settings.lootfilter.hLabel -= 1 If settings.lootfilter.active && FileExist(vars.lootfilter.config_folder . settings.lootfilter.active ".filter") Lootfilter_Base("load") @@ -41,16 +45,18 @@ Lootfilter_Base(mode) filter_raw := StrReplace(LLK_FileRead(file%iLoad%, 1), "`r`n`r`n", "§"), filter_raw := StrSplit(filter_raw, "§", "`r`n") For index, chunk in filter_raw + { + chunk := (SubStr(chunk, 1, 1) = "#") ? SubStr(chunk, InStr(chunk, "`n") + 1) : chunk, chunk := StrReplace(chunk, "`t") If (iLoad = 2 && index = 1) && InStr(chunk, "base file:") file2_base := SubStr(chunk, InStr(chunk, "base file:") + 11) Else If (SubStr(chunk, 1, 1) = "#") Continue Else If (iLoad = 1) { - If InStr(chunk, "basetype ==") + If InStr(chunk, "basetype ==") || vars.poe_version && InStr(chunk, "basetype """) { basetype := Lootfilter_Get(chunk, "basetype") - For iBasetype, vBasetype in StrSplit(StrReplace(basetype, """ """, ""","""), ",", " """) + For iBasetype, vBasetype in StrSplit(StrReplace(basetype, """ """, ""","""), ",") If !bases[vBasetype] bases[vBasetype] := 1 Else bases[vBasetype] += 1 @@ -58,7 +64,9 @@ Lootfilter_Base(mode) base_filter.Push(chunk) } Else filter.Push(chunk) + } } + If !filter.Count() vars.lootfilter.filter := base_filter.Clone() vars.lootfilter.filter_backup := filter.Clone() @@ -78,8 +86,15 @@ Lootfilter_Base(mode) If (StrLen(search.2[(index := count - (A_Index - 1))]) < 4) || (LLK_HasVal(search.2, search.2[index],,, 1).Count() > 1) search.2.RemoveAt(index) For index, val in search.2 - For index, match in OCR_HasRegex(vars.lootfilter.bases, "i)" (InStr(val, """") ? "^" : "") StrReplace(val, """") . (InStr(val, """") ? "$" : ""), 1, 1) ;LLK_HasKey(vars.lootfilter.bases, StrReplace(val, """"), InStr(val, """") ? 0 : 1,, 1) + { + For index, match in LLK_HasRegex(vars.lootfilter.bases, "i)" (InStr(val, """") ? "^""" : "") StrReplace(val, """") . (InStr(val, """") ? """$" : ""), 1, 1) search_results[match] := vars.lootfilter.bases[match] + + ;If !InStr(val, """") + For key in vars.lootfilter.bases + If !search_results[key] && InStr(val, StrReplace(key, """")) + search_results[key] := 1 + } vars.lootfilter.search := [search.1, search_results] } vars.lootfilter.search_override := "" @@ -87,7 +102,7 @@ Lootfilter_Base(mode) } Else If (mode = "unavailable") { - IniDelete, ini\lootfilter.ini, settings, active filter + IniDelete, % "ini" vars.poe_version "\lootfilter.ini", settings, active filter vars.lootfilter.filter := vars.lootfilter.filter_backup := vars.lootfilter.modifications := vars.lootfilter.modifications_backup := settings.lootfilter.active := vars.lootfilter.search := "" MsgBox, % "The previous base filter no longer exists, please select a new one" Return @@ -107,7 +122,7 @@ Lootfilter_Base(mode) If (mode = "load") { - vars.lootfilter.modifications_backup := modifications.Clone() + vars.lootfilter.modifications_backup := LLK_CloneObject(modifications) ; modifications.Clone() FileGetTime, timestamp1, % file1, M If FileExist(file2) { @@ -128,7 +143,7 @@ Lootfilter_Base(mode) Continue If Lootfilter_ChunkCompare(chunk, chunk2) { - vars.lootfilter.filter.InsertAt(iFilter, Lootfilter_ChunkModify(chunk2, action, basetype) . (InStr(chunk, "(addition)") ? " (addition)" : "")) + vars.lootfilter.filter.InsertAt(iFilter, Lootfilter_ChunkModify(chunk2, action, {"BaseType": basetype}) . (InStr(chunk, "(addition)") ? " (addition)" : "")) Continue 2 } } @@ -195,15 +210,42 @@ Lootfilter_ChunkCompare(chunk1, chunk2 := "", ignore_stack := 0, ByRef new_chunk Return 1 } -Lootfilter_ChunkModify(chunk, action, basetype, stack_size := 0) +Lootfilter_ChunkModify(chunk, action, object := "", stack_size := 0) { local - modified_chunk := StrReplace(chunk, SubStr(chunk, 1, 4), action,, 1) . (!InStr(chunk, "LLK-UI modification") ? "`r`n`t# LLK-UI modification" : "") - Loop, Parse, modified_chunk, `n, `r - modified_chunk := (A_Index = 1) ? "" : modified_chunk - , modified_chunk .= (!modified_chunk ? "" : "`r`n") . (InStr(A_LoopField, "basetype") ? "`tBaseType == """ StrReplace(basetype, """") """" : A_LoopField) + If (action = 1) + modified_chunk := StrReplace(chunk, (prev_action := SubStr(chunk, 1, 4)), (prev_action = "show") ? "Hide" : "Show",, 1) + Else If !action + modified_chunk := chunk + Else modified_chunk := StrReplace(chunk, SubStr(chunk, 1, 4), action,, 1) + modified_chunk .= (!InStr(modified_chunk, "LLK-UI modification") ? "`r`n# LLK-UI modification" : "") . (LLK_HasKey(object, "color", 1) && !InStr(modified_chunk, "(style)") ? " (style)" : "") + Loop, Parse, modified_chunk, `n, `r + { + If ((index := A_Index) = 1) + modified_chunk := "" + insert_line := "", loopfield := A_LoopField + For key, val in object + If (index != 1) && !LLK_StringCompare(loopfield, ["basetype", "class"]) && !InStr(chunk, key) && !InStr(modified_chunk, key) + { + ;insert_line := InStr(key, "color") ? "Set" key " " val : key " " val + modified_chunk .= "`r`n" (InStr(key, "color") ? "Set" key " " val : key " " val) + } + Else If InStr(loopfield, key) + { + end := 0 + Loop, Parse, % "=<>" + end := ((check := InStr(loopfield, A_LoopField,, 0)) > end) ? check + 1 : end + If !end + end := InStr(A_LoopField, " ") + insert_line := SubStr(A_LoopField, 1, end) . (key = "basetype" ? """" StrReplace(val, """") """" : val) + modified_chunk .= (!modified_chunk ? "" : "`r`n") insert_line + Break + } + If !insert_line + modified_chunk .= (!modified_chunk ? "" : "`r`n") A_LoopField + } Return modified_chunk } @@ -212,7 +254,19 @@ Lootfilter_Get(chunk, data, ByRef operator := "") local operator := "" - If (check := InStr(chunk, data,, 0)) + If (data = "style") + { + object := {} + For index, type in ["TextColor", "BackgroundColor", "BorderColor"] + { + textcolor := "170 158 129 255", backgroundcolor := "0 0 0 240", bordercolor := "0 0 0 255" + If (check := InStr(chunk, type,, 0)) + %type% := SubStr(chunk, check + StrLen(type) + 1), %type% := SubStr(%type%, 1, (check := InStr(%type%, "`r")) ? check - 1 : StrLen(%type%)) + object[type] := %type% + } + Return object + } + Else If (check := InStr(chunk, data,, 0)) { operator := SubStr(chunk, check), operator := SubStr(operator, 1, InStr(operator, "`r") ? InStr(operator, "`r") - 1 : StrLen(operator)) If LLK_PatternMatch(operator, "", ["<", ">", "="]) @@ -221,8 +275,8 @@ Lootfilter_Get(chunk, data, ByRef operator := "") %data% := SubStr(chunk, check), %data% := SubStr(%data%, 1, (check := InStr(%data%, "`r")) ? check - 1 : StrLen(%data%)) start := InStr("arealevel, stacksize", data) ? InStr(%data%, " ",, 0) + 1 : InStr(%data%, InStr(data, "color") ? " " : """") %data% := SubStr(%data%, start + (InStr(data, "color") ? 1 : 0)) + Return (%data%) } - Return (%data%) } Lootfilter_GUI(cHWND := "", side := "", activation := "") @@ -233,10 +287,12 @@ Lootfilter_GUI(cHWND := "", side := "", activation := "") check := LLK_HasVal(vars.hwnd.lootfilter, cHWND), control := SubStr(check, InStr(check, "_") + 1) label := LLK_HasKey(vars.lootfilter.labels, cHWND), dock := InStr(side, "dock_") ? SubStr(side, InStr(side, "_") + 1) : dock + If !LLK_PatternMatch(check, "", ["selection_", "font_"]) && !(cHWND = "close") + vars.lootfilter.selection := vars.lootfilter.selection_backup := "" If (cHWND = "close") { - If vars.lootfilter.pending + If vars.lootfilter.pending || vars.lootfilter.selection.pending { xPos := vars.lootfilter.xPos + vars.lootfilter.mod_header.1, yPos := vars.lootfilter.yPos + vars.lootfilter.mod_header.2 LLK_ToolTip(Lang_Trans("lootfilter_unsaved"), 1.5, xPos, yPos,, "Red",,,,, "White") @@ -245,14 +301,14 @@ Lootfilter_GUI(cHWND := "", side := "", activation := "") } LLK_Overlay(vars.hwnd.lootfilter.main, "destroy"), vars.lootfilter.search := vars.hwnd.lootfilter.main := "" vars.lootfilter.pending := (vars.lootfilter.pending = 2) ? 2 : 0 - vars.lootfilter.filter := vars.lootfilter.filter_backup.Clone(), vars.lootfilter.modifications := vars.lootfilter.modifications_backup.Clone() + vars.lootfilter.filter := vars.lootfilter.filter_backup.Clone(), vars.lootfilter.modifications := LLK_CloneObject(vars.lootfilter.modifications_backup) ; vars.lootfilter.modifications_backup.Clone() Return } Else If (check = "basefilter") { If FileExist(vars.lootfilter.config_folder . A_GuiControl ".filter") { - IniWrite, % """" (settings.lootfilter.active := A_GuiControl) """", ini\lootfilter.ini, settings, active filter + IniWrite, % """" (settings.lootfilter.active := A_GuiControl) """", % "ini" vars.poe_version "\lootfilter.ini", settings, active filter Lootfilter_Base("load") } Else Lootfilter_Base("unavailable") @@ -269,9 +325,24 @@ Lootfilter_GUI(cHWND := "", side := "", activation := "") settings.lootfilter.fSize := settings.general.fSize Else settings.lootfilter.fSize += (control = "plus") ? 1 : (control = "minus" && settings.lootfilter.fSize > 6) ? -1 : 0 KeyWait, LButton - IniWrite, % settings.lootfilter.fSize, ini\lootfilter.ini, settings, font-size + IniWrite, % settings.lootfilter.fSize, % "ini" vars.poe_version "\lootfilter.ini", settings, font-size LLK_FontDimensions(settings.lootfilter.fSize, font_height, font_width), settings.lootfilter.fWidth := font_width, settings.lootfilter.fHeight := font_height LLK_FontDimensions(settings.lootfilter.fSize - 4, font_height, font_width), settings.lootfilter.fWidth2 := font_width, settings.lootfilter.fHeight2 := font_height + settings.lootfilter.hLabel := Ceil(settings.lootfilter.fHeight * 1.5) + While Mod(settings.lootfilter.hLabel, 5) + settings.lootfilter.hLabel -= 1 + } + Else If (check = "gui_color") + { + KeyWait, LButton + KeyWait, RButton + If (vars.system.click = 1) + rgb := RGB_Picker(settings.lootfilter.gui_color) + Else rgb := "default" + + If Blank(rgb) + Return + IniWrite, % """" (settings.lootfilter.gui_color := (rgb = "default") ? "404040" : rgb) """", % "ini" vars.poe_version "\lootfilter.ini", settings, gui color } Else If (check = "search_go") || (cHWND = "search") { @@ -293,15 +364,15 @@ Lootfilter_GUI(cHWND := "", side := "", activation := "") shift := GetKeyState("Shift", "P"), input := LLK_ControlGet(vars.hwnd.lootfilter.search) If InStr(input, """" basetype """") && (shift || !InStr(input, ",")) Return - GuiControl,, % vars.hwnd.lootfilter.search, % (shift ? input ", " : "") """" basetype """" + GuiControl,, % vars.hwnd.lootfilter.search, % (shift && !Blank(input) ? input ", " : "") """" basetype """" Lootfilter_GUI("search") Return } Else If (check = "apply_mods") { - If !LLK_Progress(vars.hwnd.lootfilter.apply_bar, "LButton",, 0) + If !LLK_Progress(vars.hwnd.lootfilter.apply_bar, "LButton",, 0) && !(dev_mode := (settings.general.dev && LLK_Progress(vars.hwnd.lootfilter.apply_bar, "RButton",, 0))) Return - vars.lootfilter.filter_backup := vars.lootfilter.filter.Clone(), vars.lootfilter.modifications_backup := vars.lootfilter.modifications.Clone() + vars.lootfilter.filter_backup := vars.lootfilter.filter.Clone(), vars.lootfilter.modifications_backup := LLK_CloneObject(vars.lootfilter.modifications) ; vars.lootfilter.modifications.Clone() FileDelete, % vars.lootfilter.config_folder "LLK-UI*.filter" file_dump := "# LLK-UI modded filter, base file: " settings.lootfilter.active For index, chunk in vars.lootfilter.filter @@ -309,14 +380,18 @@ Lootfilter_GUI(cHWND := "", side := "", activation := "") file := FileOpen(vars.lootfilter.config_folder . (new_file := "LLK-UI_modded_filter") ".filter", "w", "UTF-8-RAW") file.Write(file_dump "`r`n"), file.Close() KeyWait, LButton + KeyWait, RButton If (vars.lootfilter.pending = 2) Lootfilter_Base("load") vars.lootfilter.pending := "", Clipboard := "/itemfilter " new_file - WinActivate, % "ahk_id " vars.hwnd.poe_client - WinWaitActive, % "ahk_id " vars.hwnd.poe_client - SendInput, {ENTER} - Sleep 100 - SendInput, ^{v}{ENTER} + If !dev_mode + { + WinActivate, % "ahk_id " vars.hwnd.poe_client + WinWaitActive, % "ahk_id " vars.hwnd.poe_client + SendInput, {ENTER} + Sleep 100 + SendInput, ^{v}{ENTER} + } } Else If InStr(check, "hide_") || InStr(check, "modificationtext_") && (vars.system.click = 2) || (check = "allmodifications") { @@ -336,12 +411,12 @@ Lootfilter_GUI(cHWND := "", side := "", activation := "") vars.lootfilter.filter.RemoveAt(index) } Else - If InStr(chunk, "`r`n`tcontinue") || InStr(chunk, "LLK-UI modification") || !InStr(Lootfilter_Get(chunk, "basetype"), """" control """") - || (arealevel := Lootfilter_Get(chunk, "arealevel"), operator) && (arealevel <= 67) && !InStr(operator, ">") + If InStr(chunk, "`r`ncontinue") || InStr(chunk, "LLK-UI modification") || !InStr(Lootfilter_Get(chunk, "basetype"), """" control """") + || (arealevel := Lootfilter_Get(chunk, "arealevel"), operator) && (arealevel <= (vars.poe_version ? 1 : 67)) && !InStr(operator, ">") ; placeholder: arealevel 1 for PoE2 Continue Else { - modified_chunk := Lootfilter_ChunkModify(chunk, "Hide", control) + modified_chunk := Lootfilter_ChunkModify(chunk, "Hide", {"BaseType": control}) If InStr(prev_chunk, "LLK-UI modification") && InStr(Lootfilter_Get(prev_chunk, "basetype"), """" control """") vars.lootfilter.filter[index - 1] := modified_chunk Else vars.lootfilter.filter.InsertAt(index, modified_chunk) @@ -364,30 +439,76 @@ Lootfilter_GUI(cHWND := "", side := "", activation := "") vars.lootfilter.filter.InsertAt(control, modified_chunk), Lootfilter_Base("modifications") } */ + Else If InStr(check, "selection_") + { + selection := vars.lootfilter.selection + If InStr(check, "color") + { + If (vars.system.click = 2) + vars.lootfilter.selection.modifications[control] := vars.lootfilter.selection_backup.modifications[control] + Else If (vars.system.click = 1) && !Blank(pick := RGB_Picker(RGB_Convert(original := vars.lootfilter.selection.modifications[control]))) + rgb := RGB_Convert(pick), vars.lootfilter.selection.modifications[control] := rgb.1 " " rgb.2 " " rgb.3 " " SubStr(original, InStr(original, " ",, 0) + 1) + Else Return + ;GuiControl, % "+Background" pick, % vars.hwnd.lootfilter["selection_" control "_back"] + ;GuiControl, % (control = "textcolor" ? "+c" : "+Background") pick, % vars.hwnd.lootfilter["selection_" control "_preview"] + ;GuiControl, % "movedraw", % vars.hwnd.lootfilter["selection_" control "_preview"] + } + Else If InStr(check, "_discard") + { + If LLK_Progress(vars.hwnd.lootfilter.x_bar, "LButton") + vars.lootfilter.selection := vars.lootfilter.selection_backup := "" + Else Return + } + Else If InStr(check, "_apply") + { + If InStr((chunk := vars.lootfilter.filter[selection.index]), "LLK-UI modification") + vars.lootfilter.filter[selection.index] := Lootfilter_ChunkModify(chunk, 0, vars.lootfilter.selection.modifications) + Else vars.lootfilter.filter.InsertAt(selection.index, Lootfilter_ChunkModify(chunk, 0, vars.lootfilter.selection.modifications)) + + Lootfilter_Base("modifications"), vars.lootfilter.selection := vars.lootfilter.selection_backup := "" + } + } Else If !Blank(label) { - If (vars.system.click = 1) - Return - text := Trim(LLK_ControlGet(cHWND), " "), filter_index := vars.lootfilter.labels[label].1, basetype := IsNumber(SubStr(text, 1, 1)) ? SubStr(text, InStr(text, " ") + 1) : text + text := SubStr(LLK_ControlGet(cHWND), 2, -1), filter_index := vars.lootfilter.labels[label].1, basetype := IsNumber(SubStr(text, 1, 1)) ? SubStr(text, InStr(text, " ") + 1) : text chunk := vars.lootfilter.filter[filter_index], action := SubStr(chunk, 1, 4), stack := Lootfilter_Get(chunk, "stacksize") - If (vars.system.click = 2) + If (vars.system.click = 1) + { + GuiControl,, % vars.hwnd.lootfilter.search, % """" basetype """" + Lootfilter_Base("search") + vars.lootfilter.selection := {"index": filter_index, "stack": stack, "modifications": {"basetype": basetype}}, colors := Lootfilter_Get(vars.lootfilter.filter[filter_index], "style") + For key, val in colors + vars.lootfilter.selection.modifications[key] := val + vars.lootfilter.selection_backup := LLK_CloneObject(vars.lootfilter.selection) + } + Else { If InStr(chunk, "LLK-UI modification") - vars.lootfilter.filter.RemoveAt(filter_index), Lootfilter_Base("modifications") + { + KeyWait, RButton, T0.2 + longpress := ErrorLevel + + If !InStr(chunk, "(style)") || InStr(chunk, "(style)") && ErrorLevel && LLK_Progress(vars.hwnd.lootfilter["labelbar_" filter_index], "RButton") + vars.lootfilter.filter.RemoveAt(filter_index) + Else If !longpress + vars.lootfilter.filter[filter_index] := Lootfilter_ChunkModify(chunk, 1) + + Lootfilter_Base("modifications") + } Else { - modified_chunk := Lootfilter_ChunkModify(chunk, (action2 := (action = "show") ? "Hide" : "Show"), basetype) + modified_chunk := Lootfilter_ChunkModify(chunk, (action2 := (action = "show") ? "Hide" : "Show"), {"BaseType": basetype}) vars.lootfilter.filter.InsertAt(filter_index, modified_chunk) If stack For index, val in vars.lootfilter.filter - If (index <= filter_index) || !InStr(val, """" basetype """") || (arealevel := Lootfilter_Get(val, "arealevel", operator)) && (arealevel <= 67) && !InStr(operator, ">") + If (index <= filter_index) || !InStr(val, """" basetype """") || (arealevel := Lootfilter_Get(val, "arealevel", operator)) && (arealevel <= (vars.poe_version ? 1 : 67)) && !InStr(operator, ">") || InStr((prev_chunk := vars.lootfilter.filter[index - 1]), "LLK-UI modification") && InStr(prev_chunk, """" basetype """") Continue Else If Lootfilter_ChunkCompare(modified_chunk, val, 1) If InStr(val, "LLK-UI modification") ;override previous modifications to avoid unintentional flip-flopping vars.lootfilter.filter[index] := StrReplace(SubStr(val, 1, 4), action2,, 1) - Else vars.lootfilter.filter.InsertAt(index, Lootfilter_ChunkModify(val, action2, basetype)) + Else vars.lootfilter.filter.InsertAt(index, Lootfilter_ChunkModify(val, action2, {"BaseType": basetype})) Lootfilter_Base("modifications") } } @@ -412,7 +533,7 @@ Lootfilter_GUI(cHWND := "", side := "", activation := "") Gui, %GUI_name%: Add, DDL, % "x-1 y-1 Hidden" Gui, %GUI_name%: Font, % "s" settings.lootfilter.fSize - Gui, %GUI_name%: Add, Text, % "xp yp hp Border Right Section HWNDhwnd w" wLabel, % Lang_Trans("lootfilter_basefilter") " " + Gui, %GUI_name%: Add, Text, % "xp yp hp Border BackgroundTrans Right Section HWNDhwnd w" wLabel, % Lang_Trans("lootfilter_basefilter") " " Gui, %GUI_name%: Font, % "s" settings.lootfilter.fSize - 4 Loop, Files, % vars.lootfilter.config_folder "*.filter" @@ -423,8 +544,8 @@ Lootfilter_GUI(cHWND := "", side := "", activation := "") wDDL := Max(fWidth * 10, Ceil(settings.lootfilter.fWidth2 * max_length * 0.9)) Gui, %GUI_name%: Add, Text, % "ys hp BackgroundTrans Border w" wDDl Gui, %GUI_name%: Add, DDL, % "xp yp wp HWNDhwnd1 gLootfilter_GUI R" Max(1, count), % ddl - Gui, %GUI_name%: Add, Pic, % "ys hp-2 w-1 Border gLootfilter_GUI HWNDhwnd2", % "HBitmap:*" vars.pics.global.reload - vars.hwnd.help_tooltips["lootfilter_basefilter"] := vars.hwnd.lootfilter.basefilter := hwnd1, vars.hwnd.lootfilter.refresh := vars.hwnd.help_tooltips["lootfilter_refresh"] := hwnd2 + Gui, %GUI_name%: Add, Pic, % "ys hp-2 w-1 Border BackgroundTrans gLootfilter_GUI HWNDhwnd2", % "HBitmap:*" vars.pics.global.reload + vars.hwnd.help_tooltips["lootfilter_basefilter"] := vars.hwnd.lootfilter.basefilter := hwnd1, vars.hwnd.lootfilter.refresh := hwnd2, vars.hwnd.help_tooltips["lootfilter_refresh"] := hwnd3 Gui, %GUI_name%: Font, % "s" settings.lootfilter.fSize If settings.lootfilter.active && !FileExist(vars.lootfilter.config_folder . settings.lootfilter.active ".filter") @@ -437,19 +558,22 @@ Lootfilter_GUI(cHWND := "", side := "", activation := "") Gui, %GUI_name%: Add, Text, % "ys hp Border BackgroundTrans w" wDDL, % " " Gui, %GUI_name%: Add, Edit, % "xp yp wp hp cBlack HWNDhwnd1", % vars.lootfilter.search.1 Gui, %GUI_name%: Add, Button, % "Hidden Default xp yp wp hp gLootfilter_GUI HWNDhwnd", ok - Gui, %GUI_name%: Add, Pic, % "ys hp-2 w-1 Border gLootfilter_GUI HWNDhwnd2", % "HBitmap:*" vars.pics.global.close + Gui, %GUI_name%: Add, Pic, % "ys hp-2 w-1 Border BackgroundTrans gLootfilter_GUI HWNDhwnd2", % "HBitmap:*" vars.pics.global.close Gui, %GUI_name%: Font, % "s" settings.lootfilter.fSize ControlGetPos, xSearch, ySearch, wSearch, hSearch,, ahk_id %hwnd1% vars.hwnd.lootfilter.search_go := hwnd, vars.hwnd.lootfilter.search := vars.hwnd.help_tooltips.lootfilter_search := hwnd1 - vars.hwnd.lootfilter.resetsearch := vars.hwnd.help_tooltips["lootfilter_search reset"] := hwnd2 + vars.hwnd.lootfilter.resetsearch := hwnd2, vars.hwnd.help_tooltips["lootfilter_search reset"] := hwnd3 } - Gui, %GUI_name%: Add, Text, % "ys hp Border", % " " Lang_Trans("global_uisize") " " - Gui, %GUI_name%: Add, Text, % "ys hp Border Center gLootfilter_GUI HWNDhwnd w" fWidth * 2, % "–" - Gui, %GUI_name%: Add, Text, % "ys hp Border Center gLootfilter_GUI HWNDhwnd1 w" fWidth * 2, % "r" - Gui, %GUI_name%: Add, Text, % "ys hp Border Center gLootfilter_GUI HWNDhwnd2 w" fWidth * 2, % "+" - ControlGetPos, xControl, yControl, wControl, hControl,, % "ahk_id " hwnd2 - vars.hwnd.lootfilter.font_minus := hwnd, vars.hwnd.lootfilter.font_reset := hwnd1, vars.hwnd.lootfilter.font_plus := hwnd2, xMax := xControl + wControl, yMax := yControl, hMax := hDDL := hControl + Gui, %GUI_name%: Add, Text, % "ys hp Border BackgroundTrans", % " " Lang_Trans("global_uisize") " " + Gui, %GUI_name%: Add, Text, % "ys hp Border BackgroundTrans Center gLootfilter_GUI HWNDhwnd w" fWidth * 2, % "–" + Gui, %GUI_name%: Add, Text, % "ys hp Border BackgroundTrans Center gLootfilter_GUI HWNDhwnd1 w" fWidth * 2, % "r" + Gui, %GUI_name%: Add, Text, % "ys hp Border BackgroundTrans Center gLootfilter_GUI HWNDhwnd2 w" fWidth * 2, % "+" + Gui, %GUI_name%: Add, Text, % "ys hp Border BackgroundTrans gLootfilter_GUI HWNDhwnd3 w" fWidth, % "" + Gui, %GUI_name%: Add, Progress, % "Disabled xp yp wp hp Border BackgroundBlack HWNDhwnd4 c" settings.lootfilter.GUI_color, 100 + ControlGetPos, xControl, yControl, wControl, hControl,, % "ahk_id " hwnd3 + vars.hwnd.lootfilter.font_minus := hwnd, vars.hwnd.lootfilter.font_reset := hwnd1, vars.hwnd.lootfilter.font_plus := hwnd2, vars.hwnd.lootfilter.gui_color := hwnd3, vars.hwnd.help_tooltips["lootfilter_gui color"] := hwnd4 + xMax := xControl + wControl, yMax := yControl, hMax := hDDL := hControl vars.lootfilter.labels := {}, labels := {}, yHide_last := hHide_last := yModification_last := hModification_last := 0 /* currently unused: list modifications in the search-list if search is blank @@ -471,17 +595,17 @@ Lootfilter_GUI(cHWND := "", side := "", activation := "") For index, chunk in vars.lootfilter.filter { arealevel := Lootfilter_Get(chunk, "arealevel", operator) - If !InStr(chunk, """" base """") || InStr(chunk, "`r`n`tcontinue") || arealevel && (arealevel <= 67) && !InStr(operator, ">") || search_override && !InStr(chunk, "LLK-UI modification") + If !RegExMatch(chunk, "i)\s.*" base ".*") || InStr(chunk, "`r`ncontinue") || arealevel && (arealevel <= (vars.poe_version ? 1 : 67)) && !InStr(operator, ">") || search_override && !InStr(chunk, "LLK-UI modification") Continue - stack := Lootfilter_Get(chunk, "stacksize"), text := (stack ? stack "x " : "") base + stack := Lootfilter_Get(chunk, "stacksize"), text := (stack ? stack "x " : "") StrReplace(base, """") - If stack && labels[text] || LLK_HasKey(labels, "x " base, 1) && labels[text] + If stack && labels[text] || LLK_HasKey(labels, "x " StrReplace(base, """"), 1) && labels[text] Continue If !stack Loop If !InStr((prev_chunk := vars.lootfilter.filter[index - A_Index]), "LLK-UI modification") Break - Else If InStr(prev_chunk, """" base """") && !InStr(prev_chunk, "(addition)") + Else If InStr(prev_chunk, base) && !InStr(prev_chunk, "(addition)") Continue 2 If ((count += 1) = 1) @@ -489,7 +613,7 @@ Lootfilter_GUI(cHWND := "", side := "", activation := "") ControlGetPos,, yFirst,, hFirst,, ahk_id %hwnd% yFirst += hFirst - 2 } - Lootfilter_ItemLabel(text, index, (count = 1) ? "xs x" wLabel + margin - 1 " Section y+" margin : "ys x+" margin//2, (base = prev) ? xMax : 10000, count) + Lootfilter_ItemLabel(text, index, (count = 1) ? "xs x" wLabel + margin - 1 " Section y+" margin + 1 : "ys x+" margin//2, (base = prev) ? xMax : 10000, count) ControlGetPos,, yLast,, hLast,, % "ahk_id " vars.hwnd.lootfilter.last_control prev := base, yLast += hLast, labels[text] := 1, last_index := index } @@ -509,21 +633,72 @@ Lootfilter_GUI(cHWND := "", side := "", activation := "") } */ modified := (modifications[base]) - Gui, %Gui_name%: Add, Text, % "ys x-1 y" yFirst " Border BackgroundTrans Center 0x200 gLootfilter_GUI HWNDhwnd h" yLast + margin - yFirst " w" wLabel - , % Lang_Trans("global_" (modified ? "revert" : "hide")) - Gui, %Gui_name%: Add, Progress, % "Disabled Border HWNDhwnd2 Border xp yp wp hp BackgroundBlack c" (modified ? "606060" : "Black"), % 100 + Gui, %Gui_name%: Add, Text, % "ys x-1 y" yFirst + (A_Index = 1 ? 0 : 1) " Border BackgroundTrans Center 0x200 gLootfilter_GUI HWNDhwnd h" yLast + margin + 2 - yFirst " w" wLabel, % Lang_Trans("global_" (modified ? "revert" : "hide")) + Gui, %Gui_name%: Add, Progress, % "Disabled Border HWNDhwnd2 Border xp yp wp hp BackgroundBlack c" (modified ? settings.lootfilter.gui_color : "Black"), % 100 + Gui, %Gui_name%: Add, Text, % "x+-1 yp w" xMax - wLabel + 1 " hp Border BackgroundTrans", % "" + Gui, %GUI_name%: Add, Progress, % "Disabled xp yp wp hp Border BackgroundBlack c" settings.lootfilter.gui_color, 100 hide_last := vars.hwnd.lootfilter["hide_" base] := hwnd vars.hwnd.help_tooltips["lootfilter_" (modified ? "revert" : "hide") . handle] := hwnd2, handle .= "|" - If (bases != search.Count()) - Gui, %GUI_name%: Add, Progress, % "Disabled Background606060 HWNDhwnd xs x-1 Section h2 w" xMax " y+-1", % 0 + ;If (bases != search.Count()) + ; Gui, %GUI_name%: Add, Progress, % "Disabled Background606060 HWNDhwnd xs x-1 Section h2 w" xMax " y+-1", % 0 } } Else If !Blank((search := vars.lootfilter.search).1) Gui, %GUI_name%: Add, Text, % "Center x-1 cRed y" yMax + hMax " w" xMax - 1, % Lang_Trans("global_match", (StrLen(search.1) < 4 || search.2 = -1) ? 2 : 1) Gui, %GUI_name%: Font, % "s" settings.lootfilter.fSize - If modifications.Count() || vars.lootfilter.pending + + If (selection := vars.lootfilter.selection) + { + text := (selection.stack ? selection.stack "x " : "") selection.modifications.basetype, LLK_PanelDimensions([Lang_Trans("lootfilter_selection")], settings.lootfilter.fSize, wSelectionHeader, hSelectionHeader) + Gui, %GUI_name%: Add, Text, % "Section Border BackgroundTrans Center HWNDhwnd_header gLootfilter_GUI x" xMax + 1 " y" yMax - 1 " w" wSelectionHeader " h" hDDL, % Lang_Trans("lootfilter_selection") + ControlGetPos, xMods, yMods, wMods, hMods,, ahk_id %hwnd_header% + Gui, %GUI_name%: Font, % "s" settings.lootfilter.fSize - 2 + Lootfilter_ItemLabel(text, selection.index, ["xs Section xp+" margin " y+" margin + 1]) + Gui, %GUI_name%: Add, Text, % "ys x+0 hp BackgroundTrans HWNDhwnd 0x200", % " " Lang_Trans("global_color", 2) " " + ControlGetPos, xText, yText, wText, hText,, ahk_id %hwnd% + colors := Lootfilter_Get(filter[selection.index], "style"), vars.lootfilter.selection.pending := 0 + For index, val in ["textcolor", "backgroundcolor", "bordercolor"] + { + If (index = 1) + style := "ys x+" settings.lootfilter.fHeight//2 " yp+" settings.lootfilter.hLabel * 0.4 " w" Floor(settings.lootfilter.fWidth*3) " h" settings.lootfilter.hLabel/5 + Else If (index = 2) + style := "xp-" settings.lootfilter.hLabel/5 " yp-" settings.lootfilter.hLabel/5 " wp+" settings.lootfilter.hLabel*0.4 " hp+" settings.lootfilter.hLabel*0.4 + Else style := "xp-" settings.lootfilter.hLabel/5 " y" yText - 1 " wp+" settings.lootfilter.hLabel*0.4 " h" settings.lootfilter.hLabel + ;Else style := "" + Gui, %GUI_name%: Add, Text, % style " Border BackgroundTrans gLootfilter_GUI HWNDhwnd" + Gui, %GUI_name%: Add, Progress, % "Disabled HWNDhwnd2 xp yp wp hp Background" (RGB_Convert(Blank(vars.lootfilter.selection.modifications[val]) ? colors[val] : vars.lootfilter.selection.modifications[val])), 0 + vars.hwnd.lootfilter["selection_" val] := hwnd, vars.hwnd.lootfilter["selection_" val "_back"] := vars.hwnd.help_tooltips["lootfilter_" val] := hwnd2 + ControlGetPos, xSelection, ySelection, wSelection, hSelection,, ahk_id %hwnd% + xSelection += wSelection, ySelection += hSelection + } + If (vars.lootfilter.selection_backup.modifications.Count() != vars.lootfilter.selection.modifications.Count()) + vars.lootfilter.selection.pending := 1 + Else + For key, val in vars.lootfilter.selection_backup.modifications + If (val != vars.lootfilter.selection.modifications[key]) + vars.lootfilter.selection.pending := 1 + + wSelectionHeader := Max(wSelectionHeader, xSelection - xMods + margin) + While Mod(wSelectionHeader, 2) + wSelectionHeader += 1 + ControlMove,, xMods,, wSelectionHeader,, ahk_id %hwnd_header% + + Gui, %GUI_name%: Add, Text, % "Border BackgroundTrans x" xMods - 1 " y" yMods + hMods - 2 " w" wSelectionHeader " h" ySelection - hMods + margin + 2 + Gui, %GUI_name%: Add, Progress, % "Disabled xp yp wp hp Border BackgroundBlack c" settings.lootfilter.gui_color, 100 + + If vars.lootfilter.selection.pending + { + Gui, %Gui_name%: Add, Text, % "xs Section xp Border Center HWNDhwnd gLootfilter_GUI w" wSelectionHeader/2, % Lang_Trans("global_apply") + Gui, %Gui_name%: Add, Text, % "ys x+0 Border BackgroundTrans Center HWNDhwnd2 gLootfilter_GUI w" wSelectionHeader/2, % Lang_Trans("global_discard") + Gui, %GUI_name%: Add, Progress, % "Disabled xp yp wp hp Border HWNDhwnd_header_bar Vertical BackgroundBlack cRed Range0-500", 0 + ControlGetPos, xModification_last, yModification_last, wModification_last, hModification_last,, ahk_id %hwnd2% + vars.lootfilter.mod_header := [xMods, yModification_last + hModification_last] + vars.hwnd.lootfilter.selection_apply := hwnd, vars.hwnd.lootfilter.selection_discard := hwnd2, vars.hwnd.lootfilter.x_bar := hwnd_header_bar + } + } + Else If modifications.Count() || vars.lootfilter.pending { dimensions := [vars.lootfilter.pending ? Lang_Trans("global_apply", 2) : "."] LLK_PanelDimensions([Lang_Trans("lootfilter_modifications")], settings.lootfilter.fSize, wHeader, hHeader) @@ -540,8 +715,8 @@ Lootfilter_GUI(cHWND := "", side := "", activation := "") For key, array in modifications { color := LLK_HasVal(array, "(incompatible)", 1) ? "FF8000" : "" - Gui, %GUI_name%: Add, Text, % "xs Section Border HWNDhwnd gLootfilter_GUI w" wModifications . (color ? " c" color : ""), % " " LLK_StringCase(key) ": " array.Count() - ControlGetPos,, yModification_last,, hModification_last,, ahk_id %hwnd% + Gui, %GUI_name%: Add, Text, % "xs Section Border BackgroundTrans HWNDhwnd gLootfilter_GUI w" wModifications . (color ? " c" color : ""), % " " LLK_StringCase(key) ": " array.Count() + ControlGetPos, xModification_last, yModification_last, wModification_last, hModification_last,, ahk_id %hwnd% vars.hwnd.lootfilter["modificationx_" key] := hwnd0, vars.hwnd.lootfilter["modificationtext_" key] := hwnd If color vars.hwnd.help_tooltips["lootfilter_incompatible"] := hwnd, handle2 .= "|" @@ -551,24 +726,28 @@ Lootfilter_GUI(cHWND := "", side := "", activation := "") { Gui, %GUI_name%: Add, Text, % "xs Section Border BackgroundTrans Center gLootfilter_GUI HWNDhwnd cRed w" wModifications, % (pending = 2) ? Lang_Trans("lootfilter_update") : Lang_Trans("global_apply", 2) Gui, %GUI_name%: Add, Progress, % "Disabled xp yp wp hp Border Vertical HWNDhwnd2 BackgroundBlack cGreen Range0-500", 0 - ControlGetPos,, yModification_last,, hModification_last,, ahk_id %hwnd% + ControlGetPos, xModification_last, yModification_last, wModification_last, hModification_last,, ahk_id %hwnd% vars.hwnd.lootfilter.apply_mods := hwnd, vars.hwnd.lootfilter.apply_bar := vars.hwnd.help_tooltips["lootfilter_apply mods"] := hwnd2 } + } + + If vars.lootfilter.selection || modifications.Count() || vars.lootfilter.pending + { If (search := vars.lootfilter.search.2).Count() && (search.2 != -1) ControlGetPos,, yHide_last,, hHide_last,, % "ahk_id " hide_last yHide_last := yHide_last + hHide_last, yModification_last := yModification_last + hModification_last - + If yHide_last || yModification_last Gui, %GUI_name%: Add, Progress, % "Disabled Background606060 w4 x" xMax - 2 " y-1 h" Max(yHide_last, yModification_last), 0 If yHide_last && (yHide_last < yModification_last) - Gui, %GUI_name%: Add, Progress, % "Disabled Background606060 HWNDhwnd x-1 y" yFirst + yLast + margin - yFirst - 1 " h2 w" xMax, % 0 + Gui, %GUI_name%: Add, Progress, % "Disabled Background606060 HWNDhwnd x-1 y" yFirst + yLast + margin - yFirst - 1 " h2 w" xMax, % 0 } If vars.hwnd.lootfilter.search && InStr(check, "search") ControlFocus,, % "ahk_id " vars.hwnd.lootfilter.search Else ControlFocus,, % "ahk_id " vars.hwnd.lootfilter.font_reset - Gui, %GUI_name%: Show, % "NA x10000 y10000" + Gui, %GUI_name%: Show, % "NA AutoSize x10000 y10000" WinGetPos,,, wWin, hWin, ahk_id %hwnd_lootfilter% vars.lootfilter.width := wWin @@ -584,12 +763,13 @@ Lootfilter_GUI(cHWND := "", side := "", activation := "") LLK_ToolTip(Lang_Trans("global_match", 2), 3, xPos + xSearch, yPos + ySearch + hSearch,, "Red", settings.general.fSize + 4) } -Lootfilter_ItemLabel(text, filter_index, style, xMax, iGroup) +Lootfilter_ItemLabel(text, filter_index, style, xMax := 10000, iGroup := 0) { local global vars, settings static xControl, wControl, dimensions := {} + selection := IsObject(style), style := IsObject(style) ? style.1 : style ;style being an object is used as a pseudo parameter for drawing a style-customization preview rather than a label in the search results GUI_name := vars.hwnd.lootfilter.GUI_name, loaded_filter := vars.lootfilter.filter, chunk := loaded_filter[filter_index], margin := settings.lootfilter.fWidth//2 basetype := StrReplace(Lootfilter_Get(chunk, "basetype"), """") If (dimensions.fSize != settings.lootfilter.fSize - 2) @@ -605,7 +785,8 @@ Lootfilter_ItemLabel(text, filter_index, style, xMax, iGroup) For index, type in ["textcolor", "backgroundcolor", "bordercolor"] { - textcolor := [170, 158, 129, 255], rgb := "" + textcolor := [170, 158, 129, 255], backgroundcolor := [0, 0, 0, 240], bordercolor := [0, 0, 0, 255] + rgb := "" If InStr(chunk, type) %type% := SubStr(chunk, InStr(chunk, type) + StrLen(type) + 1), %type% := SubStr(%type%, 1, InStr(%type%, "`r") - 1), %type% := StrSplit(%type%, " ") For iRGB, vRGB in %type% @@ -622,22 +803,31 @@ Lootfilter_ItemLabel(text, filter_index, style, xMax, iGroup) If !InStr(vars.lootfilter.modifications[basetype].1, "(addition)") && Lootfilter_ChunkCompare(chunk, val) mod_index := index0 - style0 := "BackgroundTrans Border 0x200" (!stacked_group || stacked_group && mod_index < 2 ? " gLootfilter_GUI" : "") - . " h" settings.lootfilter.fHeight * 1.4 " " (xControl + wControl + margin + dimensions[text] >= xMax ? "xs Section y+" margin + 1 : style) + style0 := "BackgroundTrans 0x200" ((!stacked_group || stacked_group && mod_index < 2) && !selection ? " gLootfilter_GUI" : "") + . " h" settings.lootfilter.hLabel " " (xControl + wControl + margin + dimensions[text] >= xMax ? "xs Section y+" margin + 1 : style) } - Else style0 := "Disabled " (index = 2 ? "xp+2 yp+2 wp-4 hp-4" : "xp-2 yp-2 wp+4 hp+4") + Else style0 := "Disabled Range0-500 Vertical c" (SubStr(rgb, 3) = "FF0000" ? "000000" : "Red") " " (index = 2 ? "xp+2 yp+2 wp-4 hp-4" : "xp-2 yp-2 wp+4 hp+4") - Gui, %GUI_name%: Add, % (index = 1) ? "Text" : "Progress", % style0 " " (index = 1 ? "c" : "Background") rgb " HWNDhwnd", % (index = 1) ? " " text " " : 0 - If (index = 1) - vars.lootfilter.labels[hwnd] := (iGroup = 1 && stack) ? [filter_index, "all"] : [filter_index] - ControlGetPos, xControl,, wControl,,, ahk_id %hwnd% - vars.hwnd.lootfilter.last_control := hwnd - If (index = 2) - vars.hwnd.help_tooltips["lootfilter_tooltip " filter_index . vars.lootfilter.handles[filter_index]] := hwnd, vars.lootfilter.handles[filter_index] .= "|" - Else If (index = 3) + Gui, %GUI_name%: Add, % (index = 1) ? "Text" : "Progress", % style0 " " (index = 1 ? "c" : "Background") . (selection ? RGB_Convert(vars.lootfilter.selection.modifications[type]) : rgb) " HWNDhwnd", % (index = 1) ? " " text " " : 0 + If selection + vars.hwnd.lootfilter["selection_" type "_preview"] := hwnd + Else { - thickness := Max(2, settings.lootfilter.fWidth//8) - Gui, %GUI_name%: Add, Progress, % "Disabled Background" (highlight ? (InStr(chunk, "(addition)") ? "00CC00" : "Aqua") : "Black") " xp-" thickness " yp-" thickness " wp+" thickness*2 " hp+" thickness*2, 0 + If (index = 1) + vars.lootfilter.labels[hwnd] := (iGroup = 1 && stack) ? [filter_index, "all"] : [filter_index] + Else If (index = 2) + vars.hwnd.help_tooltips["lootfilter_tooltip " filter_index . vars.lootfilter.handles[filter_index]] := hwnd, vars.lootfilter.handles[filter_index] .= "|", vars.hwnd.lootfilter["labelbar_" filter_index] := hwnd + Else If (index = 3) + { + thickness := Max(2, settings.lootfilter.fWidth//8) + Gui, %GUI_name%: Add, Progress, % "Disabled Background" (highlight ? (InStr(chunk, "(style)") ? "FF8000" : "Aqua") : settings.lootfilter.gui_color) " xp-" thickness " yp-" thickness " wp+" thickness*2 " hp+" thickness*2, 0 + } + + If (index != 3) + { + ControlGetPos, xControl,, wControl,,, ahk_id %hwnd% + vars.hwnd.lootfilter.last_control := hwnd + } } } Gui, %GUI_name%: Font, norm diff --git a/modules/map-info.ahk b/modules/map-info.ahk index bee689b6..2887c8db 100644 --- a/modules/map-info.ahk +++ b/modules/map-info.ahk @@ -3,9 +3,6 @@ local global vars, settings, db, Json - If vars.poe_version - Return - If !FileExist("ini" vars.poe_version "\map info.ini") { IniWrite, % "", % "ini" vars.poe_version "\map info.ini", Settings @@ -14,28 +11,35 @@ ini := IniBatchRead("ini" vars.poe_version "\map info.ini") If !ini.HasKey("pinned") - { - IniWrite, % "001=1`n002=1`n003=1`n004=1`n007=1", % "ini" vars.poe_version "\map info.ini", pinned - ini.pinned := {"001": 1, "002": 1, "003": 1, "004": 1, "007": 1} - } - settings.features.mapinfo := (settings.general.lang_client = "unknown") || vars.poe_version ? 0 : LLK_IniRead("ini" vars.poe_version "\config.ini", "Features", "enable map-info panel", 0) + If !vars.poe_version + { + IniWrite, % "001=1`n002=1`n003=1`n004=1`n007=1", % "ini" vars.poe_version "\map info.ini", pinned + ini.pinned := {"001": 1, "002": 1, "003": 1, "004": 1, "007": 1} + } + Else + { + IniWrite, % "053=1`n054=1`n056=1", % "ini" vars.poe_version "\map info.ini", pinned + ini.pinned := {"053": 1, "054": 1, "056": 1} + } + settings.features.mapinfo := (settings.general.lang_client = "unknown") ? 0 : LLK_IniRead("ini" vars.poe_version "\config.ini", "Features", "enable map-info panel", 0) settings.mapinfo := {"IDs": {}, "pinned": {}} For key, val in ini.pinned settings.mapinfo.pinned[key] := val - Loop, Parse, % StrReplace(LLK_FileRead("data\english\map-info.txt"), "`t"), `n, `r + Loop, Parse, % StrReplace(LLK_FileRead("data\english\map-info" vars.poe_version ".txt"), "`t"), `n, `r { If !InStr(A_LoopField, "id=") Continue - ID := SubStr(A_LoopField, InStr(A_LoopField, "=") + 1), settings.mapinfo.IDs[ID] := {"rank": !Blank(check := ini[ID].rank) ? check : 1, "show": !Blank(check1 := ini[ID].show) ? check1 : 1} + ID := SubStr(A_LoopField, InStr(A_LoopField, "=") + 1), settings.mapinfo.IDs[ID] := {"rank": !Blank(check := ini[ID].rank) ? check : 0, "show": !Blank(check1 := ini[ID].show) ? check1 : 1} } - settings.mapinfo.dColor := ["FFFFFF", "f77e05", "Red", "Fuchsia"], settings.mapinfo.eColor_default := ["FFFFFF", "Yellow", "Green", "Lime"] + settings.mapinfo.dColor := ["00FF00", "FF8000", "FF0000", "FF00FF"], settings.mapinfo.eColor_default := ["FF8000", "FFFF00", "009900", "00FF00"] + settings.mapinfo.dColor.0 := "FFFFFF", settings.mapinfo.eColor_default.0 := "FFFFFF" settings.mapinfo.color := [], settings.mapinfo.eColor := [] - Loop 4 - settings.mapinfo.color[A_Index] := !Blank(check := ini.UI["difficulty " A_Index " color"]) ? check : settings.mapinfo.dColor[A_Index] - , settings.mapinfo.eColor[A_Index] := !Blank(check := ini.UI["logbook " A_Index " color"]) ? check : settings.mapinfo.eColor_default[A_Index] + Loop 5 + settings.mapinfo.color[5 - A_Index] := !Blank(check := ini.UI["difficulty " 5 - A_Index " color"]) ? check : settings.mapinfo.dColor[5 - A_Index] + , settings.mapinfo.eColor[5 - A_Index] := !Blank(check := ini.UI["logbook " 5 - A_Index " color"]) ? check : settings.mapinfo.eColor_default[5 - A_Index] settings.mapinfo.fSize := !Blank(check := ini.settings["font-size"]) ? check : settings.general.fSize LLK_FontDimensions(settings.mapinfo.fSize, font_height, font_width), settings.mapinfo.fHeight := font_height, settings.mapinfo.fWidth := font_width settings.mapinfo.trigger := !Blank(check := ini.settings["enable shift-clicking"]) ? check : 0 @@ -46,7 +50,7 @@ settings.mapinfo.roll_requirements[Lang_Trans("maps_stats_full", A_Index + 1)] := !Blank(check := ini.UI[Lang_Trans("maps_stats_full", A_Index + 1) " requirement"]) ? check : "" lang := settings.general.lang_client, db.mapinfo := {"localization": {}, "maps": {}, "mods": {}, "mod types": [], "expedition areas": [], "expedition groups": {}} - Loop, Parse, % StrReplace(LLK_FileRead("data\" (FileExist("data\" lang "\map-info.txt") ? lang : "english") "\map-info.txt", 1), "`t"), `n, `r + Loop, Parse, % StrReplace(LLK_FileRead("data\" (FileExist("data\" lang "\map-info" vars.poe_version ".txt") ? lang : "english") "\map-info" vars.poe_version ".txt", 1), "`t"), `n, `r { section := (SubStr(A_LoopField, 1, 1) = "[") ? LLK_StringRemove(SubStr(A_LoopField, 2, InStr(A_LoopField, "]") - 2), "# , #") : section If !A_LoopField || (SubStr(A_LoopField, 1, 1) = ";") || (SubStr(A_LoopField, 1, 1) = "[") @@ -67,6 +71,8 @@ { If !IsObject(db.mapinfo.mods[section]) db.mapinfo.mods[section] := {} + If settings.general.dev && (key = "ID") && db.mapinfo.mods[section].ID + MsgBox, % "duplicate: " section db.mapinfo.mods[section][key] := StrReplace(val, "&", "&&") If settings.general.dev && (key = "type") && (val != "expedition") && !LLK_HasVal(db.mapinfo["mod types"], val) MsgBox, % "invalid mod-type for:`n" section @@ -104,13 +110,18 @@ Mapinfo_GUI(mode := 1) Gui, %GUI_name%: Margin, 0, 0 ;% settings.mapinfo.fWidth/2, % settings.mapinfo.fWidth/2 Gui, %GUI_name%: Font, % "s"settings.mapinfo.fSize " cWhite", % vars.system.font hwnd_old := vars.hwnd.mapinfo.main, vars.hwnd.mapinfo := {"main": mapinfo}, mod_count := 0 - summary := summary0 := map.mods . Lang_Trans("maps_stats", 1) " | " map.quantity . Lang_Trans("maps_stats", 2) " | " map.rarity . Lang_Trans("maps_stats", 3) . (!Blank(map.packsize) ? " | " map.packsize . Lang_Trans("maps_stats", 4) : "") + If !vars.poe_version + summary := summary0 := map.mods . Lang_Trans("maps_stats", 1) " | " map.quantity . Lang_Trans("maps_stats", 2) " | " map.rarity . Lang_Trans("maps_stats", 3) + . (!Blank(map.packsize) ? " | " map.packsize . Lang_Trans("maps_stats", 4) : "") + Else summary := summary0 := (map.tier >= 11 ? "-20% ele res (t11+)" : map.tier >= 6 ? "-10% ele res (t6+)" : "no res penalty") + If StrLen(map.maps . map.scarabs . map.currency) { Loop, Parse, % "maps,scarabs,currency", `, If !Blank(map[A_LoopField]) add := " | " map[A_LoopField] . Lang_Trans("maps_stats", 4 + A_Index), summary .= add, summary1 .= StrReplace(add, !summary1 ? " | " : "") } + dimensions := [], summary_array := StrSplit(summary, "|", A_Space), summary_array0 := StrSplit(summary0, "|", A_Space), summary_array1 := StrSplit(summary1, "|", A_Space) LLK_PanelDimensions(summary_array, settings.mapinfo.fSize, wSummary, hSummary) @@ -120,11 +131,11 @@ Mapinfo_GUI(mode := 1) Continue If InStr(category, "(") dimensions.Push(SubStr(category, 1, InStr(category, "(") - 2)) - Loop 4 + Loop 5 { - For index, val in map[category][A_Index] + For index, val in map[category][5 - A_Index] dimensions.Push((mode = 2) && InStr(val.1, ":") ? SubStr(val.1, 1, InStr(val.1, ":") - 1) : val.1), mod_count += (SubStr(val.2, 1, 1) != 3) ? 1 : 0 - For index, val in map[category].0[A_Index] + For index, val in map[category][-1][5 - A_Index] { If (mode != 2) dimensions.Push(val.1) @@ -142,10 +153,10 @@ Mapinfo_GUI(mode := 1) For index0, category in vars.mapinfo.categories { check := 0 - Loop, 4 - check += map[category][A_Index].Count() ? map[category][A_Index].Count() : 0 + Loop, 5 + check += map[category][5 - A_Index].Count() ? map[category][5 - A_Index].Count() : 0 If (mode < 2) - For index, array in map[category].0 + For index, array in map[category][-1] check += array.Count() ? array.Count() : 0 If !check Continue @@ -176,7 +187,7 @@ Mapinfo_GUI(mode := 1) added += 1, count[category] += 1, yControl1 := yControl } - Loop 4 + Loop 5 { outer := A_Index For index, val in map[category][5 - outer] @@ -195,11 +206,11 @@ Mapinfo_GUI(mode := 1) } } Gui, %GUI_name%: Font, strike - Loop 4 + Loop 5 { If (mode = 2) Break - For index, val in map[category].0[5 - A_Index] + For index, val in map[category][-1][5 - A_Index] { text := InStr(val.1, ":") && (mode = 2) ? SubStr(val.1, 1, InStr(val.1, ":") - 1) : val.1, prefix := "" If (mode < 2) @@ -231,7 +242,7 @@ Mapinfo_GUI(mode := 1) } rolls := ["mods", "quantity", "rarity", "pack size", "maps", "scarabs", "currency"] - If (map.mods + map.quantity > 0) + If (map.mods + (!vars.poe_version ? map.quantity : 0) > 0) { ;Gui, %GUI_name%: Add, Text, % "xs BackgroundTrans x1 y" yControl + hControl " Section HWNDhwnd Center w" width + settings.mapinfo.fHeight*2 - 3, % summary For index, vSum in summary_array0 @@ -250,20 +261,20 @@ Mapinfo_GUI(mode := 1) If color Gui, %GUI_name%: Add, Progress, % "xp yp wp hp Border BackgroundBlack c" settings.mapinfo.roll_colors.2, 100 } - added := 0, spectrum := [0, 0, 0, 0], spectrum[0] := [0, 0, 0, 0] + added := 0, spectrum := [0, 0, 0, 0], spectrum[-1] := [0, 0, 0, 0], spectrum.0 := 0, spectrum[-1].0 := 0 For index0, category in vars.mapinfo.categories { If !Blank(LLK_HasVal(vars.mapinfo.expedition_areas, InStr(category, "(") ? SubStr(category, 1, InStr(category, "(") - 2) : category)) Continue - Loop 4 + Loop 5 { - spectrum[A_Index] += map[category][A_Index].Count() ? map[category][A_Index].Count() : 0 - spectrum.0[A_Index] += map[category].0[A_Index].Count() ? map[category].0[A_Index].Count() : 0 + spectrum[5 - A_Index] += map[category][5 - A_Index].Count() ? map[category][5 - A_Index].Count() : 0 + spectrum[-1][5 - A_Index] += map[category][-1][5 - A_Index].Count() ? map[category][-1][5 - A_Index].Count() : 0 } } - Loop 4 + Loop 5 { index0 := A_Index Loop, % spectrum[5 - A_Index] @@ -273,10 +284,10 @@ Mapinfo_GUI(mode := 1) added += 1 } } - Loop 4 + Loop 5 { index0 := A_Index - Loop, % spectrum.0[5 - A_Index] + Loop, % spectrum[-1][5 - A_Index] { style := !added ? "xs Section HWNDhwnd y+" settings.mapinfo.fHeight//5 " x" wGui/2 - (wSpectrum1 * mod_count)/2 : "ys x+0" ;(Mod(wSpectrum, mod_count) && LLK_IsBetween(added, Floor(mod_count/2), Ceil(mod_count/2)) ? (mod_count > 3 ? 2 : 1) : 0) Gui, %GUI_name%: Add, Progress, % style " BackgroundBlack Border c"settings.mapinfo.color[5 - index0] " w" wSpectrum1 " h"settings.mapinfo.fHeight/3, 100 @@ -313,8 +324,9 @@ Mapinfo_Lineparse(line, ByRef text, ByRef value) local global vars - If Lang_Match(line, vars.lang.mods_contract_alert, 0) ;remove the %-value from "per x% alert level" contract-mods - remove := SubStr(line, InStr(line, vars.lang.mods_contract_alert.1)), remove := SubStr(remove, 1, InStr(remove, vars.lang.mods_contract_alert.2) + StrLen(vars.lang.mods_contract_alert.2) - 1), remove2 := Lang_Trim(remove, vars.lang.mods_contract_alert), line := LLK_StringRemove(line, remove2 " , " remove2 "," remove2) + If !vars.poe_version && Lang_Match(line, vars.lang.mods_contract_alert, 0) ;remove the %-value from "per x% alert level" contract-mods + remove := SubStr(line, InStr(line, vars.lang.mods_contract_alert.1)), remove := SubStr(remove, 1, InStr(remove, vars.lang.mods_contract_alert.2) + StrLen(vars.lang.mods_contract_alert.2) - 1) + , remove2 := Lang_Trim(remove, vars.lang.mods_contract_alert), line := LLK_StringRemove(line, remove2 " , " remove2 "," remove2) Loop, Parse, line { @@ -332,12 +344,15 @@ Mapinfo_Lineparse(line, ByRef text, ByRef value) text := SubStr(text, 1, -1) } -Mapinfo_Parse(mode := 1) +Mapinfo_Parse(mode := 1, poe_version := "") { local global vars, settings, db static clip + If poe_version + Return Mapinfo_Parse2(mode) + item := vars.omnikey.item If mode clip := StrReplace(StrReplace(StrReplace(Clipboard, "`r`n", ";"), " — " Lang_Trans("items_unscalable")), " (augmented)") @@ -360,8 +375,8 @@ Mapinfo_Parse(mode := 1) vars.mapinfo.active_map[category] := [] mod_count := 0, map_mods := {}, content := [], mod_multi := 1, map := vars.mapinfo.active_map, mods := db.mapinfo.mods ;short-cut variables For key in map - Loop 5 - map[key][(A_Index = 5) ? 0 : A_Index] := [] + Loop 6 + map[key][5 - A_Index] := [] Loop, Parse, clip, `; { @@ -417,7 +432,7 @@ Mapinfo_Parse(mode := 1) While LLK_HasVal(vars.mapinfo.expedition_areas, InStr(vars.mapinfo.categories[index_check], "(") ? SubStr(vars.mapinfo.categories[index_check], 1, InStr(vars.mapinfo.categories[index_check], "(") - 2) : vars.mapinfo.categories[index_check]) index_check += 1 expedition_npc := vars.mapinfo.expedition_npc := expedition_groups[A_LoopField], key := expedition_area " (" expedition_npc ")", vars.mapinfo.categories.InsertAt(index_check, key), map[key] := [] - Loop 5 + Loop 6 map[key][5 - A_Index] := [] } Else If !Blank(LLK_HasVal(vars.mapinfo.expedition_areas, A_LoopField)) @@ -432,9 +447,9 @@ Mapinfo_Parse(mode := 1) pushtext := InStr(mods[implicit_text].text, ": +") ? StrReplace(mods[implicit_text].text, ": +", ": +" implicit_value,, 1) : InStr(mods[implicit_text].text, "%") ? StrReplace(mods[implicit_text].text, "%", implicit_value "%",, 1) : mods[implicit_text].text If !settings.mapinfo.IDs[mods[implicit_text].id].show { - If !IsObject(map[key].0[settings.mapinfo.IDs[mods[implicit_text].id].rank]) - map[key].0[settings.mapinfo.IDs[mods[implicit_text].id].rank] := [] - map[key].0[settings.mapinfo.IDs[mods[implicit_text].id].rank].Push([pushtext, mods[implicit_text].id]) + If !IsObject(map[key][-1][settings.mapinfo.IDs[mods[implicit_text].id].rank]) + map[key][-1][settings.mapinfo.IDs[mods[implicit_text].id].rank] := [] + map[key][-1][settings.mapinfo.IDs[mods[implicit_text].id].rank].Push([pushtext, mods[implicit_text].id]) } Else map[key][settings.mapinfo.IDs[mods[implicit_text].id].rank].Push([pushtext, mods[implicit_text].id]) } @@ -501,9 +516,9 @@ Mapinfo_Parse(mode := 1) pushtext := StrReplace(pushtext, "(n)", "`n") If !settings.mapinfo.IDs[mods[map_mod].id].show { - If !IsObject(map[mods[map_mod].type].0[settings.mapinfo.IDs[mods[map_mod].id].rank]) - map[mods[map_mod].type].0[settings.mapinfo.IDs[mods[map_mod].id].rank] := [] - map[mods[map_mod].type].0[settings.mapinfo.IDs[mods[map_mod].id].rank].Push([pushtext, mods[map_mod].id]) + If !IsObject(map[mods[map_mod].type][-1][settings.mapinfo.IDs[mods[map_mod].id].rank]) + map[mods[map_mod].type][-1][settings.mapinfo.IDs[mods[map_mod].id].rank] := [] + map[mods[map_mod].type][-1][settings.mapinfo.IDs[mods[map_mod].id].rank].Push([pushtext, mods[map_mod].id]) } Else map[mods[map_mod].type][settings.mapinfo.IDs[mods[map_mod].id].rank].Push([pushtext, mods[map_mod].id]) } @@ -520,6 +535,94 @@ Mapinfo_Parse(mode := 1) Return 1 } +Mapinfo_Parse2(mode) +{ + local + global vars, settings, db + static clip + + item := vars.omnikey.item + If mode + clip := StrReplace(Clipboard, " (augmented)") + + If LLK_PatternMatch(item.rarity, "", [Lang_Trans("items_normal"), Lang_Trans("items_unique")]) + error := [Lang_Trans("m_general_language", 3) ":`n" LLK_StringCase(Lang_Trans("items_normal") " && " Lang_Trans("items_unique")), 1.5, "Red"] + Else If item.unid + error := [Lang_Trans("m_general_language", 3) ":`n" LLK_StringCase(Lang_Trans("items_unidentified")), 1.5, "Red"] + + If error + { + LLK_ToolTip(error.1, error.2,,,, error.3), LLK_Overlay(vars.hwnd.mapinfo.main, "destroy"), vars.mapinfo.active_map.cancel := 1 + Return 0 + } + + vars.mapinfo.categories := db.mapinfo["mod types"].Clone(), vars.mapinfo.active_map := {} + For index, category in vars.mapinfo.categories + vars.mapinfo.active_map[category] := [] + mod_count := 0, map_mods := {}, map := vars.mapinfo.active_map, mods := db.mapinfo.mods, parsed_lines := {}, map.mods := 0 + + ;If !IsObject(clip) + ; clip := StrSplit(clip, "`n", "`r ") + + For key in map + Loop 6 + map[key][5 - A_Index] := [] + + Loop, Parse, clip, `n, `r + { + If !tier + If !InStr(A_LoopField, "(") + Continue + Else tier := SubStr(A_LoopField, InStr(A_LoopField, "(") + 1), tier := SubStr(tier, InStr(tier, " ") + 1), tier := map.tier := SubStr(tier, 1, InStr(tier, ")") - 1), map.name := A_LoopField + + If !item_level + If !InStr(A_LoopField, Lang_Trans("items_ilevel")) + Continue + Else + { + item_level := SubStr(A_LoopField, InStr(A_LoopField, ":") + 2) + raw_text := SubStr(clip, InStr(clip, Lang_Trans("items_ilevel"))), raw_text := SubStr(raw_text, InStr(raw_text, "-`r`n") + 3), raw_text := SubStr(raw_text, 1, InStr(raw_text, "---") - 3) + Break + } + } + + Loop, Parse, raw_text, `n, `r + { + If (A_Index = 1) + raw_text := "" + Mapinfo_Lineparse(Iteminfo_ModRemoveRange(A_LoopField), text, value) + raw_text .= (!raw_text ? "" : "`n") text, parsed_lines[text] := !parsed_lines[text] ? value : parsed_lines[text] + value + } + + For key, val in db.mapinfo.mods + If RegExMatch(raw_text, "i)" StrReplace(key, "|", ".*")) + { + map.mods += 1 + Loop, Parse, key, % "|" + map_mods[key] .= (!map_mods[key] ? "" : "/") . parsed_lines[A_LoopField], raw_text := StrReplace(raw_text, A_LoopField, "",, 1) + If InStr(map_mods[key], "freeze buildup") + map_mods[key] := SubStr(map_mods[key], 1, InStr(map_mods[key], "/") - 1) ;freeze/ignite/shock hybrid mod is always X/X/X %, so simply display as X% + } + + Loop, Parse, raw_text, `n, `r + If settings.general.dev && !Blank(A_LoopField) + MsgBox, % "unknown mod: " A_LoopField + + For map_mod, value in map_mods + { + pushtext := InStr(mods[map_mod].text, ": +") || InStr(mods[map_mod].text, ": -") ? StrReplace(StrReplace(mods[map_mod].text, ": -", ": -" value), ": +", ": +" value,, 1) : InStr(mods[map_mod].text, "%") ? StrReplace(mods[map_mod].text, "%", value "%",, 1) : mods[map_mod].text + pushtext := StrReplace(pushtext, "(n)", "`n") + If !settings.mapinfo.IDs[mods[map_mod].id].show + { + If !IsObject(map[mods[map_mod].type][-1][settings.mapinfo.IDs[mods[map_mod].id].rank]) + map[mods[map_mod].type][-1][settings.mapinfo.IDs[mods[map_mod].id].rank] := [] + map[mods[map_mod].type][-1][settings.mapinfo.IDs[mods[map_mod].id].rank].Push([pushtext, mods[map_mod].id]) + } + Else map[mods[map_mod].type][settings.mapinfo.IDs[mods[map_mod].id].rank].Push([pushtext, mods[map_mod].id]) + } + Return 1 +} + Mapinfo_Rank(hotkey) { local @@ -531,13 +634,15 @@ Mapinfo_Rank(hotkey) If !check Return - hotkey0 := Hotkeys_RemoveModifiers(hotkey), hotkey := GetKeyName(hotkey0) + If !InStr(hotkey, "RButton") + hotkey0 := Hotkeys_RemoveModifiers(hotkey), hotkey := GetKeyName(hotkey0) + Else hotkey := 0 If IsNumber(hotkey) - IniWrite, % (settings.mapinfo.IDs[control].rank := hotkey), ini\map info.ini, % control, rank - Else IniWrite, % (settings.mapinfo.IDs[control].show := !settings.mapinfo.IDs[control].show), ini\map info.ini, % control, show + IniWrite, % (settings.mapinfo.IDs[control].rank := hotkey), % "ini" vars.poe_version "\map info.ini", % control, rank + Else IniWrite, % (settings.mapinfo.IDs[control].show := !settings.mapinfo.IDs[control].show), % "ini" vars.poe_version "\map info.ini", % control, show If !search - Mapinfo_Parse(0), Mapinfo_GUI(0) + Mapinfo_Parse(0, vars.poe_version), Mapinfo_GUI(0) Else Settings_menu("map-info",, 0) KeyWait, % hotkey0 } diff --git a/modules/ocr.ahk b/modules/ocr.ahk index 752dc60f..1f28e590 100644 --- a/modules/ocr.ahk +++ b/modules/ocr.ahk @@ -288,7 +288,7 @@ OCR_Altars() regex_array_copy[index] := "" Else regex .= (!regex ? "" : ".*") val - regex_results := OCR_HasRegex(header_lookup, regex, 1) + regex_results := LLK_HasRegex(header_lookup, regex, 1) If (regex_results.Count() > 1) { regex := "" @@ -299,7 +299,7 @@ OCR_Altars() blank_regex := "" Loop, Parse, % regex_array[index] { - If OCR_HasRegex(header_lookup, OCR_RegexCheck(regex_array_copy, index, blank_regex . A_LoopField), 1) + If LLK_HasRegex(header_lookup, OCR_RegexCheck(regex_array_copy, index, blank_regex . A_LoopField), 1) blank_regex .= A_LoopField Else blank_regex .= (SubStr(blank_regex, -1) = ".*") ? "" : ".*" } @@ -307,7 +307,7 @@ OCR_Altars() regex .= (!regex || SubStr(regex, -1) = ".*" ? "" : ".*") regex_array_copy[index] := blank_regex } } - regex_results := OCR_HasRegex(header_lookup, regex, 1) + regex_results := LLK_HasRegex(header_lookup, regex, 1) } If (regex_results.Count() = 1) && (key != header_check[regex_results.1]) key := header_check[regex_results.1], header += 1, parsed_text[header].Push(key ":") @@ -356,7 +356,7 @@ OCR_Altars() Else regex .= (regex = "i)") ? vRegex : ".*" vRegex } - If (OCR_HasRegex(mod_lookup, regex, 1).Count() = 1) + If (LLK_HasRegex(mod_lookup, regex, 1).Count() = 1) regex_all := regex Else If (LLK_HasVal(regex_array_copy, 0,,, 1).Count() < regex_array_copy.Count()//2) { @@ -367,7 +367,7 @@ OCR_Altars() blank_regex := "" Loop, Parse, % regex_array[iRegex] { - If OCR_HasRegex(mod_lookup, OCR_RegexCheck(regex_array_copy, iRegex, blank_regex . A_LoopField), 1) + If LLK_HasRegex(mod_lookup, OCR_RegexCheck(regex_array_copy, iRegex, blank_regex . A_LoopField), 1) blank_regex .= A_LoopField Else blank_regex .= (SubStr(blank_regex, -1) = ".*") ? "" : ".*" } @@ -379,7 +379,7 @@ OCR_Altars() If vRegex regex_all .= (regex_all = "i)" ? "" : ".*") vRegex } - If (regex_all != "i)") && (regex_result := OCR_HasRegex(mod_lookup, regex_all, 1)) + If (regex_all != "i)") && (regex_result := LLK_HasRegex(mod_lookup, regex_all, 1)) parsed_mods.Push(regex_result.Count() > 1 ? "???" : mod_lookup[regex_result.1]) } @@ -512,7 +512,7 @@ OCR_FilterInput(text) ;WIP, currently not in use Else regex .= (InStr(".*i)", SubStr(regex, -1)) ? "" : ".*") word For k, array in lookup - results += (check := OCR_HasRegex(array, regex, 1).Count()) ? check : 0, usecase0 := check ? k : usecase0 + results += (check := LLK_HasRegex(array, regex, 1).Count()) ? check : 0, usecase0 := check ? k : usecase0 If (results = 1) { usecase := usecase0 @@ -523,25 +523,6 @@ OCR_FilterInput(text) ;WIP, currently not in use MsgBox, % usecase } -OCR_HasRegex(object, regex, all_results := 0, check_key := 0) -{ - local - - If !IsObject(object) - Return - parse := [] - For key, val in object - If RegExMatch(!check_key ? val : key, regex) - { - If !all_results - Return key - Else parse.Push(key) - } - - If all_results && parse.Count() - Return parse -} - OCR_Highlight(hotkey) { local @@ -619,7 +600,7 @@ OCR_VaalAreas() regex := "" Loop, Parse, % regex_array[index] { - check := OCR_HasRegex(db.vaalareas, OCR_RegexCheck(regex_array_copy, index, regex . A_LoopField), 1, 1) + check := LLK_HasRegex(db.vaalareas, OCR_RegexCheck(regex_array_copy, index, regex . A_LoopField), 1, 1) regex .= check.Count() ? A_LoopField : (SubStr(regex, -1) = ".*" ? "" : ".*") If (check.Count() = 1) { @@ -628,7 +609,7 @@ OCR_VaalAreas() } } } - If ((check := OCR_HasRegex(db.vaalareas, OCR_RegexCheck(regex_array_copy, 0, ""), 1, 1)).Count() = 1) && !LLK_HasVal(lines[db.vaalareas[check.1].2], (line1 := db.vaalareas[check.1].1)) + If ((check := LLK_HasRegex(db.vaalareas, OCR_RegexCheck(regex_array_copy, 0, ""), 1, 1)).Count() = 1) && !LLK_HasVal(lines[db.vaalareas[check.1].2], (line1 := db.vaalareas[check.1].1)) { If InStr(line1, "corr. packs") && !extra_pack { diff --git a/modules/omni-key.ahk b/modules/omni-key.ahk index f7871685..bd57fb3a 100644 --- a/modules/omni-key.ahk +++ b/modules/omni-key.ahk @@ -98,7 +98,13 @@ Case "lootfilter": If !IsObject(vars.lootfilter) Init_lootfilter() + input := LLK_ControlGet(vars.hwnd.lootfilter.search), item := vars.omnikey.item, shift := GetKeyState("Shift", "P") + If (item.rarity = Lang_Trans("items_magic")) && !item.itembase + { + Omni_Release() + Return + } If !InStr(input, """" (item.itembase ? item.itembase : item.name) """") || !shift && InStr(input, ",") { If shift && !Blank(input) @@ -106,10 +112,10 @@ Else input := """" LLK_StringCase(item.itembase ? item.itembase : item.name) """" If WinExist("ahk_id " vars.hwnd.lootfilter.main) GuiControl,, % vars.hwnd.lootfilter.search, % input - Lootfilter_GUI("search", "dock_" (vars.general.xMouse >= vars.monitor.x + vars.client.xc ? "1" : "2")) + Lootfilter_GUI("search", "dock_" (vars.general.xMouse >= vars.monitor.x + vars.client.xc ? "1" : "2"), "omnikey") } Case "mapinfo": - If Mapinfo_Parse() + If Mapinfo_Parse(1, vars.poe_version) Mapinfo_GUI() Case "recombination": Recombination() @@ -227,7 +233,7 @@ Omni_Context(mode := 0) While (!settings.features.stash || GetKeyState("ALT", "P")) && (GetKeyState(vars.omnikey.hotkey, "P") || !Blank(vars.omnikey.hotkey2) && GetKeyState(vars.omnikey.hotkey2, "P")) && InStr(item.name, "Essence of ", 1) || (item.name = "remnant of corruption") If (A_TickCount >= vars.omnikey.start + 200) Return "essences" - If settings.features.lootfilter && (item.name || item.itembase) && (WinExist("ahk_id " vars.hwnd.lootfilter.main) || GetKeyState("Shift", "P")) + If settings.features.lootfilter && !vars.general.shift_trigger && (item.name || item.itembase) && (WinExist("ahk_id " vars.hwnd.lootfilter.main) || GetKeyState("Shift", "P")) Return "lootfilter" If WinExist("ahk_id " vars.hwnd.recombination.main) && LLK_PatternMatch(item.class, "", vars.recombination.classes,,, 0) Return "recombination" @@ -244,10 +250,11 @@ Omni_Context(mode := 0) While GetKeyState(vars.omnikey.hotkey, "P") || !Blank(vars.omnikey.hotkey2) && GetKeyState(vars.omnikey.hotkey2, "P") If (A_TickCount >= vars.omnikey.start + 200) Return "horizons" - If !vars.poe_version && !LLK_PatternMatch(item.name "`n" item.itembase, "", ["Doryani", "Maple"]) && LLK_PatternMatch(item.name "`n" item.itembase, "", ["Map", "Invitation", "Blueprint:", "Contract:", "Expedition Logbook"]) + If (!vars.poe_version && !LLK_PatternMatch(item.name "`n" item.itembase, "", ["Doryani", "Maple"]) && LLK_PatternMatch(item.name "`n" item.itembase, "", ["Map", "Invitation", "Blueprint:", "Contract:", "Expedition Logbook"]) + || vars.poe_version && LLK_PatternMatch(item.name "`n" item.itembase, "", ["Waystone"])) && (item.rarity != Lang_Trans("items_unique")) { - While (GetKeyState(vars.omnikey.hotkey, "P") || !Blank(vars.omnikey.hotkey2) && GetKeyState(vars.omnikey.hotkey2, "P")) && LLK_PatternMatch(item.name "`n" item.itembase, "", ["Map"]) + While !vars.poe_version && (GetKeyState(vars.omnikey.hotkey, "P") || !Blank(vars.omnikey.hotkey2) && GetKeyState(vars.omnikey.hotkey2, "P")) && LLK_PatternMatch(item.name "`n" item.itembase, "", ["Map"]) If (A_TickCount >= vars.omnikey.start + 200) { If LLK_PatternMatch(vars.omnikey.clipboard, "", ["Maze of the Minotaur", "Forge of the Phoenix", "Lair of the Hydra", "Pit of the Chimera"]) @@ -258,6 +265,7 @@ Omni_Context(mode := 0) } If InStr(clip, Lang_Trans("items_mapreward")) Return "context_menu" + If settings.features.mapinfo Return "mapinfo" } diff --git a/modules/recombination.ahk b/modules/recombination.ahk index 9dd8a9dd..4fef8244 100644 --- a/modules/recombination.ahk +++ b/modules/recombination.ahk @@ -444,7 +444,7 @@ Recombination_GUI(cHWND := "") Gui, %GUI_name%: Add, Text, % "ys x+"settings.recombination.fWidth/4 " Center Border gRecombination_GUI HWNDhwnd2 w"settings.recombination.fWidth*2, % "+" vars.hwnd.recombination.font_minus := hwnd0, vars.hwnd.recombination.font_reset := hwnd1, vars.hwnd.recombination.font_plus := hwnd2 - Gui, %GUI_name%: Add, Text, % "ys", % Lang_Trans("global_color", 2) ":" + Gui, %GUI_name%: Add, Text, % "ys", % Lang_Trans("global_color", 2) For index, val in settings.recombination.colors { Gui, %GUI_name%: Add, Text, % "ys x+" settings.recombination.fWidth/(A_Index = 1 ? 2 : 4) " BackgroundTrans Border HWNDhwnd gRecombination_GUI w" settings.recombination.fHeight " h" settings.recombination.fHeight, % "" diff --git a/modules/settings menu.ahk b/modules/settings menu.ahk index f93b8d15..3b5a7681 100644 --- a/modules/settings menu.ahk +++ b/modules/settings menu.ahk @@ -1880,7 +1880,7 @@ Settings_lootfilter2(cHWND := "") check := LLK_HasVal(vars.hwnd.settings, cHWND), control := SubStr(check, InStr(check, "_") + 1) If (check = "enable") { - IniWrite, % (settings.features.lootfilter := LLK_ControlGet(cHWND)), ini\config.ini, features, enable filterspoon + IniWrite, % (settings.features.lootfilter := LLK_ControlGet(cHWND)), % "ini" vars.poe_version "\config.ini", features, enable filterspoon If !settings.features.lootfilter && WinExist("ahk_id " vars.hwnd.lootfilter.main) Lootfilter_GUI("close") Settings_menu("filterspoon") @@ -1935,36 +1935,39 @@ Settings_mapinfo() } ControlGetPos, xGui,, wGui,,, ahk_id %hwnd% - Gui, %GUI%: Add, Text, % "xs Section", % Lang_Trans("m_mapinfo_logbook") - Loop 4 + If !vars.poe_version { - Gui, %GUI%: Add, Text, % "ys x+" settings.general.fWidth/(A_Index = 1 ? 2 : 4) " Center Border gSettings_mapinfo2 HWNDhwnd c"settings.mapinfo.eColor[A_Index], % " " A_Index " " - vars.hwnd.settings["colorlogbook_"A_Index] := vars.hwnd.help_tooltips["settings_mapinfo logbooks"handle1] := hwnd, handle1 .= "|" - } - - Gui, %GUI%: Add, Checkbox, % "xs Section gSettings_mapinfo2 HWNDhwnd Checked" settings.mapinfo.roll_highlight, % Lang_Trans("m_mapinfo_roll_highlight") - vars.hwnd.settings.roll_highlight := vars.hwnd.help_tooltips["settings_mapinfo roll highlight"] := hwnd, handle := "" - ControlGetPos, xControl,,,,, ahk_id %hwnd% - If settings.mapinfo.roll_highlight - { - Gui, %GUI%: Add, Text, % "ys Center BackgroundTrans HWNDhwnd1 Border c" settings.mapinfo.roll_colors.1 " x+" settings.general.fWidth / 4, % " 117" Lang_Trans("maps_stats", 2) " " - Gui, %GUI%: Add, Progress, % "xp yp wp hp HWNDhwnd11 Border BackgroundBlack c" settings.mapinfo.roll_colors.2, 100 - Gui, %GUI%: Add, Text, % "ys x+-1 BackgroundTrans gSettings_mapinfo2 HWNDhwnd2 Border w" settings.general.fWidth, % " " - Gui, %GUI%: Add, Progress, % "xp yp wp hp HWNDhwnd21 Border BackgroundBlack c" settings.mapinfo.roll_colors.1, % 100 - Gui, %GUI%: Add, Text, % "ys x+-1 BackgroundTrans gSettings_mapinfo2 HWNDhwnd3 Border w" settings.general.fWidth, % " " - Gui, %GUI%: Add, Progress, % "xp yp wp hp HWNDhwnd31 Border BackgroundBlack c" settings.mapinfo.roll_colors.2, % 100 - Loop 3 - vars.hwnd.help_tooltips["settings_mapinfo roll colors" handle] := hwnd%A_Index%1, handle .= "|" - vars.hwnd.settings.rollcolor_text := hwnd1, vars.hwnd.settings.rollcolor_back := hwnd11 - vars.hwnd.settings.rollcolor_1 := hwnd2, vars.hwnd.settings.rollcolor_11 := hwnd21 - vars.hwnd.settings.rollcolor_2 := hwnd3, vars.hwnd.settings.rollcolor_21 := hwnd31, dimensions := [], handle := "" - Loop 6 + Gui, %GUI%: Add, Text, % "xs Section", % Lang_Trans("m_mapinfo_logbook") + Loop 4 { - Gui, %GUI%: Add, Text, % (A_Index = 1 ? "xs Section" : "ys x+" settings.general.fWidth//2) " Center HWNDhwnd Border w" settings.general.fWidth * 2, % Lang_Trans("maps_stats", A_Index + 1) - Gui, %GUI%: Font, % "s" settings.general.fSize - 4 - Gui, %GUI%: Add, Edit, % "ys x+-1 hp Right cBlack Number HWNDhwnd1 Limit3 gSettings_mapinfo2 w" settings.general.fWidth * 3, % settings.mapinfo.roll_requirements[Lang_Trans("maps_stats_full", A_Index + 1)] - Gui, %GUI%: Font, % "s" settings.general.fSize - vars.hwnd.help_tooltips["settings_mapinfo requirements" handle] := hwnd, vars.hwnd.help_tooltips["settings_mapinfo requirements|" handle] := vars.hwnd.settings["thresh_" Lang_Trans("maps_stats_full", A_Index + 1)] := hwnd1, handle .= "||" + Gui, %GUI%: Add, Text, % "ys x+" settings.general.fWidth/(A_Index = 1 ? 2 : 4) " Center Border gSettings_mapinfo2 HWNDhwnd c"settings.mapinfo.eColor[A_Index], % " " A_Index " " + vars.hwnd.settings["colorlogbook_"A_Index] := vars.hwnd.help_tooltips["settings_mapinfo logbooks"handle1] := hwnd, handle1 .= "|" + } + + Gui, %GUI%: Add, Checkbox, % "xs Section gSettings_mapinfo2 HWNDhwnd Checked" settings.mapinfo.roll_highlight, % Lang_Trans("m_mapinfo_roll_highlight") + vars.hwnd.settings.roll_highlight := vars.hwnd.help_tooltips["settings_mapinfo roll highlight"] := hwnd, handle := "" + ControlGetPos, xControl,,,,, ahk_id %hwnd% + If settings.mapinfo.roll_highlight + { + Gui, %GUI%: Add, Text, % "ys Center BackgroundTrans HWNDhwnd1 Border c" settings.mapinfo.roll_colors.1 " x+" settings.general.fWidth / 4, % " 117" Lang_Trans("maps_stats", 2) " " + Gui, %GUI%: Add, Progress, % "xp yp wp hp HWNDhwnd11 Border BackgroundBlack c" settings.mapinfo.roll_colors.2, 100 + Gui, %GUI%: Add, Text, % "ys x+-1 BackgroundTrans gSettings_mapinfo2 HWNDhwnd2 Border w" settings.general.fWidth, % " " + Gui, %GUI%: Add, Progress, % "xp yp wp hp HWNDhwnd21 Border BackgroundBlack c" settings.mapinfo.roll_colors.1, % 100 + Gui, %GUI%: Add, Text, % "ys x+-1 BackgroundTrans gSettings_mapinfo2 HWNDhwnd3 Border w" settings.general.fWidth, % " " + Gui, %GUI%: Add, Progress, % "xp yp wp hp HWNDhwnd31 Border BackgroundBlack c" settings.mapinfo.roll_colors.2, % 100 + Loop 3 + vars.hwnd.help_tooltips["settings_mapinfo roll colors" handle] := hwnd%A_Index%1, handle .= "|" + vars.hwnd.settings.rollcolor_text := hwnd1, vars.hwnd.settings.rollcolor_back := hwnd11 + vars.hwnd.settings.rollcolor_1 := hwnd2, vars.hwnd.settings.rollcolor_11 := hwnd21 + vars.hwnd.settings.rollcolor_2 := hwnd3, vars.hwnd.settings.rollcolor_21 := hwnd31, dimensions := [], handle := "" + Loop 6 + { + Gui, %GUI%: Add, Text, % (A_Index = 1 ? "xs Section" : "ys x+" settings.general.fWidth//2) " Center HWNDhwnd Border w" settings.general.fWidth * 2, % Lang_Trans("maps_stats", A_Index + 1) + Gui, %GUI%: Font, % "s" settings.general.fSize - 4 + Gui, %GUI%: Add, Edit, % "ys x+-1 hp Right cBlack Number HWNDhwnd1 Limit3 gSettings_mapinfo2 w" settings.general.fWidth * 3, % settings.mapinfo.roll_requirements[Lang_Trans("maps_stats_full", A_Index + 1)] + Gui, %GUI%: Font, % "s" settings.general.fSize + vars.hwnd.help_tooltips["settings_mapinfo requirements" handle] := hwnd, vars.hwnd.help_tooltips["settings_mapinfo requirements|" handle] := vars.hwnd.settings["thresh_" Lang_Trans("maps_stats_full", A_Index + 1)] := hwnd1, handle .= "||" + } } } @@ -1973,13 +1976,19 @@ Settings_mapinfo() Gui, %GUI%: Font, % "norm" Gui, %GUI%: Add, Pic, % "ys hp w-1 HWNDhwnd", % "HBitmap:*" vars.pics.global.help vars.hwnd.help_tooltips["settings_mapinfo mod settings"] := hwnd - Gui, %GUI%: Add, Text, % "xs Section", % Lang_Trans("m_mapinfo_pinned") + + Gui, %GUI%: Add, Text, % "ys Border BackgroundTrans gSettings_mapinfo2 HWNDhwnd", % " " Lang_Trans("m_mapinfo_reset") " " + Gui, %GUI%: Add, Progress, % "Disabled Range0-500 Vertical xp yp wp hp BackgroundBlack cRed HWNDhwnd2", 0 + vars.hwnd.settings.reset_tiers := hwnd, vars.hwnd.settings.reset_tiers_bar := vars.hwnd.help_tooltips["settings_mapinfo reset tiers"] := hwnd2 + For ID, val in settings.mapinfo.pinned { + If (A_Index = 1) + Gui, %GUI%: Add, Text, % "xs Section", % Lang_Trans("m_mapinfo_pinned") If !(check := LLK_HasVal(db.mapinfo.mods, ID,,,, 1)) || !val Continue - ID := (ID < 100 ? "0" : "") . (ID < 10 ? "0" : "") . ID, ini := IniBatchRead("ini\map info.ini", ID) - text := db.mapinfo.mods[check].text, text := InStr(text, ":") ? SubStr(text, 1, InStr(text, ":") - 1) : text, color := settings.mapinfo.color[!Blank(check := ini[ID].rank) ? check : 1] + ID := (ID < 100 ? "0" : "") . (ID < 10 ? "0" : "") . ID, ini := IniBatchRead("ini" vars.poe_version "\map info.ini", ID) + text := db.mapinfo.mods[check].text, text := InStr(text, ":") ? SubStr(text, 1, InStr(text, ":") - 1) : text, color := settings.mapinfo.color[!Blank(check := ini[ID].rank) ? check : 0] style := (xLast + wLast + StrLen(text) * settings.general.fWidth >= xGui + wGui) ? "xs Section" : "ys", show := !Blank(check := ini[ID].show) ? check : 1 If !show Gui, %GUI%: Font, strike @@ -2014,7 +2023,7 @@ Settings_mapinfo() style := !added.Count() || (xLast + wLast + StrLen(text) * settings.general.fWidth >= xGui + wGui) ? "xs Section" : "ys", added[object.ID] := 1 If (outer = 1) Continue - ini := IniBatchRead("ini\map info.ini", object.ID), color := settings.mapinfo.color[!Blank(check := ini[object.ID].rank) ? check : 1] + ini := IniBatchRead("ini" vars.poe_version "\map info.ini", object.ID), color := settings.mapinfo.color[!Blank(check := ini[object.ID].rank) ? check : 0] show := !Blank(check := ini[object.ID].show) ? check : 1, text := InStr(object.text, ":") ? SubStr(object.text, 1, InStr(object.text, ":") - 1) : object.text If !show Gui, %GUI%: Font, strike @@ -2038,22 +2047,36 @@ Settings_mapinfo2(cHWND) { Case "enable": settings.features.mapinfo := LLK_ControlGet(cHWND) - IniWrite, % settings.features.mapinfo, ini\config.ini, features, enable map-info panel + IniWrite, % settings.features.mapinfo, % "ini" vars.poe_version "\config.ini", features, enable map-info panel Settings_menu("map-info") LLK_Overlay(vars.hwnd.mapinfo.main, "destroy") Case "shiftclick": settings.mapinfo.trigger := LLK_ControlGet(cHWND), Settings_ScreenChecksValid() - IniWrite, % settings.mapinfo.trigger, ini\map info.ini, settings, enable shift-clicking + IniWrite, % settings.mapinfo.trigger, % "ini" vars.poe_version "\map info.ini", settings, enable shift-clicking Case "tabtoggle": settings.mapinfo.tabtoggle := LLK_ControlGet(cHWND) - IniWrite, % settings.mapinfo.tabtoggle, ini\map info.ini, settings, show panel while holding tab + IniWrite, % settings.mapinfo.tabtoggle, % "ini" vars.poe_version "\map info.ini", settings, show panel while holding tab Case "modsearch": GuiControl, +cBlack, % cHWND Case "modsearch_ok": vars.settings.mapinfo_search := LLK_ControlGet(cHWND := vars.hwnd.settings.modsearch), Settings_menu("map-info",, 0) Return + Case "reset_tiers": + If LLK_Progress(vars.hwnd.settings.reset_tiers_bar, "LButton") + { + For key, val in IniBatchRead("ini" vars.poe_version "\map info.ini") + If !IsNumber(key) + Continue + Else + { + key := (key < 100 ? "0" : "") . (key < 10 ? "0" : "") . key + IniDelete, % "ini" vars.poe_version "\map info.ini", % key + } + Init_mapinfo(), Settings_menu("map-info") + } + Else Return Case "roll_highlight": - IniWrite, % (settings.mapinfo.roll_highlight := LLK_ControlGet(cHWND)), ini\map info.ini, settings, highlight map rolls + IniWrite, % (settings.mapinfo.roll_highlight := LLK_ControlGet(cHWND)), % "ini" vars.poe_version "\map info.ini", settings, highlight map rolls Settings_menu("map-info") Default: If InStr(check, "font_") @@ -2066,12 +2089,12 @@ Settings_mapinfo2(cHWND) GuiControl, text, % vars.hwnd.settings.font_reset, % settings.mapinfo.fSize Sleep 150 } - IniWrite, % settings.mapinfo.fSize, ini\map info.ini, settings, font-size + IniWrite, % settings.mapinfo.fSize, % "ini" vars.poe_version "\map info.ini", settings, font-size LLK_FontDimensions(settings.mapinfo.fSize, height, width), settings.mapinfo.fWidth := width, settings.mapinfo.fHeight := height } Else If InStr(check, "thresh_") { - IniWrite, % (settings.mapinfo.roll_requirements[control] := LLK_ControlGet(cHWND)), ini\map info.ini, UI, % control " requirement" + IniWrite, % (settings.mapinfo.roll_requirements[control] := LLK_ControlGet(cHWND)), % "ini" vars.poe_version "\map info.ini", UI, % control " requirement" Return } Else If InStr(check, "rollcolor") @@ -2084,7 +2107,7 @@ Settings_mapinfo2(cHWND) GuiControl, % "+c" color, % vars.hwnd.settings["rollcolor_" control "1"] GuiControl, % "+c" color, % vars.hwnd.settings["rollcolor_" (control = 1 ? "text" : "back")] GuiControl, % "movedraw", % vars.hwnd.settings["rollcolor_" (control = 1 ? "text" : "back")] - IniWrite, % (settings.mapinfo.roll_colors[control] := color), ini\map info.ini, UI, % "map rolls " (control = 1 ? "text" : "back") " color" + IniWrite, % (settings.mapinfo.roll_colors[control] := color), % "ini"vars.poe_version "\map info.ini", UI, % "map rolls " (control = 1 ? "text" : "back") " color" } Else If InStr(check, "color") { @@ -2095,20 +2118,25 @@ Settings_mapinfo2(cHWND) Return Else settings.mapinfo[key][control] := (vars.system.click = 1) ? picked_rgb : settings.mapinfo[InStr(check, "color_") ? "dColor" : "eColor_default"][control] - IniWrite, % settings.mapinfo[key][control], ini\map info.ini, UI, % InStr(check, "color_") ? (control = 5 ? "header" : "difficulty " control) " color" : "logbook " control " color" + IniWrite, % settings.mapinfo[key][control], % "ini" vars.poe_version "\map info.ini", UI, % InStr(check, "color_") ? (control = 5 ? "header" : "difficulty " control) " color" : "logbook " control " color" GuiControl, % "+c" settings.mapinfo[key][control], % cHWND GuiControl, movedraw, % cHWND } Else If InStr(check, "pin_") { KeyWait, LButton - IniWrite, % (settings.mapinfo.pinned[control] := InStr(check, "unpin_") ? 0 : 1), ini\map info.ini, pinned, % control + If InStr(check, "unpin_") + { + settings.mapinfo.pinned.Delete(control) + IniDelete, % "ini" vars.poe_version "\map info.ini", pinned, % control + } + Else IniWrite, % (settings.mapinfo.pinned[control] := 1), % "ini" vars.poe_version "\map info.ini", pinned, % control Settings_menu("map-info",, 0) Return } Else LLK_ToolTip("no action") If WinExist("ahk_id "vars.hwnd.mapinfo.main) - Mapinfo_Parse(0), Mapinfo_GUI(GetKeyState(vars.hotkeys.tab, "P") ? 2 : 0) + Mapinfo_Parse(0, vars.poe_version), Mapinfo_GUI(GetKeyState(vars.hotkeys.tab, "P") ? 2 : 0) } } @@ -2207,7 +2235,7 @@ Settings_maptracker() Gui, %GUI%: Add, Text, % "ys Center gSettings_maptracker2 Border HWNDhwnd x+"settings.general.fWidth/4 " w"settings.general.fWidth * 2, % "+" vars.hwnd.settings.font_plus := vars.hwnd.help_tooltips["settings_font-size|||"] := hwnd - Gui, %GUI%: Add, Text, % "xs Section", % Lang_Trans("global_color", 2) ": " + Gui, %GUI%: Add, Text, % "xs Section", % Lang_Trans("global_color", 2) " " Loop 2 { Gui, %GUI%: Add, Text, % "ys Border BackgroundTrans HWNDhwnd0 gSettings_maptracker2 x+" settings.general.fWidth * (A_Index = 1 ? 0 : 0.25) " w" settings.general.fHeight, % "" @@ -2366,7 +2394,7 @@ Settings_menu(section, mode := 0, NA := 1) ;mode parameter is used when manually { If !vars.poe_version vars.settings := {"sections": ["general", "hotkeys", "screen-checks", "updater", "donations", "leveling tracker", "betrayal-info", "cheat-sheets", "clone-frames", "filterspoon", "item-info", "map-info", "mapping tracker", "minor qol tools", "sanctum", "search-strings", "stash-ninja", "tldr-tooltips"], "sections2": []} - Else vars.settings := {"sections": ["general", "hotkeys", "screen-checks", "updater", "donations", "cheat-sheets", "clone-frames", "minor qol tools", "search-strings"], "sections2": []} + Else vars.settings := {"sections": ["general", "hotkeys", "screen-checks", "updater", "donations", "cheat-sheets", "clone-frames", "filterspoon", "map-info", "minor qol tools", "search-strings"], "sections2": []} For index, val in vars.settings.sections vars.settings.sections2.Push(Lang_Trans("ms_" val)) } @@ -2796,7 +2824,7 @@ Settings_qol() vars.hwnd.settings.alarmfont_reset := vars.hwnd.help_tooltips["settings_font-size||"] := hwnd Gui, %GUI%: Add, Text, % "ys x+"settings.general.fWidth/4 " HWNDhwnd Border Center gSettings_qol2 w"settings.general.fWidth*2, % "+" vars.hwnd.settings.alarmfont_plus := vars.hwnd.help_tooltips["settings_font-size|||"] := hwnd - Gui, %GUI%: Add, Text, % "ys x+" settings.general.fWidth, % Lang_Trans("global_color", 2) ":" + Gui, %GUI%: Add, Text, % "ys x+" settings.general.fWidth, % Lang_Trans("global_color", 2) Gui, %GUI%: Add, Text, % "ys x+" settings.general.fWidth/2 " BackgroundTrans Border HWNDhwnd gSettings_qol2", % " " Gui, %GUI%: Add, Progress, % "xp yp wp hp Border Disabled BackgroundBlack HWNDhwnd1 c" settings.alarm.color, 100 From a538953cccf0dba0081b8a28c9f74e09f9a0dcf7 Mon Sep 17 00:00:00 2001 From: Lailloken <61888437+Lailloken@users.noreply.github.com> Date: Sun, 15 Dec 2024 07:56:20 +0100 Subject: [PATCH 3/5] added map-info mod list for poe2 --- data/english/map-info 2.txt | 339 ++++++++++++++++++++++++++++++++++++ 1 file changed, 339 insertions(+) create mode 100644 data/english/map-info 2.txt diff --git a/data/english/map-info 2.txt b/data/english/map-info 2.txt new file mode 100644 index 00000000..18be4fe7 --- /dev/null +++ b/data/english/map-info 2.txt @@ -0,0 +1,339 @@ +;##################################################### +;## general information/instructions +;##################################################### + +;## purpose of this file + ;## the script uses this file to detect specific word patterns in data that was copied from the game-client in order to extract information + ;## these patterns used to be hard-coded for English only, but they are now exposed in this txt-file and can be adapted to new target languages + + +;## file structure + ;## the script ignores TABs, empty lines, as well as lines/sections marked as comments (;##) + ;## the file is divided into [sections]: don't change them unless stated otherwise + ;## each non-comment line in this file is a key/value pair, divided into two parts: + ;## key = value + ;## some keys don't require a value + + +;## map-mods will be grouped into these 5 categories +;## translate these keys as you see fit, but don't change the order + +[mod types] +player +monsters +bosses +area + + +;## from this point onwards, the [section] will be the strings of map-mods as they are displayed on map-items +;## replace those strings with the corresponding strings of the target language and use placeholders where applicable + +;## each mod belongs to a type (from the five in the [mod types] section above) +;## there's a sixth "expedition" type: don't change that +;## you can simply use the "find & replace" feature in text-editors to quickly replace all the "type = X" lines (since there are only 5 different ones) + +;## each mod has a short text-string that will be used in the map-info panel instead of the full mod-text +;## %-signs will be replaced by the actual %-roll of the map-mod, e.g. "ele reflect: %" -> "ele reflect: 15%" +;## try to trim down the text-strings as much as possible in order to keep the map-info panel compact + +;## the text-strings between ID 200 and 300 make heavy use of abbreviations because the original mod-text is very long + +[increased Quantity of Items found in this Area] +type = area +text = quant: +% +ID = 001 + +[increased Rarity of Items found in this Area] +type = area +text = rarity: +% +ID = 002 + +[increased Gold found in this Area] +type = area +text = gold: +% +ID = 003 + +[increased Experience gain] +type = player +text = exp: +% +ID = 004 + +[increased Pack size] +type = monsters +text = pack size: +% +ID = 005 + +[increased number of Monster Packs] +type = monsters +text = extra packs: +% +ID = 006 + +[increased amount of Chests] +type = area +text = extra chests: +% +ID = 007 + +[increased Magic Monsters] +type = monsters +text = extra magic: +% +ID = 008 + +[increased number of Rare Monsters] +type = monsters +text = extra rares: +% +ID = 009 + +[increased amount of Magic Chests] +type = area +text = magic chests: +% +ID = 010 + +[increased amount of Rare Chests] +type = area +text = rare chests: +% +ID = 011 + +[increased Magic Pack Size] +type = monsters +text = magic pack size: +% +ID = 012 + +[Rare Monsters have additional Modifier] +type = monsters +text = mods on rares: + +ID = 013 + +[Area contains an additional Shrine] +type = area +text = extra shrine +ID = 014 + +[Area contains an additional Strongbox] +type = area +text = extra strongbox +ID = 015 + +[Area contains an additional Essence] +type = area +text = extra essence +ID = 016 + +[Area contains additional packs of Undead] +type = monsters +text = extra undead packs +ID = 017 + +[Area contains additional packs of Beasts] +type = monsters +text = extra beast packs +ID = 018 + +[Area contains additional packs of Ezomyte Monsters] +type = monsters +text = extra ezomyte packs +ID = 019 + +[Area contains additional packs of Faridun Monsters] +type = monsters +text = extra faridun packs +ID = 020 + +[Area contains additional packs of Vaal Monsters] +type = monsters +text = extra vaal packs +ID = 021 + +[Area contains additional packs of Iron Guards] +type = monsters +text = extra iron guard packs +ID = 022 + +[Area contains additional packs of Plagued Monsters] +type = monsters +text = extra plagued packs +ID = 023 + +[Area contains additional packs of Transcended Monsters] +type = monsters +text = extra transcended packs +ID = 024 + +[Area contains additional packs of Bramble Monsters] +type = monsters +text = extra bramble packs +ID = 025 + +[Monsters deal of Damage as Extra Fire] +type = monsters +text = extra fire dmg: +% +ID = 026 + +[Monsters deal of Damage as Extra Cold] +type = monsters +text = extra cold dmg: +% +ID = 027 + +[Monsters deal of Damage as Extra Lightning] +type = monsters +text = extra light dmg: +% +ID = 028 + +[increased Monster Damage] +type = monsters +text = inc damage: +% +ID = 029 + +[increased Monster Movement Speed|increased Monster Attack Speed|increased Monster Cast Speed] +type = monsters +text = speed: +% +ID = 030 + +[Monsters have increased Critical Hit Chance|to Monster Critical Damage Bonus] +type = monsters +text = crit/multi: +% +ID = 031 + +[more Monster Life] +type = monsters +text = more life: % +ID = 032 + +[Monster Elemental Resistances] +type = monsters +text = ele res: +% +ID = 033 + +[Monsters are Armoured] +type = monsters +text = extra armor +ID = 034 + +[Monsters are Evasive] +type = monsters +text = extra evasion +ID = 035 + +[Monsters gain of Maximum Life as Extra Maximum Energy Shield] +type = monsters +text = life as extra es: % +ID = 036 + +[Monsters have chance to Poison on Hit] +type = monsters +text = poison chance: % +ID = 037 + +[Monsters have chance to Bleed on Hit] +type = monsters +text = bleed chance: % +ID = 038 + +[Monsters have increased Ailment Threshold|Monsters have increased Stun Threshold] +type = monsters +text = stun/ailm thresh: +% +ID = 039 + +[Monsters Break Armour equal to of Physical Damage dealt] +type = monsters +text = dmg breaks armor: % +ID = 040 + +[Monsters have increased Accuracy Rating] +type = monsters +text = inc accuracy: % +ID = 041 + +[Monsters deal of Damage as Extra Chaos] +type = monsters +text = extra chaos dmg: +% +ID = 042 + +[Monsters have increased Stun Buildup] +type = monsters +text = inc stun: +% +ID = 043 + +[Monsters have increased Freeze Buildup|Monsters have increased Ignite Chance|Monsters have increased Shock Chance] +type = monsters +text = freeze/ignite/shock: +% +ID = 044 + +[Monsters fire additional Projectiles] +type = monsters +text = extra proj: +% +ID = 045 + +[Monsters have increased Area of Effect] +type = monsters +text = area of effect: +% +ID = 046 + +[Players are Cursed with Enfeeble] +type = player +text = enfeeble +ID = 047 + +[Players are Cursed with Temporal Chains] +type = player +text = temp chains +ID = 048 + +[Players are Cursed with Elemental Weakness] +type = player +text = ele weakness +ID = 049 + +[Area has patches of Burning Ground] +type = area +text = burning ground +ID = 050 + +[Area has patches of Chilled Ground] +type = area +text = chilled ground +ID = 051 + +[Area has patches of Shocked Ground] +type = area +text = shocked ground +ID = 052 + +[Monster Damage Penetrates Elemental Resistances] +type = monsters +text = ele pen: % +ID = 053 + +[maximum Player Resistances] +type = player +text = max res: -% +ID = 054 + +[Players gain reduced Flask Charges] +type = player +text = flask charges: -% +ID = 055 + +[Players have less Recovery Rate of Life and Energy Shield] +type = player +text = less recovery: % +ID = 056 + +[Players have less Cooldown Recovery Rate] +type = player +text = less cdr: % +ID = 057 + +[Monsters take reduced Extra Damage from Critical Hits] +type = monsters +text = crit res: +% +ID = 058 + +[less effect of Curses on Monsters] +type = player +text = less curse effect: % +ID = 059 + +[Monsters have chance to steal Power, Frenzy and Endurance charges on Hit] +type = monsters +text = steal charges: % +ID = 060 From 4adb19de0dbe7a0bc1114607fe07d381168e0261 Mon Sep 17 00:00:00 2001 From: Lailloken <61888437+Lailloken@users.noreply.github.com> Date: Sun, 15 Dec 2024 07:56:54 +0100 Subject: [PATCH 4/5] updated English UI --- data/english/UI.txt | 4 +++- data/english/client.txt | 2 -- data/english/help tooltips.json | 18 +++++++++++++++++- 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/data/english/UI.txt b/data/english/UI.txt index e9a7cd39..11a7991b 100644 --- a/data/english/UI.txt +++ b/data/english/UI.txt @@ -100,7 +100,7 @@ global_enable = "enable" global_reset = "reset" global_color = "color" - global_color = "colors" + global_color = "colors:" global_opacity = "opacity:" global_tier = "tier" global_ilvl = "ilvl" @@ -357,6 +357,7 @@ lootfilter_unsaved = "long-press to discard" lootfilter_update = "apply base filter updates" lootfilter_addstack = "add stack:" + lootfilter_selection = "current selection:" @@ -851,6 +852,7 @@ m_mapinfo_pinned = "pinned mods:" m_mapinfo_modsearch = "mod search:" m_mapinfo_roll_highlight = "highlight map rolls" + m_mapinfo_reset = "reset tiers" diff --git a/data/english/client.txt b/data/english/client.txt index 8ccdd52f..ddcb50ac 100644 --- a/data/english/client.txt +++ b/data/english/client.txt @@ -103,8 +103,6 @@ - - ;##################################################### ;## character tracking ;##################################################### diff --git a/data/english/help tooltips.json b/data/english/help tooltips.json index 58885139..922dca5c 100644 --- a/data/english/help tooltips.json +++ b/data/english/help tooltips.json @@ -490,9 +490,13 @@ ], "mapinfo mod settings": [ "below, you can customize the tiering of specific map mods", - "hover over mods and press number keys 1-4 to apply highlighting, or space to strike them out", + "hover over mods and press number keys 1-4 to apply highlighting, space to strike them out, or right-click to reset them to un-tiered (white)", "use the mod search to find mods, click the – and + buttons to (un)pin mods for quick access" ], + "mapinfo reset tiers": [ + "long-click to reset every map mod tier to default (white, not crossed out)", + "(/underline)note: this affects every single mod, not just the pinned ones below" + ], "alarm enable": [ "timer-widget with alarm/countdown and stopwatch functionality", "hidden by default, hold to display it", @@ -871,10 +875,22 @@ "long-click to create and apply the new file", "(/underline)note: the /itemfilter in-game command will be used, so make sure the chat box is closed and accessible" ], + "backgroundcolor": [ + "click to select the background color, right-click to reset to the previous color" + ], + "bordercolor": [ + "click to select the border color, right-click to reset to the previous color" + ], + "textcolor": [ + "click to select the text color, right-click to reset to the previous color" + ], "basefilter": [ "select the filter you want to use as the base", "a separate file with your customizations will be created and then applied in game, leaving the base filter unchanged" ], + "gui color": [ + "click to select the background color underneath item labels, or right-click to reset to default" + ], "hide": [ "hide the entire item-group in game" ], From 5eff4c2be4cb8f8686e3921bb5dddcc946b5f740 Mon Sep 17 00:00:00 2001 From: Lailloken <61888437+Lailloken@users.noreply.github.com> Date: Sun, 15 Dec 2024 08:35:16 +0100 Subject: [PATCH 5/5] updated version-file and changelogs --- data/changelog.json | 7 +++++++ data/versions.json | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/data/changelog.json b/data/changelog.json index 29f6e89a..7061759a 100644 --- a/data/changelog.json +++ b/data/changelog.json @@ -1,4 +1,11 @@ [ + [ + ["1.56.1", 15601], + "still beta, mainly poe2 changes", + "color palette is now more flexible (rgb sliders)", + "filterspoon: now poe2 compatible (still highly experimental)", + "map-info: now poe2 compatible" + ], [ ["1.56.0", 15600], "initial poe2 compatibility update: will be beta for the time being", diff --git a/data/versions.json b/data/versions.json index 94fc0994..021c5e00 100644 --- a/data/versions.json +++ b/data/versions.json @@ -1,3 +1,3 @@ { - "_release": [15600, "https://github.com/Lailloken/Lailloken-UI/archive/refs/heads/main.zip"] + "_release": [15601, "https://github.com/Lailloken/Lailloken-UI/archive/refs/heads/main.zip"] } \ No newline at end of file