t1k:unity:sexygame:rc-variants
| Field | Value |
|---|---|
| Module | sexygame |
| Version | 1.7.2 |
| Effort | medium |
| Tools | — |
Keywords: feature entry rc, firebase remote config variant, mc sang review, remote config marketing, sexy rc variants, store review rc, user_experience rc
How to invoke
Section titled “How to invoke”/t1k:unity:sexygame:rc-variantsSexy RC Variants: Remote Config for marketing vs store-review builds
Section titled “Sexy RC Variants: Remote Config for marketing vs store-review builds”Use for “setup firebase cho bản marketing/store review”, “đổi RC sang review”, “chuyển bản release sang marketing”, “gợi ý FeatureEntry/user_experience”.
Two variants differ in two owned keys, FeatureEntry and user_experience. Snapshots live INSIDE the skill, per game:
| Variant | File |
|---|---|
| marketing | variants/<game>/marketing.json |
| review | variants/<game>/review.json |
Shape: {"_source": {...}, "FeatureEntry": {obj}, "user_experience": {obj}} (parsed JSON, not strings; key order is ignored when comparing).
The Sexy standard (variants/_template/, default when a game has no own dir)
Section titled “The Sexy standard (variants/_template/, default when a game has no own dir)”From the user’s reference templates (sgamearrow3d v56 = marketing, v49 = review, 2026-10-08; identical to variants/sgamearrow3d/). Marketing vs review differ ONLY in these fields; every other key in those templates (ads, BackgroundEnableFromLevel, enable_interstitial_ad, donate_heart_per_win, WallpaperPaidUnlockEnabled, …) is the same in both:
| Key / field | Marketing | Store review |
|---|---|---|
FeatureEntry DonateFeatureEntry | DonateCondition, Level 8, AlwaysShow false | ComingSoonCondition, AlwaysShow true |
FeatureEntry SexyCardShopFeatureEntry | FeaturePassLevelCondition Level 12 | ComingSoonCondition |
FeatureEntry WallpaperCollectionFeatureEntry | FeaturePassLevelCondition Level 6 | ComingSoonCondition |
UX can_show_before_play_popup | LevelCondition MinLevel 3 | RawBooleanCondition false (off) |
UX use_alternative_win_flow | false | true |
UX alternative_win_flow_has_anim | false | true |
UX rate_us_condition first level | 10 | 1 |
Per-game snapshots
Section titled “Per-game snapshots”A game whose other FeatureEntry/UX fields differ from the standard (e.g. can_go_home) gets variants/<game>/: marketing.json = the game’s live marketing values, review.json = marketing + ONLY the review deltas above (never the template’s whole object, which would overwrite game-specific fields).
Game (--game) | Firebase project | Package | Source |
|---|---|---|---|
sgamearrow3d | sgamearrow3d | com.arrow.out.secret.cube | v67: marketing = defaults, review = Version 1.0.4 and upper |
arrow-out-charm-reveal (“Arrow Out”) | arrow-out-charm-reveal | com.arrow.out.charm.reveal | v74: marketing = Android version 1.0.1 and upper; review = that + deltas |
arrow-puzzle-art-reveal (“Arrow Puzzle”) | arrow-puzzle-art-reveal (project number 11829474592) | see google-services.json in the game | Source: live defaults 2026-11-16, no conditions existed. Marketing = defaults; review needs the user’s Version X and upper condition first (see Quick start) |
Missing variants/<game>/ falls back to _template (stderr note). --marketing/--review <file> override a snapshot (snapshot-shaped file or a template whose defaults are the variant). To refresh a snapshot, parse the key’s value string from the live template and rewrite the file, then update _source.
Quick start for a known game
Section titled “Quick start for a known game”Use when the game already has a variants/<game>/ row above. Replace <id> with the Firebase project and <game> with the --game name (same string for Arrow Puzzle). T=<SkillDir>/scripts/rc-variant.cjs, as in Workflow.
- Fetch live when
fbrcis not on PATH:bunx firebase-tools@latest remoteconfig:get --project <id> -o live.json(run in a scratch dir, never in the repo). - Check and plan:
bun $T detect --live live.json --game <game>bun $T plan --live live.json --variant review --condition "<name>" --out new.json- Diff
live.jsonagainstnew.json, thenAskUserQuestionPublish / Abort (hard rule 5).
- Deploy from a scratch dir holding
firebase.json,.firebasercandremoteconfig.template.json(=new.json):cd <dir> && firebase deploy --only remoteconfig --project <id> --non-interactive. - Verify: re-fetch with step 1, run
detect, and confirm the intended variant with nothing else changed.
A game with NO conditions (Arrow Puzzle today) needs the user to create the Version X and upper condition in the Firebase Console first. The tool must not create conditions (hard rule 2).
Companion keys for Arrow Puzzle’s review condition (the user chose these; the tool does not write them; blueprint_version stays unchanged):
| Key | Marketing (live default) | Review condition |
|---|---|---|
BackgroundEnableFromLevel | 1 | 999999 |
enable_interstitial_ad | true | false |
donate_heart_per_win | 10 | 0 |
WallpaperPaidUnlockEnabled | true | false |
Hard rules (the tool enforces them for plan; exit 2, nothing written)
Section titled “Hard rules (the tool enforces them for plan; exit 2, nothing written)”- Only
conditionalValues[<condition>]of the two keys may change, plus optionally the index of that one condition. - Never create a condition or edit a condition’s name, expression or tagColor.
- Never touch other keys, other conditions’ values, or any
defaultValue. - Never overwrite an
experimentValue(e.g. “All versions”user_experiencecarries A/B experimentabt_1; the tool reports it asexperimentand leaves it). - Never publish without a fresh explicit
AskUserQuestionconfirmation showing the diff.
Workflow
Section titled “Workflow”Work in a scratch dir (session scratchpad), never in the repo. T=<SkillDir>/scripts/rc-variant.cjs
(the script resolves variants/ relative to its own location, so no global path is involved).
- Fetch live (
fbrc <project> remoteconfig:get > live.json, see memoryfirebase-fbrc-key-mapping). Keep a backup. Deploy details:t1k-unity-mobile-remote-config-deploy. - Detect:
bun $T detect --live live.json. Per key:marketing,review,marketing+review,custom,experiment,none.custom= matches neither snapshot; say so, do not guess. - History / suggest (always before a marketing switch):
bun $T history --dir <dir of v<N>.json>(or--live live.jsonfor the live template only). To get a history dir, download versions withremoteconfig:versions:list/--version-number. Output: per key (FeatureEntry, user_experience, blueprint_version, BackgroundEnableFromLevel, enable_interstitial_ad, donate_heart_per_win, WallpaperPaidUnlockEnabled) the default and each condition with its label, achangesTimeline, andsuggestions. Present them to the user. - Prefer one shared value. A condition whose value equals
defaultValueis redundant: switching a version to marketing means REMOVING its conditional value so it falls through to the default, instead of keeping a per-version copy.planonly writes the condition’s value (it never deletes); a removal is a manual/extended change the user must approve in the diff. - Plan:
bun $T plan --live live.json --variant marketing|review --condition "<exact name>" --out new.json [--move-to-index <n>]. Condition must already exist. ReportskeysChangedand index before/after. - Diff (
diff <(jq -S . live.json) <(jq -S . new.json)), thenAskUserQuestionPublish / Abort. EmptykeysChangedand same index = no-op, stop. - Deploy from a scratch dir with
firebase.json,.firebaserc,remoteconfig.template.json(=new.json):fbrc <project> deploy --only remoteconfig --config <dir>/firebase.json --project <id>. Publish is a full replace; derive from a fresh fetch. - Verify: re-fetch,
detect, confirm intended variant and nothing else changed. Report new version and the previous one as rollback target.
Companion keys (the user decides; the tool writes only its two keys)
Section titled “Companion keys (the user decides; the tool writes only its two keys)”The sexy features also depend on keys in the same condition. In v67 the review condition Version 1.0.4 and upper sets them off:
| Key | Sexy on (marketing default) | Review (v67 condition) |
|---|---|---|
BackgroundEnableFromLevel | 0 (sexy background on) | 999999 (off) |
enable_interstitial_ad | true | false |
donate_heart_per_win | 10 | 0 |
WallpaperPaidUnlockEnabled | true | false |
blueprint_version | default hash | condition hash (different zip) |
A review/marketing switch normally needs these set for the condition too; history shows them side by side. Propose values, let the user decide, and only extend the tool/diff with explicit approval.
blueprint_version: share one value (drop the condition) only when hashes are EQUAL and compatible. Older app versions may need their own zip; never merge different hashes automatically.
Index note
Section titled “Index note”Conditions evaluate in order; moving one changes which wins for overlapping versions (1.0.7 and upper must stay above 1.0.6 and upper). Use --move-to-index only when asked and state before/after order.
Hard rules
Section titled “Hard rules”- Review values never go into
defaultValue. Writing them there switches every player, marketing users included; review belongs only inconditionalValues[<condition>]. Incident 2026-11-16 (arrow-puzzle-art-reveal). - A game with no
variants/<game>/uses_template; if the game’s live marketing value iscustomagainst it, create a per-game dir (see Per-game snapshots) before planning review. historyis read-only; it classifies onlyFeatureEntry/user_experienceagainst snapshots (other keys showvalue).- Parameter groups are searched, so keys are found top-level or grouped.
- Deploy:
cdinto the deploy dir and runfbrc <project> deploy --only remoteconfig --project <id> --non-interactive. With--config <dir>/firebase.jsonfrom another cwd it failsFile remoteconfig.template.json does not exist(resolved against cwd). - Never copy secrets or the service-account key into the skill.
Executed by
Section titled “Executed by”detect, history and plan are mechanical: a cheap-tier agent may run bun scripts/rc-variant.cjs and report its output. The deploy step stays reasoning-tier — it publishes live Firebase config and requires the operator-confirmed diff (AskUserQuestion, hard rule 5).