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

Dynamic trading possible?

The general place to discuss MOD''ing Freelancer!

Post Mon Mar 24, 2003 7:31 pm

Dynamic trading possible?

I'm wondering if it would be possible to build a program to watch the trading that players do and change the prices of commodities in real-time.

I think it might be interesting to have a universe where profitable runs became less profitable after enough goods were moved, and players would have to start looking elsewhere for good runs. Of course, the rates would probably need to slowly return to their original values, or the universe would be broke after a few days!

No, I'm not asking anyone to do it for me, I'm just wondering if anyone has the technical expertise to know whether it's possible before investing a load of time.

Post Mon Mar 24, 2003 7:33 pm

I realise this might involve modding the server, but I'm hoping to find a solution which doesn't involve the clients.

Edited by - Thundercleese on 24-03-2003 21:06:04

Post Mon Mar 24, 2003 9:22 pm

and you might turn it around aswell, a space station that has not been given water for 3 weeks will be likly to pay 150 a unit for it.

Post Tue Mar 25, 2003 12:13 am

I don't think this is possible...
To do that you would have to change the ini files during the game and that requires the game to send a sort of "message" that you have traded something...
And things like "messaging" are hard coded... :-(

Post Tue Mar 25, 2003 12:40 am

Yeah, this isn't an INI issue. The INI files are loaded when the server starts up, and I don't see any reason why the server would bother checking them again to see if they've changed. I'm wondering if a mod DLL (er something) would allow you to dynamically change some of the game info while it's running.

For the message problem, worst case scenario, I could write a program to watch traffic on the port and intercept "commodity traded" messages. I'm just wondering if a mod would be able to actually change the prices.

Post Tue Mar 25, 2003 6:43 am

goods.ini are only read in while start up of EXE. There are no global variable to test for amounts watched. Unless, I tried this but need a better programmer than me...

I used a Memory Editor turned Trainer that runs along side with FL EXE and modifies the 900+ or so memory locations where Goods price data is at and I was able to change the price WHILE the EXE was Running!

It is a start...I need more programming in C++ knowledge.

Open source code decompile EXE and patch it would be nice, but this ius best for now. Try it, it really does work.

Post Tue Mar 25, 2003 9:10 am

Xerc,

It would be helpful if you state the exact name of the memory editor or an url to it, if possible, so that we can examine it ourselves. Thanks.

Post Tue Mar 25, 2003 9:26 am

Xerx! I'm impressed, that's awesome! That's half the work done right there!

I'm a pretty good Perl Programmer by trade, but I can work my way through C/C++.

I appreciate you letting me know that it's even possible, but can you post your work so I can have a stab at it?

Post Wed Mar 26, 2003 2:35 pm

Ok I was using SEAL 2.0 it was freeware fro a reason. It is limited to only holding 10,000 returns out of the memory. It is about 3 years old and it has severe limatations.

i was able to find Boron amount of units stored in your cargo and the other memory adress where it stores the amount of Boron units bought. Thus I can change the price of Boron higher as you by up more units.

I need a better memory editor to find the other commodities. They are stored higher in memory. That is why the game requires a certain amount of RAM to hold these values. 10,000 return value numbers limit max out of my 7FFFFF (393MEG RAM) adresses is not going to find for me all the values. I could force it to search different adress lenghts from one higher adress to another, but that is very hard slow work! It does have that ability from one adress to another, but it will only return up to 10,000 results. There are ALOT of repeating numbers in there! Boron alone return 373,000 hits but only displayed the first 10,000 values. Luck i found it. I tried for Water, but it is stored even higher than that, can not be found.

I did find the memory spot for the money stored. I need to look for a better memory editor than can read higher amounts of data. The stuff gets read in from goods.ini file, and is stored in RAM spots that stay put, but alot of the prices you see are stored randomly because it is only using it as a temp scratch pad. Use the numbers in the goods.ini file.

Oddly, I would think the game would stick the values in relative memory locations, not in the same places every time. I did load up other programs to get FL to load into a different memory adress its data. Seems to put the data back into the same places; I expected it to be relative where there is room to place it. This is getting to be frustrating. One step forward, then two steps back. Slow progress sorry.

Once I get a better memory editor to use, I can do much more faster....anyone know of a better one? That is freeware or low cost?

Post Wed Mar 26, 2003 7:21 pm

From what I've found out about Freelancer lately, I'm starting to doubt this idea will work. Xerx, you were able to change commodity prices on your own machine, but what I wanted to do would be to have a multiplayer server change the prices, and have those prices reflected by the clients. Since Freelancer expects the INI files to be the same on everyone's machine, I don't see why the programmers would have bothered having clients request commodity prices every time they land on a base.

Xerx, is there any way we could test your commodity price adjustment over multi-player? You could set up a server and I could connect to it, then you could change the price of Boron and I could re-dock and tell you if it worked. Or, if you have two machines, you could test it yourself.

Post Wed Mar 26, 2003 7:22 pm

Doh! You're probably using your memory editor on Freelancer.exe instead of flserver.exe!

Post Wed Mar 26, 2003 9:11 pm

Yes, it is more of a mess the further i got into it. It is a long story. I am going to take a break from this and finish up simple MOD and leave this Dynamic Change Prices on the fly alone for a bit.

The data is stored not as the value listed in goods.ini and it seems for some the data is moving around; I mean not relative adressing; it would take a program very much sophisticated to think like a human to track down the dynamic data storage it does...probably to save on RAM space so it would leave more room and not require 512 MEG RAM to run game.

It is some kind of Dynamic RAM Memory Compression going on to conserve RAM since goods data is not constantly being accessed so they compress it in memory after read in. Pretty high brow stuff there.

Please give me the open source code! WAHHHH.

Post Wed Mar 26, 2003 9:28 pm

Xerx it seems likely that the information in memmory is moved around based on what system you are currently in.

In addition, since the price of goods is determined by the station (or planet) chances are that the modifier (not the price itself) is stored along the the station (or planet) in memory, which is probably stored with the system.

Post Thu Mar 27, 2003 12:17 am

IMO this is a waste of time... Don't understand me wrong, I want this to be possible...

With "messages" I meant the EXE communicating with a DLL, not just a port...
To make this happen the EXE has to ba modified to send a "message" to a custom made DLL that there was a trade and tah tha INI files should be rewritten and reloaded.... I think that's not possible without the sourcecode...

Post Mon May 26, 2003 7:31 am

Memory editor? as in cheat program? only 1 that I know of which is updated quite regularly is TSearch latest version 1.6b

http://membres.lycos.fr/tsearch/

It supports networking as in e.g. some games you can't minimize the game you can use 2nd pc to find the memory values. Very helpful program & alot better IMHO than gamewiz & etc. Works with Win XP

Return to Freelancer General Editing Forum