feat: add Photo Booth for capturing character avatars#1030
Open
HarleyGilpin wants to merge 7 commits into
Open
feat: add Photo Booth for capturing character avatars#1030HarleyGilpin wants to merge 7 commits into
HarleyGilpin wants to merge 7 commits into
Conversation
GregHib
reviewed
Jun 14, 2026
- Add string formats to photo_booth_looks/colours/equipment vars - Store equipment as comma-joined equipIndexes per slot, dropping slot numbers - Use TimeUnit.HOURS.toSeconds(2) for the cooldown instead of a magic constant
GregHib
approved these changes
Jun 14, 2026
Adds a standalone render tool that turns a captured photo booth snapshot into transparent avatar PNGs, mirroring Jagex's avatar service: - <name>_full.png - full-body paperdoll - <name>_chat.png - chathead (3/4 forum-avatar angle), with a head-crop fallback when an item has no chathead model (e.g. full helms) Implementation: - Vendors only the geometry decoder from the Quill cache suite (Model.kt + SmartExtensions) and ports a trimmed, dependency-light renderer (AvatarRenderer, ModelComposer) with Gouraud smooth shading. - PlayerModelAssembler mirrors the client BodyParts assembly; the equipIndex->item map is taken from the game's own ItemDefinitions so it always matches captured snapshots. - Body colours are applied client-accurately from the rev-634 recolour palettes (BodyColourPalettes). - Iconis flags photo_booth_dirty on capture so the renderer/website can pick up fresh photos. Run via: ./gradlew :tools:renderPhotoBooth -Pargs="--player=name --out=dir"
- Mask item dialogue-head (chathead) model ids to unsigned. They decode as signed shorts, so worn hats/helms (e.g. party hats) were silently dropped from the chathead avatar; worn (full-body) models were unaffected. - Accept '+' as a space in renderPhotoBooth --player/--players so account names with spaces survive -Pargs splitting. - Move the vendored Quill model decoder into a single tools.photobooth.vendor package (Model.kt + SmartIo.kt) instead of squatting on the misleading io.blurite / net.rsprot namespaces. No rsprot dependency added.
GregHib
reviewed
Jun 15, 2026
Comment on lines
+74
to
+82
| tasks.register<JavaExec>("migrateRsmodSaves") { | ||
| group = "migration" | ||
| description = "Imports rsmod (rev 664) JSON player saves into void's PostgreSQL. Pass args via -Pargs=\"--dry-run --limit=5\"." | ||
| mainClass.set("world.gregs.voidps.tools.convert.RsmodSaveMigrator") | ||
| classpath = sourceSets["main"].runtimeClasspath | ||
| workingDir = rootDir | ||
| val cliArgs = (findProperty("args") as String?)?.split(" ")?.filter { it.isNotBlank() } ?: emptyList() | ||
| args = cliArgs | ||
| } |
Contributor
Author
There was a problem hiding this comment.
Good catch, I had to cherry pick a commit from my production branch.
Comment on lines
+32
to
+33
| // Vendored Quill model renderer (photo booth avatars) decodes geometry via netty ByteBuf. | ||
| implementation("io.netty:netty-buffer:4.1.118.Final") |
Owner
There was a problem hiding this comment.
Ideally ByteBuf should be replaced with Reader/ByteReader
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the members-only Photo Booth at Falador (NPC Iconis, id 8879; tent object 46396; interface 549). Players take a snapshot of their character which is persisted for use as a website/forum avatar.
Screencast_20260614_105551.webm
The avatar sprite is rendered server side using renderPhotoBooth tool.
Gradle: ./gradlew :tools:renderPhotoBooth -Pargs="--player=name --out=/tmp/avatar"
Behavior
Snapshot data
Frozen at capture time into persisted player variables consumed later by the website (which reads the shared DB): photo_booth_time, photo_booth_male, photo_booth_looks, photo_booth_colours, photo_booth_equipment ("slot:id:equipIndex"), plus photo_booth_cooldown. Stored as short, structured values rather than a JSON/base64 blob because the player-save reader caps each string at 100 chars.
Robustness / security
Files
Testing completed
On a members world: talked to Iconis at Falador (~2930,3326) → confirmed dialogue tree and No thank you; enter via NPC/dialogue/tent Enter → walked in, took picture, confirmed Yes → flash + imp line, snapshot vars written, walk out.
Verify: 2h cooldown blocks re-entry with a message; lent item blocks capture; minimap/Close walk the player out (not stuck); relog inside the tent returns at the entrance. On F2P, Iconis refuses.
::resetphoto resets the cooldown.