gametechmods

Robot Arena => General Support => Topic started by: Resetti's Replicas on June 21, 2011, 02:29:37 PM

Title: [AI] The right sequence of numbers in "Weapons"?
Post by: Resetti's Replicas 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.
Title: Re: [AI] The right sequence of numbers in "Weapons"?
Post by: G.K. 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.
Title: Re: [AI] The right sequence of numbers in "Weapons"?
Post by: Resetti's Replicas 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)?
Title: Re: [AI] The right sequence of numbers in "Weapons"?
Post by: G.K. on June 21, 2011, 02:36:57 PM
I'm sure either option would work.
Title: Re: [AI] The right sequence of numbers in "Weapons"?
Post by: JoeBlo 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
Title: Re: [AI] The right sequence of numbers in "Weapons"?
Post by: Clickbeetle 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'.
Title: Re: [AI] The right sequence of numbers in "Weapons"?
Post by: NFX 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.