Back to Index | Page generated: Nov 12, 2024, 11:02:03 PM |
from Expansion Manager's OXP list | from Expansion Manifest | |
---|---|---|
Description | This OXP make the Thruspace Hyperdrive (or Witch Space Drive) into an equipment item that can be damaged in combat. | This OXP make the Thruspace Hyperdrive (or Witch Space Drive) into an equipment item that can be damaged in combat. |
Identifier | oolite.oxp.CaptMurphy.BreakableWitchDrive | oolite.oxp.CaptMurphy.BreakableWitchDrive |
Title | Breakable Witch Drive | Breakable Witch Drive |
Category | Equipment | Equipment |
Author | Capt Murphy | Capt Murphy |
Version | 1.3.2 | 1.3.2 |
Tags | Equipment | Equipment |
Required Oolite Version | ||
Maximum Oolite Version | ||
Required Expansions | ||
Optional Expansions | ||
Conflict Expansions | ||
Information URL | http://wiki.alioth.net/index.php/Breakable_%27Standard%27_Equipment_OXPs | n/a |
Download URL | https://wiki.alioth.net/img_auth.php/d/d3/Oolite.oxp.CaptMurphy.BreakableWitchDrive.oxz | n/a |
License | CC BY-NC-SA 3.0 | CC BY-NC-SA 3.0 |
File Size | n/a | |
Upload date | 1610873479 |
Also read http://wiki.alioth.net/index.php/Breakable%20Witch%20Drive
{\rtf1\ansi\deff3\adeflang1025 {\fonttbl{\f0\froman\fprq2\fcharset0 Times New Roman;}{\f1\froman\fprq2\fcharset2 Symbol;}{\f2\fswiss\fprq2\fcharset0 Arial;}{\f3\froman\fprq2\fcharset0 Times New Roman;}{\f4\froman\fprq0\fcharset1 Arial;}{\f5\froman\fprq0\fcharset1 Times New Roman;}{\f6\fswiss\fprq0\fcharset1 Arial;}{\f7\fnil\fprq2\fcharset0 WenQuanYi Zen Hei;}{\f8\fnil\fprq2\fcharset0 Arial;}{\f9\fnil\fprq0\fcharset1 Arial;}{\f10\fswiss\fprq0\fcharset1 FreeSans;}{\f11\fnil\fprq0\fcharset1 FreeSans;}} {\colortbl;\red0\green0\blue0;\red0\green0\blue128;\red128\green128\blue128;} {\stylesheet{\s0\snext0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\kerning1\dbch\af8\langfe2052\dbch\af11\afs24\alang1081\cf0\loch\f5\fs24\lang2057 Normal;} {\*\cs15\snext15 Default Paragraph Font;} {\*\cs16\snext16\cf2\ul\ulc1\langfe255\alang255\lang255 Internet Link;} {\s17\sbasedon0\snext18\ql\nowidctlpar\sb240\sa120\keepn\ltrpar\kerning1\dbch\af7\langfe2052\dbch\af11\afs28\alang1081\loch\f6\fs28\lang2057 Heading;} {\s18\sbasedon0\snext18\ql\nowidctlpar\sb0\sa120\ltrpar\kerning1\dbch\af8\langfe2052\dbch\af11\afs24\alang1081\loch\f5\fs24\lang2057 Text Body;} {\s19\sbasedon18\snext19\ql\nowidctlpar\sb0\sa120\ltrpar\kerning1\dbch\af8\langfe2052\dbch\af10\afs24\alang1081\loch\f5\fs24\lang2057 List;} {\s20\sbasedon0\snext20\ql\nowidctlpar\sb120\sa120\noline\ltrpar\i\kerning1\dbch\af8\langfe2052\dbch\af10\afs24\alang1081\ai\loch\f5\fs24\lang2057 Caption;} {\s21\sbasedon0\snext21\ql\nowidctlpar\noline\ltrpar\kerning1\dbch\af8\langfe2052\dbch\af10\afs24\alang1081\loch\f5\fs24\lang2057 Index;} }{\info{\creatim\yr2012\mo6\dy30\hr8\min41}{\revtim\yr2012\mo6\dy30\hr8\min47}{\printim\yr0\mo0\dy0\hr0\min0}{\comment LibreOffice}{\vern67175426}}\deftab720 \viewscale100 {\*\pgdsctbl {\pgdsc0\pgdscuse451\pgwsxn12240\pghsxn15840\marglsxn1440\margrsxn1440\margtsxn1440\margbsxn1440\pgdscnxt0 Default Style;}} \formshade{\*\pgdscno0}\paperh15840\paperw12240\margl1440\margr1440\margt1440\margb1440\sectd\sbknone\sectunlocked1\pgndec\pgwsxn12240\pghsxn15840\marglsxn1440\margrsxn1440\margtsxn1440\margbsxn1440\ftnbj\ftnstart1\ftnrstcont\ftnnar\aenddoc\aftnrstcont\aftnstart1\aftnnrlc \pgndec\pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\kerning1\dbch\af8\langfe2052\dbch\af11\afs24\alang1081\cf0\loch\f5\fs24\lang2057\ql\faauto\li0\ri0\lin0\rin0\fi0{\langfe2057\dbch\af9\afs20\alang1025\rtlch \ltrch\loch\fs20\loch\f4 Breakable Witch Drive 1.3.1 (01/02/14)} \par \pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\kerning1\dbch\af8\langfe2052\dbch\af11\afs24\alang1081\cf0\loch\f5\fs24\lang2057\ql\faauto\li0\ri0\lin0\rin0\fi0{\langfe2057\dbch\af9\afs20\alang1025\rtlch \ltrch\loch\fs20\loch\f4 By Capt Murphy 2011} \par \pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\kerning1\dbch\af8\langfe2052\dbch\af11\afs24\alang1081\cf0\loch\f5\fs24\lang2057\ql\faauto\li0\ri0\lin0\rin0\fi0{\langfe2057\dbch\af9\afs20\alang1025\rtlch \ltrch\loch\fs20\loch\f4 Licence: CC BY-NC-SA 3.0 : Please visit }{{\field{\*\fldinst HYPERLINK "http://creativecommons.org/licenses/by-nc-sa/3.0/" }\cf2\ul\ulc1\langfe255\dbch\af9\afs20\alang255{\fldrslt \cf2\ul\ulc1\langfe255\alang255\lang255\rtlch \ltrch\loch\fs20\loch\f4 http://creativecommons.org/licenses/by-nc-sa/3.0/}{\rtlch \ltrch\loch }} for more info.} \par \pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\kerning1\dbch\af8\langfe2052\dbch\af11\afs24\alang1081\cf0\loch\f5\fs24\lang2057\ql\faauto\li0\ri0\lin0\rin0\fi0{\langfe2057\dbch\af9\afs20\alang1025\rtlch \ltrch\loch\fs20\loch\f4 Requires Oolite 1.77.1} \par \pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\kerning1\dbch\af8\langfe2052\dbch\af11\afs24\alang1081\cf0\loch\f5\fs24\lang2057\ql\faauto\li0\ri0\lin0\rin0\fi0\langfe2057\dbch\af9\afs20\alang1025\rtlch \ltrch\loch\fs20\loch\f4 \par \pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\kerning1\dbch\af8\langfe2052\dbch\af11\afs24\alang1081\cf0\loch\f5\fs24\lang2057\ql\faauto\li0\ri0\lin0\rin0\fi0{\langfe2057\dbch\af9\afs20\alang1025\rtlch \ltrch\loch\fs20\loch\f4 Overview: } \par \pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\kerning1\dbch\af8\langfe2052\dbch\af11\afs24\alang1081\cf0\loch\f5\fs24\lang2057\ql\faauto\li0\ri0\lin0\rin0\fi0\langfe2057\dbch\af9\afs20\alang1025\rtlch \ltrch\loch\fs20\loch\f4 \par \pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\kerning1\dbch\af8\langfe2052\dbch\af11\afs24\alang1081\cf0\loch\f5\fs24\lang2057\ql\faauto\li0\ri0\lin0\rin0\fi0{\langfe2057\dbch\af9\afs20\alang1025\rtlch \ltrch\loch\fs20\loch\f4 An OXP intended for the experienced Commander who wishes to make their Oolife a little more difficult. This OXP make the Thruspace Hyperdrive (or Witch Space Drive) into an equipment item that can be damaged in combat. If damaged players can still attempt to make Witch Space jumps but there are vastly increased chances of fuel leakage, total jump failure or misjump. Repairs can be conducted at a station of any tech level and given the ubiquitous of this technology are relatively cheap at 300 credits. The equipment can also be repaired by OXP repair technology such as Thargoid\u8217\'19s Repair Bots.} \par \pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\kerning1\dbch\af8\langfe2052\dbch\af11\afs24\alang1081\cf0\loch\f5\fs24\lang2057\ql\faauto\li0\ri0\lin0\rin0\fi0\langfe2057\dbch\af9\afs20\alang1025\rtlch \ltrch\loch\fs20\loch\f4 \par \pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\kerning1\dbch\af8\langfe2052\dbch\af11\afs24\alang1081\cf0\loch\f5\fs24\lang2057\ql\faauto\li0\ri0\lin0\rin0\fi0{\langfe2057\dbch\af9\afs20\alang1025\rtlch \ltrch\loch\fs20\loch\f4 Technical:} \par \pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\kerning1\dbch\af8\langfe2052\dbch\af11\afs24\alang1081\cf0\loch\f5\fs24\lang2057\ql\faauto\li0\ri0\lin0\rin0\fi0\langfe2057\dbch\af9\afs20\alang1025\rtlch \ltrch\loch\fs20\loch\f4 \par \pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\kerning1\dbch\af8\langfe2052\dbch\af11\afs24\alang1081\cf0\loch\f5\fs24\lang2057\ql\faauto\li0\ri0\lin0\rin0\fi0{\langfe2057\dbch\af9\afs20\alang1025\rtlch \ltrch\loch\fs20\loch\f4 This OXP creates a new equipment item, the \u8220\'1cThruspace HyperDrive\u8221\'1d which is listed on the equipment manifest and can be damaged in combat. It is automatically fitted to the current ship on first run, and it is also automatically fitted when the player purchases a new ship. } \par \pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\kerning1\dbch\af8\langfe2052\dbch\af11\afs24\alang1081\cf0\loch\f5\fs24\lang2057\ql\faauto\li0\ri0\lin0\rin0\fi0\langfe2057\dbch\af9\afs20\alang1025\rtlch \ltrch\loch\fs20\loch\f4 \par \pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\kerning1\dbch\af8\langfe2052\dbch\af11\afs24\alang1081\cf0\loch\f5\fs24\lang2057\ql\faauto\li0\ri0\lin0\rin0\fi0{\langfe2057\dbch\af9\afs20\alang1025\rtlch \ltrch\loch\fs20\loch\f4 Changelog:} \par \pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\kerning1\dbch\af8\langfe2052\dbch\af11\afs24\alang1081\cf0\loch\f5\fs24\lang2057\ql\faauto\li0\ri0\lin0\rin0\fi0\langfe2057\dbch\af9\afs20\alang1025\rtlch \ltrch\loch\fs20\loch\f4 \par \pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\kerning1\dbch\af8\langfe2052\dbch\af11\afs24\alang1081\cf0\loch\f5\fs24\lang2057\ql\faauto\li0\ri0\lin0\rin0\fi0{\langfe2057\dbch\af9\afs20\alang1025\rtlch \ltrch\loch\fs20\loch\f4 Version 1 Initial release.} \par \pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\kerning1\dbch\af8\langfe2052\dbch\af11\afs24\alang1081\cf0\loch\f5\fs24\lang2057\ql\faauto\li0\ri0\lin0\rin0\fi0{\langfe2057\dbch\af9\afs20\alang1025\rtlch \ltrch\loch\fs20\loch\f4 Version 1.1 20/7/11 - Minor tweak to prevent equipment being installed in the event the player is flying or purchases a non-hyperspace capable ship.} \par \pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\kerning1\dbch\af8\langfe2052\dbch\af11\afs24\alang1081\cf0\loch\f5\fs24\lang2057\ql\faauto\li0\ri0\lin0\rin0\fi0{\langfe2057\dbch\af9\afs20\alang1025\rtlch \ltrch\loch\fs20\loch\f4 Version 1.2 05/5/12 - Minor update for compatibility with Ship_Storage_Helper.oxp} \par \pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\kerning1\dbch\af8\langfe2052\dbch\af11\afs24\alang1081\cf0\loch\f5\fs24\lang2057\ql\faauto\li0\ri0\lin0\rin0\fi0{{\*\bkmkstart __DdeLink__43_1951616894}\langfe2057\dbch\af9\afs20\alang1025\rtlch \ltrch\loch\fs20\loch\f4 Version 1.3.30/6/12}{{\*\bkmkend __DdeLink__43_1951616894}\langfe2057\dbch\af9\afs20\alang1025\rtlch \ltrch\loch\fs20\loch\f4 \u8211\'13 Added extra checks to stop timer showing warning message if a jump countdown with a damaged drive is aborted via escape capsule launch or docking.} \par \pard\plain \s0\ql\nowidctlpar\ltrpar{\*\hyphen2\hyphlead2\hyphtrail2\hyphmax0}\kerning1\dbch\af8\langfe2052\dbch\af11\afs24\alang1081\cf0\loch\f5\fs24\lang2057\ql\faauto\li0\ri0\lin0\rin0\fi0{\langfe2057\dbch\af9\afs20\alang1025\rtlch \ltrch\loch\fs20\loch\f4 Version 1.3.1 1/2/14 \u8211\'13 Prevented the equipment from being offered when player ship has no hyperspace capabilities -spara-} \par }
Name | Visible | Cost [deci-credits] | Tech-Level |
---|---|---|---|
Thruspace HyperDrive | yes | 6000 | 1+ |
Name |
---|
Malfunction...Malfunction |
Path | |
---|---|
Scripts/.directory | [Dolphin] Timestamp=2016,5,17,22,16,3 Version=3 ViewMode=1 |
Scripts/Breakable_WitchDrive.js | "use strict" this.name = "Breakable_WitchDrive"; this.author = "capt murphy"; this.copyright = "2011 capt murphy"; this.licence = "CC BY-NC-SA 3.0"; // see http://creativecommons.org/licenses/by-nc-sa/3.0/ for more info. this.description = "Script to simulate combat damage to the Witch Space Drive."; this.version = "1.3.2"; // event handler driven function for functions at startup - awards equipment to existing ship if first run with OXP. this.startUp = function() { this.bwd_warning = new SoundSource; this.bwd_warning.sound = "warning.ogg"; this.bwd_setmisjump = false; if (!missionVariables.bwd_status) { missionVariables.bwd_status = "OK"; } this.bwd_status = missionVariables.bwd_status; if (!(Ship.shipDataForKey(player.ship.dataKey)["hyperspace_motor"] === "no") && player.ship.equipmentStatus("EQ_BREAKABLE_WITCHDRIVE") != "EQUIPMENT_OK" && this.bwd_status == "OK") { player.ship.awardEquipment("EQ_BREAKABLE_WITCHDRIVE"); } } // event handler driven function to fit equipment to newly purchased ship. this.playerBoughtNewShip = function() { if (!Ship.shipDataForKey(player.ship.dataKey)["hyperspace_motor"] === "no") { player.ship.awardEquipment("EQ_BREAKABLE_WITCHDRIVE"); } this.bwd_status = "OK"; } // event handler driven function to control actions if equipment damaged in combat. this.equipmentDamaged = this.equipmentDestroyed = function(equipment) { if (this.shipRestore && equipment === "EQ_BREAKABLE_WITCHDRIVE") {this.bwd_status = "DAMAGED"; return;} if (equipment == "EQ_BREAKABLE_WITCHDRIVE") { this.bwd_status = "DAMAGED"; player.consoleMessage("Thruspace HyperDrive Damaged!",3); this.bwd_setupTimer(); if (Math.random() < 0.34) { player.ship.fuelLeakRate = 0.25; player.consoleMessage("Quirium Fuel Leakage Detected!",3); } } } // event handler driven function for actions on save game. this.playerWillSaveGame = function() { missionVariables.bwd_status = this.bwd_status; } // event handler driven function to check if drive is damaged on start of witch space countdown. this.playerStartedJumpCountdown = function(type) { if (type == "standard" && this.bwd_status == "DAMAGED" && player.ship.equipmentStatus("EQ_BREAKABLE_WITCHDRIVE") != "EQUIPMENT_OK") { if (!this.bwd_consolemessageTimer) { this.bwd_consolemessageTimer = new Timer(this, this.bwd_consoleMessage, 1,1); } else { this.bwd_consolemessageTimer.start(); } this.bwd_warning.play(3); if (Math.random() < 0.34) { system.addShips("bwd_dummy_entity", 1, player.ship.position); } if (Math.random() < 0.34) { if (player.ship.scriptedMisjump == false) { player.ship.scriptedMisjump = true; this.bwd_setmisjump = true; } } } } // called by timer during jump count down if drive is damaged. this.bwd_consoleMessage = function() { if (!player.ship.isValid || player.ship.docked){this.bwd_cancelconsolemessageTimer();return} player.consoleMessage("Warning - Thruspace HyperDrive is Damaged. Jump Outcome Unpredictable!",1); } // event handler driven function for actions on launching. this.shipLaunchedFromStation = this.shipExitedWitchspace = function() { if (player.ship.equipmentStatus("EQ_BREAKABLE_WITCHDRIVE") == "EQUIPMENT_OK" && this.bwd_status != "OK") { this.bwd_status = "OK"; player.ship.fuelLeakRate = 0; player.ship.scriptedMisjump = false; this.bwd_deleteTimer(); return; } if (this.bwd_status != "OK") { this.bwd_setupTimer(); if (Math.random() < 0.34) { player.ship.fuelLeakRate = 0.25; player.consoleMessage("Quirium Fuel Leakage Detected!",3); } } this.bwd_reset(); } // creates timers if not already in existance otherwise restarts existing timers. this.bwd_setupTimer = function() { if (!this.bwd_updateTimer) { this.bwd_updateTimer = new Timer(this, this.bwd_equipmentcheck, 0, 2); } else { this.bwd_updateTimer.start(); } } this.bwd_deleteTimer = function() { if (this.bwd_updateTimer && this.bwd_updateTimer.isRunning) { this.bwd_updateTimer.stop(); delete this.bwd_updateTimer; } } // called by timer every 2 seconds when player is in flight to check if equipment repaired on fly. this.bwd_equipmentcheck = function() { if (player.ship.equipmentStatus("EQ_BREAKABLE_WITCHDRIVE") == "EQUIPMENT_OK" && this.bwd_status != "OK") // check to see if something has repaired the witch drive on the fly e.g. Thargoid's Repair Bots OXP. { this.bwd_status = "OK"; player.ship.fuelLeakRate = 0; this.bwd_deleteTimer(); this.bwd_cancelconsolemessageTimer(); this.bwd_reset(); } } // removes scriptedMisjump flag and dummy entity if present. this.bwd_reset = function () { if (this.bwd_setmisjump == true) { player.ship.scriptedMisjump = false; this.bwd_setmisjump = false; } function bwd_finddummy(entity) { return (entity.primaryRole == "bwd_dummy_entity"); } var targets = system.filteredEntities(this, bwd_finddummy); if (targets.length > 0) { let counter = 0; for (counter = 0; counter < targets.length;counter++) { targets[counter].remove(true); } } } // event handler driven function to stop Timers on player's death or on docking. this.shipDied = this.shipWillDockWithStation = function() { this.bwd_deleteTimer(); } // stops console message timer, and calls reset function. this.playerCancelledJumpCountdown = this.playerJumpFailed = this.shipLaunchedEscapePod = function() { this.bwd_cancelconsolemessageTimer(); this.bwd_reset(); } this.shipWillEnterWitchspace = this.bwd_cancelconsolemessageTimer = function() { if (this.bwd_consolemessageTimer && this.bwd_consolemessageTimer.isRunning) { this.bwd_consolemessageTimer.stop(); delete this.bwd_consolemessageTimer; } } this.allowAwardEquipment = function(eqKey, ship, context) { if (context === "purchase" && eqKey === "EQ_BREAKABLE_WITCHDRIVE" && Ship.shipDataForKey(player.ship.dataKey)["hyperspace_motor"] === "no") { return false; } else if (context === "purchase" && eqKey === "EQ_BREAKABLE_WITCHDRIVE") { if (player.ship.equipmentStatus("EQ_BREAKABLE_WITCHDRIVE") === "EQUIPMENT_DAMAGED") return true; else return false; } return true; } |
Scripts/bwd_dummy_entity.js | this.name = "ecl_escape_pod_beacon"; this.author = "capt murphy"; this.copyright = "2011 capt murphy"; this.licence = "CC BY-NC-SA 3.0"; // see http://creativecommons.org/licenses/by-nc-sa/3.0/ for more info. this.description = "Shipscript for escape pod beacons."; this.version = "1.1"; this.shipSpawned = function() { var targets = system.shipsWithPrimaryRole("escape-capsule",this.ship,50); if (targets.length > 0) { this.ship.target = targets[0]; this.ecl_beaconcontrolTimer = new Timer (this, this.ecl_beaconcontrol,0,0.25); } else { this.ship.remove(); } } this.ecl_beaconcontrol = function() { if (this.ship.target) { this.ship.position = this.ship.target.position.add(this.ship.target.vectorUp.multiply(50)); } } this.shipTargetLost = function() { this.ship.remove(); } this.shipRemoved = this.entityDestroyed = function() { if (this.ecl_beaconcontrolTimer && this.ecl_beaconcontrolTimer.isRunning) { this.ecl_beaconcontrolTimer.stop(); delete this.ecl_beaconcontrolTimer; } } |