Freelancer Community Network
Reminder: Internet Explorer 6 or below are NOT supported.
HomeHome
ForumForum
WikiWiki
DownloadsDownloads
ForgeForge
Multiplayer Connection Tutorial
Collapse/Expand Random Image
Collapse/Expand Login
Username:

Password:

Remember me



Lost Password?

Register now!
Collapse/Expand Chat
Collapse/Expand Who's Online
91 user(s) are online (38 user(s) are browsing Forum)

Members: 3
Guests: 88

u-71, pmazurkiewicz, sukothai, more...
Collapse/Expand Donations
Monthly costs: -30€
Income (ads): +5€
Donations (last month): +165€

Current balance: 105€
(last updated 02/2021)

Please make a donation if you want to help keeping The-Starport online:

Thanks!
Collapse/Expand Links
Collapse/Expand Advertisement
There are currently 127 users playing Freelancer on 39 servers.
April. 17, 2021

Browsing this Thread:   1 Anonymous Users



 Bottom   Previous Topic   Next Topic  Register To Post

(1) 2 3 4 ... 9 »


Freelancer Path Generator
Home away from home
Joined:
2008/5/4 21:00
Group:
Registered Users
Senior Members
Posts: 554
Offline
*edit* the final version, no longer beta, is at the bottom of this post - as is the source code.

First up - HUGE thanks to all that have given feedback, highlighted bugs and more. It's much appreciated, I failed to catch the bugs mentioned so those contributions were vital! *slaps self for poor testing*

Secondly, apologies for the time taken to make the update and correct the bugs. Been busy, luckily grabbed a spare hour on Saturday night to sort it out.


*fixes*
Used a set collection in the program, which gave different paths each time. Changed to a List, now you get same paths every time.

Parses locked gates correctly now, so will not generate paths for locked gate objects.


Description
This program will generate the shortest path files for your mod

To use this you will require the Java Runtime Environment - if you haven't already got it installed, it's 100% free and available from here JRE 6 update 6

This application requires your mod directory (or your freelancer directory, activate the mod first) and it will then read your universe.ini and initialworld.ini file (if it exists!), for the systems and locked gates respectively. It will also read your solararch.ini file to find legal and illegal jump object types for when it's parsing your system files, to work out what the jump types are.

It will then read all those systems it finds in universe.ini file, using the given links, and finally - it will back up the existing path files before constructing new ones.

It uses a breadth first search algorithm, which is very simple. Once you've run it once, it won't overwrite the files again (if you've run it when the mod is activated, best off copying those files after they're made!).

Limitations:

If any files except the universe and solararch are missing - it will continue to generate the paths. Obviously these paths won't be correct, you will receive a warning at the end of the scan. Advisable to address the issue by supplying the files if possible (usually best to run on the your Freelancer directory after installing the SDK - and then activate your mod).

If any files are encrypted, it will give a warning (unless it's the universe/solararch, at which point it exits) - since it cannot read encrypted files, it will again generate bad paths (advise as above to solve).

Please give any feedback you find, including what improvements can be made, as well as how good/bad you've found it. It's advisable NOT to use this and include it's files within a mod release, as it hasn't been fully tested (even on normal freelancer) at this point.

If you find ANY bugs at all, please let me know what you were scanning (mod) and what the bug was, so that I can try to track it down and fix it.

Any feedback is welcome, although if anyone downloads it within a month I'll be amazed


Freelancer Path Generator.zip (download, extract, and then double click to run).

Source code (Java)
Freelancer Path Generator Source Code (Contains the packages, which are directories, with the classes inside. You may create a java project in your IDE of choice and just drop the contents of SRC into the location where your IDE puts source code and it should work. You may need JDK 5 for the source format if you see errors, or try 6 instead!).

Posted on: 2008/6/22 23:05
Top
Re: Freelancer Path Generator *Beta*
Home away from home
Joined:
2008/6/2 10:17
Group:
Registered Users
$$$ Supporters $$$
Senior Members
Posts: 1847
Offline
Terrific Chips, very many thanks.

I will run it as soon as I get an hour and will let you know the results.

Much appreciated.

Posted on: 2008/6/22 23:33
"C" for "Caterpillar"... "Cool"... "Cheesey"!
Top
Re: Freelancer Path Generator *Beta*
Home away from home
Joined:
2008/6/2 10:17
Group:
Registered Users
$$$ Supporters $$$
Senior Members
Posts: 1847
Offline
Well done, Chips!

I ran it on exactly the same files that I got the No Best Path before on the second run (with my St03b system decrypted) and was able to get good paths with no glitches, no hangs, no freezes. I tested it there and back between the same systems that I had the first good run (when St03b was encrypted) and all is well.

I get No Best Path between systems where there are no jumpgate connections (i.e. only jumpholes) and this is of course normal as the original game does this too.

I will post if I have any problems but I don't foresee any.

So - Bloody Well Done, Pal!!

Very many thanks for all your work, it's VERY much appreciated.

Posted on: 2008/6/23 23:51
"C" for "Caterpillar"... "Cool"... "Cheesey"!
Top
Re: Freelancer Path Generator *Beta*
Starport Admin
Joined:
2008/2/26 20:36
From Germany
Group:
Webmasters
Registered Users
Posts: 1790
Offline
yeah, thanks in advance, havent tried it yet but will soon

Posted on: 2008/6/24 0:12
aka chaosgrid
http://www.freelancerserver.de
https://www.moddb.com/mods/fwtow
Top
Re: Freelancer Path Generator *Beta*
Home away from home
Joined:
2008/2/22 18:35
Group:
Registered Users
Senior Members
Posts: 709
Offline
nice work chipsy! ;D ;D

Posted on: 2008/6/24 0:29
Top
Re: Freelancer Path Generator *Beta*
Home away from home
Joined:
2008/2/10 22:00
Group:
Registered Users
FLServer Admins
Senior Members
Posts: 1281
Offline
I hate to say it but you aren't going to get much feedback when it works right

Posted on: 2008/6/24 6:31
Galaxy Empire
Youtube Videos
Facebook
Top
Re: Freelancer Path Generator *Beta*
Home away from home
Joined:
2008/5/4 21:00
Group:
Registered Users
Senior Members
Posts: 554
Offline
Quote:

I hate to say it but you aren't going to get much feedback when it works right



Bargin, means less to do

The main reason to do this was simply boredom, and a bit of a programming challenge (although not that challenging - made challenging due to being slack at times with forethought).

The fact that it may prove useful to folks is an added bonus - hence why it gets releasd

Posted on: 2008/6/24 10:35
Top
Re: Freelancer Path Generator *Beta*
Just can't stay away
Joined:
2008/2/17 19:44
From Virginia
Group:
Registered Users
FLServer Admins
Senior Members
Posts: 369
Offline
Between moving house I got the chance to try this last night. Seems to work fine although I will need to get it into the beta test cycle to be sure. I noticed that it changed two things right away. The shortest_illegal_path went from 599kb to 4kb. No error checker turned up a problem. It fixed setting a distant galaxy far, far away ( ) and having it lead me to the center of the current system, I had that problem in one system before.

So, nice work! You need to get bored and do this stuff more often! ;D

Posted on: 2008/6/30 18:21
http://UnderVerse.us
http://FreelancerCommunity.net
Top
Re: Freelancer Path Generator *Beta*
Home away from home
Joined:
2008/6/2 10:17
Group:
Registered Users
$$$ Supporters $$$
Senior Members
Posts: 1847
Offline
Chips,

If you feel up to it, may I request an .ini file editor like Tiny Fish's 1.4 for your next 24-hour project?

For me it is the best ini editor available.

It has a tabbed "cellular" view like an excel spreadsheet that I love, I can copy & paste values vertically, and it is superb for comparing / checking / duplicating values for the same parameter for all sections. And it can switch to normal text editor view too.

It has many excellent features that should be kept.

But it also has some bugs which make it 90% instead of 100% :-

1. Opening a file smaller than the current one causes an error because the line pointer is not set to 1, it is kept at the current line number of the previous file - this causes the new file's name not to be updated in the editor, and if the user then saves the new file it overwrites the previous file!

2. deleting the last line of the file gives an error because the line pointer is not updated.

3. editing data in the tabbed view and then switching to text does not reflect the changes there, so it messes the file up. (There is a menu option to update the changed data the other way, so changing from text to cellular view is OK but only when the user remembers to use the option. Making it automatic both ways would be best).

4. deleting one or more lines between other lines in the text view shifts the next line to the end of the previous one, instead of keeping in the line-feed/carriage return

5. when it can't overwrite the old file it doesn't tell you so but pretends it has done - so changes are lost.

6. when inadvertently adding data past the last line in tabbed view produces an error message that is not understandable

There may be more.

Wishful thinking that you might take this one on!

But it would be superb.


Posted on: 2008/7/4 17:35
"C" for "Caterpillar"... "Cool"... "Cheesey"!
Top
Re: Freelancer Path Generator *Beta*
Just can't stay away
Joined:
2008/2/22 13:33
From that dark place in the back of your mind..
Group:
Registered Users
Senior Members
Posts: 330
Offline
@ ST, try note tab light, it's what I use instead of notepad.

Posted on: 2008/7/4 20:05
**shuffles of with a new headache**
Top
Re: Freelancer Path Generator *Beta*
Home away from home
Joined:
2008/6/2 10:17
Group:
Registered Users
$$$ Supporters $$$
Senior Members
Posts: 1847
Offline
Nothing else has Tinyfish's cellular view. Try it and you will see what I mean, it saves tons of time.

Posted on: 2008/7/5 2:33
"C" for "Caterpillar"... "Cool"... "Cheesey"!
Top
Re: Freelancer Path Generator *Beta*
Starport Admin
Joined:
2008/2/26 20:36
From Germany
Group:
Webmasters
Registered Users
Posts: 1790
Offline
Sorry to disappoint you, but locked holes are still not parsed correctly.

The path I mentioned in my last bug report is still bugged:

vanilla (SDK 1.5) path
Path = Br04, Rh05, Br04, Br01, Br03, Bw02, Bw04, Rh05

path from this tool
Path = br04, rh05, br04, br03, bw02, bw04, rh05

All in shortest illegal paths, br04_to_br03_hole is locked by FL default.

Posted on: 2008/7/14 20:32
aka chaosgrid
http://www.freelancerserver.de
https://www.moddb.com/mods/fwtow
Top
Re: Freelancer Path Generator *Beta*
Home away from home
Joined:
2008/6/5 16:18
From Germany
Group:
Banned!
Posts: 546
Offline
ive tested it yesterday the first time

correct me if im wrong but when i choose a different system on the nav map and create path to that system it really should create that patch from my current system to the next gate to the next system... ... ...


ive tried to let it calculate paths between systems with the only result that 1 single waypoint is on the map but no path to this waypoint
that happens even if the destination is just 1 system away

Posted on: 2008/7/15 8:30
Top
Re: Freelancer Path Generator *Beta*
Home away from home
Joined:
2008/5/4 21:00
Group:
Registered Users
Senior Members
Posts: 554
Offline
Quote:

Sorry to disappoint you, but locked holes are still not parsed correctly.

The path I mentioned in my last bug report is still bugged:

vanilla (SDK 1.5) path
Path = Br04, Rh05, Br04, Br01, Br03, Bw02, Bw04, Rh05

path from this tool
Path = br04, rh05, br04, br03, bw02, bw04, rh05

All in shortest illegal paths, br04_to_br03_hole is locked by FL default.


Cheers, will revisit - I checked that (I thought) :
Will sneak a peek when i get back in a few hours time.

Quote:
Correct me if im wrong but when i choose a different system on the nav map and create path to that system it really should create that patch from my current system to the next gate to the next system... ... ...


ive tried to let it calculate paths between systems with the only result that 1 single waypoint is on the map but no path to this waypoint
that happens even if the destination is just 1 system away


Not quite sure I follow you there Op. Do you mean you're manually going to the next system via nav map, plonking down an "add waypoint" and it's basically not plotting it? or is it doing it wrong somehow? Or does it put down the waypoint but no other waypoints? Or it plots multiple waypoints but no connection / continuation with them?

Posted on: 2008/7/15 17:05
Top
Re: Freelancer Path Generator *Beta*
Home away from home
Joined:
2008/5/4 21:00
Group:
Registered Users
Senior Members
Posts: 554
Offline
I can only assume I somehow compiled a wrong version :/


Quote:
Path = br04, rh05, br04, br01, br03, bw02, bw04, rh05


That's the shortest illegal path generated. The bug causing it was one I've already solved, that being that the numbers were truncated and therefore using them as a key when read in caused problems.

No idea how that occurred, it was one of the issues last time and was sure I fixed it :-[

Posted on: 2008/7/15 21:06
Top
(1) 2 3 4 ... 9 »