VP_EVENT_WORLD_SETTING
Jump to navigation
Jump to search
Event set and handler snippet
vp_event_set(instance, VP_EVENT_WORLD_SETTING, event_world_setting);
void event_world_setting(VPInstance instance) { }
Received for each setting of a world upon connecting to it.
Attributes
Attribute | Usage | |
---|---|---|
VP_WORLD_SETTING_KEY | Setting key | |
VP_WORLD_SETTING_VALUE | Setting value |
Behavior
- When all settings have been sent,
VP_EVENT_WORLD_SETTINGS_CHANGED
is fired - List of keys:
Key | Type | Default Value | Description |
---|---|---|---|
allow_debug_menu | boolean | 1 | If true, allows the debug menu to be used |
allow_flying | boolean | 1 | If true, allows the user to fly up and down by using the + and - keys. |
allow_passthrough | boolean | 1 | If true, allows the user to move through objects and terrain by holding the shift key |
avatar | string | DEPRECATED - Object to use as users' 3D avatar (3D representation). Relative object name on the specified path with extension, e.g.:
| |
avatars_file | string | avatars | The name of the avatars list YAML file on the object path, with the default value the file will be loaded from avatars/avatars.yml, this allows the same object path to be used with multiple different avatar list configurations |
entry_point | decimal | 0 0 0 0 | Defines the entry point, in coordinates (X Y Z Yaw), for a world. |
farplane | decimal | 40.0 | Far clipping plane distance in decameters; how far from the camera the ground and avatars are rendered |
fog_begin | decimal | 0.0 | The distance at which fog starts (only applies to linear fog mode) |
fog_color | color | FFFFFF | Color of the fog rrggbb (rr, gg and bb are each a hexadecimal number between 00 and ff). |
fog_density | decimal | 0.0 | Fog density (only applies to exponential fog modes) |
fog_end | decimal | 0.0 | The distance at which fog ends (only applies to linear fog mode) |
fog_mode | string | none | Valid values are: none, linear, exp/exponential, exp2/exponential2 (exponential squared) |
fov | decimal | 50 | Field of view; how wide an angle of the scene is visible to the camera (in degrees) |
ground | string | ground (or empty if terrain is enabled) | Model name for the world "ground" object, a base object that is always rendered regardless of the user's distance from it (e.g. ground.rwx) |
groundrepeats | boolean | 0 | If true, the ground object repeats infinitely, to cover the world with the object (center the ground object at the nearest point on a 30m grid) |
nearplane | decimal | 0.03 | Near plane distance in decameters; how close to the camera the ground and avatars are rendered (0 may cause glitching) |
objectpassword | string | Password for extracting password-protected ZIP files from the object path | |
objectpath | string | http://objects.virtualparadise.org/vpbuild/ | Resolvable HTTP address to a server that provides the world's assets via the HTTP protocol, such as an object path (e.g. "http://localhost/", "http://objects.activeworlds.com/aw/" (alphaworld path), "http://myop.no-ip.org:8282") |
old_walking_speed | ??? | ??? | ??? |
override_visibility | decimal | Force a fixed visibility value (specified in decameters, the visibility menu in the user's client will be disabled) | |
recommended_light_count | decimal | 0 | If set, displays a warning in chat if the maximum light count in settings is not set to the world's recommended value. |
recommended_per_pixel_lighting | boolean | 0 | If true, displays a warning in chat if the user's graphical renderer in settings is not set to one that supports per-pixel lighting. |
run_speed | decimal | 2.4 | If set, changes the speed at which users run. |
sky | boolean | 0 | Enable gradient sky |
sky_clouds1 | string | Texture file name for cloud layer 1 | |
sky_clouds1_color | vector4 | 1 1 1 0 | Cloud layer 1 color (RGBA) |
sky_clouds1_scale | vector2 | 1 1 | Texture coordinate scaling for cloud layer 1 |
sky_clouds1_velocity | vector2 | 0 0 | Movement of cloud layer 1 |
sky_clouds2 | string | Texture file name for cloud layer 2 | |
sky_clouds2_color | vector4 | 1 1 1 0 | Cloud layer 1 color (RGBA) |
sky_clouds2_scale | vector2 | 1 1 | Texture coordinate scaling for cloud layer 2 |
sky_clouds2_velocity | vector2 | 0 0 | Movement of cloud layer 2 |
sky_color1 | vector4 | 1 1 1 1 | Sky color 1 (RGBA) |
sky_color2 | vector4 | 1 1 1 1 | Sky color 2 (RGBA) |
sky_color3 | vector4 | 1 1 1 1 | Sky color 3 (RGBA) |
sky_color4 | vector4 | 1 1 1 1 | Sky color 4 (RGBA) |
sky_srgb_colors | boolean | 1 | 0: Sky colors are in linear color space
1: Sky colors are in sRGB color space |
skybox | string | Prefix name of a set of textures used for the skybox. A direction and a file extension is added to the prefix for each of the skybox textures (_fr, _lf, _bk, _rt, _up or _bt). The files are downloaded from the textures folder of the world object path. For example "sky_hd", will load:
| |
skybox_extension | string | jpg | |
skybox_swaplr | boolean | 0 | If true, swap the _lf and _rt skybox faces |
terrain | boolean | 0 | If true, terrain is enabled. |
terrainoffset | decimal | -0.02 | Y (up-down) distance to offset the terrain globally by |
terrainscale | decimal | 1.0 | Scale factor of the terrain grid, with 10m*10m at scale factor 1. Values below 0.5 may cause performance issues for clients |
walk_speed | decimal | 0.3 | If set, changes the speed at which users walk. |
web_overlay | string | URL to a web page to be displayed on top of the 3D scene. The web page should have a transparent background so the 3D scene can still be seen | |
welcome | string | Welcome to <world>, <name>! | Welcome message to provide to clients entering |
worldlight_ambient | vector3 | 1.0 1.0 1.0 | 3D vector defining the ambient light color of the world. Three float values between 0.0 - 1.0 for red, green and blue channels respectively, delimited by space. e.g.:
|
worldlight_diffuse | vector3 | 1.0 1.0 1.0 | 3D vector defining the diffuse light color of the world. Three float values between 0.0 - 1.0 for red, green and blue channels respectively, delimited by space. e.g.:
|
worldlight_position | vector3 | 0.4 1.0 -0.8 | 3D vector defining the position of the world's sunlight. Three float values between 0.0 - 1.0 for X, Y and Z positions respectively |
worldlight_specular | vector3 | 1.0 1.0 1.0 | 3D vector defining the specular light color of the world. Three float values between 0.0 - 1.0 for red, green and blue channels respectively, delimited by space. e.g.:
|
worldlight_srgb_colors | boolean | 1 | If true and if the user has sRGB rendering enabled in their client the world light settings (ambient, diffuse and specular) will be converted to linear color space before being used |
worldname | string | Name of the world (used in default welcome message) |
Caveats
- Because these settings are always sent upon entering a world, it is recommended to register for this event before calling
vp_enter()
. Otherwise, some or all settings may be missed. - There is currently no method to force a resend or watch for settings changes, except by re-entering the world
Examples
- This event has no usage examples; please add at least one to this page