Back to Index | Page generated: Nov 12, 2024, 11:02:04 PM |
from Expansion Manager's OXP list | from Expansion Manifest | |
---|---|---|
Description | Makes additional police ships patrol between planet-sun and sun-witchpoint. Nowadays there are some without this addon also but more with this. | Makes additional police ships patrol between planet-sun and sun-witchpoint. Nowadays there are some without this addon also but more with this. |
Identifier | oolite.oxp.Commander_McLane.Total_patrol | oolite.oxp.Commander_McLane.Total_patrol |
Title | Total patrol | Total patrol |
Category | Mechanics | Mechanics |
Author | Commander McLane | Commander McLane |
Version | 1.4 | 1.4 |
Tags | ||
Required Oolite Version | ||
Maximum Oolite Version | ||
Required Expansions | ||
Optional Expansions | ||
Conflict Expansions | ||
Information URL | http://wiki.alioth.net/index.php/Total_patrol_OXP | n/a |
Download URL | https://wiki.alioth.net/img_auth.php/e/e7/Total_patrol_1.4.oxz | n/a |
License | CC BY-NC-SA 3.0 | CC BY-NC-SA 3.0 |
File Size | n/a | |
Upload date | 1610873502 |
Also read http://wiki.alioth.net/index.php/Total%20patrol
{\rtf1\ansi\ansicpg1252\cocoartf1038\cocoasubrtf350 \readonlydoc1{\fonttbl\f0\fswiss\fcharset0 Helvetica;} {\colortbl;\red255\green255\blue255;} \paperw11905\paperh16837\margl1440\margr1440\vieww12720\viewh8880\viewkind0 \pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\qc\pardirnatural \f0\b\fs26 \cf0 \ul \ulc0 total_patrol v 1.4 \b0 \ulnone \ \ by "Commander McLane"\ \ \ an Expansion Pack for Oolite by Giles Williams\ \ based on "Elite" by Ian Bell and David Braben\ \pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\ql\qnatural\pardirnatural \cf0 \ \ \ul Overview\ulnone \ \ This OXP replaces the AIs of police ships with a new AI that lets them patrol all main routes in a system. It also adds additional police, in order to compensate for the much bigger area that has to be covered by the patrols.\ \ \ul Notable Features\ulnone \ \ In the unaltered game police (and hunters) only patrol between planet and witchpoint, disregarding the other two main routes in the system, between witchpoint and sun, and between sun and planet. Even police that is added by script on one of these alternative routes, will abandon them in favour of the witchpoint-planet route.\ \ This OXP changes the built-in police behaviour by replacing the default police AI (route1patrolAI) with the new totalPatrolAI, which covers all three main routes, and gives the possibility for police ships to either turn around and fly back, or switch to another route at each of the turning points. They still favour the traditional witchpoint-planet route, however, because it is usually most populated by traders and most prone to pirate attacks. Note that this OXP affects all ships with primary role 'police', including police added by other OXPs.\ \ The OXP also adds additional police on the other two routes between witchpoint and sun, and between sun and planet. The additional police also gets totalPatrolAI. Each ship will then travel in either direction on its current route, and possibly switch to another route at the end-point. The number of added police forces depends on the system government; Corporate States get most additional police, Anarchies get none.\ \ All police ships also get a Heat Shield, enabling them to extend their patrols to the sun routes without getting themselves into danger.\ \ The way police are doing their business, hunting down criminals and protecting the innocent, is not affected by this OXP. So, if you are a law-abiding trader, the Ooniverse will become a safer place. However, if you are a brigand and have specialised on sun-skimmers as your victims, your business will become more dangerous.\ \ \ul Minimum Requirements\ulnone \ \ Total_patrol.oxp since v 1.3 uses a new way of identifying the police ships in a system, in order to switch their AI. This was introduced with Oolite 1.74, therefore it requires at least this version of Oolite. I recommend you upgrade to the latest version of Oolite.\ \ \ul Download Location\ulnone \ \ This OXP is available for download via the {\field{\*\fldinst{HYPERLINK "http://wiki.alioth.net/index.php/Total_patrol_OXP"}}{\fldrslt Elite Wiki}}.\ \ \ul Installation\ulnone \ \ Move or copy the file total_patrol.oxp from this folder to the AddOns folder inside the Oolite main folder. Restart Oolite.\ \ \ul Acknowledgements\ulnone \ \ Thanks to Eric Walch who\'97as always\'97generously helped with some scripting details. He is also constantly revising route1patrolAI, which serves as the basis for the totalPatrolAI of this OXP. And thanks to all the Oolite coders who are continuously working to make OXPs like this possible.\ \ \ul License\ulnone \ \ This work is licensed under the Creative\'a0Commons Attribution-NonCommercial-ShareAlike License version 3.0. For more information see the ReadMe of Oolite or the {\field{\*\fldinst{HYPERLINK "http://creativecommons.org/licenses/by-nc-sa/3.0/"}}{\fldrslt Creative Commons' website}}.\ \ Practically this means that you may rip it apart and use whatever seems useful to you, as long as you credit the original author. It would be nice\'97although by no means necessary\'97to give me a note, if you intend to use parts of it.\ \ \ul History\ulnone \ \ version 1.4 (March 1st, 2011)\ - put self-defined script functions in their own namespace\ - raised heat shielding a little\ - AI adjusted according to Oolite 1.75 route1patrolAI\ - but still requires only Oolite 1.74\ \ version 1.3 (November 14th, 2010)\ - removed the max_version key in requires.plist\ - the AI switch is now handled by the shipSpawned event handler, and will therefore reliably catch all police ships, whenever spawned\ - AI adjusted according to the current post-Oolite 1.74 trunk route1patrolAI\ - requires now Oolite 1.74\ \ version 1.2 (September 2nd, 2009)\ - made it Oolite 1.73 compliant\ - therefore requires now Oolite 1.73\ \ version 1.1 (December 30th, 2008)\ - added correct initialisation if a new commander is started\ \ version 1.0 (November 27th, 2008)\ - fully functional version\ - requires Oolite 1.72\ }
Path | |
---|---|
Config/script.js | /* script.js Script for total_patrol.oxp. Oolite Copyright © 2004-2011 Giles C Williams and contributors This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. total_patrol.oxp Copyright © 2011 "Commander McLane" This work is licensed under the Creative Commons Attribution-Noncommercial-Share Alike 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, 171 Second Street, Suite 300, San Francisco, California, 94105, USA. */ this.name = "total_patrol"; this.description = "Script for switching all police ships to totalPatrolAI and adding a couple of police in systems."; this.author = "Commander McLane"; this.copyright = "© 2011 Commander McLane"; this.license = "CC-by-nc-sa 3.0"; this.version = "1.3"; /* functions */ this.$spawnExtraPolice = function() { if(!this.extraPoliceSpawned) { for(var i = 0; i < system.government; i+=2) { log("Total_patrol", "Adding additional police."); var newPolice = system.addShipsToRoute("police", 1, 0.1 + (Math.random() * 0.7), "ws"); newPolice[0].switchAI("totalPatrolAI.plist"); newPolice[0].AIState = "ENTRY_W_S"; newPolice[0].heatInsulation = 4; newPolice = system.addShipsToRoute("police", 1, 0.1 + (Math.random() * 0.7), "ps"); newPolice[0].switchAI("totalPatrolAI.plist"); newPolice[0].AIState = "ENTRY_P_S"; newPolice[0].heatInsulation = 4; } this.extraPoliceSpawned = true; } } this.$switchPoliceAI = function(ship) { if(ship.primaryRole === "police" && (ship.AI === "route1patrolAI.plist" || ship.AI === "route2patrolAI.plist")) { ship.switchAI("totalPatrolAI.plist"); ship.AIState = "ENTRY_P_W"; ship.heatInsulation = 4; } } /* event handlers */ this.shipExitedWitchspace = this.shipLaunchedFromStation = function() { if(system.isInterstellarSpace) return; this.$spawnExtraPolice(); } this.shipSpawned = function(ship) { if(system.isInterstellarSpace) return; this.$switchPoliceAI(ship); } this.shipWillEnterWitchspace = this.startUp = function() { delete this.extraPoliceSpawned; } |