Important Message

You are browsing the archived Lancers Reactor forums. You cannot register or login.
The content may be outdated and links may not be functional.


To get the latest in Freelancer news, mods, modding and downloads, go to
The-Starport

finding best path

The general place to discuss MOD''ing Freelancer!

Post Fri Jul 29, 2005 1:29 am

finding best path

hi there (first post). i'm currently writing a CGI page called TradeStuff which will be a big database page designed for traders, by a trader.
several parts are already complete (most notably commodity searching, comparing prices and price differences), but i need more info about FL for the next function i'm planning, which will be a route planner. the idea is letting the player select 2 destinations and give him the shortest route - just like the calculate best path function in FL, except this one should have the advantage of listing all jumpholes and jumpgates (and not only ones that the player has found). but there's a problem with that. i guess FL uses the shortest_path.ini, shortest_illegal_path.ini and shortest_legal_path.ini files for the best path calculator, but i have no idea how. those files list system names and i have no idea how is that used to find paths.

so if anyone has done some research on this, please share your findings with us here. once this feature is done, TradeStuff (what a creative name eh?) will be fully functional.

weird sig.

Edited by - GodGell on 7/29/2005 2:34:39 AM

Post Fri Jul 29, 2005 6:46 am

Well,
the shortest_X_path is describing how to get from one system to another into this way :
Path = Hi01, Li01, Hi01, Ew01, Bw08, Ku03, Ku02, Iw06, Li03, Li01
Path = Start System, Destination System, Start System, Intermediate System(s), Destination System

I hope that helps. Your traderoute planner would have to respect the illegal as well as legal paths to make sure it uses JG/JH when necessary. Use these files as a database, where the trader enters the start system, and the end system, and then the script would have to read the entries defining what are the paths from X to Y. Then it could or present a legal, an illegal, and a mix traderoutes (For traders that want to only use jumpgates or jumpholes or who does not care), or you simply give the best path right away.

You decide, but these files are your best database.

Return to Freelancer General Editing Forum