Back to Index | Page generated: Nov 12, 2024, 11:02:04 PM |
from Expansion Manager's OXP list | from Expansion Manifest | |
---|---|---|
Description | Adds 9 individual ship's cats for purchase. | Adds 9 individual ship's cats for purchase. |
Identifier | oolite.oxp.superbatprime.Ship's_Cat | oolite.oxp.superbatprime.Ship's_Cat |
Title | Ship's Cat | Ship's Cat |
Category | Ambience | Ambience |
Author | superbatprime | superbatprime |
Version | 1.1.0 | 1.1.0 |
Tags | ||
Required Oolite Version | ||
Maximum Oolite Version | ||
Required Expansions | ||
Optional Expansions | ||
Conflict Expansions | ||
Information URL | http://aegidian.org/bb/viewtopic.php?f=4&t=13034 | n/a |
Download URL | https://wiki.alioth.net/img_auth.php/8/84/Ships_cat_alpha_1.1.0.oxz | test.com.au |
License | CC-BY-NC-SA 3.0 | CC-BY-NC-SA 3.0 |
File Size | n/a | |
Upload date | 1610873351 |
Also read http://wiki.alioth.net/index.php/Ship's%20Cat
Ship's Cat WiP OXP 1.0.1 This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nc-sa/3.0/ or send a letter to Creative Commons, 444 Castro Street, Suite 900, Mountain View, California, 94041, USA. Features. -Adds various ship's cats for purchase. -Includes some famous SciFi ship's cats and some real life ship's cats. -Shipboard animals can be purchased at any system station. -Some are picky about who they fly with. -They're not all cats. This OXP is a work in progress. Please feel free to improve and expand the functionality of this OXP, more cats can be added, it still demands several obvious features beyond my ability. Proposed Features. -Cat's purr/mew during long flights / either as console messages or (preferably) sounds -Cat's react to alert levels / attacks -Interaction between multiple pets onboard (play/fight/?) -Cat's might have special abilities (sometimes identify criminals/bounty hunters by hissing/become uneasy when pirates are around (shortly out of sight) ) This might be hard to balance -Influence the flight controls when playing/in panic/... -Eating food? -Pictures!
Name | Visible | Cost [deci-credits] | Tech-Level |
---|---|---|---|
Ship's Cat: Jones | yes | 1000 | 100+ |
Ship's Cat: Spot | yes | 1000 | 100+ |
Ship's Cat: Sparks | yes | 2000 | 100+ |
Ship's Cat: Lucifer | yes | 1000 | 100+ |
Ship's Cat: Stray | yes | 0 | 100+ |
Ship's Cat: The Captain | yes | 1000 | 100+ |
Ship's Cat: Smivs | yes | 1000 | 100+ |
Ship's Cat: Tiddles | yes | 1000 | 100+ |
Ship's Dog: Peasbody | yes | 1000 | 100+ |
Path | |
---|---|
Config/script.js | "use strict"; this.name = "whichcat"; this.author = "Commander McLane, Superbat Prime, v4hn"; this.copyright = "CC-by-nc-sa 3.0"; this.description = "script for making various ships cats available for purchase"; this.version = "1.1"; // probability that a cat is available in a station // keep in mind that even if a cat is available, // it might not be available to _you_ because of the cat's preferences this._catProbability = 0.3; // So the average cat will die the ninth time it's shot :-) this._catDiesProbability = 0.11; this._countCats= function() { var i= 0; while(EquipmentInfo.infoForKey("EQ_SHIPS_CAT_" + (i+1).toString())) ++i; this._number_of_cats= i; } // count cats once when loading the oxp this._countCats() // load/save currently available cat this.startUp= function() { this._cat= missionVariables.whichcat_cat; if(!this._cat || this._cat <= 0 || this._cat > this._number_of_cats){ this._drawRandomCat() } } this.playerWillSaveGame= function() { missionVariables.whichcat_cat= this._cat; } this._drawRandomCat= function() { var choice= Math.ceil(Math.random() * (this._number_of_cats / this._catProbability) ); // either a valid cat or none(i.e. _number_of_cats+1) this._cat= Math.min( choice, this._number_of_cats+1 ); // make this._cat available and disable all others var i= 1; var catit; while( catit= EquipmentInfo.infoForKey("EQ_SHIPS_CAT_" + i.toString()) ){ if( i == this._cat ) catit.effectiveTechLevel= 0; else catit.effectiveTechLevel= null; ++i; } } // whenever the player docks, a new cat might become available this.shipDockedWithStation= function(station) { this._drawRandomCat(); } this.equipmentDamaged= function(equipment) { if(typeof equipment === "string"){ equipment= EquipmentInfo.infoForKey(equipment) } if( equipment.equipmentKey.indexOf("EQ_SHIPS_CAT_") != 0 ){ return; } if(player.ship.equipmentStatus(equipment) !== "EQUIPMENT_UNAVAILABLE" && player.ship.equipmentStatus(equipment) !== "EQUIPMENT_DAMAGED"){ return; } if( Math.random() < this._catDiesProbability ){ player.ship.removeEquipment(equipment); // remove "Ship's Cat/Dog: " prefix var cats_name= equipment.name.substr(equipment.name.indexOf(":")+1).trim(); player.consoleMessage(cats_name + " has been killed!"); } } |