scene_add_progress_bar
Adds an on-screen bar that tracks a player's integer variable — purse, health, countdown, or goal progress — showing percent, value, or ratio on a copy of the save, even on 奇匠 level 1 accounts.
Instructions
Put a bar on the player's screen that follows one of the player's custom variables, in a copy of a save: a purse, a countdown, the health of the thing to defend, progress towards a goal. It is the way to show a number to the player on an account whose 奇匠 level is 1, where text boxes show nothing in play (measured) but bars do, with the fill and a percentage, or with the number itself (shows "value"). variable is an integer custom variable of the player (made with start value min if the player template does not have it); min and max are the ends of the bar. position is [x, y] from the screen centre on a 1600 x 900 canvas with y up (top centre is about [0, 380], top left [-600, 380]); size is [width, height]. A graph moves the bar with f.setCustomVariable(player, variable, value, true). How it looks: shape "horizontal" (as it comes), "vertical" or "ring" (a circle that fills clockwise from the top: a cooldown, a charge); shows "percent" (as it comes), "value" (the number itself: 7 coins read as 7, on an account of 奇匠 level 1 too, since the bar writes it, not a text box), "ratio" or "nothing" (a clean bar); colour of the fill and backColour behind it ("#rrggbb", backOpacity 0.5 unless said), textColour, fontSize. hidden true leaves the bar off the screen until a graph switches it on with f.modifyUiControlStatusWithinTheInterfaceLayout(player, controlId, UIControlGroupStatus.On). The style fields were read from three bars restyled by hand in the editor on 2026-10-13 and seen in play that morning (examples/images/images_lives.json): a red bar reading 6.0, a blue ring filled to six tenths, an upright bar reading 6.0 / 10.0, and a picture that came on when the graph switched it on. Writes a new .gil in the workspace; the official save is not touched.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| max | Yes | ||
| min | No | ||
| name | Yes | ||
| size | No | ||
| shape | No | ||
| shows | No | ||
| colour | No | ||
| hidden | No | ||
| mapPath | No | ||
| fontSize | No | ||
| position | No | ||
| variable | Yes | ||
| backColour | No | ||
| outputName | No | ||
| textColour | No | ||
| backOpacity | No |