Jump to content

Rescue Contract Valid and Accepted But No Target


Recommended Posts

KSP 1.0.5 (32-bit), Win7 64-bit.

I have accepted two contracts to rescue two Kerbals in Kerbin space.  The contracts have not expired and appear in the persistence.sfs file (one of the two shown below):

			CONTRACT
			{
				guid = 566fc4c5-cb64-4568-a9fe-b3a3a527acc7
				type = RecoverAsset
				prestige = 1
				seed = -969639777
				state = Active
				agent = Kerbodyne
				deadlineType = Floating
				expiryType = Floating
				values = 64800,46008000,29250,66825,29250,0,12,12,489853.502246291,425477.642246686,46433477.6422467,0
				targetBody = 1
				kerbalName = Corbles Kerman
				partName = USI.MiniRover
				partID = 1885108082
				recoveryLocation = 2
				recoveryType = 1
				gender = 1
				PARAM
				{
					name = AcquireCrew
					state = Incomplete
					values = 7425,0,0,5,0
					title = Save Corbles Kerman
					winOn = 0
					kerbal = Corbles Kerman
				}
				PARAM
				{
					name = RecoverKerbal
					state = Incomplete
					values = 0,0,0,0,0
					title = Recover Corbles Kerman on Kerbin
					failOn = All
					winOn = All
					kerbal = Corbles Kerman

However, I cannot find the target craft using either map mode, the tracking station of KER (Rendezvous window).  I've ensured that the appropriate filters are on in the tracking station and map mode.  They did appear at least one since contract acceptance.  Where did they go and how do I get them back?

The only thing I can think of is at one point, recently, I removed the USI mods and reinstalled only some of them.  I then got errors on loading the save that craft files couldn't be loaded because of missing parts files so i completed the USI install (it was the survivability pack that I'd missed).  Everything else is working well.

Don't know if it helps but the output log shows:

Crewmember Corbles Kerman has respawned!
 
(Filename: C:/buildslave/unity/build/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 56)

Crewmember Johnfry Kerman has respawned!
 
(Filename: C:/buildslave/unity/build/artifacts/StandalonePlayerGenerated/UnityEngineDebug.cpp Line: 56)

Any recommendations?  I'd rather go get them so should I just manually remove the contracts from the save and add the Kerbals to my roster?  I don't want to suffer the failure if this isn't my in-game fault.

Edited by Brigadier
Link to comment
Share on other sites

Yah, you borked it. They were orbiting in USI-specific parts that you have now uninstalled.

Do you have a "pristine"  version of your save file from before doing your mod tinkering? If so, you could edit the save file to alter their wrecks to be something stock, like a Mk1 command pod. Then you can uninstall stuff unimpeded.

Otherwise, yeah, you'll need to just edit them into your roster or something.

Link to comment
Share on other sites

13 minutes ago, Brigadier said:

If I just remove the contract sections, will that solve the problem?

More to the point, will it cause any other problems.  And the answer to both questions is, "I don't know."  ;)

I tend to be very cautious about altering save files-- it's easy to munge things, the design is not super fault tolerant and there can be cross-dependencies between sections in unexpected places, so I try to avoid doing surgery on areas that I don't understand especially well.

Tinkering with contracts is an area that I've steered clear of, not so much because I know it to be a nightmare, as that I've never investigated it and don't know that it isn't.  A guilty-until-proven-innocent sort of thing.

The suggestions I've given are ones that I've done myself and appear to be fairly benign.  It may be that tinkering with contracts is benign too, but I can't say for sure because I've never taken the time to look into it myself.  So if you decide to go that route, I'd suggest proceeding with caution, and either take the time to analyze the structure of the save file yourself, or find someone who has done so and can give better advice than I can.

Link to comment
Share on other sites

Thanks for the advice.  On the thread of your last para, where might I find the parameter definitions for the Roster and Contracts sections (or any others for that matter)?

If you don't know, that's fine.  It seems that I might just lift parameter values from other owned Kerbals so that shouldn't be much of a problem.  I think there's a completed contracts section, too, so I might look there for help.

Copying the persistence.sfs file....

Link to comment
Share on other sites

30 minutes ago, Brigadier said:

Thanks for the advice.  On the thread of your last para, where might I find the parameter definitions for the Roster and Contracts sections (or any others for that matter)?

Beats the sam heck out of me.  Would love to know.  If you find out, let us know?  :)

I've never seen any thorough documentation for the save file format-- whenever I've done save-file tinkering, it's been a matter of just reading the save files themselves and reverse-engineering them by deducing what the different things mean.

In terms of crew rosters:  I believe that any kerbal in the game shows up in one and, potentially, two places.

First, there's a crew roster that lists every single kerbal and what their "status" is (e.g. "available" meaning they're sitting around in the astronaut complex waiting for a flight, or "assigned" meaning out in a ship somewhere, or some other value meaning "killed in action", etc.), along with their various characteristics such as name, experience, etc.  So if there's a kerbal somewhere other than "available", you can yank them back home to the astronaut complex by editing the field to say "available" instead of "assigned" or whatever.

In addition to the info in the roster, a kerbal will also have an additional reference elsewhere in the file if they're currently crewing a ship:  they'll show up in the ship itself where it says who's on board.  So if you're moving somebody out of a ship back to the astronaut complex, you'll need to not only change their status in the roster to "available", but also delete them from the crew description of the particular ship.

Finally:  If there's a kerbal whose existence is tied to a particular contract (i.e. "rescue Foobly Kerman from low Kerbin orbit" or whatever), then I expect there would probably be a reference to the kerbal in that contract, so presumably some sort of surgery would be needed there, too.  However, as I've said, I've never really looked at the data structures surrounding contracts, so I don't know what sort of surgery would be needed.  Perhaps something as simple as deleting the contract.

Link to comment
Share on other sites

I will post here what I do and find out.

First thing discovered is that there's a 'tutorial' on modifying Kerbals at this KSP wiki entry.  It's not particularly detailed but it's a start.

Edit: However, lo and behold, also on the wiki is this article which purports to describe the full config file syntax.  I urge you to make a comment in the discussion page to encourage the author to continue updating this work.  While it doesn't speak directly to save files, the parameters are probably identical.

Edited by Brigadier
Clarification
Link to comment
Share on other sites

1 hour ago, Brigadier said:

Edit: However, lo and behold, also on the wiki is this article which purports to describe the full config file syntax.  I urge you to make a comment in the discussion page to encourage the author to continue updating this work.  While it doesn't speak directly to save files, the parameters are probably identical.

Warning, that's documentation for the .CFG file format and not the .SFS file format.  They're not quite the same thing.

Very similar, yes, but not quite the same thing.  They're the same syntactically (in terms of usage of curly braces, equals signs, etc.), but don't necessarily have the same content.  Parameters differ.

As for commenting on discussion pages and the like... feel free to do so, I rather doubt it'll make much difference.  The wiki is notoriously patchy and out of date-- it hasn't aged well in the last year or two.  I assume it's just a matter of the Powers that Be not having the spare bandwidth to keep the wiki up to date. The problem isn't that folks don't know it's outdated.  ;)

Edited by Snark
Link to comment
Share on other sites

Situation

A rescue contract for a Kerbal in LKO was accepted in Mission Control.  Subsequently, a part was removed inadvertently by uninstalling a mod.  On the next load of the save, the craft could not be loaded because of a missing part.  The mod was re-installed without errors and the part was visible.  The rescue contract persisted but the target vessel, which depended on the removed/replace part, disappeared.  The Kerbal (a ‘lost’ Kerbal) in the contract target vessel remains in the save file but can’t be located.

Task

Repair the save file (persistent.sfs) to:

1.       Remove the contract; and

2.       Recover the Kerbal such that they are available.

The contract rewards do not have to be awarded.  The contract does not have to be listed as completed.

Execution

1.       Navigate to the applicable save folder;

2.       Backup the persistent.sfs file for safety;

3.       Open the save file for editing to remove the contract:

a.   Locate the CONTRACT block containing the Kerbal (try searching for the Kerbal’s name)

b.  Save the Contract guid parameter for later.  It should be the first line in the Contract section, e.g. guid = 566fc4c5-cb64-4568-a9fe-b3a3a527acc7;

c.   Select and delete the Contract block, i.e. all of the text between and including the key word “CONTRACT” and the terminating brace “}” containing the Kerbal.  There could be multiple PARAM blocks if there are multiple achievements in the contract;

d.   Remove all references to the contract

                                                               i.  Search for other entries of the contract guid that you noted in 3.b.

                                                             ii.   For users of the Contract+ mod, there will be lines with the guid embedded that reflect the contract and if you have any filters applied.  Remove any parts of the ActiveListID parameter value that contains the guid and any associated values (i.e. from the guid to the next comma, inclusive)

4.       Edit the save file to retain the Kerbal:

a.   Locate the ROSTER block in the save file.  The file will have multiple KERBAL blocks, one for each Kerbal in the save;

b.   Locate the KERBAL block for the lost Kerbal;

c.   Edit the KERBAL block:

                                                              i. Change the type parameter to Crew;

                                                             ii. Change the state parameter to Available;

                                                            iii. Change the ToD parameter to 0;

                                                           iv.  Change the idx parameter to 0;

                                                             v. Change the flight parameter in the CAREER_LOG block to 1;

                                                           vi.   Add the following text underneath the flight parameter to describe what actions the Kerbal would have undertaken to be rescued (i.e. an EVA, a deorbit, a landing on Kerbin and a recovery to the Space Center):

0 = ExitVessel,Kerbin

0 = Orbit,Kerbin

0 = BoardVessel,Kerbin

0 = Suborbit,Kerbin

0 = Flight,Kerbin

0 = Land,Kerbin

0 = Recover

                                                          vii.  Change the flight parameter in the FLIGHT_LOG block to 1

Additional Information

The KSP Wiki has a couple of articles that may be helpful:

1.       A tutorial on modifying Kerbals - http://wiki.kerbalspaceprogram.com/wiki/Tutorial:Modifing_Kerbals

2.       A configuration file syntax explanation.  This is specifically for configuration files (.cfg) and not the persistent.sfs but many of the parameters and keywords are the same. - http://wiki.kerbalspaceprogram.com/wiki/CFG_File_Documentation#Contracts_Configuration_Files

Link to comment
Share on other sites

Excellent write-up, Brigadier. Thanks for posting that for the benefit of posterity. I've voted it up to the top of the thread so that others will see it first thing.

As a follow-up, you might mark the thread as "answered."

Link to comment
Share on other sites

20 minutes ago, Brigadier said:

How do I make it answered?

Unfortunately I can't tell you for sure, because the last time I posted a thread in this forum was before the switch to the new software, and there's no way for me to see the UI because I'm not the one who posted it.  But there should be some sort of thingy (to use the technical term) up near the top to mark it as "solved."

I assume it must be not very well surfaced, since practically nobody in this forum ever marks anything as solved.  So if you don't, you're in good company.  :)

If you figure out how, let us know?

Link to comment
Share on other sites

On 2/18/2016 at 0:03 PM, Snark said:

Unfortunately I can't tell you for sure, because the last time I posted a thread in this forum was before the switch to the new software, and there's no way for me to see the UI because I'm not the one who posted it.  But there should be some sort of thingy (to use the technical term) up near the top to mark it as "solved."

I assume it must be not very well surfaced, since practically nobody in this forum ever marks anything as solved.  So if you don't, you're in good company.  :)

If you figure out how, let us know?

There is indeed a "thingy" for the best answer post that you'll want to select.  It's a check mark just above the "Vote this answer up" icon on the left side of the post.  Just so you know, as @KasperVld advised me recently, the functionality was broken over the weekend and it wasn't there.  It's been restored and is available now!

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...