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

Expansion Start Advice

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 A smoother start for the game. Popup an info screen for new Commanders with many advices, for example to buy Injectors first. Also offer a mini mission to teach how to deliver a package. A smoother start for the game. Popup an info screen for new Commanders with many advices, for example to buy Injectors first. Also offer a mini mission to teach how to deliver a package.
Identifier oolite.oxp.spara.start_advice oolite.oxp.spara.start_advice
Title Start Advice Start Advice
Category Ambience Ambience
Author spara spara
Version 0.3 0.3
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/3/3c/Start_advice_0.3.oxz n/a
License CC-BY-NC-SA 4.0 CC-BY-NC-SA 4.0
File Size n/a
Upload date 1610873277

Documentation

Also read http://wiki.alioth.net/index.php/Start%20Advice

Equipment

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

Ships

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

Models

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

Scripts

Path
Config/script.js
"use strict";

this.author      = "spara"; 
this.description = "Give some advice when starting the game"; 
this.name        = "start_advice";

this.startUpComplete = function() {
	if (clock.seconds > 180058018404) {
		delete this.missionScreenOpportunity;
	}
}

this.missionScreenOpportunity= function() {
	
	if (!missionVariables.start_advice) {
		this._showStartAdvice();
		missionVariables.startAdvice = true;
	}
	delete this.missionScreenOpportunity;
}

this._showStartAdvice = function() {
	player.ship.hudHidden = true;
	mission.runScreen({
		screenID: "start_advice",
		titleKey: "start_advice_title",
		messageKey: "start_advice_message",
		model: "[cobra3-player]",
		choicesKey: "start_advice_options"
	},
	function (choice) {
		player.ship.hudHidden = false;
		if (choice === "1_YES") this._addPackage();
	})
}

this._addPackage = function() {
		var content = expandDescription("[parcel-description-safe]");
		var sender = randomName() +" "+ randomName();
		var text = sender + "'s " + content;
		player.ship.addParcel(text, 7, 129, clock.seconds + 2 * 24 * 3600, 15, 0, 0);
}