from the very top of clickbeetle's flipper2.pyQuote# Flipper2.py last updated 7/24/12 by Clickbeetle# Update 7/24/12: Renamed this file to Flipper2.py so Flipper.py is not overwritten. Added customizable srimech firing interval.# This AI will act normally as long as the opponent is moving. If the opponent stops moving, this AI will also stop and wait for the opponent to be counted out. If the opponent starts moving again, so will this AI. In a rumble, this AI will ignore any bots that aren't moving and will only stop if all opponents stop.# Has support for two smart zone-based weapons and one analog-controlled spinner. Name the smart zones "flip" and "weapon" and the controls "Flip", "Fire", and "Spin". "Srimech" control for self-righting. Note you must put 'UseSrimech':1 in Bindings.py to self-right with the Srimech control; otherwise it will use Flip.# CUSTOMIZABLE SETTINGS:# 'EnemyMoveRadius' sets how far the enemy must move in order to be considered mobile. Default is 1.# 'EnemyMoveTime' sets how long (in seconds) the enemy has to move the required distance before being considered immobile. Default is 3.# 'PrioritizeFlipper' if set to 1, the AI won't fire the other weapon until the flipper fires. Useful for bots that use the flipper to get under opponents. When all of self.weapons are lost, the flipper will stop firing and the other weapon will fire even when the flipper doesn't. The flipper component id's should therefore be set in self.weapons and no other id's for this to work. Default is 0.# 'NoChassisTime' sets how long (in half-seconds) the AI will wait to find the chassis before giving up and firing, when there are components in the smart zone. ONLY WORKS FOR SECONDARY WEAPON, NOT FLIPPER so wire the bot and name the controls like you are using Omni or Popup.py if you use this. Default is 1.# 'SrimechInterval' sets how often the AI fires the srimech when attempting to self-right. Srimech will fire once every X seconds. Default is 1.it tries to be smart by not flipping things that are immobilizedthe stock flipper.py is mostly the same thing except without the extra controls to fire, spin, and srimech. I'm not sure how well it works though and at the end of the day I don't think the ai is that important.
# Flipper2.py last updated 7/24/12 by Clickbeetle# Update 7/24/12: Renamed this file to Flipper2.py so Flipper.py is not overwritten. Added customizable srimech firing interval.# This AI will act normally as long as the opponent is moving. If the opponent stops moving, this AI will also stop and wait for the opponent to be counted out. If the opponent starts moving again, so will this AI. In a rumble, this AI will ignore any bots that aren't moving and will only stop if all opponents stop.# Has support for two smart zone-based weapons and one analog-controlled spinner. Name the smart zones "flip" and "weapon" and the controls "Flip", "Fire", and "Spin". "Srimech" control for self-righting. Note you must put 'UseSrimech':1 in Bindings.py to self-right with the Srimech control; otherwise it will use Flip.# CUSTOMIZABLE SETTINGS:# 'EnemyMoveRadius' sets how far the enemy must move in order to be considered mobile. Default is 1.# 'EnemyMoveTime' sets how long (in seconds) the enemy has to move the required distance before being considered immobile. Default is 3.# 'PrioritizeFlipper' if set to 1, the AI won't fire the other weapon until the flipper fires. Useful for bots that use the flipper to get under opponents. When all of self.weapons are lost, the flipper will stop firing and the other weapon will fire even when the flipper doesn't. The flipper component id's should therefore be set in self.weapons and no other id's for this to work. Default is 0.# 'NoChassisTime' sets how long (in half-seconds) the AI will wait to find the chassis before giving up and firing, when there are components in the smart zone. ONLY WORKS FOR SECONDARY WEAPON, NOT FLIPPER so wire the bot and name the controls like you are using Omni or Popup.py if you use this. Default is 1.# 'SrimechInterval' sets how often the AI fires the srimech when attempting to self-right. Srimech will fire once every X seconds. Default is 1.
Quote from: UberPyro on April 29, 2019, 04:01:57 PMfrom the very top of clickbeetle's flipper2.pyQuote# Flipper2.py last updated 7/24/12 by Clickbeetle# Update 7/24/12: Renamed this file to Flipper2.py so Flipper.py is not overwritten. Added customizable srimech firing interval.# This AI will act normally as long as the opponent is moving. If the opponent stops moving, this AI will also stop and wait for the opponent to be counted out. If the opponent starts moving again, so will this AI. In a rumble, this AI will ignore any bots that aren't moving and will only stop if all opponents stop.# Has support for two smart zone-based weapons and one analog-controlled spinner. Name the smart zones "flip" and "weapon" and the controls "Flip", "Fire", and "Spin". "Srimech" control for self-righting. Note you must put 'UseSrimech':1 in Bindings.py to self-right with the Srimech control; otherwise it will use Flip.# CUSTOMIZABLE SETTINGS:# 'EnemyMoveRadius' sets how far the enemy must move in order to be considered mobile. Default is 1.# 'EnemyMoveTime' sets how long (in seconds) the enemy has to move the required distance before being considered immobile. Default is 3.# 'PrioritizeFlipper' if set to 1, the AI won't fire the other weapon until the flipper fires. Useful for bots that use the flipper to get under opponents. When all of self.weapons are lost, the flipper will stop firing and the other weapon will fire even when the flipper doesn't. The flipper component id's should therefore be set in self.weapons and no other id's for this to work. Default is 0.# 'NoChassisTime' sets how long (in half-seconds) the AI will wait to find the chassis before giving up and firing, when there are components in the smart zone. ONLY WORKS FOR SECONDARY WEAPON, NOT FLIPPER so wire the bot and name the controls like you are using Omni or Popup.py if you use this. Default is 1.# 'SrimechInterval' sets how often the AI fires the srimech when attempting to self-right. Srimech will fire once every X seconds. Default is 1.it tries to be smart by not flipping things that are immobilizedthe stock flipper.py is mostly the same thing except without the extra controls to fire, spin, and srimech. I'm not sure how well it works though and at the end of the day I don't think the ai is that important.Good point. I guess the omni is better for the most part, but when it comes to fighting a non-invertible bot, then flipper is better.
How do you make your own PY file? I was looking into making one for my Wandering Spinner bot type...