Jump to content

[WIP] [1.12.x] MOARdV's Avionics Systems - MAS Interactive IVA! (v1.3.7, 7 April 2023)


MOARdV

Recommended Posts

18 hours ago, Stone Blue said:

I cant remember if MAS has its own, built-in camera support, or not. It *may* need, but have support for, some of the sepertely downloadable camera mods.
ie HullCam, KURS Docking cam, etc

Not sure if there is Neptune Camera support or not..?? If I get back to KSP Soon™, I may investigate NC support

Yeah, actually looking at the patches again, i think you're right - it looks like it doesn't disable the original camera module. So without dedicated support for Neptune, I guess I'd have to first patch in camera modules from one of the supported mods?

Link to comment
Share on other sites

MASCamera is the fully-featured camera module for MAS.  Take a look at GameData/MOARdV/FlightSystems/ for some example patches. Squad.cfg, for instance, adds the camera and radar modules to stock docking ports.

Link to comment
Share on other sites

  • 2 weeks later...
On 12/21/2021 at 12:33 PM, MOARdV said:

MASCamera is the fully-featured camera module for MAS.  Take a look at GameData/MOARdV/FlightSystems/ for some example patches. Squad.cfg, for instance, adds the camera and radar modules to stock docking ports.

 I'd copied those patches as my starting point, and the module's displayed as present in the VAB, but I'm struggling a bit to get them working.

I'm using patches like this copied from the examples:

@PART[octans_androgynous_docking_port_s0p5_1]:NEEDS[AvionicsSystems]:HAS[!MODULE[MASCamera]]
{
	MODULE
	{
		name = MASCamera

		cameraName = DockCam

		fovRange = 10, 10

		panRange = 0, 0

		tiltRange = 0, 0

		cameraTransformName = dockingNode
	}
}

@PART[grus_sensor_visible_light_telescope_s0p5_1]:NEEDS[AvionicsSystems]:HAS[!MODULE[MASCamera]]
{
	MODULE
	{
		name = MASCamera

		fovRange = 60, 100
		fovRate = 20

		cameraTransformName = hc_navcam
		translation = 0.0, 0.009, 0.0
		rotation = -90, 0, 0

		cameraName = Tantares Camera
	}
}

the patches are definitely loading, because I can see the External Camera module displaying in the VAB, but only the docking node ones are working in-game. I'm getting errors like this:

[EXC 15:44:18.343] NullReferenceException: Object reference not set to an instance of an object
	AvionicsSystems.MASCamera.Start () (at <0bf90ae8ff9d477c823199001f706a26>:0)
	UnityEngine.DebugLogHandler:LogException(Exception, Object)
	ModuleManager.UnityLogHandle.InterceptLogHandler:LogException(Exception, Object)
	UnityEngine.Debug:CallOverridenDebugHandler(Exception, Object)

I'm wondering is it something to do with the cameraTransformName field? I had a look at the page on the Github Wiki, but I don't really understand the part about transforms.

BTW - is there a patch for IVAProbeControlRoom? I'd thought the RPM console screens automatically got updated to use MOAR Avionics, but it seems like they don't.

EDIT: Aahhh. I've worked out my issue by looking at the NeptuneCamera patches for Tantares. They've also got a cameraTransformName field (usually just set to "cameraTransform") - so copying that seems to fix it.

Edited by baldamundo
Link to comment
Share on other sites

Yeah, @baldamundo ... the field "cameraTransformName" in a MASCamera module needs to be the exact name of an existing transform (& maybe even just *any* gameobject), that is built into the actual model (.mu) file, of the part you are adding the module to.

Non-modellers/modders, can use one of these two mods to easily inspect/poke around in the models, *in game*, to get info like object/transform names:
 

 

Link to comment
Share on other sites

Thanks. Really helpful!

I've set up the cameras with the following specifications:

		name = MASCamera

		fovRange = 30, 120
		fovRate = 20
		panRange = -90, 90
		panRate = 20
		tiltRange = -90, 90
		tiltRate = 20

		cameraTransformName = cameraTransform
		refreshRate = 3
		
		translation = 0, 0, 0
		rotation = 0, 0, 0

		cameraName = Tantares Camera

And they seem to be working, but I can't work out how to rotate them? I assumed it was with the arrow buttons around the monitors like in RPM, but they don't seem to work. The up and down arrows seem to change the Field of View (altho they have to be clicked repeatedly, can't be held down?). Am I missing something here?

BTW, does the Texture field for Shaders need to refer to a PNG file? And do the shaders still work with no Texture set, but presumably the Blend and Offset fields have no effect without a texture?

Link to comment
Share on other sites

16 hours ago, baldamundo said:

And they seem to be working, but I can't work out how to rotate them? I assumed it was with the arrow buttons around the monitors like in RPM, but they don't seem to work. The up and down arrows seem to change the Field of View (altho they have to be clicked repeatedly, can't be held down?). Am I missing something here?

BTW, does the Texture field for Shaders need to refer to a PNG file? And do the shaders still work with no Texture set, but presumably the Blend and Offset fields have no effect without a texture?

panRange and tiltRange both need to be set for camera pan and tilt to work.  panRange controls how far left and right the camera view can shift, in degrees.  Something like -20, 20 is a good start there.  tiltRange is how far up and down the camera tilts.  Starting with -20, 20 there as well.  In my experience, the negative value tends to be smaller, since otherwise the camera is staring at the hull of the spacecraft.

I'm pretty sure the tilt and pan controls work on the MFD, although it may depend on the mode.  Docking cameras typically are fixed in place, for instance, so that you're not trying to connect with a dock that's off to the side (because your camera isn't pointed straight).

Link to comment
Share on other sites

8 hours ago, MOARdV said:

panRange and tiltRange both need to be set for camera pan and tilt to work.  panRange controls how far left and right the camera view can shift, in degrees.  Something like -20, 20 is a good start there.  tiltRange is how far up and down the camera tilts.  Starting with -20, 20 there as well.  In my experience, the negative value tends to be smaller, since otherwise the camera is staring at the hull of the spacecraft.

I'm pretty sure the tilt and pan controls work on the MFD, although it may depend on the mode.  Docking cameras typically are fixed in place, for instance, so that you're not trying to connect with a dock that's off to the side (because your camera isn't pointed straight).

I set both pan and tilt to -90, 90, but I can't get any of them to rotate at all

Btw, I saw some of the discussion from earlier in the thread about @Sovetskysoyuzhaving made a dll for this that's compatible with Probe Control Room. Is that available for download somewhere?

EDIT: Also, I'm getting an error on the GRAPH button of the MFD's saying "[ERR 20:46:22.769] [MASMonitor] Unable to switch to page 'MAS_JSI_BasicMFD_Graphs'"

Edited by baldamundo
Link to comment
Share on other sites

  • 3 weeks later...


https://spacedock.info/mod/2048/Telemetria

I know you're busy, but I once read you're open to suggestions, so here's mine. It would be cool to have more data panels of flight statistics, like a screen that shows you some of the date displayed on this two mods.

Finally, in the Apollo IVA, it would be cool to have the "earth ball" mapy thing using a real world map for RSS saves.

Edited by Sesshaku
Link to comment
Share on other sites

  • 1 month later...
On 10/21/2021 at 12:05 PM, johnnydope said:

OK. Thanks anyway. I do however have a question of a new subject. MechJeb & kOs. RPM fixed MechJeb & kOs integration and it fully works on the JSI version of the 40x20 mfd. The ALCOR mfd and any MAS mfd fails to see mechjeb or kOs present. Why is that? No more autopilot for MAS right now it seems. I installed everything fresh in a new install of ksp and tested this on IVA's already made by others. Its a shame. That beautiful autopilot board in the OPT JHT cockpit you made i cant even use right now...... (sadface)

Resurrected since I'm currently running both RPM and MAS, and am about to try to get kOS and kOSPropMonitor working. Looks like @vulkans YouTube video shows MAS MFDs working with kOSPropMonitor.

The currently released AvionicsSystem from CKAN, does not (yet) have the ASET to MAS prop upgrades (ie. "AsetToMasUpgrade.nocfg" has not been renamed yet), I think the GitHub version does however. So in the future, if it doesn't work look for that file in AvionicsSystem and rename it (or disable just the MFD40x20 upgrade, or add a user local final patch to undo it).

So for now the MFD40x20 props (which RPM will run and provide support for kOSPropMonitor) are not run by MAS versions (MAS_ALCOR_MFD40x20), so kOSPropMonitor seems (from testing) to work:

  • Install RPM
  • Install MAS
  • Install kOS
  • Install latest kOSPropMonitor (from SpaceDock, the CKAN version is older - @dsonbilldidn't update CKAN I guess?)

Advert: If you like IVAs, I recently started developing this mod which lets you switch IVA in the editor and *in-flight* (supports RPM and/or MAS). It includes Stock and Missing History support for switching Stock, RPM, ASET (via DE/HonkHogans IVA), the Alexustas ASET, Ultimate Shuttle IVA, and has variants of the ASET props where a couple of MFD's are swapped out for the super new swanky MAS versions.

Also for that OPT JHT cockpit, @vulkans kOS scripts are available via dropbox, see his YouTube videos. The link is the second Dropbox link he posted in answer to a comment there. 

 

Edited by 610yesnolovely
kOSPropMonitor does work with RPM and MAS
Link to comment
Share on other sites

On 1/21/2022 at 9:06 PM, Sesshaku said:

Finally, in the Apollo IVA, it would be cool to have the "earth ball" mapy thing using a real world map for RSS saves.

theres actually been an Earth map, circulated awhile back for that. IIRC, its just a matter of replacing the texture in the proper folder.
I *just* came across  the texture on my HDD yesterday, coincidentally.
I'm not home right now... I'll see if i can  dig it up... or at   least a link from the person who "released" it

Link to comment
Share on other sites

On 3/2/2022 at 9:21 PM, Stone Blue said:

theres actually been an Earth map, circulated awhile back for that. IIRC, its just a matter of replacing the texture in the proper folder.
I *just* came across  the texture on my HDD yesterday, coincidentally.
I'm not home right now... I'll see if i can  dig it up... or at   least a link from the person who "released" it

That would be an awesome addon to the Apollo IVA for RO users.
I really wish I knew programming, I would love to collaborate on making IVAs, sadly I am only a parasite.

Vulkan is some sort of genius, he has AMAZING ivas on his youtube channell, sadly he never publishes them, or at least I never seem to find them.

Link to comment
Share on other sites

6 hours ago, Stone Blue said:

Found the source of the map i have...
@slaintemaith supplied it, with instructions, in this post:
 

 

Lol, can't believe it was THAT simple, I tought there some crazy algorithms and 3D models involved.

Thanks a lot for this tip, already changed it, gotta try it.

 

Edit: Works perfectly fine. Now returning to this mod. A great mechjeb integration would be having a way of using SMART A.S.S from IVA, since that one is way more useful than SAS for orbiting and landing on RO.

Edited by Sesshaku
Link to comment
Share on other sites

On 3/5/2022 at 3:53 PM, Sesshaku said:

Lol, can't believe it was THAT simple, I tought there some crazy algorithms and 3D models involved.

Thanks a lot for this tip, already changed it, gotta try it.

 

Edit: Works perfectly fine. Now returning to this mod. A great mechjeb integration would be having a way of using SMART A.S.S from IVA, since that one is way more useful than SAS for orbiting and landing on RO.

Just started using some mixed RPM/MAS-ified pods (Mk2 via Reviva) and noticed that in the ALCOR40x20 MFD, as mentioned in earlier posts, that the MechJeb integration seems to be broken in v1.12.1. @MOARdVsaid at the time likely due to the MJ api changing. I'm seeing the Ascent Guidance shows "MechJeb Error" status led, and doesn't work at all, and the MNVR page can set up but not execute nodes (MechJeb light is out). 

Tempted to have a go at looking at the code and figuring out stuff and perhaps a GitHub pull request if I ever get to figuring it out. I'd also love to get MJ versions of SAS in one of the MFDs, and take a look at the IFMS versions. Support for things like Atmosphere Autopilot and TCA would be marvellous, plus a good Science action/storage pages. One can dream, but in my case, I might (over many months) tinker and see if I can get anywhere. No promises.

Took a quick look re MJ, there's an exception in the logs:

[ERR 21:53:47.320] [AvionicsSystems] MJ static ctor exception System.NotImplementedException: mjFuelFlowSimulationStats_t
  at AvionicsSystems.MASIMechJeb..cctor () [0x004f2] in <0bf90ae8ff9d477c823199001f706a26>:0 

The code in MASIMechJeb.cs means this exception will not enable MJ support - all the previous type lookups worked, and this one is looking for MuMech.FuelFlowSimulation.Stats, but that got renamed from Stats to FuelStats. about 9 months ago, I think in 2.12.3 - possibly looking for either would fix that. Oh, also "deltaV" changed to "DeltaV" (the only field used), so that would also need to look for both.

Tested it, seems to fix the issue. Pull request sent on GitHub: https://github.com/MOARdV/AvionicsSystems/pull/344

(If anyone wants this, clone my fork and build with Visual Studio Community Edition)

 

Edited by 610yesnolovely
Link to comment
Share on other sites

23 hours ago, 610yesnolovely said:

Tested it, seems to fix the issue. Pull request sent on GitHub: https://github.com/MOARdV/AvionicsSystems/pull/344

Thank you for finding and fixing this.  I'll try to get a release out this weekend to include this fix and mark MAS compatible with 1.12.x

If anyone knows of any other bugs, I'd appreciate a GitHub issue, or at least documenting it here in the forum.  I don't know when I'll be able to return to KSP - I've got some major stuff happening IRL, and the ASET prop conversion task has really killed my enthusiasm for modding.

Link to comment
Share on other sites

You're welcome. A release of MAS would be fantastic. I havn't seen many issues, though I'm only just getting into using IVA cockpits in my play through again (after not playing KSP for a year or two).

The only issues I'm finding was the MechJeb integration sometimes seems to get confused, and I've not managed to work out or reproduce issues, one example was a transfer to a vehicle 10km lower orbit, using the Alcor MAS MFD (not IFMS) it put the mnvr node 4 days in the past, but MechJeb direct put it 2 days in the future.

Sorry to hear there's some IRL and reduced enthusiasm - totally get that, as a long time senior gamedev, burnout is real.  Also, having read through a lot of the work in AvionicsSystem, it is an immense and fantastic achievement, so thank you so much for all that work.

Edited by 610yesnolovely
Link to comment
Share on other sites

I decided to see if I could eventually learn how to create or tweak IVAs.
So I have all installed, Unity Editor, KSP Tools, etc.
I decided to load one of the already made IVAs to see if I can start by watching how it's done and start with a small addon or tweak.

Here's the issue. When I load the MAS Apollo CM interior, the capsule itself loads just fine, but the IVA props do not. I found that they are there, but I think there's something wrong with the scale-positioning of them.
Now, I know they work in game, so clearly there's something odd on my unity editor setup, but I can't figure out what. I see a lot of props have extremely high numbers for scale, but changing that doesn't seem to work either. Any tips on how to properly load an already made CFG iva?

Link to comment
Share on other sites

On 3/10/2022 at 6:39 PM, MOARdV said:

If anyone knows of any other bugs, I'd appreciate a GitHub issue, or at least documenting it here in the forum.

There is an issue with multimode engines: after switching mode they no longer count as active engines, fc.CurrentThrustkN(), fc.CurrentThrust(), engine.CurrentFuelFlow  and engine.CurrentThrustkN return 0 for these engines while they are in another mode. (it's a list of functions I've tested, possibly other engine-related functions behave similarly) . By  "another mode" I mean not in the mode that was selected when the vessel was loaded. Reloading vessel after switching mode make MAS calculate engine stats for mode 2 correctly but ignore them for mode 1. Looks like the module MultiModeEngine makes one of 2 ModuleEnginesFX modules of a multimode engine unrecognizable for MAS.

Link to comment
Share on other sites

I made a further investigation of what happens with multimode engines after switching mode. MAS treats them as if they were shut down and allows to activate them once again so both ModuleEngineFX of a single engine are active at the same time and the engine can run in both modes simultaneously.

There is an error in MAS_swRotary_4pos_AltitudeWarning config:

fc.SetPersistentClamped("ALCOR_ALT_WARN_INPUT", -100, 0, 300) should be fc.AddPersistentClamped

And I have a small request. There used to be a variable HOTTESTPARTNAME in RPM that I used in my prop called Explodoscope. And now I'm missing it in MAS.

@MOARdV, @vulkans thank you for all your hard work converting hundreds of props to MAS. It took me about a week of testing to convert a dozen of props that I created for RPM, so I guess how much time it took to do this with hundreds of props and all MFD pages.

Link to comment
Share on other sites

  • 3 weeks later...
On 3/11/2022 at 7:25 PM, Sesshaku said:

I decided to see if I could eventually learn how to create or tweak IVAs.
So I have all installed, Unity Editor, KSP Tools, etc.
I decided to load one of the already made IVAs to see if I can start by watching how it's done and start with a small addon or tweak.

Here's the issue. When I load the MAS Apollo CM interior, the capsule itself loads just fine, but the IVA props do not. I found that they are there, but I think there's something wrong with the scale-positioning of them.
Now, I know they work in game, so clearly there's something odd on my unity editor setup, but I can't figure out what. I see a lot of props have extremely high numbers for scale, but changing that doesn't seem to work either. Any tips on how to properly load an already made CFG iva?

Found the issue, it turns out Unity has a conflict between languages, more precisely with "commas" and "points" when separating decimals, causing that all props were out of scale and position.

Now that is fixed, I finally managed to start learning by tweaking some preexisting IVAs. Couple of questions:

1º: Is there a way to have a "search" option in KSP Tools, the amount of props is quite a lot, it would be nice to have a search function. I understand KSP tools has nothing to do with this mod, I just ask because maybe there's a way of doing that, and I am missing it.

2º: I remember the Alcor IVA had the option to turn cabin lights out, and play in some sort of "night mode". I want to add that feature to one of the IVAs, I found the "adjust light" prop, but I am guessing there is a need for a specific MAS module to be used as light source. The IVA has a fixed directional light that doesn't interact with the prop.

3º: There are a lot of parts I've never seen used, I'll have fun exploring them. I am glad to see there are "Horizontal Vel + and -" options, which reminds me that the only thing truly missing from IVA is a way of integrating SMARTASS with IVA, more precisely to have the option of adjusting pitch from inside the IVA (without KOS)

Link to comment
Share on other sites

11 hours ago, xD-FireStriker said:

I'm using the Ultimate Shuttle IVA and the CRT props don't seem to be working. I would love to fix this for personal use but im not sure why its not working. Heres my log file hoping it will help out.
https://www.dropbox.com/s/5hgfasv8g3dpgva/KSP.log?dl=0

Ah yes, the old CRT definitely don't work, lots of exceptions/problems with it in the logs. There's two different IVA in that pack, the other does work. As part of Reviva (linked below, you may like to use it if not already for IVA switching), supports the one that works, but I couldn't easily get this CRT version to work. All you need to do is install Reviva and unpack UltimateShuttle in the normal place, Reviva uses B9PartSwitch and ModuleManager magic to allow you to switch IVA - UltimateShuttle is supported, but only the modern version (which works okay).

I think it was built for an older version of MAS and no longer works due to changes (total guess). I've yet to have time to work out exactly why. If I (or somebody smarter) does, the other reason for Reviva is to provide ModuleManager patches to get IVA mods to work again (without modifying them directly).

 

Edited by 610yesnolovely
Link to comment
Share on other sites

38 minutes ago, 610yesnolovely said:

....the other reason for Reviva is to provide ModuleManager patches to get IVA mods to work again (without modifying them directly).

another HUGE plus, is that it saves *TONS* of time, having to wait & reload the game, as well as having to edit MM patches to switch between IVAs while troubleshooting.. ;)

THAT, alone, is just about worth it :D

Link to comment
Share on other sites

1 hour ago, 610yesnolovely said:

Ah yes, the old CRT definitely don't work, lots of exceptions/problems with it in the logs. There's two different IVA in that pack, the other does work. As part of Reviva (linked below, you may like to use it if not already for IVA switching), supports the one that works, but I couldn't easily get this CRT version to work. All you need to do is install Reviva and unpack UltimateShuttle in the normal place, Reviva uses B9PartSwitch and ModuleManager magic to allow you to switch IVA - UltimateShuttle is supported, but only the modern version (which works okay).

I think it was built for an older version of MAS and no longer works due to changes (total guess). I've yet to have time to work out exactly why. If I (or somebody smarter) does, the other reason for Reviva is to provide ModuleManager patches to get IVA mods to work again (without modifying them directly).

 

I made a copy of the mk3 cockpit that uses the glass cockpit but I was hoping to get the crts working. It’s sad its basically broken for good 

Link to comment
Share on other sites

23 hours ago, xD-FireStriker said:

I made a copy of the mk3 cockpit that uses the glass cockpit but I was hoping to get the crts working. It’s sad its basically broken for good 

Try removing  GameData/MOARdV/Patches/JsiToMasUpgrade.cfg - save it  somewhere outside KSP in case you need it again. That will likely resolve the issue, and Reviva won't fix that particular issue. Basically the old CRTs have to have the JSI props, and the JsiToMasUpgrade forcibly removes and replaces them with the MAS equivalents. Removing the upgrade file from MAS leaves those JSI items in place, and as long as RPM is also installed, those props should again work as expected.   EDIT - nevermind, this is a different issue entirely. I didn't realize that Ultimate Shuttle has custom MAS CRTs.

Edited by panarchist
these are not the droids you're looking for
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...