maybe try the .bot files and see if any are misspelled. and the picture wouldn't crash the game, the place where the pic would be would be white if it's misspelled.
I can sent you to bot if you want to take a look at it.
import plusimport AIfrom AI import vector3import Arenasimport Gooeyimport mathimport Tacticsclass Tractor(AI.SuperAI): "Spins in plow style" # - Works just like Spinner.py but with plow incoroporated into it. # - Correct weapon ID numbers will help. # - No extra stuff needed in the bindings. name = "Tractor" def __init__(self, **args): AI.SuperAI.__init__(self, **args) self.spin_range = 3.0 if 'range' in args: self.spin_range = args.get('range') self.tactics.append(Tactics.Engage(self)) def Activate(self, active): if active: if AI.SuperAI.debugging: self.debug = Gooey.Plain("watch", 0, 75, 100, 75) tbox = self.debug.addText("line0", 0, 0, 100, 15) tbox.setText("Throttle") tbox = self.debug.addText("line1", 0, 15, 100, 15) tbox.setText("Turning") tbox = self.debug.addText("line2", 0, 30, 100, 15) tbox.setText("") tbox = self.debug.addText("line3", 0, 45, 100, 15) tbox.setText("") return AI.SuperAI.Activate(self, active) def Tick(self): if self.weapons: # spin up depending on enemy's range enemy, range = self.GetNearestEnemy() if enemy is not None and range < self.spin_range: self.Input("Spin", 0, 1) elif self.GetInputStatus("Spin", 0) != 0: self.Input("Spin", 0, 0) return AI.SuperAI.Tick(self) def RobotInRange(self, robot_id): "Return tuple of (part-of-robot-in-range, chassis-in-range)" # GetLastDamage returns: component damaged, amount, at time, by player, by component range = self.GetDistanceToID(robot_id) if range < self.spin_range: damage = self.GetLastDamageReceived() if damage[3] == robot_id and (plus.getTimeElapsed() - damage[2] < 1.0): return (True, True) return (False, False) def LostComponent(self, id): #print "Lost Component!" return AI.SuperAI.LostComponent(self, id) def LostComponent(self, id): # if we lose all our weapons, stop using the Engage tactic and switch to Shove if id in self.weapons: self.weapons.remove(id) if not self.weapons: tactic = [x for x in self.tactics if x.name == "Engage"] if len(tactic) > 0: self.tactics.remove(tactic[0]) self.tactics.append(Tactics.Shove(self)) self.tactics.append(Tactics.Charge(self)) return AI.SuperAI.LostComponent(self, id) def DebugString(self, id, string): if self.debug: if id == 0: self.debug.get("line0").setText(string) elif id == 1: self.debug.get("line1").setText(string) elif id == 2: self.debug.get("line2").setText(string) elif id == 3: self.debug.get("line3").setText(string) def Disable(self,btarget): # Disables opponent by charging it at an angle # we use a different angle (depending on the size of the opponent!) # if target is equal in size, the plow weapon charges are more direct if btarget > self: self.Turn(79) else: self.Turn(-79) if btarget < self: self.Turn(35) else: self.Turn(-35) if btarget == self: self.Turn(90) else: self.Turn(-90) if self.target: self.Turn(360) return AI.SuperAI.Disable(self, btarget) AI.register(Tractor)
# 42 - Dark Factory of Mass Production "We don't have a motto yet" list.append(("Revelation","Kheper",{'nose':math.pi*2,'invertible':True,'radius':1,'topspeed':99,'throttle':100,'turn':100,'turnspeed':2,'ServoID':7,'NoChassisTime':4,'weapons':(32,33,34,35,36,37)})) list.append(("Blind Destruction","Kheper",{'nose':math.pi*2,'invertible':True,'radius':1,'topspeed':99,'throttle':100,'turn':100,'turnspeed':2,'ServoID':7,'NoChassisTime':4,'weapons':(32,33,34,35,36,37)})) list.append(("Abyssal Designator","Kheper",{'nose':math.pi*2,'invertible':True,'radius':1,'topspeed':99,'throttle':100,'turn':100,'turnspeed':2,'ServoID':7,'NoChassisTime':4,'weapons':(32,33,34,35,36,37)})) list.append(("AW-The Prodigy","Omni",{'nose':math.pi*2,'invertible':True,'radius':0.1,'topspeed':100,'throttle':130,'turn':60,'turnspeed':2.5,'weapons':(12,13)})) list.append(("BW-Byter","Omni",{'nose':math.pi*2,'invertible':True,'radius':0.1,'topspeed':100,'throttle':130,'turn':60,'turnspeed':2.5,'weapons':(12,13)})) list.append(("Evil Intent","FBS_1",{'PreSpinEntrance':5,'SpinDirection':1,'ReMobilizeRoutineTime':20,'nose':math.pi*2,'radius':0.3,'range':99,'topspeed':100,'throttle':130,'turn':90,'turnspeed':4,'weapons':(22,23,24)}))
You got my vote for RA2 Wizard. Always and forever.
import plusimport AIfrom AI import vector3import Arenasimport Gooeyimport mathimport Tacticsclass Tractorright(AI.SuperAI): "Spins in plow style with srimech" # - Works just like Spinner.py but with plow and srimech incoroporated into it. # - Correct weapon ID numbers will help. # - No extra stuff needed in the bindings. name = "Tractorright" def __init__(self, **args): AI.SuperAI.__init__(self, **args) self.spin_range = 3.0 self.trigger2 = ["Srimech"] if 'range' in args: self.spin_range = args.get('range') self.tactics.append(Tactics.Engage(self)) def Activate(self, active): if active: if AI.SuperAI.debugging: self.debug = Gooey.Plain("watch", 0, 75, 100, 75) tbox = self.debug.addText("line0", 0, 0, 100, 15) tbox.setText("Throttle") tbox = self.debug.addText("line1", 0, 15, 100, 15) tbox.setText("Turning") tbox = self.debug.addText("line2", 0, 30, 100, 15) tbox.setText("") tbox = self.debug.addText("line3", 0, 45, 100, 15) tbox.setText("") return AI.SuperAI.Activate(self, active) def Tick(self): if self.weapons: # spin up depending on enemy's range enemy, range = self.GetNearestEnemy() if enemy is not None and range < self.spin_range: self.Input("Spin", 0, 1) elif self.GetInputStatus("Spin", 0) != 0: self.Input("Spin", 0, 0) return AI.SuperAI.Tick(self) def RobotInRange(self, robot_id): "Return tuple of (part-of-robot-in-range, chassis-in-range)" # GetLastDamage returns: component damaged, amount, at time, by player, by component range = self.GetDistanceToID(robot_id) if range < self.spin_range: damage = self.GetLastDamageReceived() if damage[3] == robot_id and (plus.getTimeElapsed() - damage[2] < 1.0): return (True, True) return (False, False) def InvertHandler(self): # fire all weapons once per second (until we're upright!) while 1: for trigger in self.trigger2: self.Input(trigger, 0, 1) for i in range(0, 8): yield 0 def LostComponent(self, id): #print "Lost Component!" return AI.SuperAI.LostComponent(self, id) def LostComponent(self, id): # if we lose all our weapons, stop using the Engage tactic and switch to Shove if id in self.weapons: self.weapons.remove(id) if not self.weapons: tactic = [x for x in self.tactics if x.name == "Engage"] if len(tactic) > 0: self.tactics.remove(tactic[0]) self.tactics.append(Tactics.Shove(self)) self.tactics.append(Tactics.Charge(self)) return AI.SuperAI.LostComponent(self, id) def DebugString(self, id, string): if self.debug: if id == 0: self.debug.get("line0").setText(string) elif id == 1: self.debug.get("line1").setText(string) elif id == 2: self.debug.get("line2").setText(string) elif id == 3: self.debug.get("line3").setText(string) def Disable(self,btarget): # Disables opponent by charging it at an angle # we use a different angle (depending on the size of the opponent!) # if target is equal in size, the plow weapon charges are more direct if btarget > self: self.Turn(79) else: self.Turn(-79) if btarget < self: self.Turn(35) else: self.Turn(-35) if btarget == self: self.Turn(90) else: self.Turn(-90) if self.target: self.Turn(360) return AI.SuperAI.Disable(self, btarget) AI.register(Tractorright)
def InvertHandler(self): # fire all weapons once per second (until we're upright!) while 1: for trigger in self.trigger2: self.Input(trigger, 0, 1) for i in range(0, 8): yield 0
Lets play a game...Spot the error in the AI lines!Code: [Select] # 42 - Dark Factory of Mass Production "We don't have a motto yet" list.append(("Revelation","Kheper",{'nose':math.pi*2,'invertible':True,'radius':1,'topspeed':99,'throttle':100,'turn':100,'turnspeed':2,'ServoID':7,'NoChassisTime':4,'weapons':(32,33,34,35,36,37)})) list.append(("Blind Destruction","Kheper",{'nose':math.pi*2,'invertible':True,'radius':1,'topspeed':99,'throttle':100,'turn':100,'turnspeed':2,'ServoID':7,'NoChassisTime':4,'weapons':(32,33,34,35,36,37)})) list.append(("Abyssal Designator","Kheper",{'nose':math.pi*2,'invertible':True,'radius':1,'topspeed':99,'throttle':100,'turn':100,'turnspeed':2,'ServoID':7,'NoChassisTime':4,'weapons':(32,33,34,35,36,37)})) list.append(("AW-The Prodigy","Omni",{'nose':math.pi*2,'invertible':True,'radius':0.1,'topspeed':100,'throttle':130,'turn':60,'turnspeed':2.5,'weapons':(12,13)})) list.append(("BW-Byter","Omni",{'nose':math.pi*2,'invertible':True,'radius':0.1,'topspeed':100,'throttle':130,'turn':60,'turnspeed':2.5,'weapons':(12,13)})) list.append(("Evil Intent","FBS_1",{'PreSpinEntrance':5,'SpinDirection':1,'ReMobilizeRoutineTime':20,'nose':math.pi*2,'radius':0.3,'range':99,'topspeed':100,'throttle':130,'turn':90,'turnspeed':4,'weapons':(22,23,24)}))I can't find it and it might not be something wrong with the AI. It doesn't crash like it usually does when there is an AI mistake. It stops loading when the screen gets to 3/4 of the bar on the loading screen of NAR AI. I can't even get out of it either, I have to restart my computer.
I was trying to make tractor compatable with a srimech, but there's something wrong, and I can't see it.Code: [Select]import plusimport AIfrom AI import vector3import Arenasimport Gooeyimport mathimport Tacticsclass Tractorright(AI.SuperAI): "Spins in plow style with srimech" # - Works just like Spinner.py but with plow and srimech incoroporated into it. # - Correct weapon ID numbers will help. # - No extra stuff needed in the bindings. name = "Tractorright" def __init__(self, **args): AI.SuperAI.__init__(self, **args) self.spin_range = 3.0 self.trigger2 = ["Srimech"] #There's your problem right there; this line needs to be indented once more. if 'range' in args: self.spin_range = args.get('range') self.tactics.append(Tactics.Engage(self)) def Activate(self, active): if active: if AI.SuperAI.debugging: self.debug = Gooey.Plain("watch", 0, 75, 100, 75) tbox = self.debug.addText("line0", 0, 0, 100, 15) tbox.setText("Throttle") tbox = self.debug.addText("line1", 0, 15, 100, 15) tbox.setText("Turning") tbox = self.debug.addText("line2", 0, 30, 100, 15) tbox.setText("") tbox = self.debug.addText("line3", 0, 45, 100, 15) tbox.setText("") return AI.SuperAI.Activate(self, active) def Tick(self): if self.weapons: # spin up depending on enemy's range enemy, range = self.GetNearestEnemy() if enemy is not None and range < self.spin_range: self.Input("Spin", 0, 1) elif self.GetInputStatus("Spin", 0) != 0: self.Input("Spin", 0, 0) return AI.SuperAI.Tick(self) def RobotInRange(self, robot_id): "Return tuple of (part-of-robot-in-range, chassis-in-range)" # GetLastDamage returns: component damaged, amount, at time, by player, by component range = self.GetDistanceToID(robot_id) if range < self.spin_range: damage = self.GetLastDamageReceived() if damage[3] == robot_id and (plus.getTimeElapsed() - damage[2] < 1.0): return (True, True) return (False, False) def InvertHandler(self): # fire all weapons once per second (until we're upright!) while 1: for trigger in self.trigger2: self.Input(trigger, 0, 1) for i in range(0, 8): yield 0 def LostComponent(self, id): #print "Lost Component!" return AI.SuperAI.LostComponent(self, id) def LostComponent(self, id): # if we lose all our weapons, stop using the Engage tactic and switch to Shove if id in self.weapons: self.weapons.remove(id) if not self.weapons: tactic = [x for x in self.tactics if x.name == "Engage"] if len(tactic) > 0: self.tactics.remove(tactic[0]) self.tactics.append(Tactics.Shove(self)) self.tactics.append(Tactics.Charge(self)) return AI.SuperAI.LostComponent(self, id) def DebugString(self, id, string): if self.debug: if id == 0: self.debug.get("line0").setText(string) elif id == 1: self.debug.get("line1").setText(string) elif id == 2: self.debug.get("line2").setText(string) elif id == 3: self.debug.get("line3").setText(string) def Disable(self,btarget): # Disables opponent by charging it at an angle # we use a different angle (depending on the size of the opponent!) # if target is equal in size, the plow weapon charges are more direct if btarget > self: self.Turn(79) else: self.Turn(-79) if btarget < self: self.Turn(35) else: self.Turn(-35) if btarget == self: self.Turn(90) else: self.Turn(-90) if self.target: self.Turn(360) return AI.SuperAI.Disable(self, btarget) AI.register(Tractorright)I think the proble is with the line defining the trigger or this bitQuote def InvertHandler(self): # fire all weapons once per second (until we're upright!) while 1: for trigger in self.trigger2: self.Input(trigger, 0, 1) for i in range(0, 8): yield 0 Edit: I've given up for the time being as it isn't working.
import plusimport AIfrom AI import vector3import Arenasimport Gooeyimport mathimport Tacticsclass Tractorright(AI.SuperAI): "Spins in plow style with srimech" # - Works just like Spinner.py but with plow and srimech incoroporated into it. # - Correct weapon ID numbers will help. # - No extra stuff needed in the bindings. name = "Tractorright" def __init__(self, **args): AI.SuperAI.__init__(self, **args) self.spin_range = 3.0 self.trigger2 = ["Srimech"] #There's your problem right there; this line needs to be indented once more. if 'range' in args: self.spin_range = args.get('range') self.tactics.append(Tactics.Engage(self)) def Activate(self, active): if active: if AI.SuperAI.debugging: self.debug = Gooey.Plain("watch", 0, 75, 100, 75) tbox = self.debug.addText("line0", 0, 0, 100, 15) tbox.setText("Throttle") tbox = self.debug.addText("line1", 0, 15, 100, 15) tbox.setText("Turning") tbox = self.debug.addText("line2", 0, 30, 100, 15) tbox.setText("") tbox = self.debug.addText("line3", 0, 45, 100, 15) tbox.setText("") return AI.SuperAI.Activate(self, active) def Tick(self): if self.weapons: # spin up depending on enemy's range enemy, range = self.GetNearestEnemy() if enemy is not None and range < self.spin_range: self.Input("Spin", 0, 1) elif self.GetInputStatus("Spin", 0) != 0: self.Input("Spin", 0, 0) return AI.SuperAI.Tick(self) def RobotInRange(self, robot_id): "Return tuple of (part-of-robot-in-range, chassis-in-range)" # GetLastDamage returns: component damaged, amount, at time, by player, by component range = self.GetDistanceToID(robot_id) if range < self.spin_range: damage = self.GetLastDamageReceived() if damage[3] == robot_id and (plus.getTimeElapsed() - damage[2] < 1.0): return (True, True) return (False, False) def InvertHandler(self): # fire all weapons once per second (until we're upright!) while 1: for trigger in self.trigger2: self.Input(trigger, 0, 1) for i in range(0, 8): yield 0 def LostComponent(self, id): #print "Lost Component!" return AI.SuperAI.LostComponent(self, id) def LostComponent(self, id): # if we lose all our weapons, stop using the Engage tactic and switch to Shove if id in self.weapons: self.weapons.remove(id) if not self.weapons: tactic = [x for x in self.tactics if x.name == "Engage"] if len(tactic) > 0: self.tactics.remove(tactic[0]) self.tactics.append(Tactics.Shove(self)) self.tactics.append(Tactics.Charge(self)) return AI.SuperAI.LostComponent(self, id) def DebugString(self, id, string): if self.debug: if id == 0: self.debug.get("line0").setText(string) elif id == 1: self.debug.get("line1").setText(string) elif id == 2: self.debug.get("line2").setText(string) elif id == 3: self.debug.get("line3").setText(string) def Disable(self,btarget): # Disables opponent by charging it at an angle # we use a different angle (depending on the size of the opponent!) # if target is equal in size, the plow weapon charges are more direct if btarget > self: self.Turn(79) else: self.Turn(-79) if btarget < self: self.Turn(35) else: self.Turn(-35) if btarget == self: self.Turn(90) else: self.Turn(-90) if self.target: self.Turn(360) return AI.SuperAI.Disable(self, btarget) AI.register(Tractorright)