Difference between revisions of "NPC-shields OXP"
(setting up the page) |
Cholmondely (talk | contribs) (Added Links & License information. Tweaks.) |
||
(5 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
== Introduction == | == Introduction == | ||
− | This OXP gives shields to NPCs, together with an optical effect if your hit their shields. (The optical effect requires 'full shaders' mode.) | + | This [[OXP]] gives shields to NPCs, together with an optical effect if your hit their shields. (The optical effect requires 'full shaders' mode.) |
== Overview == | == Overview == | ||
Line 16: | Line 16: | ||
=== Disabling shields (note to ship designers) === | === Disabling shields (note to ship designers) === | ||
− | |||
You can exclude any ship of yours from getting shields through this OXP. You can do this by using the script_info-key in shipdata.plist. Insert a value named npc_shields and set it to no. Now your ship won't get shields through this OXP. | You can exclude any ship of yours from getting shields through this OXP. You can do this by using the script_info-key in shipdata.plist. Insert a value named npc_shields and set it to no. Now your ship won't get shields through this OXP. | ||
Line 32: | Line 31: | ||
== Minimum Requirements == | == Minimum Requirements == | ||
+ | NPC-shields.oxp v 1.1 requires at least Oolite 1.75. | ||
+ | |||
+ | This OXP was written back in 2011-2 by Commander McLane. | ||
− | + | == License == | |
+ | This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License version 3.0. For more information see the ReadMe of Oolite or the 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—although by no means necessary—to give me a note, if you intend to use parts of it. | |
− | + | == Version History == | |
+ | *version 1.1 (January 5th, 2012) | ||
+ | :- derelict ships (after the pilot has ejected) now lose their capacity to recharge their shields | ||
+ | *version 1.0 (April 14th, 2011) | ||
+ | :- fixed bug with integration into existing ship scripts (bad monkeypatching) | ||
+ | :- shields can now be disabled for individual ships in their shipdata | ||
+ | *version 0.91 (March 28th, 2011) | ||
+ | :- shields now only discharge until they're 0 | ||
+ | :- shields are now recharged again | ||
+ | :- shield strength is now universally 128 | ||
+ | *version 0.9 (March 27th, 2011) | ||
+ | :- proof-of-concept version | ||
+ | :- requires Oolite 1.75 | ||
− | Installation | + | == Installation == |
+ | *NPC-shields.oxp v 1.1 is available for download [http://app.box.com/s/mjchxm2ppoomoatm75od via box.com]. | ||
+ | *Move or copy the file NPC-shields.oxp from its folder into your AddOns folder. Where that resides depends on your installation. Restart Oolite. | ||
− | + | == Links == | |
+ | *Author: [[User:Commander McLane|Commander McLane]] | ||
+ | *[[N-Shields]] is a 2020 improvement | ||
+ | *[[Custom Shields]] (2014) improves on this - and gives good ambient effects. | ||
− | + | {{Mechanics-OXP}} |
Latest revision as of 15:27, 15 November 2021
Contents
Introduction
This OXP gives shields to NPCs, together with an optical effect if your hit their shields. (The optical effect requires 'full shaders' mode.)
Overview
One difference between the player ship and NPCs in Oolite is that the player ship has shields as an extra layer of protection, while NPCs haven't. They rely on their energy only.
This OXP simulates shields for NPCs. Each ship will get a value for its shield strength when it is created, adding a layer of protection against damage, just like with the player ship. This makes it harder to kill NPCs, therefore this OXP has a direct impact on game play.
All ships get a shield strength of 128, just like player shields. The only difference being that the player ship has two separate front and aft shields, while NPCs only have one.
As long as there is still shield strength left, the ship won't sustain energy damage. Instead the shield strength will decrease until there is nothing left. When the shields are absorbing a hit, the ship will glow red. This optical effect only works with full shaders.
Shields are recharged from the energy banks, as long as the ship has full energy.
Disabling shields (note to ship designers)
You can exclude any ship of yours from getting shields through this OXP. You can do this by using the script_info-key in shipdata.plist. Insert a value named npc_shields and set it to no. Now your ship won't get shields through this OXP.
If you want to copy and paste, this is what it looks like in OpenStep:
"script_info" = { "npc_shields" = no; };
And this is what it looks like in XML:
<key>script_info</key> <dict> <key>npc_shields</key> <string>no</string> </dict>
Minimum Requirements
NPC-shields.oxp v 1.1 requires at least Oolite 1.75.
This OXP was written back in 2011-2 by Commander McLane.
License
This work is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike License version 3.0. For more information see the ReadMe of Oolite or the 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—although by no means necessary—to give me a note, if you intend to use parts of it.
Version History
- version 1.1 (January 5th, 2012)
- - derelict ships (after the pilot has ejected) now lose their capacity to recharge their shields
- version 1.0 (April 14th, 2011)
- - fixed bug with integration into existing ship scripts (bad monkeypatching)
- - shields can now be disabled for individual ships in their shipdata
- version 0.91 (March 28th, 2011)
- - shields now only discharge until they're 0
- - shields are now recharged again
- - shield strength is now universally 128
- version 0.9 (March 27th, 2011)
- - proof-of-concept version
- - requires Oolite 1.75
Installation
- NPC-shields.oxp v 1.1 is available for download via box.com.
- Move or copy the file NPC-shields.oxp from its folder into your AddOns folder. Where that resides depends on your installation. Restart Oolite.
Links
- Author: Commander McLane
- N-Shields is a 2020 improvement
- Custom Shields (2014) improves on this - and gives good ambient effects.