gametechmods

Robot Arena => General Support => Topic started by: Dragonfire on February 18, 2009, 03:52:30 PM

Title: Weapons entry in 'Bindings.py'
Post by: Dragonfire 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?
Title: Weapons entry in 'Bindings.py'
Post by: Naryar 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.
Title: Weapons entry in 'Bindings.py'
Post by: Trovaner 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.
Title: Weapons entry in 'Bindings.py'
Post by: Madiaba 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????
Title: Weapons entry in 'Bindings.py'
Post by: Dragonfire 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?
Title: Weapons entry in 'Bindings.py'
Post by: Madiaba 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...
..
Title: Weapons entry in 'Bindings.py'
Post by: Clickbeetle 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.
Title: Weapons entry in 'Bindings.py'
Post by: Madiaba on March 01, 2009, 09:37:55 PM
Or even "Components" in general group... etc.
Title: Weapons entry in 'Bindings.py'
Post by: philetbabe 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  ?