Jump to content

[1.0.x] CrewQueue - Crew Rotation and Vacations


enneract

Recommended Posts

I've changed my setup to 1 day min, 28 day max and 45% of the mission time counting towards vacation, bit better than having a pilot do a test run with a rover at KSC, going on 1 week vacation after.

That improves things somewhat, but I would like having 0 day min option.

Though maybe a simple X hours of min mission for earning vacation would be just as good.

Link to comment
Share on other sites

I really like the idea of the mod, if only it worked.....

I'm running KSP on a 64bit Linux system.

On a virgin copy of KSP 1.0.2 I've installed CQ release 1

I start up KSP and go into a new sandbox game , the expected four kerbals are on the roster.

I load up a stock plane in the SPH and take it for a flight with two crew, jeb and bill, after landing they are reported in the astronuat complex as being available in just under 7 days - since I have not changed the CQ settings. So far everything is as I expect.

I go back into the SPH, where the same plane is ready to fly. I go to the crew selection and only valentina and bob are visible. Jeb and bill are not listed, they've vanished.

If i click through to the astronuat complex jeb and bill still do not appear.

Having read through the thread I try clicking directly on the runway from the ksp view but jeb and bill still don't appear.

I cancel the plane launch popup and open the astronuat complex, still no jeb or bill.

Elapsed time is only a few minutes.

When I read persistent.sfs I find that jeb and bill are now in state 9001 as per info in this thread.

If I edit their state to Available they are back on the roster and immediately ready to go on a mission.

How should the duration of a vacation be recorded ? I can see nothing in the persistent save file to show how long their vacation is.

There are no other files written in the saves folder.

There do not appear to be any errors in the log file.

Link to comment
Share on other sites

I really like the idea of the mod, if only it worked.....

I'm running KSP on a 64bit Linux system.

On a virgin copy of KSP 1.0.2 I've installed CQ release 1

I start up KSP and go into a new sandbox game , the expected four kerbals are on the roster.

I load up a stock plane in the SPH and take it for a flight with two crew, jeb and bill, after landing they are reported in the astronuat complex as being available in just under 7 days - since I have not changed the CQ settings. So far everything is as I expect.

I go back into the SPH, where the same plane is ready to fly. I go to the crew selection and only valentina and bob are visible. Jeb and bill are not listed, they've vanished.

If i click through to the astronuat complex jeb and bill still do not appear.

Having read through the thread I try clicking directly on the runway from the ksp view but jeb and bill still don't appear.

I cancel the plane launch popup and open the astronuat complex, still no jeb or bill.

Elapsed time is only a few minutes.

When I read persistent.sfs I find that jeb and bill are now in state 9001 as per info in this thread.

If I edit their state to Available they are back on the roster and immediately ready to go on a mission.

How should the duration of a vacation be recorded ? I can see nothing in the persistent save file to show how long their vacation is.

There are no other files written in the saves folder.

There do not appear to be any errors in the log file.

I have the same problem. Realy annoying to se the state changed to 9001 every now and then.

Any fix up for this? or I'll have to delete the mod.

Link to comment
Share on other sites

I've run a further test.

I now have a log file of about 800k and more than half of it is a CQ related errors.

[EXC 19:43:03.449] ArgumentException: The requested value 'available' was not found.
System.Enum.Parse (System.Type enumType, System.String value, Boolean ignoreCase)
System.Enum.Parse (System.Type enumType, System.String value)
ProtoCrewMember..ctor (Modes mode, .ConfigNode node, KerbalType crewType)
KerbalRoster..ctor (.ConfigNode node, Modes mode)
Game..ctor (.ConfigNode root)
GamePersistence.LoadGame (System.String filename, System.String saveFolder, Boolean haltIfIncompatible, Boolean suppressErrorMessage)
MainMenu.LoadGame ()
TextButton3D+
.MoveNext ()

This gets repeated a lot....


[LOG 19:43:35.825] [5/27/2015 7:43:35 PM][DEBUG][CrewQueue.Interface.Update][AC is spawned...]

This also gets repeated a lot, over 200 times in a single block

[LOG 19:57:15.992] [5/27/2015 7:57:15 PM][DEBUG][CrewQueue.Interface.Update][AC is spawned...]
[LOG 19:57:15.999] [5/27/2015 7:57:15 PM][DEBUG][CrewQueue.get_VacationExpiry][EXPIRY: 151793.02]
[LOG 19:57:15.999] [5/27/2015 7:57:15 PM][DEBUG][CrewQueue.Interface.Update][relabeling: Jebediah Kerman]
[LOG 19:57:15.999] [5/27/2015 7:57:15 PM][DEBUG][CrewQueue.get_VacationExpiry][EXPIRY: 151793.02]

I've got the full log and some copies of the persistence file saved at various stages while I ran the test, but 800k is too big to post here.

Enneract - nominate a method for me to send them to you please.

Interestingly the persistence file has Jeb's state change to 9001 but the ToD value is never changed to reflect the end date of his vacation.

I'm going to drop CQ from gameplay but I will happily reload it to do tests to help debug this mod.

Edit: the reason I did not see the errors yesterday was because I was looking at the wrong log file.

Edited by v8Dave
Additional info added
Link to comment
Share on other sites

perhaps a change

crewComposition = Pilot,Pilot,Tourist

let the value be comma delimited, fill slots by priority

if only 2 crew slots, it just gets pilot and pilot

if 4 slots, it gets pilot and pilot and tourist (then fills 4th slot with a random? or empty)

that said, Fill keyword to allow a slot to be whatever (after all parts have priority skills filled)

and Empty keyword to have the seat stay empty when fill button is clicked

Pilot,Scientist,Fill,Empty for 3 crew to fill 4 seats

you could even have last value extend to remaining seats of that part

so Pilot alone would fill all seats as Pilot as plugin currently does

Pilot,Empty would fill 1 pilot and keep rest of seats empty, regardless of capacity

with all this lovely suto fill, id never have to worry about crew being the wrong dudes :)

also in your current MM file, i see Pilot and Scientist, i assume Engineer and Tourist work too?

what about custom skills i add? if the above ideas get used, Fill and Empty keywords, assume rest are skill names

Link to comment
Share on other sites

Well, some users already reported the continuous hidden crew issue while using version 1.0. Unfortunately, I got that as well. :(

Enneract;

Prevented 'hidden' roster status from ever being written to saved game
By "hidden roster status", do you mean that crew not showing up at the astronaut complex (9001 issue)? Or is it something else? Thanks.
Link to comment
Share on other sites

I think the missing Kerbals problem might be tied with whether or not you have "Missing Crews Respawn" set on the Game difficulty. I did a quick test with two games. On one with no crew re spawn Jeb and Val Disappeared. On the other identical save except for Crew Respawn was one they came back after their launches after a week.

Edited by greghorst
Link to comment
Share on other sites

  • 2 weeks later...

I think the 9001 crew issue is triggered when you revert a flight.

One way to correct this issue is Edit the save game, Search and replace " 9001" (Space is important, since the save file contains a lot of numbers and at least some of them is going to be 9001. With " Available" and the missing kerbals will show up in the Astro Complex.

Link to comment
Share on other sites

I think the 9001 crew issue is triggered when you revert a flight.

One way to correct this issue is Edit the save game, Search and replace " 9001" (Space is important, since the save file contains a lot of numbers and at least some of them is going to be 9001. With " Available" and the missing kerbals will show up in the Astro Complex.

No, 9001 is deliberately used by the mod creator to mark a kerbal as unavailable. That's a fact stated in an earlier post in this thread.

I've got the logs to show that the kerbal vanishes when you do not revert a flight. I'll try reverting a flight if I'm asked to test a potential fix.

Rather than just complaining it don't work might I suggest a possible fix.

I think the kerbals vanishing off the crew roster is because KSP does not recognise 9001 as a valid state for a kerbal, so it thinks the kerbal's entry in the savegame file is invalid.

Since CrewQueue appears to store it's own information in the savegame it probably is best to set the kebal status as "Assigned" just like they are on a flight only their on vacation, then CrewQueue can make them "Available" when the vacation is finished. You could then extend the mod for contract play by allowing kerbals to be called in from vacation for a price.

Of course, I may have misunderstood what the mod is doing......

Enneract as the author of this mod is better placed than me to update the code but appears to be busy on KCT.

Can anyone point me to instructions on compiling KSP mods on linux systems that don't involve Wine or a windows on virtual machines ?

Edited by v8Dave
Link to comment
Share on other sites

Actually, I think the latest version is not supposed to use 9001 anymore.

I know for a fact that crew is still marked as being on vacation if I change 9001 to Available. If I leave them at 9001 they are simply gone, not shown as existing in any tab in the astro complex.

After a few days of missions, my Astro Plex has zero nauts left and I have to go edit my save to get them all back.

Link to comment
Share on other sites

Sorry folks, I've been gone for a bit. Another hobby has been eating my time.

I'm investigating this, but, for the sake of clarity, I'm going to walk through a quick (intended) demonstration of how this is supposed to work.

  • A mission is started.
  • A mission is ended. The duration of this mission, and the time that is ended is recorded for each crew member.
  • When you enter the AC, spawn a launch dialog at KSC, or enter the editor, the crew roster is examined and the vacation status of each member is calculated based on the duration of their last mission and when it ended.
  • If the AC was opened, then kerbals on vacation are modified to show a timer
  • If we are in the editor or a launch dialog was spawned, any kerbals on vacation are set to a roster status of 9001, hiding them from the list
  • after the AC is closed, we leave the editor, or the launch dialog is closed (in any way, including moving to a flight scene), any changes made to roster status is reverted

That being said, 9001 should definitely never be written to the save file, and even if it is, the game should discard that status and set it back to 'available' upon entering the KSC.

Anywho, as I said, investigating. I'm gonna be irritated if I made this bug worse. Saved games with the bug apparent in them would be greatly appreciated.

I think the kerbals vanishing off the crew roster is because KSP does not recognise 9001 as a valid state for a kerbal, so it thinks the kerbal's entry in the savegame file is invalid.

Since CrewQueue appears to store it's own information in the savegame it probably is best to set the kebal status as "Assigned" just like they are on a flight only their on vacation, then CrewQueue can make them "Available" when the vacation is finished. You could then extend the mod for contract play by allowing kerbals to be called in from vacation for a price.

I'm honestly not sure how 9001 is being written at all, at this point.

- - - Updated - - -

Actually, I think the latest version is not supposed to use 9001 anymore.

I know for a fact that crew is still marked as being on vacation if I change 9001 to Available. If I leave them at 9001 they are simply gone, not shown as existing in any tab in the astro complex.

After a few days of missions, my Astro Plex has zero nauts left and I have to go edit my save to get them all back.

Oh! I see what is happening, I think.

Please try this, and see if it helps?

Edited by enneract
Link to comment
Share on other sites

@Enneract: Welcome back!

I've done a few tests, here, including sub-orbital flights, orbital during a few days, switching crafts, changing to the KSC and back to the craft...

It seems to be working flawlessly now!

I also switched to the VAB scene and went looking into my save file. No 9001 values were found in Kerbals.

Thank you for the fix! :)

Link to comment
Share on other sites

@Enneract

Thanks for the fix file.

I've only run through once so far and need to take better notes on a rerun.

1) sent Jeb on a short mission. recover vehicle

2) goto astronaut complex (AC from here on), as expected Jeb has just started vacation for 7 days - I did not change the defaults ( wish I could get 7 days leave for 2 minutes work :) )

3) exit AC, goto VAB - Jeb is not on roster, which is expected.

4) exit VAB, goto AC and Jeb is not on roster - which is not expected.

5) exit AC, warp to next morning

6) goto AC, Jeb still not on roster, exit AC

7) goto VAB, use same simple rocket to throw Valentina down range at the ocean, recover

8) goto AC, Valentina is now off on 7 days leave - Jeb still missing. Exit AC

9) goto VAB, only Bill and Bob on roster, exit

10) warp forward one week on KSC view

11) goto AC, Jeb and Valentina back from vacation and back on roster.

On the first run it looks like CQ is no longer vanishing kerbals completely.

Kerbals missing from the VAB or SPH roster is what I would expect - they're on vacation.

Kerbals missing or vanishing from AC seems wrong, I'd expect them to be visible with their remaining vacation time posted. I might wait a day to have my star crew available

Could this be a timing issue ? after all I've clicked through the game to test the fix quicker than I've typed this post.

Update

Before I posted I thought I'd try again on the same game......

a) launch Jeb, on recover he's visible in the AC starting 7 days vacation. exit AC

B) got to VAB and he's off the roster. Exit VAB

c) go to AC and he's missing - only 3 kerbals now active. exit AC

d) warp forward one day. goto AC, no Jeb. exit AC

e) warp forward one day. goto AC, no Jeb. exit AC

f) warp forward one day. goto AC, Jeb's back with a few seconds less then 4 days vacation remaining. exit AC

g) goto VAB, Jeb's still off the roster. exit

h) goto AC and Jeb's vanished again !

i) repeat the warp then AC loop for 4 days so Jeb should be back, no luck.

j) got Tracking station the into AC - maybe the game reads it's persistence ? - Jeb still missing.

k) goto VAB, Jeb is on the roster ! exit VAB

l) goto AC and Jeb is visible. at this point I'll exit

There must be something about the way KSP saves and reads the kerbal data that is inconsistent.

Log file for everything in this test is going into the dropbox location I've sent to Enneract. And it's a monster 14 meg ! mostly CQ debug messages.

I've posted this publicly because I think we need someone else to see if this is repeatable. I'm on 64bit linux, maybe that it's a 64bit problem.

Link to comment
Share on other sites

Thank you for your report, v8Dave.

From your results, I decided to test a few as well, to see if the same thing would happen on Windows, using KSP x86.

I guess I found the problem's source. Or at least, I have a vague idea.

Jeb disappearing after accessing the VAB: That also happens to me, but only in one condition: When I close the VAB with the Crew Roster tab open.

So,

1) Access VAB - Access Crew Roster tab: Jeb is not there - Close VAB, open AC: Jeb is not there.

2) Access VAB - Access Crew Roster tab: Jeb is not there - Access Part List tab - Close VAB, open AC: Jeb IS there.

So, I think the mod reorganizes things when you close the roster tab, and as such, it puts Jeb back in its place.

But if you close the VAB before switching tabs, somehow the mod doesn't have time to reorganize things, and the bug happens.

--

Apart from that, I guess Enneract is already aware of the logspam when accessing the AC, and as such, causing huge output_log files.

I hope I have brought some light. :)

Edited by Kowgan
Link to comment
Share on other sites

Thanks for the effort Kowgan.

I can replicate the same non disappearance if you don't exit SPH or VAB while on the crew tab - log in dropbox as ksp01.log

I can also replicate the disappearance if you exit either building while on the crew tab.

And the re-appearance if you exit having switched away from the crew tab. Dropboxed as ksp02.log

It's pleasing to know it's not just me !!

Also reassuring it is happens in both KSP x86 and KSP x86_64

The log files are always going to be huge if you having full debug output enabled and run the game for any time.

Hopefully this helps Enneract understand what might be tripping up the mod.

Link to comment
Share on other sites

  • 2 weeks later...
Guest
This topic is now closed to further replies.
×
×
  • Create New...