• Blog
  • Docs
  • Pricing
  • We’re hiring!
Log inSign up
roramigator

roramigator

lootGenAPI

Public
Like
2
lootGenAPI
Home
Code
2
README.md
H
main.tsx
Branches
1
Pull requests
Remixes
History
Environment variables
Val Town is a collaborative website to build and scale JavaScript apps.
Deploy APIs, crons, & store data – all from the browser, and deployed in milliseconds.
Sign up now
Code
/
README.md
Code
/
README.md
Search
8/30/2024
Viewing readonly version of main branch: v24
View latest version
README.md

Loot Generator API

How It Works

Components

The Loot Generator API creates random loot items by combining:

  • 30 adjectives
  • 29 materials
  • 15 item types

resulting in 13,050 possible items.

Legendary Items

Occasionally, a rare legendary item is generated. An item becomes legendary if all three components are rare. Rarity is determined by a threshold:

Threshold = max(1,⌊log(length)×0.6⌋)

Probability of a legendary item with the default settings:

P(Legendary) = 1/13,050 ≈ 0.00766%

Only one legendary item is possible: ✨💎 Arcane Diamond Rock.

Customization

You can expand the lists or adjust the 0.6 multiplier to control rarity.

FeaturesVersion controlCode intelligenceCLIMCP
Use cases
TeamsAI agentsSlackGTM
DocsShowcaseTemplatesNewestTrendingAPI examplesNPM packages
PricingNewsletterBlogAboutCareers
We’re hiring!
Brandhi@val.townStatus
X (Twitter)
Discord community
GitHub discussions
YouTube channel
Bluesky
Open Source Pledge
Terms of usePrivacy policyAbuse contact
© 2026 Val Town, Inc.