plan-lab: knob for levels bought up front by your position, net of what you paid

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-09-28 10:41:58 -05:00
parent e6b5a9fb22
commit 61be49c303
2 changed files with 9 additions and 3 deletions
+7 -2
View File
@@ -704,9 +704,12 @@
// in the story head, then every counter goes back to zero and members keep only the levels they actually bought.
G.replay = { in: G.aud.spent, admin: G.aud.admin + G.aud.entryFee, you: G.you.cash + G.you.entry, youLevel: G.you.level };
for (const m of G.members) { m.cash = 0; m.entry = 0; m.pool = 0; m.spent = 0; m.dc = 0; m.lic = 0; m.licV = 0; m.level = m === G.you ? 1 : (m.seedLevel || 1); if (m !== G.you) for (let L = 1; L <= m.level; L++) m.spent += price(L); } // what their bought levels cost at these prices
// Your levels bought up front (Marty, 28 Sep): start the run holding them, paid with your own money before month 1.
const preSel = document.getElementById('gYouLevels'); G.youPre = Math.min(PLAN.maxL, Math.max(1, Number(preSel && preSel.value) || 1));
G.you.level = G.youPre; G.you.spent = 0; for (let L = 1; L <= G.youPre; L++) G.you.spent += price(L);
G.aud = { spent: 0, received: 0, admin: 0, entryFee: 0, above: 0, pool: 0 }; G.poolCarry = 0; gNewMonth();
G.rows.push(gSnap(0));
const ol = document.getElementById('gStory'); if (ol) ol.innerHTML = '<li class="head">' + (seed === 'iap' ? 'Start: the InstantAdPay org today, placed 4-wide under each member\u2019s real recruiter: <b>' + cnt(G.members.length - 1) + ' members</b>, ' + cnt(G.members.filter(x => x.level >= 2).length) + ' of them past level 1 (the levels they actually bought), ' + cnt(G.members.filter(x => x.directs >= 2).length) + ' qualified. Every counter starts at zero and counts only what happens from month 1. For reference, had these rules been running all along, their past purchases would have moved <b>' + $$(G.replay.in) + '</b>, put <b>' + $$(G.replay.admin) + '</b> in the admin wallet and <b>' + $$(G.replay.you) + '</b> to you, funding you to level ' + G.replay.youLevel + '.' : 'Start: just you at level 1, nobody under you yet. In month 1 you recruit two people yourself (everyone needs two to receive cash at full reach); after that the org grows the way InstantAdPay’s did.') + ' Now run a month.</li>';
const ol = document.getElementById('gStory'); if (ol) ol.innerHTML = '<li class="head">' + (seed === 'iap' ? 'Start: the InstantAdPay org today, placed 4-wide under each member\u2019s real recruiter: <b>' + cnt(G.members.length - 1) + ' members</b>, ' + cnt(G.members.filter(x => x.level >= 2).length) + ' of them past level 1 (the levels they actually bought), ' + cnt(G.members.filter(x => x.directs >= 2).length) + ' qualified. Every counter starts at zero and counts only what happens from month 1. For reference, had these rules been running all along, their past purchases would have moved <b>' + $$(G.replay.in) + '</b>, put <b>' + $$(G.replay.admin) + '</b> in the admin wallet and <b>' + $$(G.replay.you) + '</b> to you, funding you to level ' + G.replay.youLevel + '.' + (G.youPre > 1 ? ' <b>You start at level ' + G.youPre + '</b>, bought up front for ' + $$(G.you.spent) + '.' : '') : 'Start: just you at level ' + G.youPre + (G.youPre > 1 ? ' (bought up front for ' + $$(G.you.spent) + ')' : '') + ', nobody under you yet. In month 1 you recruit two people yourself (everyone needs two to receive cash at full reach); after that the org grows the way InstantAdPay’s did.') + ' Now run a month.</li>';
gRender();
window.growAudit = () => ({ spent: Math.round(G.aud.spent), received: Math.round(G.aud.received), ok: Math.abs(G.aud.spent - G.aud.received) <= 0.01 + 1e-9 * G.aud.spent });
}
@@ -775,7 +778,7 @@
const s = G.rows[G.rows.length - 1];
document.getElementById('gMonth').textContent = G.month; document.getElementById('gMembers').textContent = cnt(s.members) + ' members';
document.getElementById('gLevel').textContent = s.youLevel; document.getElementById('gLevelS').textContent = 'reach = depth 1 to ' + s.youLevel + ' \u00b7 ' + s.youLic + ' licence' + (s.youLic === 1 ? '' : 's') + ' funded for you';
document.getElementById('gYou').textContent = $$(s.toYou); document.getElementById('gYouS').textContent = 'cash ' + $$(G.you.cash) + ' + entries ' + $$(G.you.entry) + '; licences worth ' + $$(G.you.licV) + ' apart';
document.getElementById('gYou').textContent = $$(s.toYou); document.getElementById('gYouS').textContent = 'cash ' + $$(G.you.cash) + ' + entries ' + $$(G.you.entry) + '; licences worth ' + $$(G.you.licV) + ' apart' + (G.you.spent ? ' \u00b7 paid ' + $$(G.you.spent) + (G.youPre > 1 ? ' up front for levels 1 to ' + G.youPre : ' for your entry') + ', net ' + (s.toYou - G.you.spent >= 0 ? '+' : '\u2212') + $$(Math.abs(s.toYou - G.you.spent)) : '');
document.getElementById('gAdmin').textContent = $$(G.aud.admin + G.aud.entryFee);
document.getElementById('gPool').textContent = $$(G.members.reduce((a, x) => a + x.pool, 0)); document.getElementById('gPoolS').textContent = s.poolN ? 'this month ' + $$(s.poolPaid) + ' to ' + cnt(s.poolN) + ' active members' : (Math.round(PLAN.pool * 100)) + '% of every dollar, split by activity';
gVisuals(s);
@@ -827,7 +830,9 @@
document.getElementById('gPoolPts').addEventListener('change', e => { PLAN.pool = Number(e.target.value); const a = document.getElementById('gAdmin'); if (a) a.nextElementSibling.textContent = Math.round((PLAN.fee - PLAN.pool) * 100) + '% of every dollar in'; });
// ── plan controls ──
function labelPre(){ const sel = document.getElementById('gYouLevels'); if (!sel) return; let sum = 0; for (const o of sel.options) { const n = Number(o.value); sum = 0; for (let L = 1; L <= n; L++) sum += price(L); o.textContent = (n === 1 ? 'Level 1 only' : n === PLAN.maxL ? 'All ' + n + ' levels' : 'Levels 1 to ' + n) + ' (' + $$(sum) + ')'; o.hidden = n > PLAN.maxL; } }
function applyPlan(){
labelPre();
PLAN.w = Number(document.getElementById('width').value);
PLAN.maxL = Number(document.getElementById('levels').value);
PLAN.shape = document.getElementById('shape').value;
+2 -1
View File
@@ -221,6 +221,7 @@ details.adv.big summary{font-size:18px}
<div class="ctl"><label>&nbsp;</label><button class="primary" id="gRun1">Run one month</button></div>
<div class="ctl"><label>&nbsp;</label><button id="gRun6">Run 6 months</button></div>
<div class="ctl"><label>&nbsp;</label><button id="gRun12">Run 12 months</button></div>
<div class="ctl"><label for="gYouLevels">Your levels bought up front</label><select id="gYouLevels"><option value="1" selected>Level 1 only</option><option value="2">Levels 1 to 2</option><option value="3">Levels 1 to 3</option><option value="4">Levels 1 to 4</option><option value="5">Levels 1 to 5</option><option value="6">Levels 1 to 6</option><option value="7">Levels 1 to 7</option><option value="8">All 8 levels</option></select></div>
<div class="ctl"><label for="gActive">Members who use a tool in a month (pool shares)</label><input id="gActive" type="range" min="10" max="90" step="5" value="40"><span class="val" id="gActiveVal">40%</span></div>
<div class="ctl"><label for="gTrain">New members who finish training in month 1</label><input id="gTrain" type="range" min="0" max="100" step="5" value="50"><span class="val" id="gTrainVal">50%</span></div>
<div class="ctl"><label for="gPoolPts">Pool, out of the 20 fee points</label><select id="gPoolPts"><option value="0">0 (company keeps 20%)</option><option value="0.05" selected>5 (company keeps 15%)</option><option value="0.1">10 (company keeps 10%)</option></select></div>
@@ -366,6 +367,6 @@ details.adv.big summary{font-size:18px}
<p class="fine">Unlisted working page for planning. Not a member page, not an offer. Every number here is a mechanic, not a prediction.</p>
<script src="/assets/plan-lab.js?v=20260928-1000"></script>
<script src="/assets/plan-lab.js?v=20260928-1040"></script>
</body>
</html>