User:Allen Kerensky/Myriad Lite/Armor

= Myriad Lite Armor =

Armor Concepts
Armor is never a bad idea if you are in a place where combat is likely.

Unlike many game systems, armor does not make you harder to hit.

Armor deflects kinetic impact damage away from you (armor glancing) or absorbs some or all of the damage on a hit.

Some armor is static, just a simple object like a medieval shield or bulletproof vest.

In science-fiction, armor may be computerized or formed from an electronic field.

Myriad Lite calls armor that requires energy to run "power armor"

Example Armor (Myriad PDF p64, Myriad Special Edition p98)

Setting Up Myriad Lite Armor

 * 1) Create an object to represent a piece of armor, such as a bracelet or helmet.
 * 2) Drag and Drop the Myriad Lite Armor script from inventory into the attachment:
 * 3) (optional) Edit the script to adjust:
 * 4) (optional) Rating from 1-5
 * 5) (optional) Whether or not this is a piece of power armor
 * 6) (optional) How much battery life this armor has before recharging
 * 7) Attach the armor and adjust the position
 * 8) Detach the piece of armor back into inventory again to "save" the default attach point.
 * 9) Attach/wear the armor piece when desired.

NOTE: The Myriad Lite HUD should report the armor registering as a change in armor value.

Quickstart for Players

 * (required) Wear the Myriad Lite HUD.
 * (optional) Wear the hovertext meter
 * (optional) Wear armor, which you should see reported in your chat window.
 * (optional) Wear a holster
 * (optional) Wear a melee or ranged combat weapon

Commands
Myriad Lite accepts a variety of chat commands on channel 5.

/5 will activate that command.

Scripters can also send the same commands as a link message.

Custom HUDs can be constructed with buttons named each command, and the button will activate the command of the same name

Martial Combat: Armor
Armor commands are detailed below in context.

For non-powered armor, simply wear the item and you should see the armor value reported.

/5 checkarmor to see what your current armor value is

The following commands let you control power armor:
 * /5 armoron to activate power armor.
 * /5 armoroff to deactivate power armor and save the battery
 * /5 recharge to recharge a power armor battery

Module Armor Listen Messages
The following sections give an overview of the Listen Messages this module sends and receives.

All messages on ATTACHMENT channels should be sent as whispers since all attachments are within 10m of avatar.

General Myriad Lite Message Support

 * DEBUGOFF
 * Turn off Module Armor showing DEBUG messages - error messages are not blocked
 * DEBUGON
 * Turn on Module Armor showing DEBUG messages - can get spammy
 * REGISTERATTACHMENTS
 * Sent from HUD script to request attachment information
 * RESET
 * Resets Module Armor script - usually on request from restarting Myriad Lite script
 * VERSION
 * Sends a version message from script to the link message bus
 * Format: VERSION=###|VERSIONDATE=yyyymmdd|objectname
 * Example: VERSION=0.0.3|VERSIONDATE=20120826|Myriad Lite 0.1.11 20120826

Armor Specific Message Support

 * ARMORATTACH|integer ARMORRATING|integer ISPOWERARMOR?|integer ATTACHPOINT|string ARMORNAME
 * Armor attachment notifies the HUD Module that player has attached a new armor piece
 * integer ARMORRATING = 1 to 5 for the protection rating of the armor piece
 * integer ISPOWERARMOR = TRUE/1 if attachment represents a piece of a power armor suit
 * integer ATTACHPOINT = 1 to 30, 39, or 40 for inworld attachment points
 * string ARMORNAME = the armor items name for itself, passed from the attachment to the module
 * ARMORBATTERY
 * For player to check battery level of the armor
 * Make a HUD prim called ARMORBATTERY and touch it, or use /5 armorbattery command
 * ARMORCHECK
 * For player to check their current armor rating 1-5
 * Make a HUD prim called ARMORCHECK and touch it, or use /5 armorcheck command
 * ARMORDETACH|integer ARMORRATING|integer ISPOWERARMOR?|integer ATTACHPOINT|string ARMORNAME
 * Armor attachment notifies the HUD Module that player has detached a worn armor piece
 * integer ARMORRATING = 1 to 5 for the protection rating of the removed armor piece
 * integer ISPOWERARMOR = TRUE/1 if attachment represents a piece of a power armor suit
 * integer ATTACHPOINT = 1 to 30, 39, or 40 for inworld attachment points
 * string ARMORNAME = the armor items name for itself, passed from the attachment to the module
 * ARMOREFFECTHIT
 * When player is successfully hit with an attack, this message is sent to inworld attachment to trigger any special effect code the armor maker included
 * Example: Show particle blood spatter and play splat sound when armor is penetrated and player wounded
 * ARMOREFFECTBLOCKED
 * When player is hit, but armor blocked the damage, this message is sent to inworld attachment to trigger special effects the armor maker included
 * Example: show particle sparks from armor piece when it deflects a bullet and play armor/bullet ricochet sound
 * ARMOREFFECTOFF
 * Sent to inworld attachment when its time to shut off the special effects
 * Example: stop showing particle sparks or blood spatter and stop sound effect
 * ARMOROFF
 * Sent to inworld attachment to show that power armor has been deactivated or powered down
 * Example: animate power armor glow fading and turn off active armor glow effects and stop animated textures
 * ARMORON
 * Sent to inworld attachment to show that armor is activated or powered on
 * Example: animate power armor glow building up and turn on "active armor" glow effects and start animated textures
 * ARMORRECHARGE
 * Sent to inworld attachment to show that armor is being recharged
 * Example: animate power armor glow pulsing, play sound, and change animated textures

The Myriad RPG Group
Join the Myriad RPG group for announcements and discussion around the Myriad RPG and Myriad Lite scripts.

SecondLife: secondlife:///app/group/dbedc3be-729e-a123-d669-92f401e07a1e/about

OSgrid: secondlife:///app/group/da0227e5-8a0d-4d99-b970-9411932c852d/about

Community
 Any scripters, builders, testers, mentors, teachers or other interested folks willing to volunteer and take ownership of the Myriad Lite Armor script?

This self-managed group would answer Armor questions, teach others how to use it, collect and prioritize feature requests, collect and test bug reports, debug/write scripts, and update docs for the Medieval, Modern, Future, or "universal" settings?

Feature Requests
If you have a feature you would like to see added to Myriad Lite Armor, write a new feature request on the talk page for this article.

The best feature requests will have: Your SL name The name, version, and date of the script you are requesting new features in A description of the feature A sample implementation of the feature in LSL compatible with OSG and SL.

Bug Reports
If you find a bug or something that just doesn't seem right in how the Myriad Lite Armor script works, file a bug report on the talk page for this article.

The best bug reports will have: Your OSG or SL name The name, version, and date of the script you are having problems with A description of the problem itself Steps to follow to reproduce the problem

Contributing to Myriad Lite
If you would like to contribute to the Myriad Lite project, please do!

The best contributions will have: Your SL Name A description of the contribution The patch, script, file, or object being contributed A release stating: * that you intend to contribute this to Myriad Lite * that you are the original creator of the contribution or are legally empowered to contribute it * that you acknowledge this contribution can be released under the Creative Commons BY 3.0 Unported and Modified BSD (3-clause) licenses

//============================================================================ // Myriad_Lite_Armor // Copyright (c) 2012 by Allen Kerensky (OSG/SL) All Rights Reserved. // This work is dual-licensed under // Creative Commons Attribution (CC BY) 3.0 Unported // http://creativecommons.org/licenses/by/3.0/ // - or - // Modified BSD License (3-clause) // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // * Redistributions of source code must retain the above copyright notice, //  this list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above copyright notice, //  this list of conditions and the following disclaimer in the documentation //  and/or other materials provided with the distribution. // * Neither the name of Myriad Lite nor the names of its contributors may be //  used to endorse or promote products derived from this software without //  specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY EXPRESS OR // IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES // OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN // NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, // INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT // NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF // THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // // The Myriad RPG System was designed, written, and illustrated by Ashok Desai // Myriad RPG System licensed under: // Creative Commons Attribution (CC BY) 2.0 UK: England and Wales // http://creativecommons.org/licenses/by/2.0/uk/ //============================================================================