hmmm, I still get the same error with r13474. Pressing the "reload AI" button still crashes the gameTrueLight wrote: Nightlies run every night at 1800 CEST ... and the commits are made after thatSo check back in ... 10 minutes
![]()

Moderator: OpenTTD Developers
hmmm, I still get the same error with r13474. Pressing the "reload AI" button still crashes the gameTrueLight wrote: Nightlies run every night at 1800 CEST ... and the commits are made after thatSo check back in ... 10 minutes
![]()
Can you post your ai? That'll help debugging the problem.wilco_moerman wrote:hmmm, I still get the same error with r13474. Pressing the "reload AI" button still crashes the gameTrueLight wrote: Nightlies run every night at 1800 CEST ... and the commits are made after thatSo check back in ... 10 minutes
![]()
I'm in the TJIP competition, so that is a problem. But I can recreate the problem without giving away any juicy bitsYexo wrote: Can you post your ai? That'll help debugging the problem.
windows 2000Are you using windows/linux?
I only get a screen saying "Runtime Error!" and "abnormal program termination"glx wrote:And we need the exact message if there's any.
kuifware wrote:(..)
Bug report: I noticed that in the latest SVN revision (r13197-noai) you can crash OpenTTD by starting an AI, issuing the restart command in the in-game console and starting an AI again:
---------------------------
Microsoft Visual C++ Runtime Library
---------------------------
Assertion failed!
Program: C:\Games\OpenTTDNoAI\openttd.exe
File: /compile_farm/openttd/noai/compile.../ai_threads.cpp
Line: 370
Expression: thr == NULL
For information on how your program can cause an assertion
failure, see the Visual C++ documentation on asserts
(Press Retry to debug the application - JIT must be enabled)
---------------------------
Abort Retry Ignore
---------------------------
As far as I can tell from the screenshot both the tile you want to build the stop on and the road are flat, and both the same height, so slopes shouldn't be an issue.reylas wrote:I am having slope problems and was wondering if anyone would look at what I have and see if they can explain it. I was trying to build a bus station and connecting road but was not getting the bus station oriented in the correct direction. Basically, I look for a build-able tile next to a road tile then level it if need be then build a station. This tile happens to have two neighbor road tiles, but cannot build a road. If you look at the screenshot at the tile with a sign with a minus after it, that is the tile I am trying to build on. The first number of the sign represents a slope, while the second represents the height.
So I figured, no problem, just check the slope and height to check for a road on my level. But when I tried, I never could get it to work. So I wrote a little function to build signs to help me out. What I found was that the slopes and heights do not really match what the graphics were showing.
For instance. To the SE of the - tile, it shows a slope of 2, height of 5. So it thinks the height is the same as my station (-) tile. But the tile to the south of my tile shows a slope of 4 and a height of 5 as well. But the foundation clearly shows it sloping to the west. But the next tile shows a slope of 0 and a height of 5. So two tiles with a slope of 2 and 4 slope to a tile that is level with a height the same as it is. If you look at the two houses to the SW of my tile (-), they show slopes, but non matching heights. Plus the road to the south of my tile clearly shows a graphic for a sloping road. But the road ends up with the same height on both ends of the slope, but the tile to the SW of my (-) tile shows the same height, but is sloped?
Does that make any sense? Or am I looking at it wrong. I am trying to figure out how to not build if the road tile cannot be connected to, but with the slopes not matching and the heights the same, I cannot figure it out.
Sorry to be so winded.
MarkS
Ok, that helps A LOT, that is good information to know. But, it still does not make sense. Another example. If you look at the tile directly below the tile I want to build, it has a sign of 4,5. Meaning Slope_E, height of 5. But the tile to the SW of that, (turn in the road) has a slope of 0 meaning flat, but a height of 5. The wiki states that Slope_E would mean that the east point of the tile would be the highest spot on that tile. But it is the *same* height as the one with the turn in the road. So in order for the road to have been built, should the tile not have a slope of 12? 12 would mean N and E which would match the road incline.Roujin wrote:Don't know if that helps you, but afaik the height is the height of the northern corner of the tile.
So to get proper information of a tile "A", i'd get the tileheight of A, A+(0,1), A+(1,0) and A+(1,1).
Try your Building operation then check for an error with AILog.Info(AIError.GetLastErrorString())reylas wrote:[
I understand what you are saying, I just can't see how my situation matches it. Either the height of the two tiles or the slope of the road tile does not jive. Talking about only two tiles there, (0,5 -) and the (2,5) to the southeast of it, They both have the same height, and their shared border is level (only slope is a two which is south on the road tile).Zutty wrote:As Roujin pointed out, the height of a tile is measured at the north corner. If your AI is trying to connect to the road to the SE then it SHOULD fail as the road on that tile is raised on foundations. You can get the selection routine to discount this tile if you consider two things. A) The direction of the road on that tile, and B) The direction of the slope on that tile. When considering whether or not a road can connect to any adjacent road, the slopes are more important than the tile height.
Since the slope has just one corner raised then the road on it could go in either direction. If the road was facing towards the proposed bus station tile then that site WOULD be valid, but because the road is facing in the other direction then the bus station faces the foundation and can't connect to the road.
In general terms...
- A road on a slope can face either N-S or E-W. Because of the way tiles fit together this is all we need to know.
- If the road on a slope is moving parallel to the proposed station tile then discount it.
- If the road on a slope is moving towards/away from the proposed station tile then consider it
- - On a slope with two corners raised the road can only go in the direction of the slope on the tile, so test that (easier!).
- - On a slope with one corner raised the road can go either way so we must test the road itself (need to query adjacent road tiles).
I hope that makes sense.
GeekToo wrote:Update of Convoy:
Recent developments ( especially the different behaviour of IsBuildable ) did make the pathfinding of the previous Convoys pretty useless ( as is: not able to find a route ). I tried integrating the BinHeap of the library, as it was better coded than my version ( that is, being a much more pure Container class), but unfortunately, the performance was a lot worse than in my previous Convoy version. Main reason: the Exists function, which does compare a complete node. Suggestion to the devs: add an id to the Insert parameter list.
So for now, I still use my own BinHeap.
Lots of things have improved since the previous version, and I realise lots of things still have to be done.
That is indeed the case. Every occasion you see foundations, the underlying tile isn't flat. This is the same with houses and roads. So even if a road seems to be flat, the tile underneed need not also be flat.reylas wrote:Ok, one more question. So does that mean a road, house, or tree tile does not have to be level? So if a house is there, then the house may be level ( as shown by the foundations) but the underlying tile is still sloped?
If that is the case, then that changes A LOT. I could see that with houses, but would a road not have to level the tile underneath (or at least the section covered by a road?
MarkS.
Ok, so is there anyway to tell if a tile has a foundation on it? According to the slope of the tile, I should be able to build, but I cannot. In code the only way I can tell I cannot build is to build and then fail. That is tough since I really need to build to the north east but my program found the south east tile first. There has to be some way of seeing before hand that that tile is not connectable by slope. A pathfinder will need that.Yexo wrote:That is indeed the case. Every occasion you see foundations, the underlying tile isn't flat. This is the same with houses and roads. So even if a road seems to be flat, the tile underneed need not also be flat.reylas wrote:Ok, one more question. So does that mean a road, house, or tree tile does not have to be level? So if a house is there, then the house may be level ( as shown by the foundations) but the underlying tile is still sloped?
If that is the case, then that changes A LOT. I could see that with houses, but would a road not have to level the tile underneath (or at least the section covered by a road?
MarkS.
Users browsing this forum: Google [Bot] and 1 guest