sereseleneMenu
Status
Live
Version
v0.1.3
Licence
PolyForm Strict 1.0.0
Sprites indexed
36,493 on build 950-1
Dependencies
None
Source
github.com/sereselene/rsprite
10,643 downloads · 257 subscribers · 82% positive of 11 ratings
plugin.jsonThe plugin's manifest, as the Plugin Hub reads it
plugin.json
{
  "name": "rsprite",
  "version": "0.1.3",
  "requiredDependencies": {},
  "optionalDependencies": {},
  "requiredPermissions": [],
  "optionalPermissions": [],
  "hasRibbonIcon": false,
  "hasSettingsIcon": false
}

Installation

#
  1. Add the dependency. Add RSprite to your plugin's plugin.json as a required dependency.
    plugin.json
    {
      "requiredDependencies": {
        "rsprite": "rsprite"
      }
    }
  2. Publish as usual. When a player installs your plugin from the Plugin Hub, RSprite is downloaded with it automatically.
  3. Load it while you develop. Download the rsprite zip from the newest release on the GitHub releases page and unzip it into the client's development plugins folder. In the console, run prf, then prl rsprite, then load your plugin.

RSprite is available as the global rsprite, with no require. Before you publish, replace "rsprite" with RSprite's Plugin Hub ID so players get it downloaded with your plugin.

Example

#
Example
local attackId = rsprite.Get("SKILL_ATTACK")

local icon = rsprite.Draw(parent, { "SKILL_NECROMANCY", "BP3_MISSION_ICON_SKILL_NECROMANCY" }, {
    x = 10,
    y = 10,
    size = 24,
})

local ring = rsprite.DrawItem(parent, 13562, { x = 40, y = 10, size = 24 })

API

#

Sprite names and IDs are read from the running client, so they always match the current game build. Sprites known to crash the client are treated as missing everywhere.

A missing sprite returns nil and logs one rsprite: warning per name. An invalid argument or an unknown option raises an error at the caller's line. A failure inside the client is logged as a warning and never raises.

A chain is one source or an array of sources. Each source is a sprite name, a sprite ID or a plugin resource such as Plugin.resources.my_icon, and the first one that exists is used. A nil ends the array, so a chain must not contain gaps.

FunctionDescription
rsprite.versionThe library version as a string, such as "0.1.3".
rsprite.Get(name)The sprite ID for a name, or nil. Case insensitive and cached for the session.
rsprite.Name(id)The sprite name for an ID, or nil. Cached for the session. An ID that is not a whole number 0 or above gives nil.
rsprite.Resolve(nameOrChain)The first existing source in a chain, as a sprite ID or resource handle, and its position in the chain. Returns nil when none exists. Draws nothing.
rsprite.Draw(parent, nameOrChain, options)Creates a clickthrough ui.Sprite in parent from the first existing source. Returns the sprite and the chain position used, or the sprite and nil when nothing in the chain exists.
rsprite.SetSource(sprite, nameOrChain, options)Points an existing sprite at a new chain and clears any item icon RSprite set on it. Returns the chain position used, or nil.
rsprite.DrawItem(parent, itemId, options)Creates a clickthrough ui.Sprite in parent showing an item icon, and returns it. An itemId of nil gives a hidden sprite with no warning.
rsprite.SetItem(sprite, itemId, options)Shows an item icon on an existing sprite. Returns true when an item is shown. An itemId of nil clears and hides the sprite and returns false.
rsprite.Find(text, options)Searches sprite names, tags and aliases, ignoring case. Returns a page of entries { name, id, tags, aliases, width, height } and the total match count. An empty text lists every sprite.
rsprite.Tags()Every tag you can filter by, sorted alphabetically.
rsprite.BuildIndex(onReady)Builds the search index over several ticks, then calls onReady, if given, with the sprite count. Calls it straight away if the index is already ready.
rsprite.IsIndexReady()Whether the search index is ready.
OptionUsed byDescription
x, yDraw, DrawItemPosition in the parent. Any finite number. Default 0.
xAnchor, yAnchorDraw, DrawItemAnchor as a fraction of the parent's width and height. Any finite number. Default 0.
sizeDraw, DrawItemWidth and height, above 0. Default 24.
width, heightDraw, DrawItemSeparate dimensions above 0, overriding size.
colourDraw, SetSourceTint as a packed 0xRRGGBBAA number.
alphaDraw, SetSourceOpacity from 0 to 1.
quantityDrawItem, SetItemStack count shown on the item, a whole number 0 or above. Without it no count is shown.
placeholderDraw, SetSource, DrawItem, SetItemWhether to show the placeholder when no source exists or the item ID is not valid. Default true.
tags, limit, offsetFindTags every result must have, the page size (default 50) and the number of matches to skip (default 0).

Call rsprite.BuildIndex() at startup if you use search. Otherwise the first Find builds the whole index at once.

Report incorrect sprite names, sprites that crash the client, and tag or alias requests as issues on the RSprite repository.

Troubleshooting

#
The rsprite global is nil in my plugin

While you develop, run prf, then prl rsprite, then load your plugin. Check that RSprite is a required dependency in your plugin.json.

Players do not get RSprite with my plugin

Before you publish, replace "rsprite" with RSprite's Plugin Hub ID in requiredDependencies.

The plugin does not appear after installing

Open the Plugin Hub, go to Manage, and check that the plugin and PrettyUI are both turned on. If it still does not show, close RS3 and open it again.

Still stuck? Report a bug.

Known issues

#

No known issues right now.

All known issues on GitHub

Coming next

#

What I am working on next. Plans can change.

planned

  • To do. Update the documentation to show it is on the Plugin Hub Type tidyCurrently live at version 0.1.3
  • To do. Simplify the commit message rules Type repoRemove emoji from commit and pull request titles
  • To do. Make the repository public Type releaseTested through FashionScape

See all 3 RSprite items on the roadmap

top
Copyright 2026 sereselene. Plugins all rights reserved. MES+ and RSprite PolyForm Strict 1.0.0.Not affiliated with Jagex.

Keyboard shortcuts

/
Search
gh
Go home
[]
Previous or next section
torgg
Go to top
c
Copy a link to the section you are reading
Esc
Close search, the menu or this panel
?
Show these shortcuts