Giter Club home page Giter Club logo

ksp-recall's Introduction

KSP-Recall

Recall for KSP blunders, screw ups and borks.

Aims to fix Stock misbehaviours the most seamlessly as possible, trying hard to do not introduce new ones in the process. :)

In a Hurry

Description

Tired of constantly updating your Add'Ons each time a new KSP release fsck up something?

Restless while waiting your favorite Add'On to be updated so you can play without invoking devils using dark and incomprehensible rituals?

So this Add'On is for you.

By installing this thingy, unsolved bugs and mishaps from KSP Development Team will be fixed or at least worked around, saving Add'On Authors from the hassle to handle them themselves - most of the time without introducing new ones. :)

It aims to need minimal coupling with existent code, as well to be selectively injected on the affected parts in order to prevent unholy interactions with third-party modules that decide to fix things their own way.

Currently, the following fixes are available once installed:

Fixes not needed on the current KSP instalment are not applied. So it's safe to just install KSP-Recall on anything you have (besides wasting a tiny little bit more time on the loading).

For End Users

This is not intended to be "used" by end-users. It provides services to Add'On authors and/or fixes automatically some known problems on many different KSP versions.

But there're some options that will allow the end user to control how the fixes works on his/machine.

Every fix can be deactivated on a given part, without affecting the other ones. This change is persisted on the craft file and on the savegame, so you can even deactivate a fix on a part on a craft and not do it on another craft. For people willing to write patches, the name of the attribute is active.

The user can also force his/her hand on how and where the fixes is installed by editing GameData/999_KSP-Recall/KSP-Recall.cfg. Changing this file will overrule the default installation decisions KSP-Recall does on startup, allowing you use fixes that usually would not be available for your rig. Use this with caution and prudence, this can royally screw up your savegames.

Currently, the following automatic fixes are available:

Automatically restores Resources changed by Fuel Switches.

As the title says, KSP-Recall detects when something changed on the craft (while Editing it) and tries to restore the Resources as intended by the Add'On authors, brute forcing the right way over the KSP 1.9.x. had brute forced its way (that breaks some Add'Ons).

However, and you as an user must be aware of it, some Fuel Switches don't cope very well with others. It's highly probable that you will have problems on installing more than on Fuel Switch on your KSP, because some of them install themselves on the parts without caring about any other one already there.

On a rule of thumb, it's possible to have more than one Fuel Switch installed on KSP. What you can't is have more than one Fuel Switch installed on the same part, and this is where most Fuel Switches authors are stomping their own toes.

Right now, this is what it's known to the date:

  • Interstellar Fuel Switch
    • Works without KSP-Recall.
    • It coded its own Resource Management, so it's imune to KSP 1.9 "bruteness".
  • Firespitter
    • I detected no problems on it
  • Anything that supports (or it's supported by) TweakScale
    • TweakScale already handles KSP-Recall, so anything that makes use of Scale_Redist is already covered
    • Modular Fuel Tanks is one of that Add'Ons, as long nobody shoves it on parts that already have another Fuel Switch.
  • B9 Parts Switch should work. As long there're no other Fuel Switch installed on the same part.
  • Other fuel switches:
    • As long the OnEditorVesselModified is fired on each change (or one of the Custom Events from Recall, see below), it should work fine.
    • Please report on this Forum Thread or Discussion anything that you thing is wrong. I'm fixing them as I'm aware of them. If you are absolutely sure it's a bug, file a bug report.

Crafts at rest changes drifts the Heading by their own

On TweakScale's Forum thread, a discussion about a problem introduced on KSP 1.8 that made the crafts to drift the heading randomly when leaved at their own, even with parking breaks or not wheels at all!

KSP-Recall introduces a new work around for this problem, detecting when the Heading drift is unwanted and canceling it.

It does not fixes, specifically, the drift induced by the wheels itself, but helps on preventing situations where the wheels problem would be triggered.

Fixing Costs refunds when Recovering Crafts on KSP 1.11.x

On TweakScale's Forum thread, a discussion about a problem introduced on KSP 1.1.0 that made refunds on craft recovering problematic - as the user end up losing any extra costs a module implements for the part using the IPartCostModifier.

Many, many add'ons are affected by this problem.

KSP-Recall solves this by implementing a new module, Refunding, that makes use of a meta-resource (also called Refunding) to trick the game cost recovering algorithms in giving you back the Funds it miscalculates.

For Add'On Authors

Issue #1 KSP 1.9.x resets resources to prefab while cloning parts

Add'Ons that supports TweakScale using Scale_Redist.dll but do not change resources themselves will be automatically fixed - TweakScale "calls" KSP Recall as the last step of the rescaling, anything you do on IRescalable::OnRescale(ScalingFactor factor) will be preserved.

Add'Ons that also changes the Part's resources outside of the OnRescale callback or without direct support for/from TweakScale will need to add the following lines of code every time their Part Resources are changed:

            // send Resource Changed message to KSP Recall if needed
            if (0 != this.part.Resources.Count)
            {
                BaseEventDetails data = new BaseEventDetails (BaseEventDetails.Sender.USER);
                data.Set<int> ("InstanceID", this.part.GetInstanceID());
                data.Set<Type>("issuer", this.GetType ());
                part.SendEvent ("OnPartResourceChanged", data, 0);
            }

// note: If your part can be set to have <ZERO> resources, omit the "if" above to hint Recall that it should delete any internal cache for the part

It's extremely important to send this event only at the last moment possible, after changing the resources. There's no guarantee about when this Event will be handled (it can be handled right on the spot, or only next week - nobody knows). You can only be sure about when it will not be handled: before being issued. So do whatever you need, and add that lines above before the end of the function/method/procedure/whatever to avoid risking Recall caching your resources before you are done.

Add'Ons that support TweakScale by handling the OnPartScaleChanged event need to add that lines above too as the last step of their scaling tasks. Since Events are completely asynchronous, there's a good chance that by the time TweakScale sends OnPartResourceChanged to Recall, you could not handled yet (or be in the middle of the handling!!!) your OnPartScaleChanged , and so Recall will essentially undo what you had done on your part (as it will get a snapshot of the current Resources before the change).

Installation

Detailed installation instructions are now on its own file (see the In a Hurry section) and on the distribution file.

Licensing

  • KSP-Recall is double licensed as follows:
    • SKL 1.0. See here
      • You are free to:
        • Use : unpack and use the material in any computer or device
        • Redistribute : redistribute the original package in any medium
      • Under the following terms:
        • You agree to use the material only on (or to) KSP
        • You don't alter the package in any form or way (but you can embedded it)
        • You don't change the material in any way, and retain any copyright notices
        • You must explicitly state the author's Copyright, as well an Official Site for downloading the original and new versions (the one you used to download is good enough)
    • GPL 2.0. See here
      • You are free to:
        • Use : unpack and use the material in any computer or device
        • Redistribute : redistribute the original package in any medium
        • Adapt : Reuse, modify or incorporate source code into your works (and redistribute it!)
      • Under the following terms:
        • You retain any copyright notices
        • You recognise and respect any trademarks
        • You don't impersonate the authors, neither redistribute a derivative that could be misrepresented as theirs.
        • You credit the author and republish the copyright notices on your works where the code is used.
        • You relicense (and fully comply) your works using GPL 2.0
          • Please note that upgrading the license to GPLv3 IS NOT ALLOWED for this work, as the author DID NOT added the "or (at your option) any later version" on the license.
        • You don't mix your work with GPL incompatible works.
    • If by some reason the GPL would be invalid for you, rest assured that you still retain the right to Use the Work under SKL 1.0.

Please note the copyrights and trademarks in NOTICE.

UPSTREAM

There's no upstream, I am (g)ROOT :)

ksp-recall's People

Contributors

lisias avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

cybersys sethrice

ksp-recall's Issues

Fix (haha :P) UI_ScaleEdit UI_FloatEdit and UI_FloatRange on KSP 1.8.0

Well, I will probably never fix this one, but I will leave this here in order to remember.

Long time ago, KSP 1.8.0 broke the UI_ScaleEdit, UI_FloatEdit and UI_FloatRange (that I'm aware) due something missing on the prefab.

Now and then some user asks for it (as this one) - why they would want to run 1.8.0 is beyound me, as it was terribly buggy and I'm not aware of anything that works on 1.8.0 that it's not working on 1.8.1.

But yet, it would be "nice" to have Recall fixing this one just for the sake of completude.

KSP's Monkey Patching is screwing with me.

Oukey. I found a Monkey Patching on KSP, and this freaking thing is screwing with me.

On 2022's Hallowing (more specifically, the weekend following it), my DLLs on A+ got screwed by the following problem:

ERR 12:27:47.935] Exception handling event onGameSceneSwitchRequested in class Startup:System.NullReferenceException: Object reference not set to an instance of an object
  at AirplanePlus.MonkeyPatching.Execute () [0x00000] in <filename unknown>:0
  at AirplanePlus.Startup.OnGameSceneSwitchRequested (FromToAction`2 data) [0x00000] in <filename unknown>:0
  at EventData`1[GameEvents+FromToAction`2[GameScenes,GameScenes]].Fire (FromToAction`2 data) [0x00000] in <filename unknown>:0

[EXC 12:27:47.941] NullReferenceException: Object reference not set to an instance of an object
        AirplanePlus.MonkeyPatching.Execute ()
        AirplanePlus.Startup.OnGameSceneSwitchRequested (FromToAction`2 data)
        EventData`1[GameEvents+FromToAction`2[GameScenes,GameScenes]].Fire (FromToAction`2 data)
        UnityEngine.DebugLogHandler:LogException(Exception, Object)
        KSPe.Util.Log.UnityLogDecorator:UnityEngine.ILogHandler.LogException(Exception, Object)
        ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
        UnityEngine.Debug:LogException(Exception)
        EventData`1:Fire(FromToAction`2)
        HighLogic:SetLoadSceneEventsAndFlags(GameScenes, Boolean)
        HighLogic:LoadScene(GameScenes)
        <SetupSystem>c__Iterator0:MoveNext()
        UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
[LOG 12:27:47.942] [HighLogic]: =========================== Scene Change : From LOADING to MAINMENU =====================

That AirplanePlus.MonkeyPatching thingy? Not mine, don't have the slighest idea from what deepness of Hell this crapness came. I can only say that this prevented me from working on the DLL for the whole weekend.

As long the clock marked midnight of Monday, the problem goes away.

I can only infer this was some kind of Easter Egg that some jerk though it could be a good idea to have hardcoded inside KSP without telling anyone about.

Also on Forum

I'm still thinking if I want to mess with this crap.

KSP 1.9.x resets resources to prefab while cloning parts

Tried updating to 1.9 since most mods behave reasonably on updates nowadays. Began noticing some parts drifting each time I loaded my craft (either in flight or VAB). Seems any parts that have been tweaked start to wander when loading.

Also noticed that when copying a part that had been altered, the new part retained the correct appearance and size, but was given the default values for the original part. (FL-T400 tank scaled to 3.75 has almost 2k LOx, copy has 360). Tweakscale seems to be applying itself at the wrong time or somehow affecting the "assembly order" upon load in. The most interesting fact is that if I load a craft and a part wanders, then reload the same craft without saving, the part will have wandered farther than before.

I am using other mods such as mechjeb, but afaik none would be interfering with TS or craft loading. Hope I have been of some service, TS has been very nice to me, would like to return the favor.

REPORT: Diagnosing the GoAHead Issue

Some users reported problems on updating to Recall 0.2.2.4.

Random exceptions while gaming are killing the current thread, with various and nasty consequences - from buttons that cease to respond, to graphical items not being drawn, vessels that don't respond to commands, and so goes on.

This is the report for my findings on GoAHead, as he reported that reverting back to 0.2.2.3 solved the problem for him.

My goal on this report is to determine if the problem that affected GoAHead is due the race condition that was mitigated on #45 .

The source material for the research was provided on Forum here but will not be fully copied to this Issue as all that data can potentially have sensitive information.

He provided a ModList with 284 Add'Ons : Modpack.ckan.zip .

However 108 were not installable by CKAN under default command line options.

So I split the thing into two ModLists:

Test Script:

  • I will try first to create a new empty savegame and see if I can reproduce the problem easily with the Installable add'ons.
  • If I fail, I will try to load the provided savegame and just let crafts be removed as the needed add'ons (if any) are not present, and then I will try to reproduce the problem.
  • If I still fail, I will start to install the Add'Ons from the 'not installable' ModList somehow, and try again.

Possible misbehaviour on a still unknown Add'On with KSP-Recall

Fellow Kerbonaut hugoraider is being screwed by what appears to be a misbehaviour triggered by an unholy interaction between KSP-Recall and (probably) B9PS.

The problems happens only when merging an existent craft into the current one. The misbehaviour is remarkably similar to what happens when AttachedOnEditor is needed but it's absent:

rf2dkER

Craft file: Vega 3.craft.zip

This craft needs:

  • Bluedog DB
  • Conformal Decals
  • New Tantares
  • Tantares
  • Tantares LV
  • Tantares SAF
  • Tantares SP
  • Gemstone LV (not sure)

Most dependencies weren't installed (on purpose). Only Shabby (and 0Harmony), due Conformal Decals, were installed while reproducing the problem as below:

screenshot59

What more or less matches the screen shot provided by the user.

Mission: Search and Destroy (the bug)

KSP 1.11.x is borking the recovering of costs from scaled parts.

Fellow Kerbonaut firethorn6 have a misbehaviour on his rig - as from KSP 1.11.x, the refunding at vessels recover is borked!

Evidencest:
screenshot7

A MK1 Pod and a Flea scaled to 2.8M (as anything bigger would not be allowed to launch on a early career). 2848 Funds.

I launched and immediately recovered it, to get the full refund:

  • 588
  • 1304
  • 12
  • 944

And this totalled 2848 Funds. So it's working, at least on KSP 1.4.5.

So I redid the test on 1.7.3:
screenshot11
screenshot12

And it works too. Right now I cleared something wrong on TweakScale, now I need to check if something changed on KSP itself, perhaps on 1.8.1?
screenshot61

Nops. Worked fine. Just for the sake of completude, I did the test on KSP 1.10.1:
screenshot63

And again fine.

Well, gone to KSP 1.11.1 (lots of thing changed on this one, perhaps?)
screenshot55

Bingo. It's something on KSP 1.11.1. :( Interesting enough, the cost of the vessel is now 2883 (probably due the new Inventory system)

OverRefunding on Stored Parts (I think)

Fellow Kerbonaut Krazy1 reported a bug on Forum.

Then when I recovered, it gave me over :funds:160K for a :funds:120K ship. Using latest version. Nothing on the ship was modded. I have TweakScale installed but everything was stock size. KSP 1.11.2.

Second test: big rocket in VAB::funds:425792 and recovered :funds:468823... which listed 96607 for Refunding. So that just does not add up at all. This rocket did have a few Tweaked parts.

(The first problem was fixed on commit eecabb1 )

S&D the damn bug.

Unhappy interaction with Deep Freeze?

Fellow Kerbonaut ttr reported some problems on his rig on TweakScale's thread.

Apparently we have a toe-stomping-fest with DeepFreeze:

[LOG 15:37:04.951] [KSP-Recall-AttachedOnEditor] TRACE: OnAwake <NO VESSEL>-CRY-0300Freezer(Clone):FFF6DA6C
[LOG 15:37:04.952] DeepFreezer OnDestroy
[EXC 15:37:04.954] NullReferenceException: Object reference not set to an instance of an object
        DF.DeepFreezer.OnDestroy () (at <72233efaa3ee4936a15201f98fac7b68>:0)
        UnityEngine.DebugLogHandler:LogException(Exception, Object)
        ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
        UnityEngine.Object:DestroyImmediate(Object)
        PartLoader:StripComponent(GameObject)
        PartLoader:CreatePartIcon(GameObject, Single&)
        PartLoader:ParsePart(UrlConfig, ConfigNode)
        <CompileParts>d__56:MoveNext()
        UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
[LOG 15:37:04.964] [KSP-Recall-Refunding] TRACE: OnDestroy CRY-0300Freezer(Clone):0

Further investigate this.

2022.04.09 - tweakscale - KSP.log.zip

Bump next version to 0.2

Due a typo when uploading the thing into SpaceDock, I need to bump the version to 0.2 to prevent playing havoc on CKAN.

See this post on Forum for more info.

**Correctly** handle KSP 1.9 (and later) borking while loading Crafts on Editor with scaled Variants

Easting your own dog-food is the ultimate QAS tool. :)

That's the thing: the code that closed TweakScale/TweakScale#219 reopened TweakScale/TweakScale#129. But with a catch: only on editing mode.

So, we have three different situations on KSP's guts that affects the nodes of a variant part:

1) OnCopy (#219)
2) While Editing (#139)
3) OnLoad (detected while troubleshooting TweakScale/TweakScale#219).


EDIT: WRONG. The problem is happening only on Editor, and on PartModule.OnStart.


Apparently the code that fixed TweakScale/TweakScale#219 is related to OnLoad too. But it regressed TweakScale/TweakScale#139.


EDIT: That code fixed TweakScale/TweakScale#219 by pure accident. The regression on TweakScale/TweakScale#139 happened due colateral effects induced by TweakScale/TweakScale#219 that fixed a problem that happens only on Editor, and then screw up things on Flight.


Problem: if I put that code back to fix TweakScale/TweakScale#139, I screw up OnCopy and OnLoad. Clearly, there's something inside KSP that it's out of control, suggesting that Fellow Kerbonaut darthgently was not wrong on suggesting that the problem was KSP and that I didn't, in fact screwed up.

Investigate a possible (bad) iteraction with Procedural Parts (RO) V2.3.0

Fellow Kerbonaut Galland1998 reported an issue about Procedural Parts when TweakScale is installed (here and here):

If a procedural part is the initial root part added to a craft then the attach nodes are offset from the part. If you add another of the same procedural part than the attach nods are in the proper place. If you make the second procedural part the root part and delete the original procedural part the attach nodes stay where they are supposed to be.

In the second case if the initial root part placed in the VAB is not a procedural part all of the nodes are where they are supposed to be and if you add a procedural part then the added procedural part has its nodes exactly where they are supposed to be.

RO/RP-1 messes with the base part scales compared to stock KSP so I am not sure if that has something to do with it. It is just strange that it only seems to impact an initial root part from the procedural parts mod.

Resourceful - What, Why

Is this TS?
What is it?
Why is it there?

I ask because KSP_Recall does this ...

[LOG 14:35:15.411] [KSP_Recall] INFO: Removing Resourceful support for kerbalEVA () due this part is not supported..
[LOG 14:35:15.411] [KSP_Recall] INFO: Removing Resourceful support for kerbalEVAfemale () due this part is not supported..
[LOG 14:35:15.411] [KSP_Recall] INFO: Removing Resourceful support for kerbalEVAVintage () due this part is not supported..
[LOG 14:35:15.411] [KSP_Recall] INFO: Removing Resourceful support for kerbalEVAfemaleVintage () due this part is not supported..
[LOG 14:35:15.411] [KSP_Recall] INFO: Removing Resourceful support for kerbalEVAFuture () due this part is not supported..
[LOG 14:35:15.411] [KSP_Recall] INFO: Removing Resourceful support for kerbalEVAfemaleFuture () due this part is not supported..

But, kerbalEVA* still has this ...

	MODULE
	{
		name = Resourceful
		active = True
	}

What am I missing?

Not sure how to install 0.3.0.0

I'm a beginner at KSP mods, and KSP in general. I'm having some trouble following the installation instructions in INSTALL.md for the 0.3.0.0 zip package. Here's the excerpt I'm looking at.

  • REMOVE ANY OLD VERSIONS OF THE PRODUCT BEFORE INSTALLING, including any other fork:
    • Delete <KSP_ROOT>/GameData/999_KSP-Recall
  • Extract the package's GameData/ folder into your KSP's as follows:
    • <PACKAGE>/GameData/000_KSP-Recall/* --> <KSP_ROOT>/GameData/000_KSP-Recall
      • Overwrite any preexisting file.

And then it says this folder structure must be present.

<KSP_ROOT>
  [GameData]
  	[000_KSP-Recall]

But in the zip file package, there's a 999_KSP-Recall folder, not 000_KSP-Recall. It specifically says to delete 999 one. Where do I get the 000 one? Should I rename the folder from the zip?

Code a Panic Button for the Death Spins

Geez, I completely forgot about this!!!

Fellow Kerbonaut Azic Minar suggested a Panic Button to halt the Death Spin problem that plagues sometimes pieces of crafts after crashing:

You are two steps from writing code that can stop the death spins by pressing a side bar button

Well… Do it! :)

Freeze on loading

after installing this mod, the start up loading freezes. i removed it and things work again.
tried twice.

Kerbal going on EVA on Kerbin without helmet instantly dies

The Kerbal will die because it's "too cold". It only seems to occur right when exiting the pod if the Kerbal isn't wearing a helmet, or when removing the helmet while still holding on to the hatch.

There seems to be nothing in the log that sheds light on why this happens, but I'm confident it is caused by Recall 2.0.3 (obtained from CKAN). I can reproduce with this mod and nothing else. Removing Recall from my otherwise heavily modded setup makes the bug go away.

Weird Misbehaviour on Interstellar Technologies.

Consider a fix for the Docking Ports on KSP 1.12 - and a lot of similar issues since KSP 1.2

On Forum, Fellow Kerbonaut Anth12 commented about how DockingPorts were handled on KSP < 1.12, and how they are done now:

1.11 and all previous versions crafts with docking ports and excluding robotics would snap back into position on timewarp/reloading scene.

This doesn't happen in 1.12, the video in my bug report shows the test craft (with 1 docking port) giving a little each time timewarp is disengaged.

In my opinion 1.12 is broken unless they give us at least a docking port variant that is using the old code.

Consider how KSP-Recall could help on this issue. KSP 1.12.2 is going to stay around for some time, as it appears.

Refunding is triggering a nasty memory leak on this.part.Modules.Add

This is a follow up from issue #21

TL;DR : Refunding was creating and destroying the fake Resource under demand. This was triggering a nasty bug on Unity's GC under heavy load, since this crappy excuse of a Game Engine is using spinlocks to halt the threads when the GC is working. This completely trashes the whole system: 8 threads waiting a spinlock and an i7 with 4 cores and 8 hyper-threads just gets down on its knees in pain.

bully-scholarship-edition-thumb04

Empirical tests pinpoint the this.part.Resources as the culprit by the memory leak.

ArgumentOutOfRangeException causes saving to break and makes my save file unplayable.

Exceptions similar to this show up several times in my log, looks like whenever something tries to do a save. Not sure if this is caused by KSP-Recall or not, this started happening when I grabbed latest updates for my modlist, including updates to: Stockalike Station Parts Expansion Redux, KSP Community Fixes, Kopernicus Planetary System Modifier, and Space Dust.

[EXC 09:15:11.811] ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
System.ThrowHelper.ThrowArgumentOutOfRangeException (System.ExceptionArgument argument, System.ExceptionResource resource) (at <9577ac7a62ef43179789031239ba8798>:0)
System.ThrowHelper.ThrowArgumentOutOfRangeException () (at <9577ac7a62ef43179789031239ba8798>:0)
KSP_Recall.AttachedOnEditor.AttachedOnEditor.SaveTo (ConfigNode node) (at :0)
KSP_Recall.AttachedOnEditor.AttachedOnEditor.OnSave (ConfigNode node) (at :0)
PartModule.Save (ConfigNode node) (at <39c0323fb6b449a4aaf3465c00ed3c8d>:0)
ProtoPartModuleSnapshot..ctor (PartModule module) (at <39c0323fb6b449a4aaf3465c00ed3c8d>:0)
ProtoPartSnapshot..ctor (Part PartRef, ProtoVessel protoVessel, System.Boolean preCreate) (at <39c0323fb6b449a4aaf3465c00ed3c8d>:0)
ProtoPartSnapshot..ctor (Part PartRef, ProtoVessel protoVessel) (at <39c0323fb6b449a4aaf3465c00ed3c8d>:0)
ProtoVessel..ctor (Vessel VesselRef, System.Boolean preCreate) (at <39c0323fb6b449a4aaf3465c00ed3c8d>:0)
ProtoVessel..ctor (Vessel VesselRef) (at <39c0323fb6b449a4aaf3465c00ed3c8d>:0)
Vessel.BackupVessel () (at <39c0323fb6b449a4aaf3465c00ed3c8d>:0)
FlightState..ctor () (at <39c0323fb6b449a4aaf3465c00ed3c8d>:0)
Game.Updated (GameScenes startSceneOverride) (at <39c0323fb6b449a4aaf3465c00ed3c8d>:0)
Game.Updated () (at <39c0323fb6b449a4aaf3465c00ed3c8d>:0)
QuickSaveLoad.doSave (System.String filename, System.String screenMsg) (at <39c0323fb6b449a4aaf3465c00ed3c8d>:0)
QuickSaveLoad.quickSave (System.Boolean saveAs) (at <39c0323fb6b449a4aaf3465c00ed3c8d>:0)
QuickSaveLoad.Update () (at <39c0323fb6b449a4aaf3465c00ed3c8d>:0)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
UnityEngine.Debug:CallOverridenDebugHandler(Exception, Object)

KSP.log

`AttachedOnEditor` is being screwed up when Merging crafts

Somehow I screwed up something when merging crafts.

[EDIT]: NOPE. It's a new (old) bug on KSP Editor, since 1.4.x

Consider this craft:

Screen Shot 2023-03-19 at 02 44 49

Now, let's merge it with itself :

Screen Shot 2023-03-19 at 02 47 36

And save it with a different name:

Screen Shot 2023-03-19 at 02 48 06

Note the gap between the two subassemblies:

Screen Shot 2023-03-19 at 02 48 06

This misbehaviour is consistent downto KSP 1.4.3 - so it's something on me for sure.

Now things start to get instesting:

On TweakScale 2.4.6.25 (the current mainstream latest), by detaching the lower half of the craft and attaching it again, we still get the gap. By saving the craft and loading it again, this misbehaviour doesn't changes.

Screen Shot 2023-03-19 at 02 54 05

On TweakScale 2.5 beta (latest), detaching and reattaching the thing doesn't solves the problem, but if you save the craft and load it again, by trying the stunt, you get things tight again!

Screen Shot 2023-03-19 at 02 54 24

This confirms that TweakScale is the source of the problem, with KSP-Recall just doing what its being told to do. We fix TweakScale, we have this problem solved.

Misbehaviour related to Refunding on KSP >= 1.11.0

Fellow Kerbonaut Kor reported on Forum:

I'm playing 1.12.3 with JNSQ and Tweakscale but otherwise a pretty minimally modded setup. I'm running into a problem with stackable cargo parts (struts, fuel ducts, small solar panels, etc.)

  • If such a part is launched in a cargo container, it remains stackable until placed "in the world." Then it is no longer stackable.

  • If such a part is launched as part of a craft, it immediately becomes non-stackable.

Testing revealed the problem is unrelated to JNSQ and/or TweakScale, I could reproduce the problem on Stock.

Further information about the M.O. and possible causes are Work In Progress.

ChillingOut apparently is screwing up KSPIE

Felllow Kerbonaut ss8913 reported that KSP-Recall (almost sure ChillingOut) is screwing up KSPIE engines:

so I updated this last night... haven't updated or installed anything else since, and now all my KSPIE engines instantly overheat my craft as soon as activated, and instantly cool off as soon as I throttle down - stock engines don't do that.. I've been playing every night this week and this just started happening when I installed the latest version of this mod from CKAN... any ideas/known issue?

Check what's happening and fix it.

2 MM Errors with newest version

just installed newest version on KSP 1.12.5 via CKAN
Module Manager throws 2 errors on load:

Error - node name does not have balanced brackets (or a space - if so replace with ?):
999_KSP-Recall/patches/attached-on-editor/@PART[*]:HAS[![MODULE[ModuleB9PartSwitch],!MODULE[ProceduralPart],!MODULE[WingProcedural],!MODULE[ModuleAsteroid],!MODULE[ModuleComet],!MODULE[KerbalEVA]]:LAST[KSPRECALL-ATTACHED-ON-EDITOR]:NEEDS[TweakScale]

Error - node name does not have balanced brackets (or a space - if so replace with ?):
999_KSP-Recall/patches/resourceful/@PART[*]:HAS[![MODULE[ModuleB9PartSwitch],!MODULE[ModuleCargoPart],!MODULE[ModuleAsteroid],!MODULE[ModuleComet],!MODULE[KerbalEVA]]:NEEDS[KSPRECALL-RESOURCEFUL]

fixed respectivly =>

@PART[*]:HAS[!MODULE[ModuleB9PartSwitch],!MODULE[ProceduralPart],!MODULE[WingProcedural],!MODULE[ModuleAsteroid],!MODULE[ModuleComet],!MODULE[KerbalEVA]]:LAST[KSPRECALL-ATTACHED-ON-EDITOR]:NEEDS[TweakScale]

@PART[*]:HAS[!MODULE[ModuleB9PartSwitch],!MODULE[ModuleCargoPart],!MODULE[ModuleAsteroid],!MODULE[ModuleComet],!MODULE[KerbalEVA]]:NEEDS[KSPRECALL-RESOURCEFUL]

Make Recall safe to be installed on any KSP version instead of yelling about not being compatible

Fellow Kerbonaut DasSkelett advised that KSP-Recall should be tagged as a requirement for TweakScale on CKAN, but CKAN don't sort KSP versions - so this would make Recall being installed on everything, including where it is not needed.

Update Recall to allow being installed on anything without peskying the user about - I coded a lot of safeties anyway, and they are working. There's no need for this anymore:

Screen Shot 2021-04-06 at 11 39 18

This can be a problem if I'm using something specific for KSP >= 1.8 somewhere - is so, throw the pride through the window and use Reflection. It's too soon to allow KSPe's custom DLL loading to be used by the Mainstream at this moment.

`AttachedOnEditor` apparently is failing when the craft is rerooted

Fellow Kerbonaut DY_ZBX realized something interesting about merging crafts:

I did the following operations.
Re-created and saved both crafts, but still had the same problem as in the video. And I also used Craft Manager at the same time.

When I don't modify the parent part, though, the problem doesn't seem to arise.

Sounds like something missing on AtttachedOnEditor - this may be related with the original problem incepted by ModulePartVariant that was failing to initialise on some circunstaces and was bruteforced on KSP 1.4.3

**NEW** Misbehaviour on KSP introduced by AttachedOnEditor

Second layer surface attached parts are being moved to the center of the attached part.. :(

Problem happening:
screenshot3

Detail of the mishap (zooming into the affected parts):
screenshot4

What the craft intended to be:
image

It's a mishap on the KSPs OnCopy handling, but I need to check it on KSP < 1.9 to be sure.

Check about a missing use-case on AttachedOnEditor.

I think I missed a use case on KSP-Recall, as I had to partially redo a small fraction of an older "gambiarra" I did there.

It can be something fishy on TweakScale's code, but yet it worths to check and recheck this use-case because the whole purpose of KSP-Recall is to allow the fix to work for everybody.

Update to 1.12.5

Idk maybe the current version works for 1.12.5, but it's listed as incompatible on CKAN.

If it's an issue on CKAN's end, is it possible to mark it as compatible there?

Something apparently related to Recall is screwing up recovering inventory from Tourists

On 1.12.x, Tourists can't keep their inventory!

Once you launch a craft with a fully equipped Tourist, their inventory became empty and you loose the equipment.

You can equip them after launch, but if you recover them you will loose the equipment the same.

I don't have the slighest idea about the reason - Recall don't tell Tourists from Crew, so I'm betting that something else may be stomping Recall's toes. But I have to register this somewhere, so here we are.

I would be less worried if the problem were affecting everybody, and not only tourists.

Misbehaviour when attaching symmetry parts

[LOG 01:09:28.657] [KSP-Recall-Resourceful] TRACE: OnAwake mk1-3pod(Clone):FFFA9EF6
[LOG 01:09:28.677] [KSP-Recall-Resourceful] TRACE: OnLoad mk1-3pod:FFFA9EF6 True
[LOG 01:09:28.686] [Crew Assignment]: Part Mk1-3 Command Pod holds 3 crew, but only 0 are available. Auto-hiring is disabled or not allowed at this point.
[LOG 01:09:28.943] [KSP-Recall-Resourceful] TRACE: OnStart mk1-3pod:FFFA9EF6 Editor True
[LOG 01:09:33.348] [KSP-Recall-Resourceful] TRACE: OnAwake fuelTank(Clone):FFFA8112
[LOG 01:09:33.367] [KSP-Recall-Resourceful] TRACE: OnStart fuelTank:FFFA8112 Editor True
[LOG 01:09:34.429] fuelTank added to ship - part count: 2
[LOG 01:09:34.432] [KSP-Recall-Resourceful] TRACE: OnLoad mk1-3pod:FFFA9EF6 True
[LOG 01:09:34.433] [KSP-Recall-Resourceful] TRACE: OnLoad fuelTank:FFFA8112 True
[LOG 01:09:35.333] [KSP-Recall-Resourceful] TRACE: OnAwake fuelTank(Clone):FFFA801C
[LOG 01:09:35.338] [KSP-Recall-Resourceful] TRACE: OnStart fuelTank:FFFA801C Editor True
[LOG 01:09:36.427] fuelTank added to ship - part count: 3
[LOG 01:09:36.427] [KSP-Recall-Resourceful] TRACE: OnLoad mk1-3pod:FFFA9EF6 True
[LOG 01:09:36.428] [KSP-Recall-Resourceful] TRACE: OnLoad fuelTank:FFFA8112 True
[LOG 01:09:36.428] [KSP-Recall-Resourceful] TRACE: OnLoad fuelTank:FFFA801C True
[LOG 01:09:43.299] [KSP-Recall-Resourceful] TRACE: OnAwake fuelTank(Clone):FFFA7F06
[LOG 01:09:43.303] [KSP-Recall-Resourceful] TRACE: OnStart fuelTank:FFFA7F06 Editor True
[LOG 01:09:45.134] [KSP-Recall-Resourceful] TRACE: OnAwake fuelTank(Clone):FFFA7EA8
[LOG 01:09:45.139] [KSP-Recall-Resourceful] TRACE: OnCopy fuelTank:FFFA7EA8 from FFFA7F06
[LOG 01:09:45.142] [KSP-Recall-Resourceful] TRACE: Restoring 0 resources from fuelTank:FFFA7EA8
[LOG 01:09:45.147] [KSP-Recall-Resourceful] TRACE: OnStart fuelTank:FFFA7EA8 Editor True
[LOG 01:09:45.749] [KSP-Recall-Resourceful] TRACE: OnLoad mk1-3pod:FFFA9EF6 True
[LOG 01:09:45.749] [KSP-Recall-Resourceful] TRACE: OnLoad fuelTank:FFFA8112 True
[LOG 01:09:45.749] [KSP-Recall-Resourceful] TRACE: OnLoad fuelTank:FFFA801C True
[LOG 01:09:45.749] [KSP-Recall-Resourceful] TRACE: OnLoad fuelTank:FFFA7F06 True
[LOG 01:09:45.750] [KSP-Recall-Resourceful] TRACE: OnLoad fuelTank:FFFA7EA8 True
[EXC 01:09:46.267] NullReferenceException: Object reference not set to an instance of an object
        UIPartActionResourceItem.SetSymCounterpartsAmount (System.Double amount) (at <48dcb08e2e1542e2af1286b02d2eb072>:0)
        UIPartActionResourceEditor.onSliderChangeProcess () (at <48dcb08e2e1542e2af1286b02d2eb072>:0)
        UIPartActionResourceEditor.Setup (UIPartActionWindow window, Part part, UI_Scene scene, UI_Control control, PartResource resource) (at <48dcb08e2e1542e2af1286b02d2eb072>:0)
        UIPartActionWindow.AddResourceEditorControl (PartResource r) (at <48dcb08e2e1542e2af1286b02d2eb072>:0)
        UIPartActionWindow.SetupResourceControls (PartResource r, System.Boolean clearFirst, UI_Scene scene, System.Int32& controlIndex) (at <48dcb08e2e1542e2af1286b02d2eb072>:0)
        UIPartActionWindow.CreatePartList (System.Boolean clearFirst) (at <48dcb08e2e1542e2af1286b02d2eb072>:0)
        UIPartActionWindow.Setup (Part part, UIPartActionWindow+DisplayType type, UI_Scene scene) (at <48dcb08e2e1542e2af1286b02d2eb072>:0)
        UIPartActionController.CreatePartUI (Part part, UIPartActionWindow+DisplayType type, UI_Scene scene) (at <48dcb08e2e1542e2af1286b02d2eb072>:0)
        UIPartActionController.SelectPart (Part part, System.Boolean allowMultiple, System.Boolean overrideSymmetry) (at <48dcb08e2e1542e2af1286b02d2eb072>:0)
        UIPartActionController.HandleMouseClick (UnityEngine.Camera cam, System.Boolean allowMultiple) (at <48dcb08e2e1542e2af1286b02d2eb072>:0)
        UIPartActionController+<MouseClickCoroutine>d__37.MoveNext () (at <48dcb08e2e1542e2af1286b02d2eb072>:0)
        UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <7d9ec060e791409ab3eb85c61e312ed6>:0)
        UnityEngine.DebugLogHandler:LogException(Exception, Object)
        ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
        UnityEngine.Debug:CallOverridenDebugHandler(Exception, Object)
<lots of the same exception>
<user clicks New, then exit Editor>
[LOG 01:09:59.002] [KSP-Recall-Resourceful] TRACE: OnDestroy mk1-3pod:FFFA9EF6
[LOG 01:09:59.002] [KSP-Recall-Resourceful] TRACE: OnDestroy fuelTank:FFFA8112
[LOG 01:09:59.002] [KSP-Recall-Resourceful] TRACE: OnDestroy fuelTank:FFFA801C
[LOG 01:09:59.002] [KSP-Recall-Resourceful] TRACE: OnDestroy fuelTank:FFFA7F06
[LOG 01:09:59.002] [KSP-Recall-Resourceful] TRACE: OnDestroy fuelTank:FFFA7EA8

The Refunding Meta Resource is being jettisoned by ModuleFuelJettison.

Fellow Kerbonaut Krazy1 reported that the Refunding meta-resource is being jettisoned by the Ore Tanks:

KLwn4r2w

Well, he's right. It's really happening. However, this is a bug on the ModuleFuelJettison.

I made this patch:

@PART[LargeTank]:FINAL
{
	RESOURCE
	{
		name = Ablator
		amount = 1500
		maxAmount = 1500
	}
	RESOURCE
	{
		name = ElectricCharge
		amount = 1500
		maxAmount = 1500
	}
}

Fired up KSP and made this test:
screenshot21

Launched it and then jettisoned the Ore Tank contents:
screenshot22

Expanded detail:
screenshot22 copy

So, nope. It's not Recall's fault. Our fellow Kerbonaut found another bug on KSP, this time on ModuleFuelJettison. :)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.