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.
|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
Forum discussion: http://sinfar.net/forum/viewtopic.php?f=64&t=5292
|Target Placeables require the script
home_tag in the OnHeartbeat event.
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
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:
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:
Make the placeable play a sound:
Add a VFX to the placeable - very useful for lighting:
Also if a beam VFX is required the source tag may be specified using:
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
Likewise if the object is a sound object you may tell the script that its on by setting
The script can also be set to automatically toggle the state back after a set number of seconds:
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.
|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.
|See notes from bi_activate.
|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.
|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.
|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
|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.
|Turn a useable placeable into dead creature.
Forum discussion: http://sinfar.net/forum/viewtopic.php?t=2809
|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
|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.
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.
|Automatically closes and optionally locks a door after it's been opened
|The door will automatically close after 15 seconds by default, or however many seconds set by
G_CLOSE_LOCK is set to 1, it will also lock.
|Lock or unlock the nearest door.
|Add a key tag to the door to further restrict access, such as in bedrooms.
Chairs and Sitting
|Creates multiple seats on a bench when used.
|Creates multiple seats on a bench when used, facing reverse direction.
|Some placeables are reversed. If you use
g_bench_sit and your character sits the wrong way, use this one instead.
|For a single seat on a chair or similar.
|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
|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.
|Creates an elevated walkable area near or over a (non-static) placeable.
|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.
|Creates an elevated walkable area near or over a (non-static) placeable, with steps like a staircase.
|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.
|Lobby doorbell. Sends a message to other PCs in the house and/or keyholders.
|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
|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:
Where Appearance is defined as follows:
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.
|Immediately examine/open the description of a Placeable when clicking on it.
|A simpler shackle script with a few additional options.
Forum discussion: http://sinfar.net/forum/viewtopic.php?t=2743
|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_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
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.
HS_PORTAL_DELAY : Float
HS_PORTAL_TAG : String
HS_PORTAL_VFX : Integer
Script: Placeable Heartbeat = hs_spawn_portwp
Turn the usable placeable into a waypoint where another placeable can bring characters to with the script hs_portal_used.
HS_PORTAL_TAG = a key word to identify the location in the house. It shouldn't have more than 10 characters.
HS_PORTAL_TAG : String 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.
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
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
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:
is added to the stores default mark up percentage on items sold (-100 to 100)
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:
1 for female, 0 for male
Use the body model to get the value of this variable
Use the body model, new heads section, to get the value of this variable
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.
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.
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.
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
Placeable Used = hs_use_wc_sound
Sends a sound to the web client of the player using the placeable.
Variable: HS_SOUND_URL : String
Placeable Heartbeat = hs_hb_wc_music Web Client Music Loop.
Variable: HS_MUSIC_URL : String
Placeable Used = hs_use_wc_video
Sends a video to the web client of the player using the placeable.
Variable: HS_VIDEO_URL : String
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