Skip to content

Changing arguments names to Wiki names and adding and improving tooltips#144

Open
Suzanna-Linn wants to merge 10 commits into
secondlife:mainfrom
Suzanna-Linn:patch-1
Open

Changing arguments names to Wiki names and adding and improving tooltips#144
Suzanna-Linn wants to merge 10 commits into
secondlife:mainfrom
Suzanna-Linn:patch-1

Conversation

@Suzanna-Linn

Copy link
Copy Markdown
Contributor

This PR does two different but related things:

  • Changes the names of arguments in functions and events to their Wiki names.
  • Completes and improves the tooltips for functions, events, their arguments, and constants.

I originally wanted to make two separate PRs, but some of the tooltips refer to the argument names, so they have to go together.
Everything was generated by script, so there shouldn't be any manual typos, only potential scripting errors.

Why change the argument names to match the Wiki?

  • Avoids keyword conflicts: Some current Yaml arguments are named Key, Vector, or Rotation. If we lowercase them directly, they become reserved keywords in LSL/Lua and break. Using the Wiki names avoids this.
  • Standardization: Yaml names currently start with an uppercase letter, which isn't standard in Lua.
  • Accuracy: Wiki names have been heavily checked and corrected by the community over time.
  • Conciseness: Wiki names are often shorter, whereas some of the current Yaml names are too verbose.
  • Documentation consistency: The Wiki texts already use these argument names (Although hey could be changed, since usually they are in bold).

I have published the intermediate results in JSON format to help review these changes:

For functions that don't exist on the Wiki, I kept their original argument names but changed them to lowercase:

  • llClearExperience
  • llClearExperiencePermissions
  • llFindNotecardTextCount
  • llGetExperienceList
  • llSetExperienceKey

Tooltip Improvements

This PR adds and improves tooltips for functions, events, constants, and arguments based on data scraped from the Wiki.
This part is still incomplete. While there are a lot of new and improved tooltips, these are just what could be scraped from the Wiki. We will need a second phase later to manually add the remaining ones.

Intermediate results in JSON format, showing where the new tooltips come from:

All of these JSON files are linked in https://suzanna-linn.github.io/slua/wiki-json-index.html, along with some other results I'm publishing in case they are useful to anyone.

=== Tooltip Statistics ===

Total Functions/Events: 569
Missing before: 8
Missing after: 4

Total Functions/Events Arguments: 879
Missing before: 525
Missing after: 27

Total Constants: 1024
Missing before: 389
Missing after: 73

Missing tooltips: https://suzanna-linn.github.io/slua/wiki-tooltips-missing.html

Comment thread poetry.lock Outdated
Tapple's review of wiki tooltips for constants

@tapple tapple left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Migrated review comments I made in #142

Comment thread lsl_definitions.yaml
Comment on lines 4897 to +4900
PU_FAILURE_NO_NAVMESH:
member-of: [CharacterPathUpdateType]
tooltip: This is a fatal error reported to a character when there is no navmesh
for the region. This usually indicates a server failure and users should file
a bug report and include the time and region in which they received this message.
tooltip: Path update fatal error triggered when there is no navmesh generated
for the region (typically indicates a server failure).

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I considered restoring the text about filing a bug report, but was unsure. Thoughts?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would say:

  • Yes, if the error still happens and Lindens are interested in bug reports (We need a Linden who knows about it).
  • Otherwise, no, or in the documentation it would look like there is an unsolved bug since 14 years ago.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I made the right call to keep this text unchanged from the wiki

Comment thread lsl_definitions.yaml
Comment thread lsl_definitions.yaml
Comment on lines -5962 to +6650
- CurrentRotation:
tooltip: ''
- ourrot:

@tapple tapple Jun 5, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm. I don't like CurrentRotation, due it's Capitalization, but, I like the wiki's name ourrot even less. I'd prefer current_rot

I'm unsure how we should proceed:

  1. Use the wiki name anyway, due to the reasons mentioned in the PR description
  2. decide on a new style guide, and rename them all to that (the wiki should also be changed then, probably

@Rider-Linden mentioned yesterday in discord that linden lab generally follows a style guide where local variables (which includes parameter names) are generally snake_case. Maybe we should apply that to this document and future documentation.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that it's important to keep Yaml and Wiki names in sync.

If we change Yaml, we change Wiki too.

It would be nice to have a style guide, but preferably adapted to the current Wiki names to change as few as possible. Scripters are used to seeing these names, and changes could break 'neuron compatibility'.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Argument names and the functions where are used:

https://suzanna-linn.github.io/slua/wiki-arguments-functions.html

llSetParcelForSale(), the newest function, has Wiki arguments in uppercase.

This functions are not in Wiki, so they can be changed freely:

  • llClearExperience
  • llClearExperiencePermissions
  • llFindNotecardTextCount
  • llGetExperienceList
  • llSetExperienceKey

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

snake_casing would change 14 functions and events with 22 parameters:

{
  "llGetVisualParams": [
    "agent_id"
  ],
  "llMapDestination": [
    "sim_name"
  ],
  "llParcelMediaCommandList": [
    "command_list"
  ],
  "llPatrolPoints": [
    "patrol_points"
  ],
  "llRemoteDataReply": [
    "i_data",
    "s_data"
  ],
  "llSendRemoteData_data": [
    "i_data",
    "s_data"
  ],
  "llSetLinkTextureAnim": [
    "size_x",
    "size_y"
  ],
  "llSetParcelForSale": [
    "for_sale",
    "options"
  ],
  "llSetTextureAnim": [
    "size_x",
    "size_y"
  ],
  "llTargetOmega": [
    "spin_rate"
  ]
  "at_rot_target": [
    "our_rot",
    "target_rot"
  ],
  "at_target": [
    "our_pos",
    "target_pos"
  ],
  "dataserver": [
    "query_id"
  ],
  "remote_data": [
    "i_data",
    "s_data"
  ],
}

Plus this 5 functions with 6 parameters that are free to change because they haven't a got a Wiki page:

{
  "llClearExperience": [
    "agent_id",
    "experience_id"
  ],
  "llClearExperiencePermissions": [
    "agent_id"
  ],
  "llFindNotecardTextCount": [
    "notecard_name"
  ],
  "llGetExperienceList": [
    "agent_id"
  ],
  "llSetExperienceKey": [
    "experience_id"
  ],
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants