scene_add_card_selector
Adds a card selector window to a copied save so players can pick one or more cards, such as upgrades or rewards, when a graph opens it and returns the choice.
Instructions
Add a card selector (卡牌选择器) to a copy of a save: the platform's own window in which a player picks one or more cards out of a few, each with an icon, a title and a description (three upgrades to choose from after a wave, a reward, a class at the start); in a level for one player the game stands still while it is open. cards is the library of cards the window can show, {title, description, icon, label} each, or {unknown: true, label} for a card that hides what it is. A graph opens the window for a player with f.invokeDeckSelector, saying which cards of the library to show this time and what value each gives back, and the choice comes to a graph on the player template as whenDeckSelectorIsComplete; the answer of this tool gives both lines. seconds is the time to choose in (the graph may give another). canGiveUp: false takes the button 放弃选择 away (the player has to choose), canFold: false the button that folds the window away, pauseWhenAlone: false lets the game run on behind it, showTime: false hides the countdown; all four are on unless said. The selector stands in no layout: it shows only when a graph opens it, and not in the first seconds of a level (opened at level second 3 it did not show and the choice came back as the default twenty seconds later; at second 14 it showed: open it some seconds in, or on something the player did). The window has a title, a countdown, the cards in a row, 放弃选择 and 确认选择; a playtest picks a card with an input {clickText: its label} and then {clickText: "确认选择"}. Icons seen in the official sample: 91001 a sword (the one a card has when none is given), 91011 a polearm, 91016 a catalyst, 92001 to 92003 dishes. The records are those of the official sample 卡牌选择器, byte for byte; seen in play 2026-10-14 (examples/cards). Its words show on an account of 奇匠 level 2 and up. Writes a new .gil in the workspace.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| cards | Yes | ||
| title | No | ||
| canFold | No | ||
| mapPath | No | ||
| seconds | No | ||
| showTime | No | ||
| canGiveUp | No | ||
| outputName | No | ||
| warnSeconds | No | ||
| revealUnknown | No | ||
| pauseWhenAlone | No |