Jump to content

[1.12.x] BetterCrewAssignment v1.4.1: Smarter by default. Remembers your choices. No UI.


Snark

Recommended Posts

12 minutes ago, Snark said:

I guess it's "because you don't follow Modding Monday".  :P

Indeed that is the cause of my problem! I shall seek to rectify this.

12 minutes ago, Snark said:

In the meantime, until/unless I update the mod, yes, you can add it with ModuleManager config, though you can't add the "minimum level" requirement.

Cool---that's already good enough for sandbox, where Everyone's Level 5™! I know very little about ModuleManager, but it might be worth investing in abstract propositions for capabilities, so the logic would be "can_repair and has_chute" instead of "is_level(3) and has_chute", if that's possible. Then if the XP system changes, you'd only need to update one set of definitions.

12 minutes ago, Snark said:
  • No, you can't do that with this version of the mod.  It doesn't look at those stats at all, and there's no way to make it do so.
  • In principle, I could add such a feature.
  • However, unless something happens to change my mind, I probably won't add such a feature any time soon.
  • Not because it's a bad idea, but because it would be a non-trivial feature to add, and would benefit only a small target audience.

Yeah, that's about how I figured it would be. Thanks for the explanation. Fleshing out the inquiry a bit more, I don't use any mods that use these stats; I just find myself in the astronaut complex staring at those bars, and the urge to RP takes over (I focus on minimizing Stupidity, and then Courage determines which missions they're eligible for). I wouldn't expect any such logic to be on by default, but if it was possible to add it via ModuleManager, I'd probably give it a go.

Ooh, there's another idea: an option to auto-hire from the astro complex if you run out of a role. Then I'd never need to click on that building again.

Link to comment
Share on other sites

6 minutes ago, HebaruSan said:

it might be worth investing in abstract propositions for capabilities, so the logic would be "can_repair and has_chute" instead of "is_level(3) and has_chute", if that's possible. Then if the XP system changes, you'd only need to update one set of definitions.

Yah, I'll certainly bear such possibilities in mind.  Gain in one place, lose in another.  A simple "requires level" flag can be generally applicable to any profession, now or in the future (what if someone does a mod that has a part that requires a level-2 scientist to operate?)

If the XP system changes, it would be pretty quick for me to update the level requirements on the parts.

Thus, I tend to prefer sticking with the maximally-flexible system that will work with any mod that might be out there.

9 minutes ago, HebaruSan said:

Ooh, there's another idea: an option to auto-hire from the astro complex if you run out of a role. Then I'd never need to click on that building again.

Not a bad idea, but feels to me like that would be a different mod.

(For one thing, I would never, ever, under any circumstances, ever want to have this functionality in my own games, because I play career exclusively, and hiring astronauts is expensive so I never do it.  Ever.  I rescue them all.  Which gives me a disincentive to write such functionality myself, since my biggest motivator when modding is to make stuff that I like to use.)  ;)

Link to comment
Share on other sites

Hi all,

I've posted v1.2 of BetterCrewAssignment.  This adds the ability to add level-specific requirements to parts (e.g. if the part needs a kerbal of a certain level to operate it). The purpose of the new feature is to let me add level-appropriate engineer requirements to all repairable parts (parachutes, landing legs, wheels), which I've done.  Thanks to @HebaruSan for the feature suggestion!

Like BetterCrewAssignment v1.1 before it, this version requires KSP 1.1 to use.  It won't work on KSP v1.0.5.  My apologies to users who are still on 1.0.5; you'll have to wait until 1.1 is available to get the new feature.  I debated about waiting until the 1.1 release to add a feature, but finally decided it's better to get it out as early as possible, so that if anyone finds bugs I can hopefully address them before 1.1.

If you're still on 1.0.5, you should be using v1.01 of BetterCrewAssignment.

I've added a changelog.txt to the mod directory to help make things clear.

Enjoy!

Link to comment
Share on other sites

36 minutes ago, genbrien said:

if you put a LVL3 engi for a part, but only have lower lvls engi, will it load an engi anyway?

Nope, that's the point of the level-specific part requirements.  What those requirements are saying is, in effect:  "If you've got a level-3 engineer available, I want one.  But if you don't have a level-3-or-better engineer, there's no point, so never mind."

(Of course, it might end up assigning an engineer anyway, if there's no other requirement for any specific profession anywhere, and it has to pick somebody, and an engineer happens to be at the top of the list.)

Link to comment
Share on other sites

It would be nice to link directly to the 1.01 and latest release in the forum post, as I'm guessing maybe not everyone is familiar with the fact that archived releases are available in the changelog section of Spacedock mods. I had the reflex to change the download URL before I found it, lol. Otherwise, great mod. This should be merged into stock KSP at the very least partially.

Link to comment
Share on other sites

On 4/16/2016 at 9:01 AM, gp said:

It would be nice to link directly to the 1.01 and latest release in the forum post, as I'm guessing maybe not everyone is familiar with the fact that archived releases are available in the changelog section of Spacedock mods. I had the reflex to change the download URL before I found it, lol.

Thanks, great idea!  I've added a comment & link to the forum post.

Link to comment
Share on other sites

  • 2 weeks later...

PSA:

  • The KSP 1.1.2 patch that just came out broke ModuleManager.
  • sarbian has released ModuleManager 2.6.24 for compatibility with 1.1.2.
  • This means that any mods that depend on MM (such as this one) will be broken until you're updated to ModuleManager 2.6.24 or later.
  • For your convenience, I've done just that!  See below.  :)

 

So, I've updated BetterCrewAssignment to v1.2.1.  There are no actual code changes, just an update to the latest ModuleManager version for compatibility with KSP 1.1.2.

Link to comment
Share on other sites

  • 1 month later...

Hi all,

I've posted release v1.2.2 of BetterCrewAssignment.

Aside from updating to the latest ModuleManager version, this update fixes a bug in which editor events get registered multiple times, and the duplicate registrations accumulate over time as you enter and leave the editor.  This results in extremely verbose log spam and duplicate processing, which could be a performance issue for very large ships.

Link to comment
Share on other sites

While I don't at the moment use this mod (suspecting it will conflict with KCT), I read through the OP and the thread and I am really impressed by the level of thought and attention to detail you've given such a small area. We need more people like you around here.

Actually, maybe I will test compatibility with KCT, since a number have mentioned it but none reported back.

---Edit---

Back from the testing trenches and....doesn't work.

Specifically, your mod works exactly as it is supposed to in the editor (best I can tell), but then KCT undoes it all come pre-launch.

Pics:

Note the lack of Jeb (who defaults as the first slot normally). Your mod remembers this arrangement. I then ship this off to the factory (i.e. I hit build). And a few days later, when I go to launch...KCT boots everyone out and sticks Jeb in the first slot. I don't know that there is anything that can be done about it, as KCT bypasses the normal launch procedure completely. If you're interested in pursuing matters further, @magico13 is the guy to talk to. Good guy, rather busy, but who isn't around here.:)

Honestly though, given your design philosophy, I could see it not being worth it, as you seem to cater more to the the Stock +1 crowd with minimalist modding, which I can respect.

Either way, have a good one.

RYrGdTS.png07GmXC9.png

Edited by Deimos Rast
Link to comment
Share on other sites

On 6/1/2016 at 10:32 PM, Deimos Rast said:

Actually, maybe I will test compatibility with KCT, since a number have mentioned it but none reported back.

---Edit---

Back from the testing trenches and....doesn't work.

Specifically, your mod works exactly as it is supposed to in the editor (best I can tell), but then KCT undoes it all come pre-launch.

Pics:  [snip]

Note the lack of Jeb (who defaults as the first slot normally). Your mod remembers this arrangement. I then ship this off to the factory (i.e. I hit build). And a few days later, when I go to launch...KCT boots everyone out and sticks Jeb in the first slot. I don't know that there is anything that can be done about it, as KCT bypasses the normal launch procedure completely. If you're interested in pursuing matters further, @magico13 is the guy to talk to. Good guy, rather busy, but who isn't around here.:)

Honestly though, given your design philosophy, I could see it not being worth it, as you seem to cater more to the the Stock +1 crowd with minimalist modding, which I can respect.

Thanks for the update-- various folks have previously asked about it in the thread, but we never had a definitive answer.  I'll go add a comment to the thread's OP that this is incompatible with KCT.

There's probably nothing I can do about that.  From the description, my mod works just fine, for everything that it does, and then KCT comes along afterwards and rejiggers everything.  There's nothing I can do about that.  If you wanted KCT compatibility, you'd need KCT to add code to be compatible with BetterCrewAssignment.  You could go ask the author of KCT... but I'd guess it's a pretty low chance.  For KCT to respect the data that BCA stores with the ship, it would need to read the BCA-specific data, which is hard to do without taking an explicit dependency on BCA, which is unlikely to happen.

So, definitely not solvable by me, and probably unlikely to be worth the KCT author's while to make a change on that side.  Alas.

Link to comment
Share on other sites

  • 4 months later...

Hi all,

I'm happy to announce that I have released BetterCrewAssignment v1.3, for KSP 1.2 compatibility.  Please see the download link in the OP for this thread.

No new functionality in this release; it's a compatibility update only.

The only other noteworthy change is that the license has changed to CC-BY-NC-ND 4.0 (it was previously MIT).  It's a more restrictive license than MIT, but I don't expect that the change of license will affect users of this mod.  The most noteworthy changes in licensing are:

  1. you can't make money off it
  2. if you modify it in any way, you can't distribute the modified version

Enjoy!

Link to comment
Share on other sites

  • 4 weeks later...
1 hour ago, PocketBrotector said:

Is this still working as expected in 1.2.1? I've noticed that the crew assignment in new vessels seems to be ignoring my settings. Anyone else noticed unexpected behavior?

Hm.  Well, it's certainly possible that something could have gotten broken (either in 1.2.1, or in the move to 1.2 and it's only now that you're the first person to notice it).

Do you have an explicit and simple repro case?  What are the exact symptoms you're observing?

Link to comment
Share on other sites

1 hour ago, Snark said:

Do you have an explicit and simple repro case?  What are the exact symptoms you're observing?

I use a config to set all parts to empty - I'm pretty sure this worked fine when I used it back in 1.0.5 or so:

Spoiler

@PART[*]:HAS[@MODULE[ModuleCrewAssignment]]:FINAL {
    @MODULE[ModuleCrewAssignment] {
        @defaultAssignment = Empty
    }
}

However if I create a new vessel it may be automatically populated with crew anyway.

Repro:

  1. create new game (sandbox)
  2. create new vessel consisting of just a mk1-2 command pod
  3. Switch to Crew tab and see Jeb, Bill, and Bob already present.

Once the vessel is created and the crew viewed, it does seem to correctly remember any changes I make to the crew setup (e.g. substituting Val for Jeb.) So the most important functionality is still there; I don't have to kick out Jeb every flight, just once per craft.

Link to comment
Share on other sites

19 hours ago, PocketBrotector said:

I use a config to set all parts to empty - I'm pretty sure this worked fine when I used it back in 1.0.5 or so:
...

However if I create a new vessel it may be automatically populated with crew anyway.

Thanks!  That's helpful-- I'll take a look.

One question, though.  When you say "may be":  do you mean it happens some of the time, but not all of the time?  Can you elaborate?

In particular:

  • Is this some completely random thing, where launching the exact same new-ship design sometimes does it and other times doesn't?  If so, roughly what percentage of the time does it happen?
  • Or, on the other hand, is it reliably consistent that it always happens with some ship designs and never happens with others?
  • ...or am I reading too much into the "may be", and this actually happens to you with every new ship launch?
Link to comment
Share on other sites

On 11/6/2016 at 1:05 PM, PocketBrotector said:

I was able to reproduce it consistently with the Mk1-2 command pod, but I didn't confirm if it happens consistently on other crewable parts.

Okay, so I took a look.  BetterCrewAssignment is actually fairly "chatty" in the log file-- if you pop open the Alt+F12 debug logging window, you can "watch it think" and see how it goes about assigning stuff, which makes it straightforward to get an idea of what's going on.

Here's what I observe:

  • If I start up KSP, go to the vehicle editor, and click on a part (let's say, the Mk1-2 command pod) to be the first part... nothing happens.  Nothing gets log.  There's no comment from BetterCrewAssignment in the log file, nothing.  It's as though it's not even running.  (This is unexpected and weird.)
  • On the other hand, if I then press the "new ship" button to erase, and do it again (i.e. place a new Mk1-2 command pod to start a new ship) ... then it works, it assigns crew (or empty slots) as expected, and it logs all the expected messages as it does so.
  • Furthermore, after doing that, it appears to stay "fixed" for the remainder of the play session-- i.e. I can leave the VAB, then come back, start a new ship... everything works as expected.

So, there's something odd happening with when the mod starts up.  Perhaps KSP has rearranged the order in which various game-initialization events happen?

So, two possibilities here:

  1. This represents a bug in KSP itself, i.e. it was an unintended consequence of something they changed in 1.2.  (I'm pretty sure this worked in 1.1.3, though I couldn't swear to it.  Certainly it worked in 1.0.5.)
  2. This represents a "by design" change in KSP, i.e. they deliberately changed the order of initialization or something, for some good reason.  The new behavior just happens to break BetterCrewAssignment.

I need to investigate a bit further to determine whether this seems like more of a #1 (in which case I should report the bug, and hope Squad fixes it in the next release) or a #2 (in which case I should fix BetterCrewAssignment to work with the new behavior).

But in either case, while I'm getting this figured out, there appears to be a straightforward (if somewhat annoying) workaround:  when you start up KSP, place a single part in the VAB and then delete it, then the mod appears to work as expected.

@PocketBrotector, can you confirm that you're observing the same behavior that I am?

Link to comment
Share on other sites

12 minutes ago, Snark said:

@PocketBrotector, can you confirm that you're observing the same behavior that I am?

Not exactly. For some reason it appears that certain parts (possibly mod-introduced parts) are triggering BCA right away while others (such as Mk1-2 pod) require the place-delete-place behavior that you're describing.

Here is what I got after placing a Taurus HCV pod, deleting it, placing a Mk1-2, viewing the crew, deleting it, and placing another Mk1-2. (Forgive the screenshot of the console screen - I assume that there's some way to get an actual text log output, but I haven't dealt with logs much so I'm not familiar.)

Link to comment
Share on other sites

On 11/8/2016 at 4:11 PM, PocketBrotector said:

Not exactly. For some reason it appears that certain parts (possibly mod-introduced parts) are triggering BCA right away while others (such as Mk1-2 pod) require the place-delete-place behavior that you're describing.

Here is what I got after placing a Taurus HCV pod, deleting it, placing a Mk1-2, viewing the crew, deleting it, and placing another Mk1-2. (Forgive the screenshot of the console screen - I assume that there's some way to get an actual text log output, but I haven't dealt with logs much so I'm not familiar.)

Yah, clearly something somewhere is out of kilter, here.  My guess would be that it's some subtle effect of the relative ordering of event notifications, which can be gnarly to track down.

I'll look into it when I have a chance-- thanks for bringing it to my attention.  Might be a little while, I have my hands kinda full IRL these days.

Incidentally, if you'd like to know where to see these log messages in a somewhat "friendlier" place that's more conducive to copying, pasting, etc.:  everything you see in that window is written to the KSP log file, which is located in the root folder of your KSP installation.  (This file gets overwritten each time you start a new game session of KSP.)

Link to comment
Share on other sites

  • 1 month later...
  • 2 weeks later...

I was looking for a mod that allowed for automatically pick crew based on time since last mission and someone pointed  me to this mod. Looks like it don’t have the exact functionality I’m look for, however since not asking will give me 100% of a NO:

There is some way to use this mod to archive at least a similar result? Such functionality its possible and/or planned?

 

PS:I use BetterBurnTime, its really a nice little mod that become essential for me.

Link to comment
Share on other sites

19 hours ago, Spricigo said:

I was looking for a mod that allowed for automatically pick crew based on time since last mission and someone pointed  me to this mod. Looks like it don’t have the exact functionality I’m look for, however since not asking will give me 100% of a NO:

There is some way to use this mod to archive at least a similar result? Such functionality its possible and/or planned?

Alas, sorry, no.  It's not possible with this mod as it stands, and I have no plans to add such a feature.

Mainly because "time since last mission" isn't something that I ever care about.  If I'm launching a ship, I care about "what can a kerbal do", not "how long has it been".  It's not as if time spent sitting around swigging coffee in the Astronaut Complex causes kerbals' skills to deteriorate, or something; time since last mission is irrelevant for gameplay purposes.

I can certainly appreciate that there may be other reasons (e.g. roleplay) why someone would care about how long it's been, but that's not what this mod is about, and (since I don't use that in my own gameplay) it's not something I'm likely to write.

I agree that functionality like that would be handy in some circumstances.  And certainly I think there's a lot of room for improvement in the way that KSP sorts the astronaut list-- I've often found myself wishing that I had better options to keep them sorted in a certain way (some user-selectable combination of skill level, and/or profession, and/or time since last mission).  But that would be a pretty major feature implementation; the reason I haven't already done it is that the ratio of "how much work would I have to do" to "how much do I care about it" hasn't come close to reaching critical mass.  So, the status on that would be "maybe never, but certainly not anytime soon."

Link to comment
Share on other sites

  • 1 month later...
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...