Author Topic: 'Weapon' numbers in bindings  (Read 649 times)

Offline Resetti's Replicas

  • *
  • Posts: 4399
  • Rep: 18
  • Replica King
    • ResettisReplicas
  • Awards BOTM Winner
    • View Profile
    • Awards
  • See profile for gamer tags: Yes
'Weapon' numbers in bindings
« on: March 20, 2009, 12:41:10 PM »
Something I've noticed in the bindings is each robot has a command called "weapons" and then a bunch of numbers, like this:

'weapons': (1,2,3,4,5,6,7,8,9)}))

What do these numbers do?  I know that a bot can't use a weapon unless there is a number, but what effect would it have on a robot if I changed one of the numbers?

Offline philetbabe

  • *
  • Posts: 497
  • Rep: 2
  • Drop D
    • View Profile
    • Awards
'Weapon' numbers in bindings
« Reply #1 on: March 20, 2009, 01:21:50 PM »
Quote from: Sonny_Resetti;31394
Something I've noticed in the bindings is each robot has a command called "weapons" and then a bunch of numbers, like this:

'weapons': (1,2,3,4,5,6,7,8,9)}))

What do these numbers do?  I know that a bot can't use a weapon unless there is a number, but what effect would it have on a robot if I changed one of the numbers?


such a common question ....
answer here :
Quote from: philetbabe;23541
So, what are these numbers in the weapons list contained in binding.py  ?
Code: [Select]
...,'weapons':(1,2,3,4,5,6,7,8,9)}))

Offline somestrangeguy

  • *
  • Posts: 2068
  • Rep: 2
  • If you can read this, your monitor is turned on.
  • Awards BOTM Winner
    • View Profile
    • Awards
'Weapon' numbers in bindings
« Reply #2 on: March 20, 2009, 03:48:31 PM »
They are components by their numbers, in order of attaching. This is how the Omni AI detects weapon loss an switces to push mode when all weapons are off, but if you have #1 there, it will never do that, because the first component you attach is on the baseplate.
There is a program(someone link it, im too lazy) that will let you to see the structre of your robot in text form, allowing you to type in the exact numbers in the weapons section.