House Scripts: Difference between revisions

From Sinfar
No edit summary
No edit summary
 
(26 intermediate revisions by 2 users not shown)
Line 1: Line 1:
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:


== bi_activate ==
{| class="wikitable"
<blockquote>Activate/Deactivate Placeables</blockquote>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 <code>BI_MOVEZ</code>.
|+Briefly the type of script
!Description !! Objects !! Event !! Variables
|-
| String description including forum link if relevant.
| Object Type
| OnWhichEvent
| <code>FIRST VARIABLE</code><br /><code>SECOND VARIABLE</code>
|-
! colspan="4" |Notes
|-
| colspan="4" |Note text.
|}


-->
== Activate/Deactivate Placeables ==
=== bi_activate ===
{| class="wikitable"
|+Activate/Deactivate Placeables
!Description !! Objects !! Event !! Variables
|-
| 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
 
| Placeables
Valid objects: Placeable
| OnUsed
 
| <code>BI_ACTIVATE:Integer</code><br /><code>BI_ACTIVATED:Integer</code><br /><code>BI_ACTIVATE_NEAREST_SOUND_OBJECT:Integer</code><br /><code>BI_BEAM_SOURCE:String</code><br /><code>BI_FACE:Float</code><br /><code>BI_MOVEX:Float</code><br /><code>BI_MOVEY:Float</code><br /><code>BI_MOVEZ:Float</code><br /><code>BI_RESET:Float</code><br /><code>BI_SOUND:String</code><br /><code>BI_SOUND_OBJECT_TAG:String</code><br /><code>BI_SOUND_ON:Integer</code><br /><code>BI_TARGET:String</code><br /><code>BI_TARGET1:String</code><br /><code>BI_TARGET2:String</code><br /><code>BI_TURN:Float</code><br /><code>BI_VFX:Integer</code>
Event: OnUsed
|-
 
! colspan="4" |Notes
Variables:
|-
 
| colspan="4" |Target Placeables require the script <code>[[home_tag]]</code> in the OnHeartbeat event.
* <code>BI_ACTIVATE:Integer</code>
* <code>BI_ACTIVATED:Integer</code>
* <code>BI_ACTIVATE_NEAREST_SOUND_OBJECT:Integer</code>
* <code>BI_BEAM_SOURCE:String</code>
* <code>BI_FACE:Float</code>
* <code>BI_MOVEX:Float</code>
* <code>BI_MOVEY:Float</code>
* <code>BI_MOVEZ:Float</code>
* <code>BI_RESET:Float</code>
* <code>BI_SOUND:String</code>
* <code>BI_SOUND_OBJECT_TAG:String</code>
* <code>BI_SOUND_ON:Integer</code>
* <code>BI_TARGET:String</code>
* <code>BI_TARGET1:String</code>
* <code>BI_TARGET2:String</code>
* <code>BI_TURN:Float</code>
* <code>BI_VFX:Integer</code>
 
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 70:


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.
|}


== bi_activate_trig ==
=== bi_activate_trig ===
<blockquote>Activate/Deactivate Placeables via Trigger</blockquote>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.
{| class="wikitable"
 
|+Activate/Deactivate Placeables via Trigger
Valid Objects: Placeables
!Description !! Objects !! Event !! Variables
 
|-
Event: OnHeartbeat
| 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
Variables: (same as bi_activate)
| OnHeartbeat
 
| <code>BI_ACTIVATE:Integer</code><br /><code>BI_ACTIVATED:Integer</code><br /><code>BI_ACTIVATE_NEAREST_SOUND_OBJECT:Integer</code><br /><code>BI_BEAM_SOURCE:String</code><br /><code>BI_FACE:Float</code><br /><code>BI_MOVEX:Float</code><br /><code>BI_MOVEY:Float</code><br /><code>BI_MOVEZ:Float</code><br /><code>BI_RESET:Float</code><br /><code>BI_SOUND:String</code><br /><code>BI_SOUND_OBJECT_TAG:String</code><br /><code>BI_SOUND_ON:Integer</code><br /><code>BI_TARGET:String</code><br /><code>BI_TARGET1:String</code><br /><code>BI_TARGET2:String</code><br /><code>BI_TURN:Float</code><br /><code>BI_VFX:Integer</code>
* <code>BI_ACTIVATE:Integer</code>
|-
* <code>BI_ACTIVATED:Integer</code>
! colspan="4" |Notes
* <code>BI_ACTIVATE_NEAREST_SOUND_OBJECT:Integer</code>
|-
* <code>BI_BEAM_SOURCE:String</code>
| colspan="4" |See notes from bi_activate.
* <code>BI_FACE:Float</code>
|}
* <code>BI_MOVEX:Float</code>
* <code>BI_MOVEY:Float</code>
* <code>BI_MOVEZ:Float</code>
* <code>BI_RESET:Float</code>
* <code>BI_SOUND:String</code>
* <code>BI_SOUND_OBJECT_TAG:String</code>
* <code>BI_SOUND_ON:Integer</code>
* <code>BI_TARGET:String</code>
* <code>BI_TARGET1:String</code>
* <code>BI_TARGET2:String</code>
* <code>BI_TURN:Float</code>
* <code>BI_VFX:Integer</code>
 
Notes:
 
See notes from bi_activate.
 
== bi_activate_osca ==
<blockquote>Activate/Deactivate Placeables via Spell</blockquote>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.
 
Valid Objects: Placeables
 
Event: OnHeartbeat
 
Variables:
 
* <code>BI_SPELLID:Integer</code>
* <code>BI_ACTIVATE:Integer</code>
* <code>BI_ACTIVATED:Integer</code>
* <code>BI_ACTIVATE_NEAREST_SOUND_OBJECT:Integer</code>
* <code>BI_BEAM_SOURCE:String</code>
* <code>BI_FACE:Float</code>
* <code>BI_MOVEX:Float</code>
* <code>BI_MOVEY:Float</code>
* <code>BI_MOVEZ:Float</code>
* <code>BI_RESET:Float</code>
* <code>BI_SOUND:String</code>
* <code>BI_SOUND_OBJECT_TAG:String</code>
* <code>BI_SOUND_ON:Integer</code>
* <code>BI_TARGET:String</code>
* <code>BI_TARGET1:String</code>
* <code>BI_TARGET2:String</code>
* <code>BI_TURN:Float</code>
* <code>BI_VFX:Integer</code>
 
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.
=== bi_activate_osca ===
{| class="wikitable"
|+Activate/Deactivate Placeables via Spell
!Description !! Objects !! Event !! Variables
|-
| 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
| <code>BI_SPELLID:Integer</code><br /><code>BI_ACTIVATE:Integer</code><br /><code>BI_ACTIVATED:Integer</code><br /><code>BI_ACTIVATE_NEAREST_SOUND_OBJECT:Integer</code><br /><code>BI_BEAM_SOURCE:String</code><br /><code>BI_FACE:Float</code><br /><code>BI_MOVEX:Float</code><br /><code>BI_MOVEY:Float</code><br /><code>BI_MOVEZ:Float</code><br /><code>BI_RESET:Float</code><br /><code>BI_SOUND:String</code><br /><code>BI_SOUND_OBJECT_TAG:String</code><br /><code>BI_SOUND_ON:Integer</code><br /><code>BI_TARGET:String</code><br /><code>BI_TARGET1:String</code><br /><code>BI_TARGET2:String</code><br /><code>BI_TURN:Float</code><br /><code>BI_VFX:Integer</code>
|-
! colspan="4" |Notes
|-
| colspan="4" |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 138: Line 105:
See additional notes from bi_activate.
See additional notes from bi_activate.


== hs_spawn_animnpc ==
The placeable cannot be flagged as Plot. It must be able to take damage for this to work.
<blockquote>Animated NPCs</blockquote>Description: Turn a useable placeable into an animated NPC. The NPC can be customized like the hs_store_spawn script.
|}
 
== NPCs ==
=== hs_spawn_animnpc ===
{| class="wikitable"
|+Animated NPCs
!Description !! Objects !! Event !! Variables
|-
| 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
| Placeables
| OnHeartbeat
| <code>HS_ANIMNPC_PHENOTYPE:Integer</code><br /><code>HS_ANIMNPC_ANIMATION:Integer</code><br /><code>HS_ANIMNPC_ANIMATION_SPEED:Float</code><br /><code>HS_ANIMNPC_TALKTO_ANIMATION:Integer</code><br /><code>HS_ANIMNPC_TALKTO_SOUND:String</code><br /><code>HS_ANIMNPC_TALKTO_MESSAGE:String</code><br /><code>HS_ANIMNPC_ARMOR_APPEARANCE:String</code><br /><code>HS_ANIMNPC_BODY_APPEARANCE:String</code><br /><code>HS_ANIMNPC_HEADV2:String</code><br /><code>HS_ANIMNPC_GENDER:Integer</code><br /><code>HS_ANIMNPC_APPEARANCE2_PART1:String</code><br /><code>HS_ANIMNPC_APPEARANCE2_PART2:String</code><br /><code>HS_ANIMNPC_SCALE:Float</code><br /><code>HS_SPAWN_VFX_0:Integer</code><br /><code>HS_SPAWN_VFX_1:Integer</code><br /><code>HS_SPAWN_VFX_2:Integer</code><br /><code>HS_SPAWN_VFX_3:Integer</code><br /><code>HS_SPAWN_VFX_4:Integer</code><br /><code>HS_SPAWN_VFX_5:Integer</code>
|-
! colspan="4" |Notes
|-
| colspan="4" |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.


Valid Objects: Placeables
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.
 
Event: OnHeartbeat
 
Variables:
 
* <code>HS_ANIMNPC_PHENOTYPE:Integer</code> The animation phenotype. 
* <code>HS_ANIMNPC_ANIMATION:Integer</code> Animation to play. Use the !EINFO command to find out the value for this and the phenotype.
* <code>HS_ANIMNPC_ANIMATION_SPEED:Float</code> Speed of the animation, relative to 1.0.
* <code>HS_ANIMNPC_TALKTO_ANIMATION:Integer</code> Animation to play when talked to.
* <code>HS_ANIMNPC_TALKTO_SOUND:String</code> Sound resref to play when talked to.
* <code>HS_ANIMNPC_TALKTO_MESSAGE:String</code> Message to say when talked to.
* <code>HS_ANIMNPC_ANIMATION:Integer</code> Animation to play idle.
* <code>HS_ANIMNPC_ANIMATION_SPEED:Float</code> Speed of the idle animation relative to 1.0.
* <code>HS_ANIMNPC_ARMOR_APPEARANCE:String</code> XDATA string for armour appearance (do not use with HS_ANIMNPC_APPEARANCE2_PART1 and HS_ANIMNPC_APPEARANCE2_PART2).
* <code>HS_ANIMNPC_BODY_APPEARANCE:String</code> XDATA string for body appearance (do not use with HS_ANIMNPC_APPEARANCE2_PART1 and HS_ANIMNPC_APPEARANCE2_PART2).
* <code>HS_ANIMNPC_HEADV2:String</code> XDATA string for headv2 appearance (do not use with HS_ANIMNPC_APPEARANCE2_PART1 and HS_ANIMNPC_APPEARANCE2_PART2).
* <code>HS_ANIMNPC_GENDER:Integer</code> 0 for male, 1 for female.
* <code>HS_ANIMNPC_PHENOTYPE:Integer</code> 0 for default, 2 for big.
* <code>HS_ANIMNPC_APPEARANCE2_PART1:String</code> Body or trailor model appearance string that includes gender, clothes and body appearance all in one. Each part can be max 1024 characters. If your string exceeds 2048 characters, use less accessories/VFX.
* <code>HS_ANIMNPC_APPEARANCE2_PART2:String</code> Optional, use if Part1 exceeds 1024 characters.
* <code>HS_ANIMNPC_SCALE:Float</code> Min 0.5 and max 2.0 scale relative to 1.0
* <code>HS_SPAWN_VFX_0:Integer</code>
* <code>HS_SPAWN_VFX_1:Integer</code>
* <code>HS_SPAWN_VFX_2:Integer</code>
* <code>HS_SPAWN_VFX_3:Integer</code>
* <code>HS_SPAWN_VFX_4:Integer</code>
* <code>HS_SPAWN_VFX_5:Integer</code>
 
== Back Doors/Portals ==
Script: Door/PLC Heartbeat, Door OnTransitionClick = jj_create_bdoor
 
Variables:


BACKDOOR_VFX : Integer
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.
|}


KEY : String
=== hs_spawn_deadnpc ===
{| class="wikitable"
|+Corpses
!Description !! Objects !! Event !! Variables
|-
| Turn a useable placeable into dead creature.


NAME : String
Forum discussion: http://sinfar.net/forum/viewtopic.php?t=2809
| Placeables
| OnHeartbeat
| <code>HS_DEADNPC_APPEARANCE2_PART1:String</code><br /><code>HS_DEADNPC_APPEARANCE2_PART2:String</code><br /><code>HS_DEADNPC_APPEARANCE_TYPE:Integer</code><br /><code>HS_DEADNPC_ARMOR_APPEARANCE:String</code><br /><code>HS_DEADNPC_BODY_APPEARANCE:String</code><br /><code>HS_DEADNPC_GENDER:Integer</code><br /><code>HS_DEADNPC_HEADV2:String</code><br /><code>HS_SPAWN_VFX_0:Integer</code><br /><code>HS_SPAWN_VFX_1:Integer</code><br /><code>HS_SPAWN_VFX_2:Integer</code><br /><code>HS_SPAWN_VFX_3:Integer</code><br /><code>HS_SPAWN_VFX_4:Integer</code><br /><code>HS_SPAWN_VFX_5:Integer</code>
|-
! colspan="4" |Notes
|-
| colspan="4" |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.


NOKEY : Integer
APPEARANCE_TYPE is the creature appearance index from the appearance.2da file. Use 6 for base human.
|}


TARGET : jj_create_bdoor
== Doors and Locking ==


Placeable Heartbeat jj_create_bdoor
=== bi_create_bdoor ===
{| class="wikitable"
|+Back Doors - to other player houses
!Description !! Objects !! Event !! Variables
|-
| 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
| <code>BACKDOOR_VFX:Integer</code><br /><code>KEY:String</code><br /><code>NAME:String</code><br /><code>TARGET:String</code><br /><code>NOKEY:Integer</code>
|-
! colspan="4" |Notes
|-
| colspan="4" |<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.


For Placeables:
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.


OnHeartbeat script jj_create_bdoor will create a Waypoint on the exact same spot as your placeable you run the script from.
To ensure it works smoothly, be sure that your NAME and TAG variables are unique, always! They should not exceed 16 characters.


Script: OnUse = jj_backdoor will teleport you to the target Waypoint.
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.


For Doors: (actual doors, not placeable ones)
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.
|}


OnHeartbeat script jj_create_bdoor will create a Waypoint on the exact same spot as your placeable you run the script from.
=== bi_create_ebdoor ===
{| class="wikitable"
|+Back Doors - from house interiors to server areas
!Description !! Objects !! Event !! Variables
|-
| 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
| <code>NUMBER:Integer</code><br /><code>G_CLOSE_DELAY:Integer</code><br /><code>G_CLOSE_LOCK:Integer</code>
|-
! colspan="4" |Notes
|-
| colspan="4" |<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.


The OnTransitionClick script jj_backdoor will teleport you to the target Waypoint.
'''Home Builders'''


- This means that you can create links to eachother's houses (if they are on the same Island example: Sinifer - Ackalia).
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.


- Back doors to the outside world (if you coordinate this with the builder of the area).
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.


- Create transitions using only placeables.
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.


Create a placeable, go to its properties, make it plot and usable.
The script will also accept G_CLOSE_DELAY and G_CLOSE_LOCK and apply g_door_autoclose if G_CLOSE_DELAY is set.
|}


In the Scripts tab, set Heartbeat to ii_create_bdoor
=== g_door_autoclose ===
{| class="wikitable"
|+Door auto-lose and lock
!Description !! Objects !! Event !! Variables
|-
| Automatically closes and optionally locks a door after it's been opened
| Doors
| OnOpen
| <code>G_CLOSE_DELAY:Integer</code><br /><code>G_CLOSE_LOCK:Integer</code>
|-
! colspan="4" |Notes
|-
| colspan="4" |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.
|}


Go to the advanced tab and click on the dotted-icon next to variables.
=== g_door_locker ===
{| class="wikitable"
|+Lock switches
!Description !! Objects !! Event !! Variables
|-
| Lock or unlock the nearest door.
| Placeables
| OnUsed
| None
|-
! colspan="4" |Notes
|-
| colspan="4" |Add a key tag to the door to further restrict access, such as in bedrooms.
|}


Fill in the variables:
== Chairs and Sitting ==
=== g_bench_sit ===
{| class="wikitable"
|+Sit-able objects
!Description !! Objects !! Event !! Variables
|-
| Creates multiple seats on a bench when used.
| Placeables
| OnUsed
| None
|}


KEY (string) - I would suggest you use your front-door key for this. This will be your security firewall. Unless the person that wants to port to the location of your placeables has the key in his/her inventory, the link will not work. Example: I_MKEY_765
=== g_bench_rsit ===
{| class="wikitable"
|+Sit-able objects
!Description !! Objects !! Event !! Variables
|-
| Creates multiple seats on a bench when used, facing reverse direction.
| Placeables
| OnUsed
| None
|-
! colspan="4" |Notes
|-
| colspan="4" |Some placeables are reversed. If you use <code>g_bench_sit</code> and your character sits the wrong way, use this one instead.
|}


NAME (string) - The Tag you give the Waypoint created by the placeable.
=== g_chair_sit ===
{| class="wikitable"
|+Sit-able objects
!Description !! Objects !! Event !! Variables
|-
| For a single seat on a chair or similar.
| Placeables
| OnUsed
| None
|}


The tag has to be unique.
=== bi_onclick_sit ===
{| class="wikitable"
|+Sit-able objects
!Description !! Objects !! Event !! Variables
|-
| An alternative sit script supporting benches and the many chairs that do not work correctly with g_chair_sit.


The tag has to be all caps.
Forum discussion: http://sinfar.net/forum/viewtopic.php?t=2809
 
| Placeables
Advised is to use your login name or other unique method of identification.
| OnClick
 
| <code>BI_DIRECTION:Float</code><br /><code>BI_PLACES:Integer</code><br /><code>BI_RADIUS:Float</code><br /><code>BI_WIDTH:Float</code><br /><code>BI_X:Float</code><br /><code>BI_Y:Float</code><br /><code>BI_Z:Float</code><br /><code>BI_DEBUG:Integer</code>
Example: HOME_PAULUSMA_001
|-
 
! colspan="4" |Notes
TARGET (string) - The Tag of the Waypoint this side of the connection will focus on. Example: HOME_PAULUSMA_002
|-
 
| colspan="4" |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.
NOKEY (int) - This variable checks whether a key should be present or not. If set to 1 (true) everybody will be able to port to the waypoint created by the placeable you set this variable on. So if you want people to have a key to port to a certain destination, you can ignore this one altogether. Do not add this one if you want to use a key.
 
Example: 1 (for a key-less transition)
 
Important Notes:
 
- Never log out on a balcony, balustrade or other enclosed out-of-your house nook of the world with the only access being this connection.
 
- You cannot teleport to another house unless that house is loaded into the server.
 
- The only way houses are loaded into the server is by entering it through the main door.
 
- Do not give away your keys lightly. Guard them well, and give them away only, to those you completely trust.
Chairs Sitting
 
Scripts for supporting sittable objects
 
On Use Sitting:
 
Script: g_bench_sit
 
Placeable Used = g_chair_sit
 
sit on a chair
 
Script: g_bench_rsit
 
Placeable Used = g_bench_sit
 
sit on a bench
 
Script: Placeable Used = g_bench_rsit
 
Sit on a bench reversed
 
On Click Sitting:
 
Discussion: http://sinfar.net/forum/viewtopic.php?t=2809
 
Script: Placeable Click = bi_onclick_sit
 
An alternative sit script supporting benches and the many chairs that do not work correctly with g_chair_sit.
 
Variables:
 
BI_DIRECTION : Float
 
BI_PLACES : Integer
 
BI_RADIUS : Float
 
BI_WIDTH : Float
 
BI_X : Float
 
BI_Y : Float
 
BI_Z : Float
 
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 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.
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.
BI_PLACES int The number of sit points to create 1-16
BI_WIDTH int The width of the benches sitting area.
BI_RADIUS float The distance of the focal point for curved benches, can be negative for round/convex benches.
BI_DIRECTION float The relative orientation of the seat area, 180 for reversed seats.
BI_X float The relative sit position backwards, negative values will bring the sit point forwards.
BI_Y float The relative position to the left, negative values will bring the sit point to the right.
BI_Z float The elevation offset that needs to be applied to the chair.
BI_DEBUG int Set this to 1 to enable diagnostic information.


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.
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.
Corpses
Script: Placeable Heartbeat = hs_spawn_deadnpc


Turn a useable placeable into dead creature.
BI_RADIUS variable is for curved benches/seats. BI_PLACES is a count from 1-16 with how many seats should be for benches.
|}


The creature can be customized like the hs_store_spawn script.
== Elevations ==
=== bi_p_elevate ===
{| class="wikitable"
|+ELevation triggers
!Description !! Objects !! Event !! Variables
|-
| Creates an elevated walkable area near or over a (non-static) placeable.
| Placeable
| OnHeartbeat
| <code>ELEVATION:Float</code>
|-
! colspan="4" |Notes
|-
| colspan="4" |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.
|}


HS_DEADNPC_APPEARANCE_TYPE = Creature appearance index from the appearance.2da file.
=== bi_p_elevatestep ===
{| class="wikitable"
|+ELevation triggers
!Description !! Objects !! Event !! Variables
|-
| Creates an elevated walkable area near or over a (non-static) placeable, with steps like a staircase.
| Placeable
| OnHeartbeat
| <code>ELEVATION:Float</code><br /><code>STEP:Integer</code>
|-
! colspan="4" |Notes
|-
| colspan="4" |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.


Variables:
The <code>STEP</code> variable should be incremented for each step, starting at 1.
|}


HS_DEADNPC_APPEARANCE_TYPE : Integer
== Minimap Options ==
=== hs_hb_showarea ===
{| class="wikitable"
|+Reveal the minimap to players.
!Description !! Objects !! Event
|-
| Any player entering the same area as the placeable with this script will have their minimap revealed.
| Placeables
| OnHeartbeat
|}


HS_DEADNPC_ARMOR_APPEARANCE : String
=== hs_hb_hidearea ===
{| class="wikitable"
|+Hide the minimap for players.
!Description !! Objects !! Event
|-
| Any player entering the same area as the placeable with this script will have their minimap hidden.
| Placeables
| OnHeartbeat
|}


HS_DEADNPC_BODY_APPEARANCE : String
== Lights, Music and Buttons ==
=== lwjb_jukebox ===
{| class="wikitable"
|+Jukebox and Lights System
!Description !! Objects !! Event
|-
| Starts Lil's Jukebox and Light Controller
| Placeables
| OnUsed
|}


HS_DEADNPC_GENDER : Integer
=== bi_p_lightswitch ===
{| class="wikitable"
|+Lightswitch
!Description !! Objects !! Event !! Variables
|-
| Create a placeable that can turn lights on or off.
| Placeables
| OnHeartbeat
| <code>SWITCH:Integer</code><br /><code>LIGHT:Integer</code><br /><code>NAME:String</code><br /><code>ACTIVATE:Integer</code><br /><code>EFFECTS:Integer</code><br /><code>EFFECT_1:Integer</code><br /><code>EFFECT_2:Integer</code><br /><code>EFFECT_3:Integer</code><br /><code>EFFECT_4:Integer</code>
|-
! colspan="4" |Notes
|-
| colspan="4" |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.


HS_DEADNPC_HEADV2 : String
For VFX, set up to 4 - use EFFECTS(int) to specify how many and EFFECT_# to specify the visual effect number.
|}


HS_SPAWN_VFX_0 : Integer
=== yasm_doorbell ===
{| class="wikitable"
|+Doorbells
!Description !! Objects !! Event !! Variables
|-
| Lobby doorbell. Sends a message to other PCs in the house and/or keyholders.
| Placeables
| OnUsed
| <code>ENABLE_SHOUT:Integer</code><br /><code>KEY_TAG:String</code><br /><code>MSG_TXT:String</code><br /><code>NAME_USER:Integer</code><br /><code>PLAY_SOUND:Integer</code>
|}


HS_SPAWN_VFX_1 : Integer
=== g_playsound ===
{| class="wikitable"
|+Sound Effects
!Description !! Objects !! Event !! Variables
|-
| Plays sound effects on used.
| Placeables
| OnUsed
| <code>G_PLAYSOUND:String</code>
! colspan="4" |Notes
|-
| colspan="4" |Plays the sound defined by the <code>G_PLAYSOUND</code> variable when the placeable is used.
|}


HS_SPAWN_VFX_2 : Integer
== bi_p_cbar_hb ==
 
{| class="wikitable"
HS_SPAWN_VFX_3 : Integer
|+Drinks Store
 
!Description !! Objects !! Event !! Variables
HS_SPAWN_VFX_4 : Integer
|-
 
| 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
HS_SPAWN_VFX_5 : Integer
| Placeables
Door Autoclose and Locks
| OnHeartbeat
 
| <code>ITEM0:String</code><br /><code>...</code><br /><code>ITEM29:String</code><br /><code>LOCK:Integer</code>
Script: Door Open = g_door_autoclose
|-
 
! colspan="4" |Notes
The door will close itself after a certain number of seconds defined by the variable G_CLOSE_DELAY
|-
 
| colspan="4" |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.
By default it is 15 seconds.
 
If the variable G_CLOSE_LOCK is set to 1, the door will also be locked.
 
Variables:
 
G_CLOSE_DELAY : Integer
 
G_CLOSE_LOCK : Integer
Door Lock Switch
 
Script: Placeable Used = g_door_locker
 
lock/unlock the nearest door
 
Misc: Set Lock to home owner's key to restrict use.
Doorbells
 
Script: Placeable Used = yasm_doorbell
 
Lobby doorbell. Sends a message to other PCs in the house and/or keyholders.
 
Variables:
 
ENABLE_SHOUT : Integer
 
KEY_TAG : String
 
MSG_TXT : String
 
NAME_USER : Integer
 
PLAY_SOUND : Integer
Drinks Merchant
 
Discussion: http://sinfar.net/forum/viewtopic.php?t=4561
 
Script: Placeable Heartbeat = bi_p_cbar_hb
 
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
 
ITEM0 : String .. ITEM29 : String
 
LOCK : Integer
 
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.
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.
Line 432: Line 450:


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.
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.
Elevations
|}
 
Script: Placeable Heartbeat = bi_p_elevate
 
Creates an elevated walkable area near or over a (non-static) placeable. Apply the script and specify the elevation value on the placeable 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.
 
ELEVATION : bi_p_elevate
 
Placeable Heartbeat bi_p_elevatestep
 
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.
 
ELEVATION : Float
 
STEP : Integer
Examine on Click
 
Script: Placeable Click = g_onclickexamine
 
examine the placeable that has been clicked, immediately
Force Emote Placables
 
Discussion: http://sinfar.net/forum/viewtopic.php?t=2743
 
Script: Placeable Used = bi_p_force_emote
 
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.
 
Variables:
 
BI1_ANIM : Integer
 
BI1_BODYPART : Integer
 
BI1_DESC : String
 
BI1_DIRECTION : Float
 
BI1_DURATION : Float
 
BI1_MSG : String
 
BI1_PHENO : Integer
 
BI1_SPEED : Float
 
BI1_VFX : Integer
 
BI1_X : Float
 
BI1_Y : Float
 
BI1_Z : Float
 
BI2_ANIM : Integer
 
BI2_BODYPART : Integer
 
BI2_DESC : String
 
BI2_DIRECTION : Float
 
BI2_DURATION : Float
 
BI2_MSG : String
 
BI2_PHENO : Integer
 
BI2_SPEED : Float
 
BI2_VFX : Integer
 
BI2_X : Float
 
BI2_Y : Float
 
BI2_Z : Float
 
BI3_ANIM : Integer
 
BI3_BODYPART : Integer
 
BI3_DESC : String
 
BI3_DIRECTION : Float
 
BI3_DURATION : Float
 
BI3_MSG : String
 
BI3_PHENO : Integer
 
BI3_SPEED : Float
 
BI3_VFX : Integer
 
BI3_X : Float
 
BI3_Y : Float
 
BI3_Z : Float
 
BI_ANIM : Integer
 
BI_BODYPART : Integer
 
BI_DESC : String
 
BI_DIRECTION : Float
 
BI_DURATION : Float
 
BI_FE_SET : Integer
 
BI_KEY : String
 
BI_MSG : String
 
BI_PHENO : Integer
 
BI_SHACKLE_MODE : Integer
 
BI_SPEED : Float
 
BI_VFX : Integer
 
BI_X : Float
 
BI_Y : Float
 
BI_Z : Float
Explore/Hide Mini-Map
 
Script: Placeable Heartbeat = hs_hb_showarea
 
Any player entering the same area of the placeable with this script will have their minimap explored.
 
Script: Placeable Heartbeat hs_hb_hidearea
 
Any player entering the same area of the placeable with this script will have their minimap unexplored.
Jukeboxes
 
Script: Placeable Used = lwjb_jukebox
 
Starts Lil's Jukebox LWJB.
Light Switches
 
Script: Placeable Heartbeat = bi_p_lightswitch
 
This is the heartbeat set up script for both the activating placeable, and the target placeable. The switch placeable should be usable, and neither placeable should be set to static.
 
Switch needs these variables set:
 
“SWITCH” - int - 1
 
“NAME” - string - common name shared with the placeable to activate.
 
The light needs these set:
 
“LIGHT” - int - 1
 
“NAME” - string - common name shared with the activating placeable.
 
The light also needs the effects and/or activation variables set on it
 
“ACTIVATE” - int - Set to 1 if the activated placeable should play its activate animation when the switch is used.
 
“EFFECTS” - int - 1 to 4 - dur type vfx can be applied to the placeable when turned on.
 
“EFFECT_1” to “EFFECT_4” - int - The number of the Dur type VFX to apply
 
Variables:
 
EFFECTS : Integer
 
EFFECT_1 : Integer
 
EFFECT_2 : Integer
 
EFFECT_3 : Integer
 
EFFECT_4 : Integer
 
LIGHT : Integer
 
NAME : String
 
SWITCH : Integer
Noticeboards
 
Script: Placeable Heartbeat = hs_hb_makenboard
 
Turn a usable placeable into a notice board. HS_NOTICE_BOARD_TAG_SUFFIX must be set to a unique tag of maximum 10, A-Z,0-9,_ characters.
 
Variable: HS_NOTICE_BOARD_TAG_SUFFIX : String
Play Sound Effects on Use
 
Script: Placeable Used = g_playsound
 
Plays the sound resref defined by the G_PLAYSOUND variable
 
Variable: G_PLAYSOUND : String
Persistent Storage
 
Set the placeable to plot, and its inventory will be persistent. To be certain that what you put in an inventory will remain after a reset, make sure that you get a message in your saying that the inventory is persistent, when you open it.
 
If the placeable is not set as a plot object, then it won't be persistent and will have nothing special. (Advisable when making garbage cans in areas with persistant storage, to avoid item loss when adding or removing persistant storage)
Portals
 
Script: Placeable Used = hs_portal_used
 
Teleport the character that used the placeable to a waypoint spawned with the hs_spawn_portwp script and identified with the HS_PORTAL_TAG variable.
 
HS_PORTAL_TAG: Same as the variable used for the hs_spawn_portwp script.
 
HS_PORTAL_VFX (Optional): A visual effect to apply on the character before the teleportation.
 
HS_PORTAL_DELAY (Optional): The time between the placeable action and the teleportation.
 
Variables:
 
HS_PORTAL_DELAY : Float


HS_PORTAL_TAG : String
== g_onclickexamine ==
{| class="wikitable"
|+Examine a placeable
!Description !! Objects !! Event !! Variables
|-
| Immediately examine/open the description of a Placeable when clicking on it.
| Placeable
| OnClick
| None
|}


HS_PORTAL_VFX : Integer
== bi_p_force_emote ==
{| class="wikitable"
|+Force Emote with a Placeable
!Description !! Objects !! Event !! Variables
|-
| A simpler shackle script with a few additional options.
Forum discussion: http://sinfar.net/forum/viewtopic.php?t=2743
| Placeables
| OnUsed
| <code>BI1_ANIM:Integer</code><br /><code>BI1_BODYPART:Integer</code><br /><code>BI1_DESC:String</code><br /><code>BI1_DIRECTION:Float</code><br /><code>BI1_DURATION:Float</code><br /><code>BI1_MSG:String</code><br /><code>BI1_PHENO:Integer</code><br /><code>BI1_SPEED:Float</code><br /><code>BI1_VFX:Integer</code><br /><code>BI1_X:Float</code><br /><code>BI1_Y:Float</code><br /><code>BI1_Z:Float</code><br /><code>BI2_ANIM:Integer</code><br /><code>BI2_BODYPART:Integer</code><br /><code>BI2_DESC:String</code><br /><code>BI2_DIRECTION:Float</code><br /><code>BI2_DURATION:Float</code><br /><code>BI2_MSG:String</code><br /><code>BI2_PHENO:Integer</code><br /><code>BI2_SPEED:Float</code><br /><code>BI2_VFX:Integer</code><br /><code>BI2_X:Float</code><br /><code>BI2_Y:Float</code><br /><code>BI2_Z:Float</code><br /><code>BI3_ANIM:Integer</code><br /><code>BI3_BODYPART:Integer</code><br /><code>BI3_DESC:String</code><br /><code>BI3_DIRECTION:Float</code><br /><code>BI3_DURATION:Float</code><br /><code>BI3_MSG:String</code><br /><code>BI3_PHENO:Integer</code><br /><code>BI3_SPEED:Float</code><br /><code>BI3_VFX:Integer</code><br /><code>BI3_X:Float</code><br /><code>BI3_Y:Float</code><br /><code>BI3_Z:Float</code><br /><code>BI_ANIM:Integer</code><br /><code>BI_BODYPART:Integer</code><br /><code>BI_DESC:String</code><br /><code>BI_DIRECTION:Float</code><br /><code>BI_DURATION:Float</code><br /><code>BI_FE_SET:Integer</code><br /><code>BI_KEY:String</code><br /><code>BI_MSG:String</code><br /><code>BI_PHENO:Integer</code><br /><code>BI_SHACKLE_MODE:Integer</code><br /><code>BI_SPEED:Float</code><br /><code>BI_VFX:Integer</code><br /><code>BI_X:Float</code><br /><code>BI_Y:Float</code><br /><code>BI_Z:Float</code>
|-
! colspan="4" |Notes
|-
| colspan="4" |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.
|}


Script: Placeable Heartbeat = hs_spawn_portwp
== hs_hb_makenboard ==
{| class="wikitable"
|+Noticeboards
!Description !! Objects !! Event !! Variables
|-
| Turn a usable placeable into a notice board.
| Placeables
| OnHeartbeat
| <code>HS_NOTICE_BOARD_TAG_SUFFIX:String</code>
|-
! colspan="4" |Notes
|-
| colspan="4" |<code>HS_NOTICE_BOARD_TAG_SUFFIX</code> must be set to a unique tag of maximum 10, A-Z,0-9,_ characters.
|}


Turn the usable placeable into a waypoint where another placeable can bring characters to with the script hs_portal_used.
== Portals ==
=== hs_portal_used ===
{| class="wikitable"
|+In-House Portals
!Description !! Objects !! Event !! Variables
|-
| Sets up a portal from one part of a house to another.
| Placeables
| OnUsed
| <code>HS_PORTAL_TAG:String</code><br /><code>HS_PORTAL_VFX:Integer</code><br /><code>HS_PORTAL_DELAY:Float</code>
! colspan="4" |Notes
|-
| colspan="4" |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.
|}


HS_PORTAL_TAG = a key word to identify the location in the house. It shouldn't have more than 10 characters.
=== hs_spawn_portwp ===
{| class="wikitable"
|+In-House Portals
!Description !! Objects !! Event !! Variables
|-
| Sets up a waypoint used with hs_portal_used
| Placeables
| OnHeartbeat
| <code>HS_PORTAL_TAG:String</code><br /><code>HS_PORTAL_VFX:Integer</code><br /><code>HS_PORTAL_DELAY:Float</code>
! colspan="4" |Notes
|-
| colspan="4" |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.
|}


Variables:


HS_PORTAL_TAG : String
== Rotate Placable on Use ==
Rotate Placable on Use


Script: Placeable Used = g_plc_used_turn
Script: Placeable Used = g_plc_used_turn

Latest revision as of 12:52, 13 April 2024

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 Objects Event Variables
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 BI_ACTIVATE:Integer
BI_ACTIVATED:Integer
BI_ACTIVATE_NEAREST_SOUND_OBJECT:Integer
BI_BEAM_SOURCE:String
BI_FACE:Float
BI_MOVEX:Float
BI_MOVEY:Float
BI_MOVEZ:Float
BI_RESET:Float
BI_SOUND:String
BI_SOUND_OBJECT_TAG:String
BI_SOUND_ON:Integer
BI_TARGET:String
BI_TARGET1:String
BI_TARGET2:String
BI_TURN:Float
BI_VFX:Integer
Notes
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:Float
  • BI_MOVEX:Float
  • BI_MOVEY:Float
  • BI_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 Objects Event Variables
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 BI_ACTIVATE:Integer
BI_ACTIVATED:Integer
BI_ACTIVATE_NEAREST_SOUND_OBJECT:Integer
BI_BEAM_SOURCE:String
BI_FACE:Float
BI_MOVEX:Float
BI_MOVEY:Float
BI_MOVEZ:Float
BI_RESET:Float
BI_SOUND:String
BI_SOUND_OBJECT_TAG:String
BI_SOUND_ON:Integer
BI_TARGET:String
BI_TARGET1:String
BI_TARGET2:String
BI_TURN:Float
BI_VFX:Integer
Notes
See notes from bi_activate.

bi_activate_osca

Activate/Deactivate Placeables via Spell
Description Objects Event Variables
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 BI_SPELLID:Integer
BI_ACTIVATE:Integer
BI_ACTIVATED:Integer
BI_ACTIVATE_NEAREST_SOUND_OBJECT:Integer
BI_BEAM_SOURCE:String
BI_FACE:Float
BI_MOVEX:Float
BI_MOVEY:Float
BI_MOVEZ:Float
BI_RESET:Float
BI_SOUND:String
BI_SOUND_OBJECT_TAG:String
BI_SOUND_ON:Integer
BI_TARGET:String
BI_TARGET1:String
BI_TARGET2:String
BI_TURN:Float
BI_VFX:Integer
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.

See additional notes from bi_activate.

The placeable cannot be flagged as Plot. It must be able to take damage for this to work.

NPCs

hs_spawn_animnpc

Animated NPCs
Description Objects Event Variables
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 HS_ANIMNPC_PHENOTYPE:Integer
HS_ANIMNPC_ANIMATION:Integer
HS_ANIMNPC_ANIMATION_SPEED:Float
HS_ANIMNPC_TALKTO_ANIMATION:Integer
HS_ANIMNPC_TALKTO_SOUND:String
HS_ANIMNPC_TALKTO_MESSAGE:String
HS_ANIMNPC_ARMOR_APPEARANCE:String
HS_ANIMNPC_BODY_APPEARANCE:String
HS_ANIMNPC_HEADV2:String
HS_ANIMNPC_GENDER:Integer
HS_ANIMNPC_APPEARANCE2_PART1:String
HS_ANIMNPC_APPEARANCE2_PART2:String
HS_ANIMNPC_SCALE:Float
HS_SPAWN_VFX_0:Integer
HS_SPAWN_VFX_1:Integer
HS_SPAWN_VFX_2:Integer
HS_SPAWN_VFX_3:Integer
HS_SPAWN_VFX_4:Integer
HS_SPAWN_VFX_5:Integer
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.

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_deadnpc

Corpses
Description Objects Event Variables
Turn a useable placeable into dead creature.

Forum discussion: http://sinfar.net/forum/viewtopic.php?t=2809

Placeables OnHeartbeat HS_DEADNPC_APPEARANCE2_PART1:String
HS_DEADNPC_APPEARANCE2_PART2:String
HS_DEADNPC_APPEARANCE_TYPE:Integer
HS_DEADNPC_ARMOR_APPEARANCE:String
HS_DEADNPC_BODY_APPEARANCE:String
HS_DEADNPC_GENDER:Integer
HS_DEADNPC_HEADV2:String
HS_SPAWN_VFX_0:Integer
HS_SPAWN_VFX_1:Integer
HS_SPAWN_VFX_2:Integer
HS_SPAWN_VFX_3:Integer
HS_SPAWN_VFX_4:Integer
HS_SPAWN_VFX_5:Integer
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.

Doors and Locking

bi_create_bdoor

Back Doors - to other player houses
Description Objects Event Variables
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 BACKDOOR_VFX:Integer
KEY:String
NAME:String
TARGET:String
NOKEY:Integer
Notes
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 Objects Event Variables
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 NUMBER:Integer
G_CLOSE_DELAY:Integer
G_CLOSE_LOCK:Integer
Notes
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 Objects Event Variables
Automatically closes and optionally locks a door after it's been opened Doors OnOpen G_CLOSE_DELAY:Integer
G_CLOSE_LOCK:Integer
Notes
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 Objects Event Variables
Lock or unlock the nearest door. Placeables OnUsed None
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 Objects Event Variables
Creates multiple seats on a bench when used. Placeables OnUsed None

g_bench_rsit

Sit-able objects
Description Objects Event Variables
Creates multiple seats on a bench when used, facing reverse direction. Placeables OnUsed None
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 Objects Event Variables
For a single seat on a chair or similar. Placeables OnUsed None

bi_onclick_sit

Sit-able objects
Description Objects Event Variables
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 BI_DIRECTION:Float
BI_PLACES:Integer
BI_RADIUS:Float
BI_WIDTH:Float
BI_X:Float
BI_Y:Float
BI_Z:Float
BI_DEBUG:Integer
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.

Elevations

bi_p_elevate

ELevation triggers
Description Objects Event Variables
Creates an elevated walkable area near or over a (non-static) placeable. Placeable OnHeartbeat ELEVATION:Float
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.

bi_p_elevatestep

ELevation triggers
Description Objects Event Variables
Creates an elevated walkable area near or over a (non-static) placeable, with steps like a staircase. Placeable OnHeartbeat ELEVATION:Float
STEP:Integer
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 STEP variable should be incremented for each step, starting at 1.

Minimap Options

hs_hb_showarea

Reveal the minimap to players.
Description Objects Event
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 Objects Event
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 Objects Event
Starts Lil's Jukebox and Light Controller Placeables OnUsed

bi_p_lightswitch

Lightswitch
Description Objects Event Variables
Create a placeable that can turn lights on or off. Placeables OnHeartbeat SWITCH:Integer
LIGHT:Integer
NAME:String
ACTIVATE:Integer
EFFECTS:Integer
EFFECT_1:Integer
EFFECT_2:Integer
EFFECT_3:Integer
EFFECT_4:Integer
Notes
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 Objects Event Variables
Lobby doorbell. Sends a message to other PCs in the house and/or keyholders. Placeables OnUsed ENABLE_SHOUT:Integer
KEY_TAG:String
MSG_TXT:String
NAME_USER:Integer
PLAY_SOUND:Integer

g_playsound

Sound Effects
Description Objects Event Variables
Plays sound effects on used. Placeables OnUsed G_PLAYSOUND:String Notes
Plays the sound defined by the G_PLAYSOUND variable when the placeable is used.

bi_p_cbar_hb

Drinks Store
Description Objects Event Variables
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 ITEM0:String
...
ITEM29:String
LOCK:Integer
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 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 Objects Event Variables
Immediately examine/open the description of a Placeable when clicking on it. Placeable OnClick None

bi_p_force_emote

Force Emote with a Placeable
Description Objects Event Variables
A simpler shackle script with a few additional options.

Forum discussion: http://sinfar.net/forum/viewtopic.php?t=2743

Placeables OnUsed BI1_ANIM:Integer
BI1_BODYPART:Integer
BI1_DESC:String
BI1_DIRECTION:Float
BI1_DURATION:Float
BI1_MSG:String
BI1_PHENO:Integer
BI1_SPEED:Float
BI1_VFX:Integer
BI1_X:Float
BI1_Y:Float
BI1_Z:Float
BI2_ANIM:Integer
BI2_BODYPART:Integer
BI2_DESC:String
BI2_DIRECTION:Float
BI2_DURATION:Float
BI2_MSG:String
BI2_PHENO:Integer
BI2_SPEED:Float
BI2_VFX:Integer
BI2_X:Float
BI2_Y:Float
BI2_Z:Float
BI3_ANIM:Integer
BI3_BODYPART:Integer
BI3_DESC:String
BI3_DIRECTION:Float
BI3_DURATION:Float
BI3_MSG:String
BI3_PHENO:Integer
BI3_SPEED:Float
BI3_VFX:Integer
BI3_X:Float
BI3_Y:Float
BI3_Z:Float
BI_ANIM:Integer
BI_BODYPART:Integer
BI_DESC:String
BI_DIRECTION:Float
BI_DURATION:Float
BI_FE_SET:Integer
BI_KEY:String
BI_MSG:String
BI_PHENO:Integer
BI_SHACKLE_MODE:Integer
BI_SPEED:Float
BI_VFX:Integer
BI_X:Float
BI_Y:Float
BI_Z:Float
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.

hs_hb_makenboard

Noticeboards
Description Objects Event Variables
Turn a usable placeable into a notice board. Placeables OnHeartbeat HS_NOTICE_BOARD_TAG_SUFFIX:String
Notes
HS_NOTICE_BOARD_TAG_SUFFIX must be set to a unique tag of maximum 10, A-Z,0-9,_ characters.

Portals

hs_portal_used

In-House Portals
Description Objects Event Variables
Sets up a portal from one part of a house to another. Placeables OnUsed HS_PORTAL_TAG:String
HS_PORTAL_VFX:Integer
HS_PORTAL_DELAY:Float
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 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 Objects Event Variables
Sets up a waypoint used with hs_portal_used Placeables OnHeartbeat HS_PORTAL_TAG:String
HS_PORTAL_VFX:Integer
HS_PORTAL_DELAY:Float
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 HS_PORTAL_TAG defined on the other placeable. It shouldn't have more than 10 characters.


Rotate Placable on Use

Script: Placeable Used = g_plc_used_turn

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.

Variables:

G_TURN_BACK_DELAY : Integer

G_TURN_DEGREE : Integer

G_TURN_SOUND : String Set a Placables Tag

Script: Placeable Heartbeat = home_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.

Variable: TAG : String

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); Shackles (Bashable)

Script: Placeable Death = shckle_p_ondeath

The script to allow a PC to bash free of the shackles . Script: Placeable Used = shckle_p_talk

Trigger for shackle placeables. Slave Tether

Discussion: http://sinfar.net/forum/viewtopic.php?f=64&t=1162

Script: Placeable Heartbeat = yasm_shackle

Variable: CHAIN_LENGTH : Float

Misc: Set PLC's Key to Owner's Key

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. Stores

Discussion: http://sinfar.net/forum/viewtopic.php?f=64&t=5374

Script: Placeable Heartbeat = hs_store_xferspw

All items put in the inventory of this placeable will be moved to the store identified by the variable HS_STORE_TAG.

Variable: HS_STORE_TAG : String

Script: Placeable Heartbeat = hs_store_spawn

Turn a useable placeable into a merchant NPC. The merchant will open a store identified by the variable HS_STORE_TAG (10 characters max). You can fill that store with the hs_store_xferspw script.

You can control the cost if the items with the following variables:

HS_STORE_BONUS_MARK_UP:

is added to the stores default mark up percentage on items sold (-100 to 100)

HS_STORE_BONUS_MARK_DOWN:

added to the stores default mark down percentage on items bought (-100 to 100)

You can set the properties of the NPC with the following variables:

HS_STORE_MERCHANT_GENDER:

1 for female, 0 for male

HS_STORE_MERCHANT_BODY_APPEARANCE:

Use the body model to get the value of this variable

HS_STORE_MERCHANT_HEADV2:

Use the body model, new heads section, to get the value of this variable

HS_STORE_MERCHANT_ARMOR_APPEARANCE:

Use the tailoring model to get the value of this variable

HS_SPAWN_VFX_0 - HS_SPAWN_VFX_5:

Visual effects (horns, eyes, hat…), from the visualeffects.2da file.

You can control what the NPC say with the following variables:

HS_STORE_DIALOG_NPC_WELCOME_SOUND: Sound resref to play when the dialog start.

HS_STORE_DIALOG_NPC_WELCOME_ANIMATION: Animation to play when the dialog start. Use the !EINFO command to find out the value of this variable.

HS_STORE_DIALOG_NPC_WELCOME_TEXT

HS_STORE_DIALOG_PC_YES_TEXT

HS_STORE_DIALOG_PC_NO_TEXT

Notes: - You can use the web client to copy the values spoken by the body or tailoring models. - You can't get the gold of your sales. This is a non-profit script. If you want to get gold from you items, you have to sell them yourself.

HS_SPAWN_VFX_0 : Integer

HS_SPAWN_VFX_1 : Integer

HS_SPAWN_VFX_2 : Integer

HS_SPAWN_VFX_3 : Integer

HS_SPAWN_VFX_4 : Integer

HS_SPAWN_VFX_5 : Integer

HS_STORE_BONUS_MARK_DOWN : Integer

HS_STORE_BONUS_MARK_UP : Integer

HS_STORE_DIALOG_NPC_WELCOME_ANIMATION : Integer

HS_STORE_DIALOG_NPC_WELCOME_SOUND : String

HS_STORE_DIALOG_NPC_WELCOME_TEXT : String

HS_STORE_DIALOG_PC_NO_TEXT : String

HS_STORE_DIALOG_PC_YES_TEXT : String

HS_STORE_MERCHANT_ARMOR_APPEARANCE : String

HS_STORE_MERCHANT_BODY_APPEARANCE : String

HS_STORE_MERCHANT_GENDER : Integer

HS_STORE_MERCHANT_HEADV2 : String

HS_STORE_TAG : String Tailor NPCs

Script: Placeable Heartbeat = hs_spawn_npc

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

Variable: HS_SPAWN_NPC_ID : Integer Trash Cans

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. Turn Placeables State On/Off on use (with Sound Effects)

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 VFX Heartbeat (with On/Off switch)

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

Turn off/on the visual effect applied by the plcvfx_self heartbeat script. VFX on Placeable use

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 VFX and SFX on Placable use

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

When used a placeable sends an Image, Sound, or Video to web client.

Script: Placeable Used = hs_use_wc_image

Sends an image to the web client of the player using the placeable.

Variable: HS_IMAGE_URL : String

Script: hs_use_wc_image

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

Placeable Heartbeat = hs_hb_wc_music Web Client Music Loop.

Variable: HS_MUSIC_URL : String

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

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