Jump to content

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


Papa_Joe

Recommended Posts

Just an Update:

I've successfully added automatic crew transfer. No more Update Portrait button.

- It now provides some bumping and scraping sounds while a kerbal moves. (I didn't do it, but I can just imagine minion like stuff here... hehe)

- Portrait updates at the end of the move.

- the length of the move can be configured (in seconds).

Update soon, but really need to add spatial awareness after this, as I can see a cool highlighting gimmick I can do during the transfer from living space to living space, with more we could do with sounds.

More to come. but same clean interface.

Link to comment
Share on other sites

- It now provides some bumping and scraping sounds while a kerbal moves. (I didn't do it, but I can just imagine minion like stuff here... hehe)

What exactly is the sound of a kerbal bumping his head on a hatch handle? I can't wait to find out!

Link to comment
Share on other sites

Just an Update:

I've successfully added automatic crew transfer. No more Update Portrait button.

- It now provides some bumping and scraping sounds while a kerbal moves. (I didn't do it, but I can just imagine minion like stuff here... hehe)

- Portrait updates at the end of the move.

- the length of the move can be configured (in seconds).

Update soon, but really need to add spatial awareness after this, as I can see a cool highlighting gimmick I can do during the transfer from living space to living space, with more we could do with sounds.

More to come. but same clean interface.

Cool Papajoe. This just keeps getting better and better.

Those features youre planning would just be the best

Link to comment
Share on other sites

Thanks for adding that. I had another question. Would it be possible to add a balance feature for fuel tanks?

I have given this request a lot of thought. Multiple people have made it, and it seems to me to be central to distinguishing Ship Manifest as a tool in the KSP mod ecosystem, so to speak.

On the one hand, this feature seems probably the one that would make "some" people drop TAC Fuel balancer. While I have never used TAC Fuel balancer, and I have no control over what mods people play, I also have no problems with more than one tool being available to perform similar, if not the same tasks. Anything I would implement would HAVE to fit my interface (I'm not changing the basic layout, period), and would by necessity be very different from how TAC has or would implement it. Choice is always a good thing, especially if it promotes improvements in the player experience.

However, based on feed back in this thread, and my personal feelings about what the "theme" of this mod should be, Fuel balancing in my mind is really a "Flight Control" feature, as it affects burns, attitude adjustments, and ultimately the total resources consumed in a flight. from that point of view, it is outside what I would call my scope or theme, which is as a Ship's Manifest.

I manage resources, be they crew, science, water, fuel, power, etc, for the ship. Like a quartermaster or Ship's accountant. I can move cargo and kerbals as needed for the flight plan, crew or passengers. I leave the flight control stuff to the math wizards out there that can run circles around my "very basic" calculus skills.

So, long story, not so short, I'm thinking that fuel balancing, IF it was implemented, would be restricted to Non Acceleration periods only. Active fuel balancing, which, by the way, I believe TAC Fuel balancer CAN do, is in my mind flight control baby,

Thoughts?

Link to comment
Share on other sites

I have given this request a lot of thought. Multiple people have made it, and it seems to me to be central to distinguishing Ship Manifest as a tool in the KSP mod ecosystem, so to speak.

On the one hand, this feature seems probably the one that would make "some" people drop TAC Fuel balancer. While I have never used TAC Fuel balancer, and I have no control over what mods people play, I also have no problems with more than one tool being available to perform similar, if not the same tasks. Anything I would implement would HAVE to fit my interface (I'm not changing the basic layout, period), and would by necessity be very different from how TAC has or would implement it. Choice is always a good thing, especially if it promotes improvements in the player experience.

However, based on feed back in this thread, and my personal feelings about what the "theme" of this mod should be, Fuel balancing in my mind is really a "Flight Control" feature, as it affects burns, attitude adjustments, and ultimately the total resources consumed in a flight. from that point of view, it is outside what I would call my scope or theme, which is as a Ship's Manifest.

I manage resources, be they crew, science, water, fuel, power, etc, for the ship. Like a quartermaster or Ship's accountant. I can move cargo and kerbals as needed for the flight plan, crew or passengers. I leave the flight control stuff to the math wizards out there that can run circles around my "very basic" calculus skills.

So, long story, not so short, I'm thinking that fuel balancing, IF it was implemented, would be restricted to Non Acceleration periods only. Active fuel balancing, which, by the way, I believe TAC Fuel balancer CAN do, is in my mind flight control baby,

Thoughts?

I was just looking for a way to balance fuel while docked in orbit. I definitely don't want anything automated. I've looked at TAC Fuel Balancer but since your mod does a lot of what it does I was looking for a way to get the functionality without adding another mod to my growing list.

The reason I originally asked about this was when transferring fuel while rescuing 6 Kerbals stranded in orbit I noticed that sometimes fuel in small amounts wouldn't transfer. I was trying to get two tanks on opposites sides of my ship to have the same amount of fuel and it was bugging me that I couldn't get it exact. It made me wonder what determines the increments the slide bars use? Would it be possible to add an input box so you could enter the desired amount (in whole numbers or percentages)? Honestly, this would be enough for me so I could manually balance fuel.

Either way, thanks for considering it and for your work on this mod.

Link to comment
Share on other sites

I was just looking for a way to balance fuel while docked in orbit. I definitely don't want anything automated. I've looked at TAC Fuel Balancer but since your mod does a lot of what it does I was looking for a way to get the functionality without adding another mod to my growing list.

The reason I originally asked about this was when transferring fuel while rescuing 6 Kerbals stranded in orbit I noticed that sometimes fuel in small amounts wouldn't transfer. I was trying to get two tanks on opposites sides of my ship to have the same amount of fuel and it was bugging me that I couldn't get it exact. It made me wonder what determines the increments the slide bars use? Would it be possible to add an input box so you could enter the desired amount (in whole numbers or percentages)? Honestly, this would be enough for me so I could manually balance fuel.

Either way, thanks for considering it and for your work on this mod.

Now, that is something I can certainly do. I also wondered if anyone was in need of a number box... the value used is a DOUBLE value type, so you can be pretty precise.

The slider bar is a range comparing the source tank contents and the target tank contents. The max value that can be transferred to the target is the max value for the slider. Given the limited real estate, its hard to be precise with the slider.

Edited by Papa_Joe
Link to comment
Share on other sites

Update:

New version released: 0.23.3.1.5

Version 0.23.3.1.5 - 26 Feb, 2014 - Add Realism to Crew Transfer.

- Realism Mode: Crew Xfers & Moves now occur in "real" time. We now have Sounds of crewman moving. Portrait updates now occur when Kerbals get in thier new seat.

- Added Crew sound locations to settings Window.

- Added Config for Crew Transfer Duration from part to part. This is a placeholder for later development.

- Added default xfer duration of 2 sec for Seat to Seat Xfers within the same Part.

- Resource Xfers enhancements. Added textbox for entering Exact Xfer Amounts. Integers can be entered, and fractions can be pasted into box for now...

- Rearranged resource xfer details to make it more intuitive after adding text box.

- Include Toolbar 1.6.0 redistribution

Enjoy!

Now, to finally dive into Connected Living spaces. Looks like some interesting things coming...

Link to comment
Share on other sites

Good stuff. Keep at it!

Well, getting the hang of your API.

I have most of the interface plumbed for Living Spaces. Now the real heavy lifting: Navigating the part path from space to space, and managing the real time highlighting as a kerbal moves thru the ship.

Then reworking the interface's behavior so it is both intuitive and prevents you from doing anything you should not.

Btw, the casting is working out nicely. It is allowing me to essentially work spaces into the existing interface with a fair amount of code reuse

Well, off to bed for some rest and coding in my day job. I think the next update is going to shape up well.

NOTE to everyone: This next update will make Ship Manifest dependent on Toolbar, ConnectedLivingSpace, and ModuleManager. I just want all to understand the dependencies.

Link to comment
Share on other sites

Update.

It seems that ConnectedLivingSpace is compiled in .NET 4.0, and I've been releasing in 3.5

It also seems that it matters. :(

For some reason I get a large number of errors in the debug log when trying to show the Manifest window, when compiling in 4.0. If I recompile CLS to 3.5, and then recompile my code to 3.5, it all works.

Obviously, I have something incompatible with 4.0 in my code. Don't know what yet tho.

I've contacted codepoet to see if he is agreeable with releasing CLS in .Net 3.5.

With the 3.5 version, I've got the bones of Living Spaces working in game.

So, in hopes that codepoet is agreeable, I will continue to push forward.

Edit: codepoet has graciously released CLS in .NET 3.5. Thanks codepoet!

Edited by Papa_Joe
Link to comment
Share on other sites

Just an update on progress.

I've been busy releasing a new version of some software at work, so I've not been able to do much the past week. however, time is getting better.

Space Xfer Interface is complete. I have completed basic xfers from space to space.

My goals for the next release include:

- Add space transfers.

- add move kerbals in a space. Currently, the the move only moves from seat to seat in a pert. This will allow seat to seat in a space.

- Update to crew transfers to be internal path aware, so you can't move a crew member to a part that is not connected internally.

- I also plan to add sounds to space transfers,

- Highlighting the parts in the path as the kerbal "moves" thru the ship. This would apply to both spaces and to crew xfers.

It seems a bit redundant to include space transfers and crew transfers, but it also give some flexibility. I've already included a switch to turn off crew transfers, so if you wanted you could use space transfers only.

Edited by Papa_Joe
Link to comment
Share on other sites

When transferring crew I always get a bunch of errors in my log file. Every time Ship Manifest window is opened, "InvalidOperationException: out of sync" is thrown and on each crew transfer, "InvalidOperationException: Collection was modified; enumeration operation may not execute" is thrown.

By adding some try/catch clauses around the code I've been able to get more detailed information for the first exception:


[LOG 16:35:21.493] System.InvalidOperationException: out of sync
at System.Collections.Generic.Dictionary`2+Enumerator[System.String,System.Collections.Generic.List`1[Part]].VerifyState () [0x00000] in <filename unknown>:0
at System.Collections.Generic.Dictionary`2+Enumerator[System.String,System.Collections.Generic.List`1[Part]].MoveNext () [0x00000] in <filename unknown>:0
at System.Collections.Generic.Dictionary`2+KeyCollection+Enumerator[System.String,System.Collections.Generic.List`1[Part]].MoveNext () [0x00000] in <filename unknown>:0
at ShipManifest.ManifestController.ShipManifestWindow (Int32 windowId) [0x00000] in <filename unknown>:0

As the second thing, I'd ask you to add the following line to your code to make Ship Manifest compatible with TextureReplacer. Currenty, Kerbals loose their personalised faces and suits when moving around a ship.


--- /home/davorin/Razvoj/ShipManifest/ShipManifest/ShipManifestModule.cs (base)
+++ /home/davorin/Razvoj/ShipManifest/ShipManifest/ShipManifestModule.cs (working copy)
@@ -317,6 +323,9 @@
ManifestController.GetInstance(FlightGlobals.ActiveVessel).SelectedPartSource.vessel.SpawnCrew();
ManifestController.GetInstance(FlightGlobals.ActiveVessel).SelectedPartTarget.vessel.SpawnCrew();
ManifestController.GetInstance(FlightGlobals.ActiveVessel).RespawnCrew();
+
+ // Notify TextureReplacer to update Kerbal (IVA) textures.
+ GameEvents.onVesselChange.Fire(FlightGlobals.ActiveVessel);

// Reset State vars
crewXfer = false;

Link to comment
Share on other sites

What is a "space transfer". Any progress towards the next release?

Space Transfer was my misguided first attempt at using your API. I was thinking of spaces like another resource. Mistake. I threw away my existing code and started over. Sorry for the late response. Been very busy of late with RL.

When transferring crew I always get a bunch of errors in my log file. Every time Ship Manifest window is opened, "InvalidOperationException: out of sync" is thrown and on each crew transfer, "InvalidOperationException: Collection was modified; enumeration operation may not execute" is thrown.

By adding some try/catch clauses around the code I've been able to get more detailed information for the first exception:


[LOG 16:35:21.493] System.InvalidOperationException: out of sync
at System.Collections.Generic.Dictionary`2+Enumerator[System.String,System.Collections.Generic.List`1[Part]].VerifyState () [0x00000] in <filename unknown>:0
at System.Collections.Generic.Dictionary`2+Enumerator[System.String,System.Collections.Generic.List`1[Part]].MoveNext () [0x00000] in <filename unknown>:0
at System.Collections.Generic.Dictionary`2+KeyCollection+Enumerator[System.String,System.Collections.Generic.List`1[Part]].MoveNext () [0x00000] in <filename unknown>:0
at ShipManifest.ManifestController.ShipManifestWindow (Int32 windowId) [0x00000] in <filename unknown>:0

As the second thing, I'd ask you to add the following line to your code to make Ship Manifest compatible with TextureReplacer. Currenty, Kerbals loose their personalised faces and suits when moving around a ship.


--- /home/davorin/Razvoj/ShipManifest/ShipManifest/ShipManifestModule.cs (base)
+++ /home/davorin/Razvoj/ShipManifest/ShipManifest/ShipManifestModule.cs (working copy)
@@ -317,6 +323,9 @@
ManifestController.GetInstance(FlightGlobals.ActiveVessel).SelectedPartSource.vessel.SpawnCrew();
ManifestController.GetInstance(FlightGlobals.ActiveVessel).SelectedPartTarget.vessel.SpawnCrew();
ManifestController.GetInstance(FlightGlobals.ActiveVessel).RespawnCrew();
+
+ // Notify TextureReplacer to update Kerbal (IVA) textures.
+ GameEvents.onVesselChange.Fire(FlightGlobals.ActiveVessel);

// Reset State vars
crewXfer = false;

Thanks for this. I've been battling that very issue. I think it is related to the fact I'm using foreach on an object.collection I'm modifying. I will switch to Indexed loops and see if the error goes away.

Link to comment
Share on other sites

Space Transfer was my misguided first attempt at using your API. I was thinking of spaces like another resource. Mistake. I threw away my existing code and started over. Sorry for the late response. Been very busy of late with RL.

Ooops,

Sorry if it was not clear in CLS. If you need anything - just ask.

I am pleased to see you back - I was worrying you had disappeared! Like you, I also find RL can get in the way of development and play!

Link to comment
Share on other sites

Ooops,

Sorry if it was not clear in CLS. If you need anything - just ask.

I am pleased to see you back - I was worrying you had disappeared! Like you, I also find RL can get in the way of development and play!

Error was mine, not yours. Your API was clear, I was just not wrapping my head correctly around what I wanted to achieve. :)

I'm not going anywhere. :) Been here since version .7 (before the existence of a stellar body). Did the Sun challenge (go 13.1 M meters and turn around and come back. the sun was part of the backgound textures then. Man was that fun...

Link to comment
Share on other sites

Just an update.

I've completely reworked my data sources, so now Ship Manifest should use less frame resources. It no longer rebuilds each list and dictionary every frame. I never liked that... Now it stores these objects at the scene level.

I've also scrapped my first attempt at integrating CLS. I mistakenly was thinking in terms of moving from space to space. Why?? Anyway, now the crew transfer is simply CLS aware. you cannot move a kerbal to a part that is NOT in the same Living Space.

I've included a switch to allow you to disable CLS awareness, and let you "lazy" players (like me) move kerbals where you like. :)

I'm thinking I will release what I have as soon as I get the highlighting proper (I currently have event handlers stepping on eachother) for the sake of getting it out, and for the obvious improvement to realism play.

I'll then work on the "bells and whistles" of more complex sounds, and path highlighting as the kerbal moves...

Stay tuned. More to come.

Edited by Papa_Joe
Link to comment
Share on other sites

Just a heads-up that after adding / transferring crew in Ship Manifest, Kerbal customizations from TextureReplacer often gets reverted. Here's the suggested fix from shaw himself:

Could you add


GameEvents.onVesselChange.Fire(FlightGlobals.ActiveVessel);

after each crew transfer and portrait update? That's required for TextureReplacer to properly update personalised Kerbal textures.

Link to comment
Share on other sites

Just a heads-up that after adding / transferring crew in Ship Manifest, Kerbal customizations from TextureReplacer often gets reverted. Here's the suggested fix from shaw himself:

I saw what Shaw pointed out, and as part of supporting CLS, the same event call is needed to update the CLS vessel. Therefore, it will be included with the next release.

Thanks for point it it out. :)

Link to comment
Share on other sites

Feature request: show amount of stored stuff in object in part list in transfer menu. For example, I want to transfer data from one of gravioli detectors (say, from one of 10 which I have on board) to science lab; I have to click several gravioli detectors in transfer menu to see which one contains data. I know that I can find this info in SM main window, but it would be much more convenient if amount of transferable stuff would be indicated near name of part in transfer list.

Link to comment
Share on other sites

Feature request: show amount of stored stuff in object in part list in transfer menu. For example, I want to transfer data from one of gravioli detectors (say, from one of 10 which I have on board) to science lab; I have to click several gravioli detectors in transfer menu to see which one contains data. I know that I can find this info in SM main window, but it would be much more convenient if amount of transferable stuff would be indicated near name of part in transfer list.

Good Idea. Let me see what I can do.

Also an update.

I have solved my highlighting issues, and things are working as intended. I have discovered the source of the Debug log error with the collection. I have implemented the additional Event throws.

I still have a couple of bugs, and some cleanup to do, but it is looking like I might release tonight (CDT). Feature list (for now):

New - Crew transfer Realism enhanced with ConnectedLivingSpaces!

- Connected Spaces illuminate when you select crew.

- Source part color is still Red by default, but the target color is set to Blue by default for Crew Only. can be configured.

- Connected Living Space Aware. Configurable switch to enable. When enabled, crew transfers can only occur within the same Living Space.

- General Clean up of Code. Greatly improved error handling and logging. Should also be an improvement to performance, with no more per-frame collection management work.

- Event trigger Support for TextureReplacer and Extraplanetary LaunchPads. Event throws have been added to ensure proper updating of other mods.

- Latest Toolbar version distribution (assuming it isn't updated the moment I download :P)

- Dependencies on CLS and Toolbar. Be sure that is understood. I will look at optional dependencies in the future, but for now, it is what it is. :) Besides, they are great plugins.

Stay tuned...

Edit: Found a few more bugs still... Nothing serious, but release won't be tonight. Tomorrow.

Edited by Papa_Joe
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...