Difference between revisions of "LlGetEnv"

From Second Life Wiki
Jump to navigation Jump to search
m
(5 intermediate revisions by 3 users not shown)
Line 11: Line 11:
|constants=
|constants=
<div style="margin-bottom:1em;">
<div style="margin-bottom:1em;">
'''Entries in <span style="background: #FFFFBF;"> yellow </span> on RC channels from 2015-04-29.'''
{{{!}} class="sortable" {{Prettytable|style=margin:0;}}
{{{!}} class="sortable" {{Prettytable|style=margin:0;}}
{{!}}+ Table of valid {{LSLP|name}} values.  
{{!}}+ Table of valid {{LSLP|name}} values.  
Line 18: Line 17:
! class="unsortable" {{!}} Description
! class="unsortable" {{!}} Description
! {{!}} {{HoverText|Type to typecast to|To make the value returned more useful, you will want to typecast it to this type}}
! {{!}} {{HoverText|Type to typecast to|To make the value returned more useful, you will want to typecast it to this type}}
{{!}}-
{{!}} "agent_limit"
{{!}} Get the maximum number of avatars normally allowed on this region (teleport home, and login to last location, are allowed to exceed this).
{{!}} {{Yes|[[integer]]}}
{{!}}-
{{!}}-
{{!}} "dynamic_pathfinding"
{{!}} "dynamic_pathfinding"
Line 27: Line 30:
{{!}} {{Yes|[[integer]]}}
{{!}} {{Yes|[[integer]]}}
{{!}}-
{{!}}-
{{!}} {{Maybe|"estate_name"|align=left}}
{{!}} "estate_name"
{{!}} "mainland", "Linden Homes", "My Happy Estate", etc.
{{!}} "mainland", "Linden Homes", "My Happy Estate", etc.
{{!}} {{No|N/A}}
{{!}} {{No|N/A}}
Line 35: Line 38:
{{!}} {{Yes|[[integer]]}}
{{!}} {{Yes|[[integer]]}}
{{!}}-
{{!}}-
{{!}} {{Maybe|"region_cpu_ratio"|align=left}}
{{!}} "region_cpu_ratio"
{{!}} Get number of regions per CPU for this region type. Returns "1" or "4".
{{!}} Get number of regions per CPU for this region type. Returns "1" or "4".
{{!}} {{Yes|[[integer]]}}
{{!}} {{Yes|[[integer]]}}
Line 43: Line 46:
{{!}} {{Yes|[[integer]] [http://en.wikipedia.org/wiki/Boolean_algebra_%28logic%29 boolean]}}
{{!}} {{Yes|[[integer]] [http://en.wikipedia.org/wiki/Boolean_algebra_%28logic%29 boolean]}}
{{!}}-
{{!}}-
{{!}} {{Maybe|"region_product_name"|align=left}}
{{!}} "region_product_name"
{{!}} Get the type of region this is: "Estate / Full Region", "Mainland / Homestead", "Estate / Openspace", "Estate / Full Region - Skill Gaming" etc.
{{!}} Get the type of region this is: "Estate / Full Region", "Mainland / Homestead", "Estate / Openspace", "Estate / Full Region - Skill Gaming" etc.
{{!}} {{No|N/A}}
{{!}} {{No|N/A}}
{{!}}-
{{!}}-
{{!}} {{Maybe|"region_product_sku"|align=left}}
{{!}} "region_product_sku"
{{!}} Get the region's product number (as string).
{{!}} Get the region's product number (as string).
{{!}} {{No|N/A}}
{{!}} {{No|N/A}}
{{!}}-
{{!}}-
{{!}} {{Maybe|"region_start_time"|align=left}}
{{!}} "region_start_time"
{{!}} Get the time the region was last (re)started, in [[llGetUnixTime]] format
{{!}} Get the time the region was last (re)started, in [[llGetUnixTime]] format
{{!}} {{Yes|[[integer]]}}
{{!}} {{Yes|[[integer]]}}
Line 63: Line 66:
{{!}} {{No|N/A}}
{{!}} {{No|N/A}}
{{!}}-
{{!}}-
{{!}} {{Maybe|"simulator_hostname"|align=left}}
{{!}} "simulator_hostname"
{{!}} Get the simhost running this region. Same as [[llGetSimulatorHostname]] but without the script delay.
{{!}} Get the simhost running this region. Same as [[llGetSimulatorHostname]] but without the script delay.
{{!}} {{No|N/A}}
{{!}} {{No|N/A}}
{{!}}-
{{!}} "region_max_prims"
{{!}} Get the maximum number of prims allowed on this region.
{{!}} {{Yes|[[integer]]}}
{{!}}-
{{!}} "region_object_bonus"
{{!}} Get the region's object bonus factor.
{{!}} {{Yes|[[float]]}}
{{!}}-
{{!}} "whisper_range"
{{!}} Get the range for whispered chat in the region.
{{!}} {{Yes|[[float]]}}
{{!}}-
{{!}} "chat_range"
{{!}} Get the range for spoken chat in the region.
{{!}} {{Yes|[[float]]}}
{{!}}-
{{!}} "shout_range"
{{!}} Get the range for shouted chat in the region.
{{!}} {{Yes|[[float]]}}
{{!}}}
{{!}}}
</div>
</div>

Revision as of 16:07, 29 June 2020

Summary

Function: string llGetEnv( string name );

Returns a string with the requested data about the region.

• string name The name of the data to request

Note that the value returned is a string, you may need to cast it to an integer for use in calculations.

Table of valid name values.
Name Description Type to typecast to
"agent_limit" Get the maximum number of avatars normally allowed on this region (teleport home, and login to last location, are allowed to exceed this). integer
"dynamic_pathfinding" Get the region's effective dynamic_pathfinding status, "enabled" or "disabled". This option is configured in the Region Debug Console N/A
"estate_id" Numerical index identifying which estate a region belongs to. Main grid mainland is "1" integer
"estate_name" "mainland", "Linden Homes", "My Happy Estate", etc. N/A
"frame_number" Get the frame number of the simulator, for example "42042". integer
"region_cpu_ratio" Get number of regions per CPU for this region type. Returns "1" or "4". integer
"region_idle" Get the region's idle status, "1" or "0". integer boolean
"region_product_name" Get the type of region this is: "Estate / Full Region", "Mainland / Homestead", "Estate / Openspace", "Estate / Full Region - Skill Gaming" etc. N/A
"region_product_sku" Get the region's product number (as string). N/A
"region_start_time" Get the time the region was last (re)started, in llGetUnixTime format integer
"sim_channel" Get the region's channel string, for example "Second Life Server". N/A
"sim_version" Get the region's version number string, for example "10.11.30.215699". N/A
"simulator_hostname" Get the simhost running this region. Same as llGetSimulatorHostname but without the script delay. N/A
"region_max_prims" Get the maximum number of prims allowed on this region. integer
"region_object_bonus" Get the region's object bonus factor. float
"whisper_range" Get the range for whispered chat in the region. float
"chat_range" Get the range for spoken chat in the region. float
"shout_range" Get the range for shouted chat in the region. float

Examples

default
{
    touch_start(integer total_number)
    {
        string version = llGetEnv("sim_version");
        llOwnerSay("Region " + llGetRegionName() + " is running "
                   + llGetEnv("sim_channel") + " version " + version );

        list ver = llParseString2List(version, ["."], []);

        llOwnerSay("Build: "+llList2String(ver, 3));
        llOwnerSay("Build Date: "+llList2String(ver, 2)+"-"+llList2String(ver, 1)+"-20"+llList2String(ver, 0));
    }
}

Notes

  • Region idling lowers a region's framerate when no avatars are currently on or looking into the region. Scripts measuring time dilation with llGetRegionTimeDilation may report significant time dilation if the region is idle.

See Also

Deep Notes

History

  • SVC-4874
  • Introduced in Second Life RC LeTigre 10.11.30.215699, deployed on 2010-12-01.
  • Deployed to rest of Agni with Second Life Server 10.11.30.215699, Second Life RC BlueSteel 10.12.06.216207, Second Life RC Magnum 10.11.30.215699
  • "frame_number" option added in Second Life RC BlueSteel 12.01.03.247042
    • Returns an integer that represents the current 'frame' of the simulator. Generally only useful for specific debugging cases.
  • Removed (temporarily?) in Second Life RC BlueSteel 12.01.06.247303

Search JIRA for related Issues

Signature

function string llGetEnv( string name );