Jump to content

[0.20.x] Subassembly Manager


TheUndeadFish

Recommended Posts

I must be doing something obviously wrong, but I can't figure out what. This addon simply does not work in my game. It loads the DLL:

Load(Assembly): SubassemblyManager/SubassemblyManager
AssemblyLoader: Loading assembly at [redacted]/KSP_osx/GameData/SubassemblyManager/SubassemblyManager.dll
Non platform assembly: [redacted]/KSP_osx/GameData/SubassemblyManager/SubassemblyManager.dll (this message is harmless)

But it simply never instantiates the addon. There's no reference to it after that in the log file at all. No exceptions, no nothing.

Any idea what could be going wrong? I'm stumped.

Link to comment
Share on other sites

can somebody help me with installation!?

i extracted it and went into the mod game data copied and pasted that into the KSP game data. then i got the plug in data from the mod file and pasted that into the KSP plugin data. loaded the game and nothing is different?

Link to comment
Share on other sites

can somebody help me with installation!?

i extracted it and went into the mod game data copied and pasted that into the KSP game data. then i got the plug in data from the mod file and pasted that into the KSP plugin data. loaded the game and nothing is different?

remove it again, then install EVERYTHING in the first location. it all goes in its own folder inside GameData

Link to comment
Share on other sites

i extracted it and went into the mod game data copied and pasted that into the KSP game data. then i got the plug in data from the mod file and pasted that into the KSP plugin data. loaded the game and nothing is different?
remove it again, then install EVERYTHING in the first location. it all goes in its own folder inside GameData

It's not all under GameData, although that part would at least be enough to get the mod to load and show the button.

The folder/file structure is:

  • Kerbal Space Program
    • GameData
      • SubassemblyManager
        • SubassemblyManager.dll file

    • PluginData
      • subassemblyLoader
        • subassemblies
          • Landers
          • Lifters
          • Probes

@CaptainArbitrary @Robbii6 Did you guys go into the VAB and place a root part? The little button doesn't show up until there's at least 1 part placed in the VAB/SPH.

As of my latest version (v0.1.3) it now shows a disabled button (really just a dark rectangle) when there's no root part. But yes, placing a root part is a requirement for it to show a usable button.

I'm running OS X.

I don't have OS X so I can't test anything with that specifically. And I haven't heard anything from anyone on OS X previously, whether saying it's working or not... From what you're saying, it seems you didn't find a line starting with "AddonLoader: Instantiating addon component 'SubassemblyManager". If that's missing, then I assume it's not fully loading my mod for some reason (assuming all the same information is written to that log on OS X). So I don't have much to go on as to why it's not working.

Perhaps you could try this: start the game, enter the VAB, exit out of the game, and then send me the resulting output_log file. I'm hoping there's something somewhere in there that might tell me what's going on.

On a separate thought: Do you happen to be using the Part & Groups Filter mod? I've had a couple reports saying that mod causes mine to "not work", but I haven't gotten around to investigating that properly yet.

Link to comment
Share on other sites

Does it work with 0.21.0?

I've just updated my own game and it appears to be working normally.

no this doesnt work with .21 and using it causes whenever u remove a part off a ship u cant put any parts on it

So far I haven't seen any new problems like that. Are you trying to load and attach a subassembly that is fundamentally unattachable (and wouldn't have worked in KSP 0.20 either)? If not, then I'll need a bit more detail as to what you're doing saving and loading parts to end up with your problem.

Link to comment
Share on other sites

no this doesnt work with .21 and using it causes whenever u remove a part off a ship u cant put any parts on it

I had the same problem after installing my mods in .21, so I tried uninstalling SAM and that didn't fix it. I assume it's something else. It could be:

MechJeb 2

Protractor

Lazor Docking

Engineer

Procedural Fairings

Haystack

Link to comment
Share on other sites

no this doesnt work with .21 and using it causes whenever u remove a part off a ship u cant put any parts on it

I've had that happen and it's not this mod... I'm trying to narrow down which one is actually doing this.

Link to comment
Share on other sites

no this doesnt work with .21 and using it causes whenever u remove a part off a ship u cant put any parts on it

It works fine for me. Then again, it was the first addon that I reinstalled. There are other addons that cause problems in the VAB (Editor Tools has been updated, but prior to the update, caused various wonkiness, for example).

Link to comment
Share on other sites

no this doesnt work with .21 and using it causes whenever u remove a part off a ship u cant put any parts on it

I can confirm that this is being caused by Romfarer Docking Cam. Which seems really weird to me... lol. I have no idea how that is doing it. I suspected it was SAL too.

Link to comment
Share on other sites

I can confirm that this is being caused by Romfarer Docking Cam. Which seems really weird to me... lol. I have no idea how that is doing it. I suspected it was SAL too.

I came back in to mention the part placement bug as well, (don't know why this didn't happen before), but I will confirm the confirmation that Romfarer's DockingCam was the culprit.

hqdefault.jpg

"Dr. Weasel, do you concur?"

Yes. Yes I do. :*(

Link to comment
Share on other sites

Any status on fixing the struts and fuel lines problems?

Saving a subassembly by dragging it directly off of the rocket/plane (NOT using alt-click to copy it) works every time for me and keeps all struts and fuel lines intact.

I believe that the problem happens when parts are copied off the rocket to make a subassembly, as the struts and fuel lines are only connected after the copied part is placed on the rocket/plane and therefore aren't connected in the saved subassembly. If this is the case, it isn't something that the mod can fix.

Link to comment
Share on other sites

Any status on fixing the struts and fuel lines problems?

I have a simple solution for this which requires a minor recode... have the plugin use the Action Groups editor to highlight the part you would have selected/dragged and save from there. It seems to work in keeping the struts and fuel lines intact.

The only problem with this fix is it breaks the way the plugin checks for the selected part's attachability (if that's a word) which I kinda find useless anyway.

The following code is where I applied the fix.

All changes are towards the beginning of the OnGUI method and each line that is edited/added is wrapped with comments to be made obvious... Example:

//\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\

<edited/added code>

/////////////////////////////////////////////////////

private void OnGUI()
{
if(HighLogic.LoadedScene == GameScenes.EDITOR || HighLogic.LoadedScene == GameScenes.SPH)
{
if (EditorLogic.fetch == null)
{
return;
}

//\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
EditorLogic editor = EditorLogic.fetch;
EditorActionGroups editorActionGroups = EditorActionGroups.Instance; // using the action groups part of the VAB to save subassemblies
/////////////////////////////////////////////////////

GUI.skin = HighLogic.Skin;

if (EditorLogic.softLock) // if the editor's softlock is on, then we're almost certainly in a situation where the user shouldn't be able to click our Load/Save button.
{
GUI.Box(_subAsmButtonRect, "");
}
//\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
//else if (EditorLogic.SelectedPart == null)
else if (editor.editorScreen == EditorLogic.EditorScreen.Parts) // are we in the "Parts" editor
/////////////////////////////////////////////////////
{
if (GUI.Button(_subAsmButtonRect, "Load Sub"))
{
// Lock the editor so that the user can't do anything silly while the browser is up.
EditorLogic.fetch.Lock(true, true, true);

CreateCategoryBrowser(OnChooseLoadFolder);
_mode = Mode.LoadBrowseForCategory;
}
}
//\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
else if (editor.editorScreen == EditorLogic.EditorScreen.Actions) // are we in the "Action Groups" editor
/////////////////////////////////////////////////////
{
//\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
if (GUI.Button(_subAsmButtonRect, "Save Sub") && editorActionGroups.GetSelectedParts().Count == 1) // button was clicked AND there's a highlighted part
/////////////////////////////////////////////////////
{
// Lock the editor so that the user can't do anything silly while the browser is up.
EditorLogic.fetch.Lock(true, true, true);


//\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
// Save the currently dragged part now, otherwise we'll have trouble getting it later.
//_selectedPart = EditorLogic.fetch.PartSelected;

// get the highlighted part:
// we have to move once through the enumerator to get to the part (I couldn't find an easier way)
List<Part>.Enumerator partsEnum = editorActionGroups.GetSelectedParts().GetEnumerator();
partsEnum.MoveNext();

_selectedPart = partsEnum.Current;
/////////////////////////////////////////////////////

if (IsAttachable(_selectedPart))
{
CreateCategoryBrowser(OnChooseSaveFolder);
_mode = Mode.SaveBrowseForCategory;
}
else
{
_mode = Mode.SaveWarnUnattachable;
}
}
}

...

}

Since TheUndeadFish is doing such a great job with this, I am no longer going to make my own version of the Subassembly plugin. So I hope he includes this fix because it also helps those of us who have an issue with clicks ignoring the button and clicking behind it losing grip on the assembly which I still don't understand how this happens but I have had it happen to me before with the original plugin and this one. (I also have some very strut/fuel line intensive assemblies and I don't want to have to keep jury-rigging the plugin with every new release :P ).

Link to comment
Share on other sites

Any status on fixing the struts and fuel lines problems?

Here is how I believe it works:

Struts and fuel lines are directional with a beginning and end point the game only saves the origin and length, but not the end point so you see the following behavior.

If the strut/line begins and ends on the within the same cluster of parts (belonging to the same parent) it will be preserved in the SAL/SAM file.

If it begins Outside the part cluster ends Inside the part cluster the strut node will stay attached to the rest of the ship and will not be saved with the SAL/SAM file.

If it begins Inside the cluster and ends Outside the cluster it will attempt to attach to whatever part is at the same length as the original strut when you reattach it, if a part blocks it from reaching its full length it will try to attach to that part instead, but if there is nothing there when it reaches its full length it will break and leave the unattached strut node on the original part.

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