Jump to content

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


enneract

Recommended Posts

In that case, do you think you could/want to see if your plugin could recognize kerbals with least number of missions from the Final Frontier mod and put them first? I know that's kind of a big order.

That, or variations of it, has been a pretty frequent request.

I'm ambivalent about it, though, to be entirely honest. I haven't been able to settle on criteria which really suit me. The original point was to prevent seeing the same three Kerbals every mission, but if we wanted to be 'realistic' about it, you wouldn't send your most amateur astronauts on every mission, right?

I would like to do something like some percentage of auto-crew (probably 1/3) was from the most-experienced half of the roster, and some percentage was from the least-experienced half of the roster, but I can't make up my mind on the specifics, and so it doesn't get implemented.

I think the best thing I might do in the immediate future is do the 'plumbing' for user-selectable selection criteria. Then it should be pretty trivial to implement a variety of algorithms.

Edited by enneract
Link to comment
Share on other sites

I once suggested round robin selection. Though to be honest I think crew rotation would be a better term. I've actually gotten started coding it for my own personal use but if you think it's something you'd like to use for the mod I'd be happy to do a PR for it.

It'll be implemented using SCENARIO so that crew rosters can be saved on a per save game basis. The SCENARIO node will maintain a list of the current crew roster, automatically removing or adding as Kerbals are hired/fired using GameEvent.AddKerbal (or RemoveKerbal). Kerbals to be assigned will be drawn from the front of the list and as they are assigned get sent to the back. New hires will probably go to the front of the list. Not sure yet. (if they got hired then there was probably an immediate need to assign them to crews...)

Not sure how to handle it if the randomization is turned on. Probably it would just override rotation? Or pick a handful from the front of the list and then select one randomly?

Also, I notice in the code that when there's a need for new Kerbals that you're using GetNewKerbal(). Wouldn't it be better to use HireApplicant()? (these guys were on the waiting list for awhile you know!)

Link to comment
Share on other sites

I once suggested round robin selection. Though to be honest I think crew rotation would be a better term. I've actually gotten started coding it for my own personal use but if you think it's something you'd like to use for the mod I'd be happy to do a PR for it.

It'll be implemented using SCENARIO so that crew rosters can be saved on a per save game basis. The SCENARIO node will maintain a list of the current crew roster, automatically removing or adding as Kerbals are hired/fired using GameEvent.AddKerbal (or RemoveKerbal). Kerbals to be assigned will be drawn from the front of the list and as they are assigned get sent to the back. New hires will probably go to the front of the list. Not sure yet. (if they got hired then there was probably an immediate need to assign them to crews...)

Not sure how to handle it if the randomization is turned on. Probably it would just override rotation? Or pick a handful from the front of the list and then select one randomly?

Also, I notice in the code that when there's a need for new Kerbals that you're using GetNewKerbal(). Wouldn't it be better to use HireApplicant()? (these guys were on the waiting list for awhile you know!)

Yea, I like this.

My basic thinking is to replace the randomization option with a 'crew selection mode' option, of which randomization would be one option.

If you want to do PR, give me a method to turn it on or off, and a method to call to get the next crew.

As for GetNewKerbal() vs HireApplicant(), idk. I'm reasonably sure that they do the same thing, most of the time, at least last time I looked.

Edited by enneract
Link to comment
Share on other sites

Yea, I like this.

My basic thinking is to replace the randomization option with a 'crew selection mode' option, of which randomization would be one option.

I can work that into it.

If you want to do PR, give me a method to turn it on or off, and a method to call to get the next crew.

It will have both.

As for GetNewKerbal() vs HireApplicant(), idk. I'm reasonably sure that they do the same thing, most of the time, at least last time I looked.

More or less true except that players are aware that there's a list of applicants waiting. It makes sense from an immersion standpoint as well as game mechanic consistency. (when the game has to fill a vessel, it doesn't use GetNewKerbal() until it has first exhausted both the list of available crew, then the applicant pool.

But, you know, your mod. Do it how you like.

Link to comment
Share on other sites

More or less true except that players are aware that there's a list of applicants waiting. It makes sense from an immersion standpoint as well as game mechanic consistency. (when the game has to fill a vessel, it doesn't use GetNewKerbal() until it has first exhausted both the list of available crew, then the applicant pool.

But, you know, your mod. Do it how you like.

I agree, was an oversight. Looking at it now, I think I did it that way because I couldn't figure out what the double value which HireApplicant() requires is for, and GetNewKerbal() returns the kerbal which just got hired. *shrug*

Either way, changed that, but I also started a dev branch where I'm working on the selection mode stuffs. There is an interface for it now, even if it doesn't do anything yet.

Edited by enneract
Link to comment
Share on other sites

I swear. I need to learn a programming language. Github looks like a playground.

Its capacity for usefulness is overshadowed only by its capacity to annoy the ever living hell out of me. (seriously Github, why ask me for a list of files to ignore if you aren't going to ignore them?)

Link to comment
Share on other sites

I don't care about your implementation, as long as it complies with the interface

In fact, go ahead and don't even check the blacklist. I'll worry about that.

What I did was set it up so that it would either use the stock KerbalRoster (if set for random) or the one that I supplied to it (which sorts assigned Kerbals to the end of the list)

It's actually sort of working except that in certain scenes it doesn't seem to correctly load the saved rotation list.

It's event driven to be notified when a Kerbal moves from Available to Assigned and then moves that Kerbal to the end of the rotation list. It also checks for changes such as occur when a rescue contract Kerbal moves into the roster.

It's amazing how many times KSP fires an event for the same thing over and over again. (i.e., OnKerbalStatusChange is triggered five times for a single incident where a Kerbal gets assigned to a craft)

the icon doesn't appear on toolbar... mod's not working as result

It supports Blizzy's toolbar, not the stock one.

Then you have to edit the toolbar (using its nifty little in-game editing system), and configure what buttons are visible on the toolbar.

Edited by Starwaster
Link to comment
Share on other sites

What I did was set it up so that it would either use the stock KerbalRoster (if set for random) or the one that I supplied to it (which sorts assigned Kerbals to the end of the list)

It's actually sort of working except that in certain scenes it doesn't seem to correctly load the saved rotation list.

It's event driven to be notified when a Kerbal moves from Available to Assigned and then moves that Kerbal to the end of the rotation list. It also checks for changes such as occur when a rescue contract Kerbal moves into the roster.

It's amazing how many times KSP fires an event for the same thing over and over again. (i.e., OnKerbalStatusChange is triggered five times for a single incident where a Kerbal gets assigned to a craft)

Ah, I see. Well, I'd like to implement a few different crew selection modes, and the way to make that homogeneous is to let the 'main' part of the plugin handle interaction with the game, and have the class which implements the mode leave that interaction up to the plugin.

OH! I also figured out the GetNewKerbal() vs HireApplicant() thing. It doesn't matter what is in my code, because it should never fire. KSP does the hiring of new Kerbals (or at least did) if insufficient to provide default crewing before my code ever has a chance to. That was included as a fall-back just in case something weird happened.

the icon doesn't appear on toolbar... mod's not working as result

Uses Blizzy's Toolbar mod, not the stock one. I'm also not distributing the toolbar mod, so grab the latest one from that thread if you want to use toolbar integration. Do note that the mod functions just fine without the Toolbar, as that functionality is optional.

Edited by enneract
Link to comment
Share on other sites

Hi.

I have Blizzy's toolbar installed, i checked RealRoster to be visible in every scene i could set it to be, yet it is not displayed.

So, I AM able to see it on the list of buttons under 'select visible buttons' or however it's called, but despite doing so, it does not appear on the toolbar.

some screenshots: http://imgur.com/a/W5QG3

Link to comment
Share on other sites

Hi.

I have Blizzy's toolbar installed, i checked RealRoster to be visible in every scene i could set it to be, yet it is not displayed.

So, I AM able to see it on the list of buttons under 'select visible buttons' or however it's called, but despite doing so, it does not appear on the toolbar.

some screenshots: http://imgur.com/a/W5QG3

I would need to consult the source to be sure, but I think that is the expected behavior. The button should only be visible in the main KSC screen.

I can totally change that behavior next release tho.

Edited by enneract
Link to comment
Share on other sites

The button should only be visible in the main KSC screen.

Yes, it is, now I see. I falsely assumed that it would be visible in VAB. I also checked in flight and in astronaut complex, but I did ommit KSC, as it seemed to be the least probable place for it;). So I am at fault here, but I think including it in VAB would be nice, if it's not too much work for you.

Link to comment
Share on other sites

Yes, it is, now I see. I falsely assumed that it would be visible in VAB. I also checked in flight and in astronaut complex, but I did ommit KSC, as it seemed to be the least probable place for it;). So I am at fault here, but I think including it in VAB would be nice, if it's not too much work for you.

Oh, I agree that it should be available in the editor at the very least. I didn't add the code for toolbar integration (thanks ebs!), and haven't actually played ksp for several months now, so hadn't noticed that it wasn't.

Link to comment
Share on other sites

Is there any way that this mod could be interrupting the new "no auto-hire kerbals" functionality?

Yes. Almost certainly. I didn't even know that was new functionality (See above post!). I'll correct it in the next release.

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