Scripting
LSL Guide
Every script function this grid actually runs, read straight from the region software rather than copied from a wiki — including the wolf* functions that exist only here.
The wolf* functions
Written for this grid and available nowhere else. A script may only do what the object’s owner could do by hand, so region weather needs the estate and parcel weather needs the parcel, and a trailer only couples to a truck with the same owner.
How players use the driving dashboard, Wolf Roleplay, Flight Mode and Sailing Mode, with full examples: Driving, Wolf Roleplay, Flight Mode and Sailing Mode. Scripts that move a Wolf Adventure story on, or hear what it does (the wolfAdventure* functions): Adding your own scripts.
Weather (3 functions)
Set this region's weather. The script's OWNER must hold the region. Key/value pairs: see Wolf_Api.WeatherRulesToJson. TRUE when the grid accepted it, FALSE otherwise.
This region's stored weather as key/value pairs, or an empty list.
Force the weather on the parcel this prim stands in, by writing the keyword form into THIS prim's description — the mechanism the viewers already read. The script's owner must own the parcel (or hold the region).
Errors (1 function)
The last error from a wolf* call on this script, or an empty string.
Vehicle couplings (6 functions)
Give this object a coupler key, the name a rear object uses to find it with wolfAttach. Not a UUID, so it survives rezzing, restarts and region crossings. "" removes the key.
Name a hitch point on this object, in its root prim's frame (+X forward, +Y left, +Z up), for a rear object to couple to. Up to 8 points; setting a name again moves it.
Remove a named hitch point from this object.
Couple this object (the rear) to the object with coupler key frontKey, joining myPoint (root prim frame) to its hitch point pointName. Both must have the same owner and be physical. The joint is made as soon as the points are within reach, and is kept through restarts and region crossings until wolfDetach. Type is WOLF_JOINT_BALL, WOLF_JOINT_FIFTHWHEEL or WOLF_JOINT_COUPLER; options are "yaw", "pitch" (degrees), "reach" and "break" (metres).
Uncouple this object and forget its wolfAttach request.
This object's coupling: [status, front key, point name, front object key]. Status is WOLF_ATTACH_NONE, WOLF_ATTACH_WAITING, WOLF_ATTACH_COUPLED or WOLF_ATTACH_BROKEN.
Driving: wheel, pedals and dashboard (2 functions)
The exact wheel and pedals of a driver sitting on this object (the script needs PERMISSION_TAKE_CONTROLS from them, as control() does), from their Wolf viewer: [steer -1..1 (right +), throttle 0..1, brake 0..1, clutch 0..1, gear (WOLF_DRIVE_GEAR_P/R/N/D or 1..18), buttons (WOLF_DRIVE_BTN_* bits; bits 19+ the truck retarder: stalk = (buttons >> WOLF_DRIVE_RETARDER_SHIFT) & WOLF_DRIVE_RETARDER_MASK, WOLF_DRIVE_BTN_RETARDER_DSC / _AUT / _DSC_UP / _DSC_DOWN), age in seconds] - always exactly 7 items. Sent on change and once a second, so an age over ~2 s means the viewer has gone. An empty list from any other viewer: keep a control() event for those.
Drive the Wolf dashboard of a driver sitting on this object: key/value pairs - type ("car", "truck", "bike", "speedboat", "spaceship", "submarine"), units ("kmh", "mph", "kn"), rpm, max_rpm, redline, max_speed, gear ("P", "R", "N", "D", "1".."18"), fuel, adblue (percent), temp (C), air1, air2 (bar), indicators (0 off, 1 left, 2 right, 3 hazard), lights (0, 1 dipped, 2 main), handbrake, retarder (0-5, the stage braking now), dsc_speed (km/h, downhill speed control's set speed), cruise, drive_time (seconds), odo (km), warnings ("engine,oil,abs,retarder..."), clear; speedboat/spaceship/submarine: throttle (-100..100), trim (-5..5), anchor, engine, mode ("ship", "rocket"), stage, stages (0-9), boost, shield, hull, heat (percent), assist, landing_gear, ballast (0-100), max_depth (m), oxygen, battery (percent), planes (-100..100), periscope. The speed is measured by the viewer. At most 5 a second. TRUE when sent.
Effects: explosions, fire, smoke and camera shake (2 functions)
A script effect drawn by Wolf viewers, e.g. wolfEffect("explosion", llGetPos() + <0,0,1>, ["size", 6, "shake", 0.8]). Effects: explosion, fireball, smoke, sparks, fire, fireworks, dust, shockwave. Keys: size (metres), colour, colour2 (vectors 0..1), duration (seconds), intensity (0.1..2), shake (0..1), shake_radius (metres), sound (TRUE/FALSE), volume (0..1), direction (vector). In this region, within 96 m of the object; an object may start 5 at once then 2 a second. 1 when sent, 0 (wolfGetLastError says why) when refused.
Shake a Wolf viewer's camera: strength 0..1, seconds 0.05..10. NULL_KEY: everyone within 96 m on land the object's owner controls. Only the object's owner, someone sitting on or wearing it, or someone on land the owner controls. 1 when sent (or nobody to shake), 0 when refused.
Roleplay: the game (11 functions)
Make a Wolf Roleplay game for this region, owned by the script's owner, who must hold the region. Rules: name (unique), kind (managed|external), theme (wolves|plain), description, website, rules, logo, currency, symbol, currencyicon (the currency's picture, a texture key), start, playerpay, death (spawn|home|stay), respawn (seconds), spawn (vector - defaults to this object), webhook, webhooksecret, starter (items a player's first join gives, e.g. "meat=3,water=2"). Register the game's own scripts with wolfGameTrustScript. TRUE when created.
Change this region's game (same rules as wolfGameCreate). Only the game's owner.
This region's game as key/value pairs, or an empty list. Includes "forced" (1 when the region forces Game Mode on).
Add or change a stat: label, min, max, start, rate (per minute, + regenerates, - decays), zero (none|die|slow|drain), target and amount (for drain), colour, icon (a texture key; or a short text glyph), visible, order, health (1 = tied to the avatar's health), keep (1 = kept through a respawn: xp, gold). At most 16 stats.
Remove a stat from this region's game.
The names of this region's game stats.
Run an existing game (one you own, or the Wolf Territories default game) on this region.
Stop running a game on this region.
This region's game key, or "" when it runs none.
Where this game's players respawn, on this region.
Receive game events on this channel as chat (from the game's name and key; check the av field - a game script hears every player): join|av, arrive|av (playing on this region now - set up their action bar), leave|av, death|av|killer|cause, respawn|av, zero|av|stat, pay|from|to|amount, item|av|item|+n, equip|av|slot|item, unequip|av|slot|item, target|av|key, buffend|av|id. 0 stops. The region's holder and the game's own scripts hear everyone; a WORN object hears only its own wearer's events.
Roleplay: players, stats and money (20 functions)
Join an avatar to this region's game. The region's holder, the avatar's own worn object, or a game-made item the avatar owns. On a forced region an avatar whose own switch is off is read in as on arrival (playing a moment later) - never re-joined to a game they left.
Take an avatar out of this region's game (their wallet stays).
TRUE when the avatar plays this region's game and is here.
The keys of everyone playing this region's game here.
Every stat back to its start value.
One stat's value. 0 and wolfGetLastError() set when it cannot be read.
Set a stat (held to its min and max). Reaching the minimum runs the stat's zero action.
Add to a stat (negative takes away) - eating, drinking, a stamina drink.
This player's own maximum for a stat - a skill that raises max stamina.
[name, value, max, ...] for every stat.
Take health away. At 0 the player dies and the game respawns them.
Give health back (not to the dead - wolfGameRespawn does that).
Kill the player now.
Bring a dead player back now instead of after the game's respawn time.
The avatar's balance of this game's currency.
Give game currency to a player.
Take game currency from a player; refused when they have too little.
Move game currency from one player to another. The payer's own object, when the game allows players to pay; or the region's holder.
Store a value for this player in this game (class, race, quest step...). "" removes it.
A value stored with wolfGameSetData, or "".
Roleplay: the player's screen (17 functions)
Show a bar on the player's Wolf viewer: name, value, max, colour (#rrggbb), icon (a texture key; or a short text glyph). For games that keep their own stats.
Remove a bar shown with wolfGameShowStat.
Show a balance from your own system on the player's screen ("KR$", 1500). "" hides it.
Show a level and XP bar on the player's screen.
A notice on the player's screen. Type: info, success, warning or danger.
A dialog on the player's Wolf viewer. The button pressed comes back on the channel as chat from the avatar, like llDialog.
Buttons in the player's Roleplay panel: [id, label, id, label...]. A press comes back on the channel as chat from the avatar: the id.
A screen effect: flash, pulse, blur, blackout, desaturate, shake or clear. Strength 0-100, seconds 0-600.
Down (TRUE) or up (FALSE): an overlay on the player's screen, and the region holds them still.
Walking/running speed, 0.1 to 2.0 (1.0 is normal). The region enforces it.
Your own https:// page in the player's viewer: mode panel, overlay or window; width and height 0 for automatic.
Close the page opened by wolfGameShowWeb.
Play a sound that only this player hears (name in this object, or a sound key). Volume 0.0-1.0.
A marker on the player's screen, minimap and world map: id, region ("" = this one), position, label, colour, seconds (0 = until cleared).
Remove a marker ("" removes them all).
A line under the avatar's name tag, seen by everyone using a Wolf viewer. "" removes it.
An information panel in the player's Roleplay floater: title, [label, value, ...].
Roleplay: items and pets (21 functions)
Define a game item (seeds, wheat, bread, lockpicks, a sword): label, icon (a texture key; or a short text glyph), max (per player, 0 = no limit), order; kind ("" | weapon | armour | spell | consumable | material); for weapons and armour a slot (weapons: main, off, ranged; armour: off, head, body, hands, legs, feet, neck, ring) and display stats - damage, range, firemode, magazine, ammo (its ammunition item), twohand (main only), defence. Only the game's owner.
Remove an item's definition (players keep what they hold).
Give a player some of an item. The game's owner or the game's own no-modify items only.
Take some of an item from a player; refused when they have too few.
How many of an item the player holds.
[item, quantity, ...] for everything the player holds.
One atomic swap: take [name, qty, ...] and give [name, qty, ...] - "$" is the game's money. Selling 10 wheat for 50 coins, planting a seed. All or nothing.
Define a pet type (wolf_pup, pony): label, icon (a texture key; or a short text glyph), max (per player, 0 = no limit), order. Only the game's owner.
Remove a pet type no pet still has.
A pet type's stat: label, min, max, start, rate (per minute, keeps running while the pet is in inventory), zero (none|die), colour, icon (a texture key; or a short text glyph), order.
Remove a stat from a pet type.
A new pet for a player (a pet shop, a hatchery, breeding): owner, type, name, [data key, value, ...]. Returns the pet's key - keep it in the pet object (linkset data). "" when refused.
[type, name, owner, alive, age seconds, stat, value, max, ...] - stats as they are NOW, aged by real time.
A value stored with the pet (genes, colour, tricks), or "".
Set a pet stat. The pet owner's own game items, or the game's own items on the game's land.
Add to a pet stat - feeding, playing, grooming.
Store a value with the pet. "" removes it.
Rename a pet.
Give or sell the pet to another player of the game.
Let the pet go: its record is deleted.
[pet key, type, name, alive, ...] for an avatar's pets in this game.
Roleplay: trusted scripts and forced Game Mode (3 functions)
Register a script in this object as one of the game's OWN scripts (by its asset - an edited copy is not). Only the game's owner. The game's own scripts are the only ones that may change players, money, items and pets.
Take a script in this object off the game's own list.
TRUE keeps Game Mode ON for everyone on this region (they cannot switch it off or leave the game here - "so people dont turn it off to avoid getting killed"); FALSE gives them their own choice back. Never changes anyone's own saved switch. The region's holder or a grid god.
Wolf Adventure: stories and games (14 functions)
[adventure, title, revision, ...] (stride 3) for every Wolf Adventure enabled on this region. No web call.
TRUE when the avatar is in a session of a Wolf Adventure enabled on this region. No web call.
[adventure, session, party, act, scene, beat, objective] for the adventure the avatar plays on this region, or [] when none.
Fire a script trigger of a Wolf Adventure on the avatar's party's current beat. adventure "" = the only adventure the avatar plays on this region; data (at most 240 bytes) is kept with the event in the session log. TRUE when the trigger existed and fired. The adventure's owner's scripts, a god's, or the adventure's trusted scripts.
A Wolf Adventure flag's value as text ("1"/"0" for a yes/no flag) for that avatar - player, party or world scope. Only flags marked scriptRead; "" and wolfGetLastError() otherwise.
Set a Wolf Adventure flag marked scriptWrite: "1"/"0"/"true"/"false" for a yes/no flag, a whole number for a counter, text up to the flag's length. TRUE when set; the story's flag triggers run.
Story events to this object as chat on the channel (from the adventure's title and key): start|av|adv|party, beat|av|adv|act|scene|beat, choose|av|adv|decision|option, flag|av|adv|flag|value, reward|av|adv|parcel, end|av|adv|ending, leave|av|adv, signal|av|adv|name|data, battle|av|adv|battle|won or lost, companion|av|adv|character|joined or left. 0 stops. Heard by the adventure owner's scripts, its trusted scripts and the region holder's; a worn object hears only its wearer's events.
The adventure's owner names a script in this object (by its asset - an edited copy is not) as one of the adventure's own (TRUE) or takes that back (FALSE). Its own scripts get the larger request budget and hear its events.
Bind this object as the adventure's chest with that id on this region (TRUE), or unbind it (FALSE): the story gives inventory rewards and rezzes props from it. The object's owner must be the adventure's owner; everything in it (but scripts) must be copyable.
Move the avatar's party to the story box with that id, as a story step would. adventure "" = the only adventure the avatar plays on this region. TRUE when the story took the step. The adventure's owner's scripts, a god's, or the adventure's trusted scripts.
Start the story battle with that id for the avatar's party. adventure "" = the only adventure the avatar plays on this region. The outcome arrives as a battle|av|adv|battle|won or lost event (wolfAdventureListen). The adventure's owner's scripts, a god's, or its trusted scripts.
Give the avatar the story reward with that id. adventure "" = the only adventure the avatar plays on this region. TRUE when given. The adventure's owner's scripts, a god's, or its trusted scripts.
The story character with that id says the text (at most 1000 bytes) on this region. Name the adventure. TRUE when said. The adventure's owner's scripts, a god's, or its trusted scripts.
The story character with that id joins the avatar's party as a companion (TRUE) or leaves it (FALSE). adventure "" = the only adventure the avatar plays on this region. Heard as companion|av|adv|character|joined or left. The adventure's owner's scripts, a god's, or its trusted scripts.
Roleplay: combat (17 functions)
Put an item the player holds into its slot (a weapon or armour item - see wolfGameDefineItem). Kept per player per game. The game's own scripts; players equip from their viewer.
Empty an equipment slot: main, off, ranged, head, body, hands, legs, feet, neck or ring.
[slot, item, ...] - what the player has equipped.
Add or change a button on the player's action bar: label, icon, cooldown (s), cast (s), cost (a stat) and amount, key (hint), enabled, group (shared cooldown), weapon (a slot whose ammo it uses), ammo (rounds per use), target (1 = refused with "No target" when the player has none), order, channel. A press is checked by the region (cooldown, cast, ammo; the cost is TAKEN when the game's own script set it and it is a stat of the game - never down to the minimum of a stat whose emptiness does something, such as health) and comes back on the channel from the avatar's key under the name "#wolfgame" (listen with llListen(channel, "#wolfgame", avatar, "") - no viewer can chat under that name): cast|id|target, use|id|target, interrupted|id. At most 12.
Remove an action-bar button ("" removes them all).
Start an ability's cooldown for this many seconds (0 ends it).
Stop the player's cast in progress (a stun, a hit). Its script hears interrupted|id.
What an equipment slot shows on the player's weapons panel (for games that keep their own weapons): label, icon, damage, range, firemode, defence, ammoname, magazine, ammo, reserve, channel (reload requests come back as reload|slot, from the avatar under the name "#wolfgame"). [] clears it.
A slot's ammo: rounds in the magazine and in reserve (-1 = not shown). Ends a reload. The region takes the rounds an ability uses by itself.
Show a reload on a weapon slot for this many seconds (0 stops it); its abilities cannot fire meanwhile. Call wolfGameSetAmmo when it is done.
[ammo, magazine, reserve, reloading] for a slot.
The player's target frame: target key ("" clears), then name, health, max, level, hostility (hostile|neutral|friendly), icon, text (subtitle), dead. With no health, a player of this game shows their live health.
The player's current target, or NULL_KEY. Players pick targets in their viewer; you hear target|av|key.
Update the health bar on the target frame of everyone targeting this key (a monster taking hits).
A buff or debuff on the player's screen: label, icon, seconds (0 = until removed; given again it restarts), stacks, type (buff|debuff), text. At most 20. You hear buffend|av|id when it runs out.
Remove a buff or debuff ("" removes them all).
A floating combat number: over the target `at` (damage dealt, with a hit marker) or over the player (at = the player or "": damage taken). Kind: hit, crit, heal, miss, dodge, block, immune, absorb. Colour #rrggbb or "".
More wolf functions (17 functions)
Inside a look pad's touch_start: the toucher gives the pad's story character their look (as clicking the pad does). The region writes this call into the pad's own script when the pad is placed; outside a touch event it is refused.
From a worn script (a HUD or an attachment): its wearer breathes WOLF_BREATH_FIRE or WOLF_BREATH_ICE for `seconds` (0.5 to 20; 0 = 3), or WOLF_BREATH_STOP stops a breath. The stream comes from the object the script is in when it is worn on the body, else from the wearer's attachment with "[wolfBreath]" in its description (a WolfAvatars dragon's breath object, worn at the mouth); every viewer sees it, with a sound. In the region's game, players in the breath (WOLF_BREATH_REACH metres from WOLF_BREATH_ORIGIN along the wearer's facing) lose health (ice also slows them) when the wearer is playing too; never on safe land, never anyone not playing. A 4 s rest after each breath. options: [WOLF_BREATH_ORIGIN, vector, WOLF_BREATH_REACH, float]. Returns 1, or 0 with wolfGetLastError saying why. Defined on Wolf_Api.wolfBreath / WolfBreath.
Calls the Wolf plugin function `name` with `args` and returns its answer as a list. Returns an empty list with wolfGetLastError saying why when there is no such plugin function on this region, the plugin refused, ran too long or failed. Defined on Wolf_Api.wolfCall / IWolfPluginCalls.
Like wolfCall, but the answer comes later as dataserver(query, data), where query is the key this returns. For plugin functions that take time (out-of-process services are always asynchronous). Returns NULL_KEY with wolfGetLastError saying why when refused (no dataserver event then). Defined on Wolf_Api.wolfCallAsync / IWolfPluginCalls.
Breaks the build this script is in into its separate prims in one go (like llBreakAllLinks, no script in every prim), lets them fall as temporary physical rubble with an optional outward blast (force in m/s at blast_centre, region coordinates; 0 = they just fall), and after restore_after seconds (10 to 3600) removes the rubble and puts the build back exactly as it was (its scripts start again from state_entry). Needs PERMISSION_CHANGE_LINKS from the owner; every prim must be copy and modify and every item in it copy for the owner; the owner must be allowed to build there. At most 128 pieces fall (the rest stay where they are), started over a few seconds. A build made of one mesh only topples as one piece. Returns 1, or 0 with wolfGetLastError saying why. Defined on Wolf_Api.wolfCollapse / WolfWreck.
The Wolf Environment document of this region (WOLF_ENV_REGION) or of the parcel this object is over (WOLF_ENV_PARCEL), as JSON (read it with llJsonGetValue), or "" when there is none. "" with wolfGetLastError set when it could not be read.
Remove the region's or this parcel's Wolf Environment: the region goes back to its own sky, the parcel to the region's. Same owner rights as wolfEnvironmentSet. Returns "" when done (also when there was none), otherwise the reason.
Change parts of the region's (WOLF_ENV_REGION) or this parcel's (WOLF_ENV_PARCEL) Wolf Environment with WOLF_ENV_* key/value rules; what is not named stays as it is. Checked by the same rules as the Wolf Environment window. The object's owner must hold the region (region) or own the parcel (parcel). Returns "" when done, otherwise the reason.
The country the avatar `agent` (root or child presence in this region) is connected from, as an upper-case ISO 3166-1 alpha-2 code ("GB", "DE") from the region's local IP-to-country database - never the address. "" for a non-avatar key, an NPC, a region without the database, an avatar on a WolfStorm proxy host, or an address with no country in the database (wolfGetLastError says which). Defined on Wolf_Api.wolfGetAgentCountry / WolfGeoCountry.
A fingerprint of the address the avatar `agent` (root or child presence in this region) is connected from: 32 lowercase hex characters, HMAC-SHA256 under a grid secret of "wolf-iphash-v1\n" + the script owner's UUID + "\n" + the address. The same for the same address in all of this owner's objects on every region; unrelated to any other owner's values; never the address. "" for a non-avatar key, an NPC or a region without the secret (wolfGetLastError says which). Defined on Wolf_Api.AgentIPHash.
Controls the WolfNPC this script is in (a resident's own NPC made with the WolfNPC window: a WolfAvatars body brought to life by the region). command is one of AI, BEHAVIOUR, WANDER, GOTO, FOLLOW, SAY, ANIM, ANIM_LOOP, ANIM_STOP, SOUND, HOME, STOP, PAUSE, NAME, SPECIES, TAG, TAGS, PACK, LEADER, GROUP, INDOORS, SHY, VISITORS, SPEED, HUNTABLE, HEALTH, RESPAWN, HUNT, SIGHT, DAMAGE, ATTACK_COOLDOWN, GIVE_UP, CHASE_SPEED, JOB, ROUTINE, PLACE, SIT, VOICE, DAILY_LIMIT, NPC_TALK, WHEN, UNWHEN, DRIVE, ROUTE, PARK, EXIT, PASSENGER; value is its setting as text, e.g. wolfNPC("AI", "I am a wolf who likes to bite people...") or wolfNPC("WHEN", "near|name:Luke Coda|10|anim:dance;sound:luke tune;once=visit"). AI talk and voice use the NPC owner's Wolf Credits. Only works from a script inside the NPC. Returns 1, or 0 with wolfGetLastError saying why. Defined on Wolf_Api.wolfNPC / WolfNPCModule.
Reads the WolfNPC this script is in: "STATE" (intention|awake or asleep|alive or dead|health/max), "CFG" (its settings as JSON) or "INTENT" (what it is doing now). Returns "" with wolfGetLastError saying why when it cannot. Defined on Wolf_Api.wolfNPCInfo / WolfNPCModule.
Raises the boat this script is in, sunk (or still sinking) by wolfSink, back to exactly where and how it was before: position, rotation, physics and particles; any timed restore, return or delete is cancelled. The owner must still be allowed to build where it was. Returns 1, or 0 with wolfGetLastError saying why. Defined on Wolf_Api.wolfRestoreBoat / WolfWreck.
From a script in any piece of a build brought down by wolfCollapse: put the build back now, exactly as it was. Returns 1, or 0 with wolfGetLastError saying why. Defined on Wolf_Api.wolfRestoreBuilding / WolfWreck.
Roll a Wolf viewer's camera about its line of sight: degrees -180..180 (+ right, - left), seconds 0..30 to get there; it stays rolled until the next call, 0 levels it. NULL_KEY: everyone within 96 m on land the object's owner controls. Same avatars and limits as wolfShakeCamera. 1 when sent (or nobody to roll), 0 when refused.
Sinks the boat this script is in: it floods and lists, goes down bow first (WOLF_SINK_BOW), stern first (WOLF_SINK_STERN) or on an even keel (WOLF_SINK_LEVEL) over `seconds` (5 to 120; 0 = 20) and settles on the seabed. Everyone sitting on it is stood up and left floating at the surface. Then, `after_seconds` (10 to 3600) later: WOLF_SINK_STAY (stays a wreck until wolfRestoreBoat), WOLF_SINK_RESTORE (back afloat as it was), WOLF_SINK_RETURN (back to the owner's inventory) or WOLF_SINK_DELETE (gone). effects: WOLF_SINK_BUBBLES and/or WOLF_SINK_DEBRIS particles. It must be over water and the owner allowed to build there. Returns 1, or 0 with wolfGetLastError saying why. Defined on Wolf_Api.wolfSink / WolfWreck.
enable TRUE marks this object (the one the script is in) as a visitor vehicle: while an avatar is seated on it, a region it crosses into judges parcel entry as if that avatar owned it (bans on the avatar, the owner's estate ban, scripts and auto-return still apply; an empty vehicle crosses by the usual rules). Only an object whose owner is the estate owner or an estate manager of the region it is in may be marked. The mark lasts over crossings and restarts, and is lost when the object changes owner or is copied or taken. FALSE takes the mark off. Returns 1, or 0 with wolfGetLastError saying why. Defined on Wolf_Api.wolfVisitorObject / WolfVisitorVehicle.
The rules list, shared by both setters
Key/value pairs in any order; kind is required. The table lists them in the order wolfGetRegionWeather returns them. Every value is an integer percent except move, which is hundredths of a metre per second. An unknown key or an out-of-range value is refused rather than ignored, and wolfGetLastError says which.
| Key | Type | Values | Meaning |
|---|---|---|---|
| kind | string | clear, rain or snow | What falls. Required by both setters. "clear" on a parcel means no weather THERE even when the region is raining — a cave, a covered market. |
| on | integer | 0 or 1 | Region only. Whether the region weather is switched on. A script that sets a kind turns it on unless it says otherwise. |
| level | integer | 1 – 4 | How heavy: 1 light, 2 moderate, 3 heavy, 4 torrential rain / blizzard. The level sets the base particle count and fall speed the other percentages scale. |
| bright | integer | 0 – 200 (%) | Brightness of the precipitation's lit colour. 100 is neutral. |
| tint | integer | 0 – 100 (%) | How far from the kind's neutral colour towards the tint colour. |
| move | integer | 0 – 1000 (hundredths m/s) | Sideways drift the weather leans on. 60 = 0.60 m/s. The direction turns slowly on its own. |
| density | integer | 10 – 4000 (%) | Particle count as a percentage of the level's own figure. Source: Wolf_Api.cs WEATHER_RANGES, the Weather tab's own range since 2026-09-18. |
| velocity | integer | 10 – 300 (%) | Fall speed as a percentage of the level's own figure. |
| size | integer | 10 – 400 (%) | Particle size as a percentage of the kind's own width. |
| vol | integer | 0 – 100 (%) | Weather sound volume. |
| fog | integer | 0 – 100 (%) | Thick air, 0 = none. Independent of the kind: fog with rain, with snow, or on its own under "clear". The number is a visibility: 2000 m × 0.02^(fog/100), so 50 is about 280 m and 100 is 40 m. |
| aurora | integer | 0 – 100 (%) | The northern lights, 0 = none. Night only: the viewers fade it in after dusk and out at dawn, so a script may leave it set all winter. 35 is a faint arc, 70 bright curtains, 100 a storm overhead. |
| colour | string | #rrggbb | The tint colour ("color" is accepted too). Rain's neutral is #aaccff, snow's is #ffffff. |
| sound | integer | 0 or 1 | Whether the weather makes any sound at all. |
| amb | string | none, thunder, steady, wind, distant | The ambience bed. "thunder" and "distant" are storms: they fork lightning and roll thunder in both viewers. |
| near | string | none, soft, heavy, leaves, water | The near layer — the sound of rain on what is around you. |
| acol | string | green, red, purple, blue, pink, multi | The aurora's colour. "multi" cycles through them. |
wolfSetRegionWeather
Sets the weather for the whole region: what falls, how heavily, its colour, movement, density, size and sound, plus fog and the northern lights. Returns 1 when the grid accepted it and 0 when it refused; wolfGetLastError says why. The script's owner must hold the region (estate owner or manager), exactly as the About Land > Weather tab requires, because a script may only do what its owner could do by hand.
Example
default
{
touch_start(integer n)
{
// A heavy thunderstorm: dense rain, leaning on a 1.8 m/s wind, loud.
if (!wolfSetRegionWeather([ "kind", "rain", "level", 3,
"density", 140, "move", 180,
"amb", "thunder", "near", "heavy", "vol", 85 ]))
{
llOwnerSay("Weather refused: " + wolfGetLastError());
}
}
}A snowy night, quiet
wolfSetRegionWeather([ "kind", "snow", "level", 2, "colour", "#e6f0ff",
"tint", 60, "velocity", 80, "amb", "wind", "vol", 40 ]);Clear skies again
wolfSetRegionWeather([ "kind", "clear" ]);
A clear winter night under the northern lights (they only show after dark)
wolfSetRegionWeather([ "kind", "clear", "aurora", 60, "acol", "green" ]);
Fog on its own, about 280 m of visibility
wolfSetRegionWeather([ "kind", "clear", "fog", 50 ]);
Switch the region weather off without forgetting the settings
wolfSetRegionWeather([ "kind", "rain", "on", FALSE ]);
wolfGetRegionWeather
Reads the region's weather as the same key/value list the setter takes, so a script can read it, change one value and hand the whole list straight back. Returns an empty list when the region has no weather record. The pairs come in this order, the same order as the rules table: "kind", "on", "level", "bright", "tint", "move", "density", "velocity", "size", "vol", "fog", "aurora", "colour", "sound", "amb", "near", "acol". "kind" and "on" are always there; any other key the region's record does not hold is left out, so find a value with llListFindList rather than by its position.
Example
default
{
touch_start(integer n)
{
list w = wolfGetRegionWeather();
llOwnerSay("Weather now: " + llDumpList2String(w, " "));
// Make it one level heavier, keeping everything else as it is.
integer i = llListFindList(w, ["level"]);
if (i != -1)
{
integer level = llList2Integer(w, i + 1);
if (level < 4) w = llListReplaceList(w, [level + 1], i + 1, i + 1);
wolfSetRegionWeather(w);
}
}
}wolfSetParcelWeather
Weather for ONE parcel, carried by the prim the script is in: the function writes the weather keyword into the prim's description (the same "wolfrain3 dens=170 amb=thunder" form a builder can type by hand) and the viewers read it from there. The prim must stand on a parcel the script's owner owns (or the owner must hold the region). Parcel weather beats region weather; "clear" on a parcel keeps a region storm out of a cave or a covered market. Returns 1 or 0, and refuses rather than truncates when the options would not fit a 127-character description.
Example
// Put this in a prim on your parcel. The prim can be anything — a rock, a sign,
// an invisible cube — it only needs to sit on the parcel.
default
{
state_entry()
{
// Light rain with leaves rustling nearby, only on this parcel.
if (!wolfSetParcelWeather([ "kind", "rain", "level", 1,
"near", "leaves", "vol", 50 ]))
{
llOwnerSay("Parcel weather refused: " + wolfGetLastError());
}
}
touch_start(integer n)
{
// Touch to make this parcel a dry spot even when the region is raining.
wolfSetParcelWeather([ "kind", "clear" ]);
}
}Turn it off again
llSetObjectDesc(""); // no keyword, no parcel weather — the region's weather returnswolfGetLastError
Why the last wolf* call returned 0: the region refused it (the owner does not hold the region or the parcel, a bad key or value, the weather service could not be reached, or the functions are not enabled on this region). Empty after a call that succeeded.
Example
default
{
touch_start(integer n)
{
// A deliberate mistake: 5 is out of range (1 - 4), so this is refused.
if (!wolfSetRegionWeather([ "kind", "rain", "level", 5 ]))
{
llSay(0, "Refused: " + wolfGetLastError()); // "level must be 1..4"
}
}
}Vehicle couplings
A truck and its trailer, a car and its caravan, a locomotive and its carriages, joined by a real joint in the region’s physics rather than a script chasing the vehicle in front. The front gives itself a key and names its hitch points; the rear asks for “the front with this key, at that point”. Both must belong to the same owner and be physical. The coupling is kept through region restarts, editing and region crossings until the rear calls wolfDetach.
wolfAttach joint types
| Type | Value | What it is |
|---|---|---|
| WOLF_JOINT_BALL | 1 | A tow ball. Every rotation is free. Car and caravan, a boat trailer. |
| WOLF_JOINT_FIFTHWHEEL | 2 | A semi-trailer fifth wheel. Turns and nods within limits, cannot roll against the tractor unit. |
| WOLF_JOINT_COUPLER | 3 | A railway coupler. Like a fifth wheel with tighter limits. Locomotive and carriages. |
The options list
Key/value pairs in any order, or an empty list for the defaults. An unknown key or an out-of-range value is refused rather than ignored, and wolfGetLastError says which.
| Key | Type | Values | Meaning |
|---|---|---|---|
| yaw | float or integer | 0 – 170 (degrees) | How far the rear may turn either side of straight. Fifth wheel 90, coupler 35 by default. Not taken by WOLF_JOINT_BALL, which turns freely. |
| pitch | float or integer | 0 – 80 (degrees) | How far the rear may nod up or down either side of level. Fifth wheel 20, coupler 15 by default. Not taken by WOLF_JOINT_BALL. |
| reach | float or integer | 0.1 – 10 (metres) | The two hitch points join once they are this close, 3 m by default; the rear is then moved the rest of the way. Back the truck up to the trailer and it couples. |
| break | float or integer | 0.1 – 10 (metres) | If a coupled pair is pulled more than this far apart at the hitch, 2 m by default, the coupling breaks and wolfAttachInfo reports WOLF_ATTACH_BROKEN. |
wolfCouplerSetKey
Gives this object — the FRONT of a rig: a tractor unit, a car, a locomotive, a carriage with another behind it — a coupler key. A rear object finds its front by this key with wolfAttach. It is your own name for the vehicle, not a UUID, because a UUID changes every time an object is rezzed; the key is stored in the object and survives taking and rezzing, region restarts and region crossings. Only objects with the same owner couple, so your key never clashes with anyone else's. Several identical trucks can share one key: a trailer couples to whichever of them is backed up to its hitch. "" removes the key. Returns 1, or 0 with wolfGetLastError saying why.
Example
// In the tractor unit's root prim, next to its driving script.
default
{
state_entry()
{
wolfCouplerSetKey("wolfhaul");
// The fifth wheel: 2.8 m behind the root prim's centre, 1.1 m up.
wolfCouplerSetPoint("fifthwheel", <-2.8, 0.0, 1.1>);
}
}Stop anything coupling to this object
wolfCouplerSetKey("");wolfCouplerSetPoint
Names a hitch point on this object for a rear object to couple to: a fifth wheel, a tow ball, a coupler hook. The position is in the ROOT prim's frame (+X forward, +Y left, +Z up — the vehicle frame), wherever in the linkset the script is. An object can have up to 8 points; setting a name again moves that point. Each point takes one rear. Returns 1, or 0 with wolfGetLastError saying why.
Example
// A locomotive with couplers at both ends.
default
{
state_entry()
{
wolfCouplerSetKey("wolfrail");
wolfCouplerSetPoint("rear", <-7.2, 0.0, 0.6>);
wolfCouplerSetPoint("front", < 7.2, 0.0, 0.6>);
}
}Find a point by touch: say where you touched, in root frame
touch_start(integer n) { llOwnerSay((string)((llDetectedTouchPos(0) - llGetRootPosition()) / llGetRootRotation())); }wolfAttach
Couples this object — the REAR: a trailer, a caravan, a carriage — to the front with coupler key frontKey, joining myPoint on this object to the front's hitch point pointName. This is a real joint in the region's physics (ubODE and BulletSim both), not a script chasing the truck: the trailer swings, tracks and is pulled. Both objects must have the same owner and be physical. The request is stored in the object: the joint is made as soon as the two points are within reach (3 m unless you say otherwise), and it is made again after the region restarts, after either object has been edited, and in the next region after a crossing, until wolfDetach. Returns 1 when the request is accepted — check wolfAttachInfo to see it couple.
Example
// In the semi-trailer's root prim. The trailer should NOT have a vehicle motor of its
// own: VEHICLE_TYPE_NONE, or a car type with its motors at zero, whose sideways friction
// is what makes a trailer follow the tractor unit round a corner.
default
{
state_entry()
{
llSetStatus(STATUS_PHYSICS, TRUE);
// The kingpin: 5.5 m ahead of this trailer's centre, 1.1 m up.
if (!wolfAttach("wolfhaul", "fifthwheel", <5.5, 0.0, 1.1>,
WOLF_JOINT_FIFTHWHEEL, [ "yaw", 80 ]))
llOwnerSay("Couple refused: " + wolfGetLastError());
llSetTimerEvent(1.0);
}
timer()
{
integer st = llList2Integer(wolfAttachInfo(), 0);
if (st == WOLF_ATTACH_COUPLED) llSetText("", ZERO_VECTOR, 0.0);
else if (st == WOLF_ATTACH_WAITING) llSetText("Back the truck under me", <1, 1, 0>, 1.0);
else if (st == WOLF_ATTACH_BROKEN) llSetText("Broke away!", <1, 0, 0>, 1.0);
}
}A caravan on a tow ball
wolfAttach("wolfcar", "towball", <3.1, 0.0, 0.45>, WOLF_JOINT_BALL, []);A railway carriage: the same script in every carriage makes a train of any length — each couples its front to the "rear" of whatever is in front of it
wolfCouplerSetKey("wolfrail");
wolfCouplerSetPoint("rear", <-7.0, 0.0, 0.6>);
wolfAttach("wolfrail", "rear", <7.0, 0.0, 0.6>, WOLF_JOINT_COUPLER, []);Re-hitch after it broke away
wolfAttach("wolfhaul", "fifthwheel", <5.5, 0.0, 1.1>, WOLF_JOINT_FIFTHWHEEL, []);wolfAttachInfo
This object's coupling, as [status, front key, point name, front object key]. The status is WOLF_ATTACH_NONE (it asked for none), WOLF_ATTACH_WAITING (asked for, not joined: no front within reach, or one of the two is not physical, is being edited or is crossing a region border), WOLF_ATTACH_COUPLED, or WOLF_ATTACH_BROKEN (pulled apart — it stays broken until wolfAttach or wolfDetach). The front object key is NULL_KEY until a front has been found.
Example
default
{
touch_start(integer n)
{
list info = wolfAttachInfo();
list names = [ "none", "waiting", "coupled", "broken" ];
llOwnerSay("Coupling: " + llList2String(names, llList2Integer(info, 0))
+ " to \"" + llList2String(info, 1) + "\" at \"" + llList2String(info, 2)
+ "\", object " + llList2String(info, 3));
}
}wolfDetach
Uncouples this object and forgets its wolfAttach request, so it will not couple again after a restart or a crossing. Returns 1.
Example
default
{
touch_start(integer n)
{
if (llDetectedKey(0) == llGetOwner())
{
wolfDetach();
llOwnerSay("Uncoupled.");
}
}
}wolfCouplerRemovePoint
Removes a named hitch point. A rear coupled to it is released. Returns 1, or 0 when there is no point by that name.
Example
default
{
touch_start(integer n)
{
if (llDetectedKey(0) == llGetOwner())
wolfCouplerRemovePoint("towball"); // unhitch the caravan for good
}
}Effects: explosions, fire and camera shake
Explosions, fireballs, fire, smoke, sparks, fireworks, dust and shockwaves, drawn as layered particles by WolfViewer and WolfStorm, and a camera shake that fades with distance. The region checks every call: effects only over your own land, shakes only for people your object has a reason to shake, and a limit on how many a second.
wolfEffect effects
| Effect | Size | Lasts | What it is |
|---|---|---|---|
| explosion | 4 m | 1 s | A white flash, a fireball cooling from white-hot to dark red, a shock ring along the ground, sparks and dark debris that bounce, and a smoke column. Shakes the view (0.6) and booms by default. |
| fireball | 3 m | 1 s | A flash and a fireball with a little smoke: no shock ring, sparks or debris, and no shake unless you ask. Booms by default. |
| smoke | 3 m | 6 s | A column that keeps rising and spreading for the duration, grey by default. |
| sparks | 1.5 m | 0.5 s | Hot sparks streaking out along "direction" and falling, bouncing where they land, for the duration. |
| fire | 1.5 m | 10 s | Flames with embers and smoke above them, burning for the duration and leaning along "direction". |
| fireworks | 12 m | 1 s | A sphere of streaking stars: two in three are "colour", one in three "colour2". Plays the firework sound by default. |
| dust | 3 m | 1 s | A cloud of dust rolling out along the ground. |
| shockwave | 6 m | 1 s | A faint flash and a white ring racing out along the ground. |
The rules list
Key/value pairs in any order, or an empty list for the defaults. A number outside a key's range is held to it; an unknown key, a key given twice or a value of the wrong type is refused, and wolfGetLastError says which.
| Key | Type | Values | Meaning |
|---|---|---|---|
| size | float | 0.2 – 30 (metres) | The radius. The default depends on the effect (table above). |
| duration | float | 0.1 – 30 (seconds) | How long it lasts. Matters most for fire, smoke and sparks. |
| intensity | float | 0.1 – 2 | How many particles, 1 = normal. |
| colour | vector | <r, g, b>, each 0 – 1 | The main colour: the fireball, flames, smoke, dust or firework stars. Each effect has its own default (fire orange, smoke grey, dust brown, fireworks red). Sparks are always white-hot to orange and ignore it. |
| colour2 | vector | <r, g, b>, each 0 – 1 | The second colour: an explosion's debris and smoke, a fireball's smoke, one firework star in three (yellow by default). |
| direction | vector | any vector but ZERO_VECTOR | Which way sparks fly and flames lean. Straight up, <0, 0, 1>, by default. |
| shake | float | 0 – 1 | How hard the view shakes at the centre, fading to nothing at shake_radius. 0.6 for an explosion, 0 for the rest. |
| shake_radius | float | 0 – 150 (metres) | How far the shake reaches. By default 8 × size, at most 150 m. |
| sound | integer | TRUE or FALSE | Whether it makes a sound. On by default for explosion, fireball and fireworks. |
| volume | float | 0 – 1 | Sound volume, 1 by default. |
wolfEffect
Sets off an explosion, fireball, smoke, sparks, fire, fireworks, dust or a shockwave at a point, drawn by WolfViewer and WolfStorm (other viewers hear the sound but see nothing). The point must be in this region, within 96 m of the object, and over the object's own parcel or land its owner controls: no explosions on the neighbours. Numbers outside a key's range are held to it; an unknown effect or key, a key given twice or a value of the wrong type refuses the call. An object may set off 5 effects at once and then 2 a second, all of one owner's objects together 10 and then 3 a second, the region 30 and then 10 a second. Returns 1 when sent, or 0 with wolfGetLastError saying why.
Example
default
{
touch_start(integer n)
{
// A big bang a metre above this object: 6 m across, a strong shake nearby.
if (!wolfEffect("explosion", llGetPos() + <0, 0, 1>, [ "size", 6, "shake", 0.8 ]))
{
llOwnerSay("Effect refused: " + wolfGetLastError());
}
}
}A campfire that burns for half a minute
wolfEffect("fire", llGetPos(), [ "size", 0.8, "duration", 30 ]);Green and white fireworks 40 m up
wolfEffect("fireworks", llGetPos() + <0, 0, 40>,
[ "colour", <0.2, 1, 0.3>, "colour2", <1, 1, 1>, "size", 15 ]);Sparks from a grinder, flying out sideways for 3 seconds
wolfEffect("sparks", llGetPos(), [ "direction", <1, 0, 0.3>, "duration", 3 ]);Black smoke from a wreck
wolfEffect("smoke", llGetPos(), [ "colour", <0.1, 0.1, 0.1>, "duration", 20, "size", 4 ]);A quiet explosion that shakes nobody
wolfEffect("explosion", llGetPos(), [ "shake", 0, "sound", FALSE ]);wolfShakeCamera
Shakes an avatar's view: a rough ride, an earthquake, a hard landing. Only someone the object has a reason to shake: its owner, someone sitting on it or wearing it, or someone standing on land the object's owner controls (owns the parcel, it is deeded to the object's group, or the owner is the estate owner or a manager). NULL_KEY shakes everyone within 96 m of the object who qualifies. Only WolfViewer and WolfStorm users feel it. It counts towards the same limits as wolfEffect. Returns 1 when sent, also when there was nobody to shake or the strength is 0, or 0 with wolfGetLastError saying why.
Example
// In a ride: give whoever sits down a jolt as it sets off.
default
{
state_entry()
{
llSitTarget(<0, 0, 0.5>, ZERO_ROTATION); // llAvatarOnSitTarget needs a sit target
}
changed(integer change)
{
if (change & CHANGED_LINK)
{
key rider = llAvatarOnSitTarget();
if (rider != NULL_KEY)
{
if (!wolfShakeCamera(rider, 0.7, 1.5))
llOwnerSay("Shake refused: " + wolfGetLastError());
}
}
}
}An earthquake on your own land: everyone within 96 m, gently, for 8 seconds
wolfShakeCamera(NULL_KEY, 0.3, 8.0);
wolfRollCamera
Rolls an avatar's view about its own line of sight, as a plane banks or a ship lists: positive degrees roll to the right, negative to the left. The camera eases to the angle over the seconds you give and stays there until the next wolfRollCamera; 0 degrees levels it again. Only the up direction turns, so llSetCameraParams, the follow camera and mouselook keep working. The view levels itself when the avatar leaves the region, and never rolls for someone who has switched camera shake off. The same people may be rolled as shaken: the object's owner, someone sitting on it or wearing it, or someone on land the object's owner controls. NULL_KEY rolls everyone within 96 m of the object who qualifies. Only WolfViewer and WolfStorm users see it. It counts towards the same limits as wolfEffect. Returns 1 when sent, also when there was nobody to roll, or 0 with wolfGetLastError saying why.
Example
// A boat that lists as it turns: the rider's view leans with it, then levels.
default
{
state_entry()
{
llSitTarget(<0, 0, 0.5>, ZERO_ROTATION);
}
touch_start(integer n)
{
key rider = llAvatarOnSitTarget();
if (rider == NULL_KEY) return;
if (!wolfRollCamera(rider, 15.0, 1.5)) // lean 15 degrees right over 1.5 s
llOwnerSay("Roll refused: " + wolfGetLastError());
llSleep(4.0);
wolfRollCamera(rider, 0.0, 2.0); // and back level over 2 s
}
}Turn the world upside down for everyone nearby, slowly
wolfRollCamera(NULL_KEY, 180.0, 6.0);
A quick tilt to the left, held
wolfRollCamera(llGetOwner(), -30.0, 0.3);
The Wolf Environment: sky, time of day and weather
The same Wolf Environment the window in World > Wolf World > Wolf Environment sets, from a script: a day/night switch, a storm for an event, an alien sky for a game. A script changes only what it names, is checked by exactly the window's rules, and acts with its owner's rights. Every viewer sees the change; WolfViewer draws it natively.
wolfEnvironmentSet rules
Key/value pairs in any order, each key once. The keys are constants, so a misspelt key does not compile. A value the window would not accept is refused rather than changed, and the answer (and wolfGetLastError) says which.
| Key | Type | Values | Meaning |
|---|---|---|---|
| WOLF_ENV_MODE | string | wolf, on-top, off | wolf: the Wolf Environment draws the whole sky. on-top: your own EEP stays and the weather, cloud, haze, light and colour go on top. off: the region's or parcel's own EEP exactly as set by hand (the settings are kept for later). |
| WOLF_ENV_PRESET | string | earth, alien, sunset-world, twin-suns, toxic, underwater, void | A whole sky at once - atmosphere, suns, moons, stars, clouds, fog and light - as picking it in the window does. |
| WOLF_ENV_PLACE_KIND | string | real, fictional, none | real: a place on Earth (name, latitude, longitude) whose sun, moon and weather are used. fictional: a name and a latitude for the sun's path. none: the equator's sun path. |
| WOLF_ENV_PLACE_NAME | string | up to 200 letters | The place's name, as shown in the viewers. |
| WOLF_ENV_PLACE_LAT | float | -90 – 90 | Latitude: sets how high the sun climbs. |
| WOLF_ENV_PLACE_LON | float | -180 – 180 | Longitude of a real place. |
| WOLF_ENV_TIME_MODE | string | real, grid, zone, fixed, cycle | real: the place's own local time (needs a real place). grid: the grid's clock. zone, fixed and cycle are set by the next three keys. |
| WOLF_ENV_TIME_HOUR | float | 0 – 23.99 | Always this time of day (18.5 is 18:30). Puts the time in "fixed" mode. |
| WOLF_ENV_DAY_HOURS | float | 4 – 168 | A sped-up day: one whole day every this many hours. Puts the time in "cycle" mode. |
| WOLF_ENV_TIME_ZONE | string | a time zone, such as "Europe/London" | The clock of that zone. Puts the time in "zone" mode. |
| WOLF_ENV_WEATHER_SOURCE | string | live, pattern, fixed | live: the real place's real weather (needs a real place). pattern and fixed are set by the next two keys. |
| WOLF_ENV_WEATHER_TYPE | string | clear, fair, cloudy, overcast, rain, storm, snow, fog | This weather, all the time. Makes the weather "fixed". |
| WOLF_ENV_WEATHER_PATTERN | string | settled, changeable, unsettled, stormy, wintry | Weather that changes by itself in that character. Makes the weather follow the "pattern". |
| WOLF_ENV_CLOUDS | integer | 0 – 100, or -1 | Cloud cover in percent; -1 is automatic (as the weather has it). |
| WOLF_ENV_HAZE | integer | 0 – 100 | Extra haze on top of the weather's; 0 adds none. |
| WOLF_ENV_MOOD_TINT | string | neutral, warm, cool, custom | A colour mood over everything. custom uses WOLF_ENV_MOOD_COLOR. |
| WOLF_ENV_MOOD_COLOR | string or vector | "#rrggbb", or <r, g, b> each 0 – 1 | The custom mood colour. A vector part outside 0 – 1 is refused, not clamped. |
| WOLF_ENV_MOOD_STRENGTH | integer | 0 – 100 | How strong the colour mood is. |
| WOLF_ENV_WATER | string | natural, calm, choppy, stormy | The water. natural: the waves follow the wind. |
| WOLF_ENV_SKY | string (JSON) | a JSON object | Merged into the sky block (atmosphere, suns, moons, night, clouds, fog, light - the same keys the window's advanced section saves); what you leave out stays. The sky's label becomes "custom". |
| WOLF_ENV_ZONES | string (JSON) | a JSON list, at most 16 | Replaces the zones: areas or heights with their own weather, haze, fog and light (circle, rect or above). |
wolfEnvironmentGet
Reads the Wolf Environment - the sky, time of day, weather and light set in World > Wolf World > Wolf Environment - of the whole region, or of the parcel this object is over. You get the whole document as JSON, so llJsonGetValue picks out any part of it: ["weather", "type"], ["time", "hour"], ["sky", "suns", 0, "color"]. An empty string means there is no Wolf Environment there (the sky is the region's own); if it could not be read, the empty string comes with wolfGetLastError saying why. Anyone's script may read it. A read is kept for 10 seconds, so a script that asks again within that time gets the same answer without asking the grid.
Example
default
{
touch_start(integer n)
{
string doc = wolfEnvironmentGet(WOLF_ENV_REGION);
if (doc == "")
{
if (wolfGetLastError() != "") llOwnerSay("Could not read it: " + wolfGetLastError());
else llOwnerSay("This region has no Wolf Environment.");
return;
}
llOwnerSay("Weather: " + llJsonGetValue(doc, ["weather", "source"])
+ ", time: " + llJsonGetValue(doc, ["time", "mode"]));
}
}Is it a fixed storm right now?
integer stormy = llJsonGetValue(wolfEnvironmentGet(WOLF_ENV_REGION), ["weather", "type"]) == "storm";
wolfEnvironmentSet
Changes the Wolf Environment of the whole region, or of the parcel this object is over, from a script: day or night, a storm, snow or fog, an alien sky, a sped-up day. Name only what you want changed; everything else stays as it is. If there was no Wolf Environment yet, the change starts from the same default the window starts from (London's real sky and weather). Every change is checked by the grid with exactly the rules of the Wolf Environment window, so a script can set nothing the window could not - a bad value is refused and the answer says which. The script acts for the object's owner. For the region the owner must be the estate owner, an estate manager or a grid god. For a parcel the owner must own it (or have the group's "change environment" power on a group parcel, or deed the object to that group), or run the region; the estate must allow parcel environments, and the region must allow parcels their own weather. Changes take effect in a few seconds, for every viewer. An object may make 3 changes and then one every 10 seconds; all of one owner's objects on a region 6 and then one every 15 seconds; a region 10 and then one every 10 seconds. The same settings twice count as done without making the region redraw its sky. Returns "" when done, otherwise the reason (also in wolfGetLastError).
Example
default
{
touch_start(integer n)
{
if (llDetectedKey(0) != llGetOwner()) return; // it acts with YOUR rights
// Night, a thunderstorm, and rough water.
string why = wolfEnvironmentSet(WOLF_ENV_REGION, [
WOLF_ENV_TIME_HOUR, 23.0,
WOLF_ENV_WEATHER_TYPE, "storm",
WOLF_ENV_WATER, "stormy"
]);
if (why != "") llOwnerSay("Refused: " + why);
}
}The real sky of a real place, with its real weather
wolfEnvironmentSet(WOLF_ENV_REGION, [WOLF_ENV_PLACE_KIND, "real",
WOLF_ENV_PLACE_NAME, "Reykjavik", WOLF_ENV_PLACE_LAT, 64.15, WOLF_ENV_PLACE_LON, -21.94,
WOLF_ENV_TIME_MODE, "real", WOLF_ENV_WEATHER_SOURCE, "live"]);An alien world, with a warm green cast
wolfEnvironmentSet(WOLF_ENV_REGION, [WOLF_ENV_PRESET, "alien",
WOLF_ENV_MOOD_TINT, "custom", WOLF_ENV_MOOD_COLOR, <0.4, 1.0, 0.7>, WOLF_ENV_MOOD_STRENGTH, 25]);A whole day every 4 hours, weather that changes by itself
wolfEnvironmentSet(WOLF_ENV_REGION, [WOLF_ENV_DAY_HOURS, 4.0, WOLF_ENV_WEATHER_PATTERN, "changeable"]);
Fog on your own parcel only
wolfEnvironmentSet(WOLF_ENV_PARCEL, [WOLF_ENV_WEATHER_TYPE, "fog", WOLF_ENV_HAZE, 60]);
More stars and a red sun (part of the sky block, as JSON)
wolfEnvironmentSet(WOLF_ENV_REGION, [WOLF_ENV_SKY,
"{\"night\":{\"stars\":250},\"suns\":[{\"id\":\"sun\",\"color\":\"#ff6040\",\"size\":180}]}"]);Back to the weather's own cloud cover
wolfEnvironmentSet(WOLF_ENV_REGION, [WOLF_ENV_CLOUDS, -1]);
wolfEnvironmentRemove
Removes the Wolf Environment of the whole region (the region goes back to its own sky) or of the parcel this object is over (the parcel goes back to the region's sky). To switch it off but keep the settings for later, use wolfEnvironmentSet with WOLF_ENV_MODE "off" instead. Same rights and limits as wolfEnvironmentSet. Returns "" when done, also when there was nothing to remove, otherwise the reason.
Example
default
{
touch_start(integer n)
{
if (llDetectedKey(0) != llGetOwner()) return;
string why = wolfEnvironmentRemove(WOLF_ENV_PARCEL);
if (why == "") llOwnerSay("This parcel has the region's sky again.");
else llOwnerSay("Refused: " + why);
}
}Browse by family
Ours alone. Grid features you will not find on any other OpenSimulator grid.
134 functions
The Linden Scripting Library — what every SL-compatible grid provides.
482 functions
OpenSimulator extensions. Some are gated by threat level and a region may refuse them.
261 functions
Talking to server-side script modules.
9 functions
LightShare windlight control.
4 functions
A – Z
By the first letter after the prefix.
This reference is generated from the region software Wolf Territories runs, so it lists what the grid actually implements rather than what a wiki says it should. 181 of them have no written description yet; those say so rather than guessing.