[Spoiler] FTL Profile/SavedGame Editor v27 (2018-01-12)

All your guides, strategy discussions, request for help on how to play go here. Please use [SPOILER] if relevant.
Russian Rockman
Posts: 819
Joined: Fri Jan 10, 2014 11:43 pm

Re: [Spoiler] FTL Editor v23 - Unlock ships, Edit SavedGames

Postby Russian Rockman » Wed May 21, 2014 6:32 pm

Vhati wrote:
Russian Rockman wrote:You may very well save Open Artillery and the CE artillery!!! Since right now buying artillery at a store will corrupt the save file and prevent you from continuing if you save and quit.

Could you provide a corrupted "continue.sav" for me to examine?

Saves from before AND after the purchase would be even better.



Glad you asked. I'll get right on that.

EDIT: Here you go!!! Please tell me if you find anything interesting. Good Luck, and thanks! :mrgreen:
https://www.dropbox.com/s/lw0ssumq3gk7tu5/Before%20and%20After%20Artiller%20Purchase%20saves.zip
In case you need to know I had the Mod Testing Environment installed and Open Artillery on top of that. I included those mod files in the .zip file above in case you need them for whatever reason.

Also here is what Sleeper had to say to Matthew on the issue.
Sleeper Service wrote:1.: artillery start="false"
The tag start="false" on artillery systems causes crashes if ships are loaded that happen to have the artillery system installed. For enemy ships, this means that encountering them with the artillery will cause crashes. That can be prevented by simply forcing them to always have the artillery, like that:
<artillery power="1" max="1" room="8" start="true" weapon="BA_ARTILLERY_ENERGY_ENEMY" />
This will actually work, the game only seems to have problems if the original start tag was set to "false" and the enemy gets rolled an artillery system.
The problem is that this crash behaviour applies to player ships as well. Aditionall player ship artillery that can be bought in shops works flawlessly, until you try to load a savegame with a ship which the player bough the artillery for. You can easily reproduce this by setting the Fed A artillery to start="false" and making the artillery system available in shos. After purchasing the artillery and saving the game, loading it will result in crashes.
Both Captains Edition and the Open Artillery mod created custom player artillery for all player ships. We just now realized that buying it basically prevents save+quit from working, which is a huge and unexpected drawback with no real workaround.
Vhati
Posts: 792
Joined: Thu Oct 25, 2012 12:01 pm

Re: [Spoiler] FTL Editor v23 - Unlock ships, Edit SavedGames

Postby Vhati » Wed May 21, 2014 8:15 pm

Russian Rockman wrote:
Vhati wrote:Could you provide a corrupted "continue.sav" for me to examine?

Saves from before AND after the purchase would be even better.

Here you go!!! Please tell me if you find anything interesting.

Also here is what Sleeper had to say to Matthew on the issue.
Sleeper Service wrote:For enemy ships, this means that encountering them with the artillery will cause crashes.
[...]
After purchasing the artillery and saving the game, loading it will result in crashes.


The file's structure is valid, no missing bytes. The editor can load the 'corrupt' saved game without error and dump its contents.

The parts that changed after buying were exactly what I would have inserted with the editor: Basic system info in the middle for its power and such, and extended system info at the end for the extra weapon. Both chunks were no different than a vanilla fed ship at the beginning of the game.

Literally the only other changes between the two files were: store_purchase++, higho2++, store sold out of artillery, and player's scrap.

So the problem with [artillery start="false"] is in FTL's loading/ship-spawning code, not the saved game. :|
FTL must be constructing the player ship properly in the hangar and the start of the game.
Comparing with the code for that might be fruitful.
Russian Rockman
Posts: 819
Joined: Fri Jan 10, 2014 11:43 pm

Re: [Spoiler] FTL Editor v23 - Unlock ships, Edit SavedGames

Postby Russian Rockman » Thu May 22, 2014 1:22 am

Vhati wrote:
Russian Rockman wrote:
Vhati wrote:Could you provide a corrupted "continue.sav" for me to examine?

Saves from before AND after the purchase would be even better.

Here you go!!! Please tell me if you find anything interesting.

Also here is what Sleeper had to say to Matthew on the issue.
Sleeper Service wrote:For enemy ships, this means that encountering them with the artillery will cause crashes.
[...]
After purchasing the artillery and saving the game, loading it will result in crashes.


The file's structure is valid, no missing bytes. The editor can load the 'corrupt' saved game without error and dump its contents.

The parts that changed after buying were exactly what I would have inserted with the editor: Basic system info in the middle for its power and such, and extended system info at the end for the extra weapon. Both chunks were no different than a vanilla fed ship at the beginning of the game.

Literally the only other changes between the two files were: store_purchase++, higho2++, store sold out of artillery, and player's scrap.

So the problem with [artillery start="false"] is in FTL's loading/ship-spawning code, not the saved game. :|
FTL must be constructing the player ship properly in the hangar and the start of the game.
Comparing with the code for that might be fruitful.



Hmm... Crazy idea, but what if we could have a file that changes all of the ship blueprints to artillery start="true"? You could play the game normally until you buy artillery, but in the event that you buy artillery and have to save and quit you run the mod manager again and install a "patch" which would allow you to load up the game again with the same mods, but the ship blueprints changed. I'm not sure exactly how changing blueprints mid game works, but everything else works fine. For example updating CE in the middle of a run.


EDIT: Tested this and it apparently doesn't work. :cry: Though I'm not really sure why. The next thing I would like to try is starting the game with artillery installed and then removing it with the magic of your editor. Perhaps then if it were bought at a store later on it would not crash the game.

Damn. I was really hoping that would work. I tried installing a "patch" before and after buying artillery at a store but the game still crashed both times.
Vhati
Posts: 792
Joined: Thu Oct 25, 2012 12:01 pm

Re: [Spoiler] FTL Editor v23 - Unlock ships, Edit SavedGames

Postby Vhati » Thu May 22, 2014 1:59 am

Russian Rockman wrote:what if we could have a [mod] that changes all of the ship blueprints to artillery start="true"? You could play the game normally until you buy artillery, but in the event that you buy artillery and have to save and quit, you run the mod manager again and install a "patch" which would allow you to load up the game again[/blockquote]That would probably get it going again. :roll:

Russian Rockman wrote:I'm not sure exactly how changing blueprints mid game works

For the most part, it's out-of-sight, out-of-mind. String IDs, referring to resources, are used for what's at the current beacon, or to a lesser extent, where you've been, in the current sector. The IDs must exist, but details of xml they point to can vary to some extent. So there's room for sleight of hand.

The following spring to mind...
  • For beacons visited, ShipEvent IDs of enemies you've fled, stores' item IDs.
  • Player/nearby ships' ShipBlueprints have got to allow all currently installed systems.
  • Player/nearby ships' layouts must have exactly the same number of doors and rooms.
  • Equipped weapon IDs.
  • Equipped drone IDs, and drone types must match (I think).
  • Augment IDs.
  • Cargo IDs (only the ID is stored, so they can point to anything).
  • Anims/sounds for projectiles in flight and about to be fired.
  • Crew tints might get wonky if changed.
Changing that one little boolean should be harmless.


Edit: Darn.
Russian Rockman wrote:Tested this and it apparently doesn't work. [...] The next thing I would like to try is starting the game with artillery installed and then removing it with the magic of your editor.

Somehow FTL is behaving differently between
  • Loading/spawning an artillery ship when start="true".
  • Loading/spawning an artillery ship when start="false".
The saved game really looks fine (and corruption wouldn't explain enemy crashes anyway). If it's not that boolean (and the patch you just tried wasn't typoed), there must be some other factor - involving the code and/or xml.
Russian Rockman
Posts: 819
Joined: Fri Jan 10, 2014 11:43 pm

Re: [Spoiler] FTL Editor v23 - Unlock ships, Edit SavedGames

Postby Russian Rockman » Thu May 22, 2014 2:34 am

Well I think it has something similar to do with how changing artillery start="true" mid game doesn't actually give you an artillery system. I think the game doesn't care about the start blueprint once you've already started a run. The only thing that can causes issues is if you mess with img resources and the ship.xml file (I think). But that's why I thought starting a game with artillery = "true" and then removing it and buying it later "might" work, maybe... possibly... potentially... I know I didn't typo the patch. All I changed was all false to true. :?
Vhati
Posts: 792
Joined: Thu Oct 25, 2012 12:01 pm

Re: [Spoiler] FTL Editor v23 - Unlock ships, Edit SavedGames

Postby Vhati » Thu May 22, 2014 3:17 am

Russian Rockman wrote:But that's why I thought starting a game with artillery = "true" and then removing it and buying it later "might" work, maybe... possibly... potentially...

What happens if you mod a Fed cruiser to not start with artillery, then buy it later and save+quit?

The load/spawn code might be doing something special just for certain shipBlueprints.
Russian Rockman
Posts: 819
Joined: Fri Jan 10, 2014 11:43 pm

Re: [Spoiler] FTL Editor v23 - Unlock ships, Edit SavedGames

Postby Russian Rockman » Thu May 22, 2014 4:52 am

Vhati wrote:
Russian Rockman wrote:But that's why I thought starting a game with artillery = "true" and then removing it and buying it later "might" work, maybe... possibly... potentially...

What happens if you mod a Fed cruiser to not start with artillery, then buy it later and save+quit?

The load/spawn code might be doing something special just for certain shipBlueprints.


Nope, Sleeper says the Federation Cruiser will also crash if you make it start without artillery

Unrelated question: Will we be able to obtain more than 8 systems by using the Editor once you get systems working?
Vhati
Posts: 792
Joined: Thu Oct 25, 2012 12:01 pm

Re: [Spoiler] FTL Editor v23 - Unlock ships, Edit SavedGames

Postby Vhati » Thu May 22, 2014 5:25 am

Russian Rockman wrote:Will we be able to obtain more than 8 systems by using the Editor once you get systems working?

I have to get em working in the editor before I can try. :P

Ultimately getting systems working means adding the relevant bytes to the file, when a system's power capacity goes above 0. A saved game has placeholders for ALL system types, just to say they're at 0 capacity. I see no technical reason why my app should treat the 8th and 9th system differently.

But I can't predict what FTL will do when it sees an abnormal situation.
If it crashes, I'll nerf the editor. :roll:
huffpuff1337
Posts: 12
Joined: Fri Feb 15, 2013 12:02 pm

Re: [Spoiler] FTL Editor v23 - Unlock ships, Edit SavedGames

Postby huffpuff1337 » Mon May 26, 2014 7:33 pm

This is terrible.
I can't load my saved game with ANY ship when I start even though I'm loading continue.sav.
Help anyone?
No?
Screw you then.
User avatar
ih8ih8sn0w
Posts: 7
Joined: Thu May 22, 2014 3:52 pm

Re: [Spoiler] FTL Editor v23 - Unlock ships, Edit SavedGames

Postby ih8ih8sn0w » Mon May 26, 2014 7:52 pm

Profile Parser Error

Code: Select all

Profile Parser Error

Hashes did not match after a mock write.

Editor Version: 23
OS: Windows Vista 6.0
VM: Java HotSpot(TM) Client VM, 1.7.0_55, x86


File ("ae_prof.sav")...

Code: Select all

0900000002000000150000000c0000004143485f534543544f525f3500000000
0c0000004143485f534543544f525f3800000000090000004143485f53435241
50000000000f0000004143485f4e4f5f5550475241444553000000000d000000
4143485f4e4f5f524550414952000000000f0000004143485f4e4f5f4d495353
494c4553000000000d0000004143485f4e4f5f44524f4e4553000000000c0000
004143485f4e4f5f4445415448000000000e0000004143485f534c4943455f44
494345000000000d0000004143485f535546464f434154450000000010000000
4143485f46554c4c5f415253454e414c00000000120000004143485f454e4552
47595f534849454c445300000000130000004143485f454e455247595f4d414e
504f574552000000000f0000004143485f4f4e4c595f44524f4e455300000000
090000004143485f494f4e454400000000100000004143485f4645445f504154
49454e4345000000000f0000004143485f4645445f5550475241444500000000
130000004143485f4c414e4955535f414456414e434544000000001900000050
4c415945525f534849505f535445414c54485f51554553540000000015000000
504c415945525f534849505f4645445f51554553540000000018000000504c41
5945525f534849505f454e455247595f51554553540000000001000000000000
0001000000000000000000000000000000010000000000000001000000000000
0000000000000000000000000000000000010000000000000000000000000000
00010000000000000000000000000000000000000000000000050000000a0000
00546865204f73707265790f000000504c415945525f534849505f464544a309
0000080000000000000000000000010000000a000000546865204f7370726579
0f000000504c415945525f534849505f46454468090000080000000000000000
000000010000000f0000005468652041646a7564696361746f7212000000504c
415945525f534849505f454e4552475955090000080000000000000000000000
000000000900000054686520546f72757312000000504c415945525f53484950
5f434952434c4545090000080000000000000000000000010000000900000054
686520546f72757312000000504c415945525f534849505f434952434c454509
0000080000000000000000000000010000001b0000000b000000546865204b65
737472656c10000000504c415945525f534849505f484152443d090000080000
000000000000000000010000000b000000546865204b65737472656c10000000
504c415945525f534849505f484152445e080000080000000000000000000000
010000000b000000546865204b65737472656c10000000504c415945525f5348
49505f4841524433060000070000000000000000000000010000000b00000054
6865204b65737472656c10000000504c415945525f534849505f484152441a03
0000030000000000000000000000010000000b000000546865204e6573617369
6f13000000504c415945525f534849505f535445414c5448b604000005000000
0000000000000000010000000900000054686520546f72757312000000504c41
5945525f534849505f434952434c454509000008000000000000000000000001
0000000900000054686520546f72757312000000504c415945525f534849505f
434952434c454509000008000000000000000000000001000000090000005468
6520546f72757312000000504c415945525f534849505f434952434c45450900
00080000000000000000000000010000000900000054686520546f7275731200
0000504c415945525f534849505f434952434c45450900000800000000000000
00000000010000000a000000546865204f73707265790f000000504c41594552
5f534849505f464544a3090000080000000000000000000000010000000a0000
00546865204f73707265790f000000504c415945525f534849505f4645446809
0000080000000000000000000000010000000a000000546865204f7370726579
0f000000504c415945525f534849505f464544b5070000060000000000000000
000000010000000a000000546865204f73707265790f000000504c415945525f
534849505f464544e70200000300000000000000000000000100000005000000
4e69736f7311000000504c415945525f534849505f4645445f32b90400000400
0000000000000000000000000000050000004e69736f7311000000504c415945
525f534849505f4645445f322604000003000000000000000000000000000000
050000004e69736f7311000000504c415945525f534849505f4645445f320a00
000001000000000000000000000000000000050000004e69736f731100000050
4c415945525f534849505f4645445f320a000000010000000000000000000000
010000000f0000005468652041646a7564696361746f7212000000504c415945
525f534849505f454e4552475955090000080000000000000000000000000000
000f0000005468652041646a7564696361746f7212000000504c415945525f53
4849505f454e4552475902070000050000000000000000000000000000000f00
00005468652041646a7564696361746f7212000000504c415945525f53484950
5f454e455247592f040000050000000000000000000000010000000f00000054
68652041646a7564696361746f7212000000504c415945525f534849505f454e
455247598300000001000000000000000000000001000000070000004e6f6574
68657214000000504c415945525f534849505f454e455247595f32d705000005
000000000000000000000001000000070000004e6f657468657214000000504c
415945525f534849505f454e455247595f32a302000002000000000000000000
000001000000050000004b72756f7315000000504c415945525f534849505f41
4e4145524f424943790800000800000000000000000000000100000005000000
4b72756f7315000000504c415945525f534849505f414e4145524f424943bc06
000006000000000000000000000001000000050000004b72756f731500000050
4c415945525f534849505f414e4145524f4249431d0400000400000000000000
0000000001000000050000004b72756f7315000000504c415945525f53484950
5f414e4145524f4249431a040000040000000000000000000000010000001700
0000860100005700000017060000fd040000a04b00000b000000d30000002a00
0000000000001d000000070000004c61676172646904000000656e6769010000
000c00000004000000456f696e04000000726f636b010000009b000000060000
004d612046616e0500000068756d616e01000000560000000600000054616920
596906000000656e6572677901000000060000000d00000048656e72696b2041
617374656409000000616e6165726f62696301000000
Discord: ih8ih8sn0w\:blue_heart:#9183 get the blue heart here: https://emojipedia.org/blue-heart/