House Scripts: Difference between revisions

From Sinfar
No edit summary
Line 152: Line 152:
=== bi_create_bdoor ===
=== bi_create_bdoor ===
{| class="wikitable"
{| class="wikitable"
|+Back Doors
|+Back Doors - to other player houses
!Description !! Objects !! Event !! Variables
!Description !! Objects !! Event !! Variables
|-
|-

Revision as of 18:05, 12 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.

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.

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

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_showarea

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

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.

Variables:

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.

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