anyone know of a .py that works like fbs_2, but reverses direction while inverted and isn't a meltybrain .py?
Quote from: Geice on August 09, 2016, 12:29:48 PManyone know of a .py that works like fbs_2, but reverses direction while inverted and isn't a meltybrain .py?Something like this https://gametechmods.com/forums/index.php?action=downloads;sa=view;down=265
DSL-IRL is the libtard’s meta. Go drink more soylent, retard! #BLUELIVESMATTER
Tried messing around with turn and turnspeed(which made it worse), turn didn't seem to help but what's odd is that if my bot starts in the player 1 spawn of the combat arena it drives in a straight line, player2's start point however does that shuffling.Also what about the moving backwards straight/always face the AI and best place to get the most updated AI files?
also lol at most toxic guy around calling others out on this sh**
Not sure how many Python coders we still have active in the community. I do RA2 python for fun, and rewriting the entire drive logic to do something else than turning towards target and driving forward is going to time to do, mostly testing to make sure that everything works as intended. I have a rough idea of what commands in the available python commands would be useful, but there are a lot of questions remaining. For example, when should the bot move forward or backwards? Through what data would it decide that? The most basic code would just be aiming for enemy and setting Forward to 100. The bot would always try facing the enemy and attempt to move forward. Take a look at the existing python files and try to do something like that. I am currently too busy to spend time on RA2, might maybe look at it during the end of next week. Hope you understand.The closest thing to a master AI pack is the AI_essentials on Beetlebros' site.
I didn't know this, take all the time you need as that's way more important than any of this AI stuff. I only wanted for this to not go under in all the posts here like it somewhat already did.While having a new drive logic that instantly targets the enemy would be interesting(and definitely something I'd like to do later) I'd want to simply fix the "stuck" part so that the robot doesn't stop driving backwards, facing sideways.Would you be ok if I sent you a video, showing what goes wrong, in PM?I'll try to mess around with it for a bit, the Unstuck Tactic is inherited from Tactics.py? I've noticed that Eternal Flame(which is apparently based on Omni.py) doesn't have a Stuck Handler.I checked AI_essentials, that doesn't really have that many, so I guess all those AI files were done on a version of another AI file, guess that means it's best to copy over something that works and ask if it doesn't work/if you can't find something?I hope that this community can get this AI file chaos a bit more sorted/get more into python files because it seems like most only copy something that works from a similar bot and are then done with it. Thanks for doing all this for the community.
phil's semi-famous AI chart that comes with a bunch of .py filesAll the .py files that come with Nar AI 2.7, IIRC some of them don't work.
Check the AI files that come with the game. All AI inherit the SuperAI which is located in __init__.py in the AI folder. If you don't put in separate handlers, then the code in the SuperAI will be used.Also check out the Tactics.py.
Quote from: 090901 on August 16, 2016, 05:44:11 PMphil's semi-famous AI chart that comes with a bunch of .py filesAll the .py files that come with Nar AI 2.7, IIRC some of them don't work.What's the difference between 8459AI-Chart-2.3.rar and 43968459AI-Chart-23.rar? I checked your link and like the one I have it's still mentioning popup.py and missing it(like I said about a page ago), size of the rar also seems to be the same. I'm not annoyed, I just find it funny, was someone like "I'm tired of all those popups, there, file deleted, have fun" one of the most used designs isn't there. Will check Nar AI 2.7.
self.RemoveTactic("Unstuck")self.tactics.append(Tactics.Unstuck2(self, self.StuckHandler()))
self.RemoveTactic("Unstuck")self.tactics.append(Unstuck2(self, self.StuckHandler()))
class Unstuck2(AI.Tactic): name = "Unstuck2" def __init__(self, ai, unstuck_function): self.UnstuckFunction = unstuck_function AI.Tactic.__init__(self, ai) def Evaluate(self): # try to move if we're immobile and we either have no enemy # or he was pinned after us self.priority = 200 ai = self.ai # move to free ourselves unless our most recent enemy was stuck first if not ai.bImmobile: self.priority = -1000 elif ai.GetID() in ai.immobile_list and \ ai.enemy_id in ai.immobile_list and \ ai.immobile_list[ai.GetID()] > ai.immobile_list[ai.enemy_id]: self.priority = -1000 def Execute(self): self.ai.Throttle(0) self.ai.Turn(0) self.UnstuckFunction.next() return True
class Flee(AI.Tactic): name = "Flee" def Evaluate(self): self.priority = 0 self.target_id, range = self.ai.GetNearestEnemy() # TODO: come up with a priority scale for "engaging" if self.target_id != None: self.priority = 170 else: self.priority -= 1000 def Execute(self): if self.target_id != None: self.ai.enemy_id = self.target_id # default turning & throttle off self.ai.Throttle(0) self.ai.Turn(0) target = plus.getLocation(self.target_id) # try to get out of range of chassis... if self.ai.GetDistanceToID(self.target_id) < 40 and self.ai.GetDistanceToID(self.target_id) > 10: # ... then aim for center of chassis h = self.ai.GetHeadingTo(target, False) self.ai.AimToHeading(h) self.ai.Throttle(-100) if self.ai.GetDistanceToID(self.target_id) < 10: h = self.ai.GetHeadingTo(target, False) self.ai.AimToHeading(h + math.pi / 2) self.ai.Throttle(-100) return True else: return False
list.append(("Drunken Robot Pornography","LittleMetalFriend",{'nose':math.pi,'radius':0.5,'range':99,'topspeed':100,'throttle':130,'turn':60,'turnspeed':2.5,'weapons':(0,)}))
(Image removed from quote.)Code: [Select] list.append(("Drunken Robot Pornography","LittleMetalFriend",{'nose':math.pi,'radius':0.5,'range':99,'topspeed':100,'throttle':130,'turn':60,'turnspeed':2.5,'weapons':(0,)}))https://gametechmods.com/uploads/files/5864Bot5.rarSaw on a servo, dunno how to get the arm working right, needs to self-right, riddled with AGOD.Anyone know how to help? Please and thank you.