FLHook essentially is a set of DLL based plugins that allow for added features and commands ingame.
Basically nearly all the commands on the server are based on FLHook.
Soon there will be player built stations, jump drives, cloaking devices and more, all thanks to FLHook.
It also produces a possibility of linking 2 servers together, allowing for the roughly 200 player limit to be bypassed as your ship and you are instantly transported to the other server.
The shortest route calculations are all done by the game using files, not online in particular.
However with FLHook, it's possible to change prices of commodities, availability of commodities and various other things. This means some things are changed on the server that FLCompanion cannot account for.
At least until they fix the option to pull prices etc from the online game.
' Wrote:And if the navigation system is server side, how does FLCompanion calculate its routes?
The "server" is just another copy of freelancer running somewhere. It and the client use INI files. With FLCompnaion, plotting a course and asking for prices is done with the client files. When you ask the game client to plot a course, a request is sent to the server and the path is returned. That data uses the INI files and map data that is stored on the server. I don't know why it is setup this way but that is how it works. One benefit of this is that the server can have different prices and stations and such than the client uses. I haven't learned enough about this yet myself, just saying that plotting a course is currently handled by the server, and I think there is a known interface for this.
' Wrote:The "server" is just another copy of freelancer running somewhere. It and the client use INI files. With FLCompnaion, plotting a course and asking for prices is done with the client files. When you ask the game client to plot a course, a request is sent to the server and the path is returned. That data uses the INI files and map data that is stored on the server. I don't know why it is setup this way but that is how it works. One benefit of this is that the server can have different prices and stations and such than the client uses. I haven't learned enough about this yet myself, just saying that plotting a course is currently handled by the server, and I think there is a known interface for this.
Not quite sure it works that way to be honest.
Notably because of the anti-cheat.
If you change your commodity selling prices for your game, you will be able to do the transaction on the server for that price.
Then the anti-cheat looks at you funny and boots you, as you should not have made that much monies for that transaction.
If the server always had different files than the client, it would always cause the anti-cheat to yell.
My assumption is that the in-game plotting uses the server because the navmap for the ship is stored on the server, ie a jumphole is only added to the navmap when the server sees you are in scanner distance of it (planets and some other things are handled differently). I ass-u-me that the navigation system was designed to use this information, and since the data is stored on the server, the calculations would have to be performed by the server too. They are not currently linked though; the server will calculate a path based on jump gates that you have not visited, while ignoring jump holes that you have visited.
Also, AD was playing with something a little while ago that was supposed to incorporate that information but was badly bugged
So it is definitely server-side but dunno anything about how it is implemented
' Wrote:From what I gather, Discovery has commodities that take up more than 1 inventory slot - that makes the problem even harder and more interesting, as it means the optimal cargo isn't necessarily to fill your hold with only one commodity on each leg. I plan on doing this for my Master's thesis as well, so it will be getting very advanced.
Can you explain why exactly would someone transport more then one commodity at the same time? I mean on a single travel from one base to another, you should choose commodity that has maximum profit per inventory slot.
' Wrote:Can you explain why exactly would someone transport more then one commodity at the same time? I mean on a single travel from one base to another, you should choose commodity that has maximum profit per inventory slot.
Because if you have, say, 51 cargo space (pulling numbers out of my backside here), and the best value cargo to take uses up 2 inventory spaces, you've got that one free slot at the end. It's probably better to fill that with something than let it go empty, and that introduces a whole new layer of complexity to the problem.
If every commodity uses up 1 cargo space per unit, you're right - but over a complete trade circuit, the result isn't nearly as trivial to prove as you might expect.
This is certainly an interesting idea- I do agree with Linkus in that FLHook might benefit greatly with your help, but that's not why you're here.
FLCompanion is great, but it's far from perfect. If you can create a program that fills in for its shortcomings, I might well switch. FLCompanion is okay for planning trade routes one leg at a time: I like your idea of making a program that calculates the optimal, complete route. Plugging in your faction / reputation would be a nice feature to avoid going through Guard or otherwise hostile systems.
I'm not a programmer nor a mathematician so all I can offer you is good luck, and a free beta tester.
' Wrote:Because if you have, say, 51 cargo space (pulling numbers out of my backside here), and the best value cargo to take uses up 2 inventory spaces, you've got that one free slot at the end. It's probably better to fill that with something than let it go empty, and that introduces a whole new layer of complexity to the problem.
Well yeah, actually you just fill it with the next most profitable item that can fit, but it is just a minor problem, if you have something like 4991 cargo(uau6 stork) that last 1 cargo space even if left empty wont change the profit much.
' Wrote:Well yeah, actually you just fill it with the next most profitable item that can fit, but it is just a minor problem, if you have something like 4991 cargo(uau6 stork) that last 1 cargo space even if left empty wont change the profit much.
Ah, but it might not be best to take the second most profitable cargo on to the next stop, it might be better to take a completely different cargo that you won't sell for two or three stops. Yes, the problem is minor if the best commodity only takes up two slots, but it becomes more relevant with bulkier cargoes.
Starting to delve into the ini files to extract the relevant data, and I came across something odd. The one-way jump hole from Cambridge to Leeds has nothing in the ini files to indicate that it's one way. According to the files, both ends should be fully functional, as far as I can tell. And Freelancer Companion has identical travel times listed from Leeds to Cambridge as for Cambridge to Leeds. So why does the Leeds end not exist? What's going on, and how do I account for it?
(in case this has been changed in Discovery, I'm currently still only working on Vanilla)