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

Watercooled Toolshed: WatercoolerWarrior Tools and Utilities

Here you can find the postings on the different editing utilities found for Freelancer

Post Tue Feb 22, 2005 12:50 pm

Watercooled Toolshed: WatercoolerWarrior Tools and Utilities

I've posted a variety of small libraries and tools for modding and editing Freelancer using .NET and Windows Script Host. Please feel free to post feedback or questions on any of those tools in this thread.

List of tools to date...

Tlr.Freelancer.Flhash Library
Tlr.Freelancer.Flcodec Library
Tlr.Freelancer.Network Library
TLR.Freelancer.Utility library
Set Mission 1 Reward - Script
FlIniSchema a MOD Makers tool
Turn the Cut Scenes Off and On tool
FlSpit a Flserver console debugging tool
Asgard MOD custom Weapons list



Edited by - bakedpotato on 2/22/2005 4:38:03 PM

Post Thu Feb 24, 2005 12:54 pm

Heya WaterCoolerWarrior,

I just wanted to tell you that i've been using your code, nice work

If possible, I'd like to request a couple of things, if they're not possible, I'll understand

First off, I'm dying to get code to edit then save FL save game files. I'm working on a text editor that is intended for use by FL modders and people who want to just explore the files. It'll open FL files, and (if I turn it back on) will implement similar functionality to your FLIniSchema tool. Also it'll edit RTF files as well, just to give it a useful bent for when you're not modding. I've also got it set to open .CS files, for when you want to edit the occasional C# programming language file. And finally it'll open basic text files for general editing duties.

Ok, now that I've spouted all that off, I guess I can get to the rest of my point

Well, actually the biggest request that I have, I've already made, and that's for encoding FL files after editing them. I'd try it myself, but I'm still just trying to figure out how to get the editor setup so that it can be the default editor for certain files (I don't know how to get it to accept command line arguments that tell it to open a certain file... IE when you click on a file and want it to open in the editor without having to open the editor first then open the file in it... Did that make sense?).

Anyway, I've used your tlr.freelancer.utility dll extensively, and am greatly enjoying the added functionality. I can't thank you enough for providing that tool

If you want a tester for anything, let me know. Also, if you're interested in taking a look at my editor, let me know too I'd be happy to provide it and the source code for anyone who's curious, just please send me any changes you make so that I can keep up (maybe I'll learn more about coding in the process)

Again, thank you man for the seriously killer tools, keep it up
ArchKaine

Some say ignorance is bliss, I say they're just too blissful to know better.

Post Sat Feb 26, 2005 5:09 am

Thanks, ArchKaine.

Before I comment on anything, let me mention that what Argh is talking about is seriously useful. 99% of the problems of Freelancer modding come down to changing/fixing pieces of text, and using tools that are designed specifically for mass-processing text can make you into an uber-bugslayer.


Well, actually the biggest request that I have, I've already made, and that's for encoding FL files after editing them.


In which sense do you mean "FL files"?

If you mean savegame/character files ending with .fl such as "01-23ab45cd.fl" this is pretty easy to do. I don't see a major need or value to it directly, but I can put together the code for it.

If you mean for re-compressing Freelancer INI files to their BINI format, that's more difficult - although it has some potential value to it. I recall hearing about some issues the standard bini tools have with recompressing files, but I believe Bas Westerbaan has actually written some good code for recompression (using .NET as well).


I'd try it myself, but I'm still just trying to figure out how to get the editor setup so that it can be the default editor for certain files (I don't know how to get it to accept command line arguments that tell it to open a certain file... IE when you click on a file and want it to open in the editor without having to open the editor first then open the file in it... Did that make sense?).


Yes it makes very good sense, although I'm not sure where in the process your problem occurs. The following may help. I assume you're doing this in .NET.

The number 1 problem people have with opening files this way is that the shell isn't passing them as arguments to the program or is doing it inappropriately.
For example, if the registry association is messed up and doesn't include quote marks around arguments, the shell automatically treats spaces as argument separators. This is BIG problem for all Freelancer files since all of them are in paths with space. Without appropriate quoting, the file "C:\Documents and Settings\SomePerson\My Documents\My Games\Freelancer\Accts\MultiPlayer\99-abcdef11\01-23ab45cd.fl", will be interpreted as 5 separate arguments, the following:
C:\Documents
and
Settings\SomePerson\My
Documents\My
Games\Freelancer\Accts\MultiPlayer\99-abcdef11\01-23ab45cd.fl

To test this, insert some debugging code in your program to display all of the arguments given to the program immediately after start. In .NET, you can get a concatenated set of arguments given to your program by looking at System.Diagnostics.ProcessStartInfo.Arguments. If the arguments echoed back don't include your filename at all, it isn't even being passed to the program. If they DO include the filename but it has spaces in it and is not surrounded with quotes, then you're seeing several arguments, not a single filename argument.


If you want a tester for anything, let me know. Also, if you're interested in taking a look at my editor, let me know too I'd be happy to provide it and the source code for anyone who's curious, just please send me any changes you make so that I can keep up (maybe I'll learn more about coding in the process)


Stay tuned, when I have time to get back into this I will be posting more work. I'm actually beginning to work on top of code done by Bas Westerbaan in .NET now.

It would be interesting to see what you're doing. In fact, I would strongly encourage you to post your code and information about what you're doing here; the only way I've been able to do what I did with the Tlr.Freelancer classes is the material several people prior to me made available. For the "crunchy" parts - really technical problems you're having - you will probably find it helpful to post in the .NET newsgroups on the free Microsoft news server (news.microsoft.com). If you feel hesitant about doing that because you think you don't know enough, you REALLY want to post and show code. Some people will rip it apart, but active criticism by bunches of casual experts can move you along incredibly fast.

Post Thu Mar 10, 2005 12:45 pm

Hey, btw... just wanted to post a big THANK YOU for making FLSpit. That has helped me quite a bit in identifying and eliminating a lot've bugs in my mod

Post Thu Mar 10, 2005 3:27 pm

Hi,

I like the look of your networking utility, though what I'm really after is something that can get all the servers from the global list. Do you or anyone else know how this can be done? I'm sure it can be done, as that was how the "Most Active Servers" webpage used to work...

TIA, Cryo .

Cryogenius - Author of FLstat v1.4 and the Global Player Rankings

Post Wed Mar 23, 2005 5:21 pm


I like the look of your networking utility, though what I'm really after is something that can get all the servers from the global list. Do you or anyone else know how this can be done? I'm sure it can be done, as that was how the "Most Active Servers" webpage used to work...


My apologies for taking so long to respond; I wanted to experiment with this but never have had the time. I don't have any idea how this is done, but this - and in fact EVERY Freelancer "transaction" over the Internet - is theoretically very simple underneath since it's a small amount of data being transferred.

Just to outline an approach for finding this out, if someone does packet capture while connecting to the global server and compares a few different conversations, they should come up with a single query sent to the server that causes it to respond with the server list. This isn't something the average light-duty programmer would find easy, but someone with a knowledge of network programming might be able to figure out details on what is sent and what is received pretty quickly.

The whole topic area of how Freelancer "talks" on a network could be extremely rewarding to explore. For example, if we understood Freelancer's communication well enough, it should be possible to make a program that looks like a player to an individual game server. This would then allow creating robots akin to IRC bots that could react to player input; that opens possibilities such as lightweight remote logging, delegated administration, automated inventory transfer and sorting, and so on.

Post Thu Mar 31, 2005 2:19 pm

One more quick note on the GUN server connection concept. I've eavesdropped on my connection to the server a few times using winpcap and ngrep, and following some initial negotiation it looks like the client PC sends a simple text string:
<Connect Cx="0x01efab89" Proto Ver="3.3" />
and then gets a pseudo-XML dump of the servers.

Post Tue Apr 05, 2005 3:23 am

Edited 2005-04-08 to cover revised TLR Freelancer Toolshed package (this is a new name)

Bug/Behavior Notes on TLR Freelancer Toolshed Package

These .NET-based libraries and several associated tools are bundled together in the TLR Freelancer Toolshed package. Some short followup notes on the current install follow:

+ COM Registration for all of the libraries now works; thanks to Retribution for testing this out.

+ Miscellaneous menu shortcuts added, as well as a desktop shortcut for the Pilot Census application. Unfortunately the desktop shortcut is not "optional" to install, but you can delete it.

+If you did not run the IFSO install routine to install IONCROSS Freelancer Server Operator, the Pilot Census tool cannot find IFSO and will generate an application error on launch. This will be corrected to allow manually specifying the locations in the future.

Edited by - WatercoolerWarrior on 4/8/2005 10:46:04 AM

Post Tue Apr 05, 2005 4:04 pm

Heya Watercooler,

Sorry for the delayed reply, been busy

Anyway, regarding my FLnotepad utility (the editor that I've been working on). I did manage to get it to recode, sort of, FL save game files, which is what I meant in my last post by "FL files". I guess I should have been more specific. It turns out that Freelancer will read plain text files, which is a good thing. An interesting side effect that I've noted is that it will also re-encode the .FL files that have been edited. One thing that I'm trying to get working in my editor is a way to detect BINI and FL save game compression in a file, so as to have the editor dynamically decode the file, but only if needed... That way one doesn't end up "decoding" an already decoded file... My editor at the moment doesn't do that yet, so I have to make sure that I run a save game through FL first before I try to edit the save game file again. I believe that I put a warning to that effect in the readme for it.

One thing that I've also noticed when you're actually able to edit the save game files is that you can alter your factions, and how the factions respond to each other in the save game, and that will have an immediate effect on how the game plays. I think that's a potentially good way to test faction editing ideas without having to go through and edit all the faction ini files without having tested the changes first.This method enables one to test things almost in-line. Plus there's the benefit of being able to resolve any odd issues by removing or reverting to an earlier version of the save file. But even as useful as something like that would be to modders, players would only use that ability to horse around with the factions, or their own status with said factions, and that's a lot easier to do in the FL Character Editor. Though then they have to sit through it rescanning the save game files every time, so I guess there's a tradeoff between quick, fast, and in-depth, and slow, easy, and a fair bit less deep. Hmm, makes me wonder if I should write a utility that will allow one to load a save game file, edit faction's responses to each other, and see what happens from there... How does that sound? It would be for modders only, or players who like to change the rules a bit.

Well, anyway, I'm thinking of uploading my editor to here on TLR, though I wonder if it would make it past Crabtree's testing It's reasonably stable, though for some strange reason it doesn't like the Restart.fl file in the single player folder. I haven't figured that one out yet. So don't use it to edit that file

Well, anyway, I've got to get going, so I'll keep in touch as best I can, thanks for the feedback Watercooler, I appreciate it

ArchKaine



Some say ignorance is bliss, I say they're just too blissful to know better.

Post Fri Apr 08, 2005 9:52 am

...One thing that I'm trying to get working in my editor is a way to detect BINI and FL save game compression in a file, so as to have the editor dynamically decode the file, but only if needed...

Have your editor "taste" the first 4 characters of the file. If the 4 characters are FLS1, it should only be an encoded .FL file. If the first 4 characters are BINI, it must be a BINI-compressed file.

I have seen one possible[/ exception to this. The distributors of the Excelcia mod compress the freelancer.ini file in a BINI-style format that is correctly understood by the game but causes all of the bini decompressors I've seen so far to choke on it. I haven't investigated carefully, but in any case this is a rare situation.

Post Mon Apr 11, 2005 10:08 am

Heyas,

Hmm, any idea where I can get a bini codec? I have no idea how to decode it myself.

Regarding the Excelsia thing, could they be using some combination of save game encoding and Bini on top of that? That would definitely cause any bini decoders to gag. Though I'm not too sure as to how well the game would handle it. If this is entirely unrealistic, try not to laugh too hard at me, it's just a thought, and I have no clue as to how or even if it would work in the end. Though if I can get hold of a Bini codec, I might try something like that just to see how it works.

Anyway, thanks again for the codecs. You rock

ArchKaine

Some say ignorance is bliss, I say they're just too blissful to know better.

Post Sat May 14, 2005 3:05 pm

i need a program that decoded multiplayer data, and another that puts em back together, and then ill stick a process in the middle,

can it be done in VB?

Return to Freelancer Editing Utilities Forum