Jump to content

[1.12.x PlanetShine 0.2.6.6, Feb 22, 2022


Papa_Joe
 Share

Recommended Posts

Just now, mario-sov said:

1. Broken blizzy toolbar (the exception prevents from button appearing at all)

[EXC 20:30:13.386] ArgumentNullException: Value cannot be null.
Parameter name: method
    System.Delegate.CreateDelegate (System.Type type, System.Object firstArgument, System.Reflection.MethodInfo method, System.Boolean throwOnBindFailure, System.Boolean allowClosed) (at <9577ac7a62ef43179789031239ba8798>:0)
    System.Delegate.CreateDelegate (System.Type type, System.Object firstArgument, System.Reflection.MethodInfo method) (at <9577ac7a62ef43179789031239ba8798>:0)
    PlanetShine.Utils.Button.AttachEventHandler (System.Reflection.EventInfo event, System.String methodName, System.Object realButton) (at <2b12c5ac0a4d4274817dacc52f772def>:0)
    PlanetShine.Utils.Button..ctor (System.Object realButton, PlanetShine.Utils.ToolbarTypes types) (at <2b12c5ac0a4d4274817dacc52f772def>:0)
    PlanetShine.Utils.ToolbarManager.Add (System.String ns, System.String id) (at <2b12c5ac0a4d4274817dacc52f772def>:0)
    PlanetShine.Gui.GuiManager.UpdateToolbarBlizzy () (at <2b12c5ac0a4d4274817dacc52f772def>:0)
    PlanetShine.Gui.GuiManager.Start () (at <2b12c5ac0a4d4274817dacc52f772def>:0)
    UnityEngine.DebugLogHandler:LogException(Exception, Object)
    ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
    UnityEngine.Debug:CallOverridenDebugHandler(Exception, Object)


2. Now instead of pink square you got this

  Hide contents

ERituu6.png


Version compiled for 1.8 still works though

Can you send my your player log?

Link to comment
Share on other sites

9 minutes ago, Papa_Joe said:

Can you send my your player log?

When I get the chance sure (gotta reinstall the latest version and spin up KSP to generate log). I forgot to mention the other thing (if that helps in the meantime though). Last night I went in and reverted the old toolbar wrapper code as seen here: https://github.com/prestja/ksp-planetshine/blob/master/PlanetShine/Utils/ToolbarWrapper.cs and recompiled. It worked. So I'm guessing it's related to reflection somewhere in the toolbar code.

Edited by mario-sov
Link to comment
Share on other sites

19 minutes ago, mario-sov said:

When I get the chance sure (gotta reinstall the latest version and spin up KSP to generate log). I forgot to mention the other thing (if that helps in the meantime though). Last night I went in and reverted the old toolbar wrapper code as seen here: https://github.com/prestja/ksp-planetshine/blob/master/PlanetShine/Utils/ToolbarWrapper.cs and recompiled. It worked. So I'm guessing it's related to reflection somewhere in the toolbar code.

I did do some refactoring in that area, unintentionally while working other sections of code.  I'll see what I broke.

Link to comment
Share on other sites

I just realized there are 2 planetshine threads... I'm not going krazy. Reposting feature request here just so it doesn't get lost. Thanks for maintaining this mod.

"I have eclipses active in Scatterer 0.0831 and I'm orbiting the Mun and Kerbin is eclipsing the sun. That works, Mun is dark, but PlanetShine is still illuminating the Mun side of the ship. It would nice if it integrated with Scatterer eclipses so it's totally dark. "

Link to comment
Share on other sites

15 hours ago, Krazy1 said:

I just realized there are 2 planetshine threads... I'm not going krazy. Reposting feature request here just so it doesn't get lost. Thanks for maintaining this mod.

"I have eclipses active in Scatterer 0.0831 and I'm orbiting the Mun and Kerbin is eclipsing the sun. That works, Mun is dark, but PlanetShine is still illuminating the Mun side of the ship. It would nice if it integrated with Scatterer eclipses so it's totally dark. "

Yes, @prestja took over support during my absence.  I'm indebted to him for that support.  Now that I'm back, I'm resuming support of most of the mods I used to support.

Link to comment
Share on other sites

On 2/21/2022 at 5:40 AM, mario-sov said:

1. Broken blizzy toolbar (the exception prevents from button appearing at all)

[EXC 20:30:13.386] ArgumentNullException: Value cannot be null.
Parameter name: method
    System.Delegate.CreateDelegate (System.Type type, System.Object firstArgument, System.Reflection.MethodInfo method, System.Boolean throwOnBindFailure, System.Boolean allowClosed) (at <9577ac7a62ef43179789031239ba8798>:0)
    System.Delegate.CreateDelegate (System.Type type, System.Object firstArgument, System.Reflection.MethodInfo method) (at <9577ac7a62ef43179789031239ba8798>:0)
    PlanetShine.Utils.Button.AttachEventHandler (System.Reflection.EventInfo event, System.String methodName, System.Object realButton) (at <2b12c5ac0a4d4274817dacc52f772def>:0)
    PlanetShine.Utils.Button..ctor (System.Object realButton, PlanetShine.Utils.ToolbarTypes types) (at <2b12c5ac0a4d4274817dacc52f772def>:0)
    PlanetShine.Utils.ToolbarManager.Add (System.String ns, System.String id) (at <2b12c5ac0a4d4274817dacc52f772def>:0)
    PlanetShine.Gui.GuiManager.UpdateToolbarBlizzy () (at <2b12c5ac0a4d4274817dacc52f772def>:0)
    PlanetShine.Gui.GuiManager.Start () (at <2b12c5ac0a4d4274817dacc52f772def>:0)
    UnityEngine.DebugLogHandler:LogException(Exception, Object)
    ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
    UnityEngine.Debug:CallOverridenDebugHandler(Exception, Object)


2. Now instead of pink square you got this

  Reveal hidden contents

ERituu6.png


Version compiled for 1.8 still works though

I confirm, I have the same problem.

Link to comment
Share on other sites

On 2/20/2022 at 9:17 PM, Papa_Joe said:

I did do some refactoring in that area, unintentionally while working other sections of code.  I'll see what I broke.

Hey,

So I looked in the ILSpy why these lines are not there in the older version and they're there in the new version. CreateDebugLines method in the last valid release is empty so these debug lines don't show (not reflected in the source code though).  White line won't show though if you enable this line https://github.com/PapaJoesSoup/ksp-planetshine/blob/f95276d6e46d33410a593ff59950e50da9e0f34a/PlanetShine/PlanetShine.cs#L313
So when you compile them due to the commented out line the values are not updated hence you get the white line. So either remove debug lines completely in CreateDebugLines method or reenable the commented out line of code. 

As for the toolbar issue I recommend reverting the logic it is even mentioned by the author of the code not to touch it: https://github.com/PapaJoesSoup/ksp-planetshine/blob/f95276d6e46d33410a593ff59950e50da9e0f34a/PlanetShine/Utils/ToolbarWrapper.cs#L39-L49

Also the fellow who suggested changing:  light.cullingMask = (1 << 0); to light.cullingMask = (1 << 0) | (1 << 16) is partially correct I guess. What you want per docs is the EVA layer so perhaps use: light.cullingMask = (1 << 0) | (1 << 16) | (1 << 17)?

So the end result is this: https://giant.gfycat.com/InsidiousApprehensiveDove.mp4
1. I've got my button back
2. No white line and debug lines actually work
3. Light is visible on Kerbals in EVA

Edited by mario-sov
Mistake
Link to comment
Share on other sites

1 hour ago, mario-sov said:

Hey,

So I looked in the ILSpy why these lines are not there in the older version and they're there in the new version. CreateDebugLines method in the last valid release is empty so these debug lines don't show (not reflected in the source code though).  White line won't show though if you enable this line https://github.com/PapaJoesSoup/ksp-planetshine/blob/f95276d6e46d33410a593ff59950e50da9e0f34a/PlanetShine/PlanetShine.cs#L313
So when you compile them due to the commented out line the values are not updated hence you get the white line. So either remove debug lines completely in CreateDebugLines method or reenable the commented out line of code. 

As for the toolbar issue I recommend reverting the logic it is even mentioned by the author of the code not to touch it: https://github.com/PapaJoesSoup/ksp-planetshine/blob/f95276d6e46d33410a593ff59950e50da9e0f34a/PlanetShine/Utils/ToolbarWrapper.cs#L39-L49

Also the fellow who suggested changing:  light.cullingMask = (1 << 0); to light.cullingMask = (1 << 0) | (1 << 16) is partially correct I guess. What you want per docs is the EVA layer so perhaps use: light.cullingMask = (1 << 0) | (1 << 16) | (1 << 17)?

So the end result is this: https://giant.gfycat.com/InsidiousApprehensiveDove.mp4
1. I've got my button back
2. No white line and debug lines actually work
3. Light is visible on Kerbals in EVA

Looks awesome.  I suspected that the debug lines were the culprit.  I've already reverted the blizzy code and the culling mask is a great find.  Thanks!  I'll look at issuing a release later today.

Link to comment
Share on other sites

Ok new release.  

v0.2.6.6 Feb 22, 2022
- Add support for Kerbals EVA to experience planetshine
- Fix broken Blizzy Toolbar support. File was refactored accidentally.
- Correct white line visible.
- @mario-sov and others that contributed to the solutions, Thanks for the support!

Enjoy, and as always, let me know if there are issues.  Lord knows I'm not perfect. :P 

Edited by Papa_Joe
Link to comment
Share on other sites

  • 2 months later...
  • 4 weeks later...

From my personal point of view, it doesn't cause issues when running with RSS installed. However I don't see much light reflected from the Earth in LEO. This might be because 1) mod not working properly 2) light is too faint and I can't see.

EDIT: Just looked at the config files. I have RSS v18.5.0 installed. It contains a file GameData/RealSolarSystem/Compatibility/PlanetShineColors.cfg. So it will work. I'm just seeing very dim lights -- realistic enough.

With RSS installed, planet shine will work. DistantObjectEnhacement will also work, because it seems to share the "PlanetColours" system with PlanetShine.

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.

 Share

×
×
  • Create New...