Fybertech Forums
August 05, 2020, 05:05:43 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
News: 06/21/08 - Fybertech: Forgotten History
06/13/08 - Fybertech: The De Novo Project, part 14
06/04/08 - Fybertech: The De Novo Project, part 13
 
   Home   Help Search Calendar Members Login Register  
Pages: [1]
  Print  
Author Topic: Faster Than Light  (Read 3642 times)
FyberOptic
King of Earth
Administrator
*****
Posts: 2521


Oh god what is that?


WWW
« on: October 05, 2012, 12:40:24 AM »

Thought I'd make a topic about FTL since I've been reversing the crap out of it.  I'll drop in the prof.sav file format first, which is normally at My Documents\My Games\FasterThanLight\prof.sav:

Code:
int - 0x00000004
int - number of achievements to follow
achievements[]:  
   - int - ID string length
   - char[] - achievement ID string
   - int - difficulty achieved on (0 for easy, 1 for normal)
int[9] - unlocked ships (1 for unlocked)
int[3] - unlocks for unused ship slots???
int - number of top score entries to follow
score_entries[]:
- int - ship name length
- char[] - ship name string
- int - ship type ID string length
- char[] - ship type ID string
- int - score
- int - sector
- int - victory (1 if yes)
- int - difficulty (0 normal, 1 easy)
int - number of ship best entries to follow
ship_best_entries[] - same format as score_entries
int - Most Ships Defeated
int - Total Ships Defeated
int - Most Beacons Explored
int - Total Beacons Explored
int - Most Scrap Collected
int - Total Scrap Collected
int - Most Hired Crew
int - Total Hired Crew
int - Total Games Played
int - Total Victories
crew_records[5]: (Most Repaired, Most Combat Kills, Most Piloted Evasions, Most Jumps Survived, Most Skill Masteries)
- int - skill value
- int - crewman's name length
- char[] - crewman's name
- int - race ID string length
- char[] - race ID string
- int - ??? difficulty? (usually 1)


I figured out basically 99% of it, which should be enough to edit or even recreate.  If you're just looking to cheat (like I was!) then you'll need a list of the achievements IDs to add, which are as follows:

Code:
ACH_SECTOR_5
ACH_SECTOR_8
ACH_WIN_EASY
ACH_WIN_NORMAL
ACH_UNLOCK_ALL
ACH_SCRAP
ACH_SHIPS
ACH_NO_UPGRADES
ACH_PACIFIST
ACH_NO_REPAIR
ACH_NO_MISSILES
ACH_NO_DRONES
ACH_NO_BUYING
ACH_NO_DEATH
ACH_BURNING
ACH_BAD_DODGING
ACH_ONE_VOLLEY
ACH_BOARDING_DRONE
ACH_INVADE_SHIP
ACH_SLICE_DICE
ACH_SUFFOCATE
ACH_UNITED_FEDERATION
ACH_FULL_ARSENAL
ACH_TOUGH_SHIP
ACH_ENERGY_SHIELDS
ACH_ENERGY_POWER
ACH_ENERGY_MANPOWER
ACH_STEALTH_DESTROY
ACH_STEALTH_AVOID
ACH_STEALTH_TACTICAL
ACH_ROBOTIC
ACH_ONLY_DRONES
ACH_IONED
ACH_ROCK_FIRE
ACH_ROCK_MISSILES
ACH_ROCK_CRYSTAL
ACH_MANTIS_CREW_DEAD
ACH_MANTIS_SLAUGHTER
ACH_MANTIS_SURVIVOR
ACH_SLUG_VISION
ACH_SLUG_NEBULA
ACH_SLUG_BIO
ACH_FED_PATIENCE
ACH_FED_DIPLOMACY
ACH_FED_UPGRADE
ACH_CRYSTAL_SHARD
ACH_CRYSTAL_LOCKDOWN
ACH_CRYSTAL_CLASH

If you want a more detailed explanation of each, look at data/achievements.xml file, which is embedded in the resource/data.dat file, to which I'll also post the format of:

Code:
Header:
     int - number of file offset entries
     int[] - file offset entries
File Entries:
     int - file content size
     int - filename length
     char[] - filename (no null terminator; usually contains Linux-style pathnames also)
     char[] - file content

The resource/resource.dat file uses the same format.

I guess I should also mention that an "int" is always a 32-bit signed value in the above.  I didn't conclude that ALL of them are signed, but I know for a fact that some (like your amount of scrap) are, to which I assume the developer probably used that quite often.
« Last Edit: October 05, 2012, 01:04:03 AM by FyberOptic » Logged
FyberOptic
King of Earth
Administrator
*****
Posts: 2521


Oh god what is that?


WWW
« Reply #1 on: October 05, 2012, 11:39:47 PM »

I've been working on deciphering the continue.sav file, but it's slow-going.  There's obviously way more to keep track of in a save game than in a simple game config file.  But I figured out quite a bit, from the crew format, to energy levels, even the room damage and doors.

I took advantage of that in whipping the flagship.

Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.089 seconds with 18 queries.