Jump to content

[1.12.x] Docking Camera KURS Style Re-Adopted (Fixed in 1.9)


linuxgurugamer

Recommended Posts

I don't know if the previous logs showed these exceptions:

KSP.log: https://www.dropbox.com/s/jcdrgidu7jaotnd/KSP(OLDD).log?dl=0

[EXC 23:01:03.874] NullReferenceException: Object reference not set to an instance of an object
	OLDD_camera.Camera.BaseCamera.ExtendedDrawWindowL3 () (at <939df439f74b42a3812a384c250a28b1>:0)
	OLDD_camera.Camera.PartCamera.ExtendedDrawWindowL3 () (at <939df439f74b42a3812a384c250a28b1>:0)
	OLDD_camera.Camera.BaseCamera.DrawWindow (System.Int32 id) (at <939df439f74b42a3812a384c250a28b1>:0)
	UnityEngine.GUI.CallWindowDelegate (UnityEngine.GUI+WindowFunction func, System.Int32 id, System.Int32 instanceID, UnityEngine.GUISkin _skin, System.Int32 forceRect, System.Single width, System.Single height, UnityEngine.GUIStyle style) (at <58f888e0d56a4620958c8e58a768c70d>:0)
	UnityEngine.DebugLogHandler:LogException(Exception, Object)
	ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
	UnityEngine.Debug:CallOverridenDebugHandler(Exception, Object)

Player.log: https://www.dropbox.com/s/idyhpn3lhaokylx/Player(OLDD).log?dl=0

NullReferenceException: Object reference not set to an instance of an object
  at OLDD_camera.Camera.BaseCamera.ExtendedDrawWindowL3 () [0x001c6] in <939df439f74b42a3812a384c250a28b1>:0 
  at OLDD_camera.Camera.PartCamera.ExtendedDrawWindowL3 () [0x0007c] in <939df439f74b42a3812a384c250a28b1>:0 
  at OLDD_camera.Camera.BaseCamera.DrawWindow (System.Int32 id) [0x0000c] in <939df439f74b42a3812a384c250a28b1>:0 
  at UnityEngine.GUI.CallWindowDelegate (UnityEngine.GUI+WindowFunction func, System.Int32 id, System.Int32 instanceID, UnityEngine.GUISkin _skin, System.Int32 forceRect, System.Single width, System.Single height, UnityEngine.GUIStyle style) [0x00078] in <58f888e0d56a4620958c8e58a768c70d>:0 
UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
UnityEngine.Logger:LogException(Exception, Object)
UnityEngine.Debug:CallOverridenDebugHandler(Exception, Object)
 
(Filename: <939df439f74b42a3812a384c250a28b1> Line: 0)

Thanks.

Link to comment
Share on other sites

  • 1 month later...
On 7/21/2021 at 4:23 AM, linuxgurugamer said:

New release, 1.3.8.2

  • Fixed OnboardCamera to work in orbit
  • Added Assemblyfileversion
  • Updated project info

Good afternoon, guru! Can you tell me what kind of crosshair texture the docking camera uses?
The mod is excellent, perhaps the most convenient for me from the camera mods, but I would love to fix the texture a little ...

Link to comment
Share on other sites

On 9/7/2021 at 3:57 AM, Cochies said:

Good afternoon, guru! Can you tell me what kind of crosshair texture the docking camera uses?
The mod is excellent, perhaps the most convenient for me from the camera mods, but I would love to fix the texture a little ...

Dynamically generated

Link to comment
Share on other sites

  • 3 months later...

OK I have an issue with the KURS Camera. 

When I click on Display Docking Camera nothing is happening.

And when I click on I think was Camera Adjuster   I get black screen and a lot of this in the debug  menu :

Spoiler

NullReferenceException: Object reference not set to an instance of an object
  at OLDD_camera.CameraAdjust.CameraAdjuster.UpdateCamera (UnityEngine.Vector3 v3, System.Boolean doUpdate) [0x00000] in <ddad8be262ee44d0979a416ded79fdb9>:0
  at OLDD_camera.CameraAdjust.CameraAdjuster.DrawGUI (System.Int32 id) [0x00c7f] in <ddad8be262ee44d0979a416ded79fdb9>:0
  at UnityEngine.GUILayout+LayoutedWindow.DoWindow (System.Int32 windowID) [0x00070] in <58f888e0d56a4620958c8e58a768c70d>:0
  at UnityEngine.GUI.CallWindowDelegate (UnityEngine.GUI+WindowFunction func, System.Int32 id, System.Int32 instanceID, UnityEngine.GUISkin _skin, System.Int32 forceRect, System.Single width, System.Single height, UnityEngine.GUIStyle style) [0x00078] in <58f888e0d56a4620958c8e58a768c70d>:0
UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
UnityEngine.Logger:LogException(Exception, Object)
UnityEngine.Debug:CallOverridenDebugHandler(Exception, Object)
 
(Filename: <ddad8be262ee44d0979a416ded79fdb9> Line: 0)

And this too :
 

Spoiler

Module DockingCameraModule threw during OnStart: UnityEngine.UnityException: Failed to create texture because of invalid parameters.
  at UnityEngine.Texture2D.Internal_Create (UnityEngine.Texture2D mono, System.Int32 w, System.Int32 h, System.Int32 mipCount, UnityEngine.Experimental.Rendering.GraphicsFormat format, UnityEngine.Experimental.Rendering.TextureCreationFlags flags, System.IntPtr nativeTex) [0x00021] in <12e76cd50cc64cf19e759e981cb725af>:0
  at UnityEngine.Texture2D..ctor (System.Int32 width, System.Int32 height, UnityEngine.TextureFormat textureFormat, System.Int32 mipCount, System.Boolean linear, System.IntPtr nativeTex) [0x0003d] in <12e76cd50cc64cf19e759e981cb725af>:0
  at UnityEngine.Texture2D..ctor (System.Int32 width, System.Int32 height) [0x00000] in <12e76cd50cc64cf19e759e981cb725af>:0
  at OLDD_camera.Utils.Util.MonoColorTexture (UnityEngine.Color color, System.Int32 width, System.Int32 height) [0x00000] in <ddad8be262ee44d0979a416ded79fdb9>:0
  at OLDD_camera.Utils.Util.MonoColorVerticalLineTexture (UnityEngine.Color color, System.Int32 size) [0x00000] in <ddad8be262ee44d0979a416ded79fdb9>:0
  at OLDD_camera.Camera.BaseCamera.InitTextures () [0x000e2] in <ddad8be262ee44d0979a416ded79fdb9>:0
  at OLDD_camera.Camera.DockingCamera.InitTextures () [0x00000] in <ddad8be262ee44d0979a416ded79fdb9>:0
  at OLDD_camera.Camera.BaseCamera.DoResizeWindow (System.Int32 WindowSizeCf) [0x00020] in <ddad8be262ee44d0979a416ded79fdb9>:0
  at OLDD_camera.Camera.BaseCamera.LoadWinSettings () [0x00020] in <ddad8be262ee44d0979a416ded79fdb9>:0
  at OLDD_camera.Camera.BaseCamera.InitBaseCamera (Part thisPart, System.Single windowSizeInit, System.String windowLabel, System.Boolean firstTime) [0x00140] in <ddad8be262ee44d0979a416ded79fdb9>:0
  at OLDD_camera.Camera.BaseCamera..ctor (Part thisPart, System.Single windowSizeInit, System.String windowLabel) [0x000c7] in <ddad8be262ee44d0979a416ded79fdb9>:0
  at OLDD_camera.Camera.DockingCamera..ctor (OLDD_camera.Modules.DockingCameraModule dcm, Part thisPart, System.Boolean noise, System.Double electricchargeCost, System.Boolean crossStock, System.Boolean crossDPAI, System.Boolean crossOLDD, System.Boolean transformModification, System.Int32 windowSize, System.String restrictShaderTo, System.String windowLabel, System.String cameraName, System.Boolean slidingOptionWindow, System.Boolean allowZoom, System.Boolean noTransformMod) [0x000b4] in <ddad8be262ee44d0979a416ded79fdb9>:0
  at OLDD_camera.Modules.DockingCameraModule.OnStart (PartModule+StartState state) [0x0009b] in <ddad8be262ee44d0979a416ded79fdb9>:0
  at Part.ModulesOnStart () [0x00120] in <39c0323fb6b449a4aaf3465c00ed3c8d>:0  
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)

 

Edited by Jovzin
typos
Link to comment
Share on other sites

5 hours ago, Jovzin said:

OK I have an issue with the KURS Camera. 

When I click on Display Docking Camera nothing is happening.

And when I click on I think was Camera Adjuster   I get black screen and a lot of this in the debug  menu :

  Reveal hidden contents

NullReferenceException: Object reference not set to an instance of an object
  at OLDD_camera.CameraAdjust.CameraAdjuster.UpdateCamera (UnityEngine.Vector3 v3, System.Boolean doUpdate) [0x00000] in <ddad8be262ee44d0979a416ded79fdb9>:0
  at OLDD_camera.CameraAdjust.CameraAdjuster.DrawGUI (System.Int32 id) [0x00c7f] in <ddad8be262ee44d0979a416ded79fdb9>:0
  at UnityEngine.GUILayout+LayoutedWindow.DoWindow (System.Int32 windowID) [0x00070] in <58f888e0d56a4620958c8e58a768c70d>:0
  at UnityEngine.GUI.CallWindowDelegate (UnityEngine.GUI+WindowFunction func, System.Int32 id, System.Int32 instanceID, UnityEngine.GUISkin _skin, System.Int32 forceRect, System.Single width, System.Single height, UnityEngine.GUIStyle style) [0x00078] in <58f888e0d56a4620958c8e58a768c70d>:0
UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
UnityEngine.Logger:LogException(Exception, Object)
UnityEngine.Debug:CallOverridenDebugHandler(Exception, Object)
 
(Filename: <ddad8be262ee44d0979a416ded79fdb9> Line: 0)

And this too :
 

  Reveal hidden contents

Module DockingCameraModule threw during OnStart: UnityEngine.UnityException: Failed to create texture because of invalid parameters.
  at UnityEngine.Texture2D.Internal_Create (UnityEngine.Texture2D mono, System.Int32 w, System.Int32 h, System.Int32 mipCount, UnityEngine.Experimental.Rendering.GraphicsFormat format, UnityEngine.Experimental.Rendering.TextureCreationFlags flags, System.IntPtr nativeTex) [0x00021] in <12e76cd50cc64cf19e759e981cb725af>:0
  at UnityEngine.Texture2D..ctor (System.Int32 width, System.Int32 height, UnityEngine.TextureFormat textureFormat, System.Int32 mipCount, System.Boolean linear, System.IntPtr nativeTex) [0x0003d] in <12e76cd50cc64cf19e759e981cb725af>:0
  at UnityEngine.Texture2D..ctor (System.Int32 width, System.Int32 height) [0x00000] in <12e76cd50cc64cf19e759e981cb725af>:0
  at OLDD_camera.Utils.Util.MonoColorTexture (UnityEngine.Color color, System.Int32 width, System.Int32 height) [0x00000] in <ddad8be262ee44d0979a416ded79fdb9>:0
  at OLDD_camera.Utils.Util.MonoColorVerticalLineTexture (UnityEngine.Color color, System.Int32 size) [0x00000] in <ddad8be262ee44d0979a416ded79fdb9>:0
  at OLDD_camera.Camera.BaseCamera.InitTextures () [0x000e2] in <ddad8be262ee44d0979a416ded79fdb9>:0
  at OLDD_camera.Camera.DockingCamera.InitTextures () [0x00000] in <ddad8be262ee44d0979a416ded79fdb9>:0
  at OLDD_camera.Camera.BaseCamera.DoResizeWindow (System.Int32 WindowSizeCf) [0x00020] in <ddad8be262ee44d0979a416ded79fdb9>:0
  at OLDD_camera.Camera.BaseCamera.LoadWinSettings () [0x00020] in <ddad8be262ee44d0979a416ded79fdb9>:0
  at OLDD_camera.Camera.BaseCamera.InitBaseCamera (Part thisPart, System.Single windowSizeInit, System.String windowLabel, System.Boolean firstTime) [0x00140] in <ddad8be262ee44d0979a416ded79fdb9>:0
  at OLDD_camera.Camera.BaseCamera..ctor (Part thisPart, System.Single windowSizeInit, System.String windowLabel) [0x000c7] in <ddad8be262ee44d0979a416ded79fdb9>:0
  at OLDD_camera.Camera.DockingCamera..ctor (OLDD_camera.Modules.DockingCameraModule dcm, Part thisPart, System.Boolean noise, System.Double electricchargeCost, System.Boolean crossStock, System.Boolean crossDPAI, System.Boolean crossOLDD, System.Boolean transformModification, System.Int32 windowSize, System.String restrictShaderTo, System.String windowLabel, System.String cameraName, System.Boolean slidingOptionWindow, System.Boolean allowZoom, System.Boolean noTransformMod) [0x000b4] in <ddad8be262ee44d0979a416ded79fdb9>:0
  at OLDD_camera.Modules.DockingCameraModule.OnStart (PartModule+StartState state) [0x0009b] in <ddad8be262ee44d0979a416ded79fdb9>:0
  at Part.ModulesOnStart () [0x00120] in <39c0323fb6b449a4aaf3465c00ed3c8d>:0  
(Filename: C:\buildslave\unity\build\Runtime/Export/Debug/Debug.bindings.h Line: 35)

 

Log file or no support.

Check your install, without the full log I can't be sure, but that looks like a bad install

Link to comment
Share on other sites

  • 1 month later...

@Silvia Dragoness It might be, that if a mod needs to have its own patch for KURS, that differs from the generic KURS patch to add to all parts, the mods' patch is being over-ridden by the KURS patch, due to it having :FINAL, which runs last and over-rides any other patch... Idk for sure... I will be poking the issue

Link to comment
Share on other sites

10 hours ago, Silvia Dragoness said:

Is this supposed to add the docking cam to any docking port, even ones added by other mods?  'Cause either it's not getting added to the ones from Extra Docking Ports, or I'm missing something in how to use it.

(Logs here, just in case: https://www.dropbox.com/sh/gkeac7q30qkm8yg/AADpmIfOc1d476gEFNQb-HMAa?dl=0 )

All of them, or just some?

5 hours ago, Stone Blue said:

@Silvia Dragoness It might be, that if a mod needs to have its own patch for KURS, that differs from the generic KURS patch to add to all parts, the mods' patch is being over-ridden by the KURS patch, due to it having :FINAL, which runs last and over-rides any other patch... Idk for sure... I will be poking the issue

The KURS patch only adds the DockingCameraModule to any part which has a ModuleDockingNode and doesn't have the DockingCameraModule already.  So I doubt it's related to that.  This is the patch:

@PART[*]:HAS[@MODULE[ModuleDockingNode],!MODULE[DockingCameraModule]]:Final
{
	MODULE
	{
		name = DockingCameraModule
		noise = false
	}
}

 

Link to comment
Share on other sites

16 hours ago, Silvia Dragoness said:

Is this supposed to add the docking cam to any docking port, even ones added by other mods?  'Cause either it's not getting added to the ones from Extra Docking Ports, or I'm missing something in how to use it.

(Logs here, just in case: https://www.dropbox.com/sh/gkeac7q30qkm8yg/AADpmIfOc1d476gEFNQb-HMAa?dl=0 )

I don't know what's going on with your game, I just added the Extra Docking Ports to a test install along with KURS, and it was added properly.  I did notice an issue with the positioning of the camera, I'll take a look at it, I'm actually doing some work with the KURS code right now, so it may be a quick fix

Link to comment
Share on other sites

2 hours ago, linuxgurugamer said:

I did notice an issue with the positioning of the camera, I'll take a look at it, I'm actually doing some work with the KURS code right now, so it may be a quick fix

Yup... pointing out the bottom of the docking parts... I see changing the variables in the forward/up keys has no effect

Link to comment
Share on other sites

  

@linuxgurugamer So, I poked the model on one of the EDP ports I've been testing KURS with... Wondering if this could be the issue?:

zqzI0gW.jpg

The part on the left is the stock Jr port.. One on right is the EDP Jr. Note it has *two* nodes defined in the model hierarchy. One is the *topside* (should be the dockingnode, and one on the bottom side, which should be the *attachnode*.
In the model, the top one is named "nodeTop", bottom one is "nodeBottom"...

How does KURS determine the name of the docking node to use? Cuz it seems it could be grabbing the *bottom* node here, which could explain the incorrect orientation of the camera view? And why manual changes in the cfg keys for the KURS patch arent applying?
If KURS is looking for the first available node, and does so alpha-numerically, "nodeBottom" would be before "nodeTop".. vOv

Here is the relevent excerpt from the ModuleDockingNode in the part cfg:
 

	MODULE
	{
		name = ModuleDockingNode
		nodeTransformName = nodeTop
		referenceAttachNode = Top

Also, this is specified in the part .cfg, defining both nodes as attachment nodes, as well as having a "node_attach" key defined. Could these be interfering with definig/using the same node in the docking module?
 

	NODE
	{
		name = Top
		transform = nodeTop
		size = 1
		method = FIXED_JOINT
	}

	NODE
	{
		name = Bottom
		transform = nodeBottom
		size = 1
		method = FIXED_JOINT
	}

	// attachment rules: stack, srfAttach, allowStack, allowSrfAttach, allowCollision
	attachRules = 1,1,1,0,0
	node_attach = 0.0, 0.0, 0.0, 0.0, -1.0, 0.0
	stackSymmetry = 2
	

 

Link to comment
Share on other sites

11 minutes ago, Stone Blue said:

How does KURS determine the name of the docking node to use? Cuz it seems it could be grabbing the *bottom* node here, which could explain the incorrect orientation of the camera view? And why manual changes in the cfg keys for the KURS patch arent applying?

Because there's a bug :D

11 minutes ago, Stone Blue said:

How does KURS determine the name of the docking node to use? Cuz it seems it could be grabbing the *bottom* node here, which could explain the incorrect orientation of the camera view? And why manual changes in the cfg keys for the KURS patch arent applying?

It doesn't.  It uses the part itself, is not designed (and I'm not going to ) to work with multiple docking ports on a single part.

The parts are working with what I have locally, I've fixed the bug and am adding some stuff so I can use this with Universal Storage 2.  Not ready to release a beta yet

13 minutes ago, Stone Blue said:

Also, this is specified in the part .cfg, defining both nodes as attachment nodes, as well as having a "node_attach" key defined. Could these be interfering with definig/using the same node in the docking module?

Nope

Link to comment
Share on other sites

17 minutes ago, linuxgurugamer said:

The parts are working with what I have locally, I've fixed the bug and am adding some stuff so I can use this with Universal Storage 2.  Not ready to release a beta yet

Kewl.. I'll wait for the release ;)

Thanx!

Link to comment
Share on other sites

  • 4 weeks later...

New release, 1.3.8.3

  • Added the CameraAdjuster.  It is available when you set the field :
    • devMode = true

in a ModuleCameraModule.  Add the following to the part you want to put the camera on, then select "Camera Adjuster" when right-clicking on the part.  It will show an arrow showing where the camera origin is and where it's pointing to.

MODULE
{
name = DockingCameraModule
devMode = true
}

  • Added following fields to the DockingCameraModule
    • public bool canTakePicture = false;                // Can this camera take a picture
    • public int cameraHorizontalResolution = 256;    // Horizontal res for picture taking
    • public int cameraVerticalResolution = 256;        // Vertical res for picture taking
    • public string deployAnimationName = null;        // If there is a deploy animation needed to be open before the camera is available
    • public bool openBeforePic = false;                // Does the deploy animation need to be open to take a picture
    • public bool oappendix vermicularisOne = true;                    // relative to the deploy animation, indicates which way is open
    • public string cameraTransformName = "";        
    • public float cameraCustomNearClipPlane = 0f;    // Used for clipping the near camera.  
    • public bool isDockingNode = true;                // Is this a docking node
    • public bool photoDir = "DockingCamera";            // This specifies the name of the directory where any photos taken are saved, inside the Screenshots folder, in a top level directory with the name of the game save
       
Link to comment
Share on other sites

  • 3 weeks later...

Hi there, 

i have the problem that the Dockingcam-KURS integrated in this Mod looking 90° to the side instead of forward. Is there any solution how i can fix that myself?

 

Edited by MaikC
Link to comment
Share on other sites

11 minutes ago, MaikC said:

i have the problem that the Dockingcam-KURS integrated in this Mod looking 90° to the side instead of forward. Is there any solution how i can fix that myself

You can try adjusting the cameraUp key in the part/patch cfg for that part.... If you do, I would suggest posting the fix on that mods' thread, so the author can integrate it... or at least post your fix so other users can grab it till the author integrates it.

It should be *that* mod that handles the fix.

I did this with the ASET Exploration Rover.

Link to comment
Share on other sites

  • 3 weeks later...
44 minutes ago, akyyy said:

Dear linuxgurugamer!

IS it possible for this mod to work with OfCourseIStillLoveYou?

The two mods work together, but the onboard camera is not see in windows. 

I could be wrong, but IIRC, I did have both installed at the same time, and I *think* they worked as they were supposed to with no conflicts...

I assume, tho, that you mean, can the KURS camera be shown in the OfCourseIstillLoveYou camera window?
If so, IMHO, that question would be better asked on the OCISLY thread... vOv

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