Author Topic: [AI] The right sequence of numbers in "Weapons"?  (Read 1089 times)

Offline Resetti's Replicas

  • *
  • Posts: 4399
  • Rep: 18
  • Replica King
    • ResettisReplicas
  • Awards BOTM Winner
    • View Profile
    • Awards
  • See profile for gamer tags: Yes
[AI] The right sequence of numbers in "Weapons"?
« on: June 21, 2011, 02:29:37 PM »
In an AI binding there's always a set of numbers after "Weapons" (unless it's a rammer) that tell a bot when its weapons have been broken off and it should switch to ramming/evading.  How do I figure out the right numbers to use?

Thanks in advance.

Offline G.K.

  • *
  • Posts: 12155
  • Rep: 10
  • Striving for a good personal text since 1994.
    • View Profile
    • Awards
Re: [AI] The right sequence of numbers in "Weapons"?
« Reply #1 on: June 21, 2011, 02:31:46 PM »
There's a tool called apanx's bot exporter, which should do your job. It doesn't really matter in most cases (Though it does in some, especially SnS ones) because most .py's use the charge tactic already, (I think anyway), so I tend to just use (0,) which is the chassis number.
My above post explains everything about everything.

Host of: Wheely Tag, Back To The Beginnings, BTTB 2, BTTB 3, BTTB 4, & BTTB V.

Heavy Metal: Champion (Mockery of the Whole Concept)
Robotic International Wars Series 1: Champion (Minifridge 6)
RA2 Team Championships 1 & 2: Champion (High Speed Train & Upthrust - as part of Naryar's Not Quite Evil Council of Doom)

Runner Up in: The Amazing Rage (Team Fedex), R0B0NOVA (Zaphod Stock), Steel Warzone (Inception of Instability), Box of Nightmares (Gicquel), Wheely Tag (Minifridge the Second)

Clash Cubes IV: 5th place (Fretless)
BBEANS 6: Rumble Winner & 6th Place (Minifridge 4)

Offline Resetti's Replicas

  • *
  • Posts: 4399
  • Rep: 18
  • Replica King
    • ResettisReplicas
  • Awards BOTM Winner
    • View Profile
    • Awards
  • See profile for gamer tags: Yes
Re: [AI] The right sequence of numbers in "Weapons"?
« Reply #2 on: June 21, 2011, 02:35:20 PM »
Say my weapon is beater bar with razors attached to the ends.  Do I have to include all 3 components' numbers in 'weapons', or will the AI know to assume that if the beater bar is gone that the razors are as well (and therefore switch tactics)?

Offline G.K.

  • *
  • Posts: 12155
  • Rep: 10
  • Striving for a good personal text since 1994.
    • View Profile
    • Awards
Re: [AI] The right sequence of numbers in "Weapons"?
« Reply #3 on: June 21, 2011, 02:36:57 PM »
I'm sure either option would work.
My above post explains everything about everything.

Host of: Wheely Tag, Back To The Beginnings, BTTB 2, BTTB 3, BTTB 4, & BTTB V.

Heavy Metal: Champion (Mockery of the Whole Concept)
Robotic International Wars Series 1: Champion (Minifridge 6)
RA2 Team Championships 1 & 2: Champion (High Speed Train & Upthrust - as part of Naryar's Not Quite Evil Council of Doom)

Runner Up in: The Amazing Rage (Team Fedex), R0B0NOVA (Zaphod Stock), Steel Warzone (Inception of Instability), Box of Nightmares (Gicquel), Wheely Tag (Minifridge the Second)

Clash Cubes IV: 5th place (Fretless)
BBEANS 6: Rumble Winner & 6th Place (Minifridge 4)

Offline JoeBlo

Re: [AI] The right sequence of numbers in "Weapons"?
« Reply #4 on: June 21, 2011, 08:20:51 PM »
or will the AI know to assume that if the beater bar is gone that the razors are as well (and therefore switch tactics)?

The AI doesnt assume anything.. it does what its told, if the component numbers listed in the weapons line are all gone it will change tactics, no matter what they my be..

Thats why if you dont care about the change just put 0, or 1, since 0 is the chassis and 1 is an internal component that cannot be lost

Offline Clickbeetle

  • *
  • Posts: 3374
  • Rep: 21
  • In Soviet Russia, bugs stomp YOU!
  • Awards BOTM Winner
    • View Profile
    • Beetle Bros site
    • Awards
Re: [AI] The right sequence of numbers in "Weapons"?
« Reply #5 on: June 22, 2011, 11:43:54 PM »
or will the AI know to assume that if the beater bar is gone that the razors are as well (and therefore switch tactics)?

The AI doesnt assume anything.. it does what its told, if the component numbers listed in the weapons line are all gone it will change tactics, no matter what they my be..

Thats why if you dont care about the change just put 0, or 1, since 0 is the chassis and 1 is an internal component that cannot be lost


Put simply: Yes.


I often take shortcuts and only put the basal components in 'weapons'.

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 NFX

  • *
  • Posts: 14035
  • Rep: 11
  • SliSliSliSliSliSliSliSli(0)
    • AwesomeFish921
  • Awards BOTM Winner
    • View Profile
    • Awards
  • See profile for gamer tags: Yes
  • Skype: nfxtreme0992
Re: [AI] The right sequence of numbers in "Weapons"?
« Reply #6 on: June 27, 2011, 04:28:03 PM »
I think you can just use the first one. What I do is open up the .bot file and scroll down the list of components, and add whatever position the component is in the list to the Weapons line. Takes a while, but at least I know I'm getting it right.
Co-creator of The RA2 Randomiser