Jump to content

DOF TableOverrideSettings (affect outputs per-table)


rambo3

Recommended Posts

DOF just got support for custom table output overrides through the <TableOverrideSettings>. Individual outputs can be globally adjusted (contactors disabled for instance), per-rom, per-table, or using wildcards (afm* for all versions of Attack from Mars). Lights or contactors can be reduced or shut off completely, overriding your configtool export settings.

As always; backup your entire DirectOutputFramework - directory before toying with this ! I take no responsibility for issues, fire, damages, psychosis, insomnia etc.
https://github.com/rambo3/DirectOutput/tree/ultimateio/DirectOutput/Builds

Swisslizard: huge thanks for putting the project on GitHub. My cab would be dead without it.

Introduction
Kiwi wondered if it would be possible to turn off certain toys based on tables. No, but that's actually a great idea. So here we go!

Setup
Add the following to your Cabinet.xml, say just before </Cabinet> at the end of your XML, and start adjusting / removing. The example below globally turns off left and right flipper contactors. For Bad Cats turns off my overcab light, and reduces the undercab light to 50%.

<TableOverrideSettings>
	<TableOverrideSetting>
		<Name>Globally disable left and right contactors</Name>
		<Enabled>true</Enabled>
		<Roms>*</Roms>
		<Tables>*</Tables>
		<TableOverrideSettingDeviceList>
			<TableOverrideSettingDevice>
				<Name>Ultimate I/O contactors</Name>
				<ConfigPostfixID>27</ConfigPostfixID>
				<Outputs>49,52</Outputs>
				<OutputPercent>0</OutputPercent>
			</TableOverrideSettingDevice>
		</TableOverrideSettingDeviceList>
	</TableOverrideSetting>
	<TableOverrideSetting>
		<Name>Bad Cats, disable or reduce undercab light</Name>
		<Description>Disables or reduces output percent on specific outputs for specific tables</Description>
		<Enabled>true</Enabled>
		<Roms>bcats*</Roms>
		<TableOverrideSettingDeviceList>
			<TableOverrideSettingDevice>
				<Name>Philips Hue projector overcab</Name>
				<ConfigPostfixID>70</ConfigPostfixID>
				<Outputs>7,8,9</Outputs>
				<OutputPercent>0</OutputPercent>
			</TableOverrideSettingDevice>
			<TableOverrideSettingDevice>
				<Name>Philips Hue undercab</Name>
				<ConfigPostfixID>70</ConfigPostfixID>
				<Outputs>10,11,12</Outputs>
				<OutputPercent>50</OutputPercent>
			</TableOverrideSettingDevice>
		</TableOverrideSettingDeviceList>
	</TableOverrideSetting>
</TableOverrideSettings>

Settings
<TableOverrideSetting> is a mode containing a descriptive name, enabled state, comma seperated ROMs, and / or comma seperated Tables. Wildcards are supported. A single * specifies global.
<Roms> specify list of ROMs without spacing, for instance: <Roms>afm*,bcats*</Roms>
<Tables> specify table filenames without extension and spacing before commas, for instance: <Tables>AttackFromMars_FS_B2S,Bad Cats.VPX.v1.0</Tables>
No commas in filenames, and no spacing before seperator. If there are commas in filename, use first part and add a wildcard / * at the end (AttackFromMars*). Filename are case-insensitive.
<TableOverrideSettingDeviceList> contains all the devices you want to affect.
<TableOverrideSettingDevice> is a single device, its outputs (according to configtool) to affect, and the output strength in percent 0-100. 0 is off. To let DOF know which device you want to control, match the ConfigPostfixID with your configtool ini file, for instance directoutputconfig27.ini with 27 being the postfixid.

Debugging
Check your DirectOutput.log file for details if nothing works. You should see something like:

...
2017.06.06 20.45.30.157	Debug: Setting up shape effect for area. L: 91, T: 0, W: 9, H: 30
2017.06.06 20.45.30.157	Table config loading finished: romname=afm, tablename=Attack from Marsvp91x
2017.06.06 20.45.30.157	TableOverrideSettings.activateOverrides... activeSetting[Globally disable left and right contactors]=True
2017.06.06 20.45.30.157	TableOverrideSettings.activateOverrides... activeSetting[Attack from Mars, disable flippers]=True
2017.06.06 20.45.30.157	TableOverrideSettings.activateOverrides... activeSetting[Bad Cats, disable or reduce undercab light]=False
2017.06.06 20.45.30.157	Pinball parts loaded
...

Device support
Currently Ultimate I/O, Teensy, and Philips Hue are fully supported. PacLed64, PacDrive have the support added in, but since I don't have those devices I can't confirm that they actually work. SainSmart USB have the support added in, but not fully testet yet. LedWiz is planned, but not sure how to add it in yet and will need to be confirmed by someone else since I don't have the thing.

Fun thing
Outputs can be individually affected, for instance I accidentally applied 0 OutputPercent in Bad Cats to one or two (can't remember) of the three undercab channel outputs causing a yellowish bright green instead of orange.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
  • Create New...