ItsABadger (talk | contribs) No edit summary |
TorturedCats (talk | contribs) (Apply approved Sinfar resource-page layout: native headings, compact tables and responsive navigation; preserve existing content.) |
||
| (22 intermediate revisions by 2 users not shown) | |||
| Line 1: | Line 1: | ||
<div class="sf-page sf-article-page sf-guidance-family sf-resource-page"> | |||
<div class="sf-family-path">[[Main Page|Main Page]] · [[:Category:Builders Tools|Builder resources]]</div> | |||
<div class="sf-hero"><div class="sf-eyebrow">Builder resources · Housing script reference</div> | |||
<div class="sf-title">House Scripts</div> | |||
<p>Find a script by purpose, then check its object, event, variables, and usage notes.</p> | |||
</div> | |||
== On this page == | |||
<div class="sf-task-index">[[#Activate/Deactivate_Placeables|Activate/Deactivate Placeables]] [[#Tags|Tags]] [[#NPCs|NPCs]] [[#Doors_and_Locking|Doors and Locking]] [[#Chairs_and_Sitting|Chairs and Sitting]] [[#Elevate_and_Rotate|Elevate and Rotate]] [[#Minimap_Options|Minimap Options]] [[#Lights,_Music_and_Buttons|Lights, Music and Buttons]] [[#Portals|Portals]] [[#Shackle_Scripts|Shackle Scripts]] [[#Placeable_Cleanup|Placeable Cleanup]] [[#Placeable_State_and_Sound|Placeable State and Sound]] [[#Visual_Effect_Heartbeat|Visual Effect Heartbeat]] [[#Visual_Effects_on_Use|Visual Effects on Use]] [[#Visual_and_Sound_Effects_on_Use|Visual and Sound Effects on Use]] [[#Web_Client_Media_Support|Web Client Media Support]]</div> | |||
The official reference is here: https://nwn.sinfar.net/houses_scriptlist.php, but you can find more information on how to use those scripts here. | The official reference is here: https://nwn.sinfar.net/houses_scriptlist.php, but you can find more information on how to use those scripts here. | ||
<!-- Table template: | <!-- Table template: | ||
| Line 20: | Line 30: | ||
== Activate/Deactivate Placeables == | == Activate/Deactivate Placeables == | ||
=== bi_activate === | === bi_activate === | ||
<p class="sf-reference-note">Activate/Deactivate Placeables</p> | |||
<div class="sf-content-panel"> | |||
<p><b>Description</b></p> | |||
Set on a useable placeable, this script will by default activate its animation if it has one - for example, if it's a lever or a button, it will be pulled or pushed respectively. Additionally, the variables will change the nature of the Placeable itself if BI_TARGET is not set - if BI_TARGET is a valid object, the object used will still play its animation but the other effects will play on the target. This can be used, for example, to activate a shower in a bathroom by moving the water spray placeable above or below the floor with the variable <code>BI_MOVEZ</code>. | |||
Forum discussion: http://sinfar.net/forum/viewtopic.php?f=64&t=5292 | Forum discussion: http://sinfar.net/forum/viewtopic.php?f=64&t=5292 | ||
<div class="sf-choice-grid"> | |||
<div><b>Objects</b><br> | |||
Placeables | |||
</div> | |||
<div><b>Event</b><br> | |||
OnUsed | |||
</div> | |||
</div> | |||
<p><b>Variables</b></p> | |||
<div class="sf-variable-list sf-choice-grid"> | |||
<div><code>BI_ACTIVATE:Integer</code></div> | |||
<div><code>BI_ACTIVATED:Integer</code></div> | |||
<div><code>BI_ACTIVATE_NEAREST_SOUND_OBJECT:Integer</code></div> | |||
<div><code>BI_BEAM_SOURCE:String</code></div> | |||
<div><code>BI_FACE:Float</code></div> | |||
<div><code>BI_MOVEX:Float</code></div> | |||
<div><code>BI_MOVEY:Float</code></div> | |||
<div><code>BI_MOVEZ:Float</code></div> | |||
<div><code>BI_RESET:Float</code></div> | |||
<div><code>BI_SOUND:String</code></div> | |||
<div><code>BI_SOUND_OBJECT_TAG:String</code></div> | |||
<div><code>BI_SOUND_ON:Integer</code></div> | |||
<div><code>BI_TARGET:String</code></div> | |||
<div><code>BI_TARGET1:String</code></div> | |||
<div><code>BI_TARGET2:String</code></div> | |||
<div><code>BI_TURN:Float</code></div> | |||
<div><code>BI_VFX:Integer</code></div> | |||
</div> | |||
<div class="sf-note"> | |||
Notes | |||
Target Placeables require the script <code>[[home_tag]]</code> in the OnHeartbeat event. | |||
<code>BI_ACTIVATE_NEAREST_SOUND_OBJECT</code> which will activate or deactivate (base on the the BI_SOUND_ON variable) the nearest sound object, in addition to the current object. | <code>BI_ACTIVATE_NEAREST_SOUND_OBJECT</code> which will activate or deactivate (base on the the BI_SOUND_ON variable) the nearest sound object, in addition to the current object. | ||
| Line 70: | Line 105: | ||
It may not be possible to use all of the features inside players homes, I suspect that tagging sound objects for example may be impossible. Doors are also re-tagged so it will not be possible to target them inside a home. | It may not be possible to use all of the features inside players homes, I suspect that tagging sound objects for example may be impossible. Doors are also re-tagged so it will not be possible to target them inside a home. | ||
</div> | |||
</div> | |||
=== bi_activate_trig === | === bi_activate_trig === | ||
<p class="sf-reference-note">Activate/Deactivate Placeables via Trigger</p> | |||
<div class="sf-content-panel"> | |||
<p><b>Description</b></p> | |||
Attaches itself to the closest trigger which will toggle when the first creature enters the trigger and then the last leaves. Otherwise it should be identical to bi_activate, except that the placeable need not be useble. | |||
<div class="sf-choice-grid"> | |||
<div><b>Objects</b><br> | |||
Placeables | |||
</div> | |||
<div><b>Event</b><br> | |||
OnHeartbeat | |||
</div> | |||
</div> | |||
<p><b>Variables</b></p> | |||
<div class="sf-variable-list sf-choice-grid"> | |||
<div><code>BI_ACTIVATE:Integer</code></div> | |||
<div><code>BI_ACTIVATED:Integer</code></div> | |||
<div><code>BI_ACTIVATE_NEAREST_SOUND_OBJECT:Integer</code></div> | |||
<div><code>BI_BEAM_SOURCE:String</code></div> | |||
<div><code>BI_FACE:Float</code></div> | |||
<div><code>BI_MOVEX:Float</code></div> | |||
<div><code>BI_MOVEY:Float</code></div> | |||
<div><code>BI_MOVEZ:Float</code></div> | |||
<div><code>BI_RESET:Float</code></div> | |||
<div><code>BI_SOUND:String</code></div> | |||
<div><code>BI_SOUND_OBJECT_TAG:String</code></div> | |||
<div><code>BI_SOUND_ON:Integer</code></div> | |||
<div><code>BI_TARGET:String</code></div> | |||
<div><code>BI_TARGET1:String</code></div> | |||
<div><code>BI_TARGET2:String</code></div> | |||
<div><code>BI_TURN:Float</code></div> | |||
<div><code>BI_VFX:Integer</code></div> | |||
</div> | |||
<div class="sf-note"> | |||
Notes | |||
See notes from bi_activate. | |||
</div> | |||
</div> | |||
=== bi_activate_osca === | === bi_activate_osca === | ||
<p class="sf-reference-note">Activate/Deactivate Placeables via Spell</p> | |||
<div class="sf-content-panel"> | |||
<p><b>Description</b></p> | |||
A wrapper for bi_activate that triggers when a spell is cast at the placeable. A spell ID should be defined using BI_SPELLID, this will be compared against the spell ID held in the spell.2da file and the spell cast at the placeable. | |||
<div class="sf-choice-grid"> | |||
<div><b>Objects</b><br> | |||
Placeables | |||
</div> | |||
<div><b>Event</b><br> | |||
OnHeartbeat | |||
</div> | |||
</div> | |||
<p><b>Variables</b></p> | |||
<div class="sf-variable-list sf-choice-grid"> | |||
<div><code>BI_SPELLID:Integer</code></div> | |||
<div><code>BI_ACTIVATE:Integer</code></div> | |||
<div><code>BI_ACTIVATED:Integer</code></div> | |||
<div><code>BI_ACTIVATE_NEAREST_SOUND_OBJECT:Integer</code></div> | |||
<div><code>BI_BEAM_SOURCE:String</code></div> | |||
<div><code>BI_FACE:Float</code></div> | |||
<div><code>BI_MOVEX:Float</code></div> | |||
<div><code>BI_MOVEY:Float</code></div> | |||
<div><code>BI_MOVEZ:Float</code></div> | |||
<div><code>BI_RESET:Float</code></div> | |||
<div><code>BI_SOUND:String</code></div> | |||
<div><code>BI_SOUND_OBJECT_TAG:String</code></div> | |||
<div><code>BI_SOUND_ON:Integer</code></div> | |||
<div><code>BI_TARGET:String</code></div> | |||
<div><code>BI_TARGET1:String</code></div> | |||
<div><code>BI_TARGET2:String</code></div> | |||
<div><code>BI_TURN:Float</code></div> | |||
<div><code>BI_VFX:Integer</code></div> | |||
</div> | |||
<div class="sf-note"> | |||
Notes | |||
Use a negative spell ID if you want the check to be disabled and use -2 if you want to to report the spell ID of the spell that its it. | |||
It's also important that you pick a spell that can affect the placeable and that the placeable is not plot, lots of hit points will help. | It's also important that you pick a spell that can affect the placeable and that the placeable is not plot, lots of hit points will help. | ||
| Line 106: | Line 196: | ||
The placeable cannot be flagged as Plot. It must be able to take damage for this to work. | The placeable cannot be flagged as Plot. It must be able to take damage for this to work. | ||
</div> | |||
</div> | |||
== Tags == | |||
=== home_tag === | |||
<p class="sf-reference-note">Set tags</p> | |||
<div class="sf-content-panel"> | |||
<p><b>Description</b></p> | |||
Set a Placeables Tag | |||
Adds a tag to the placeable so that the placeable may be accessed by other scripts. | |||
For security reasons Tags are usually removed or replaced when homes are uploaded, this script provides a safe tag for home builders to work with. | |||
<div class="sf-choice-grid"> | |||
<div><b>Objects</b><br> | |||
Placeables | |||
</div> | |||
<div><b>Event</b><br> | |||
OnHeartbeat | |||
</div> | |||
</div> | |||
<p><b>Variables</b></p> | |||
<div class="sf-variable-list sf-choice-grid"> | |||
<div>TAG:String</div> | |||
</div> | |||
<div class="sf-note"> | |||
Server script builders should, #include “home_inc_tag” and use one of the following fucntions to get a matching tag:string GetHomeSafeTag(string sOriginalTag); string GetHomeTagByID(string sOriginalTag, int nHomeID) | |||
</div> | |||
</div> | |||
== NPCs == | == NPCs == | ||
=== hs_spawn_animnpc === | === hs_spawn_animnpc === | ||
<p class="sf-reference-note">Animated NPCs</p> | |||
<div class="sf-content-panel"> | |||
<p><b>Description</b></p> | |||
Turn a useable placeable into an animated NPC. The NPC can be customized like the hs_store_spawn script. | |||
Forum discussion: http://sinfar.net/forum/viewtopic.php?f=33&t=111 | Forum discussion: http://sinfar.net/forum/viewtopic.php?f=33&t=111 | ||
<div class="sf-choice-grid"> | |||
<div><b>Objects</b><br> | |||
Placeables | |||
</div> | |||
<div><b>Event</b><br> | |||
OnHeartbeat | |||
</div> | |||
</div> | |||
<p><b>Variables</b></p> | |||
<div class="sf-variable-list sf-choice-grid"> | |||
<div><code>HS_ANIMNPC_PHENOTYPE:Integer</code></div> | |||
<div><code>HS_ANIMNPC_ANIMATION:Integer</code></div> | |||
<div><code>HS_ANIMNPC_ANIMATION_SPEED:Float</code></div> | |||
<div><code>HS_ANIMNPC_TALKTO_ANIMATION:Integer</code></div> | |||
<div><code>HS_ANIMNPC_TALKTO_SOUND:String</code></div> | |||
<div><code>HS_ANIMNPC_TALKTO_MESSAGE:String</code></div> | |||
<div><code>HS_ANIMNPC_ARMOR_APPEARANCE:String</code></div> | |||
<div><code>HS_ANIMNPC_BODY_APPEARANCE:String</code></div> | |||
<div><code>HS_ANIMNPC_HEADV2:String</code></div> | |||
<div><code>HS_ANIMNPC_GENDER:Integer</code></div> | |||
<div><code>HS_ANIMNPC_APPEARANCE2_PART1:String</code></div> | |||
<div><code>HS_ANIMNPC_APPEARANCE2_PART2:String</code></div> | |||
<div><code>HS_ANIMNPC_SCALE:Float</code></div> | |||
<div><code>HS_SPAWN_VFX_0:Integer</code></div> | |||
<div><code>HS_SPAWN_VFX_1:Integer</code></div> | |||
<div><code>HS_SPAWN_VFX_2:Integer</code></div> | |||
<div><code>HS_SPAWN_VFX_3:Integer</code></div> | |||
<div><code>HS_SPAWN_VFX_4:Integer</code></div> | |||
<div><code>HS_SPAWN_VFX_5:Integer</code></div> | |||
</div> | |||
<div class="sf-note"> | |||
Notes | |||
Use !E INFO to get the PHENOTYPE and ANIMATION integers. ANIMATION_SPEED is relative to 1.0, with higher being faster and lower being slower. | |||
TALKTO variables include SOUND as a ResRef of a sound file, animation will fire once when the NPC is activated and the MESSAGE will be said in talk volume. | TALKTO variables include SOUND as a ResRef of a sound file, animation will fire once when the NPC is activated and the MESSAGE will be said in talk volume. | ||
If using APPEARANCE2 variables, do NOT use Armor, Body, Head or Gender variables. And similar - if you use any of those, do not use APPEARANCE2. APPEARANCE2 is acquired as a full string from a body or tailor model speaking the whole appearance rather than specific parts. Each PART can be max 1024 characters long. If your string exceeds that length, remove accessories/VFX. | If using APPEARANCE2 variables, do NOT use Armor, Body, Head or Gender variables. And similar - if you use any of those, do not use APPEARANCE2. APPEARANCE2 is acquired as a full string from a body or tailor model speaking the whole appearance rather than specific parts. Each PART can be max 1024 characters long. If your string exceeds that length, remove accessories/VFX. | ||
</div> | |||
</div> | |||
=== hs_spawn_npc === | |||
<p class="sf-reference-note">Tailor Models</p> | |||
<div class="sf-content-panel"> | |||
<p><b>Description</b></p> | |||
Replaces the placeable by a given NPC. The placeable must be set as useable. The NPC to spawn is determined by the HS_SPAWN_NPC_ID variable, it can take one of the following values: | |||
1 = Male Tailoring Model | |||
= | 2 = Female Tailoring Model | ||
3 = Male Body Model | |||
4 = Female Body Model | |||
<div class="sf-choice-grid"> | |||
<div><b>Objects</b><br> | |||
Placeables | |||
</div> | |||
<div><b>Event</b><br> | |||
OnHeartbeat | |||
</div> | |||
</div> | |||
<p><b>Variables</b></p> | |||
<div class="sf-variable-list sf-choice-grid"> | |||
<div>HS_SPAWN_NPC_ID</div> | |||
</div> | |||
<div class="sf-note"> | |||
Notes | |||
</div> | |||
</div> | |||
=== hs_spawn_deadnpc === | |||
<p class="sf-reference-note">Corpses</p> | |||
<div class="sf-content-panel"> | |||
<p><b>Description</b></p> | |||
Turn a useable placeable into dead creature. | |||
Forum discussion: http://sinfar.net/forum/viewtopic.php?t=2809 | |||
<div class="sf-choice-grid"> | |||
<div><b>Objects</b><br> | |||
Placeables | |||
</div> | |||
<div><b>Event</b><br> | |||
OnHeartbeat | |||
</div> | |||
</div> | |||
<p><b>Variables</b></p> | |||
<div class="sf-variable-list sf-choice-grid"> | |||
<div><code>HS_DEADNPC_APPEARANCE2_PART1:String</code></div> | |||
<div><code>HS_DEADNPC_APPEARANCE2_PART2:String</code></div> | |||
<div><code>HS_DEADNPC_APPEARANCE_TYPE:Integer</code></div> | |||
<div><code>HS_DEADNPC_ARMOR_APPEARANCE:String</code></div> | |||
<div><code>HS_DEADNPC_BODY_APPEARANCE:String</code></div> | |||
<div><code>HS_DEADNPC_GENDER:Integer</code></div> | |||
<div><code>HS_DEADNPC_HEADV2:String</code></div> | |||
<div><code>HS_SPAWN_VFX_0:Integer</code></div> | |||
<div><code>HS_SPAWN_VFX_1:Integer</code></div> | |||
<div><code>HS_SPAWN_VFX_2:Integer</code></div> | |||
<div><code>HS_SPAWN_VFX_3:Integer</code></div> | |||
<div><code>HS_SPAWN_VFX_4:Integer</code></div> | |||
<div><code>HS_SPAWN_VFX_5:Integer</code></div> | |||
</div> | |||
<div class="sf-note"> | |||
Notes | |||
APPEARANCE2 variables are max 1024 characters each. If your string exceeds this, use PART2 as well. Acquired from body or tailor models. If your total string exceeds 2048 characters, remove some VFX/accessories. | |||
APPEARANCE_TYPE is the creature appearance index from the appearance.2da file. Use 6 for base human. | |||
</div> | |||
</div> | |||
=== | === hs_store_spawn === | ||
'''Merchant drones''' | |||
<div class="sf-content-panel"> | |||
<p><b>Description</b></p> | |||
Must be used in conjunction with hs_store_xferspw. Will transform a usable placeable into a standard merchant with basic conversation options for facilitating sales of player made items to other players. | |||
= | <div class="sf-choice-grid"> | ||
<div><b>Objects</b><br> | |||
Placeables | |||
</div> | |||
<div><b>Event</b><br> | |||
OnHeartbeat | |||
</div> | |||
</div> | |||
<p><b>Variables</b></p> | |||
<div class="sf-variable-list sf-choice-grid"> | |||
<div><code>HS_STORE_MERCHANT_APPEARANCE2_PART1:String</code></div> | |||
<div><code>HS_STORE_MERCHANT_APPEARANCE2_PART2:String</code></div> | |||
<div><code>HS_STORE_TAG:String</code></div> | |||
<div><code>HS_STORE_BONUS_MARK_UP:Integer</code></div> | |||
<div><code>HS_STORE_BONUS_MARK_DOWN:Integer</code></div> | |||
<div><code>HS_STORE_DIALOG_NPC_WELCOME_ANIMATION:Integer</code></div> | |||
<div><code>HS_STORE_DIALOG_NPC_WELCOME_SOUND:String</code></div> | |||
<div><code>HS_STORE_DIALOG_NPC_WELCOME_TEXT:String</code></div> | |||
<div><code>HS_STORE_DIALOG_PC_NO_TEXT:String</code></div> | |||
<div><code>HS_STORE_DIALOG_PC_YES_TEXT:String</code></div> | |||
<div><code>HS_SPAWN_VFX_0:Integer</code> (Can go from 0-5)</div> | |||
</div> | |||
<div class="sf-note"> | |||
Notes | |||
Appearance strings can be used to customize the appearance of the merchant. The toolset has a 1024 character limit per variable. If your appearance string is longer than 2048 characters, you'll need to make it less complex. | |||
Store tag is used to differentiate stores in the player home. Multiple stores with multiple tags are supported (for different vendors with different inventories). | |||
Mark up and mark down prices on items function based on a standardized formula. | |||
* price = item value * (x-1000) where x is the markup variable. (You can get the item value of any item by using the player tool on it.). | |||
However there is a hard cap of 10 million gold that can be collected in the chest at any one time. Any gold collected after the cap is hit will be lost. Price and monitor carefully. | |||
</div> | |||
</div> | |||
=== | === hs_store_xferspw === | ||
'''Merchant drone inventory''' | |||
<div class="sf-content-panel"> | |||
<p><b>Description</b></p> | |||
Must be set to Plot. Must be Useable. And must have invetory. | |||
<div class="sf-choice-grid"> | |||
<div><b>Objects</b><br> | |||
Placeables | |||
</div> | |||
<div><b>Event</b><br> | |||
OnHeartbeat | |||
</div> | |||
</div> | |||
<p><b>Variables</b></p> | |||
<div class="sf-variable-list sf-choice-grid"> | |||
<div><code>HS_STORE_TAG:String</code></div> | |||
</div> | |||
<div class="sf-note"> | |||
Notes | |||
Once set, the container can be used to place inventory items into the store for sale to other players. Once placed, the items will disappear and only be available through the Merchant interface used by hs_store_spawn. | |||
Gold from all sales is collected when the player opens the chest. This is not security coded, so locking chests is recommended if you want to get paid for your work versus handing out free gold to any nosy person wandering in. | |||
Stacks of items placed in the chest will be sold as stacks. Individual items placed, are sold as single items. Ammo from ammo makers is not sellable and will be discarded if placed in the chest. | |||
</div> | |||
</div> | |||
== Doors and Locking == | |||
=== bi_create_bdoor === | |||
<p class="sf-reference-note">Back Doors - to other player houses</p> | |||
<div class="sf-content-panel"> | |||
<p><b>Description</b></p> | |||
Creates a portal from a door or a placeable that can go to another house on the same island/in the same erf. For example, all of Sinfar counts as the same island, whereas cities on Arche Terre are their own - you cannot create a backdoor from Lomidar to Durakiss, but you can create one from Sinifer to Ackalia. Backdoors are one-way, and the opposite side has to be set up correctly for them to go both ways. This is intended to be used to go from one house to another, not to be used within the same house though it will work like that as well. | |||
<div class="sf-choice-grid"> | |||
<div><b>Objects</b><br> | |||
Doors, Placeables | |||
</div> | |||
<div><b>Event</b><br> | |||
OnHeartbeat | |||
</div> | |||
</div> | |||
<p><b>Variables</b></p> | |||
<div class="sf-variable-list sf-choice-grid"> | |||
<div><code>BACKDOOR_VFX:Integer</code></div> | |||
<div><code>KEY:String</code></div> | |||
<div><code>NAME:String</code></div> | |||
<div><code>TARGET:String</code></div> | |||
<div><code>NOKEY:Integer</code></div> | |||
</div> | |||
<div class="sf-note"> | |||
Notes | |||
<code>NAME:String</code> and <code>TARGET:String</code> have to match on each end - the NAME of one side matches the TARGET on the other side, and vice-versa. | |||
You cannot make a backdoor portal outside the ERF of your house - that's typically one island but may be one city depending on the server. Backdoors are generally not allowed on Dread Lands server, EXCEPT the Cottage Island. | |||
To ensure it works smoothly, be sure that your NAME and TAG variables are unique, always! They should not exceed 16 characters. | |||
If you do not wish a key, you must include the NOKEY:integer variable set to 1. You should not include NOKEY if you use a key. | |||
Backdoors can fail unless the target house has been loaded onto the server. The house area has to be entered at least once after a reset for that to happen. If it fails, simply navigate to the target house once manually. | |||
</div> | |||
</div> | |||
=== bi_create_ebdoor === | |||
<p class="sf-reference-note">Back Doors - from house interiors to server areas</p> | |||
<div class="sf-content-panel"> | |||
<p><b>Description</b></p> | |||
Creates a portal from a door (specifically a door) that can go to an area outside of the house, presumably in the adjacent area, but not required. | |||
The standard back door script bi_create_bdoor is not well suited for linking to external server side back doors. This is a simplified version that does not require coordination between the server and home builders. | |||
Forum discussion: https://forum.sinfar.net/viewtopic.php?f=64&t=12539 | |||
<div class="sf-choice-grid"> | |||
<div><b>Objects</b><br> | |||
Doors, Placeables | |||
</div> | |||
<div><b>Event</b><br> | |||
OnHeartbeat | |||
</div> | |||
</div> | |||
<p><b>Variables</b></p> | |||
<div class="sf-variable-list sf-choice-grid"> | |||
<div><code>NUMBER:Integer</code></div> | |||
<div><code>G_CLOSE_DELAY:Integer</code></div> | |||
<div><code>G_CLOSE_LOCK:Integer</code></div> | |||
</div> | |||
<div class="sf-note"> | |||
Notes | |||
<code>NUMBER:Integer</code> is the number of the back door on the server side, usually 1. <code>G_CLOSE_DELAY:Integer</code> and <code>G_CLOSE_LOCK:Integer</code> work as for g_door_autoclose. | |||
'''Home Builders''' | |||
Inside player homes, bi_create_ebdoor will work perfectly without any local variables, just add it as the door's heartbeat script. If this does not work then your house does not have access to any external backdoors, you will need to put in a request for one to be added in the appropriate housing forum. | |||
If your house has access to more than one external back door then you may use the local integer variable named NUMBER to select the door of your choice. By default this will be 1 which will select the first back door. | |||
If you | The script should copy over locking information to the external door from the one inside the house. If no lock information is set, it will alternatively copy over the lock information from the main house door. If you always want the back door unlocked, then set a key value but leave the locked check box empty. | ||
The script will | The script will also accept G_CLOSE_DELAY and G_CLOSE_LOCK and apply g_door_autoclose if G_CLOSE_DELAY is set. | ||
</div> | |||
</div> | |||
== | === g_door_autoclose === | ||
<p class="sf-reference-note">Door auto-lose and lock</p> | |||
<div class="sf-content-panel"> | |||
<p><b>Description</b></p> | |||
Automatically closes and optionally locks a door after it's been opened | |||
<div class="sf-choice-grid"> | |||
<div><b>Objects</b><br> | |||
Doors | |||
</div> | |||
<div><b>Event</b><br> | |||
OnOpen | |||
</div> | |||
</div> | |||
<p><b>Variables</b></p> | |||
<div class="sf-variable-list sf-choice-grid"> | |||
<div><code>G_CLOSE_DELAY:Integer</code></div> | |||
<div><code>G_CLOSE_LOCK:Integer</code></div> | |||
</div> | |||
= | <div class="sf-note"> | ||
Notes | |||
The door will automatically close after 15 seconds by default, or however many seconds set by <code>G_CLOSE_DELAY</code>. If <code>G_CLOSE_LOCK</code> is set to 1, it will also lock. | |||
</div> | |||
</div> | |||
=== g_door_locker === | |||
<p class="sf-reference-note">Lock switches</p> | |||
<div class="sf-content-panel"> | |||
<p><b>Description</b></p> | |||
Lock or unlock the nearest door. | |||
<div class="sf-choice-grid"> | |||
<div><b>Objects</b><br> | |||
Placeables | |||
</div> | |||
<div><b>Event</b><br> | |||
OnUsed | |||
</div> | |||
</div> | |||
<p><b>Variables</b></p> | |||
<div class="sf-variable-list sf-choice-grid"> | |||
<div>None</div> | |||
</div> | |||
<div class="sf-note"> | |||
Notes | |||
Add a key tag to the door to further restrict access, such as in bedrooms. | |||
</div> | |||
</div> | |||
== Chairs and Sitting == | |||
=== g_bench_sit === | |||
<p class="sf-reference-note">Sit-able objects</p> | |||
<div class="sf-content-panel"> | |||
<p><b>Description</b></p> | |||
Creates multiple seats on a bench when used. | |||
<div class="sf-choice-grid"> | |||
<div><b>Objects</b><br> | |||
Placeables | |||
</div> | |||
<div><b>Event</b><br> | |||
OnUsed | |||
</div> | |||
</div> | |||
<p><b>Variables</b></p> | |||
<div class="sf-variable-list sf-choice-grid"> | |||
<div>None</div> | |||
</div> | |||
</div> | |||
=== g_bench_rsit === | |||
<p class="sf-reference-note">Sit-able objects</p> | |||
<div class="sf-content-panel"> | |||
<p><b>Description</b></p> | |||
Creates multiple seats on a bench when used, facing reverse direction. | |||
<div class="sf-choice-grid"> | |||
<div><b>Objects</b><br> | |||
Placeables | |||
</div> | |||
<div><b>Event</b><br> | |||
OnUsed | |||
</div> | |||
</div> | |||
<p><b>Variables</b></p> | |||
<div class="sf-variable-list sf-choice-grid"> | |||
<div>None</div> | |||
</div> | |||
<div class="sf-note"> | |||
Notes | |||
Some placeables are reversed. If you use <code>g_bench_sit</code> and your character sits the wrong way, use this one instead. | |||
</div> | |||
</div> | |||
=== g_chair_sit === | |||
<p class="sf-reference-note">Sit-able objects</p> | |||
<div class="sf-content-panel"> | |||
<p><b>Description</b></p> | |||
For a single seat on a chair or similar. | |||
<div class="sf-choice-grid"> | |||
<div><b>Objects</b><br> | |||
Placeables | |||
</div> | |||
<div><b>Event</b><br> | |||
OnUsed | |||
</div> | |||
</div> | |||
<p><b>Variables</b></p> | |||
<div class="sf-variable-list sf-choice-grid"> | |||
<div>None</div> | |||
</div> | |||
</div> | |||
=== bi_onclick_sit === | |||
<p class="sf-reference-note">Sit-able objects</p> | |||
<div class="sf-content-panel"> | |||
<p><b>Description</b></p> | |||
An alternative sit script supporting benches and the many chairs that do not work correctly with g_chair_sit. | |||
Forum discussion: http://sinfar.net/forum/viewtopic.php?t=2809 | |||
<div class="sf-choice-grid"> | |||
<div><b>Objects</b><br> | |||
Placeables | |||
</div> | |||
<div><b>Event</b><br> | |||
OnClick | |||
</div> | |||
</div> | |||
<p><b>Variables</b></p> | |||
<div class="sf-variable-list sf-choice-grid"> | |||
<div><code>BI_DIRECTION:Float</code></div> | |||
<div><code>BI_PLACES:Integer</code></div> | |||
<div><code>BI_RADIUS:Float</code></div> | |||
<div><code>BI_WIDTH:Float</code></div> | |||
<div><code>BI_X:Float</code></div> | |||
<div><code>BI_Y:Float</code></div> | |||
<div><code>BI_Z:Float</code></div> | |||
<div><code>BI_DEBUG:Integer</code></div> | |||
</div> | |||
<div class="sf-note"> | |||
Notes | |||
Unlike the existing sit scripts which are designed for OnUsed, it should be added as an OnClick script. The script will checks if it knows about the placeable and if there are any local variable parameters. If it knows what to do it will add one or more invisible sit points, correct the elevation of the placeable so that it will meet your characters bottom then remove itself. If I doesn't know what to do it will replace itself with the standard g_chair_sit script and hope for the best. | |||
In most cases the script should work without any local variables but the defaults that I have selected may not be exactly what you want. Most of the time you may as well just add the invisible sit point in the toolset but it you have many chairs or benches to place it may be worth the trouble to use the script and provide your own sit parameters. | |||
As the script only adds sit points on demand it will usually be more efficient than manually placed sit points, and while its more expensive than the bench scripts on its first run it should be cheaper when people use the bench afterwards. That said, its better to use g_chair_sit unless there is a problem with the chair. | |||
BI_RADIUS variable is for curved benches/seats. BI_PLACES is a count from 1-16 with how many seats should be for benches. | |||
</div> | |||
</div> | |||
== Elevate and Rotate == | |||
=== bi_p_elevate === | |||
<p class="sf-reference-note">Elevation triggers</p> | |||
<div class="sf-content-panel"> | |||
<p><b>Description</b></p> | |||
Creates an elevated walkable area near or over a (non-static) placeable. | |||
<div class="sf-choice-grid"> | |||
<div><b>Objects</b><br> | |||
Placeable | |||
</div> | |||
<div><b>Event</b><br> | |||
OnHeartbeat | |||
</div> | |||
</div> | |||
<p><b>Variables</b></p> | |||
<div class="sf-variable-list sf-choice-grid"> | |||
<div><code>ELEVATION:Float</code></div> | |||
</div> | |||
<div class="sf-note"> | |||
Notes | |||
Apply the script and specify the elevation value on the placeable as a local variable float, then use the toolset to create a generic trigger area over or close to the placeable. Any creature entering the trigger area will then be elevated by the value supplied. | |||
</div> | |||
</div> | |||
=== bi_p_elevatestep === | |||
<p class="sf-reference-note">Elevation triggers</p> | |||
<div class="sf-content-panel"> | |||
<p><b>Description</b></p> | |||
Creates an elevated walkable area near or over a (non-static) placeable, with steps like a staircase. | |||
<div class="sf-choice-grid"> | |||
<div><b>Objects</b><br> | |||
Placeable | |||
</div> | |||
<div><b>Event</b><br> | |||
OnHeartbeat | |||
</div> | |||
</div> | |||
<p><b>Variables</b></p> | |||
<div class="sf-variable-list sf-choice-grid"> | |||
<div><code>ELEVATION:Float</code></div> | |||
<div><code>STEP:Integer</code></div> | |||
</div> | |||
<div class="sf-note"> | |||
Notes | |||
A test version of bi_p_elevate, to allow “steps” that have to be gone up in order, so that simulated upper and lower walkable areas are possible. Character will elevate on any trigger one step higher, even, or any lower numbered trigger. The triggers need to overlap slightly at the points players are to cross from one step to the next. | |||
The <code>STEP</code> variable should be incremented for each step, starting at 1. | |||
</div> | |||
</div> | |||
=== g_plc_used_turn === | |||
<p class="sf-reference-note">Force turn a placeable</p> | |||
<div class="sf-content-panel"> | |||
<p><b>Description</b></p> | |||
Turns the used placeable by 30 degree, or the number of degree defined by the G_TURN_DEGREE variable. | |||
When it turns, you can make it play a sound defined by the variable G_TURN_SOUND. | |||
The placeable will be turned back after 30 seconds, or by the number of second that you set in the G_TURN_BACK_DELAY variable. | |||
<div class="sf-choice-grid"> | |||
<div><b>Objects</b><br> | |||
Placeable | |||
</div> | |||
<div><b>Event</b><br> | |||
OnUsed | |||
</div> | |||
</div> | |||
<p><b>Variables</b></p> | |||
<div class="sf-variable-list sf-choice-grid"> | |||
<div>G_TURN_BACK_DELAY : Integer | |||
G_TURN_DEGREE : Integer | |||
G_TURN_SOUND : String</div> | |||
</div> | |||
<div class="sf-note"> | |||
Notes | |||
</div> | |||
</div> | |||
== Minimap Options == | |||
=== hs_hb_showarea === | |||
<p class="sf-reference-note">Reveal the minimap to players.</p> | |||
<div class="sf-content-panel"> | |||
<p><b>Description</b></p> | |||
Any player entering the same area as the placeable with this script will have their minimap revealed. | |||
<div class="sf-choice-grid"> | |||
<div><b>Objects</b><br> | |||
Placeables | |||
</div> | |||
<div><b>Event</b><br> | |||
OnHeartbeat | |||
</div> | |||
</div> | |||
</div> | |||
=== hs_hb_hidearea === | |||
<p class="sf-reference-note">Hide the minimap for players.</p> | |||
<div class="sf-content-panel"> | |||
<p><b>Description</b></p> | |||
Any player entering the same area as the placeable with this script will have their minimap hidden. | |||
<div class="sf-choice-grid"> | |||
<div><b>Objects</b><br> | |||
Placeables | |||
</div> | |||
<div><b>Event</b><br> | |||
OnHeartbeat | |||
</div> | |||
</div> | |||
</div> | |||
== Lights, Music and Buttons == | |||
=== lwjb_jukebox === | |||
<p class="sf-reference-note">Jukebox and Lights System</p> | |||
<div class="sf-content-panel"> | |||
<p><b>Description</b></p> | |||
Starts Lil's Jukebox and Light Controller | |||
<div class="sf-choice-grid"> | |||
<div><b>Objects</b><br> | |||
Placeables | |||
</div> | |||
<div><b>Event</b><br> | |||
OnUsed | |||
</div> | |||
</div> | |||
</div> | |||
=== bi_p_lightswitch === | |||
<p class="sf-reference-note">Lightswitch</p> | |||
<div class="sf-content-panel"> | |||
<p><b>Description</b></p> | |||
Create a placeable that can turn lights on or off. | |||
<div class="sf-choice-grid"> | |||
<div><b>Objects</b><br> | |||
Placeables | |||
</div> | |||
<div><b>Event</b><br> | |||
OnHeartbeat | |||
</div> | |||
</div> | |||
<p><b>Variables</b></p> | |||
<div class="sf-variable-list sf-choice-grid"> | |||
<div><code>SWITCH:Integer</code></div> | |||
<div><code>LIGHT:Integer</code></div> | |||
<div><code>NAME:String</code></div> | |||
<div><code>ACTIVATE:Integer</code></div> | |||
<div><code>EFFECTS:Integer</code></div> | |||
<div><code>EFFECT_1:Integer</code></div> | |||
<div><code>EFFECT_2:Integer</code></div> | |||
<div><code>EFFECT_3:Integer</code></div> | |||
<div><code>EFFECT_4:Integer</code></div> | |||
</div> | |||
<div class="sf-note"> | |||
Notes | |||
Requires two or more placeables - 1 lightswitch and any number of lights. <code>SWITCH(int)1</code> variable set on the switch itself and <code>LIGHT(int)1</code> set on the lights. Use the various EFFECT variables to set extra visual effects if desired. Use <code>ACTIVATE(int)1</code> if the switch should activate (such as with buttons or levers that are animated). The <code>NAME</code> must be the same for the switch and all lights it's meant to activate. | |||
For VFX, set up to 4 - use EFFECTS(int) to specify how many and EFFECT_# to specify the visual effect number. | |||
</div> | |||
</div> | |||
=== yasm_doorbell === | |||
<p class="sf-reference-note">Doorbells</p> | |||
<div class="sf-content-panel"> | |||
<p><b>Description</b></p> | |||
Lobby doorbell. Sends a message to other PCs in the house and/or keyholders. | |||
<div class="sf-choice-grid"> | |||
<div><b>Objects</b><br> | |||
Placeables | |||
</div> | |||
<div><b>Event</b><br> | |||
OnUsed | |||
</div> | |||
</div> | |||
<p><b>Variables</b></p> | |||
<div class="sf-variable-list sf-choice-grid"> | |||
<div><code>ENABLE_SHOUT:Integer</code></div> | |||
<div><code>KEY_TAG:String</code></div> | |||
<div><code>MSG_TXT:String</code></div> | |||
<div><code>NAME_USER:Integer</code></div> | |||
<div><code>PLAY_SOUND:Integer</code></div> | |||
</div> | |||
</div> | |||
=== g_playsound === | |||
<p class="sf-reference-note">Sound Effects</p> | |||
<div class="sf-content-panel"> | |||
<p><b>Description</b></p> | |||
Plays sound effects on used. | |||
<div class="sf-choice-grid"> | |||
<div><b>Objects</b><br> | |||
Placeables | |||
</div> | |||
<div><b>Event</b><br> | |||
OnUsed | |||
</div> | |||
</div> | |||
<p><b>Variables</b></p> | |||
<div class="sf-variable-list sf-choice-grid"> | |||
<div><code>G_PLAYSOUND:String</code></div> | |||
</div> | |||
<div class="sf-note"> | |||
Notes | |||
Plays the sound defined by the <code>G_PLAYSOUND</code> variable when the placeable is used. | |||
</div> | |||
</div> | |||
=== bi_p_cbar_hb === | |||
<p class="sf-reference-note">Drinks Store</p> | |||
<div class="sf-content-panel"> | |||
<p><b>Description</b></p> | |||
Scripts that allows you to add a custom drinks bar to a house, it is fairly complex so the documentation is in a forum topic. See topic: http://sinfar.net/forum/viewtopic.php?t=4561 | |||
<div class="sf-choice-grid"> | |||
<div><b>Objects</b><br> | |||
Placeables | |||
</div> | |||
<div><b>Event</b><br> | |||
OnHeartbeat | |||
</div> | |||
</div> | |||
<p><b>Variables</b></p> | |||
<div class="sf-variable-list sf-choice-grid"> | |||
<div><code>ITEM0:String</code></div> | |||
<div><code>...</code></div> | |||
<div><code>ITEM29:String</code></div> | |||
<div><code>LOCK:Integer</code></div> | |||
</div> | |||
<div class="sf-note"> | |||
Notes | |||
A common request that get is to offer custom drinks for player house bars and breweries. Rather than forcing everyone to go though a builder I thought that it would be nice to offer a script that allows players to make their own drinks inside of housing areas. | |||
To use the script you will need to add a useable container, the plot flag must not be set. Then add bi_p_cbar_hb as the heartbeat script. | |||
The script will look for number string variables beginning with “ITEM” followed by a numeric suffix beginning at zero. ITEM0, ITEM1, ITEM2 and so on. | |||
The | The string value must begin with a type to identify the base item then some parameters. | ||
Currently the script only supports alcoholic drinks in potion bottles that are charged at 50 Gold a time when a bottle is removed from the container. | |||
The syntax for a potion bottles with the one use alcoholic effect is: | |||
PotionA:Name:Appearance:Description | |||
Where Appearance is defined as follows: | |||
ModelTop;ColorTop;ModelMiddle;ColorMiddle;ModelBottom;ColorBottom | |||
ModelTop=1-7 | |||
ColorTop=1-9 | |||
ModelMiddle=1-7 | |||
ColorMiddle=1-9 | |||
ModelBottom=1-24 | |||
ColorBottom=1-9 | |||
eg 1;2;1;2;1;2 | |||
ITEM0 (string) PotionA:Whisky:1;1;1;1;1;1:A bottle of single malt whisky. | |||
If you wish the container to auto lock add LOCK (int) 1 | |||
The script will automatically make the bar plot, so that you do not need to. | |||
Obviously, since you control the Name and Description you are also free to make a RP potions if you wish. The effect will still be alcohol however. | |||
</div> | |||
</div> | |||
=== g_onclickexamine === | |||
<p class="sf-reference-note">Examine a placeable</p> | |||
<div class="sf-content-panel"> | |||
<p><b>Description</b></p> | |||
Immediately examine/open the description of a Placeable when clicking on it. | |||
<div class="sf-choice-grid"> | |||
<div><b>Objects</b><br> | |||
Placeable | |||
</div> | |||
<div><b>Event</b><br> | |||
OnClick | |||
</div> | |||
</div> | |||
<p><b>Variables</b></p> | |||
<div class="sf-variable-list sf-choice-grid"> | |||
<div>None</div> | |||
</div> | |||
</div> | |||
=== bi_p_force_emote === | |||
<p class="sf-reference-note">Force Emote with a Placeable</p> | |||
<div class="sf-content-panel"> | |||
<p><b>Description</b></p> | |||
A simpler shackle script with a few additional options. | |||
Forum discussion: http://sinfar.net/forum/viewtopic.php?t=2743 | |||
<div class="sf-choice-grid"> | |||
<div><b>Objects</b><br> | |||
Placeables | |||
</div> | |||
<div><b>Event</b><br> | |||
OnUsed | |||
</div> | |||
</div> | |||
<p><b>Variables</b></p> | |||
<div class="sf-variable-list sf-choice-grid"> | |||
<div><code>BI1_ANIM:Integer</code></div> | |||
<div><code>BI1_BODYPART:Integer</code></div> | |||
<div><code>BI1_DESC:String</code></div> | |||
<div><code>BI1_DIRECTION:Float</code></div> | |||
<div><code>BI1_DURATION:Float</code></div> | |||
<div><code>BI1_MSG:String</code></div> | |||
<div><code>BI1_PHENO:Integer</code></div> | |||
<div><code>BI1_SPEED:Float</code></div> | |||
<div><code>BI1_VFX:Integer</code></div> | |||
<div><code>BI1_X:Float</code></div> | |||
<div><code>BI1_Y:Float</code></div> | |||
<div><code>BI1_Z:Float</code></div> | |||
<div><code>BI2_ANIM:Integer</code></div> | |||
<div><code>BI2_BODYPART:Integer</code></div> | |||
<div><code>BI2_DESC:String</code></div> | |||
<div><code>BI2_DIRECTION:Float</code></div> | |||
<div><code>BI2_DURATION:Float</code></div> | |||
<div><code>BI2_MSG:String</code></div> | |||
<div><code>BI2_PHENO:Integer</code></div> | |||
<div><code>BI2_SPEED:Float</code></div> | |||
<div><code>BI2_VFX:Integer</code></div> | |||
<div><code>BI2_X:Float</code></div> | |||
<div><code>BI2_Y:Float</code></div> | |||
<div><code>BI2_Z:Float</code></div> | |||
<div><code>BI3_ANIM:Integer</code></div> | |||
<div><code>BI3_BODYPART:Integer</code></div> | |||
<div><code>BI3_DESC:String</code></div> | |||
<div><code>BI3_DIRECTION:Float</code></div> | |||
<div><code>BI3_DURATION:Float</code></div> | |||
<div><code>BI3_MSG:String</code></div> | |||
<div><code>BI3_PHENO:Integer</code></div> | |||
<div><code>BI3_SPEED:Float</code></div> | |||
<div><code>BI3_VFX:Integer</code></div> | |||
<div><code>BI3_X:Float</code></div> | |||
<div><code>BI3_Y:Float</code></div> | |||
<div><code>BI3_Z:Float</code></div> | |||
<div><code>BI_ANIM:Integer</code></div> | |||
<div><code>BI_BODYPART:Integer</code></div> | |||
<div><code>BI_DESC:String</code></div> | |||
<div><code>BI_DIRECTION:Float</code></div> | |||
<div><code>BI_DURATION:Float</code></div> | |||
<div><code>BI_FE_SET:Integer</code></div> | |||
<div><code>BI_KEY:String</code></div> | |||
<div><code>BI_MSG:String</code></div> | |||
<div><code>BI_PHENO:Integer</code></div> | |||
<div><code>BI_SHACKLE_MODE:Integer</code></div> | |||
<div><code>BI_SPEED:Float</code></div> | |||
<div><code>BI_VFX:Integer</code></div> | |||
<div><code>BI_X:Float</code></div> | |||
<div><code>BI_Y:Float</code></div> | |||
<div><code>BI_Z:Float</code></div> | |||
</div> | |||
<div class="sf-note"> | |||
Notes | |||
A shackle script supporting an extensive selection of placeeables and offering the option to customise the emotes. It can also be used without a lock to allow characters to kneel on pillows or perform other emotes relative to a placeable. | |||
</div> | |||
</div> | |||
=== hs_hb_makenboard === | |||
<p class="sf-reference-note">Noticeboards</p> | |||
<div class="sf-content-panel"> | |||
<p><b>Description</b></p> | |||
Turn a usable placeable into a notice board. | |||
<div class="sf-choice-grid"> | |||
<div><b>Objects</b><br> | |||
Placeables | |||
</div> | |||
<div><b>Event</b><br> | |||
OnHeartbeat | |||
</div> | |||
</div> | |||
<p><b>Variables</b></p> | |||
<div class="sf-variable-list sf-choice-grid"> | |||
<div><code>HS_NOTICE_BOARD_TAG_SUFFIX:String</code></div> | |||
</div> | |||
<div class="sf-note"> | |||
Notes | |||
<code>HS_NOTICE_BOARD_TAG_SUFFIX</code> must be set to a unique tag of maximum 10, A-Z,0-9,_ characters. | |||
</div> | |||
</div> | |||
=== hs_tipjar === | |||
'''Obtaining tips''' | |||
<div class="sf-content-panel"> | |||
<p><b>Description</b></p> | |||
Turn a useable placeable with inventory into a tipjar, suitable for collecting gold. | |||
<div class="sf-choice-grid"> | |||
<div><b>Objects</b><br> | |||
Placeables | |||
</div> | |||
<div><b>Event</b><br> | |||
OnHeartbeat | |||
</div> | |||
</div> | |||
<p><b>Variables</b></p> | |||
<div class="sf-variable-list sf-choice-grid"> | |||
</div> | |||
<div class="sf-note"> | |||
Notes | |||
Will turn any placeable with an inventory into a usable tip jar. Ownership is coded to the house owner and will only supply the owner with the gold collected from the jar when they open it. All other uses will only see an empty box. Note, the tip function works only on gold passed, not other items. It is not recommended to use it for anything other than gold. | |||
</div> | |||
</div> | |||
== Portals == | |||
=== hs_portal_used === | |||
<p class="sf-reference-note">In-House Portals</p> | |||
<div class="sf-content-panel"> | |||
<p><b>Description</b></p> | |||
Sets up a portal from one part of a house to another. | |||
<div class="sf-choice-grid"> | |||
<div><b>Objects</b><br> | |||
Placeables | |||
</div> | |||
<div><b>Event</b><br> | |||
OnUsed | |||
</div> | |||
</div> | |||
<p><b>Variables</b></p> | |||
<div class="sf-variable-list sf-choice-grid"> | |||
<div><code>HS_PORTAL_TAG:String</code></div> | |||
<div><code>HS_PORTAL_VFX:Integer</code></div> | |||
<div><code>HS_PORTAL_DELAY:Float</code></div> | |||
</div> | |||
<div class="sf-note"> | |||
Notes | |||
Sets up a portal that can be used to teleport inside a house. It will not allow going from one house to another. Requires <code>hs_spawn_portwp</code> to set up the destination. Use the variable <code>HS_PORTAL_TAG</code> to designate the location - this should match the variable on the object used with <code>hs_spawn_portwp</code>. It shouldn't have more than 10 characters. Set a custom VFX or delay from clicking with the other variables. | |||
</div> | |||
</div> | |||
=== hs_spawn_portwp === | |||
<p class="sf-reference-note">In-House Portals</p> | |||
<div class="sf-content-panel"> | |||
<p><b>Description</b></p> | |||
Sets up a waypoint used with hs_portal_used | |||
<div class="sf-choice-grid"> | |||
<div><b>Objects</b><br> | |||
Placeables | |||
</div> | |||
<div><b>Event</b><br> | |||
OnHeartbeat | |||
</div> | |||
</div> | |||
<p><b>Variables</b></p> | |||
<div class="sf-variable-list sf-choice-grid"> | |||
<div><code>HS_PORTAL_TAG:String</code></div> | |||
<div><code>HS_PORTAL_VFX:Integer</code></div> | |||
<div><code>HS_PORTAL_DELAY:Float</code></div> | |||
</div> | |||
<div class="sf-note"> | |||
Notes | |||
Turn the usable placeable into a waypoint where another placeable can bring characters to with the script hs_portal_used. The variable name should match exactly the <code>HS_PORTAL_TAG</code> defined on the other placeable. It shouldn't have more than 10 characters. | |||
</div> | |||
</div> | |||
== Shackle Scripts == | |||
=== shckle_p_ondeath === | |||
<p class="sf-reference-note">Bashable shackes</p> | |||
<div class="sf-content-panel"> | |||
<p><b>Description</b></p> | |||
The script to allow a PC to bash free of the shackles . | |||
<div class="sf-choice-grid"> | |||
<div><b>Objects</b><br> | |||
Placeables | |||
</div> | |||
<div><b>Event</b><br> | |||
OnDeath | |||
</div> | |||
</div> | |||
<p><b>Variables</b></p> | |||
<div class="sf-variable-list sf-choice-grid"> | |||
<div>NA</div> | |||
</div> | |||
</div> | |||
=== shckle_p_talk === | |||
<p class="sf-reference-note">Bashable shackes</p> | |||
<div class="sf-content-panel"> | |||
<p><b>Description</b></p> | |||
Trigger for shackle placeables. | |||
<div class="sf-choice-grid"> | |||
<div><b>Objects</b><br> | |||
Trigger | |||
</div> | |||
<div><b>Event</b><br> | |||
NA | |||
</div> | |||
</div> | |||
<p><b>Variables</b></p> | |||
<div class="sf-variable-list sf-choice-grid"> | |||
<div>NA</div> | |||
</div> | |||
</div> | |||
=== yasm_shackle === | |||
<p class="sf-reference-note">Full shackle system</p> | |||
<div class="sf-content-panel"> | |||
<p><b>Description</b></p> | |||
This system chains the prisoner to a shackle, allowing them freedom to move and emote whilst secured, but they are trapped within the length of the chain. A tether. | |||
To deploy the system in your house build simply put down a suitable placeable object, set it as usable and give it yasm_shackle as its heartbeat script. | |||
Whether or not you set a lock key determines how securely the prisoner is chained. With no key set the prisoner is released by just click/using the shackle. If a lock key is set the player needs to have an item with the required tag to unlock the prisoner. Keys tags work in the same manner as for doors & containers. | |||
The length of the chain can be controlled by setting a local variable, CHAIN_LENGTH (float), but this is optional and if omitted will default to 2.0 | |||
In game usage is very simple, the prisoner clicks the shackle and they are locked. Usage implies consent to the consequences. If the shackle has a lock then Unlock (rather than Use) to release the prisoner. Escaping is as simple as typing !ooc, and by the time you transition back with !ic the shackle will have reset itself. | |||
You will notice that the system uses a trap mechanism, unfortunately the game engine spews a little bit of spam as players move in and out of the area of an active shackle/trap, sorry but that cant be muted. Just ignore the background noise and have fun emoting with the prisoner. | |||
<div class="sf-choice-grid"> | |||
<div><b>Objects</b><br> | |||
Placeables | |||
</div> | |||
<div><b>Event</b><br> | |||
OnHeartbeat | |||
</div> | |||
</div> | |||
<p><b>Variables</b></p> | |||
<div class="sf-variable-list sf-choice-grid"> | |||
<div>CHAIN_LENGTH: Float</div> | |||
</div> | |||
<div class="sf-note"> | |||
Notes | |||
Discussion: http://sinfar.net/forum/viewtopic.php?f=64&t=1162 | |||
Misc: Set PLC's Key to Owner's Key | |||
</div> | |||
</div> | |||
== Placeable Cleanup == | |||
Script: Placeable Close = pcplc_trash_cls | Script: Placeable Close = pcplc_trash_cls | ||
| Line 671: | Line 1,272: | ||
Important Note: It is not advisable making garbage cans in areas with persistent storage, as item loss can occur when adding or removing persistent storage not properly tagged. | Important Note: It is not advisable making garbage cans in areas with persistent storage, as item loss can occur when adding or removing persistent storage not properly tagged. | ||
== Placeable State and Sound == | |||
Turn Placeables State On/Off on use (with Sound Effects) | Turn Placeables State On/Off on use (with Sound Effects) | ||
Script: Placeable Used = g_plc_onoff | |||
Script: Placeable Used = g_plc_onoff | |||
Script: Placeable Used = g_plc_onoff | Script: Placeable Used = g_plc_onoff | ||
| Line 690: | Line 1,296: | ||
G_PLC_TURN_ON_SOUND : String | G_PLC_TURN_ON_SOUND : String | ||
== Visual Effect Heartbeat == | |||
VFX Heartbeat (with On/Off switch) | VFX Heartbeat (with On/Off switch) | ||
Script: Placeable Heartbeat = plcvfx_self | |||
Script: Placeable Heartbeat = plcvfx_self | |||
Script: Placeable Heartbeat = plcvfx_self | Script: Placeable Heartbeat = plcvfx_self | ||
| Line 711: | Line 1,322: | ||
Variables: PLCVFX_SELF1, PLCVFX_SELF2, PLCVFX_SELF3, Etc… | Variables: PLCVFX_SELF1, PLCVFX_SELF2, PLCVFX_SELF3, Etc… | ||
Script: Placeable Used = plcvfx_switchoff | |||
Script: Placeable Used = plcvfx_switchoff | |||
Script: Placeable Used = plcvfx_switchoff | Script: Placeable Used = plcvfx_switchoff | ||
Turn off/on the visual effect applied by the plcvfx_self heartbeat script. | Turn off/on the visual effect applied by the plcvfx_self heartbeat script. | ||
== Visual Effects on Use == | |||
VFX on Placeable use | VFX on Placeable use | ||
Script: Placeable Used = g_play_vfx | |||
Script: Placeable Used = g_play_vfx | Script: Placeable Used = g_play_vfx | ||
| Line 722: | Line 1,339: | ||
Variable: G_PLAYVFX : Integer | Variable: G_PLAYVFX : Integer | ||
== Visual and Sound Effects on Use == | |||
VFX and SFX on Placable use | VFX and SFX on Placable use | ||
Script: Placeable Used = g_play_vfx_sound | |||
Script: Placeable Used = g_play_vfx_sound | |||
Script: Placeable Used = g_play_vfx_sound | Script: Placeable Used = g_play_vfx_sound | ||
| Line 737: | Line 1,359: | ||
G_PLAYVFX : Integer | G_PLAYVFX : Integer | ||
== Web Client Media Support == | |||
Web Client Media Support | Web Client Media Support | ||
When used a placeable sends an Image, Sound, or Video to web client. | When used a placeable sends an Image, Sound, or Video to web client. | ||
Script: Placeable Used = hs_use_wc_image | |||
Script: Placeable Used = hs_use_wc_image | |||
Script: Placeable Used = hs_use_wc_image | Script: Placeable Used = hs_use_wc_image | ||
| Line 745: | Line 1,372: | ||
Sends an image to the web client of the player using the placeable. | Sends an image to the web client of the player using the placeable. | ||
Variable: HS_IMAGE_URL : | Variable: HS_IMAGE_URL : StringScript: hs_use_wc_image | ||
Placeable Used = hs_use_wc_sound | |||
Script: hs_use_wc_image | Script: hs_use_wc_image | ||
Placeable Used = hs_use_wc_sound | |||
Placeable Used = hs_use_wc_sound | Placeable Used = hs_use_wc_sound | ||
| Line 754: | Line 1,383: | ||
Variable: HS_SOUND_URL : String | Variable: HS_SOUND_URL : String | ||
Script: hs_use_wc_image | |||
Script: hs_use_wc_image | |||
Script: hs_use_wc_image | Script: hs_use_wc_image | ||
| Line 761: | Line 1,392: | ||
Variable: HS_MUSIC_URL : String | Variable: HS_MUSIC_URL : String | ||
Script: hs_use_wc_sound | |||
Script: hs_use_wc_sound | |||
Script: hs_use_wc_sound | Script: hs_use_wc_sound | ||
| Line 767: | Line 1,400: | ||
Sends a video to the web client of the player using the placeable. | Sends a video to the web client of the player using the placeable. | ||
Variable: HS_VIDEO_URL : String | |||
Variable: HS_VIDEO_URL : String | Variable: HS_VIDEO_URL : String | ||
Script: hs_use_wc_video | |||
Script: hs_use_wc_video | Script: hs_use_wc_video | ||
| Line 781: | Line 1,416: | ||
Variable: HS_YOUTUBE_ID : String | Variable: HS_YOUTUBE_ID : String | ||
<div class="sf-footerlinks">[[Main Page|Return to Main Page]] · [[Player Guidance Directory]] · [[:Category:Builders Tools|Builder resources]]</div> | |||
</div> | |||
Latest revision as of 22:51, 10 November 2026
Find a script by purpose, then check its object, event, variables, and usage notes.
On this page
The official reference is here: https://nwn.sinfar.net/houses_scriptlist.php, but you can find more information on how to use those scripts here.
Activate/Deactivate Placeables
bi_activate
Activate/Deactivate Placeables
Description
Set on a useable placeable, this script will by default activate its animation if it has one - for example, if it's a lever or a button, it will be pulled or pushed respectively. Additionally, the variables will change the nature of the Placeable itself if BI_TARGET is not set - if BI_TARGET is a valid object, the object used will still play its animation but the other effects will play on the target. This can be used, for example, to activate a shower in a bathroom by moving the water spray placeable above or below the floor with the variable BI_MOVEZ.
Forum discussion: http://sinfar.net/forum/viewtopic.php?f=64&t=5292
Placeables
OnUsed
Variables
BI_ACTIVATE:IntegerBI_ACTIVATED:IntegerBI_ACTIVATE_NEAREST_SOUND_OBJECT:IntegerBI_BEAM_SOURCE:StringBI_FACE:FloatBI_MOVEX:FloatBI_MOVEY:FloatBI_MOVEZ:FloatBI_RESET:FloatBI_SOUND:StringBI_SOUND_OBJECT_TAG:StringBI_SOUND_ON:IntegerBI_TARGET:StringBI_TARGET1:StringBI_TARGET2:StringBI_TURN:FloatBI_VFX:IntegerNotes
Target Placeables require the script home_tag in the OnHeartbeat event.
BI_ACTIVATE_NEAREST_SOUND_OBJECT which will activate or deactivate (base on the the BI_SOUND_ON variable) the nearest sound object, in addition to the current object.
This script will toggle the animation state of placeable objects and also the illumination status, if the placeable supports that. It also supports lots of other transformations that you may wish to perform on a placable or door.
If the string variable BI_TARGET is not specified, the used object will be activated. Otherwise it will try to active the objects in the area with a matching tag. By default all tags inside player housing are removed so you will need to use the home_tag script to set a house safe tag on the placeable. Outside of housing it words on the normal NWN tagging system. In either case you may only activate things in the same area.
In the event that its not possible to use the same tag for all of the targets, additional target tags can be specified by appending a number to the end of the variable name starting with 1, so the script will check for string BI_TARGET, string BI_TARGET1, string BI_TARGET2 and so on.
The script also supports other transformations:
Move the placeable between two locations, the alternate location is specified using one or more of the following float local variables:
BI_FACE:FloatBI_MOVEX:FloatBI_MOVEY:FloatBI_MOVEZ:Float
A common use for this is to conceal a placeable under the floor then make it appear by setting BI_MOVEZ =0.0 , this works very well for showers.
It is also possible to turn a placeable by a set amount using:BI_TURN:Float
Make the placeable play a sound:BI_SOUND:String
Add a VFX to the placeable - very useful for lighting:BI_VFX:Integer
Also if a beam VFX is required the source tag may be specified using:BI_BEAM_SOURCE:String
If one of the alternative transformations is specified the script will only perform the activation animation when BI_ACTIVATE (int) is set to 1. You can also tell the script that the object is already activated by setting BI_ACTIVATED:Integer to 1.
Likewise if the object is a sound object you may tell the script that its on by setting BI_SOUND_ON:Integer to 1.
The script can also be set to automatically toggle the state back after a set number of seconds:BI_RESET:Float
The default (idle) placeable animation is a problem for the script as it is unable to reliably toggle it into an alternate state. For most placeables the default is the deactivate animation so this is what the script will assume. If this is incorrect an explicit animation must be selected when placing the object. The script will then correctly toggle between either activate/deactivate or open/close.
It may not be possible to use all of the features inside players homes, I suspect that tagging sound objects for example may be impossible. Doors are also re-tagged so it will not be possible to target them inside a home.
bi_activate_trig
Activate/Deactivate Placeables via Trigger
Description
Attaches itself to the closest trigger which will toggle when the first creature enters the trigger and then the last leaves. Otherwise it should be identical to bi_activate, except that the placeable need not be useble.
Placeables
OnHeartbeat
Variables
BI_ACTIVATE:IntegerBI_ACTIVATED:IntegerBI_ACTIVATE_NEAREST_SOUND_OBJECT:IntegerBI_BEAM_SOURCE:StringBI_FACE:FloatBI_MOVEX:FloatBI_MOVEY:FloatBI_MOVEZ:FloatBI_RESET:FloatBI_SOUND:StringBI_SOUND_OBJECT_TAG:StringBI_SOUND_ON:IntegerBI_TARGET:StringBI_TARGET1:StringBI_TARGET2:StringBI_TURN:FloatBI_VFX:IntegerNotes See notes from bi_activate.
bi_activate_osca
Activate/Deactivate Placeables via Spell
Description
A wrapper for bi_activate that triggers when a spell is cast at the placeable. A spell ID should be defined using BI_SPELLID, this will be compared against the spell ID held in the spell.2da file and the spell cast at the placeable.
Placeables
OnHeartbeat
Variables
BI_SPELLID:IntegerBI_ACTIVATE:IntegerBI_ACTIVATED:IntegerBI_ACTIVATE_NEAREST_SOUND_OBJECT:IntegerBI_BEAM_SOURCE:StringBI_FACE:FloatBI_MOVEX:FloatBI_MOVEY:FloatBI_MOVEZ:FloatBI_RESET:FloatBI_SOUND:StringBI_SOUND_OBJECT_TAG:StringBI_SOUND_ON:IntegerBI_TARGET:StringBI_TARGET1:StringBI_TARGET2:StringBI_TURN:FloatBI_VFX:IntegerNotes Use a negative spell ID if you want the check to be disabled and use -2 if you want to to report the spell ID of the spell that its it.
It's also important that you pick a spell that can affect the placeable and that the placeable is not plot, lots of hit points will help.
See additional notes from bi_activate.
The placeable cannot be flagged as Plot. It must be able to take damage for this to work.
Tags
home_tag
Set tags
Description
Set a Placeables Tag Adds a tag to the placeable so that the placeable may be accessed by other scripts.
For security reasons Tags are usually removed or replaced when homes are uploaded, this script provides a safe tag for home builders to work with.
Placeables
OnHeartbeat
Variables
Server script builders should, #include “home_inc_tag” and use one of the following fucntions to get a matching tag:string GetHomeSafeTag(string sOriginalTag); string GetHomeTagByID(string sOriginalTag, int nHomeID)
NPCs
hs_spawn_animnpc
Animated NPCs
Description
Turn a useable placeable into an animated NPC. The NPC can be customized like the hs_store_spawn script.
Forum discussion: http://sinfar.net/forum/viewtopic.php?f=33&t=111
Placeables
OnHeartbeat
Variables
HS_ANIMNPC_PHENOTYPE:IntegerHS_ANIMNPC_ANIMATION:IntegerHS_ANIMNPC_ANIMATION_SPEED:FloatHS_ANIMNPC_TALKTO_ANIMATION:IntegerHS_ANIMNPC_TALKTO_SOUND:StringHS_ANIMNPC_TALKTO_MESSAGE:StringHS_ANIMNPC_ARMOR_APPEARANCE:StringHS_ANIMNPC_BODY_APPEARANCE:StringHS_ANIMNPC_HEADV2:StringHS_ANIMNPC_GENDER:IntegerHS_ANIMNPC_APPEARANCE2_PART1:StringHS_ANIMNPC_APPEARANCE2_PART2:StringHS_ANIMNPC_SCALE:FloatHS_SPAWN_VFX_0:IntegerHS_SPAWN_VFX_1:IntegerHS_SPAWN_VFX_2:IntegerHS_SPAWN_VFX_3:IntegerHS_SPAWN_VFX_4:IntegerHS_SPAWN_VFX_5:IntegerNotes Use !E INFO to get the PHENOTYPE and ANIMATION integers. ANIMATION_SPEED is relative to 1.0, with higher being faster and lower being slower.
TALKTO variables include SOUND as a ResRef of a sound file, animation will fire once when the NPC is activated and the MESSAGE will be said in talk volume.
If using APPEARANCE2 variables, do NOT use Armor, Body, Head or Gender variables. And similar - if you use any of those, do not use APPEARANCE2. APPEARANCE2 is acquired as a full string from a body or tailor model speaking the whole appearance rather than specific parts. Each PART can be max 1024 characters long. If your string exceeds that length, remove accessories/VFX.
hs_spawn_npc
Tailor Models
Description
Replaces the placeable by a given NPC. The placeable must be set as useable. The NPC to spawn is determined by the HS_SPAWN_NPC_ID variable, it can take one of the following values:
1 = Male Tailoring Model
2 = Female Tailoring Model
3 = Male Body Model
4 = Female Body Model
Placeables
OnHeartbeat
Variables
Notes
hs_spawn_deadnpc
Corpses
Description
Turn a useable placeable into dead creature.
Forum discussion: http://sinfar.net/forum/viewtopic.php?t=2809
Placeables
OnHeartbeat
Variables
HS_DEADNPC_APPEARANCE2_PART1:StringHS_DEADNPC_APPEARANCE2_PART2:StringHS_DEADNPC_APPEARANCE_TYPE:IntegerHS_DEADNPC_ARMOR_APPEARANCE:StringHS_DEADNPC_BODY_APPEARANCE:StringHS_DEADNPC_GENDER:IntegerHS_DEADNPC_HEADV2:StringHS_SPAWN_VFX_0:IntegerHS_SPAWN_VFX_1:IntegerHS_SPAWN_VFX_2:IntegerHS_SPAWN_VFX_3:IntegerHS_SPAWN_VFX_4:IntegerHS_SPAWN_VFX_5:IntegerNotes APPEARANCE2 variables are max 1024 characters each. If your string exceeds this, use PART2 as well. Acquired from body or tailor models. If your total string exceeds 2048 characters, remove some VFX/accessories.
APPEARANCE_TYPE is the creature appearance index from the appearance.2da file. Use 6 for base human.
hs_store_spawn
Merchant drones
Description
Must be used in conjunction with hs_store_xferspw. Will transform a usable placeable into a standard merchant with basic conversation options for facilitating sales of player made items to other players.
Placeables
OnHeartbeat
Variables
HS_STORE_MERCHANT_APPEARANCE2_PART1:StringHS_STORE_MERCHANT_APPEARANCE2_PART2:StringHS_STORE_TAG:StringHS_STORE_BONUS_MARK_UP:IntegerHS_STORE_BONUS_MARK_DOWN:IntegerHS_STORE_DIALOG_NPC_WELCOME_ANIMATION:IntegerHS_STORE_DIALOG_NPC_WELCOME_SOUND:StringHS_STORE_DIALOG_NPC_WELCOME_TEXT:StringHS_STORE_DIALOG_PC_NO_TEXT:StringHS_STORE_DIALOG_PC_YES_TEXT:StringHS_SPAWN_VFX_0:Integer (Can go from 0-5)Notes Appearance strings can be used to customize the appearance of the merchant. The toolset has a 1024 character limit per variable. If your appearance string is longer than 2048 characters, you'll need to make it less complex. Store tag is used to differentiate stores in the player home. Multiple stores with multiple tags are supported (for different vendors with different inventories).
Mark up and mark down prices on items function based on a standardized formula.
- price = item value * (x-1000) where x is the markup variable. (You can get the item value of any item by using the player tool on it.).
However there is a hard cap of 10 million gold that can be collected in the chest at any one time. Any gold collected after the cap is hit will be lost. Price and monitor carefully.
hs_store_xferspw
Merchant drone inventory
Description
Must be set to Plot. Must be Useable. And must have invetory.
Placeables
OnHeartbeat
Variables
HS_STORE_TAG:StringNotes Once set, the container can be used to place inventory items into the store for sale to other players. Once placed, the items will disappear and only be available through the Merchant interface used by hs_store_spawn. Gold from all sales is collected when the player opens the chest. This is not security coded, so locking chests is recommended if you want to get paid for your work versus handing out free gold to any nosy person wandering in.
Stacks of items placed in the chest will be sold as stacks. Individual items placed, are sold as single items. Ammo from ammo makers is not sellable and will be discarded if placed in the chest.
Doors and Locking
bi_create_bdoor
Back Doors - to other player houses
Description
Creates a portal from a door or a placeable that can go to another house on the same island/in the same erf. For example, all of Sinfar counts as the same island, whereas cities on Arche Terre are their own - you cannot create a backdoor from Lomidar to Durakiss, but you can create one from Sinifer to Ackalia. Backdoors are one-way, and the opposite side has to be set up correctly for them to go both ways. This is intended to be used to go from one house to another, not to be used within the same house though it will work like that as well.
Doors, Placeables
OnHeartbeat
Variables
BACKDOOR_VFX:IntegerKEY:StringNAME:StringTARGET:StringNOKEY:IntegerNotes
NAME:String and TARGET:String have to match on each end - the NAME of one side matches the TARGET on the other side, and vice-versa.
You cannot make a backdoor portal outside the ERF of your house - that's typically one island but may be one city depending on the server. Backdoors are generally not allowed on Dread Lands server, EXCEPT the Cottage Island.
To ensure it works smoothly, be sure that your NAME and TAG variables are unique, always! They should not exceed 16 characters.
If you do not wish a key, you must include the NOKEY:integer variable set to 1. You should not include NOKEY if you use a key.
Backdoors can fail unless the target house has been loaded onto the server. The house area has to be entered at least once after a reset for that to happen. If it fails, simply navigate to the target house once manually.
bi_create_ebdoor
Back Doors - from house interiors to server areas
Description
Creates a portal from a door (specifically a door) that can go to an area outside of the house, presumably in the adjacent area, but not required. The standard back door script bi_create_bdoor is not well suited for linking to external server side back doors. This is a simplified version that does not require coordination between the server and home builders. Forum discussion: https://forum.sinfar.net/viewtopic.php?f=64&t=12539
Doors, Placeables
OnHeartbeat
Variables
NUMBER:IntegerG_CLOSE_DELAY:IntegerG_CLOSE_LOCK:IntegerNotes
NUMBER:Integer is the number of the back door on the server side, usually 1. G_CLOSE_DELAY:Integer and G_CLOSE_LOCK:Integer work as for g_door_autoclose.
Home Builders
Inside player homes, bi_create_ebdoor will work perfectly without any local variables, just add it as the door's heartbeat script. If this does not work then your house does not have access to any external backdoors, you will need to put in a request for one to be added in the appropriate housing forum.
If your house has access to more than one external back door then you may use the local integer variable named NUMBER to select the door of your choice. By default this will be 1 which will select the first back door.
The script should copy over locking information to the external door from the one inside the house. If no lock information is set, it will alternatively copy over the lock information from the main house door. If you always want the back door unlocked, then set a key value but leave the locked check box empty.
The script will also accept G_CLOSE_DELAY and G_CLOSE_LOCK and apply g_door_autoclose if G_CLOSE_DELAY is set.
g_door_autoclose
Door auto-lose and lock
Description
Automatically closes and optionally locks a door after it's been opened
Doors
OnOpen
Variables
G_CLOSE_DELAY:IntegerG_CLOSE_LOCK:IntegerNotes
The door will automatically close after 15 seconds by default, or however many seconds set by G_CLOSE_DELAY. If G_CLOSE_LOCK is set to 1, it will also lock.
g_door_locker
Lock switches
Description
Lock or unlock the nearest door.
Placeables
OnUsed
Variables
Notes Add a key tag to the door to further restrict access, such as in bedrooms.
Chairs and Sitting
g_bench_sit
Sit-able objects
Description
Creates multiple seats on a bench when used.
Placeables
OnUsed
Variables
g_bench_rsit
Sit-able objects
Description
Creates multiple seats on a bench when used, facing reverse direction.
Placeables
OnUsed
Variables
Notes
Some placeables are reversed. If you use g_bench_sit and your character sits the wrong way, use this one instead.
g_chair_sit
Sit-able objects
Description
For a single seat on a chair or similar.
Placeables
OnUsed
Variables
bi_onclick_sit
Sit-able objects
Description
An alternative sit script supporting benches and the many chairs that do not work correctly with g_chair_sit.
Forum discussion: http://sinfar.net/forum/viewtopic.php?t=2809
Placeables
OnClick
Variables
BI_DIRECTION:FloatBI_PLACES:IntegerBI_RADIUS:FloatBI_WIDTH:FloatBI_X:FloatBI_Y:FloatBI_Z:FloatBI_DEBUG:IntegerNotes Unlike the existing sit scripts which are designed for OnUsed, it should be added as an OnClick script. The script will checks if it knows about the placeable and if there are any local variable parameters. If it knows what to do it will add one or more invisible sit points, correct the elevation of the placeable so that it will meet your characters bottom then remove itself. If I doesn't know what to do it will replace itself with the standard g_chair_sit script and hope for the best.
In most cases the script should work without any local variables but the defaults that I have selected may not be exactly what you want. Most of the time you may as well just add the invisible sit point in the toolset but it you have many chairs or benches to place it may be worth the trouble to use the script and provide your own sit parameters.
As the script only adds sit points on demand it will usually be more efficient than manually placed sit points, and while its more expensive than the bench scripts on its first run it should be cheaper when people use the bench afterwards. That said, its better to use g_chair_sit unless there is a problem with the chair.
BI_RADIUS variable is for curved benches/seats. BI_PLACES is a count from 1-16 with how many seats should be for benches.
Elevate and Rotate
bi_p_elevate
Elevation triggers
Description
Creates an elevated walkable area near or over a (non-static) placeable.
Placeable
OnHeartbeat
Variables
ELEVATION:FloatNotes Apply the script and specify the elevation value on the placeable as a local variable float, then use the toolset to create a generic trigger area over or close to the placeable. Any creature entering the trigger area will then be elevated by the value supplied.
bi_p_elevatestep
Elevation triggers
Description
Creates an elevated walkable area near or over a (non-static) placeable, with steps like a staircase.
Placeable
OnHeartbeat
Variables
ELEVATION:FloatSTEP:IntegerNotes A test version of bi_p_elevate, to allow “steps” that have to be gone up in order, so that simulated upper and lower walkable areas are possible. Character will elevate on any trigger one step higher, even, or any lower numbered trigger. The triggers need to overlap slightly at the points players are to cross from one step to the next.
The STEP variable should be incremented for each step, starting at 1.
g_plc_used_turn
Force turn a placeable
Description
Turns the used placeable by 30 degree, or the number of degree defined by the G_TURN_DEGREE variable. When it turns, you can make it play a sound defined by the variable G_TURN_SOUND.
The placeable will be turned back after 30 seconds, or by the number of second that you set in the G_TURN_BACK_DELAY variable.
Placeable
OnUsed
Variables
G_TURN_DEGREE : Integer
G_TURN_SOUND : StringNotes
Minimap Options
hs_hb_showarea
Reveal the minimap to players.
Description
Any player entering the same area as the placeable with this script will have their minimap revealed.
Placeables
OnHeartbeat
hs_hb_hidearea
Hide the minimap for players.
Description
Any player entering the same area as the placeable with this script will have their minimap hidden.
Placeables
OnHeartbeat
Lights, Music and Buttons
lwjb_jukebox
Jukebox and Lights System
Description
Starts Lil's Jukebox and Light Controller
Placeables
OnUsed
bi_p_lightswitch
Lightswitch
Description
Create a placeable that can turn lights on or off.
Placeables
OnHeartbeat
Variables
SWITCH:IntegerLIGHT:IntegerNAME:StringACTIVATE:IntegerEFFECTS:IntegerEFFECT_1:IntegerEFFECT_2:IntegerEFFECT_3:IntegerEFFECT_4:IntegerNotes
Requires two or more placeables - 1 lightswitch and any number of lights. SWITCH(int)1 variable set on the switch itself and LIGHT(int)1 set on the lights. Use the various EFFECT variables to set extra visual effects if desired. Use ACTIVATE(int)1 if the switch should activate (such as with buttons or levers that are animated). The NAME must be the same for the switch and all lights it's meant to activate.
For VFX, set up to 4 - use EFFECTS(int) to specify how many and EFFECT_# to specify the visual effect number.
yasm_doorbell
Doorbells
Description
Lobby doorbell. Sends a message to other PCs in the house and/or keyholders.
Placeables
OnUsed
Variables
ENABLE_SHOUT:IntegerKEY_TAG:StringMSG_TXT:StringNAME_USER:IntegerPLAY_SOUND:Integer
g_playsound
Sound Effects
Description
Plays sound effects on used.
Placeables
OnUsed
Variables
G_PLAYSOUND:StringNotes
Plays the sound defined by the G_PLAYSOUND variable when the placeable is used.
bi_p_cbar_hb
Drinks Store
Description
Scripts that allows you to add a custom drinks bar to a house, it is fairly complex so the documentation is in a forum topic. See topic: http://sinfar.net/forum/viewtopic.php?t=4561
Placeables
OnHeartbeat
Variables
ITEM0:String...ITEM29:StringLOCK:IntegerNotes A common request that get is to offer custom drinks for player house bars and breweries. Rather than forcing everyone to go though a builder I thought that it would be nice to offer a script that allows players to make their own drinks inside of housing areas.
To use the script you will need to add a useable container, the plot flag must not be set. Then add bi_p_cbar_hb as the heartbeat script.
The script will look for number string variables beginning with “ITEM” followed by a numeric suffix beginning at zero. ITEM0, ITEM1, ITEM2 and so on.
The string value must begin with a type to identify the base item then some parameters.
Currently the script only supports alcoholic drinks in potion bottles that are charged at 50 Gold a time when a bottle is removed from the container.
The syntax for a potion bottles with the one use alcoholic effect is:
PotionA:Name:Appearance:Description
Where Appearance is defined as follows:
ModelTop;ColorTop;ModelMiddle;ColorMiddle;ModelBottom;ColorBottom
ModelTop=1-7
ColorTop=1-9
ModelMiddle=1-7
ColorMiddle=1-9
ModelBottom=1-24
ColorBottom=1-9
eg 1;2;1;2;1;2
ITEM0 (string) PotionA:Whisky:1;1;1;1;1;1:A bottle of single malt whisky.
If you wish the container to auto lock add LOCK (int) 1
The script will automatically make the bar plot, so that you do not need to.
Obviously, since you control the Name and Description you are also free to make a RP potions if you wish. The effect will still be alcohol however.
g_onclickexamine
Examine a placeable
Description
Immediately examine/open the description of a Placeable when clicking on it.
Placeable
OnClick
Variables
bi_p_force_emote
Force Emote with a Placeable
Description
A simpler shackle script with a few additional options. Forum discussion: http://sinfar.net/forum/viewtopic.php?t=2743
Placeables
OnUsed
Variables
BI1_ANIM:IntegerBI1_BODYPART:IntegerBI1_DESC:StringBI1_DIRECTION:FloatBI1_DURATION:FloatBI1_MSG:StringBI1_PHENO:IntegerBI1_SPEED:FloatBI1_VFX:IntegerBI1_X:FloatBI1_Y:FloatBI1_Z:FloatBI2_ANIM:IntegerBI2_BODYPART:IntegerBI2_DESC:StringBI2_DIRECTION:FloatBI2_DURATION:FloatBI2_MSG:StringBI2_PHENO:IntegerBI2_SPEED:FloatBI2_VFX:IntegerBI2_X:FloatBI2_Y:FloatBI2_Z:FloatBI3_ANIM:IntegerBI3_BODYPART:IntegerBI3_DESC:StringBI3_DIRECTION:FloatBI3_DURATION:FloatBI3_MSG:StringBI3_PHENO:IntegerBI3_SPEED:FloatBI3_VFX:IntegerBI3_X:FloatBI3_Y:FloatBI3_Z:FloatBI_ANIM:IntegerBI_BODYPART:IntegerBI_DESC:StringBI_DIRECTION:FloatBI_DURATION:FloatBI_FE_SET:IntegerBI_KEY:StringBI_MSG:StringBI_PHENO:IntegerBI_SHACKLE_MODE:IntegerBI_SPEED:FloatBI_VFX:IntegerBI_X:FloatBI_Y:FloatBI_Z:FloatNotes A shackle script supporting an extensive selection of placeeables and offering the option to customise the emotes. It can also be used without a lock to allow characters to kneel on pillows or perform other emotes relative to a placeable.
hs_hb_makenboard
Noticeboards
Description
Turn a usable placeable into a notice board.
Placeables
OnHeartbeat
Variables
HS_NOTICE_BOARD_TAG_SUFFIX:StringNotes
HS_NOTICE_BOARD_TAG_SUFFIX must be set to a unique tag of maximum 10, A-Z,0-9,_ characters.
hs_tipjar
Obtaining tips
Description
Turn a useable placeable with inventory into a tipjar, suitable for collecting gold.
Placeables
OnHeartbeat
Variables
Notes Will turn any placeable with an inventory into a usable tip jar. Ownership is coded to the house owner and will only supply the owner with the gold collected from the jar when they open it. All other uses will only see an empty box. Note, the tip function works only on gold passed, not other items. It is not recommended to use it for anything other than gold.
Portals
hs_portal_used
In-House Portals
Description
Sets up a portal from one part of a house to another.
Placeables
OnUsed
Variables
HS_PORTAL_TAG:StringHS_PORTAL_VFX:IntegerHS_PORTAL_DELAY:FloatNotes
Sets up a portal that can be used to teleport inside a house. It will not allow going from one house to another. Requires hs_spawn_portwp to set up the destination. Use the variable HS_PORTAL_TAG to designate the location - this should match the variable on the object used with hs_spawn_portwp. It shouldn't have more than 10 characters. Set a custom VFX or delay from clicking with the other variables.
hs_spawn_portwp
In-House Portals
Description
Sets up a waypoint used with hs_portal_used
Placeables
OnHeartbeat
Variables
HS_PORTAL_TAG:StringHS_PORTAL_VFX:IntegerHS_PORTAL_DELAY:FloatNotes
Turn the usable placeable into a waypoint where another placeable can bring characters to with the script hs_portal_used. The variable name should match exactly the HS_PORTAL_TAG defined on the other placeable. It shouldn't have more than 10 characters.
Shackle Scripts
shckle_p_ondeath
Bashable shackes
Description
The script to allow a PC to bash free of the shackles .
Placeables
OnDeath
Variables
shckle_p_talk
Bashable shackes
Description
Trigger for shackle placeables.
Trigger
NA
Variables
yasm_shackle
Full shackle system
Description
This system chains the prisoner to a shackle, allowing them freedom to move and emote whilst secured, but they are trapped within the length of the chain. A tether. To deploy the system in your house build simply put down a suitable placeable object, set it as usable and give it yasm_shackle as its heartbeat script.
Whether or not you set a lock key determines how securely the prisoner is chained. With no key set the prisoner is released by just click/using the shackle. If a lock key is set the player needs to have an item with the required tag to unlock the prisoner. Keys tags work in the same manner as for doors & containers.
The length of the chain can be controlled by setting a local variable, CHAIN_LENGTH (float), but this is optional and if omitted will default to 2.0
In game usage is very simple, the prisoner clicks the shackle and they are locked. Usage implies consent to the consequences. If the shackle has a lock then Unlock (rather than Use) to release the prisoner. Escaping is as simple as typing !ooc, and by the time you transition back with !ic the shackle will have reset itself.
You will notice that the system uses a trap mechanism, unfortunately the game engine spews a little bit of spam as players move in and out of the area of an active shackle/trap, sorry but that cant be muted. Just ignore the background noise and have fun emoting with the prisoner.
Placeables
OnHeartbeat
Variables
Notes Discussion: http://sinfar.net/forum/viewtopic.php?f=64&t=1162 Misc: Set PLC's Key to Owner's Key
Placeable Cleanup
Script: Placeable Close = pcplc_trash_cls
If the placeable has the script “pcplc_trash_cls” in its OnClose event, then it will act as a trash and so its inventory will be cleaned when closed.
Important Note: It is not advisable making garbage cans in areas with persistent storage, as item loss can occur when adding or removing persistent storage not properly tagged.
Placeable State and Sound
Turn Placeables State On/Off on use (with Sound Effects) Script: Placeable Used = g_plc_onoff Script: Placeable Used = g_plc_onoff
Script: Placeable Used = g_plc_onoff
Turn on/off a placeable.
G_PLC_IS_ON: Set this to 1 if the placeable is initially on/activated/open.
G_PLC_TURN_ON_SOUND: Sound ResRef to play when the placeable is turn on.
G_PLC_TURN_OFF_SOUND: Sound ResRef to play when the placeable is turn off.
Variables:
G_PLC_IS_ON : Integer
G_PLC_TURN_OFF_SOUND : String
G_PLC_TURN_ON_SOUND : String
Visual Effect Heartbeat
VFX Heartbeat (with On/Off switch) Script: Placeable Heartbeat = plcvfx_self Script: Placeable Heartbeat = plcvfx_self
Script: Placeable Heartbeat = plcvfx_self
You can add any number of visual effects on a non-static placeable.
For that, you need to add the script “plcvfx_self” in the OnHeartbeat event of the placeable. Then, you need to add 1 variable for each visual effect that you want to see on this placeable.
This variable must be set as follow:
⦁ Type: Integer.
⦁ Name: PLCVFX_SELF#, where # is the index of the visual effect. The first index is 1 so the first visual effect will have “PLCVFX_SELF1” as variable name.
⦁ Value: It is the row index of the visual effect in the visualeffects 2da.
(Note: If you only want to add the light visual effect on a placeable, then you just need to put the script “zep_torchspawn” in the OnHeartbeat event.)
Each visual effect count as 1 dynamic object and so, a placeable with 1 visual effect count as 2 dynamic objects. If it has 3 visual effects, then it count as 4 dynamic objects.
Variables: PLCVFX_SELF1, PLCVFX_SELF2, PLCVFX_SELF3, Etc… Script: Placeable Used = plcvfx_switchoff Script: Placeable Used = plcvfx_switchoff
Script: Placeable Used = plcvfx_switchoff
Turn off/on the visual effect applied by the plcvfx_self heartbeat script.
Visual Effects on Use
VFX on Placeable use Script: Placeable Used = g_play_vfx
Script: Placeable Used = g_play_vfx
Plays a permanent VFX on an object when used, will remove the VFX on a second use. Will also work for instant effects.
Variable: G_PLAYVFX : Integer
Visual and Sound Effects on Use
VFX and SFX on Placable use Script: Placeable Used = g_play_vfx_sound Script: Placeable Used = g_play_vfx_sound
Script: Placeable Used = g_play_vfx_sound
Play a sound and an -instant- visual effect (FNF) when the placeable is used.
Variables:
G_PLAYVFX: visual effect index to display.
G_PLAYSOUND: sound resref to play.
G_PLAYSOUND : String
G_PLAYVFX : Integer
Web Client Media Support
Web Client Media Support
When used a placeable sends an Image, Sound, or Video to web client. Script: Placeable Used = hs_use_wc_image Script: Placeable Used = hs_use_wc_image
Script: Placeable Used = hs_use_wc_image
Sends an image to the web client of the player using the placeable.
Variable: HS_IMAGE_URL : StringScript: hs_use_wc_image Placeable Used = hs_use_wc_sound
Script: hs_use_wc_image Placeable Used = hs_use_wc_sound
Placeable Used = hs_use_wc_sound
Sends a sound to the web client of the player using the placeable.
Variable: HS_SOUND_URL : String Script: hs_use_wc_image Script: hs_use_wc_image
Script: hs_use_wc_image
Placeable Heartbeat = hs_hb_wc_music Web Client Music Loop.
Variable: HS_MUSIC_URL : String Script: hs_use_wc_sound Script: hs_use_wc_sound
Script: hs_use_wc_sound
Placeable Used = hs_use_wc_video
Sends a video to the web client of the player using the placeable. Variable: HS_VIDEO_URL : String
Variable: HS_VIDEO_URL : String Script: hs_use_wc_video
Script: hs_use_wc_video
Placeable Used = hs_use_wc_youtub
Sends a you tube video to the web client of the player using the placeable.
HS_YOUTUBE_ID is the string of your youtube page's URL past “?v=”
(If your URL is http://www.youtube.com/watch?v=AMKYQZHfaf8 then your ID string = AMKYQZHfaf8)
Variable: HS_YOUTUBE_ID : String