VP_EVENT_WORLD_SETTING

From Virtual Paradise Wiki
Revision as of 01:17, 22 July 2018 by Sleepy E (talk | contribs) (Quick addition of missing world settings)
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

Key Range Usage
"allow_debug_menu" 0 or 1 Enable/disable use of the debug menu.
"allow_flying" 0 or 1 Enable/disable the ability for users to fly.
"allow_passthrough" 0 or 1 Enable/disable the ability for users to pass through objects and terrain.
"avatar<number>" n/a Not used anymore.
"avatars_file" Name of file containing avatar configuration.
"avatars_update_interval" ???
"entry_point" World entry point.
"farplane" ???
"fog_begin" Distance at which fog should begin.
"fog_color" rrggbb Color of the fog (rr, gg and bb are each a hexadecimal number between 00 and ff).
"fog_density" Density of fog.
"fog_end" Distance at which fog should be end.
"fog_mode" "none", "linear", "exp", "exponential", "exp2", "exponential2" Fog mode.
"fov" Field of view angle.
"ground" Ground object.
"groundrepeats" 0 or 1 Ground object is tiled.
"nearplane" ???
"objectpath" Base url for object path.
"objectpassword" Password used to encrypt zip files in object path.
"old_walking_speed" ???
"override_visibility" Fixed visibility in meters
"recommend_light_count" Recommended maximum number of lights.
"recommend_per_pixel_lighting" Recommend the use of a renderer that supports per pixel lighting.
"run_speed" Sets the run speed of users.
"sky_clouds1" Cloud layer 1 texture.
"sky_clouds2" Cloud layer 2 texture.
"sky_clouds1_color" SRGB (e.g. "0.65 0.65 0.65")
"sky_clouds2_color" SRGB (e.g. "0.65 0.65 0.65")
"sky_clouds1_scale" Scales the size of cloud layer 1.
"sky_clouds2_scale" Scales the size of cloud layer 2.
"sky_clouds1_velocity" Cloud layer 1 velocity.
"sky_clouds2_velocity" Cloud layer 2 velocity.
"sky_color1" Sky color 1 in SRGB (e.g. "0.65 0.65 0.65") - top
"sky_color2" Sky color 2 in SRGB (e.g. "0.65 0.65 0.65")
"sky_color3" Sky color 3 in SRGB (e.g. "0.65 0.65 0.65")
"sky_color4" Sky color 4 in SRGB (e.g. "0.65 0.65 0.65") - below horizon
"skybox" Base name of skybox textures.
"skybox_swaplr" 0 or 1 Swap the left and right texture of the skybox.
"skybox_extension" (e.g. "png") File-extension of skybox textures, to allow using non JPEG textures.
"terrain" 0 or 1 Terrain enabled/disabled.
"terrainoffset" Sets a height offset for terrain, in meters.
"terrainscale" Scales the size of terrain cells.
"walk_speed" Sets the walking speed of users.
"web_overlay" ???
"welcome" Welcome message.
"worldlight_ambient" Ambient light color in SRGB (e.g. "0.65 0.65 0.65")
"worldlight_diffuse" Diffuse light color in SRGB (e.g. "0.9 0.9 0.9")
"worldlight_position" Directional light position (e.g. "-1.842309 1.547655 -1.358088")
"worldlight_specular" Directional light specular (e.g. "1.0 1.0 0.95")
"worldlight_srgb_colors" Directional light color in SRGB (e.g. "0.65 0.65 0.65")
"worldname" Name of world.

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