MOj0 / LoR-Bot

Bot for Legends of Runeterra
MIT License
27 stars 14 forks source link

Unknown mana #22

Closed boblolr closed 1 year ago

boblolr commented 1 year ago

first of all thanks for the bot , the problem is after join a game , i get the error " unknow mana " and the bot just afking not playing , how can i fix that ?

MOj0 commented 1 year ago

Hi, you might not have the right settings. From the readme

Game running fullscreen at 1920x1080 resolution and at least medium quality (otherwise the image detection procedure cannot read the mana values)

boblolr commented 1 year ago

that's true , i can select a display resolution for my screen btwn 2560 x 1600 and 1920x1200 , is that any way to make the game works at 1920x1080 exactly or?

MOj0 commented 1 year ago

Oh, I see. The issue with windowed mode is that window now also has a title bar, and the positioning of mana values are wrong. But still, what you can do is set it windowed 1920x1080 and set the offset of the title bar in the code. The height of the title bar on a 1920x1080 resolution should be around 40 px IIRC. Not sure about other resolutions.

nezam7 commented 1 year ago

meanwhile, is it possible to request timestamp on the cmd. at least when the bot stuck, i know what time it stuck. or at the very least it has log with timer on it.

MOj0 commented 1 year ago

Hi, well those settings work on my machine... Can you try at ultra settings and if that doesn't work, can you provide more details so that we can try and figure out what the issue is?

MOj0 commented 1 year ago

Sure, will send you a friend request in a few hours and we can have a huddle :smiley:

Vector341 commented 1 year ago

@SemsYapar Hi, I have the same problem and finally I found it's because I use the recommended 125% scaling in Display setting. It will change the resolution retrieved by the code, e.g. my setting is 1920x1080 with the 125% scaling, then I will get the 1536x864 (1920/1.25 and 1080/1.25) resolution in the code. After change the scaling to 100%, it works. Hope it can help you!

MOj0 commented 1 year ago

Ay, that's great to hear. Make sure to open a PR with a new deck along with the deck code in the readme ;)

boblolr commented 1 year ago

still cant find a solution for my 1680x1050 display monitor : ( i could change it to 2560 x 1600 , is that anyway to set the game window to 1920x1080 , there is not config file for it like lol and cant change it from setting ? ( i did it by hand still the script didnt work i think bcz i didnt hit 1920x1080 exactly) ( sorry for my bad english i hope u got me )

boblolr commented 1 year ago

i fixed it and that's how 1- i'v changed screen display to 2560 x 1600 2- i download "sizer" from google to change the game to 1920x1080 3 - i'v download "BorderlessWindowed" sft too to make the game borderless

now the script is working perfectly <3

ziminl commented 5 months ago

1920 x 1080 and 100% but has error everytime. what should i do

MOj0 commented 5 months ago

1920 x 1080 and 100% but has error everytime. what should i do

What is the error? Does it just say "Unknown mana..."? If you did everything correctly it shouldn't.. It was a long time since I last run the bot, so it might even be that Riot changed how the mana is displayed. Anyways, if you debug further, all the bot does is compare the region on the screen where the mana is displayed with the pictures in the mana_values folder.