Back to Index Page generated: May 8, 2024, 6:16:03 AM

Expansion Scourge of the Black Baron

Content

Warnings

  1. Information URL mismatch between OXP Manifest and Expansion Manager string length at character position 0

Manifest

from Expansion Manager's OXP list from Expansion Manifest
Description Scourge of the Black Baron mission in Galaxy 1 Scourge of the Black Baron mission in Galaxy 1
Identifier oolite.oxp.Rxke.BlackBaron oolite.oxp.Rxke.BlackBaron
Title Scourge of the Black Baron Scourge of the Black Baron
Category Missions Missions
Author Rxke Rxke
Version 2.0 2.0
Tags
Required Oolite Version
Maximum Oolite Version
Required Expansions
Optional Expansions
Conflict Expansions
Information URL n/a
Download URL https://wiki.alioth.net/img_auth.php/5/54/BlackBaron.oxz n/a
License CC-BY-NC-SA 3.0 CC-BY-NC-SA 3.0
File Size n/a
Upload date 1610873301

Documentation

Also read http://wiki.alioth.net/index.php/Scourge%20of%20the%20Black%20Baron

black_baron_readme.txt

Black Baron oxp

Written by Rxke, compatible with Oolite v1.76 and above. (Fingers crossed)

A sequel to the Long Way Around mission, featuring combat and transport missions. Well suited to a relative novice. Commanders with less than a competent rating need not apply, though!

Somewhere near the centre of Galaxy 1, a group of exiles dream of returning to their home planet...


Install:

Copy black_baron.oxp to Oolite's AddOns folder.

Uninstall:

Remove black_baron.oxp from Oolite's AddOns folder.


Changelog:

v 2.0
- Added some cleanup code.
- Updated ship model to Griff-based version.
- Converted XML-based plist files to OpenStep format.

v 1.76.1
bugfix thanks to richard.a.p.smith  jun 2012

v. 1.74
Thargoid - 22nd July 2010

- Updated JS for v1.74 (No longer works with lower versions of Oolite - for that use v. 1.70).
- Corrected bug that if mission is accepted in G1 then player goes into G2 (or beyond), the next stages could still trigger.
- Gave a yes/no choice for first mission offering.
- Updated mission text to be flexible if systems used in the OXP are renamed by other OXPs.

v. 1.70
Kaks - 24 March 2008

- corrected it, now starts only if Long Way Around has been completed.
- works even if LWA has been removed from AddOns(after completing it).
- restored ambush code.
- rearranged texture from three files to one.
- minor tidy up, more distinctive names for descriptions and ship data.
- converted to js script for Oolite 1.70+.


Previous versions:

The first OXP not made by Aegidian!
No readme found. Latest file changes made on 29 April 2006 by Rxke. 

Equipment

This expansion declares no equipment. This may be related to warnings.

Ships

Name
Black Baron Minion

Models

This expansion declares no models. This may be related to warnings.

Scripts

Path
Config/script.js
"use strict";
this.name           = "blackbaron";
this.author         = "Thargoid, Kaks, Rxke, phkb";
this.copyright      = "Creative Commons: attribution, non-commercial, sharealike.";
this.description    = "The Black Baron Mission - original plist script by Rxke, js script by Kaks";
this.licence        = "CC BY-NC-SA 3.0";

// Script update for 1.74 - will not work with any lower version

this.startUp = function() {
	if (missionVariables.blackbaron=='MISSION_COMPLETE') {
		delete this.missionScreenOpportunity;
		delete this.shipWillExitWitchspace;
		delete this.playerEnteredNewGalaxy;
		delete this.startUp;
		return;
	}
	if(!missionVariables.blackbaron) missionVariables.blackbaron='OFFER';
}
	

this.addMinions = function() {
	if (player.ship.isInSpace === false) {
		this.timer.stop();
		return;
	}
	this.minionCounter++;
	if(system.shipsWithRole('rxke_blackbaron_minion').length < 7 && Math.random() < 0.5) system.addShips('rxke_blackbaron_minion', 1);
	if(this.minionCounter >= (system.ID==222 ? 9 :6)) this.timer.stop();
}

// mission offers --------------------------------------------------------

this.missionScreenOpportunity = function ()	{	
	if (player.ship.docked && player.ship.dockedStation.isMainStation && galaxyNumber==0) {
		if (missionVariables.longwayround=='MISSION_COMPLETE'
			&& missionVariables.blackbaron == 'OFFER'
			&& system.ID==243
			&& player.score>150) {
			mission.runScreen({screenID:"blackbaron", title:"Black Baron", messageKey: "rxke_blackbaron_briefing1", choicesKey: "rxke_blackbaron_choices"}, this.choice);
			return;
		}
				
		switch(missionVariables.blackbaron) {
			case 'STAGE1': {
				if (system.ID==93 && galaxyNumber==0){
					mission.runScreen({screenID:"blackbaron", title:"Black Baron", messageKey: "rxke_blackbaron_briefing2"});
					mission.setInstructionsKey("rxke_blackbaron_short1"); 
					player.credits+=1000;
					player.consoleMessage("You have been awarded 1000cr.");
					missionVariables.blackbaron='STAGE2';
				}
				break;
			}
			case 'STAGE2': {
				if (system.ID==180 && galaxyNumber==0){
					mission.runScreen({screenID:"blackbaron", title:"Black Baron", messageKey: "rxke_blackbaron_briefing3"});
					player.credits+=5000;
					player.consoleMessage("You have been awarded 5000cr.");
					missionVariables.blackbaron='MISSION_COMPLETE';
					mission.setInstructionsKey(null);
					delete this.missionScreenOpportunity;
					delete this.shipWillExitWitchspace;
					delete this.playerEnteredNewGalaxy;
				}	
				break;
			}
		}
	}
}

this.choice = function(choice) {
	switch(choice) {
		case "rxke_blackbaron_choiceAccept": {
			mission.setInstructionsKey("rxke_blackbaron_short2"); 
			missionVariables.blackbaron='STAGE1';
			break;
		}
		case "rxke_blackbaron_choiceReject": {
			missionVariables.blackbaron='MISSION_COMPLETE';
			mission.setInstructionsKey(null);
			break;
		}
	}
}

//    events  ---------------------------------------------------------------

this.shipWillExitWitchspace = function() {
	if (missionVariables.blackbaron=='STAGE2' && galaxyNumber == 0) {
		if (system.ID==180)
			system.addShips('rxke_blackbaron_minion', 7);
		else if (system.ID==222 || system.ID==48) {
			this.minionCounter=0;
			this.timer=new Timer(this, this.addMinions,2,8);
		}
	}
}

this.playerEnteredNewGalaxy = function(galaxyNumber) {
    if(galaxyNumber == 1 && (missionVariables.blackbaron=='STAGE1' || missionVariables.blackbaron=='STAGE2')) {
		mission.setInstructionsKey(null);
		missionVariables.blackbaron='MISSION_COMPLETE';
		delete this.missionScreenOpportunity;
		delete this.shipWillExitWitchspace;
		delete this.playerEnteredNewGalaxy;
	}
}