mirror of
https://github.com/Such-Software/wownerogue.git
synced 2026-10-18 22:58:32 +02:00
feat(monetization): lock the cosmetic ladder (loyalty model) + free Original pack
Nails down the premium unlock system per the design pass: - FREE `original` topdown pack (NEW): the game's bare tiles — floor/wall/door/ torch/features only, no furniture, so the free tavern reads plain (the intended "reason to unlock"). Registered in assetPacks (RK.THEMES.original) as the free default topdown pack; plain ASCII stays free (accessibility). - Loyalty ladder (lifetime credits PURCHASED, cumulative, NOT deducted → buying to play also unlocks cosmetics): Interior 1, skins 5, iso 10, +tilepack 20, +iso 40, 3D 50. Each row is data (tilepack OR skin) → operator appends more at any rung. DEFAULT_CATALOG (entitlements.js) + migration 028 + MONETIZATION.md ladder table. - Tests updated to the new thresholds (catalogEntitlements_ultra, directEntryCredit_ultra). Note: this reprices roguelike-interior from free → 1cr, so once deployed the free tavern becomes bare (by design). Deploy is bundled with the single-player render-kit migration so the free-tier change lands with its payoff. Suite 61/432 green.
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
-- 028: lock the cosmetic ladder (loyalty model — unlock by lifetime credits purchased, cumulative).
|
||||
-- Adds the FREE `original` bare-tiles baseline and reprices the ladder: Interior 1, skins 5, iso 10,
|
||||
-- +tilepack 20, +iso 40, 3D 50. Mirrors DEFAULT_CATALOG in src/multiplayer/entitlements.js.
|
||||
-- Idempotent. See docs/MONETIZATION.md.
|
||||
INSERT INTO cosmetic_catalog (pack_id, label, kind, projection, tier, unlock_min_credits, grant_only, active, sort_order, metadata) VALUES
|
||||
('original', 'Original Tiles', 'render-pack', 'topdown', 0, NULL, false, true, 0, '{}'::jsonb),
|
||||
('roguelike-interior', 'Kenney Roguelike Interior', 'render-pack', 'topdown', 1, 1, false, true, 10, '{}'::jsonb),
|
||||
('generated-skins', 'Premium Character Skins', 'render-pack', 'topdown', 1, 5, false, true, 15, '{}'::jsonb),
|
||||
('iso-dungeon', 'Kenney Isometric Dungeon', 'render-pack', 'iso', 2, 10, false, true, 20, '{}'::jsonb),
|
||||
('roguelike-dungeon', 'Roguelike Dungeon (Tiles)', 'render-pack', 'topdown', 2, 20, false, true, 25, '{}'::jsonb),
|
||||
('iso-medieval', 'Medieval Town (Isometric)', 'render-pack', 'iso', 3, 40, false, true, 30, '{}'::jsonb),
|
||||
('kenney-3d-characters', 'Kenney Animated 3D Characters', 'render-pack', '3d', 3, 50, false, true, 40, '{}'::jsonb)
|
||||
ON CONFLICT (pack_id) DO UPDATE
|
||||
SET label = EXCLUDED.label, kind = EXCLUDED.kind, projection = EXCLUDED.projection, tier = EXCLUDED.tier,
|
||||
unlock_min_credits = EXCLUDED.unlock_min_credits, grant_only = EXCLUDED.grant_only,
|
||||
active = true, sort_order = EXCLUDED.sort_order;
|
||||
@@ -10,32 +10,47 @@ const Appearance = require('./appearance');
|
||||
// unlockMinCredits — lifetime-spend threshold to unlock, or null (not credit-unlockable).
|
||||
// grantOnly — only obtainable via an explicit grant/purchase.
|
||||
// premium — derived convenience flag: true unless the pack is free (no gate at all).
|
||||
// Cosmetic ladder. Unlock by LIFETIME CREDITS PURCHASED (cumulative — spend more, unlock more; NOT
|
||||
// deducted, so buying credits to play also walks you up the ladder) OR by subscription tier. Each
|
||||
// row is just data — a tilepack OR a char-skin, at any credit rung — so the operator adds more of
|
||||
// either by appending a row (+ assets + registerPack for a client pack). See docs/MONETIZATION.md.
|
||||
//
|
||||
// free original tiles (bare — no furniture, the "ugly tavern") + plain ASCII (in renderModes)
|
||||
// 1 Roguelike Interior (first premium tilepack)
|
||||
// 5 Character skins
|
||||
// 10 Iso technique (first iso pack) 20 another tilepack
|
||||
// 40 second iso pack 50 3D technique
|
||||
const DEFAULT_CATALOG = Object.freeze({
|
||||
'roguelike-interior': Object.freeze({
|
||||
id: 'roguelike-interior', label: 'Kenney Roguelike Interior', kind: 'render-pack',
|
||||
// FREE pleb baseline — the game's original bare tiles. Furniture kinds fall back to floor, so
|
||||
// the free tavern is pointedly plain (just floor + walls + players/monsters). By design: it's
|
||||
// the reason to unlock the richer packs.
|
||||
'original': Object.freeze({
|
||||
id: 'original', label: 'Original Tiles', kind: 'render-pack',
|
||||
projection: 'topdown', tier: 0, unlockMinCredits: null, grantOnly: false, premium: false
|
||||
}),
|
||||
// Graduated ladder — unlock by lifetime credit spend OR by subscription tier, whichever comes
|
||||
// first: Fancy(skins) at 1 credit / supporter, Iso at 10 / premium, 3D at 25 / operator.
|
||||
'generated-skins': Object.freeze({
|
||||
id: 'generated-skins', label: 'Premium Generated Skins', kind: 'render-pack',
|
||||
'roguelike-interior': Object.freeze({
|
||||
id: 'roguelike-interior', label: 'Kenney Roguelike Interior', kind: 'render-pack',
|
||||
projection: 'topdown', tier: 1, unlockMinCredits: 1, grantOnly: false, premium: true
|
||||
}),
|
||||
'roguelike-dungeon': Object.freeze({
|
||||
id: 'roguelike-dungeon', label: 'Roguelike Dungeon (Tiles)', kind: 'render-pack',
|
||||
projection: 'topdown', tier: 1, unlockMinCredits: 1, grantOnly: false, premium: true
|
||||
'generated-skins': Object.freeze({
|
||||
id: 'generated-skins', label: 'Premium Character Skins', kind: 'render-pack',
|
||||
projection: 'topdown', tier: 1, unlockMinCredits: 5, grantOnly: false, premium: true
|
||||
}),
|
||||
'iso-dungeon': Object.freeze({
|
||||
id: 'iso-dungeon', label: 'Kenney Isometric Dungeon', kind: 'render-pack',
|
||||
projection: 'iso', tier: 2, unlockMinCredits: 10, grantOnly: false, premium: true
|
||||
}),
|
||||
'roguelike-dungeon': Object.freeze({
|
||||
id: 'roguelike-dungeon', label: 'Roguelike Dungeon (Tiles)', kind: 'render-pack',
|
||||
projection: 'topdown', tier: 2, unlockMinCredits: 20, grantOnly: false, premium: true
|
||||
}),
|
||||
'iso-medieval': Object.freeze({
|
||||
id: 'iso-medieval', label: 'Medieval Town (Isometric)', kind: 'render-pack',
|
||||
projection: 'iso', tier: 2, unlockMinCredits: 15, grantOnly: false, premium: true
|
||||
projection: 'iso', tier: 3, unlockMinCredits: 40, grantOnly: false, premium: true
|
||||
}),
|
||||
'kenney-3d-characters': Object.freeze({
|
||||
id: 'kenney-3d-characters', label: 'Kenney Animated 3D Characters', kind: 'render-pack',
|
||||
projection: '3d', tier: 3, unlockMinCredits: 25, grantOnly: false, premium: true
|
||||
projection: '3d', tier: 3, unlockMinCredits: 50, grantOnly: false, premium: true
|
||||
})
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user