Author Topic: Get more than nine buttons on the controller  (Read 2710 times)

Online apanx

Get more than nine buttons on the controller
« on: June 15, 2009, 03:54:05 PM »
Pesky nine button limit ruining your dreams of a AI controlled Machine-gun tank?
All the cool kids have more than nine buttons on their controllers so why should you not?
You only need to take up the dark art of bot file editing for it to work.

1. Wire up nine slots.
2. Realise you need more
3. Open bot file using text editor capable of interpreting linefeed(0x10) only as newline, that means Notepad++ or TextPad (or vi or EMACS)
4. Hax :P. Find the section describing your controllers.

Looks like this

Name: Forward
2 0 1
2
1 0 3 0
1 0 2 0

or this:

Name: 1
0 0 4
1
0 0 8 0

or like this:

Name: Spin
2 0 2
1
0 0 57 0

Now the first row is the name, the second row is the one we are interested in. You see, the standard uncool controller only gives us positions X= 0-2, Y=0-2. By moving already defined controls out to lets say X=3,Y=4. We can free up space from the part the uncool kidds can play with. It is also possible to stack controllers on each other, just be sure you do not want to change them, cause that is going to be annoying.
(X,Y,Type of control 1=analog, 2=switch, 4=button)
The third row is just the number of keys that are bound to the control. 1 for swtiches and buttons, 2 for analog.
The fourth row is some cryptic keycodes. Dont mess with these unless you have a cheat sheet tucked away somewhere.

5. If you need even more keys, Goto 1 else end.

GL HF


You too can have a nice controller. Do not touch it(edit anything in botlab), or it will break.

Offline Madiaba

  • *
  • Posts: 1456
  • Rep: 8
    • View Profile
    • Awards
Get more than nine buttons on the controller
« Reply #1 on: June 15, 2009, 04:10:52 PM »
That's nice, Apanx. Thanks. I've several multi-weaponed bots that I could use this on.
 
Too bad though, it's through BFE; and only 'until you try to edit it'.
Maybe some gib work might be useful here, so that this can be done kosherly without BFE. Maybe with gib surgery, the exe will recognize the extra slots in the controller, and likewise do all of this in the botfile.
I'll talk with some others who know some 'Gib'erish, and test this out...
When there's some progress, I'll send it your way...
 
Great work, Apanx.
.
« Last Edit: June 15, 2009, 04:49:47 PM by Madiaba »
Input is appreciated. :)
-Arrogance is a quantity devoid of quality...
-As a client once told me "This is my story, and it's sticking to me!"
-Relationships these days are like the 'Arrival' section of the airport: a lot of baggage is being revealed in one place, and not a lot of it is being correlated to its real owners...

Offline somestrangeguy

  • *
  • Posts: 2103
  • Rep: 2
  • If you can read this, your monitor is turned on.
    • View Profile
    • Awards
Get more than nine buttons on the controller
« Reply #2 on: June 16, 2009, 07:46:50 AM »
I was once wondering if I could change the coordinates of the buttons trough there, never did tough.

And I think I know what the 4th and 5th rows are. They are the buttons in ASCII code. So the buttons on what you placed there in text are:

Forward: appearently the 1 indicates that it is read from the gamepad because all others are 0 there. And its got 2 and 3 because they are the outputs 2 and 3 from the controller(cant say these for sure since they differ in each gamepad)

1: Bacspace

Spin: 9

Are these correct?

Offline philetbabe

  • *
  • Posts: 510
  • Rep: 2
  • Drop D
    • View Profile
    • Awards
Get more than nine buttons on the controller
« Reply #3 on: June 16, 2009, 08:37:57 AM »
here is what i recently learn while working on Mad scientist's pack :
last lines of XXX.bot :

Offline DuckRA2

  • *
  • Posts: 1012
  • Rep: 1
    • View Profile
    • Awards
Get more than nine buttons on the controller
« Reply #4 on: June 16, 2009, 11:52:49 AM »
:eek: I don't believe it! I've seen that somewhere!

Offline Reier

  • *
  • Posts: 8472
  • Rep: 8
  • my standard dad can beat up your irl dad
    • https://www.youtube.com/c
  • Awards old BOTM Winner
    • View Profile
    • Awards
Get more than nine buttons on the controller
« Reply #5 on: June 16, 2009, 11:56:28 AM »
Has anyone noticed that in the manual it has a controller with 12 slots?

Offline philetbabe

  • *
  • Posts: 510
  • Rep: 2
  • Drop D
    • View Profile
    • Awards
Get more than nine buttons on the controller
« Reply #6 on: June 16, 2009, 12:05:10 PM »
Quote from: DuckRA2;44565
:eek: I don't believe it! I've seen that somewhere!


Where ? i'm interested to have a look at this source of informations.

BTW : Duck, in your RA2 site there is a mistake : driving controlers must be named "Forward" and "Leftright" and not "forward" and "leftRight", it is case-sensitive.

Offline DuckRA2

  • *
  • Posts: 1012
  • Rep: 1
    • View Profile
    • Awards
Get more than nine buttons on the controller
« Reply #7 on: June 16, 2009, 12:05:26 PM »
YES THATS WHERE I SAW IT IN THE MANUAL!!!


oh thanks philetbabe, I think Ill just delete that whole section, I never was that good at AI, I bet there is more mistakes there