gametechmods
Robot Arena => General Support => Topic started by: Merrick on August 29, 2013, 08:24:27 AM
-
Ok, basically I started AI'ing last night, it all went fine, got my first robot (a 'chopper') into the game and it ran smoothly.
But then I tried again with a second robot (a 'flipper') and now the game crashes every time I boot it up. :confused:
Is there any routine stuff I need to check that I might have missed out?
-
Perhaps the binding? Always make sure the robot is In the right team with the right bindings, if its not that, perhaps it's the robot's name. Make sure that it is correct, space for space.
-
It's in the right team and the binding is put in the right place in the .py file, next to the first robot in the team.
Having checked back, I realise I didn't make it a flipper, but instead a poker. Basically, I copied Chaos 2's bindings for my own, as it's basically the same kind of design.
Would that make a difference? I mean, I copied Dominator 2's bindings for the hammerbot and that didn't make a difference. I'm really confused as to what I've done wrong.
-
It does not matter where the binding line.
Can you post the binding line? It's hard to help without seeing it first.
-
Make sure that the robot name in the binding matches EXACTLY to the one in the .bot file.
This option might sound stupid but it has resolved quite a few of my AI'ing problems. what you could try is putting your cursor at the end of the bindings like this:
(https://gametechmods.com/uploads/images/28637Bindingspic.png)
then save it and try booting up the game.
Hope this helps
Impossible
-
Can you post the binding line? It's hard to help without seeing it first.
Of course.
(http://i1214.photobucket.com/albums/cc496/TwonkySigs/SurplusBinding_zpsef6b5fb9.png) (http://s1214.photobucket.com/user/TwonkySigs/media/SurplusBinding_zpsef6b5fb9.png.html)
I now know for a fact it's the binding line because if I delete it, the game runs fine. I just can't see a mistake in there.
-
I see no problem in the bindings, unless your bot has less than 8 components on it? There might be too many binding lines in the file, like one team has seven bindings instead of six or something. I don't see why else deleting that line fixes the problem. It could also be a problem with Omni.py itself, but that's unlikely if there are other bots in the bindings that use Omni. One last suggestion would be to double-check the bot itself, making sure it doesn't have any components that your copy of the game doesn't and that the controls/smartzones are all there and wired correctly.
-
There might be too many binding lines in the file, like one team has seven bindings instead of six or something.
Like I said earlier, RA2 does not care where they are. Just open up the Stock AI bindings, there are no teams or anything in them and all the binding lines are in alphabetical order.
Anyways, make sure there is 4 spaces infront of the binding lines as sometimes it gets messed up when to copy paste.
-
Maybe the bot's name has a space at the end? That's happened to me before. The only thing I can think of is that you did some sort of imporper line break, which sometimes happens. Do you see a red minus sign like this on the left side? http://postimg.org/image/njd18q3cl/68ad06ac/ (http://postimg.org/image/njd18q3cl/68ad06ac/)
I'd just delete the broken binding ans start fresh; keep the text stored somewhere so you can put the important parts back in. Also, use Postimage, not Photobucket.
-
Cheers for the responses, guys. I'm out at the moment but when I get home I'll test out some of the ideas and see if anything works.
One thing though, on the subject Fracture bought up, what does the 8 after 'weapon' actually mean? I copy/pasted it from another binding and don't actually know. Could go a log way to helping my understanding of what's gone wrong.
-
One problem with one of my python scripts was that some of the tabs had magically been converted into spaces. I never use spaces to indent so it must have been Notepad ++. Check all the indenations, they must all be spaces or all tabs. If you copy/paste into Python IDLE, you can un-tabify or tabify all the indentations automatically, which is much quicker than checking.
-
the numbers after 'weapon' are the ids of components on the bot that it uses for weapons. if they all break off, the bot's ai switches to pusher.py iirc. you have to download apanx's bot exporter to find the component ids.
-
Cheers for the responses, guys. I'm out at the moment but when I get home I'll test out some of the ideas and see if anything works.
One thing though, on the subject Fracture bought up, what does the 8 after 'weapon' actually mean? I copy/pasted it from another binding and don't actually know. Could go a log way to helping my understanding of what's gone wrong.
That bracket ideally contains the list of component IDs corresponding to the weapons on the bot. IDs are assigned in the order that components are attached, starting with 1, as the chassis is always component 0. In your binding line, the 8th component that was attached on the bot should be its only weapon if the AI is correct. When any bot loses all the components listed after 'weapons':, I think it automatically switches to a pusher AI or something like that.
I was thinking that your game might crash because the bindings say that component #8 is a weapon, but there is nothing to match it up with if the bot only has 7 or less components.
Edit: Hi VB
-
@Fracture Could be 8 or less, the game probably indexes from 0.
-
Maybe the bot's name has a space at the end? That's happened to me before. The only thing I can think of is that you did some sort of imporper line break, which sometimes happens. Do you see a red minus sign like this on the left side? http://postimg.org/image/njd18q3cl/68ad06ac/ (http://postimg.org/image/njd18q3cl/68ad06ac/)
Sorted. That's what the problem was.
Cheers, everyone.
<3 u resetti xoxoxox