Skip to content

t1k:unity:sexygame:rc-variants

FieldValue
Modulesexygame
Version1.7.2
Effortmedium
Tools—

Keywords: feature entry rc, firebase remote config variant, mc sang review, remote config marketing, sexy rc variants, store review rc, user_experience rc

/t1k:unity:sexygame:rc-variants

Sexy 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:

VariantFile
marketingvariants/<game>/marketing.json
reviewvariants/<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 / fieldMarketingStore review
FeatureEntry DonateFeatureEntryDonateCondition, Level 8, AlwaysShow falseComingSoonCondition, AlwaysShow true
FeatureEntry SexyCardShopFeatureEntryFeaturePassLevelCondition Level 12ComingSoonCondition
FeatureEntry WallpaperCollectionFeatureEntryFeaturePassLevelCondition Level 6ComingSoonCondition
UX can_show_before_play_popupLevelCondition MinLevel 3RawBooleanCondition false (off)
UX use_alternative_win_flowfalsetrue
UX alternative_win_flow_has_animfalsetrue
UX rate_us_condition first level101

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 projectPackageSource
sgamearrow3dsgamearrow3dcom.arrow.out.secret.cubev67: marketing = defaults, review = Version 1.0.4 and upper
arrow-out-charm-reveal (“Arrow Out”)arrow-out-charm-revealcom.arrow.out.charm.revealv74: 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 gameSource: 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.

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.

  1. Fetch live when fbrc is not on PATH: bunx firebase-tools@latest remoteconfig:get --project <id> -o live.json (run in a scratch dir, never in the repo).
  2. 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.json against new.json, then AskUserQuestion Publish / Abort (hard rule 5).
  3. Deploy from a scratch dir holding firebase.json, .firebaserc and remoteconfig.template.json (= new.json): cd <dir> && firebase deploy --only remoteconfig --project <id> --non-interactive.
  4. 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):

KeyMarketing (live default)Review condition
BackgroundEnableFromLevel1999999
enable_interstitial_adtruefalse
donate_heart_per_win100
WallpaperPaidUnlockEnabledtruefalse

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)”
  1. Only conditionalValues[<condition>] of the two keys may change, plus optionally the index of that one condition.
  2. Never create a condition or edit a condition’s name, expression or tagColor.
  3. Never touch other keys, other conditions’ values, or any defaultValue.
  4. Never overwrite an experimentValue (e.g. “All versions” user_experience carries A/B experiment abt_1; the tool reports it as experiment and leaves it).
  5. Never publish without a fresh explicit AskUserQuestion confirmation showing the diff.

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).

  1. Fetch live (fbrc <project> remoteconfig:get > live.json, see memory firebase-fbrc-key-mapping). Keep a backup. Deploy details: t1k-unity-mobile-remote-config-deploy.
  2. 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.
  3. History / suggest (always before a marketing switch): bun $T history --dir <dir of v<N>.json> (or --live live.json for the live template only). To get a history dir, download versions with remoteconfig: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, a changesTimeline, and suggestions. Present them to the user.
  4. Prefer one shared value. A condition whose value equals defaultValue is 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. plan only writes the condition’s value (it never deletes); a removal is a manual/extended change the user must approve in the diff.
  5. Plan: bun $T plan --live live.json --variant marketing|review --condition "<exact name>" --out new.json [--move-to-index <n>]. Condition must already exist. Reports keysChanged and index before/after.
  6. Diff (diff <(jq -S . live.json) <(jq -S . new.json)), then AskUserQuestion Publish / Abort. Empty keysChanged and same index = no-op, stop.
  7. 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.
  8. 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:

KeySexy on (marketing default)Review (v67 condition)
BackgroundEnableFromLevel0 (sexy background on)999999 (off)
enable_interstitial_adtruefalse
donate_heart_per_win100
WallpaperPaidUnlockEnabledtruefalse
blueprint_versiondefault hashcondition 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.

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.

  • Review values never go into defaultValue. Writing them there switches every player, marketing users included; review belongs only in conditionalValues[<condition>]. Incident 2026-11-16 (arrow-puzzle-art-reveal).
  • A game with no variants/<game>/ uses _template; if the game’s live marketing value is custom against it, create a per-game dir (see Per-game snapshots) before planning review.
  • history is read-only; it classifies only FeatureEntry/user_experience against snapshots (other keys show value).
  • Parameter groups are searched, so keys are found top-level or grouped.
  • Deploy: cd into the deploy dir and run fbrc <project> deploy --only remoteconfig --project <id> --non-interactive. With --config <dir>/firebase.json from another cwd it fails File remoteconfig.template.json does not exist (resolved against cwd).
  • Never copy secrets or the service-account key into the skill.

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).