0
\$\begingroup\$

Sorry, I'm a complete newbie to this place, and I don't know how appropriate my question is, but I didn't know where else to ask.

I'm trying to make a mod for The Sims 2, and this game uses a lot of internal formats which it bundles up in .package files. Its main modding program is called SimPE. SimPE can read some of these internal formats (for which plugins exist), others not. Specifically, it lacks a plugin for .fx files, which are all stored in a game file named Effects.package. This file had one resource which I've exported as an .fx.

I've opened the .fx with Notepad, with Visual Studio and with FXEditor, but for the most part it's not intelligible. It looks like this:

Random meaningless symbols

I understand I'm supposed to see code here.

Is there a way to fix my .fx (heh), or to get it into a readable format?

\$\endgroup\$
8
  • \$\begingroup\$ Are you sure you're supposed to see code there? Just because the extracted file uses the ".fx" extension doesn't mean it's the same text-format .fx that you're thinking of. In particular, it sort of looks like this is some kind of possibly-proprietary binary effect data, which just happens to contain some bits of ASCII for variable identifiers. \$\endgroup\$ – user1430 Nov 24 '15 at 18:09
  • 1
    \$\begingroup\$ It's certainly where the various effects for the game are stored, and all tutorials I've seen for FXEditor and for processing .fx files in Visual Studio showed .fx files with actual code in them. Most likely SimPE exported it wrong, but there's gotta be some sort of info hidden into those symbols, if parsed correctly. By "proprietary" do you mean it can't be parsed correctly for copyright reasons? \$\endgroup\$ – DeaExMachina Nov 24 '15 at 18:18
  • \$\begingroup\$ All of that is potentially irrelevant though; it's possible the Sims developers simply chose to use the extension ".fx" despite the fact that their specific files are not the same kind of ".fx" files that FXEditor or Visual Studio expects (which are just plain text files). Extensions are arbitrary. By "proprietary" I mean a custom format that the developers chose, or perhaps some form of pre-processed (e.g., precompiled maybe) file format. \$\endgroup\$ – user1430 Nov 24 '15 at 18:24
  • \$\begingroup\$ I see what you mean, but there's less of a reason for me to assume that than to believe that the file is somewhat broken or corrupt. Occam's Razor. I know what these names refer to in-game, and it's pretty much what I'd expect from that file type. Either way, even their other proprietary formats (e.g. meshes, textures, behavior etc.) have been made accessible through SimPE plugins; this one just didn't pose much interest, presumably. I mean to find a way to open the file somehow. \$\endgroup\$ – DeaExMachina Nov 24 '15 at 18:45
  • 3
    \$\begingroup\$ I'm voting to close this question as off-topic because it asks how to open a binary file with unknown, proprietary content. \$\endgroup\$ – Seth Battin Nov 25 '15 at 5:38
1
\$\begingroup\$

It’s a binary file, not a .fx file. Don’t waste your time.

See those ÍÌÌ= in the screenshot? Since Notepad uses the CP1252 codepage by default, it means the sequence of bytes in the file was cd cc cc 3d. This rarely means anything special, except in binary file formats, where it stands for 0.1 encoded as an IEEE 32-bit float. Similarly, all those ÍÌL> mean 0.2, and š™™> is for 0.3… unless you know the actual file format, there’s not much you can do with the file except reverse-engineer it yourself.

\$\endgroup\$
0
\$\begingroup\$

This file is in binary. You can use a hexediter to view the file in a different way. However when the game loads the file it only reads the information it needs, and doesn't need to store all of the data in characters (which are human readable).
Instead of storing "10000.00" in a file, which takes up 8 characters, it would store that information using 32 bits instead. Which saves on disk space, and load time. If you want to read the file, or convert it to readable format. You will have to write a conerter, or find one online to do it for you. Basically you will have to read it in binary format, then output it in ascii format.

\$\endgroup\$
3
  • \$\begingroup\$ I've used an online hex converter for parts of it, but didn't know what to do with it later (copy the converted-to-hex text in Notepad and save it... as .txt or .fx? Unicode or ASCII or ANSI? etc.) \$\endgroup\$ – DeaExMachina Nov 24 '15 at 18:59
  • \$\begingroup\$ You will either have to find a converter online, or write one yourself. The program that is using this file reads from it in binary, so it will read byte by byte, and convert those values into numbers of specific lengths. Those values are not meant to be ascii. It will take .*&. and make it into 32476 for a value, then the next *..( and make it into 2892 value. Those aren't real conversions, just examples. To convert it yourself you will have to know what value type you are reading, then read it. it could be an integer, long, unsigned long, bit, byte, etc.. \$\endgroup\$ – mythos Nov 24 '15 at 19:07
  • \$\begingroup\$ I know how to find a converter; I would also know how to write a short piece of code for converting decimal to binary, but these aren't decimals, so online converter it is. I haven't managed to convert the full file to decimal, since it's too long and it takes a lot to process, but when I do, my original question is what to do with the data. Obviously I need to copy&paste and save the data converted online in some form, but I don't know how. My encoding options for Notepad are ANSI and three different types of Unicode. \$\endgroup\$ – DeaExMachina Nov 24 '15 at 19:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.