Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Thu Jan 24, 2019 2:00 pm

All times are UTC




Post new topic  Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Mon Jan 14, 2019 1:56 pm 
Offline
Engineer
Engineer

Joined: Mon Jan 14, 2019 1:30 pm
Posts: 2
Hi Sifu

I'm currently exploring an Idea for a AI I like to program but I get stuck at the path finding.

In short my first 2 lines of code:
import("graph.aystar", "", 6);
import("Pathfinder.Rail", "", 1);

the graph.aystar works as expected but the pathfinder.Rail kicks following error:
Your script made an error: couldn't find library 'Pathfinder.Rail' with version 1

Attachment:
Screenshot (2).png [136.65 KiB]
Not downloaded yet


in long:
my AI supposed to find the outermost Powerstation and connect all Coal mines to it by train. It supposed to to that by gradually extending the existing network. My idea was to get a pretty average train network done by the AI which I'll buy over at some point to have a challenge of optimizing it .
I managed to get the above concept running to the point of defining the path of the rail track. To come up with it manually is above my current skills therefore I thought of starting with the existing libraries. But even that is not rewarded with success and I'm ending up with multiple stations all over the map without being connected. Not a very useful AI so far :)
What am I missing to get the pathfinder imported? compared to aystar the folder structure looks right, the naming looks right, the revision is matching, classname is not used so far, ... I just can't find anything wrong with it!


Top
   
PostPosted: Mon Jan 14, 2019 2:07 pm 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Wed Nov 07, 2007 10:44 pm
Posts: 9106
Location: Sol d
Do you actually have the libraries in your OpenTTD's AI/GS search path?

You can test the detected AI and libraries by calling "openttd --help" in the command line. And possibly by calling it in debug mode: "openttd -d script=X" where X is a number 1...9. The higher the more spammy it will get.

_________________
Image
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML


Top
   
PostPosted: Tue Jan 15, 2019 1:09 pm 
Offline
Engineer
Engineer

Joined: Mon Jan 14, 2019 1:30 pm
Posts: 2
Hi Planetmaker

thanks for your quick response and sorry for my delay. Only now I had the chance to get back to my PC.

For the --help: it does not seem to list libraries. At least nothing for me recognizable. My AI is properly listed there

Moving on to the debug mode: oh boy that's a list and it points to some issues. However after cleanup it's now coming up blank. Starting the script shows some missing libraries. Well that's a change and obviously I cleaned up too much :)

After slowly adding a couple of needed ones it appears now working fine.

Still a bit puzzled why a duplicate of libraries causes this issue as it seems to ignore the second/third duplicate (according error message given). But anyway it solved my problem, that's the main point

Thanks a lot!


Top
   
PostPosted: Tue Jan 15, 2019 4:07 pm 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Wed Nov 07, 2007 10:44 pm
Posts: 9106
Location: Sol d
Glad it helped!

There used to be problems for OpenTTD to detect identically-named items ... IIRC when they reside inside tars. Though I recall that it had been solved. But maybe just sth very similar

_________________
Image
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 4 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 4 guests


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

Search for:
Jump to:  
Powered by phpBB © 2000-2019 phpBB Limited

Copyright © Owen Rudge/The Transport Tycoon Forums 2001-2019.
Hosted by Zernebok Hosting.