llSetAgentParams: a way to customize certain agent attributes
tracked
Fenix Eldritch
This is a refiling of BUG-233175
I would like to propose a mechanism for users to modify and customize some of their agent's attributes including (but not necessarily limited to) the various movement speeds, jump height, and scale of the agent's physics shape.
My initial thought is for a set of three functions:
- llSetAgentParams
- llGetAgentParams
- llResetAgentParams
The setting of these agent parameters could behave similar to llSetAnimationOverride: where once an attribute is set, the customization will persist until explicitly overridden, reset, or the user logs off. Also like the animation override, this would require a new runtime permission:
PERMISSION_CHANGE_AGENT_PARAMS
- Action: configure the overriding of default agent parameters
- Category: Agent
- Granter: Anyone
- Auto-granted when: Attached
llSetAgentParams(list params)
- Sets the agent parameters specified in params.
- Survives script reset/removal, attachment removal, changing regions and teleporting - but not relog.
- Setting a zero/null/etc value is the same as resetting it to default.
- Invalid inputs cause the function to shout an error on DEBUG_CHANNEL. The function will still accept and act upon valid inputs that preceded the invalid one(similar to llSetPrimitiveParams).
- Requires new permission: PERMISSION_CHANGE_AGENT_PARAMS.
[AGENT_WALK_SPEED, float speed] : Agent's walking speed
[AGENT_RUN_SPEED, float speed] : Agent's running speed
[AGENT_CRAWL_SPEED, float speed] : Agent's crouch-walking speed
[AGENT_TURN_SPEED, float speed] : Agent's turning speed
[AGENT_FLY_SPEED, float speed] : Agent's horizontal flight speed
[AGENT_FLY_UP_SPEED, float speed] : Agent's hover-up speed
[AGENT_FLY_DOWN_SPEED, float speed] : Agent's hover-down speed
[AGENT_JUMP_SPEED, float speed] : Speed at which agent achieves apex of jump height
[AGENT_JUMP_HEIGHT, float height] : Agent's vertical jump height
[AGENT_STAND_PHYSICS_SIZE, vector size] : Scale applied agent's standing physics shape
[AGENT_SIT_PHYSICS_SIZE, vector size] : Scale applied to agent's sitting physics shape
[AGENT_GROUND_SIT_PHYSICS_SIZE, vector size] : Scale applied to agent's ground-sitting (ALT+Shift+S) physics shape
Min/Max values up for discussion. I imagine minimum size would mimic prims; no single dimension being smaller than 0.010 meters.
list llGetAgentParams([list params])
- Essentially same as llGetPrimitiveParams.
- Only accepts the AGENT_* flags as listed above.
- Requires PERMISSION_CHANGE_AGENT_PARAMS.
llResetAgentParams([params])
- Reverts specified parameters back to their system defaults.
- Only accepts the AGENT_* flags as listed above.
- Additional param: AGENT_ALL_PARAMS as a shortcut to reset all (or alternatively: supplying an empty list?).
- Requires PERMISSION_CHANGE_AGENT_PARAMS.
Since llSetAgentParams and the persistence of its effects are modeled after the llSetAnimationOverride functions, it would have similar (if not higher) potentials for abuse, given the fact that these would go beyond cosmetic changes and could impact user navigation throughout SL. For that reason, I also suggest some additional viewer/server components to go alongside with this feature as defined below. If there is still concern, perhaps adding a throttle to how many times attributes can successfully be changed in a given time frame (in which case having the set function return a status integer would be warranted). Or perhaps removing the auto-granting of the permission on attach - though Experiences should still function as normal.
Additional viewer support functionality:
A UI toast/popup that appears whenever an agent parameter is changed, similar to the ones that show whenever the avatar complexity changes. At minimum, this popup should have a clickable link to a knowledge base article that explains this feature - and most importantly, how to reset it. This toast/popup can also be disabled by the user in Preferences > Notifications.
A new menu item "
Avatar > Reset agent
" to immediately reset all agent params and revoke PERMISSION_CHANGE_AGENT_PARAMS to any unattached objects in the same region (similar to "Avatar > Stop animations
"). Also, a "Develop > Render Metadata > Agent Physics Shapes
" would be useful for users to visualize the altered (and default) agent physics shapes.Additional land support functionality:
A new land option which could disallow changing agent params and/or ignore custom params and only use agent defaults while within the parcel/region (similar to no-fly zones). This would be beneficial to established games which rely on using the agent's default attributes and would consider alterations cheating (similar to the prohibiting of user made movement enhancers). Also consider letting experiences still perform such overrides over allowed land.
Justification moved to comments due to 5k character limit...
Log In
Thornotter Resident
(continued from previous comment) In my proposal the functions would have worked as a part of an experience and stayed active as an agent moved within parcels that are part of the experience. Teleporting is always possible as a way to leave the experience and any of the settings applied to the agent.
Experiences would be a significant benefit for these functions - otherwise it would be difficult, if not impossible, to keep agent parameters 'active' when navigating between multiple parcels that are part of a single gameplay experience.
Gameplay Examples
- A character has overexerted themselves and is too tired to run or jump.
- A presentation at a virtual conference is being conducted, with participants in the audience muted until it is their turn to speak in the Q&A session.
- Within the confines of a space station, characters are prevented from flying. Once they leave the airlock, their ability to ‘fly’ is enabled to explore the zero-gravity of outer space.
- A character exploring a dense jungle encounters a basilisk, its gaze petrifying (freezing) the character in place for a few minutes until the effect wears off.
- Characters participating in a combat deep in a deep, dark cave. By ensuring the use of a custom dark environment setting, players are prevented from gaining an unfair advantage over their competitors by switching to ‘midday’ lighting.
- A character finds what they believe is high value loot in a dungeon. They put on the magical amulet, only to discover it is cursed and cannot be removed until they solve a puzzle.
- A character receives psychic damage (DAMAGE_TYPE_PSYCHIC) that thankfully doesn’t incapacitate them but does temporarily remove their ability to speak. They can roleplay by using emote actions, but not speak to their fellow role-players in public chat until healed.
Thornotter Resident
I was working on a similar proposal that I called "agent gameplay parameters". he idea was to have official LSL functions that implement RLV-like functionality when useful for features similar to most games.
- AGENT_ALLOW_FLY (boolean) - Agent is allowed to fly or hover (subject to existing parcel/group "allow flying" setting).
- AGENT_ALLOW_RUN (boolean) - Agent is allowed to run.
- AGENT_ALLOW_JUMP (boolean) - Agent is allowed to jump.
- AGENT_ALLOW_SIT (boolean) - Agent is allowed to sit on objects and the ground.
- AGENT_ALLOW_CROUCH (boolean) - Agent is allowed to crouch.
- AGENT_ALLOW_MOVE (boolean) - Agent is allowed to control their movement and rotation. Teleportation is not affected. Useful for status effects, spells, and traps - for example, a character being frozen. llTakeControls doesn't block rotation.
- AGENT_CLICK_OBJECT (key object_key, boolean enabled) - Enables or disables the click action for the specified prim. When disabled, there is no click action and no touches are detected or passed.
- AGENT_CLICK_OBJECT_DEFAULT (boolean enabled) - When set to false, disables the click action for all prims unless overridden for a specific prim using AGENT_CLICK_OBJECT.
- AGENT_CLICK_AVATAR (key avatar_key, boolean enabled) - Enables or disables the click action for the specified avatar's attachments. When disabled, there is no click action and no touches are detected or passed.
- AGENT_CLICK_AVATAR_DEFAULT (boolean enabled) - When set to false, disables the click action for every agent's attachments unless overridden for a specific agent using AGENT_CLICK_AVATAR.
- AGENT_ALLOW_GESTURES (boolean) - agent can use gestures.
- AGENT_ALLOW_CHAT (boolean) - Agent is allowed to send chat messages to the public channel. Does not affect emotes (/me).
- AGENT_ALLOW_EMOTES (boolean) - Agent is allowed to send emotes (/me) to the public channel.
- AGENT_ALLOW_VOICE (boolean) - Agent is allowed to use public voice communication.
- AGENT_ENFORCE_ENVIRONMENT (boolean) - Agent is prevented from changing environmental settings (settings for accessibility could override this)
SL Feedback
tracked
SL Feedback
Hello, and thank you for your detailed feature request regarding llSetAgentParams and the customization of agent attributes. This idea has been brought up in the past and is currently tracked. We have no estimate when it may be implemented, but please keep an eye on future updates. We appreciate your input and hope you continue to share your ideas to help improve Second Life. Thank you!
Fenix Eldritch
Within Second Life, all agents have the same basic attributes like walking/running/crawling/flying speeds, jump height, and very similar collision shape sizes (for standing, sitting, and ground-sitting). Given the countless ways users can visually customize their avatars, many times these attributes are ill fitting. By granting us the ability to alter these attributes (within reason), it would open up many avenues for further customization and content.
- Personal applications could allow users to tailor their physical sizes and movement speeds to better suit their avatar. Crouching could finally be made functional to let users duck under obstacles. Tinies could lower their height to accurately reflect their appearance, and shrink further if they wanted to crouch/crawl as well. Non-human avatars could similarly stretch their physics shape to more accurately reflect their bulk.
- New modes of movement could be created off of this. In addition to altering the size of the agent while crouching, a hud/attachment could be made to toggle between crouch-walking and an even lower crawling, having specific sizes/speeds for each state. Combined with animation overrides, avatars could attain a wider range of movement with realistic feeling.
- Water could be made to feel like it has actual viscosity towards avatars: flying speeds could be reduced to make it feel more like swimming while submerged.
- Rough "terrain" could be made that hobbled avatars as they tried to traverse it: like a waist-high swamp that would slow down people wading through it.
- Smartly designed applications could make use of llGetAgentParams to store the current agent attributes before changing them for a given situation, and then restore those saved attributes after the fact. This would allow for seamless transitions and better immersive effects for many kinds of content/experiences.
- Finally, this would be more more efficient over the current methods for reducing agent speeds - which usually entail a script constantly executing bumps/pushes/impulses to try and dampen or counteract regular movement. Changing the agent's attributes directly would relieve the server of essentially fighting against itself.
I understand this is a complicated and multifaceted request that would touch many aspects and take a while to implement if accepted, but I strongly feel it has great potential for making avatars feel more like they're physically in the world.
Thank you for any consideration.