diff --git a/config/configs.json b/config/configs.json new file mode 100644 index 0000000..e1d07e7 --- /dev/null +++ b/config/configs.json @@ -0,0 +1,851 @@ +{ + "words": [ + { + "word": "World 3\n Points on Clearance:1800", + "details": "in The Simulated Universe Menu", + "state": "Viewing World 3 I", + "large_image": "su", + "small_image": "picrogueplanetm3" + }, + { + "word": "World 3\n Points on Clearance:3200", + "details": "in The Simulated Universe Menu", + "state": "Viewing World 3 II", + "large_image": "su", + "small_image": "picrogueplanetm3" + }, + { + "word": "World 3\n Points on Clearance:4600", + "details": "in The Simulated Universe Menu", + "state": "Viewing World 3 III", + "large_image": "su", + "small_image": "picrogueplanetm3" + }, + { + "word": "World 3\n Points on Clearance:6000", + "details": "in The Simulated Universe Menu", + "state": "Viewing World 3 IV", + "large_image": "su", + "small_image": "picrogueplanetm3" + }, + { + "word": "World 3\n Points on Clearance:7500", + "details": "in The Simulated Universe Menu", + "state": "Viewing World 3 V", + "large_image": "su", + "small_image": "picrogueplanetm3" + }, + { + "word": "World 4\n Points on Clearance:2200", + "details": "in The Simulated Universe Menu", + "state": "Viewing World 4 I", + "large_image": "su", + "small_image": "picrogueplanetm4_01" + }, + { + "word": "World 4\n Points on Clearance:3200", + "details": "in The Simulated Universe Menu", + "state": "Viewing World 4 II", + "large_image": "su", + "small_image": "picrogueplanetm4_01" + }, + { + "word": "World 4\n Points on Clearance:4600", + "details": "in The Simulated Universe Menu", + "state": "Viewing World 4 III", + "large_image": "su", + "small_image": "picrogueplanetm4_01" + }, + { + "word": "World 4\n Points on Clearance:6000", + "details": "in The Simulated Universe Menu", + "state": "Viewing World 4 IV", + "large_image": "su", + "small_image": "picrogueplanetm4_01" + }, + { + "word": "World 4\n Points on Clearance:7500", + "details": "in The Simulated Universe Menu", + "state": "Viewing World 4 V", + "large_image": "su", + "small_image": "picrogueplanetm4_01" + }, + { + "word": "World 5\n Points on Clearance:2800", + "details": "in The Simulated Universe Menu", + "state": "Viewing World 5 I", + "large_image": "su", + "small_image": "picrogueplanetm5" + }, + { + "word": "World 5\n Points on Clearance:4600", + "details": "in The Simulated Universe Menu", + "state": "Viewing World 5 II", + "large_image": "su", + "small_image": "picrogueplanetm5" + }, + { + "word": "World 5\n Points on Clearance:6000", + "details": "in The Simulated Universe Menu", + "state": "Viewing World 5 III", + "large_image": "su", + "small_image": "picrogueplanetm5" + }, + { + "word": "World 5\n Points on Clearance:7500", + "details": "in The Simulated Universe Menu", + "state": "Viewing World 5 IV", + "large_image": "su", + "small_image": "picrogueplanetm5" + }, + { + "word": "World 6\n Points on Clearance:3200", + "details": "in The Simulated Universe Menu", + "state": "Viewing World 6 I", + "large_image": "su", + "small_image": "picrogueplanetm6" + }, + { + "word": "World 6\n Points on Clearance:4600", + "details": "in The Simulated Universe Menu", + "state": "Viewing World 6 II", + "large_image": "su", + "small_image": "picrogueplanetm6" + }, + { + "word": "World 6\n Points on Clearance:6000", + "details": "in The Simulated Universe Menu", + "state": "Viewing World 6 III", + "large_image": "su", + "small_image": "picrogueplanetm6" + }, + { + "word": "World 6\n Points on Clearance:7500", + "details": "in The Simulated Universe Menu", + "state": "Viewing World 6 IV", + "large_image": "su", + "small_image": "picrogueplanetm6" + }, + { + "word": "Simulated Universe\n Path", + "details": "In The Simulated Universe", + "state": "Sellecting a Path", + "large_image": "su", + "small_image": "roguestarrelicicon" + }, + { + "word": "Select Blessings", + "details": "In The Simulated Universe", + "state": "Sellecting a Blessing", + "large_image": "su", + "small_image": "sex2" + }, + { + "word": "Select Curio", + "details": "In The Simulated Universe", + "state": "Sellecting a Curio", + "large_image": "su", + "small_image": "sex2" + }, + { + "word": "Domain\n Combat", + "details": "In Simulated Universe", + "state": "Domain - Combat", + "large_image": "su", + "small_image": "roguefoeicon" + }, + { + "word": "Domain\n Elite", + "details": "In Simulated Universe", + "state": "Domain - Elite", + "large_image": "su", + "small_image": "roguefoeeliteicon" + }, + { + "word": "Domain\n Boss", + "details": "In Simulated Universe", + "state": "Domain - Boss", + "large_image": "su", + "small_image": "roguebossicon" + }, + { + "word": "Domain\n Occurrence", + "details": "In Simulated Universe", + "state": "Domain - Occurrence", + "large_image": "su", + "small_image": "roguerandomicon" + }, + { + "word": "Domain\n Respite", + "details": "In Simulated Universe", + "state": "Domain - Respite", + "large_image": "su", + "small_image": "rogueintensifyicon" + }, + { + "word": "Region\n Encounter", + "details": "In Simulated Universe", + "state": "Region - Encounter", + "large_image": "su", + "small_image": "roguepowerfulenemyicon" + }, + { + "word": "Respite\n Rest Area", + "details": "In Simulated Universe", + "state": "Rest Area", + "large_image": "su", + "small_image": "rogueintensifyicon" + }, + { + "word": "Simulated Universe\n Ability Tree\n Ability activated", + "details": "in The Simulated Universe Menu", + "state": "Viewing the Ability Tree", + "large_image": "su", + "small_image": "sex2" + }, + { + "word": "Download Initial Characters\n Launch Simulated Universe", + "details": "in The Simulated Universe", + "state": "Downloading the Initial Characters", + "large_image": "su", + "small_image": "downloader1" + }, + { + "word": "Download Additional Characters\n Confirm", + "details": "in The Simulated Universe", + "state": "Downloading Additional Characters", + "large_image": "su", + "small_image": "downloader1" + }, + { + "word": "Simulated Universe\n Enhancing Blessings", + "details": "in The Simulated Universe", + "state": "Enhancing Blessings Menu", + "large_image": "su", + "small_image": "rogueintensifyicon" + }, + { + "word": "Point Rewards\n Current Score", + "details": "in The Simulated Universe Menu", + "state": "Checking Point Rewards", + "large_image": "su", + "small_image": "sex2" + }, + { + "word": "Herta's Store\n Herta's Store\n Star Rail Pass", + "details": "Herta Store", + "state": "Viewing the Store", + "large_image": "honkai-star-rail", + "small_image": "iconbillboardshop" + }, + { + "word": "Herta's Office\n Phone/Exit", + "details": "Trailblazing through Herta Space Station", + "state": "In Herta's Office", + "large_image": "herta-space", + "small_image": "20006" + }, + { + "word": "Storage Zone\n Phone/Exit", + "details": "Trailblazing through Herta Space Station", + "state": "In the Storage Zone", + "large_image": "herta-space", + "small_image": "20006" + }, + { + "word": "Base Zone\n Phone/Exit", + "details": "Trailblazing through Herta Space Station", + "state": "In the Base Zone", + "large_image": "herta-space", + "small_image": "20006" + }, + { + "word": "Master Control Zone\n Phone/Exit", + "details": "Trailblazing through Herta Space Station", + "state": "In the Master Control Zone", + "large_image": "herta-space", + "small_image": "20006" + }, + { + "word": "Supply Zone\n Phone/Exit", + "details": "Trailblazing through Herta Space Station", + "state": "In the Supply Zone", + "large_image": "herta-space", + "small_image": "20006" + }, + { + "word": "Parlor Car\n Phone/Exit", + "details": "In The Parlor Car", + "state": "Visiting The Astral Express", + "large_image": "parlor-car", + "small_image": "20007" + }, + { + "word": "Phonograph\n Current song", + "details": "In The Parlor Car", + "state": "Checking The Jukebox Music", + "large_image": "parlor-car", + "small_image": "jukeboxdoc" + }, + { + "word": "Phonograph\n Set Coach Music", + "details": "In The Parlor Car", + "state": "Checking The Jukebox Music", + "large_image": "parlor-car", + "small_image": "jukeboxdoc" + }, + { + "word": "Level Rewards\n Rewards", + "details": "In The Parlor Car", + "state": "Checking Trailblazer Level Rewards", + "large_image": "parlor-car", + "small_image": "20006" + }, + { + "word": "Great Mine\n Phone/Exit", + "details": "Trailblazing through Jarilo-VI", + "state": "In the Great Mine", + "large_image": "jarilo-vi", + "small_image": "20006" + }, + { + "word": "Outlying Snow Plains\n Phone/Exit", + "details": "Trailblazing through Jarilo-VI", + "state": "In The Outlying Snow Plains", + "large_image": "jarilo-vi", + "small_image": "20006" + }, + { + "word": "Corridor of Fading Echoes\n Phone/Exit", + "details": "Trailblazing through Jarilo-VI", + "state": "In Corridor of Fading Echoes", + "large_image": "jarilo-vi", + "small_image": "20006" + }, + { + "word": "Administrative District\n Phone/Exit", + "details": "Trailblazing through Jarilo-VI", + "state": "In The Administrative District", + "large_image": "jarilo-vi", + "small_image": "20006" + }, + { + "word": "Boulder Town\n Phone/Exit", + "details": "Trailblazing through Jarilo-VI", + "state": "In Boulder Town", + "large_image": "jarilo-vi", + "small_image": "20006" + }, + { + "word": "Boulder Town\n Phone/Exit", + "details": "Trailblazing through Jarilo-VI", + "state": "In Boulder Town", + "large_image": "jarilo-vi", + "small_image": "20006" + }, + { + "word": "Fight Club\n Phone/Exit", + "details": "Trailblazing through Jarilo-VI", + "state": "In The Fight Club", + "large_image": "jarilo-vi", + "small_image": "20006" + }, + { + "word": "Rivet Town\n Phone/Exit", + "details": "Trailblazing through Jarilo-VI", + "state": "In Rivet Town", + "large_image": "jarilo-vi", + "small_image": "20006" + }, + { + "word": "Fight Club\n Phone/Exit", + "details": "Trailblazing through Jarilo-VI", + "state": "In The Fight Club", + "large_image": "jarilo-vi", + "small_image": "20006" + }, + { + "word": "Robot Settlement\n Phone/Exit", + "details": "Trailblazing through Jarilo-VI", + "state": "In The Robot Settlement", + "large_image": "jarilo-vi", + "small_image": "20006" + }, + { + "word": "Backwater Pass\n Phone/Exit", + "details": "Trailblazing through Jarilo-VI", + "state": "In The Backwater Pass", + "large_image": "jarilo-vi", + "small_image": "20006" + }, + { + "word": "Silvermane Guard Restricted Zone\n Phone/Exit", + "details": "Trailblazing through Jarilo-VI", + "state": "In The Silvermane Guard Restricted Zone", + "large_image": "jarilo-vi", + "small_image": "20006" + }, + { + "word": "Artisanship Commission\n Phone/Exit", + "details": "Trailblazing through Xianzhou Luofu", + "state": "In The Artisanship Commission", + "large_image": "xianzhou", + "small_image": "20006" + }, + { + "word": "Divination Commission\n Phone/Exit", + "details": "Trailblazing through Xianzhou Luofu", + "state": "In The Divination Commission", + "large_image": "xianzhou", + "small_image": "20006" + }, + { + "word": "Stargazer Navalia\n Phone/Exit", + "details": "Trailblazing through Xianzhou Luofu", + "state": "In The Stargazer Navalia", + "large_image": "xianzhou", + "small_image": "20006" + }, + { + "word": "Cloudford\n Phone/Exit", + "details": "Trailblazing through Xianzhou Luofu", + "state": "In The Cloudford", + "large_image": "xianzhou", + "small_image": "20006" + }, + { + "word": "Exalting Sanctum\n Phone/Exit", + "details": "Trailblazing through Xianzhou Luofu", + "state": "In The Exalting Sanctum", + "large_image": "xianzhou", + "small_image": "20006" + }, + { + "word": "Central Starskiff Haven\n Phone/Exit", + "details": "Trailblazing through Xianzhou Luofu", + "state": "In The Central Starskiff Haven", + "large_image": "xianzhou", + "small_image": "20006" + }, + { + "word": "Character Details\n More Stats", + "details": "In the Character Menu", + "state": "Viewing Character Details", + "large_image": "honkai-star-rail", + "small_image": "avataricon" + }, + { + "word": "Character Details\n Light Cone", + "details": "In the Character Menu", + "state": "Viewing Character Details", + "large_image": "honkai-star-rail", + "small_image": "avataricon" + }, + { + "word": "Light Cone\n Light Cone Ability", + "details": "In the Character Menu", + "state": "Viewing Character Light Cone Details", + "large_image": "honkai-star-rail", + "small_image": "avataricon" + }, + { + "word": "Traces\n Max Level", + "details": "In the Character Menu", + "state": "Viewing Character Traces", + "large_image": "honkai-star-rail", + "small_image": "avataricon" + }, + { + "word": "Equipping Relics\n More Stats", + "details": "In the Character Menu", + "state": "Viewing Character Relics", + "large_image": "honkai-star-rail", + "small_image": "avataricon" + }, + { + "word": "Replace Relic\n Set Effect", + "details": "In the Character Menu", + "state": "Viewing Character Relics", + "large_image": "honkai-star-rail", + "small_image": "avataricon" + }, + { + "word": "Eidolon Resonance\n Details", + "details": "In the Character Menu", + "state": "Viewing Character Eidolons", + "large_image": "honkai-star-rail", + "small_image": "avataricon" + }, + { + "word": "Insignia Reward", + "details": "In The Forgotton Hall Menu", + "state": "Viewing Forgotton Hall Rewards", + "large_image": "abyss", + "small_image": "sex2" + }, + { + "word": "Memory Stage 1\n Phone/Exit", + "details": "Forgotten Hall", + "state": "Fighting in Floor 1", + "large_image": "abyss", + "small_image": "abyssprocess1" + }, + { + "word": "Memory Stage 2\n Phone/Exit", + "details": "Forgotten Hall", + "state": "Fighting in Floor 2", + "large_image": "abyss", + "small_image": "abyssprocess1" + }, + { + "word": "Memory Stage 3\n Phone/Exit", + "details": "Forgotten Hall", + "state": "Fighting in Floor 3", + "large_image": "abyss", + "small_image": "abyssprocess1" + }, + { + "word": "Memory Stage 4\n Phone/Exit", + "details": "Forgotten Hall", + "state": "Fighting in Floor 4", + "large_image": "abyss", + "small_image": "abyssprocess1" + }, + { + "word": "Memory Stage 5\n Phone/Exit", + "details": "Forgotten Hall", + "state": "Fighting in Floor 5", + "large_image": "abyss", + "small_image": "abyssprocess1" + }, + { + "word": "Memory Stage 6\n Phone/Exit", + "details": "Forgotten Hall", + "state": "Fighting in Floor 6", + "large_image": "abyss", + "small_image": "abyssprocess1" + }, + { + "word": "Memory Stage 7\n Phone/Exit", + "details": "Forgotten Hall", + "state": "Fighting in Floor 7", + "large_image": "abyss", + "small_image": "abyssprocess1" + }, + { + "word": "Memory Stage 8\n Phone/Exit", + "details": "Forgotten Hall", + "state": "Fighting in Floor 8", + "large_image": "abyss", + "small_image": "abyssprocess1" + }, + { + "word": "Memory Stage 9\n Phone/Exit", + "details": "Forgotten Hall", + "state": "Fighting in Floor 9", + "large_image": "abyss", + "small_image": "abyssprocess1" + }, + { + "word": "Memory Stage 10\n Phone/Exit", + "details": "Forgotten Hall", + "state": "Fighting in Floor 10", + "large_image": "abyss", + "small_image": "abyssprocess1" + }, + { + "word": "Memory Stage 11\n Phone/Exit", + "details": "Forgotten Hall", + "state": "Fighting in Floor 11", + "large_image": "abyss", + "small_image": "abyssprocess1" + }, + { + "word": "Memory Stage 12\n Phone/Exit", + "details": "Forgotten Hall", + "state": "Fighting in Floor 12", + "large_image": "abyss", + "small_image": "abyssprocess1" + }, + { + "word": "Memory Stage 13\n Phone/Exit", + "details": "Forgotten Hall", + "state": "Fighting in Floor 13", + "large_image": "abyss", + "small_image": "abyssprocess1" + }, + { + "word": "Memory Stage 14\n Phone/Exit", + "details": "Forgotten Hall", + "state": "Fighting in Floor 14", + "large_image": "abyss", + "small_image": "abyssprocess1" + }, + { + "word": "Memory Stage 15\n Phone/Exit", + "details": "Forgotten Hall", + "state": "Fighting in Floor 15", + "large_image": "abyss", + "small_image": "abyssprocess1" + }, + { + "word": "Favor of Amber Phase 1\n Phone/Exit", + "details": "Memory of Chaos", + "state": "Fighting in Floor 1", + "large_image": "abyss2", + "small_image": "abyssprocess2" + }, + { + "word": "Favor of Amber Phase 2\n Phone/Exit", + "details": "Memory of Chaos", + "state": "Fighting in Floor 2", + "large_image": "abyss2", + "small_image": "abyssprocess2" + }, + { + "word": "Favor of Amber Phase 3\n Phone/Exit", + "details": "Memory of Chaos", + "state": "Fighting in Floor 3", + "large_image": "abyss2", + "small_image": "abyssprocess2" + }, + { + "word": "Favor of Amber Phase 4\n Phone/Exit", + "details": "Memory of Chaos", + "state": "Fighting in Floor 4", + "large_image": "abyss2", + "small_image": "abyssprocess2" + }, + { + "word": "Favor of Amber Phase 5\n Phone/Exit", + "details": "Memory of Chaos", + "state": "Fighting in Floor 5", + "large_image": "abyss2", + "small_image": "abyssprocess2" + }, + { + "word": "Favor of Amber Phase 6\n Phone/Exit", + "details": "Memory of Chaos", + "state": "Fighting in Floor 6", + "large_image": "abyss2", + "small_image": "abyssprocess2" + }, + { + "word": "Favor of Amber Phase 7\n Phone/Exit", + "details": "Memory of Chaos", + "state": "Fighting in Floor 7", + "large_image": "abyss2", + "small_image": "abyssprocess2" + }, + { + "word": "Favor of Amber Phase 8\n Phone/Exit", + "details": "Memory of Chaos", + "state": "Fighting in Floor 8", + "large_image": "abyss2", + "small_image": "abyssprocess2" + }, + { + "word": "Favor of Amber Phase 9\n Phone/Exit", + "details": "Memory of Chaos", + "state": "Fighting in Floor 9", + "large_image": "abyss2", + "small_image": "abyssprocess2" + }, + { + "word": "Favor of Amber Phase 10\n Phone/Exit", + "details": "Memory of Chaos", + "state": "Fighting in Floor 10", + "large_image": "abyss2", + "small_image": "abyssprocess2" + }, + { + "word": "Rewards\n Nameless Gift", + "details": "in the Battlepass Menu", + "state": "Checking the Battlepass Rewards", + "large_image": "honkai-star-rail", + "small_image": "BP1" + }, + { + "word": "Missions\n Today's Missions", + "details": "in the Battlepass Menu", + "state": "Checking the Battlepass Missions", + "large_image": "honkai-star-rail", + "small_image": "BP1" + }, + { + "word": "Mailbox\n Delete Read", + "details": "In the Mailbox Menu", + "state": "Checking the Mailbox", + "large_image": "honkai-star-rail", + "small_image": "iconmail" + }, + { + "word": "Missions\n All Missions", + "details": "in the Missions Menu", + "state": "Checking All Missions", + "large_image": "honkai-star-rail", + "small_image": "questicon" + }, + { + "word": "Daily Training", + "details": "In The Interastral Guide Menu", + "state": "Checking Daily Missions", + "large_image": "honkai-star-rail", + "small_image": "dailyquesticon" + }, + { + "word": "Survival Index", + "details": "In The Interastral Guide Menu", + "state": "Checking Survival Index", + "large_image": "honkai-star-rail", + "small_image": "dailyqueststudyicon" + }, + { + "word": "Switch Ability\n Stellaron Hunter: Kafka", + "details": "In a Battle", + "state": "Fighting Stellaron Hunter: Kafka", + "large_image": "honkai-star-rail", + "small_image": "monster_2004010" + }, + { + "word": "Switch Ability\n Voidranger: Trampler", + "details": "In a Battle", + "state": "Fighting Voidranger: Trampler", + "large_image": "honkai-star-rail", + "small_image": "monster_8013010" + }, + { + "word": "Switch Ability\n Doomsday Beast", + "details": "In a Battle", + "state": "Fighting Doomsday Beast", + "large_image": "honkai-star-rail", + "small_image": "monster_8015010" + }, + { + "word": "Switch Ability\n Ice Out of Space", + "details": "In a Battle", + "state": "Fighting Ice Out of Space", + "large_image": "honkai-star-rail", + "small_image": "monster_8003010" + }, + { + "word": "Switch Ability\n Blaze Out of Space", + "details": "In a Battle", + "state": "Fighting Blaze Out of Space", + "large_image": "honkai-star-rail", + "small_image": "monster_8003020" + }, + { + "word": "Switch Ability\n Guardian Shadow", + "details": "In a Battle", + "state": "Fighting Guardian Shadow", + "large_image": "honkai-star-rail", + "small_image": "monster_8003030" + }, + { + "word": "Switch Ability\n Decaying Shadow", + "details": "In a Battle", + "state": "Fighting Decaying Shadow", + "large_image": "honkai-star-rail", + "small_image": "monster_8003040" + }, + { + "word": "Switch Ability\n Stormbringer", + "details": "In a Battle", + "state": "Fighting Stormbringer", + "large_image": "honkai-star-rail", + "small_image": "monster_8003050" + }, + { + "word": "Switch Ability\n Frigid Prowler", + "details": "In a Battle", + "state": "Fighting Frigid Prowler", + "large_image": "honkai-star-rail", + "small_image": "monster_1023020" + }, + { + "word": "Switch Ability\n Searing Prowler", + "details": "In a Battle", + "state": "Fighting Searing Prowler", + "large_image": "honkai-star-rail", + "small_image": "monster_1023010" + }, + { + "word": "Switch Ability\n Bronya", + "details": "In a Battle", + "state": "Fighting Bronya", + "large_image": "honkai-star-rail", + "small_image": "monster_1004030" + }, + { + "word": "Switch Ability\n Svarog", + "details": "In a Battle", + "state": "Fighting Svarog", + "large_image": "honkai-star-rail", + "small_image": "monster_1004020" + }, + { + "word": "Switch Ability\n Gepard", + "details": "In a Battle", + "state": "Fighting Gepard", + "large_image": "honkai-star-rail", + "small_image": "monster_1003020" + }, + { + "word": "Switch Ability\n Cocolia, Mother of Deception", + "details": "In a Battle", + "state": "Fighting Cocolia, Mother of Deception", + "large_image": "honkai-star-rail", + "small_image": "monster_1005010" + }, + { + "word": "Switch Ability\n Automaton Grizzly", + "details": "In a Battle", + "state": "Fighting Automaton Grizzly", + "large_image": "honkai-star-rail", + "small_image": "monster_1013010" + }, + { + "word": "Switch Ability\n Automaton Direwolf", + "details": "In a Battle", + "state": "Fighting Automaton Direwolf", + "large_image": "honkai-star-rail", + "small_image": "monster_1013020" + }, + { + "word": "Switch Ability\n Aurumaton Gatekeeper", + "details": "In a Battle", + "state": "Fighting Aurumaton Gatekeeper", + "large_image": "honkai-star-rail", + "small_image": "monster_2013010" + }, + { + "word": "Switch Ability\n Disciples of Sanctus Medicus", + "details": "In a Battle", + "state": "Fighting Disciples of Sanctus Medicus: Shape Shifter", + "large_image": "honkai-star-rail", + "small_image": "monster_2023010" + }, + { + "word": "Switch Ability\n Abundant Ebon Deer", + "details": "In a Battle", + "state": "Fighting Abundant Ebon Deer", + "large_image": "honkai-star-rail", + "small_image": "monster_2024010" + }, + { + "word": "Switch Ability", + "details": "In a Battle", + "state": "Fighting Random Enemies", + "large_image": "honkai-star-rail", + "small_image": "icon_alert" + }, + { + "word": "Your Turn", + "details": "In a Battle", + "state": "Fighting Random Enemies", + "large_image": "honkai-star-rail", + "small_image": "icon_alert" + } + ] +} diff --git a/config/fallback.json b/config/fallback.json new file mode 100644 index 0000000..16fd4a5 --- /dev/null +++ b/config/fallback.json @@ -0,0 +1,6 @@ +{ + "refresh_details": "Playing as Matsuko", + "refresh_state": "Region: EU", + "refresh_large_image": "honkai-star-rail", + "refresh_small_image": "none" +} \ No newline at end of file diff --git a/main.py b/main.py new file mode 100644 index 0000000..0dfdcab --- /dev/null +++ b/main.py @@ -0,0 +1,99 @@ +import time +import pygetwindow as gw +import json +from pypresence import Presence +from PIL import ImageGrab +from ocr import extract_text_from_image +import subprocess +import sys + +# Check if StarRail.exe is running +def is_star_rail_running(): + process_list = subprocess.run(['tasklist'], capture_output=True, text=True).stdout + return 'StarRail.exe' in process_list + +# Wait for StarRail.exe launch +while not is_star_rail_running(): + print("Waiting for StarRail.exe to be running...") + time.sleep(5) + if not gw.getWindowsWithTitle("StarRail"): + print("StarRail.exe is not running.") + +# Get the process ID of StarRail.exe +process_id = subprocess.run(['tasklist', '/fi', 'IMAGENAME eq StarRail.exe', '/fo', 'csv'], capture_output=True, text=True).stdout +process_lines = process_id.splitlines() +if len(process_lines) > 1: + process_id = process_lines[1].split(',')[1].strip('"') + print("StarRail.exe found with process ID:", process_id) + print("Starting the Rich Presence") +else: + print("Unable to retrieve process ID for StarRail.exe") + sys.exit() + +# Read the config JSON file +with open('config/configs.json', 'r') as file: + rpc_data = json.load(file) + words_to_search = rpc_data['words'] + +# Read the fallback JSON file +with open('config/fallback.json', 'r') as file: + refresh_data = json.load(file) + +# Initialize/Start the Discord RPC client +RPC = Presence('724484541825286205') + +RPC.connect() + +# Auto refreshing data +refresh_details = refresh_data['refresh_details'] +refresh_state = refresh_data['refresh_state'] +refresh_large_image = refresh_data['refresh_large_image'] +refresh_small_image = refresh_data['refresh_small_image'] + +start_time = int(time.time()) + +# Main loop +while True: + # Capture the screen text + screen_image = ImageGrab.grab() + + # Use OCR to extract text from the image + extracted_text = extract_text_from_image(screen_image) + + # Initialize variables for Rich Presence data + details = refresh_details + state = refresh_state + large_image = refresh_large_image + small_image = refresh_small_image + + # Check if word matches the extracted text + for word_data in words_to_search: + word_lines = word_data['word'].split('\n') + if all(line in extracted_text for line in word_lines): + details = word_data['details'] + state = word_data['state'] + large_image = word_data['large_image'] + small_image = word_data['small_image'] + break # Exit the loop once a match is found + + # Updating the Rich Presence activity + RPC.update( + details=details, + state=state, + large_image=large_image, + small_image=small_image, + start=start_time + ) + + # Printing Rich Presence data + print("Rich Presence Updated:") + print("Details:", details) + print("State:", state) + print("Large Image:", large_image) + print("Small Image:", small_image) + print("-----------------------") + + # Sleep for some time before capturing the next text + time.sleep(4) + +RPC.close() diff --git a/ocr.py b/ocr.py new file mode 100644 index 0000000..842f53c --- /dev/null +++ b/ocr.py @@ -0,0 +1,9 @@ +import pytesseract +from PIL import Image + +def extract_text_from_image(image): + extracted_text = pytesseract.image_to_string(image, config='--psm 6') + return extracted_text + +def compare_text(image_text, extracted_text): + return image_text.strip() == extracted_text.strip()