VP EVENT WORLD SETTING: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
Quick addition of missing world settings |
||
Line 7: | Line 7: | ||
* List of keys: | * List of keys: | ||
{{sdk world setting table| | {{sdk world setting table| | ||
{{sdk world setting row|int|allow_debug_menu|0 or 1| | {{sdk world setting row|int|allow_debug_menu|0 or 1|Enable/disable use of the debug menu.}} | ||
{{sdk world setting row|int|allow_flying|0 or 1|Enable/disable the ability for users to fly.}} | |||
{{sdk world setting row|int|allow_passthrough|0 or 1|Enable/disable the ability for users to pass through objects and terrain.}} | |||
{{sdk world setting row|int|avatar<NUMBER>|n/a|Not used anymore.}} | {{sdk world setting row|int|avatar<NUMBER>|n/a|Not used anymore.}} | ||
{{sdk world setting row|string|avatars_file||Name of file containing avatar configuration.}} | {{sdk world setting row|string|avatars_file||Name of file containing avatar configuration.}} | ||
{{sdk world setting row|???|avatars_update_interval||???}} | |||
{{sdk world setting row|string|entry_point||World entry point.}} | |||
{{sdk world setting row|float|farplane||???}} | {{sdk world setting row|float|farplane||???}} | ||
{{sdk world setting row|float|fog_begin||Distance at which fog should begin.}} | {{sdk world setting row|float|fog_begin||Distance at which fog should begin.}} | ||
Line 15: | Line 19: | ||
{{sdk world setting row|float|fog_density||Density of fog.}} | {{sdk world setting row|float|fog_density||Density of fog.}} | ||
{{sdk world setting row|float|fog_end||Distance at which fog should be end.}} | {{sdk world setting row|float|fog_end||Distance at which fog should be end.}} | ||
{{sdk world setting row|string|fog_mode|"linear", | {{sdk world setting row|string|fog_mode|"none", "linear", "exp", "exponential", "exp2", "exponential2"|Fog mode.}} | ||
{{sdk world setting row|int|fov|Field of view angle.}} | {{sdk world setting row|int|fov||Field of view angle.}} | ||
{{sdk world setting row|string|ground||Ground object.}} | {{sdk world setting row|string|ground||Ground object.}} | ||
{{sdk world setting row|int|groundrepeats|0 or 1|Ground object is tiled.}} | {{sdk world setting row|int|groundrepeats|0 or 1|Ground object is tiled.}} | ||
Line 22: | Line 26: | ||
{{sdk world setting row|string|objectpath||Base url for object path.}} | {{sdk world setting row|string|objectpath||Base url for object path.}} | ||
{{sdk world setting row|string|objectpassword||Password used to encrypt zip files in object path.}} | {{sdk world setting row|string|objectpassword||Password used to encrypt zip files in object path.}} | ||
{{sdk world setting row|int|override_visibility|0 | {{sdk world setting row|float|old_walking_speed||???}} | ||
{{sdk world setting row|int|override_visibility||Fixed visibility in meters}} | |||
{{sdk world setting row|int|recommend_light_count||Recommended maximum number of lights.}} | |||
{{sdk world setting row|int|recommend_per_pixel_lighting||Recommend the use of a renderer that supports per pixel lighting.}} | |||
{{sdk world setting row|float|run_speed||Sets the run speed of users.}} | |||
{{sdk world setting row|string|sky_clouds1||Cloud layer 1 texture.}} | |||
{{sdk world setting row|string|sky_clouds2||Cloud layer 2 texture.}} | |||
{{sdk world setting row|float x 3|sky_clouds1_color||SRGB (e.g. "0.65 0.65 0.65")}} | |||
{{sdk world setting row|float x 3|sky_clouds2_color||SRGB (e.g. "0.65 0.65 0.65")}} | |||
{{sdk world setting row|float|sky_clouds1_scale||Scales the size of cloud layer 1.}} | |||
{{sdk world setting row|float|sky_clouds2_scale||Scales the size of cloud layer 2.}} | |||
{{sdk world setting row|???|sky_clouds1_velocity||Cloud layer 1 velocity.}} | |||
{{sdk world setting row|???|sky_clouds2_velocity||Cloud layer 2 velocity.}} | |||
{{sdk world setting row|float x 3|sky_color1||Sky color 1 in SRGB (e.g. "0.65 0.65 0.65") - top}} | |||
{{sdk world setting row|float x 3|sky_color2||Sky color 2 in SRGB (e.g. "0.65 0.65 0.65")}} | |||
{{sdk world setting row|float x 3|sky_color3||Sky color 3 in SRGB (e.g. "0.65 0.65 0.65")}} | |||
{{sdk world setting row|float x 3|sky_color4||Sky color 4 in SRGB (e.g. "0.65 0.65 0.65") - below horizon}} | |||
{{sdk world setting row|string|skybox||Base name of skybox textures.}} | {{sdk world setting row|string|skybox||Base name of skybox textures.}} | ||
{{sdk world setting row|int|skybox_swaplr|0 or 1|Swap the left and right texture of the skybox.}} | {{sdk world setting row|int|skybox_swaplr|0 or 1|Swap the left and right texture of the skybox.}} | ||
Line 29: | Line 49: | ||
{{sdk world setting row|float|terrainoffset||Sets a height offset for terrain, in meters.}} | {{sdk world setting row|float|terrainoffset||Sets a height offset for terrain, in meters.}} | ||
{{sdk world setting row|float|terrainscale||Scales the size of terrain cells.}} | {{sdk world setting row|float|terrainscale||Scales the size of terrain cells.}} | ||
{{sdk world setting row|float|walk_speed||Sets the walking speed of users.}} | |||
{{sdk world setting row|string|web_overlay||???}} | {{sdk world setting row|string|web_overlay||???}} | ||
{{sdk world setting row|string|welcome||Welcome message.}} | {{sdk world setting row|string|welcome||Welcome message.}} | ||
{{sdk world setting row|float x 3|worldlight_ambient|| | {{sdk world setting row|float x 3|worldlight_ambient||Ambient light color in SRGB (e.g. "0.65 0.65 0.65")}} | ||
{{sdk world setting row|float x 3|worldlight_diffuse|| | {{sdk world setting row|float x 3|worldlight_diffuse||Diffuse light color in SRGB (e.g. "0.9 0.9 0.9")}} | ||
{{sdk world setting row|float x 3|worldlight_position|| | {{sdk world setting row|float x 3|worldlight_position||Directional light position (e.g. "-1.842309 1.547655 -1.358088")}} | ||
{{sdk world setting row|float x 3|worldlight_specular|| | {{sdk world setting row|float x 3|worldlight_specular||Directional light specular (e.g. "1.0 1.0 0.95")}} | ||
{{sdk world setting row|???|worldlight_srgb_colors|| | {{sdk world setting row|???|worldlight_srgb_colors||Directional light color in SRGB (e.g. "0.65 0.65 0.65")}} | ||
{{sdk world setting row|string|worldname||Name of world.}} | |||
|}} | |}} | ||
|caveats= | |caveats= |
Revision as of 01:17, 22 July 2018
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 | 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