Screenbackgrounds.plist

From Elite Wiki

Examples

Vanilla game code

The .plist in the Vanilla game code looks like this:

{
	short_range_chart	= "oolite-short-range-chart.png";
	long_range_chart	= "oolite-long-range-chart.png";
	system_data_nova	= "oolite-nova-system.png";
	
/*	// This section is commented out, and not used by standard Oolite.
	// Use the following settings to add custom images to Oolite's screens

	intro				= "intro.png";				// background for the ships at game start
	shiplibrary			= "shiplibrary.png";		// background for the ship library screen
	keyboardsettings	= "keyboardsettings.png";	// background for the keyboard settings display
	newgame				= "newgame.png";			// background for the new game (scenario select) screen
	status				= "status.png";
	status_docked		= "status-docked.png";		// if not defined, same as status
	status_in_flight	= "status-in-flight.png"; 	// if not defined, same as status
	status_red_alert	= "status-red-alert.png"; 	// if not defined, same as status
	report				= "report.png";				// if not defined, same as status_docked
	
	manifest			= "manifest.png";
	equip_ship			= "equip-ship.png";
	mount_weapon		= "mount-weapon.png";		// if not defined, same as equip_ship
	shipyard			= "shipyard.png";  

	interfaces    = "interfaces.png";
	
	long_range_chart1	= "long-range-chart1.png"; 	// if not defined, same as long_range_chart
	long_range_chart2	= "long-range-chart2.png";	// if not defined, same as long_range_chart
	long_range_chart3	= "long-range-chart3.png";	// if not defined, same as long_range_chart
	long_range_chart4	= "long-range-chart4.png";	// if not defined, same as long_range_chart
	long_range_chart5	= "long-range-chart5.png";	// if not defined, same as long_range_chart
	long_range_chart6	= "long-range-chart6.png";	// if not defined, same as long_range_chart
	long_range_chart7	= "long-range-chart7.png";	// if not defined, same as long_range_chart
	long_range_chart8	= "long-range-chart8.png";	// if not defined, same as long_range_chart  

 short_range_chart_mission = "short-range-chart-mission.png"; // if not defined, same as short_range_chart
 custom_chart_mission      = "custom-chart-mission.png";     // if not defined, same as short_range_chart_mission and then short_range_chart
 long_range_chart_mission  = "long-range-chart-mission.png"; // if not defined, same as long_range_chart
 long_range_chart1_mission = "long-range-chart-mission.png"; // if not defined, same as long_range_chart_mission and then long_range_chart1
 long_range_chart2_mission = "long-range-chart-mission.png"; // if not defined, same as long_range_chart_mission and then long_range_chart2
 long_range_chart3_mission = "long-range-chart-mission.png"; // if not defined, same as long_range_chart_mission and then long_range_chart3
 long_range_chart4_mission = "long-range-chart-mission.png"; // if not defined, same as long_range_chart_mission and then long_range_chart4
 long_range_chart5_mission = "long-range-chart-mission.png"; // if not defined, same as long_range_chart_mission and then long_range_chart5
 long_range_chart6_mission = "long-range-chart-mission.png"; // if not defined, same as long_range_chart_mission and then long_range_chart6
 long_range_chart7_mission = "long-range-chart-mission.png"; // if not defined, same as long_range_chart_mission and then long_range_chart7
 long_range_chart8_mission = "long-range-chart-mission.png"; // if not defined, same as long_range_chart_mission and then long_range_chart8

	
	system_data			= "system-data.png";
	
	market				= "market.png";
	marketinfo			= "marketinfo.png";
	
	settings			= "settings.png";			// game options / settings
	load_save			= "load-save.png";			// load / save game screens
	
	mission				= "mission.png";			// default mission background, overridden by mission's background parameter.
	
	// Use overlays to add extra info / graphic elements to the screen.
	
	mission_overlay_with_title	= "mission-overlay1.png";	// generic mission overlay, used when there is a mission tile. Overridden by mission's overlay parameter.
	mission_overlay_no_title	= "mission-overlay2.png";	// overlay used when mission title is a blank string. Overridden by mission's overlay parameter.
	
	overlay						= "overlay.png";			// in-flight overlay
	docked_overlay				= "docked-overlay.png";
	paused_overlay				= "paused-overlay.png";		// in-flight and paused
	paused_docked_overlay		= "paused-docked-overlay.png";
	newgame_overlay				= "newgame_overlay.png";
	overwrite_overlay			= "overwrite-overlay.png";	// overlay used in the 'overwrite saved game?' screen 

*/
}

BGS

{
// Stick manager is missing - GUI_SCREEN_STICKMAPPER and GUI_SCREEN_STICKPROFILE
	paused_docked_overlay	= "bgs_ov_paused.png"; // Problem, overwrites existing, won't get reset
	paused_overlay			= "bgs_ov_paused.png"; // Problem, overwrites existing, won't get reset
	intro					= "bgs_intro.png"; // no JS
	keyboardsettings		= "bgs_fullscr.png"; // partly JS, no guiScreenChanged
	load_save				= "bgs_options.png"; // partly JS, no guiScreenChanged
	newgame					= "bgs_intro.png"; // no JS
	oxz-manager				= "bgs_fullscr.png"; // no JS
	settings				= "bgs_options.png"; // partly JS, no guiScreenChanged
	shiplibrary				= "bgs_fullscr.png"; // partly JS, no guiScreenChanged 

	// Still necessary. JS only via overlay!
	long_range_chart_mission = "lib_black.png";
	short_range_chart_mission = "lib_black.png";
}

Life in the Frontier

{
	// 262, 54 
	// 509x332

	station_anarchy = "litf_bg_anarchy.png";
	station_communist = "litf_bg_communist.png";
	station_confederacy = "litf_bg_confederacy.png";
	station_corporate = "litf_bg_corporate.png";
	station_democracy = "litf_bg_democracy.png";
	station_dictatorship = "litf_bg_dictatorship.png";
	station_feudal = "litf_bg_feudal.png";
	station_multigovernment = "litf_bg_multigovernment.png";
	station_hitech = "litf_bg_hitech.png";
	station_lowtech = "litf_bg_lowtech.png";
	station_agricultural = "litf_bg_agricultural.png";
	station_industrial = "litf_bg_industrial.png";
	
	station_tube1 = "litf_bg_tube1.png";
	station_tube2 = "litf_bg_tube2.png";
	station_maintenance = "litf_bg_maintenancearea.png";
	station_storage = "litf_bg_storagearea.png";
	station_mainconcourse1 = "litf_bg_mainconcourse1.png";
	station_mainconcourse2 = "litf_bg_mainconcourse2.png";
	station_hydroponics = "litf_bg_hpgardens.png";
	station_cargo = "litf_bg_cargoarea.png";
	station_entcorridor = "litf_bg_entcorridor.png";
	station_terminal = "litf_bg_terminal.png"; 

	station_corridor1 = "litf_bg_corridor1.png";
	station_corridor2 = "litf_bg_corridor2.png";
	station_corridor3 = "litf_bg_corridor3.png";
	station_corridor4 = "litf_bg_corridor4.png";
	station_corridor5 = "litf_bg_corridor5.png";
	station_corridor6 = "litf_bg_corridor6.png";
	station_corridor7 = "litf_bg_corridor7.png";
	station_corridor8 = "litf_bg_corridor8.png";
	station_corridor9 = "litf_bg_corridor9.png";
	station_corridor10 = "litf_bg_corridor10.png";
	station_corridor11 = "litf_bg_corridor11.png"; 

	station_medcenter = "litf_bg_medcenter.png";
	station_hangar = "litf_bg_hangar.png";
	station_localbar = "litf_bg_localbar.png";

	station_docks = "litf_bg_docks.png";
	
	station_map = "litf_bg_stationmap.png";
}

Ahruman's Comments (2011)

Screen backgrounds/overlays can now be scaled, allowing for more than 480 pixels vertically. Welcome to the 1990s!

This works by providing a dictionary/JS object instead of a string. The dictionary must have a “name” property, and may also have “width” and/or “height”; if only one dimension is specified, the texture is scaled proportionately. If neither is specified, they will default to the pixel dimensions of the image, which matches the old behaviour (unless your texture has a non-power-of-two size, in which case the behaviour now makes more sense).

The scaling works as follows: the Oolite display space is always 480 units high, while the width varies with the window’s aspect ratio. If the window is at a 4:3 aspect ratio, the width will be 640 units. If a background/overlay has dimensions specified as 640 by 480, it will fill up the screen.

The most common cases are likely to be:

   A higher-resolution version of your current background/overlay, with the same margins: use the dimensions of the old versions. For a full-screen backdrop, this will generally be width = 1024, height = 512 (or just height = 512).
   A proportionately scaled-up version of your current background/overlay with the margins trimmed: height = 480.
   An image scaled disproportionately to fit into a power-of-two aspect ratio (this is fiddly, but makes the best use of memory): the ideal dimensions of the image, scaled to a height of 480. For instance, for a 4:3 image, you’d use width = 640, height = 480. In this case, both dimensions must be specified.

I believe I’ve covered all the situations in which overlays can be specified, namely:

   screenbackgrounds.plist
   mission.runScreen()
   setScreenBackground() and setScreenOverlay()

In the JavaScript cases, passing null or "" will remove any existing overlay/background, overriding screenbackgrounds.plist.

Taken from BB "Progress" thread