leguims / PS4Macro.PES2018Lite

Bot script for PES2018Lite using PS4 Macro
MIT License
5 stars 3 forks source link

More details in instruction + Upgrade to English version #2

Closed phananhnhan closed 6 years ago

phananhnhan commented 6 years ago

Thanks so much for your support ! I have 2 questions, which i'm posting here, sorry if this is the wrong place.

I will be very appreciated if you can make a screen capture video how to start script with PS4Macro and how to adjust (X, Y) coordinates with other club length name. I think it is very useful for amature as me. Thanks so much !

leguims commented 6 years ago

First thing, it works only with french version of PES 2018 Lite.

What kind of fail do you have on start screen ? The script does not press X button ? On my computer, I Always need to plug a dualshok to computer, without it, script fails to press buttons. I do not know why. (edit: use <EmulateController>true</EmulateController> in settings.xml files if you do not plug dualshok)

If your version is french, you just have adjust (X,Y) coordinates (HASH will be same if your name team exactly these ones : "Win1", "WinTwo", "Lose1" and "LoseTwo"). After, you have to adjust code in "class ManageTeamScreen", you have to modify the method "SwitchTeam" to adjust the number of "digital pad down" to apply to select each team named above.

Otherwise (english, german or other version), you need to adjust most of screenshots. In this case, I could help you by name picture file to trace to the code and give a ZIP file with mine.

phananhnhan commented 6 years ago

I'm using English version of PES2018. I think it is the reason for my problem. I will be very appreciated if you help me by name picture file to trace to the code and give a ZIP file with yours. I will compare your images with my English version. After that, I will replace in source code. My email is: cGhhbmFuaG5oYW4xOTkyQGdtYWlsLmNvbQ==

Thanks so much for your support ! Thanks for your patience and understanding !

leguims commented 6 years ago

Thanks to use my bot. I will be not alone when all of us will be banned. :wink:

It will take much more time than answer to rename picture. I will Zip it and give it as a deliver on my repository. I do not know how to do, but it is possible, I will found the good way.

I will warn you on this issue when ready.

If you are a good C# coder, you can try to introduce OCR instead of using picture. This is a big work to do, but translation will be easier.

leguims commented 6 years ago

I encode your mail for your privacy, I don't really need it. You can erase it. If you let it, may be I could use it if I have an issue for the ZIP on GitHub.

leguims commented 6 years ago

[Updated link to download] You can download the PS4Macro.PES2018Lite V1.0. I join an archive of french screenshots.

This is a really good project to change the version. When you will have something working, post the news on this issue. We will see together how integrate it to the repository.

leguims commented 6 years ago

Hi, I added 2 new pictures to my scenes. When you have finish with picture of "Release v1.0", I will make a new release with a new archive of pictures. So warn me here when you are ready for next step. Bye.

Zulo2012 commented 6 years ago

Hi I'm very interested in your project, how can I download your screenshots? Congrats on the good job Regards

leguims commented 6 years ago

You Can download files of V1.0, there is a link above.

To know how compute checksum, you need to watche tutoriels of PS4Macro.

I won't translate to English version. So if you start it, keep in touch with this issue, and I could help you sometime.

Zulo2012 commented 6 years ago

Hi leguins, I already downloaded version1.0 but cannot find images inside...

leguims commented 6 years ago

[Updated link] Oups, you are perfectly right. I'm so confused.

Try this instead : PES2018Lite V1.0 + French Screenshots Archive

I'm sorry, because I lost some picture when making operation with GIT. Oups. So when you will need these one, come back to this issue, and I will try to make them screenshot again.

Zulo2012 commented 6 years ago

Error 404 file not found. Sorry for the inconvenience

El 20 mar. 2018 22:09, "leguims" notifications@github.com escribió:

Oups, you are perfectly right. I'm so confused.

Try this instead : PES2018Lite V1.0 + French Screenshots Archive https://github.com/leguims/PS4Macro.PES2018Lite/releases/tag/untagged-264121a1dd143c3a07f4

I'm sorry, because I lost some picture when making operation with GIT. Oups. So when you will need these one, come back to this issue, and I will try to make them screenshot again.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/leguims/PS4Macro.PES2018Lite/issues/2#issuecomment-374757601, or mute the thread https://github.com/notifications/unsubscribe-auth/Aj0HdHSSfBjRGt5uoqeikpqN5elI1tiIks5tgXASgaJpZM4RiVVr .

leguims commented 6 years ago

I won't you to be lost in translation, so I give you an example for "Root-LaunchMyClub-myClubFocus.png":

  1. If file is named like "XXXFocus.png", it means that it is a focused part of the file "XXX.png". In this example, "Root-LaunchMyClub-myClubFocus.png" is a part of "Root-LaunchMyClub-myClub.png".
  2. You have to make the screenshot of your PES version as same as possible of "Root-LaunchMyClub-myClub.png".
  3. Search which C# file uses the screenshot "Root-LaunchMyClub-myClubFocus.png" :arrow_right: PS4Macro.PES2018Lite\PS4Macro.PES2018Lite\Root\LaunchMyClub.cs
  4. Find the RectMap using this picture :arrow_right: myClubFocus
        private static RectMap myClubFocus = new RectMap()
        {
            ID = "Root-LaunchMyClub-myClubFocus.png",
            X = 62,
            Y = 322,
            Width = 75,
            Height = 25,
            Hash = 9220964140883935103
        };
  5. Case "XXX.png" :
    1. Take the picture as it is.
  6. Case "XXXFocus.png" :
    1. Crop the picture to have the "Focus" version
    2. Take coordonate of the focus part : X, Y is for the left-upper corner of area to crop.
    3. Take size of the focus part : Width, Height is for the width and height of area to crop.
  7. This picture, is the one to use with de PS4Macro tools to compute checksum.
  8. Update the attribute "Hash" in the RectMap with your own checksum .

Now, the program is updated with your own screenshot.

Good luck.

leguims commented 6 years ago

Error 404 file not found. Sorry for the inconvenience

I have 404 error if i'm not logged in to GitHub, but it's ok if I am logged in.

1024x768.-.FRENCH.zip

Zulo2012 commented 6 years ago

Sorry leguims, still no luck. Does not matter if I'm logged In or not. 404 error. Maybe because it is "untagged"? I believe It should appear on /releases/download on the github repository to be dowloadable by anyone.

leguims commented 6 years ago

Sorry again, the release was in "draft" state, so it was hidden for others. Now you can download files and work to adjust checksum for your PES version.

Work begin now for you, keep in touch for your progress.

Zulo2012 commented 6 years ago

Thank you Leguims! I will work on it this weekend and let you know Regards & merci

leguims commented 6 years ago

You are welcome. 2 riens. :wink:

Zulo2012 commented 6 years ago

Hi leguims, I just finished marking the areas, hashing the rectmaps.. and when I run the dll it gives me an error "insufficient memory" do you know what could be the cause? I have 6GB DDR3 memory, is this not enough? If I try to use your compiled dll I receive the same error. Also I noticed your screenshots are 1008x729 in dimension, while mine are 1008x721 if I set the resize remote play to 1024x768, maybe this is the cause?

I'll keep investigating. Regards

Update: If I deactivate Sim.SkipIntroByOption() and Match.SkipEndGame() it does not go out of memory, so I will check those tomorrow. Anyway how can I see the console log?

Regards

leguims commented 6 years ago

My PC is 4GB memory, so this is not the real problem.

To see logs of PS4Macro.PES2018Lite, modify "ShowConsole" setting in this file :

settings.xml

<?xml version="1.0" encoding="utf-8"?>
<Settings>
  <EmulateController>true</EmulateController>
  <StartupFile>PS4Macro.PES2018Lite.dll</StartupFile>
  <ShowConsole>true</ShowConsole>
</Settings>

The bug is probably due to resizing the window while PS4Macro is running. I remember that I had the same issue in the laptop what have a smaller screen than the PC I usually use to develop. The laptop is 8GB RAM, so bigger than the PC to develop.

hara88 commented 6 years ago

Hi, leguims! Thanks for your brilliant project. I am very new to this thing and only managed to get the bot working about 50% for the English version, I still need to translate some images. The thing that really makes me frustrated is the Image Hashing Tool. I just can't make it work every time. It won't let me drag images to the boxes. What am I doing wrong?

leguims commented 6 years ago

This tool comes from PSMacro. I can't help you.

You are several to translate to English version. Could you give me your pictures ?

hara88 commented 6 years ago

Of course sir! These are my screenshot and macro files: https://drive.google.com/open?id=1u2llomBuweziwBngJs92vDLvxJcQcWhD https://drive.google.com/open?id=1iLK_vQl6S6PBvi-Lu1QEC4oO_UZ8yW2P

These are my screenshots to do list: Root-LaunchMyClub-eventNewYearFocus Root-SkipIntro-onlineNewsHeaderFocus Root-SkipIntro-onlineUpdatePlayersFocus.png SkipIntroByOption Sim-SkipIntroByOption-teamName Match-AcceptManagerNewContract-extension Match-AcceptManagerNewContract-extensionHeader Match-SkipEndGame-seasonPromoteFocus Match-SkipEndGame-seasonPromoteEarningsFocus Match-SkipMajorEvent-majorEventsFocus

Using this macro I managed to get it working about 80% now, the bot only sometimes get confused in the Club House and Manage Team screens.

leguims commented 6 years ago

Thank you for files and updated solution.

I create branch for french version (fr) and english version (en). And your files are uploaded. I prepare a pre-release :soccer: V1.0-pre1-en for screenshots and english release but I will publish the real one when you finish them.

Great work !

hara88 commented 6 years ago

https://drive.google.com/open?id=1iLK_vQl6S6PBvi-Lu1QEC4oO_UZ8yW2P https://drive.google.com/open?id=1coQmKsA1t8A86rEYqjVFOj7f8c2WsaKB

Leguims, this is the "complete" version for me. The way I farm is I spin a new 11 players team from free scouts, start a new SIM season and I don't renew their contracts at the end. I release them and spin another team. This version works without issues for a complete season. I changed the code in the contract script so that the bot won't renew them. I have zero knowledge about scripting so sadly this is my maximum effort. I hope others can come in, test the bot and fix any issues found. Thanks for the amazing project!

leguims commented 6 years ago

This is a good idea to synchronize all players of your team to renew all at once.

I will read your code and try to find why they are not renew. Possible thing is that screenshot of new contract request is not recognized.

I publish you code as it and fix it if I find issues while I read it. :soccer: V1.0-pre2-en

Screenshots are the same. No need to update it. I update only DLL and version on GIT to V1.0-pre2-en

Yesterday, I saw that you changed some "Circle" into "Cross". This is amazing that button changes between fra and eng. O_o

I create new issue to help you to fix the issue "Do not renew contracts in english version 'V1.0-pre2-en'" . I wrote some comments to help you to find the bug. Good luck ! :cop: :mag: :bug: :boom:

leguims commented 6 years ago

English version is now available ! This issue is fixed. Thanks @hara88 !

masterlopezz commented 5 years ago

Hello leguims! Amazing work, do you have 2019 version? The language of the game is important? I have mine in portuguese?

leguims commented 5 years ago

The language modifies screenshots. Sorry, but the free to play version is not yet available for PES 2019.

leguims commented 5 years ago

Masterlopezz report to me that with cronusmax plus u dont need the PC, just the usb stick :)

If you want ps4macro, wait for PES free version.