firstpersonksp / rasterpropmonitor Goto Github PK
View Code? Open in Web Editor NEWThis project forked from mihara/rasterpropmonitor
Plugin for Kerbal Space Program
License: Other
This project forked from mihara/rasterpropmonitor
Plugin for Kerbal Space Program
License: Other
gamedata/aset/aset_props/instruments/aset_dsky/ASET_DSKY.cfg
Fairly certain it's because of this, but I should fork scansat and verify:
S-C-A-N/SCANsat#359
Repro steps:
If you activate ProbeControlRoom and then leave it, all the MFDs and other props continue updating every frame (note that PCR’s internal model is not instantiated until you activate it).
This might mainly be a problem in my custom build of ProbeControlRoom, but I think you could force something similar to happen in the original by activating PCR in an empty ship and then having a kerbal board and use IVA mode.
Might be some strange interaction with the transparent pod tech, where you want to see props working from external view.
This also might be something that turns out to be specific to PCR, but should investigate whether internal props in other command pods are updating while IVA mode is active in a different pod.
possibly from setting a klaw as the control part?
340116 NullReferenceException: Object reference not set to an instance of an object
340117 at JSI.JUtil.DeduceCurrentPart (Vessel vessel) [0x00039] in <c32376c17bcf4495824b78107ce511bd>:0
340118 at JSI.RPMVesselComputer.FetchDockingNodeData () [0x0004b] in <c32376c17bcf4495824b78107ce511bd>:0
340119 at JSI.RPMVesselComputer.FetchPerModuleData () [0x00023] in <c32376c17bcf4495824b78107ce511bd>:0
340120 at JSI.RPMVesselComputer.UpdateVariables () [0x0002b] in <c32376c17bcf4495824b78107ce511bd>:0
340121 at JSI.RPMVesselComputer.FixedUpdate () [0x00024] in <c32376c17bcf4495824b78107ce511bd>:0
340122 UnityEngine.DebugLogHandler:Internal_LogException(Exception, Object)
340123 UnityEngine.DebugLogHandler:LogException(Exception, Object)
340124 ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
340125 UnityEngine.Logger:LogException(Exception, Object)
340126 UnityEngine.Debug:CallOverridenDebugHandler(Exception, Object)
These props output SELECT_SELECTED_PWR_SOURCE_VALUE:
ASET\ASET_Props\Instruments\DigitalIndicator\DigitalIndicator_Elec_Output.cfg
ASET\ASET_Props\Instruments\NASA_Elec_Output\NASA_Elec_Output.cfg
This variable comes from this prop:
ASET_Props\CUSTOMs\ASET_Elec_Output_CUSTOMs.cfg
Which depends on the following builtin RPM variables:
ELECOUTPUTALTERNATOR
ELECOUTPUTFUELCELL
ELECOUTPUTSOLAR
ELECOUTPUTGENERATOR
Kerbalism changes power production in fundamental ways, so the builtin RPM variables don't work. For solar, they've modified their code to push a value to the flowRate field of the solar panels (see here). Not sure about the others yet.
Secondly, the switch for turning on fuel cells doesn't seem to work in Kerbalism, probably for similar reasons.
Maybe add buttons to JSIMainCompWhatever?
Turns out this is actually backwards internally within KSP. KOS deals with it like this: https://github.com/KSP-KOS/KOS/blob/4121b1c2c979773386ca18148c7ebde68ecc6d64/src/kOS/Binding/FlightControlManager.cs#L194
The radial in/out icons from ASET props appear to have had their textures swapped, maybe to work around this issue. Need to put out a compatibility fix for those too.
There are many variables handled by the InternalModule that are vessel-wide, like resources.
For example the standby screen of ALCOR MFDs - it uses storedstrings and the RPM version, but these variables are effectively constant. This screen could be rendered once and never has to be drawn again.
RPM Version, stored strings, etc are all effectively constant
Title. When switching to the orbit display screen, the log starts getting spammed with the following error. Additionally, the orbit display with the blue ellipse that's shown here
isn't rendered either.
[EXC 13:42:42.804] MissingMethodException: Vector3d Orbit.Up(double)
JSI.MonitorPage.RenderBackground (UnityEngine.RenderTexture screen) (at <05eb104d0dd24f118b48a18639af1146>:0)
JSI.RasterPropMonitor.RenderScreen () (at <05eb104d0dd24f118b48a18639af1146>:0)
JSI.RasterPropMonitor.OnUpdate () (at <05eb104d0dd24f118b48a18639af1146>:0)
InternalProp.OnUpdate () (at <c1858a3f77504bd1aaa946fdccf84670>:0)
InternalModel.OnUpdate () (at <c1858a3f77504bd1aaa946fdccf84670>:0)
Part.InternalOnUpdate () (at <c1858a3f77504bd1aaa946fdccf84670>:0)
Part.Update () (at <c1858a3f77504bd1aaa946fdccf84670>:0)
UnityEngine.DebugLogHandler:LogException(Exception, Object)
ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
UnityEngine.Debug:CallOverridenDebugHandler(Exception, Object)
[ERR 13:42:42.812] Matrix stack full depth reached
[ERR 13:42:42.812] Matrix stack full depth reached
[ERR 13:42:42.812] Matrix stack full depth reached
Interestingly, I couldn't find the methods on this fork but they're present in the original RPM code.
No command pods except the mk1 Lander can does not have the custom IVA and uses the stock IVA
I wonder if this works properly in hullcam?
Came across this in my KSP.log.
Wonder if this might have something to do with InFlight problems like #12 & #13
[LOG 16:13:39.349] [AddonLoader]: Instantiating addon 'RPMShaderLoader' from assembly 'RasterPropMonitor'
[LOG 16:13:39.353] [RPMShaderLoader]: Set debugLoggingEnabled to False
[LOG 16:13:39.412] [RPMShaderLoader]: Adding RPM-included font digital-7 (italic) / 32
[LOG 16:13:39.414] [RPMShaderLoader]: Adding RPM-included font digital-7 (mono italic) / 32
[LOG 16:13:39.414] [RPMShaderLoader]: Adding RPM-included font digital-7 (mono) / 32
[LOG 16:13:39.415] [RPMShaderLoader]: Adding RPM-included font digital-7 / 32
[LOG 16:13:39.418] [RPMShaderLoader]: Adding RPM-included font InconsolataGo-Bold / 32
[LOG 16:13:39.418] [RPMShaderLoader]: Adding RPM-included font InconsolataGo-Regular / 32
[LOG 16:13:39.420] [RPMShaderLoader]: Adding RPM-included font LiberationSans-Bold / 32
[LOG 16:13:39.423] [RPMShaderLoader]: Adding RPM-included font LiberationSans-Regular / 32
[LOG 16:13:39.424] [RPMShaderLoader]: Adding RPM-included font repet___ / 32
[LOG 16:13:39.424] [RPMShaderLoader]: Found 8 RPM shaders and 9 fonts.
[ERR 16:13:39.457] [RPMShaderLoader]: Unable to register with ModuleManager for database reloads
The HullCam effects are not working. I made a small vesel of which every camera should have an effect. One is night vision, one is black and white, and one is wide angle. None of the effects are working on the monitors. Plus there is some clipping going on.
wide angle
night vision
black and white
Side note: Some cameras can't be used with the monitors cause they don't have an ID. Not sure if this should be handled by RPM or HullCam.
In this screenshot only NavCam can be used but the other two can't.
Log file:
KSP.log
The external camera FOVs are set in the MFD configs instead of the camera parts themselves. This leads to confusing behavior where the same camera part has a different FOV in the RPM MFD and the ASET one. It also means the preview is wrong in the VAB.
It would be way more interesting to have the external camera parts themselves specify the fov ranges. It looks like Hullcam already does this, but we will need to update their patches to make it work correctly with RPM.
MASCamera has a fovRange field: https://github.com/MOARdV/AvionicsSystems/blob/145c35c824bf66253132faf666d45943520bab2f/Source/MASCamera.cs#L189
HullCam's module has cameraFoVMin / Max fields: https://github.com/linuxgurugamer/HullcamVDSContinued/blob/20bbbc95a86730422bf8853d232379f471f2bc8a/HullCamera/MuMechModuleHullCamera.cs#L32
This exceptions is popping up in the logs.
The problem extends from something not happening correctly with dragModelType = default
.
200911T144902.854 [INFO] [ModuleManager.UnityLogHandle.InterceptLogHandler.LogFormat] PartLoader: Compiling Part 'JSI/RasterPropMonitor/Library/Parts/ExternalCameraPart/external-camera/JSIPrimitiveExternalCamera'
200911T144902.887 [INFO] [ModuleManager.UnityLogHandle.InterceptLogHandler.LogFormat] PartLoader: Part 'JSI/RasterPropMonitor/Library/Parts/ExternalCameraPart/external-camera/JSIPrimitiveExternalCamera' has no database record. Creating.
200911T144902.894 [INFO] [ModuleManager.UnityLogHandle.InterceptLogHandler.LogFormat] DragCubeSystem: Creating drag cubes for part 'JSIPrimitiveExternalCamera'
200911T144902.907 [EXCEPTION] [PartLoader.GetDatabaseConfig] NullReferenceException: Object reference not set to an instance of an object
at PartLoader.GetDatabaseConfig (Part p) (at <55ba45dc3a43403382024deac8dcd0be>:0)
at PartLoader.GetDatabaseConfig (Part p, System.String nodeName) (at <55ba45dc3a43403382024deac8dcd0be>:0)
at DragCubeSystem.LoadDragCubes (Part p) (at <55ba45dc3a43403382024deac8dcd0be>:0)
at Part+<Start>d__297.MoveNext () (at <55ba45dc3a43403382024deac8dcd0be>:0)
at UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <5aeafee3fea24f37abd1315553f2cfa6>:0)
at UnityEngine.DebugLogHandler:LogException(Exception, Object)
at ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
at UnityEngine.Debug:CallOverridenDebugHandler(Exception, Object)
There is an easy fix for these issues ... force a DRAG_CUBE in the config.
PR incoming.
I;m digging into RPM a bit, and wanted to chec the wiki... had to go to Mihara's repo...
Might be good to add it, just incase anyone ever wants to update it to reflect any changes/additions in RPM Adopted... vOv
Under the current architecture, every variable that has been instantiated gets updated every frame. But sometimes these variables don't need to be kept up to date - like if you turn on the map screen and then turn it off again, those variables will stick around.
Probably need a system that keeps track of the last time that each variable was evaluated.
If you sit in ProbeControlRoom with all monitors on the standby screen, each one is spending ~0.5ms each frame redrawing the same thing to screenTexture.
Need to separate the “text is dirty” logic from the actual drawing, and don’t touch the screenTexture if nothing changed. Probably ok to assume that if the page has a custom background handler that it’s always dirty.
This isn’t going to make a difference if all monitors are displaying something other than a static page, but in practice I rarely use more than half of the MFDs in the probe control room.
Another possible mitigation would be to somehow multi thread the draw calls, but that would be a bigger change.
I'm using DemonEin's IVA pack. I get graphical glitches on linux. Mostly the font becomes large, white blocks on all of the displays which are not the RPM MFDs. The unlit indicators look fine, but when they light up, the font becomes garbage. Most of the other indicators are unreadable.
I'm running Ubuntu 20.04 LTS and am using ASET from CKAN and the latest KSP from steam (1.9.1)
When I turn on the lights it gets worse.
I'd much appreciate a solution or fix.
Should probably test regular docking too!
KSP.zip
9997 [EXC 09:07:23.558] NullReferenceException: Object reference not set to an instance of an object 9998 JSI.JUtil.DeduceCurrentPart (Vessel vessel) (at <fd76d381c1fd4cc7a1fbaf30cc0b9c0e>:0) 9999 JSI.RPMVesselComputer.FetchDockingNodeData () (at <fd76d381c1fd4cc7a1fbaf30cc0b9c0e>:0) 10000 JSI.RPMVesselComputer.FetchPerModuleData () (at <fd76d381c1fd4cc7a1fbaf30cc0b9c0e>:0) 10001 JSI.RPMVesselComputer.UpdateVariables () (at <fd76d381c1fd4cc7a1fbaf30cc0b9c0e>:0) 10002 JSI.RPMVesselComputer.FixedUpdate () (at <fd76d381c1fd4cc7a1fbaf30cc0b9c0e>:0)
real quick i promise
The constant boxing/unboxing in the variable evaluation system is pretty expensive
Log file
KSP.log
I hope someone can help me out here...
Checking with a prop I was working on and one from ASET avionics, roll seems disconnected. Cursory check of other variables seems OK.
Using the version for 1.8-1.9, so it might just need a recompile of course.
There's a mess of /, , and ;; characters in there. Could probably fix it with a patch
KSP (54).log
Not really sure what could be the cause here, but needs investigation
14160 [EXC 06:12:10.427] NullReferenceException: Object reference not set to an instance of an object
14161 JSI.RasterPropMonitorComputer.Update () (at <882e1f528a274e64941793eb11c63a9a>:0)
14162 UnityEngine.DebugLogHandler:LogException(Exception, Object)
14163 ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
14164 UnityEngine.Debug:CallOverridenDebugHandler(Exception, Object)
Repro steps:
Hi !
we have this in MODULE rasterprop...... :
MODULE
{
name = RasterPropMonitorComputer
storedStrings = v 1.0|9.11.2020| M.K.1-3.P.O.D |ADVANCED LANDING CAPSULE|FOR ORBITAL RENDEZVOUS|empty| Masset S | LESHOUXGRAPH
}
storedStrings store data for this : STOREDSTRING_0 (1 etc) in page it's ok ?
storedstrings data is not displayed in cockpit mfd.
Steph.
Some experiments have multiple result flavor texts. They seem to be randomly returned from ResearchAndDevelopment.GetResults(scienceData.subjectID)
It's really hard to tell how the camera is oriented in the VAB, the spider would be better. Maybe even make a new texture for it?
Hi, after some tests with the recent version and KSP 1.10.0, most stuff seems to be working correctly, but I found some problems with atmospheric data using ASET and ASET based props.
Atmosphere variables store the wrong values. For example the ATM gauge shows 91% on launch pad (it was 99% before), 20% at 10000 m and it reaches zero at 20000 m. The stock atmosphere gauge is just under 50% at this point. Stock and RPM values do not match and are way off.
Respectively the "Atmosphere Density" and the "Atmosphere Pressure" digital readouts are not correct
too.
I am a huge IVA fan and made over 70 complex IVA for stock and mods, so RPM is one of my must have mods. I hope this can be fixed. Thank you for your time and keep up the good work!
None of the OPT cockpits include a RasterPropMonitorComputer module. Most of the IVA still works, but notably the SAS hold directions do not. Some errors are also emitted:
[ERR 16:45:16.593] [RasterPropMonitorComputer]: Tried to look for method with propToUse still null?
[ERR 16:45:16.719] Cannot find an InternalModule of typename 'JSIInternalRPMButtons'
[ERR 16:45:16.719] [InternalProp]: Failed finding module JSIInternalRPMButtons for method ButtonSASModeTarget
[ERR 16:45:16.719] [JSIActionGroupSwitch]: Failed to instantiate action handler JSIInternalRPMButtons:ButtonSASModeTarget
The following patch should add a RPMComputer to any command module that has an internal model and doesn't already have one, but I'm not sure if this is the best way to fix it.
rpm_patch.txt
Many props will create the RPMC if it doesn't exist - why didn't that happen here?
[EXC 18:49:47.506] ArgumentNullException: Value cannot be null.
Parameter name: shader
UnityEngine.Material..ctor (UnityEngine.Shader shader) (at <5aeafee3fea24f37abd1315553f2cfa6>:0)
JSI.JSIExternalCameraSelector..cctor () (at <7709c28c56774c8aaae82c97d20bb45d>:0)
Rethrow as TypeInitializationException: The type initializer for 'JSI.JSIExternalCameraSelector' threw an exception.
UnityEngine.DebugLogHandler:LogException(Exception, Object)
ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
UnityEngine.GameObject:AddComponent(Type)
Part:AddModule(String, Boolean)
Part:AddModule(ConfigNode, Boolean)
PartLoader:ParsePart(UrlConfig, ConfigNode)
<CompileParts>d__56:MoveNext()
UnityEngine.SetupCoroutine:InvokeMoveNext(IEnumerator, IntPtr)
I believe it's from the static initialization of this member:
I've already fixed this in my local branch (not yet pushed), but should verify that I can repro this crash and my change fixes it.
The texture is really low quality even if i change the resolution to high, the quality doesn't change.
(I am using the latest version v0.31.4 - KSP 1.10.x)
https://imgur.com/a/Ipe7cqZ
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.