Author Topic: Weapons entry in 'Bindings.py'  (Read 1355 times)

Offline Dragonfire

Weapons entry in 'Bindings.py'
« on: February 18, 2009, 03:52:30 PM »
this may have already been answered and i am sorry to ask this if it has, but
what does the 'weapons' entry mean in the bindings.py?

Offline Naryar

  • Posts: 23283
  • Rep: 21
  • hybrids oui oui
    • http://www.youtube.com/us
  • Awards BOTM Winner
    • View Profile
    • Awards
  • Skype: TheMightyNaryar
Weapons entry in 'Bindings.py'
« Reply #1 on: February 18, 2009, 03:58:22 PM »
Number of weapons on your bot, precisely number of weapon components (i don't know how the game recognizes weapon components because flipper parts are included too) that are supposed to break before the bot goes on Engage (or Shove) binding, basically what a rammer in Omni would do. I think.

Offline Trovaner

  • *
  • Posts: 1222
  • Rep: 32
    • View Profile
    • Awards
Weapons entry in 'Bindings.py'
« Reply #2 on: February 18, 2009, 04:19:44 PM »
The numbers represent the ID number of your bot's weapons (you could also write the id number of other components if you want). If you just want to make a quick test, you can write in random numbers because the game doesn't check to make sure they are weapons. If you want to make your bot as effective as possible, use apanx bot exporter to see the ID numbers of all the components that you want to break off before the AI switches tactics.

Offline Madiaba

Weapons entry in 'Bindings.py'
« Reply #3 on: February 18, 2009, 09:48:58 PM »
 
^yep^
Trov, I still think that an "Evade" tactic needs to be written for this option.  Once all weapons are removed then get and stay away....  Busy????
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 Dragonfire

Weapons entry in 'Bindings.py'
« Reply #4 on: February 19, 2009, 05:33:35 AM »
is there a way to make an 'or'? i.e. if either of the weapons break switch tactics?

Offline Madiaba

Weapons entry in 'Bindings.py'
« Reply #5 on: February 19, 2009, 07:04:57 AM »
There's no choice of Boolean operators; 'and' is all that is coded and thus available in the Bindings line.
An AI.py could be re-written to facilitate others, though...
..
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 Clickbeetle

  • *
  • Posts: 3375
  • Rep: 21
  • In Soviet Russia, bugs stomp YOU!
  • Awards BOTM Winner
    • View Profile
    • Beetle Bros site
    • Awards
Weapons entry in 'Bindings.py'
« Reply #6 on: March 01, 2009, 04:45:32 PM »
With a simple modification to __init__.py you can make multiple weapons groups.  I have four groups, 'weapons', 'sweapons', 'tweapons', and 'qweapons'.

You can put one weapon in 'weapons' and another one in 'sweapons'.  Then say,

if not self.weapons or not self.sweapons:
    (switch tactics)

I do believe that's all in the AI py pack on my website.

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 Madiaba

Weapons entry in 'Bindings.py'
« Reply #7 on: March 01, 2009, 09:37:55 PM »
Or even "Components" in general group... etc.
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 philetbabe

  • *
  • Posts: 497
  • Rep: 2
  • Drop D
    • View Profile
    • Awards
Weapons entry in 'Bindings.py'
« Reply #8 on: March 02, 2009, 12:25:20 PM »
This subject have been introduced here :
Quote from: philetbabe;23541
So, what are these numbers in the weapons list contained in binding.py  ?