I am releasing what I have done of my AI so far for the purpose of helping fix a problem that I find a bit strange, but hopefully will be easy to fix.

In my .nut file at line 19, if the second parameter of BuildRoads is the variable declared in line 17 (or 15 for that matter) then it will freeze. If that line (19) is commented out then it works as it should, aside from not building roads.

This is:1) Not what you want (If the tile is a road tile and in your closed list it'll still be searched).2) A non-drive through road station is NOT a road tile and NOT buildable, so you'll never reach your goal tile. Because you have no code to check for a maximum route distance, your pathfinder will search the whole map for your goal tile, and that'll take a while .

This is:1) Not what you want (If the tile is a road tile and in your closed list it'll still be searched).2) A non-drive through road station is NOT a road tile and NOT buildable, so you'll never reach your goal tile. Because you have no code to check for a maximum route distance, your pathfinder will search the whole map for your goal tile, and that'll take a while .

As the first lines in your while loop. You'd have spotted easily that the pathfinder found all tiles around the goal station but not the station itself.

Another IsRoadTile on a station casualty I see. That got me as well, how I do it is walk the roads using IsRoadTile, but when I check the adjacent tiles for tiles to add to the open list, just check for IsRoadStationTile.

Or, If you know the tile of the location you are trying to go to or from, just check to see if you are trying to add that tile. No need to care about if a station is on it or not. You know it is since you built one there.

OK thanks for the help guys, problem solved (if you're wondering, I just changed the start and end tiles to the tile outside the bus stop, I know this may not be the ideal solution, but I'm improving it bit by bit )

Stay tuned for a working release soon (hopefully).

(BTW, I do generally debug myself, this one just confused me a bit because that code had been working previously)

OK, there is now a working version of MedievalAI in the first post (for tournament inclusion please ). I'm not expecting it to really challenge to any of the others yet, just want to see where it's at .

It looks like your using your own pathfinder, and I notice there is something in there to detect the current build-on-slopes setting. This is something that I really need to implement, but at the moment I'm using AIRoad.CanBuildConnectedRoadPartsHere(), which is a total cop-out! I couldn't get my own slope detectory thing working very well, so I just switched it off.

If you ment with slope detection, I did something similar to you but not as neat . I check for which direction I'm coming from then what the next slope is. I actually had forgotten about my slopes a bit so this isn't implemented, but after checking for that I'm going to limit the directions it can turn in so as to avoid any problems with foundations and such. In fact you've just inspired me to fix up mine a bit!

Regarding the content server, you may want to stick to the tags the other AI writers agreed on (i.e. singular: "bus", "truck" instead of "buses", "trucks").

It doesn't have a real purpose (afaik) right now, but I can imagine a filter option for that list to display only Items containing those keywords.. in fact I'm just gonna suggest this in the content service thread.

_________________* @Belugas wonders what is worst... a mom or a wife...<Lakie> Well, they do the same thing but the code is different.______________My patchescheck my wiki page (sticky button) for a complete list

In a game with different AIs I just started, MedievalAI built two stations that don't fit together (A truck station near a forest, and a bus station in a town), and only outputs some cryptic messages in the AI Debug window...

edit: after some time it again outputs stuff like in the first screenshot. Unfortunately I didn't see what it wrote before starting to write this "aT:C ..." stuff

_________________* @Belugas wonders what is worst... a mom or a wife...<Lakie> Well, they do the same thing but the code is different.______________My patchescheck my wiki page (sticky button) for a complete list

Who is online

Users browsing this forum: No registered users and 2 guests

You cannot post new topics in this forumYou cannot reply to topics in this forumYou cannot edit your posts in this forumYou cannot delete your posts in this forumYou cannot post attachments in this forum