Tutorial 3 RPM Modules - MOARdV/AvionicsSystems GitHub Wiki

This page will show suggested configurations for some of the better-known RasterPropMonitor bridge modules. An RPM bridge module is a module that is included with a mod that allows the mod to display on an RPM MFD. In RasterPropMonitor, RPM added the bridge module to the prop when RPM initialized in the Flight scene. MAS does not do that, so the prop config author will need to account for that, as shown below.

Note that this page is not comprehensive - there may be mods out there that I don't know about, or mods I have not installed.

Routing button clicks to the bridge modules is a little more complex than it was in RasterPropMonitor, but it is also drastically more flexible and configurable. In the examples below, I assume each of the soft keys (up, down, left, right, enter, escape, home, next, and previous) set a particular persistent variable when they're clicked, and they clear that persistent variable to -1 when released. We have to clear the variable to a special value, because repeatedly clicking on the same button otherwise will not register as multiple clicks in the mod.

All of these configurations are intended for the ALCORMFD40x20 prop, configured with a screen size of 512 x 512, and a text font size of 16 x 32. Note that RasterPropMonitor used a 640 x 640 screen size, but 640 x 640 render texture sizes are inefficient, since they are not a power-of-2 in each dimension.

Note: If you run into problems with these configurations, please let me know. There could be errors, or bugs in MAS that cropped up since they were initially posted.

DPAI

NavyFish's Docking Port Alignment Indicator provides alignment information for docking vessels in orbit. It also allows the pilot to change reference parts and select ports on the target vessel during flight.

You can use fc.AssemblyLoaded("DPAI_RPM") to determine if DPAI_RPM bridge module is installed in the game.

Module Manager Patch

Add DPAI_RPM to the prop:

@PROP[(Your MFD Prop name here)]:NEEDS[DPAI_RPM]:NEEDS[AvionicsSystems]
{
	MODULE
	{
		name = DPAI_RPM
		buttonUp = 0
		buttonDown = 1
		buttonEnter = 2
		buttonEsc = 3
		buttonHome = 4
		buttonRight = 5
		buttonLeft = 6
		buttonNext = 7
		buttonPrev = 8
	}
}

MASMonitor Nodes

RPM_MODULE
{
	name = Legacy DPAI display

	moduleName = DPAI_RPM

	renderMethod = DrawDPAI
	buttonClickMethod = ButtonProcessor
	pageActiveMethod = pageActiveMethod

	buttonMapping = 0, fc.GetPersistentAsNumber("%AUTOID%-RpmCode") == 0
	buttonMapping = 1, fc.GetPersistentAsNumber("%AUTOID%-RpmCode") == 1
	buttonMapping = 2, fc.GetPersistentAsNumber("%AUTOID%-RpmCode") == 2
	buttonMapping = 3, fc.GetPersistentAsNumber("%AUTOID%-RpmCode") == 3
	buttonMapping = 4, fc.GetPersistentAsNumber("%AUTOID%-RpmCode") == 4
	buttonMapping = 5, fc.GetPersistentAsNumber("%AUTOID%-RpmCode") == 5
	buttonMapping = 6, fc.GetPersistentAsNumber("%AUTOID%-RpmCode") == 6
	buttonMapping = 7, fc.GetPersistentAsNumber("%AUTOID%-RpmCode") == 7

	position = 0, 0
	size = 512, 512
}

TEXT
{
	name = DPAI Text

	textmethod = DPAI_RPM:getPageText
	// getPageText is hard-coded to assume default RPM 640x640 displays,
	// so we have to shrink the text a little bit here.
	fontSize = 12, 25
	textColor = 255, 255, 255, 255

	variable = fc.AssemblyLoaded("DPAI_RPM")
}

Engine Ignitor

(Not tested / configured - it's not clear if there's a current version of this mod)

SCANsat

DMagic's SCANsat maps worlds, recording altitude, biome, and anomaly information. When used in conjunction with MAS, it can be used to display a map on an MFD display.

You can use fc.AssemblyLoaded("JSISCANsatRPM") to determine if the JSISCANsatRPM bridge module is installed in the game.

Module Manager Patch

Add JSISCANsatRPM to the prop:

@PROP[(Your MFD Prop name here)]:NEEDS[SCANsat]:NEEDS[AvionicsSystems]
{
	MODULE
	{
		name = JSISCANsatRPM
		buttonUp = 0
		buttonDown = 1
		buttonEnter = 2
		buttonEsc = 3
		buttonHome = 4
		buttonRight = 5
		buttonLeft = 6
		buttonR9 = 7
		buttonR10 = 8
		mapDivider = 2
		resourceInterpolation = 4
		zoomModifier = 2.0
		iconPixelSize = 16
		iconShadowShift = 2,2
		scaleBarPosition = 16,144
		scaleBar = ASET/ASET_Props/MFDs/scalebar
		scaleLabels = ASET/ASET_Props/MFDs/scaleLabels
	}
}

MASMonitor Nodes

RPM_MODULE
{
	name = Legacy SCANsat display

	moduleName = JSISCANsatRPM

	renderMethod = MapRenderer
	buttonClickMethod = ButtonProcessor
	pageActiveMethod = PageActive

	texture = ASET/ASET_Props/MFDs/ScreenPlates/noscansat

	buttonMapping = 0, fc.GetPersistentAsNumber("%AUTOID%-RpmCode") == 0
	buttonMapping = 1, fc.GetPersistentAsNumber("%AUTOID%-RpmCode") == 1
	buttonMapping = 2, fc.GetPersistentAsNumber("%AUTOID%-RpmCode") == 2
	buttonMapping = 3, fc.GetPersistentAsNumber("%AUTOID%-RpmCode") == 3
	buttonMapping = 4, fc.GetPersistentAsNumber("%AUTOID%-RpmCode") == 4
	buttonMapping = 5, fc.GetPersistentAsNumber("%AUTOID%-RpmCode") == 5
	buttonMapping = 6, fc.GetPersistentAsNumber("%AUTOID%-RpmCode") == 6
	buttonMapping = 7, fc.GetPersistentAsNumber("%AUTOID%-RpmCode") == 7

	position = 0, 0
	size = 512, 512
}

VesselView

(Not tested / configured)