Jump to content

[1.12.x] Ship Manifest (Crew, Science, & Resources) - v 6.0.8.0 - 28 Apr 23


Papa_Joe

Recommended Posts

Very weird. 0.90 introduced professions so there's no way it was fixed in it. It was introduced in it! Maybe there's some sort of weird public/private name thing going on but I've no clue where that could be stored.

Hmm... I thought it was introduced in .25, but not implemented....

Anyway... I'm continuing my testing.

You might try removing the aschii chars from your save and see if what I'm saying agrees with what you see... of course you will have to have unique names...

Link to comment
Share on other sites

Sadly I'm about to start some non-KSP-time stuff so don't have time to test, but with how much I've edited names in the files I really can't see the profession changing. I've had same names, different names, sandbox mode, career mode, and in every single case if a name string was one profession, it was the same profession in all other saves.

Hopefully later tonight (and it may be so much later that it may as well be the morning) I'll have time. I have to add 5 people to my Let's Play game so I can test it then.

And I don't have my fingers in the under-the-hood stuff in KSP so you are probably right. I only know careers as they are presented on the outside.

Link to comment
Share on other sites

Sadly I'm about to start some non-KSP-time stuff so don't have time to test, but with how much I've edited names in the files I really can't see the profession changing. I've had same names, different names, sandbox mode, career mode, and in every single case if a name string was one profession, it was the same profession in all other saves.

Hopefully later tonight (and it may be so much later that it may as well be the morning) I'll have time. I have to add 5 people to my Let's Play game so I can test it then.

And I don't have my fingers in the under-the-hood stuff in KSP so you are probably right. I only know careers as they are presented on the outside.

thanks and no problem. I'm continuing to test, and I'll make sense of it. I'll find a way to make it happen :D

Link to comment
Share on other sites

I just tested this and it doesn't work for me the way it seems you reported it worked for you.

I had a Kerbal, Kyle Kerman (Hi Kyle if you're reading this!) who wanted to be a scientist. I had him in the game as a scientist named Kyle Perman, because Kyle Kerman was a Pilot.

I used ShipManifest with the new DLL to rename him Kyle Kerman. Sure enough it said he was still a scientist in the ShipManifest window.

When I went back to the KSC however and looked in the Astronaut Complex, he was a Pilot.

Link to comment
Share on other sites

Interesting... I did not touch the highlighting with this update... however, try turning off CLS Highlighing in Settnigs. CLS is NOT required for use, and I thought I had a flag check for if CLS is enabled... I'll do some testing at my end.

Thanks for the feedback and let me know if that works for you... Also, are you seeing any errors in the Debugger Window?

Edit. Based on my testing, it seems to work... Is Enable CLS on in your settings (even if it is grayed out)?

- - - Updated - - -

Okay, with my testing I see the following behavior:

1. If I remove CLS and have CLS enabled, the plugin properly detects this and turns off Enable CLS. CLS Highlighting is still on, but disabled. (correct behavior).

2. If I have Crew Selected, and then change the Highlight setting to Only Source and target, CLS Highlighting switch turns off (correct), but the standard highlighting stays on the vessel (incorrect).

3. If I deselect Crew and then reselect crew, highlighting turns off and then back on in the correct Source and target only mode (correct, except for having to deselect and reselect Crew)

I also noted that the above behavior for 2 and 3 with CLS installed.

I will correct that behavior in the next release, but simply reselecting Crew corrects it, so not urgent.

Does that describe your issue?

It seems that my problem is something else. Check this screenshot:

hZ8ThRY.jpg

Also tried turning "Highlight only source /target part" off, and closed all ship manifest GUI, with same results.

By accident I hit escape while transfer window was open and discovered that it highligted the parts then, as you can see on the screenshot:

RSSIDvJ.jpg

When I unpaused, the highlighting went away again, so it is highlighting only when the game is paused.

Link to comment
Share on other sites

I just tested this and it doesn't work for me the way it seems you reported it worked for you.

I had a Kerbal, Kyle Kerman (Hi Kyle if you're reading this!) who wanted to be a scientist. I had him in the game as a scientist named Kyle Perman, because Kyle Kerman was a Pilot.

I used ShipManifest with the new DLL to rename him Kyle Kerman. Sure enough it said he was still a scientist in the ShipManifest window.

When I went back to the KSC however and looked in the Astronaut Complex, he was a Pilot.

Thanks. It seems we have an issue with game state with my proposed changes. Looks like it is tied to the name. :( I also did some additional testing. Previously, I had not changed scenes after making the changes. same result as yours.

the DLL contained the ascii 1 trick too, so looks like that didn't work out as hoped....

Well, back to the drawing board....

It seems that my problem is something else. Check this screenshot:

Image..

Also tried turning "Highlight only source /target part" off, and closed all ship manifest GUI, with same results.

By accident I hit escape while transfer window was open and discovered that it highligted the parts then, as you can see on the screenshot:

Image...

When I unpaused, the highlighting went away again, so it is highlighting only when the game is paused.

I see the issue. Was this only on the launch pad, or do you see this behavior in flight as well? I will attempt to duplicate.

There is a Debugger Window in the settings under Configuration. If you turn that on, there may be some errors showing there. I try to trap all errors so I can capture and save them. The KSP Debug console is a rolling log, and when many addons are installed often you do not capture the issue. If you would be so kind as to check?

Thanks for taking the time to characterize it. I really appreciate it.

Edit: After downloading a fresh copy of SM 0.90.0_4.0.1 from Kerbalstuff, creating the same vehicle (only the docking ports were different, I used stock), and testing it on the launch pad, I cannot duplicate the error you are getting. I do use several addons, but I can see no conflict.

We may need to look at some other addon causing a conflict, tho I cannot imagine what...

Edited by Papa_Joe
Link to comment
Share on other sites

I see the issue. Was this only on the launch pad, or do you see this behavior in flight as well? I will attempt to duplicate.

There is a Debugger Window in the settings under Configuration. If you turn that on, there may be some errors showing there. I try to trap all errors so I can capture and save them. The KSP Debug console is a rolling log, and when many addons are installed often you do not capture the issue. If you would be so kind as to check?

Thanks for taking the time to characterize it. I really appreciate it.

It happens in flight too. And it's probably caused by other mod(s), I use many of them. I remember it used to work not so long time ago. I installed latest Ship Manifest to other KSP installation which has few mods, it is working fine there. So I will do a binary search by disabling mods and hopefully find out which one is causing it.

When I enabled the logging from settings, there wasn't anything related to my issue, but I noticed errors whenever I closed crew transfer window: http://pastebin.com/0Qj6GgmQ

Link to comment
Share on other sites

It happens in flight too. And it's probably caused by other mod(s), I use many of them. I remember it used to work not so long time ago. I installed latest Ship Manifest to other KSP installation which has few mods, it is working fine there. So I will do a binary search by disabling mods and hopefully find out which one is causing it.

When I enabled the logging from settings, there wasn't anything related to my issue, but I noticed errors whenever I closed crew transfer window: http://pastebin.com/0Qj6GgmQ

Awesome! the log helps loads!

I'll get right on tracking down the cause.

Link to comment
Share on other sites

Can I request that not being able to "spam science" be part of realism mode. I gotta say im still running an older version because the spamming the science from goo and canisters was a major plus for me. Just consider putting it back and making it an option to turn it on and off. Please and thank you in advance.

Link to comment
Share on other sites

Can I request that not being able to "spam science" be part of realism mode. I gotta say im still running an older version because the spamming the science from goo and canisters was a major plus for me. Just consider putting it back and making it an option to turn it on and off. Please and thank you in advance.

I'm not sure what you mean by "spamming" science. if you can better describe it I can assist. I definitely want Realism Mode to prevent "cheating".

My first question is: Do you have realism mode turned on? If so, the canister should be "consumed" and not allow you to reset it. If that is not the case, can you describe how you are able to spam?

With realism turned off, you should be able to spam... so the option is there. Did I not implement it correctly?

Best bet is to give an example (parts used and settings), and the steps to reproduce.

Thanks!

Edited by Papa_Joe
Link to comment
Share on other sites

Thanks. It seems we have an issue with game state with my proposed changes. Looks like it is tied to the name. :( I also did some additional testing. Previously, I had not changed scenes after making the changes. same result as yours.

the DLL contained the ascii 1 trick too, so looks like that didn't work out as hoped....

Well, back to the drawing board....

I was thinking about making a mod to allow renaming Kerbals without changing professions when I discovered this thread. In my testing I found that Kerbal professions reset when the "onGameStateLoad" event was triggered. So I tried setting the profession at that point and it seemed to persist across scene changes. Perhaps something similar would work for ShipManifest.

Link to comment
Share on other sites

Using CLS and Realism mode on, I switched seats and closed the Ship Manifest window while the seat transfer was in progress. Ship manifest quit opening any resource windows afterwards (no crew, science, or fuel transfers) until I restarted the game. The debug console only had two Error lines in it:

Error: Transfer State: Stop...
Error: in RealModeCrewXfer (repeating error). Error: Object reference not set to an instance of an object

at ShipManifest.SMAddon.RealModeCrewXfer () [0x00000] in <filename unknown>:0

It all looks like a long winded null reference to me. Thankfully the kerbal survived the transfer!

Link to comment
Share on other sites

Using CLS and Realism mode on, I switched seats and closed the Ship Manifest window while the seat transfer was in progress. Ship manifest quit opening any resource windows afterwards (no crew, science, or fuel transfers) until I restarted the game. The debug console only had two Error lines in it:

Error: Transfer State: Stop...
Error: in RealModeCrewXfer (repeating error). Error: Object reference not set to an instance of an object

at ShipManifest.SMAddon.RealModeCrewXfer () [0x00000] in <filename unknown>:0

It all looks like a long winded null reference to me. Thankfully the kerbal survived the transfer!

Yup, that would make sense. Looks like I'll need to test for the action in progress and disable the ability to close. The action is not asynchronous. I do that with the Xfer buttons already, so just need to add the test to the ability to close the windows. the Move and Xfers for that matter are essentially instantaneous, so I'm glad to see your Kerbals were safe. It is the artificial delay and sound routines that are in progress at that time.

I was thinking about making a mod to allow renaming Kerbals without changing professions when I discovered this thread. In my testing I found that Kerbal professions reset when the "onGameStateLoad" event was triggered. So I tried setting the profession at that point and it seemed to persist across scene changes. Perhaps something similar would work for ShipManifest.

Interesting. Let me take a look at that. My major concern relates to the fact that there seems to be no coupling between the Profession in the Game save... If names and Professions were decoupled, you would think that the Game save would have to contain some reference to it to actually persist it... Also, take a look at my code for the roster window and KerbalModel. There may be some nuggets in there, and the license certainly allows for you to play with that code :D

I figured out what breaks my highlighting. When I have Kerbal Mechanics (http://forum.kerbalspaceprogram.com/threads/85798-0-9-Kerbal-Mechanics-Part-Failures-and-Repairs-v0-6-Help-Me-Balance%21) installed, the crew transfer window does not show any highlighting.

Awesome. Now I'll see about adding that to my Mods and test for conflicts. That is one particular mod where I see some potential for atmosphere leaks, allowing for the need to close hatches when CLS is also installed.

Nice sleuthing!

Edited by Papa_Joe
Link to comment
Share on other sites

I'm not sure what you mean by "spamming" science. if you can better describe it I can assist. I definitely want Realism Mode to prevent "cheating".

My first question is: Do you have realism mode turned on? If so, the canister should be "consumed" and not allow you to reset it. If that is not the case, can you describe how you are able to spam?

With realism turned off, you should be able to spam... so the option is there. Did I not implement it correctly?

Best bet is to give an example (parts used and settings), and the steps to reproduce.

Thanks!

Im sorry what I meant by spamming science is that the science container resets after you transfer the science. Now the container or goo container are rendered inoperable. In past versions when you transferred the science it would reset and you could use it again. What I am saying is the containers being inoperable after one use should definitely be part of realism mode. But maybe there could be away to allow the containers to be reset after you transfer the science in settings?

Link to comment
Share on other sites

Im sorry what I meant by spamming science is that the science container resets after you transfer the science. Now the container or goo container are rendered inoperable. In past versions when you transferred the science it would reset and you could use it again. What I am saying is the containers being inoperable after one use should definitely be part of realism mode. But maybe there could be away to allow the containers to be reset after you transfer the science in settings?

Ah. I'll verify, but if you turn realism mode off It should allow you to reset them.

Yup, just checked the code. If you turn off Realism mode in Settings, the experiment will automatically reset. Let me know if that does not work as expected.

Edited by Papa_Joe
Link to comment
Share on other sites

Awesome. Now I'll see about adding that to my Mods and test for conflicts. That is one particular mod where I see some potential for atmosphere leaks, allowing for the need to close hatches when CLS is also installed.

Nice sleuthing!

I've taken a quick look at the code for Kerbal Mechanics, and I believe I understand the issue. When I updated my highlighting scheme I noted that when I turn "off" highlighting, I had to make sure it was not an active off, meaning I had to make sure I did it only once. If I kept turning it off (such as every frame), I woulld prevent other mods from enabling highlighting.

I will dig further, but I'm thinking that the author of Kerbal Mechanics will need to slightly revise the method used to accept an " is off flag" much as I use, to be sure that other mods can then utilize highlighting. If/when I prove this to my satisfaction, I will contact the author and suggest a change.

Update:

I have confirmed that IRnifty is using a method I abandoned as it did not work as intended. I will contact the mod author and recommend a change to ensure proper operation.

Specifically, in the Update method (occurs every frame) he is checking for a specific color (kerbalgreen), which is the color that setHighlightdefault sets a part to. For some reason, you cannot test for that color and get a true... weird, but I experienced it as well.

So I had to change the way I detected a need to change the color back.

I have contacted the mod author with the issue. Hopefully a fix will be forthcoming.

Edited by Papa_Joe
Link to comment
Share on other sites

I have confirmed that IRnifty is using a method I abandoned as it did not work as intended. I will contact the mod author and recommend a change to ensure proper operation.

Specifically, in the Update method (occurs every frame) he is checking for a specific color (kerbalgreen), which is the color that setHighlightdefault sets a part to. For some reason, you cannot test for that color and get a true... weird, but I experienced it as well.

So I had to change the way I detected a need to change the color back.

I have contacted the mod author with the issue. Hopefully a fix will be forthcoming.

Thank you for making me aware of the compatibility issue. I am currently correcting it and will push a "bugfix" update within the next few short hours. In the meantime, I feel I should propose a highlighting manager mod which would manage and prioritize highlight requests made by mods such as yours, mine, and Farram's mods. As it is, the current model of handling highlighting is not very multi-mod friendly, so I'd like to change that. What do you think?

Oh, and I will most certainly take a look at maybe providing a sort of living space failure system. I welcome failures for any mod!

Edited by IRnifty
Link to comment
Share on other sites

Thank you for making me aware of the compatibility issue. I am currently correcting it and will push a "bugfix" update within the next few short hours. In the meantime, I feel I should propose a highlighting manager mod which would manage and prioritize highlight requests made by mods such as yours, mine, and Farram's mods. As it is, the current model of handling highlighting is not very multi-mod friendly, so I'd like to change that. What do you think?

Oh, and I will most certainly take a look at maybe providing a sort of living space failure system. I welcome failures for any mod!

I was thinking the very same thing you were. I'd been struggling with robust highlighting for several months. Now to figure out the structure of the system. A standard methodology would be very helpful to all modders.

Awesome on the failure mode plans... I'm guessing you will "lose" atmosphere based on the living space... shut some hatches and you reduce the volume lost... Patch vs repair, etc...

Thanks!

Link to comment
Share on other sites

Thank you for making me aware of the compatibility issue. I am currently correcting it and will push a "bugfix" update within the next few short hours. In the meantime, I feel I should propose a highlighting manager mod which would manage and prioritize highlight requests made by mods such as yours, mine, and Farram's mods. As it is, the current model of handling highlighting is not very multi-mod friendly, so I'd like to change that. What do you think?

Oh, and I will most certainly take a look at maybe providing a sort of living space failure system. I welcome failures for any mod!

I've been informed that Kerbal Mechanics 6.1 is out. Thanks IRnifty!

@d4rksh4de: There you go. Problem solved. What a community. I'm proud to be a part. :D

Link to comment
Share on other sites

Suggestion - Oxygen transfer should probably be sped up? With TAC/LS, I can move a lot of Food/Water quickly, but Oxygen comes in such large quantities that it takes a long time to move it from supply pod to the station's core tanks.

Filling up a 210,000 unit tank right now takes a pretty long time compared to the equivalent (in days of life support) sized Food/Water tanks.

Link to comment
Share on other sites

Suggestion - Oxygen transfer should probably be sped up? With TAC/LS, I can move a lot of Food/Water quickly, but Oxygen comes in such large quantities that it takes a long time to move it from supply pod to the station's core tanks.

Filling up a 210,000 unit tank right now takes a pretty long time compared to the equivalent (in days of life support) sized Food/Water tanks.

I thought of that almost a year ago :D. If you look in settings, you can adjust the Flow rate (see below) You can alter the limits of the slider in the Config file, and then readjust the speed in settings:

Currently i have a flow rate of 100 and a MaxFlowRate of 100.

Settings in the file are as below:


<double name="FlowRate">100</double>
<double name="MinFlowRate">0</double>
<double name="MaxFlowRate">100</double>

I recommend setting the MaxFlowRate to 1000, or even 10000, and starting there. This will give you some room on the slider to adjust the flow rate higher, giving you a factor of 10 (or 100) increase if you max it. Play with it to get it where you want.

I realize that it is kinda hidden under the Sounds section, below the Transfer pump sound file locations. I'll move it and relabel it to make it more prominent in the next release. Image below:

C5MOAA8.png

It also sounds like I should change the MaxFlowRate to 1000 by default, to allow some head room without having to dive into the config file...

Finally, if you really want it to be quick, just turn off realism mode and it is instantaneous transfers (no sounds and no waiting).

Edited by Papa_Joe
Link to comment
Share on other sites

Yes, a default of 1000 might be better - I couldn't adjust the slider any higher then 100 in-game and didn't dig deep enough into the XML.

Ideally, I'd suggest calculating flow rate based on volume of the underlying resource. So the pump can move say 100 or 500 liters/s of a resource. Not sure if that information is available in-game though.

Also, there probably needs to be a "Stop Xfer" button somewhere. I could not figure out how to stop the transfer other then wait the 20 minutes while it ran in the background.

Link to comment
Share on other sites

Yes, a default of 1000 might be better - I couldn't adjust the slider any higher then 100 in-game and didn't dig deep enough into the XML.

Ideally, I'd suggest calculating flow rate based on volume of the underlying resource. So the pump can move say 100 or 500 liters/s of a resource. Not sure if that information is available in-game though.

Also, there probably needs to be a "Stop Xfer" button somewhere. I could not figure out how to stop the transfer other then wait the 20 minutes while it ran in the background.

Excellent Ideas. I certainly could make it some factor of the volume and a stop button makes good sense. Not sure what real fuels or other resource mods provide as fields for the part but the amount is always in "units". If I provide the adjustment as units/sec (which it currently is) then you know what you are moving. I could also make it a time based factor where the slider denotes the time is seconds that the transfer runs to move full volume...

Thoughts?

Edited by Papa_Joe
Link to comment
Share on other sites

Mmm, I was hoping that KSP API provided some sort of "here's a resource, here's how much mass it has per unit and how much volume it takes" information. If not, then the solutions are messier. It may end up being that you have to keep a list of the popular resources, or at least the exceptions which require special handling, like TAC/LS Oxygen which comes in huge quantities.

If you know the mass per unit via the KSP API, then maybe the pumps are simply rated to move 1000 kg of stuff per second. Which might be a reasonable least-cost solution that is semi-realistic and mostly self-balancing. Moving 100t of fuel around is still going to take a long time, but moving 1t of Oxygen would be very quick.

...

Another option would be to cap the transfer time at some upper limit. Calculate the sum of the source tank size + target tank size in units, divide by 180 seconds. Your transfer rate is the maximum of either that value or 100 units/sec.

For a little mono-prop tank that holds 750 that is pushing to another 750 unit tank, that is (1500 / 180s) or 8.33 units/sec. In which case you would use the 100 units/sec transfer rate.

In the case of moving Oxygen around, the source tank holds 210k units and the target tank holds 50k units. (260000 / 180s) is 1444 units/sec. Since that is larger then 100 units/sec, you would transfer the materials at a rate of 1444 units/sec.

I have some LF/O tanks that hold 29568 units of Oxidizer each. Transferring between those tanks would use a speed of ((29568 + 29568) / 180s) or 328 units/sec instead of the default of 100 units/sec.

It's a quick-n-dirty solution, but a little suspension of disbelief says that larger tanks have larger pumps. And three minutes is probably a reasonable upper bound for moving bulk materials around.

Link to comment
Share on other sites

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