AI Skill Report Card
Creating Perchance Generators
YAML--- name: creating-perchance-generators description: Creates interactive random generators using Perchance syntax and logic. Use when building randomization tools, story generators, or interactive content with weighted probabilities. ---
Creating Perchance Generators
Quick Start15 / 15
mainOutput
[creature] [action] [location]
creature
dragon^10
unicorn^5
phoenix^3
basilisk^2
action
soars through^5
rests in^3
guards^4
hunts in^2
location
the crystal caves
ancient forests
mountain peaks
forgotten ruins
Recommendation▾
Add a template section with complete generator boilerplate code ready to copy-paste
Workflow14 / 15
Progress:
- Define main output pattern using [brackets]
- Create probability lists with item^weight syntax
- Test generator functionality
- Add conditional logic if needed
- Implement user interactions (buttons/inputs)
- Style with CSS if required
Basic Structure:
- Start with
mainOutput- this defines what users see - Create lists using simple line breaks
- Reference lists with [listName] syntax
- Use ^number for weights (higher = more likely)
- Add HTML/CSS for styling
Recommendation▾
Include more edge case examples like nested conditionals, imports, or advanced HTML integration
Examples18 / 20
Example 1: Simple Character Generator Input:
mainOutput
[name] the [class] from [location]
name
Astra^5
Zephyr^3
Nova^4
class
Warrior^10
Mage^7
Rogue^8
location
Northern Kingdoms
Desert Lands
Mystic Isles
Output: "Nova the Rogue from Desert Lands"
Example 2: Conditional Logic Input:
mainOutput
[character.selectOne]
character
{name="Sir Galahad", weapon="holy sword", type="knight"}
{name="Merlin", weapon="staff of power", type="wizard"}
$name fights with [weapon]
Output: "Sir Galahad fights with holy sword"
Example 3: Interactive Buttons Input:
mainOutput
<button onclick="gen(this)">Generate Quest</button>
<br>[quest]
quest
Rescue the [target] from [danger]
Find the [artifact] in [location]
target
princess^5
merchant^3
scholar^2
danger
dragon's lair^4
bandit camp^6
cursed tower^3
Recommendation▾
Expand the pitfalls section with debugging tips and common error messages users encounter
Best Practices
- Use weights (^number) to control probability - higher numbers = more frequent
- Keep list names descriptive and lowercase
- Test frequently while building
- Use {object notation} for complex data with multiple properties
- Add HTML styling last, focus on logic first
- Use conditional syntax ($variable) for dynamic references
Common Pitfalls
- Don't use spaces in list names (use underscores:
magical_items) - Don't forget brackets around list references:
[listName]notlistName - Don't mix tabs and spaces - stick to consistent indentation
- Don't use reserved words like
this,output,import - Don't over-complicate weights - simple ratios work best
- Don't forget to test edge cases with conditional logic