Jump to content

[.25.x] RealRoster - Editor Crew Tab Fixed


enneract

Recommended Posts

Overview:

Have you ever assigned a crew to your vessel, only to change one pesky solar panel before launch and find that your vessel is once again crewed by those damn orange-suits? Me too! That's why I created RealRoster. With RealRoster, crew assignments will persist throughout your editing session, allowing you to build, tweak, and re-build to your heart's content without needing to remember to double-check the crew tab one last time before launch!

This is one of the features announced for the next version of KSP, but you don't have to wait!

This mod also lets you modify the crew which is assigned by default to any craft. There are 4 modes included with the mod as of yet.

  • Default Crew - This functions exactly the same as default behavior, use this if you do not want to change default crew selection.
  • No Crew - All craft will be created with no pre-selected crew.
  • Random Crew - A random assortment of crew will be assigned to the first pod.
  • Rotate Crew - The crew who have gone the longest without being in space will be assigned to the first pod.

Additionally, you can define a blacklist of crew who should never be automatically assigned to a craft. All of the included selection modes will respect this blacklist.

Installation - Simply extract the zip into your GameData directory.

The folder structure has changed as of 'V2' of RealRoster.

If you have a previous version installed (ie, one that is located at ../GameData/Enneract/RealRoster), you need to delete it before installing the new version.

Uninstallation - Delete the 'RealRoster' directory.

Configuration

This mod supports Blizzy's Toolbar, but does not include it in the download. With the Toolbar installed, you will have a configuration button available in the VAB\SPH and Space Center. The configuration options should be fairly self-explanatory.

Manual configuration

Manual configuration is not supported. However, if you want to be adventureous and try to configure the mod without the toolbar, look in your persistent.sfs file for your saved game, and look for a Scenario entry with a name of 'RealRosterSettings'. Blacklist entries should be in the form 'kerbal = <Name> Kerman'. Allowed entries for CrewSelectionMode are 'Default Crew', 'No Crew', 'Random Crew', and 'Rotate Crew'.

Known Issues:

'Rotate Crew' mode does not work yet.

Changelog

Beta 1 - initial re-release. No crew randomization, but full user-change persistence.

RC1 - added auto-crewing, added configuration options (disable auto-crew, disable randomization, blacklist).

RC2 - added Toolbar integration (Ebs).

.25-rev0 - Updated for .25, Toolbar integration is now optional.

.25-rev1 - Removed automatic crew recruitment, enabled toolbar button in editor

.25-rev2 - Added crew rotation (Starwaster), fixed bugs in cases where toolbar is not installed.

.25-v2-Beta1 - Rewrite for future compatibility. Settings simplified, Crew Selection Modes implemented. Initial crewing of loaded craft files, and direct launches is now modified.

Download

[Download RealRoster v2.1 for KSP .25.x]

License

This mod is licensed under the MIT license. Source code is available at GitHub.

With that said, special thanks to Vendan of DebRefund and MachXXV of EditorExtensions, both of whom provided wonderful examples of how to write this type of plugin. I do not believe that the code which is shared between our plugins is non-trivial enough to warrant license inheritance, but if either of you disagree, please PM me.

Edited by enneract
reasons.
Link to comment
Share on other sites

That license is great! A bit crude in terms of language, but very amusing!

I'll check this out since having the orange suits always crewing things is indeed annoying and I'd like to circulate my crew in career mode, much like you see IRL.

Link to comment
Share on other sites

I don't really like the fact that more crew members will be hired, though. But other than that, noble intention!

Vanilla does this. I can't completely disable it, only make it more consistent.

What is happening behind the scenes is that the crew lists are still getting reset every time you do something, I'm just watching for changes made between those resets (ie, when you actually change things on the crew menu), saving those changes, and restoring them every time the base game screws with the roster. The base game will happily hire people when you first place that pod if you are short on crew, and I can't stop it (or even really detect when it does it).

Wait, actually, maybe I can. But it would be pretty gross. Basically, I could monitor when the pool of available crew increases on editor updates, and then 'kill\fire' the new ones each time. No guarantees on how any 'kerbal salary' mods would take this.

Edited by enneract
Link to comment
Share on other sites

Vanilla does this. I can't completely disable it, only make it more consistent.

What is happening behind the scenes is that the crew lists are still getting reset every time you do something, I'm just watching for changes made between those resets (ie, when you actually change things on the crew menu), saving those changes, and restoring them every time the base game screws with the roster. The base game will happily hire people when you first place that pod if you are short on crew, and I can't stop it (or even really detect when it does it).

Wait, actually, maybe I can. But it would be pretty gross. Basically, I could monitor when the pool of available crew increases on editor updates, and then 'kill\fire' the new ones each time. No guarantees on how any 'kerbal salary' mods would take this.

Well, that explains why there was suddently a Kulfrey Kerman in a previous save file when the only ones I had were the orange trio.

Anyway, I love how you added the ability to make the crew section begin empty from the start. That's how it should've been!

Link to comment
Share on other sites

Wait, actually, maybe I can. But it would be pretty gross. Basically, I could monitor when the pool of available crew increases on editor updates, and then 'kill\fire' the new ones each time. No guarantees on how any 'kerbal salary' mods would take this.

I would recommend to not add even more "hack".

The squad code is an ugly bruteforce kludge.

Your solution is an ugly bruteforce counterkludge.

Try to keep things horrible, instead of turning them into a lost case.

Link to comment
Share on other sites

I would recommend to not add even more "hack".

The squad code is an ugly bruteforce kludge.

Your solution is an ugly bruteforce counterkludge.

Try to keep things horrible, instead of turning them into a lost case.

Yea..... Pretty much.

- - - Updated - - -

And total commander thinks so too. Wrong filename extension maybe?

Works fine here. Not sure why you are getting a problem. Try redownload.

Edited by enneract
Link to comment
Share on other sites

Tried about 10 times now.

Did you perhaps pack this with winzip, and used some special algo/format of them, that isn't actually zip but still called like that? (i vaguely remember something like that)

Link to comment
Share on other sites

I don't like a "randomizer", but I'd prefer that the Kerbals I pick STAY picked... so sick of assigning a Kerbal to fly a jet, just to see Jeb, and resort in me cartoonishly yelling "GET OUT OF THERE, JEB, OR YOU'RE FIRED!!!"

I'm a wee bit sad, I know.

Link to comment
Share on other sites

Works fine here. Not sure why you are getting a problem. Try redownload.

I tried that. 7zip opened it, but Windows 7 did not. MD5 is 7bfe0dd8dba2805ceafc43fc705c67cf?

EDIT: 7zip thinks it's a 7z file.

EDIT EDIT: Hex editor confirms: it has the magic numbers of a 7z file. It's a misnamed 7z.

Edited by cpast
Link to comment
Share on other sites

I don't like a "randomizer", but I'd prefer that the Kerbals I pick STAY picked... so sick of assigning a Kerbal to fly a jet, just to see Jeb, and resort in me cartoonishly yelling "GET OUT OF THERE, JEB, OR YOU'RE FIRED!!!"

I'm a wee bit sad, I know.

I do that every goddamn launch - i created my own favorite crew to roleplay them, and then before every damn launch, this scene happens: "Get off mah rocket jeb!"

Link to comment
Share on other sites

I tried that. 7zip opened it, but Windows 7 did not. MD5 is 7bfe0dd8dba2805ceafc43fc705c67cf?

EDIT: 7zip thinks it's a 7z file.

EDIT EDIT: Hex editor confirms: it has the magic numbers of a 7z file. It's a misnamed 7z.

Thanks! That works.

Enneract: May want to pack it as actual zip and reupload - some people don't have a 7zip capable archive app.

EDIT: That source! And i thought i'm obsessed with writing more comments than codelines in my source.

EDIT2: Earm, i just found something curious in the source:

            // Otherwise, the root part was just deleted. This 'event' might be useful in the future, but currently this is dead code.

Question: What happens when the root is changed by plugins like changeroot - or soon editorextensions? Does your plugin deal with that?

Edited by rynak
Link to comment
Share on other sites

I tried that. 7zip opened it, but Windows 7 did not. MD5 is 7bfe0dd8dba2805ceafc43fc705c67cf?

EDIT: 7zip thinks it's a 7z file.

EDIT EDIT: Hex editor confirms: it has the magic numbers of a 7z file. It's a misnamed 7z.

Whoops!

10char

- - - Updated - - -

I don't like a "randomizer", but I'd prefer that the Kerbals I pick STAY picked... so sick of assigning a Kerbal to fly a jet, just to see Jeb, and resort in me cartoonishly yelling "GET OUT OF THERE, JEB, OR YOU'RE FIRED!!!"

I'm a wee bit sad, I know.

Look at the instructions for the config file. Randomization can be disabled.

Link to comment
Share on other sites

Thanks! That works.

Enneract: May want to pack it as actual zip and reupload - some people don't have a 7zip capable archive app.

In progress.... aaand done.

EDIT: That source! And i thought i'm obsessed with writing more comments than codelines in my source.

EDIT2: Earm, i just found something curious in the source:

            // Otherwise, the root part was just deleted. This 'event' might be useful in the future, but currently this is dead code.

Question: What happens when the root is changed by plugins like changeroot - or soon editorextensions? Does your plugin deal with that?

Thanks, I wanted someone else to be able to update it if needed.

As to that specific line... no idea, undefined behavior atm. It would *probably* still work, due to the way that selectroot rebuilds the tree, but if I ever did anything with that 'event', I would definitely test against that scenario.

My original implementation needed to be 'reset' when the root was deleted, thats the only reason that is there. When I switched to keeping a Dictionary of Parts and ProtoCrewMember[], that became unneeded.

Edited by enneract
Link to comment
Share on other sites

Oooh, I really like this. The random crew assignment would guarantee my download by itself, but stopping Jeb from sneaking back into the rocket? That's fantastic!

I hope you like it :)

Let me know if anything behaves unexpectedly.

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...