Skip to content
This repository has been archived by the owner on Dec 15, 2021. It is now read-only.

Creating new assets for bot

hjk22 edited this page Dec 31, 2019 · 1 revision

How to create new assets for bot

What you need

  • An emulator/phone with a screen resolution of 1920x1080 with adb enabled (of course you've got this, since you bot).
  • An image editor tool like Photoshop or GIMP (Paint should also be fine).

Getting a working asset

  1. Take a screenshot of the screen where your desired asset is contained with this command adb exec-out screencap -p > screenshot.png.
  2. Open screenshot.png with your image editor of choice.
  3. Select the image portion you want to use and crop it.
  4. Proceed to save/export the cropped image as a .png file, without resizing it or editing it any other way.

Making the bot use your asset

  1. Paste your newly created asset in the right subfolder of the assets bot's directory (C:\path_to_bot\ALAuto\assets).
  2. To use your asset in the code use this string: subfolder_name/asset_name, asset_name must not contain the file extension (.png is added by the various find methods contained in utils.py).

If you are replacing an existing asset, make sure that the name is correct.