Author Topic: How to fix a .bot file with a bad custom skin  (Read 1102 times)

Offline Fracture

  • Super Mega Hyper Giga
  • Ultra Heavyweight
  • Posts: 1506
  • Rep: 11
  • how about i shove my big dog up your hanky panky
  • Awards GTMCS2 Divison Winner BOTM Winner
    • View Profile
    • Awards
How to fix a .bot file with a bad custom skin
« on: October 21, 2017, 01:33:45 PM »
A spectre is haunting GTM, earning the ire of many a frustrated builder who have ended up with a broken .bot file after attempting to apply a custom skin.

Here's a quick guide on how to remove a broken skin from your bot. All info taken from https://gametechmods.com/forums/index.php?page=page2187 and https://gametechmods.com/forums/tutorials-and-tips/guide-to-the-bot-file-(re-up)/

To explain why skins can crash the game, RA2 bots only accept custom textures in 24-bit .bmp format. Furthermore, the image must be square with sides equal to a power of 2, which means something like 256x256, 512x512, 128x128, or 1024x1024. Any other format or size will either look distorted or just break your bot.

You will need Notepad++ to edit your .bot file, available for free on its website.

1) Find your broken .bot file in the Robot Designs or Teams folder and open with Notepad++. As always, right-click on the field in the bottom right so that it says UNIX. Be sure to make a backup copy of the file just in case you misread one of the steps!

2) Scroll to the very top of the file and click on the first line so the text cursor is placed there. Use Ctrl-F or Command-F to go to the first appearance of the text "RAW". This will take you to the chassis section of the component data and makes sure that your next search is not caught by the wrong result.

3) Leave the text cursor where it is and run the find function again to search for "true". You should be taken to a line with only the text "true" and the next line(s) either being really ugly or just saying "false".

4) If you have the right line, you'll have found the boolean "true" which tells the game to scan for a skin in the line under it, where the skin is encoded really messily and a "false" appears at the end. To remove the skin, just change the "scan for skin" indicator from "true" to "false" and delete all the skin information from the next line. If this is really lengthy and takes up multiple lines, just highlight and delete all of it. One way to highlight multiple lines is by putting the text cursor at the end of the "true"/"false" indicator line, scrolling down until the skin data ends, and pressing Shift+Left Click. After this is done, make sure that the line under the indicator value still has a single text of "false".

5) Save the .bot file and try it out. You should end up with a working bot with the faulty skin now removed. If not, you can try again with the backup you made earlier.

Hope this helps some of you out!