ScriptKit 1.4.0 — Random Name Generator - #2321
Merged
Merged
Conversation
Add ScriptKit.randomName / useName / dropName / nameCount for readable, fantasy-themed adjective-noun IDs (e.g. arcane-dragon). - Shared seeded shuffle (persisted seed) over 100x100 adjective/noun pairs; each plugin gets a random starting offset so plugins begin on different names - randomName(scriptName, useCount?) — useCount(base)=>number optionally overrides the default count source (the plugin's own tracked counts) - Collision suffixing (-2, -3, ...) driven by per-plugin, plugin-owned use counts - useName/dropName/nameCount key on the base name (trailing -N auto-stripped) - Dictionaries: 100 words each, no duplicates, no adjective/noun overlap, 2-5 words per starting letter (x excluded), alphabetically sorted rows - Dev-docs topic + changelog entry
- Add ScriptKit/1.4.0/ version snapshot - Update script.json: version 1.4.0, previousversions incl. 1.3.0, description refreshed with the name-generator changelog - README: document ScriptKit.randomName / useName / dropName / nameCount and add a v1.4.0 changelog entry
Alicekb
approved these changes
Sep 3, 2026
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.
ScriptKit 1.4.0 — Random Name Generator
Summary
Adds a random, human-readable name generator to ScriptKit so scripts can mint friendly identifiers (e.g.
arcane-dragon) instead of opaque random strings. This is a purely additive, backward-compatible change — no existing API or behavior is modified.What's new
New public API:
ScriptKit.randomName(scriptName, useCount?)— returns the next fantasy-themedadjective-nounname for the given plugin key. Optionally accepts auseCount(base) => numbercallback to override the suffix-count source (e.g. to check live game objects).ScriptKit.useName(scriptName, name)— record a use (increments the base's count). Returns the new count.ScriptKit.dropName(scriptName, name)— release a use (decrements; removed at ≤ 0). Returns the new count.ScriptKit.nameCount(scriptName, name)— how many times the base name has been used (0 if unused).How it works:
scriptNameargument) gets a random starting offset, so different plugins begin on different names.arcane-dragon-2,arcane-dragon-3, …), driven by the (default) per-plugin usage counts.useName/dropName/nameCountkey on the base name; a trailing-Nsuffix is stripped automatically, so callers can pass either the base or the full returned name.randomNamedoes not requireScriptKit.register; per-plugin state is created lazily on first use.Dictionaries: 100 adjectives + 100 nouns, no duplicates, no adjective/noun overlap, 2–5 words per starting letter (excluding
x, which has no common readable words).Files changed
ScriptKit/ScriptKit.js— the generator implementation, plus a dev-docs topic and a1.4.0changelog entry in the self-registration.ScriptKit/1.4.0/ScriptKit.js— version snapshot.ScriptKit/script.json— version → 1.4.0,previousversionsupdated, description refreshed.ScriptKit/README.md— new "Random Name Generator" section + changelog entry.Testing
useNameafter each with the default count source. Confirmed:-2suffixes,dropNamereturns every count to 0.Notes