Author Topic: How to BFE chassis height  (Read 1965 times)

Offline Clickbeetle

  • *
  • Posts: 3323
  • Reputation: 21
  • In Soviet Russia, bugs stomp YOU!
    • View Profile
    • Beetle Bros site
How to BFE chassis height
« on: December 24, 2011, 01:24:34 AM »
I've seen a lot of people lamenting that they can't BFE chassis height recently.  I thought, "Seriously?  Has no one written a tutorial on this ridiculously easy technique?"  Apparently, no one has, at least not in the Tutorials board.  Let me take this opportunity to post a quick and simple guide to BFE'ing chassis height.
 
Step 1
 
If you're intending to lower your chassis height with BFE, the first thing you should do before you even start building is set the chassis height at the lowest it will go in-game.  This will make it much easier to adjust the chassis height out-of-game later on.
 
You probably know this, but just in case:  To get the very lowest chassis height in-game, don't drag the height slider down.  Instead, click the bottom-most pixel of the height bar.  This sets the slider at a level below that which you can normally drag it to.
 
Step 2
 
Once your chassis is done, export your bot and quit RA2.
 
You can BFE the chassis height at any time, but it's better to do it before attaching any components, to make sure that the components actually FIT inside.  If you BFE after the components are in there, you could accidentally make it too short so the components can't be reattached, which would be basically the same as stacking and fall under the "cheating" category.
 
Step 3
 
Now here's where it gets just a bit tricky.  You can't edit .bot files in Notepad, Word, or any other common default program.  If you try, it will corrupt the file beyond recovery.
 
Fortunately, there's any easy solution.  Notepad++ is a free, safe text editor that's loaded with tons of useful features, but the only one you really care about right now is that it can save .bot files without corrupting them.  Here's the official website where you can download it:  http://notepad-plus-plus.org/
 
After installing Notepad++, run it and go to File > Open.  Navigate to your Robot Designs folder and open up your .bot file.  Now you're ready to edit!
 
Step 4
 
The .bot file looks intimidating, but don't panic.  There's an easy way for the program to change the chassis height automatically.  To do this, go to Search > Replace in the menu bar.
 
Here's where setting the chassis to the minimum in-game height beforehand comes in handy.  If you did this, the height of your chassis will be exactly 0.338182.  Why such an odd number?  I don't know, but be glad for it because being so odd means it won't likely appear anywhere else in the .bot file.  That means you can safely type 0.338182 in the "Find what" box, and type the desired new chassis height in the "Replace with" box.  Now click "Replace All".  This will go through the .bot file and replace all instances of the number 0.338182 with whatever you put in the "Replace with" box.
 
What should the new chassis height be?  It will probably take some experimentation but 0.25 is a good height to start at.  However, don't make the height exactly 0.25.  Make it something very close, like 0.250001.  This will make it possible to do another Replace All if you need to change the chassis height, as 0.250001 won't likely appear anywhere else in the .bot file, but 0.25 might.
 
Now suppose you didn't set the chassis height to the in-game minimum and don't want to rebuild the bot, or you did it wrong and 0.338182 doesn't appear in the .bot file.  Don't give up; all you need to do is find out what the chassis height actually is.  First, look for where it says "Chassis" a little less than halfway through the file.  It should look something like this:
 
Chassis
(bunch of really big numbers)
RAW
(bunch of 1's and 0's)
(bunch of fractions in two columns)
(bunch of numbers in three columns)
 
The bunch of numbers in three columns is what you want.  The numbers in the middle column are the height.  Example:
 
Code: [Select]
1.1 0 0.88
0.88 0 0.88
0.88 0 -0.88
1.1 0 -0.88
1.1 0 -1.1
-1.1 0 -1.1
-1.1 0 -0.88
-0.88 0 -0.88
-0.88 0 0.88
-1.1 0 0.88
-1.1 0 1.1
1.1 0 1.1
1.1 0.51 0.88
0.88 0.51 0.88
0.88 0.51 -0.88
1.1 0.51 -0.88
1.1 0.51 -1.1
-1.1 0.51 -1.1
-1.1 0.51 -0.88
-0.88 0.51 -0.88
-0.88 0.51 0.88
-1.1 0.51 0.88
-1.1 0.51 1.1
1.1 0.51 1.1
1.1 0 0.88
0.88 0 0.88
0.88 0.51 0.88
1.1 0.51 0.88
0.88 0 0.88
0.88 0 -0.88
0.88 0.51 -0.88
0.88 0.51 0.88
0.88 0 -0.88
1.1 0 -0.88
1.1 0.51 -0.88
0.88 0.51 -0.88
1.1 0 -0.88
1.1 0 -1.1
1.1 0.51 -1.1
1.1 0.51 -0.88
1.1 0 -1.1
-1.1 0 -1.1
-1.1 0.51 -1.1
1.1 0.51 -1.1
-1.1 0 -1.1
-1.1 0 -0.88
-1.1 0.51 -0.88
-1.1 0.51 -1.1
-1.1 0 -0.88
-0.88 0 -0.88
-0.88 0.51 -0.88
-1.1 0.51 -0.88
-0.88 0 -0.88
-0.88 0 0.88
-0.88 0.51 0.88
-0.88 0.51 -0.88
-0.88 0 0.88
-1.1 0 0.88
-1.1 0.51 0.88
-0.88 0.51 0.88
-1.1 0 0.88
-1.1 0 1.1
-1.1 0.51 1.1
-1.1 0.51 0.88
-1.1 0 1.1
1.1 0 1.1
1.1 0.51 1.1
-1.1 0.51 1.1
1.1 0 1.1
1.1 0 0.88
1.1 0.51 0.88
1.1 0.51 1.1

This bot has a chassis height of 0.51.
 
Now just do the Replace All explained above.  Since 0.51 might appear in other places in the .bot file, it's probably a good idea to highlight all of that three-column section first, so it only replaces numbers in that area.
 
When you're done, save the file.  That's it!  You don't need to do anything else, or do any manual editing and risk making a mistake.
 
Step 5
 
Open RA2.  Import the BFE'd bot into your bot lab and hope it doesn't crash (if it does, you did something very wrong).  Now have fun finishing building your super-flat killer!

To lack feeling is to be dead, but to act on every feeling is to be a child.
-Brandon Sanderson, The Way of Kings

Offline Squirrel_Monkey

  • Squirrel_Monkeyweight
  • *
  • Posts: 6891
  • Reputation: 7
  • [Insert clever and witty comment here]
    • 0SquirrelMonkey0
    • View Profile
Re: How to BFE chassis height
« Reply #1 on: December 24, 2011, 04:22:33 AM »
If you get good, you can just edit the bot file from the teams folder. (But risky if you mess it up)
Better than GK since 2009.
I think SM is a pretty cool guy, eh builds unicycle-bots and doesn't afraid of anything

Offline Hercules

  • Heavyweight
  • Posts: 459
  • Reputation: 1
  • The Argentinian member that loves chicken
    • View Profile
  • Skype: HLPablo2
Re: How to BFE chassis height
« Reply #2 on: December 24, 2011, 11:57:19 AM »
WWWWWWWWWWOOOOOOOWWWWWWWWWWWWWWW








Click us!!!!!!!!!!!

Offline That Robot is a Spy!

  • Ultra Heavyweight
  • Posts: 1375
  • Reputation: -11
  • ^Best for Business
    • View Profile
  • See profile for gamer tags: 1
Re: How to BFE chassis height
« Reply #3 on: December 25, 2011, 12:39:43 PM »
WWWWWWWWWWOOOOOOOWWWWWWWWWWWWWWW
ummmm

Good guide Click. Will try it out in the future.