gametechmods

Robot Arena => Tutorials and Tips => Other Tutorials => Topic started by: apanx on June 15, 2009, 03:54:05 PM

Title: Get more than nine buttons on the controller
Post by: apanx 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

(http://img15.imageshack.us/img15/2816/coolcontroller.png)
You too can have a nice controller. Do not touch it(edit anything in botlab), or it will break.
Title: Get more than nine buttons on the controller
Post by: Madiaba 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.
.
Title: Get more than nine buttons on the controller
Post by: somestrangeguy 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?
Title: Get more than nine buttons on the controller
Post by: philetbabe 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 :
(https://gametechmods.com/uploads/images/47920ModBotsFile.png)
Title: Get more than nine buttons on the controller
Post by: DuckRA2 on June 16, 2009, 11:52:49 AM
:eek: I don't believe it! I've seen that somewhere!
Title: Get more than nine buttons on the controller
Post by: Reier on June 16, 2009, 11:56:28 AM
Has anyone noticed that in the manual it has a controller with 12 slots?
Title: Get more than nine buttons on the controller
Post by: philetbabe 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.
Title: Get more than nine buttons on the controller
Post by: DuckRA2 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