Jump to content

[0.90] [Up for adoption] Connected Living Space v1.1.2.0 (27th Feb 2015) Hatches and Highlighting


codepoet

Recommended Posts

I have a question.. Without installing another mod, is this capable of transferring kerbals? Like I can't find any buttons for actually transferring Kerbals between 2 properly connected living spaces. :/

The CLS button just lists available capsules, and how many kerbals they can hold, but I don't see any UI to move them. :(

If I need another mod, just for that, is there any lightweight/simple mods that only do that, which are actually updated for 0.90?

Link to comment
Share on other sites

I have a question.. Without installing another mod, is this capable of transferring kerbals? Like I can't find any buttons for actually transferring Kerbals between 2 properly connected living spaces. :/

The CLS button just lists available capsules, and how many kerbals they can hold, but I don't see any UI to move them. :(

If I need another mod, just for that, is there any lightweight/simple mods that only do that, which are actually updated for 0.90?

Squad built in kerbal transfers as a stock option. CLS provides for "space aware" transfers. You can click on the crewable part's hatch and a transfer option appears. click Transfer, and you get the highlighted parts that you can transfer to. Click on one of those parts. If it is in the same "space", then the transfer works. If not, then CLS will notify you that the transfer is not possible.

This can be overridden in the CLS Window, so that you can transfer to any crewable part. CLS was designed to be an API, that allows other modders to use the info it provides.

Finally, there are two mods that provide for crew transfers. The original is Crew Manifest. The other is Ship Manifest. Crew Manifest is fairly lightweight, and only moves kerbals. Ship Manifest is based on Crew manifest, but can move kerbals, science, resources, and offers some other CLS enhanced capabilities.

Hope that helps.

Edited by Papa_Joe
Link to comment
Share on other sites

Squad built in kerbal transfers as a stock option. CLS provides for "space aware" transfers. You can click on the crewable part's hatch and a transfer option appears. click Transfer, and you get the highlighted parts that you can transfer to. Click on one of those parts. If it is in the same "space", then the transfer works. If not, then CLS will notify you that the transfer is not possible.

This can be overridden in the CLS Window, so that you can transfer to any crewable part. CLS was designed to be an API, that allows other modders to use the info it provides.

Finally, there are two mods that provide for crew transfers. The original is Crew Manifest. The other is Ship Manifest. Crew Manifest is fairly lightweight, and only moves kerbals. Ship Manifest is based on Crew manifest, but can move kerbals, science, resources, and offers some other CLS enhanced capabilities.

Hope that helps.

OMG... I feel so stupid... I never even realized you could click that.. XD Thank you so much for that bit of info!

Link to comment
Share on other sites

OMG... I feel so stupid... I never even realized you could click that.. XD Thank you so much for that bit of info!

Never feel bad that you don't know something. This is why the forums are here... to help each other with this awesome game. :D

Link to comment
Share on other sites

  • 2 weeks later...

Lately my game has been crashing and every time I look in the output_log I find this before the crash dump:

CLS highlighted parts gathering Error: System.NullReferenceException: Object reference not set to an instance of an object

at ConnectedLivingSpace.CLSAddon.RebuildCLSVessel (.Part newRootPart) [0x00000] in <filename unknown>:0

Anyone care to explain? :confused:

Link to comment
Share on other sites

That is helpful, thanks for letting me know. Could you let me know where I can get access to the whole log file? It would also be helpful to have a list of mods installed on your system and step-by-step instructions for recreating the problem if possible. Thanks.

Link to comment
Share on other sites

Lately my game has been crashing and every time I look in the output_log I find this before the crash dump:

CLS highlighted parts gathering Error: System.NullReferenceException: Object reference not set to an instance of an object

at ConnectedLivingSpace.CLSAddon.RebuildCLSVessel (.Part newRootPart) [0x00000] in <filename unknown>:0

Anyone care to explain? :confused:

I've seen this as well, but I've experienced no crashing.

@codepoet: Since I made the last alterations in that part of the code I will also take a look, create steps to reproduce and see if I can see any errors in conditional logic I may have made.

Update:

After a quick look at the code, the error generated is managed. it will not cause any crashing. So, the source of the crash must be related to something else, as I'm seeing the error consistently ,and not experiencing any issues.

I'm seeing the error on initial load of a vessel, so it looks like the vessel may not be instantiated at that point, so a quick check for the vessel != null should correct the cause of the exception. Testing a fix now.

Ok, tested fix, and the issue goes away. Code below is the revised method:


private void RebuildCLSVessel(Part newRootPart)
{
try
{
//Debug.Log("RebuildCLSVessel");
// Before we rebuild the vessel, we need to take some steps to tidy up the highlighting and our idea of which space is the selected space. We will make a list of all the parts that are currently highlighted.
// We will use that list to un-highlight parts that are highlighted. Once the rebuild is complete we will work out which parts are still in the list and highlight those parts.

uint flightID = 0;
List<CLSPart> listHighlightedParts = new List<CLSPart>();
if (null != this.vessel)
{
try
{
foreach (CLSSpace space in vessel.Spaces)
{
foreach (CLSPart p in space.Parts)
{
Part part = (Part)p;
if (flightID != part.flightID)
{
flightID = part.flightID;
//Debug.Log("Part : "+ part.flightID + " found." ) ;
}
if (p.highlighted)
{
listHighlightedParts.Add(p);
p.Highlight(false);
}
}
}
}
catch (Exception ex)
{
Debug.Log("CLS highlighted parts gathering Error: " + ex.ToString());
}
//Debug.Log("Old selected vessel had "+ listHighlightedParts.Count + " parts in it.");
vessel.Clear();
}

// Tidy up the old vessel information
this.vessel = null;

// Build new vessel information
this.vessel = new CLSVessel();
this.vessel.Populate(newRootPart);
}
catch (Exception ex)
{
Debug.Log("CLS rebuild Vessel Error: " + ex.ToString());
}
}

Edited by Papa_Joe
Link to comment
Share on other sites

That is helpful, thanks for letting me know. Could you let me know where I can get access to the whole log file? It would also be helpful to have a list of mods installed on your system and step-by-step instructions for recreating the problem if possible. Thanks.

I'll get back to you on that...

EDIT: Here ya go.

EDIT #2: Screenshot of GameData just in case:ApKk65r.png?1

Edited by Mrsupersonic8
Link to comment
Share on other sites

  • 3 weeks later...
I've seen this as well, but I've experienced no crashing.

@codepoet: Since I made the last alterations in that part of the code I will also take a look, create steps to reproduce and see if I can see any errors in conditional logic I may have made.

Update:

After a quick look at the code, the error generated is managed. it will not cause any crashing. So, the source of the crash must be related to something else, as I'm seeing the error consistently ,and not experiencing any issues.

I'm seeing the error on initial load of a vessel, so it looks like the vessel may not be instantiated at that point, so a quick check for the vessel != null should correct the cause of the exception. Testing a fix now.

Ok, tested fix, and the issue goes away. Code below is the revised method:

...

I have issued a pull request with code revisions to correct this issue. It is tied to Issue #52 at the GitHub repository.

Link to comment
Share on other sites

  • 1 month later...
So I wonder, is this still relevant with newer release of the game, its still necessary? and if it is, compatible?

Living spaces is still relavant, as there is no squad analog. However, I have noticed some minor issues. Still characterizing, but it appears that the CLS icon does not show up, although the mod does successfully load.

I've tested using an old save game, so I'm creating a new one (I was using aries, KW, Procedural parts, and B9, & these are not working right yet) to perform some clean testing.

I'll post with an update soon, and take a look at the code as well. codepoet's real life has been busy of late.

Edited by Papa_Joe
Link to comment
Share on other sites

Just checking in to say that I am aware KSP1.0 has been released. If there are any problems with CLS I will get them fixed. As I understand it, CLS is still a relevant mod, and since it has developed an appreciative user-base and is used by other mods too, will be supported going forwards.

If there are any compatibility problems with KSP 1.0 please make bug reports with as much details as possible. If there are no problems, I will still do a rebuild and release anyway, but it will not be overnight - life is busy, as it is for everyone!

Even better than reporting a bug is proposing a fix and generating a pull request on github.

Thanks for the support guys :)

Link to comment
Share on other sites

From a very quick test with a couple of command modules and hatches on the launchpad, Ship Manifest seems to work as normal with CLS enabled - part highlighting works normally, and it seems to respect the restrictions on crew transfer just fine - it tells me parts aren't in the same space and refuses to allow the transfer if the hatches are closed. That's what it should be doing, right?

This error crops up repeatedly in the logs, though:

CLS highlighted parts gathering Error:  System.NullReferenceException: Object reference not set to an instance of an object at ConnectedLivingSpace.CLSAddon.RebuildCLSVessel (.Part newRootPart) [0x00000] in <filename unknown>:0 

Don't know if it's serious. Logs are here if you want to take a look:

https://www.dropbox.com/sh/libgacd2wcmksjd/AADW-kvU778-lMNd2-tJNsRXa?dl=0

--Edit: forgot to mention - no toolbar icon appears.

Edited by UnanimousCoward
Link to comment
Share on other sites

From a very quick test with a couple of command modules and hatches on the launchpad, Ship Manifest seems to work as normal with CLS enabled - part highlighting works normally, and it seems to respect the restrictions on crew transfer just fine - it tells me parts aren't in the same space and refuses to allow the transfer if the hatches are closed. That's what it should be doing, right?

This error crops up repeatedly in the logs, though:

CLS highlighted parts gathering Error:  System.NullReferenceException: Object reference not set to an instance of an object at ConnectedLivingSpace.CLSAddon.RebuildCLSVessel (.Part newRootPart) [0x00000] in <filename unknown>:0 

Don't know if it's serious. Logs are here if you want to take a look:

https://www.dropbox.com/sh/libgacd2wcmksjd/AADW-kvU778-lMNd2-tJNsRXa?dl=0

--Edit: forgot to mention - no toolbar icon appears.

Hey all, based on my testing after rebuilding a save for 1.0, I have the following:

1. CLS will sometimes rebuild the vessel data using debris when debris is nearby. I had this same issue in SM, so I've added a check for the active vessel in the OnVesselLoaded event handler. This explains the behavior noted above.

2. The CLS Icon does not show up on the stock Toolbar. The addon is loading just fine, but no button for the CLS window.

@codepoet: if you are okay with it, I will create a pull request that corrects both issues.

SM has a feature to allow using either the Stock Toolbar or Blizzy's Toolbar, so I'm thinking the community would really like to be able to choose between toolbars in CLS as well.

With your permission I'd also like to add that feature.

Edited by Papa_Joe
Link to comment
Share on other sites

Pull requests are great, thanks.

Ok,

Bugs are fixed, and hot switching between Stock toolbar and Blizzy's toolbar is in place and working fine.. 2 issues remain:

1. persisting the toolbar selection setting and

2. icons for the Blizzy Toolbar.

the Stock toolbare uses 38x38 images, Blizzy's toolbare use 24x24 versions. I'v cropped the existing 38x38 icons to fit in 24x24, but you may want to create your own. Seem to look good tho.

As for the setting persistence file, I'm thinking a json style config file, like a MM file format. I'm also thinking it should reside in the gamedata root, like the blizzy config, but that is up to you. I bury my config file in my plugindata folder myself...

So, when I create the Pull request, I'll have code in place for persisting the toolbar setting and I'll also make availabe links to the icon files I create.

pull request will be soon, like in an hour or 2.

Update. Still testing settings save persist. Is saving nicely, but not loading as expected. Will submit pull request around 10 AM CDT (US).

Edited by Papa_Joe
Link to comment
Share on other sites

Update. Pull request created.

Corrects the debris bug, the Icon display bug, and adds support for Blizzy's toolbar as well as hot switching between the Stock and Blizzy's Toolbar. Btw, the debris bug was the cause of the null reference error posted here: http://forum.kerbalspaceprogram.com/threads/70161-0-90-Connected-Living-Space-%28API%29-v1-1-2-0-%2827th-Feb-2015%29-Hatches-and-Highlighting?p=1777359&viewfull=1#post1777359. I treated a symptom and not the cause back then.

Blizzy Icons are here:

u9q9HMn.png

9ydCots.png

Update: Subsequent testing with KSP 1.0.2 shows these fixes also work in the latest version of KSP.

Edited by Papa_Joe
Added reference to earlier bug report info
Link to comment
Share on other sites

Hi

My KSP just crashed with a NRE about CLS. Unfortunatelly i restarted the game before i had the idea to save the log. But please update this mod :-)

Thanks for your hard work papa_joe

Link to comment
Share on other sites

Hi

My KSP just crashed with a NRE about CLS. Unfortunatelly i restarted the game before i had the idea to save the log. But please update this mod :-)

Thanks for your hard work papa_joe

Hey ManuxKerb, the NRE error in CLS is a managed error, meaning that it is handled and reported by the plugin, and will not cause a crash. If you crashed, it is likely due to another addon. I've noted crashes due to Procedural parts, which is under revision as we speak. Don't know if that is your issue, but thought I'd share what I know.

Edit: ManuxKerb, I've created a pull request with the fixes. Just waiting on codepoet to find the time in his busy schedule to merge, test and release.

If folks would like, I can release an unofficial DLL on my fork repository for those that do not wish to wait. just understand that its use will be at your own risk and the "official" version is subject to change by codepoet.

Edited by Papa_Joe
Link to comment
Share on other sites

Hey ManuxKerb, the NRE error in CLS is a managed error, meaning that it is handled and reported by the plugin, and will not cause a crash. If you crashed, it is likely due to another addon. I've noted crashes due to Procedural parts, which is under revision as we speak. Don't know if that is your issue, but thought I'd share what I know.

Edit: ManuxKerb, I've created a pull request with the fixes. Just waiting on codepoet to find the time in his busy schedule to merge, test and release.

If folks would like, I can release an unofficial DLL on my fork repository for those that do not wish to wait. just understand that its use will be at your own risk and the "official" version is subject to change by codepoet.

Experimental dll version 1.1.3.0 is located here: https://github.com/PapaJoesSoup/ConnectedLivingSpace/releases/tag/1.1.3.0

Do not remove your existing installation of CLS. This is only the dll, so backup the existing dll, and then overwrite the existing dll with this version. Also, copy the icons above (2 posts back) to the assets folder if you intend to use blizzy's toolbar.

Enjoy.

Edit: I forgot to mention the icon names... that might be important :D

file names are: cls_b_icon_off.png and cls_b_icon_on.png

Location: GameData\ConnectedLivingSpace\assets

hluJ8yb.png

Edited by Papa_Joe
Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...