Weapon DevKit Instructions
From RPSWiki
- NOTE: The naming convention for RPS should be "RPS". As the official website is now bnjrps.com, we'd like to stick with RPS as the system name and BNJ as the Blackflag & Jezebel company abbreviation only. Ideally, no one will refer to the system with BNJ at all.
Contents |
Initial Notes
1--Set all of your weapon -scripts- to either "No Transfer" OR "No Copy" before selling any weapons! ANY script that goes out with both transfer and copy perms enabled to the next user will not only disable, but also name you as the person from whom to ask for a refund!
2--While the control() event for weapons is in the open-source portion of the weaponRoot scripts, it is expressly forbidden to change the "default attack" for either a main weapon or off-hand weapon. You may add -additional- controls, but to avoid player confusion all RPS weapons will maintain the same 'default' attack controls.
- NOTE: You are also expressly forbidden from 'doubling up' the attack of an offhand weapon and normal weapon. Making both attack off the same control will be considered a serious violation of the developer Terms of Service and will earn you a removal from the developer group for practices in conflict with the aims of balance and playability in the system.
3--Similar to the control() event, the user-interation channel for weapons is in the open source portion of the scripting. In the interest of providing a familiarity for players, from version 3.0 forward, you are to leave the user interaction channel at channel 99. If you change the interaction channel, your weapons will not be compatible with the RPS Weapon HUD provided with the system.
Basic Setup - Active Weapon
1--Build and texture your weapon. This version of the weapon will the version actively used by any avatar equipping it. A separate version will need to be made as a holstered/sheathed version (explained below).
2--Place the appropriate "weaponRoot" script into your weapon.
a) On the CREATOR line, enter your avatar name - correct spelling and capitalization is a MUST
b) On the WEAPON_TYPE line, enter an appropriate weapon type (weapon types are listed here)
c) On the WEAPON_NAME line, enter a name for your weapon. This name may be anything, but will always be associated with the particular weapon build (by placing the weapon name here, in the script, you allow players to change the actual object name without affecting RPS functionality).
d) On the SOUND_DRAW line, name your weapon 'draw' sound, if any. Leave blank if none.
e) On the SOUND_SHEATH line, name your weapon 'sheath' or 'holster' sound, if any. Leave blank if none.
f) On the SOUND_ATTACK line, name your weapon 'attack' sound, if any. Leave blank if none.
g) On the ANIM_DRAW line, name your weapon 'draw' animation, if any. Leave blank if none.
h) On the ANIM_SHEATH line, name your weapon 'sheath' or 'holster' animation, if any. Leave blank if none.
i) On the ANIM_ATTACK line, name your weapon 'attack' animation. The entry of an attack animation is required.
3--If you are using the AeonVox Merchant Server as your auto-updater, you will need to set the PACKAGE_NAME and the SEVER_PASS. Set the PACKAGE_NAME to the name of the 'boxed weapon' object that you place into your AeonVox Merchant Server, complete with version. Set the SERVER_PASS to your AeonVox Merchant Server password. For more complete/detailed information, refer to the AeonVox Merchant Server instructions.
4--Drop the relevant 'combatType' scripts into your weapon. Each system with which you wish your weapon to be compatible will have a combat type script, labeled as RPScombatType,(name of system),(version). Any combatType script you drop into your weapon will allow users to 'switch' to the system that combatType script covers. All combatType scripts other than the RPS combatType scripts are fully open source -- you may adjust them in any way you please. They are also not actively supported (the RPS combatType scripts are actively supported) and should one type or another suddenly stop working - RPS does not guarantee a new or fixed version within any particular time frame.
While you are free to make scripts for different systems on your own and add them to your weapons - the naming convention for combatType scripts must remain the same. Say, for instance, you wish to make a combatType script for a fictional system called 'XERX'. You would name the script RPScombatType,XERX,1.00.00 (1.00.00 being the version number).
5--Add any/all relevant 'bullets' to your weapon. Each bullet is named according to its system and its function. Each combatType script will require a bullet as well. If you have, for example, a weapon compatible with RPS, SF, and ZONE - you will need an RPS bullet, an SF bullet, and a ZONE bullet. All bullet scripts, except for RPS bullet scripts, are open source.
6--Double-check the permissions you set on your scripts and your weapon. Remember that your RPS scripts must be set either to copy-only or to transfer-only. They cannot retain both permissions. Remember also to remove the modify permissions on your root script.
7--Package your weapon - it's ready to go. Now, for the sheathed version.
Basic Setup - Holstered Weapon
1--Build and texture a sheathed/holstered version of your weapon. Note that, while building, you will want to name each prim that should 'disappear' when a weapon is drawn as "alpha". However, if the entire sheathed-version is to disappear on draw, this naming convention is not required.
2--Place either the RPSHolster (if not all of the holster prims will disappear and you have named those that will disappear 'alpha') or the RPSHoslterAll (if the entirety of the holster prims will disappear and you did not use the naming convention on prims) script into the holstered version of your weapon.
3--Package your holstered version with the active version of your weapon - it's ready to go.
Weapon User Commands
Weapon Commands:
/(channel) draw
/(channel) drawmain
/(channel) drawoffhand
/(channel) sheath
/(channel) sheathmain
/(channel) sheathoffhand
/(channel) holster
/(channel) holstermain
/(channel) holsteroffhand
/(channel) reload (ranged only)
/(channel) (system-name) -->Switches system-compatibility
- NOTE: Commands for users can be added and/or removed through the RPSweaponRoot script.
Open Source Scripts
The RPS DevKit includes a mixture of "open source" scripts and "closed source" scripts. You'll notice that all closed scripts are associated specifically with RPS functionality (RPScombatType scripts are all closed source). I've then taken EVERYTHING that isn't specifically tied to RPS functionality and made it open source. While you may be entertained at how little that leaves as open-source code (pretty much just the draw and holster commands + user-command interface), it's still enough to build any additional functionality you wish into your weapons. Additionally, all alternate-system scripts are full open-source, allowing you to configure them to fit your specific needs and the rules of region owners in the places you sell your weapons.
Below...I'll explain how to work with your open-source scripts and integrate your own functions into RPS.
AVAILABLE SCRIPT TYPES:
RPSweaponRoot(type),(version) --> Your base script for (type) weapons.
- attach(), run_time_permissions(), control(), listen(), and link_message() events
RPScombatType,(system),(type),(version) --> Your combat-system type scripts.
- state_entry(), attach(), changed(), link_message(), listen(), http_response() events
ADDING CHAT COMMANDS:
The RPSweaponRoot script contains a listen() event that will listen for commands from the user. These commands will be 'trimmed' and set to all-caps in order to allow players to mess-up capitalization/spacing/etc without the script failing.
You can add additional chat-command functions by simply adding additional reactions to messages heard from the player under the listen event. Example: else if(message == "SILENCER") SOUND_ATTACK = "silent";
- NOTE: There are no rules against adding your own scripts to those already present in an RPS weapon. You will, however, have to work out your own communication protocols between your own script and the Root and/or combatType scripts.
- NOTE: We actively encourage sharing knowledge of functions added to these scripts. We anticipate a 'library' of said functions being built over time.

