Author Topic: .Py bindings help  (Read 10621 times)

Offline Reier

  • Rieir
  • *
  • Posts: 8564
  • Rep: 8
  • I GOT 3RD IN RAW1
    • https://www.youtube.com/c
  • Awards old BOTM Winner
    • View Profile
    • Awards
.Py bindings help
« on: October 11, 2008, 02:22:57 PM »
What type of program do I use to read .py files? I didn't find another topic about this. Thanks!
ALERT- Another WS coming up...
voted best bot builder two times and counting babayy. the best ra2 builder who has never won an actual tournament match
ReiAI pack for Ironforge
My drawings, and my webcomics
Why online PVP will save RA2
The problem with competitive IRL in RA2
I'm fine with hugging reier

Offline Naryar

  • Posts: 23267
  • Rep: 20
  • hybrids oui oui
    • http://www.youtube.com/us
  • Awards BOTM Winner
    • View Profile
    • Awards
  • Skype: TheMightyNaryar
.Py bindings help
« Reply #1 on: October 11, 2008, 02:30:37 PM »
Notepad++. I'm using that and it's cool. Just google it.

Offline Reier

  • Rieir
  • *
  • Posts: 8564
  • Rep: 8
  • I GOT 3RD IN RAW1
    • https://www.youtube.com/c
  • Awards old BOTM Winner
    • View Profile
    • Awards
.Py bindings help
« Reply #2 on: October 11, 2008, 02:44:27 PM »
I have a type of Notepad, & it doesn't peirce it. Maybe I don't have Notepad++.
ALERT- Another WS coming up...
voted best bot builder two times and counting babayy. the best ra2 builder who has never won an actual tournament match
ReiAI pack for Ironforge
My drawings, and my webcomics
Why online PVP will save RA2
The problem with competitive IRL in RA2
I'm fine with hugging reier

Offline somestrangeguy

  • *
  • Posts: 2068
  • Rep: 2
  • If you can read this, your monitor is turned on.
  • Awards BOTM Winner
    • View Profile
    • Awards
.Py bindings help
« Reply #3 on: October 11, 2008, 02:47:31 PM »
Hmm? I can open .py files with normal notepad.

Offline Reier

  • Rieir
  • *
  • Posts: 8564
  • Rep: 8
  • I GOT 3RD IN RAW1
    • https://www.youtube.com/c
  • Awards old BOTM Winner
    • View Profile
    • Awards
.Py bindings help
« Reply #4 on: October 11, 2008, 03:13:56 PM »
Nevermind, I guess I can read it. I just have no idea what they mean. =P
ALERT- Another WS coming up...
voted best bot builder two times and counting babayy. the best ra2 builder who has never won an actual tournament match
ReiAI pack for Ironforge
My drawings, and my webcomics
Why online PVP will save RA2
The problem with competitive IRL in RA2
I'm fine with hugging reier

Offline philetbabe

  • *
  • Posts: 497
  • Rep: 2
  • Drop D
    • View Profile
    • Awards
.Py bindings help
« Reply #5 on: October 12, 2008, 08:10:31 AM »
Quote from: Reier;16933
Nevermind, I guess I can read it. I just have no idea what they mean. =P

for a good tutorial : https://gametechmods.com/?do=Guide_to_AIing

a standard entry is like (at least) this :

    list.append(("myBotName","theKindOfBot", {'weapons': (a number for each weapon)}))

For instance :
    list.append( ("KillerBot", "Spinner", { 'weapons': (21, 22) }) )

the number 21,22 does not mean nothing but there are two weapons for this bot. Once it will loose it two weapons, the bot will react as if it has a 'Pusher' AI.

You can also add other option :
    # nose - "front" of bot in radians (default 0)
    # invertible - can function upside-down (default False)
    # topspeed - speed in meters/second AI will attempt not to exceed (default 4.0)
    # throttle - maximum analog value AI will attempt not to exceed (default 100)
    # turnspeed - turning in radians/second AI will attempt not to exceed (default 2.5)
    # turn - maximum analog value AI will attempt not to exceed (default 60)
    # radius - bot radius to use for checking for hazards and walls (default 1.0)

For instance if killerBot is invertible ('invertible'), try to avoid danger ('radius'), speedy ('speed') and had a little angle of turn ('turn'), it may be :

   list.append( ("KilleBot", "Spinner", { 'invertible':True, 'radius':1, 'topspeed' : 99, 'turn':30, 'weapons': (1, 2) }) )

the kind of bots you can choose from : it is the other file.py under your TEAM directory. If you don't know : just say 'Omni'

5 last points :
-if you use a piston, you need to tell the AI when to fire : this is done  by the custom zone (usually called 'weapon'). Once a bot enter this zone, your bot 'fires'
-if the direction of your bot is not good, correct it with 'nose':math.pi or 'nose':math.pi/2
-indentation is very important when you add a line in bindings.py, otherwise it crashes the game
-once you have made a bot, export it with a name 'bot0'.. 'bot5', replace a bot with the same name in th AI/TeamXXX directory, add your line to the bindings.py.
-the name of the controler must be Forward and LeftRight for the driving ones, it may be 'Fire', 'Spin' or 'Flip' for the other ones, depending of the kind of AI you use.  

Try first to AI Spinner, they are the easiest ones for they do not need custom zone.
Here is a standard Spinner Entry (nor the indentation) :
   list.append( ("MyBotName", "Spinner", { 'radius':0.5, 'topspeed' : 99, 'turn':30, 'weapons': (1, 2,3,4) }) )

Hope it helps you.

Offline Gigafrost

  • *
  • Posts: 805
  • Rep: 0
  • You'll never know what I'll think of next.
    • View Profile
    • Awards
.Py bindings help
« Reply #6 on: October 14, 2008, 04:54:04 PM »
There should also be a tutorial on how to edit .bot files...? Venko meant to teach me via msn but he spent most of the time talking about his own fantasies.

Offline Madiaba

.Py bindings help
« Reply #7 on: October 14, 2008, 05:41:42 PM »
I'll send you a chart on what's what, Gig, if you'd like.
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 Scrap Daddy

.Py bindings help
« Reply #8 on: October 16, 2008, 10:02:50 PM »
Quote from: Gigafrost;17306
There should also be a tutorial on how to edit .bot files...? Venko meant to teach me via msn but he spent most of the time talking about his own fantasies.


I just saw this post and started thinking. Doesnt the fact that venko knows how to edit bot files and his ridiculous stacking strike anyone as suspicious?

Offline Madiaba

.Py bindings help
« Reply #9 on: October 17, 2008, 12:20:16 AM »
SD, Let's NOT go there again.
FYI: He approached me asking to learn the AAM stuff that many were accusing him of doing. I told him later I would.  He was a little embarrassed that others knew AAM and he did not. I finally taught Venko at least a couple months after people accused him of AAM. He really knew nothing when i first began sharing stuff.
Also: He is just extremely patient and has a very good comp, monitor and mouse set-up which helps, and probably biggest of all, practically lives in front of his comp with RA2.
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 Somebody

  • *
  • Posts: 7201
  • Rep: 13
  • CP: +2
    • View Profile
    • Awards
.Py bindings help
« Reply #10 on: October 17, 2008, 03:59:31 PM »
There must not be much to do in Bulgaria in the summer.
I built that big robot on that TV show that time


Offline Naryar

  • Posts: 23267
  • Rep: 20
  • hybrids oui oui
    • http://www.youtube.com/us
  • Awards BOTM Winner
    • View Profile
    • Awards
  • Skype: TheMightyNaryar
.Py bindings help
« Reply #11 on: October 17, 2008, 04:09:14 PM »
He actually keeps saying that he goes to parties, drinks, gets laid, has a lot of friends, etc...

Offline Somebody

  • *
  • Posts: 7201
  • Rep: 13
  • CP: +2
    • View Profile
    • Awards
.Py bindings help
« Reply #12 on: October 17, 2008, 04:14:09 PM »
Then he must use a laptop.
I built that big robot on that TV show that time


Offline Little lost bot

  • Heavyweight
  • Posts: 684
  • Rep: -1
  • Apparently jumping onto band wagons.
    • View Profile
    • Awards
Re: .Py bindings help
« Reply #13 on: January 02, 2010, 07:02:46 PM »
Every time I edit the Bindings.py file the game crashes I try to add list.append(("Killdozer","Rammer",{'invertible':True,'nose':math.pi,'radius':0.1,'topspeed':100,'throttle':130,'turn':60,'turnspeed':2.5,'weapons':(10,)}))
with note pad the that comes with the cumputer and ya it just crashes HELP :vista:

Is taking one challenge request. First come first serve. I'm a bit rusty now but I'm going to try and crank something out for this. MW and up no glitches DSL or Stock.

Offline Pwnator

  • *
  • Posts: 6676
  • Rep: 15
  • Awards BOTM Winner
    • View Profile
    • http://pwnator.tumblr.com
    • Awards
  • See profile for gamer tags: Yes
Re: .Py bindings help
« Reply #14 on: January 02, 2010, 09:09:28 PM »
Notepad does that. Use Notepad++ and edit your bindings there. :D
Clash Cubes 1 - Grey Matter (Runner-Up)
King of Karnage - Sideshow Freak (Runner-Up, Best Engineered)
Rust In Pieces - Paper Cut 3 (Grand Champion, Most Dangerous Bot)
Wheely Tag Tournament - Ion Thruster (Grand Champion, along with Ounces' DiSemboweLment)
UK vs USA - Dark Striker (Grand Champion)
Rust In Pieces 2 - Claymore (Runner-Up, Favourite Bot)
BBEANS 6 - Infection 4 (Runner-Up)
RA2 Team Championships - Serious Business, Skeksis (Runner-Up, along with Scrappy, S_M, and Badnik)
RA2 Team Championships 2 - The Other Stig (Runner-Up, along with Scrappy, S_M, Badnik, 090901, and R1885)
Replica Wars 3 - Abaddon (Runner-Up, Luckiest Bot)
BroBots - wheebot & yaybot (Runner-Up)
Robo Zone 2 - Dipper (4th place, Survival Champion, & Best Axle Bot)
ARBBC - The Covenant (3rd place, BW Rumble Winner, Most Feared BW)

Offline JoeBlo

Re: .Py bindings help
« Reply #15 on: January 02, 2010, 09:38:40 PM »
it is possable to AI in notepad, I have done it before
 
Python is far better though, for it has a Check Module that finds errors for you  :mrgreen:

Offline Little lost bot

  • Heavyweight
  • Posts: 684
  • Rep: -1
  • Apparently jumping onto band wagons.
    • View Profile
    • Awards
Re: .Py bindings help
« Reply #16 on: January 03, 2010, 08:51:12 AM »
Ok I'll try that and see if the game works with that now thanks :smile:

Is taking one challenge request. First come first serve. I'm a bit rusty now but I'm going to try and crank something out for this. MW and up no glitches DSL or Stock.

Offline Badnik96

  • tired of your shit
  • *
  • Posts: 17527
  • Rep: 3
  • Awards BOTM Winner
    • View Profile
    • Awards
Re: .Py bindings help
« Reply #17 on: January 03, 2010, 09:01:01 AM »
bump!

Offline JoeBlo

Re: .Py bindings help
« Reply #18 on: January 03, 2010, 09:32:39 AM »
really no need since it was kinda on topic and he got help out of it
 
bumpings only bad if someone posts something like "LOLZ so funny" or "Linkz teh brocken" or similar  :mrgreen:

Offline lloopp D lloopp

  • Ultra Heavyweight
  • Posts: 1754
  • Rep: 1
  • having a hard time holding these alligators down
    • View Profile
    • Awards
Re: .Py bindings help
« Reply #19 on: January 03, 2010, 12:08:31 PM »
WTF does 'brocken' mean?
4 Brook moo moo moo moo moo moo how old was the movie food for Louis Missouri man hustle full moon eager for blow blow

currently 2-0 vs Clickbeetle in tournaments, the streak lives on
16th overall in BBEANS standings
runner up for best rookie award in BBEANS6
teamed up with jack daniels that one time
did okay in Clash Cubes 3 i guess
pound 4 pound the dreamiest gtm member