Hold and valley minigames
This commit is contained in:
@@ -49,7 +49,8 @@ throws is closed, with the error in the console.
|
||||
## Inventory Overlays
|
||||
|
||||
An inventory overlay draws on every menu's screen (the player's inventory, chests, furnaces and every mod's menus), over
|
||||
the screen, like Just Enough Items' item list. `mods/recipe_viewer` is one.
|
||||
the screen, like Just Enough Items' item list. A menu screen with `inventory_overlays: false` has none, like the base
|
||||
game's fishing minigame. `mods/recipe_viewer` is one.
|
||||
|
||||
```ts
|
||||
import type { ClientContext } from "bworld/client";
|
||||
|
||||
@@ -157,12 +157,14 @@ export function setup(ctx: ClientContext) {
|
||||
The engine puts the screen in the middle of the window, and draws the menu's slots, the item on the cursor and item
|
||||
tooltips. The screen draws everything else with [`Graphics`](../gui/index.md#graphics), from its own top left:
|
||||
|
||||
| Field | Meaning |
|
||||
| ---------------------- | ------------------------------------------------------------------ |
|
||||
| `width`, `height` | Its size in GUI pixels, like `imageWidth` and `imageHeight`. |
|
||||
| `on_render_background` | Every frame, under the slots: a panel, textures, progress bars. |
|
||||
| `on_render_labels` | Every frame, over the slots: the title, labels, buttons. |
|
||||
| `on_tick` | 20 times a second while it's open, like `containerTick`. Optional. |
|
||||
| Field | Meaning |
|
||||
| ---------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `width`, `height` | Its size in GUI pixels, like `imageWidth` and `imageHeight`. |
|
||||
| `on_render_background` | Every frame, under the slots: a panel, textures, progress bars. |
|
||||
| `on_render_labels` | Every frame, over the slots: the title, labels, buttons. |
|
||||
| `on_tick` | 20 times a second while it's open, like `containerTick`. Optional. |
|
||||
| `dim_background` | `false` draws it right over the world, without darkening it. Optional. |
|
||||
| `inventory_overlays` | `false` keeps [inventory overlays](../gui/index.md#inventory-overlays), like the recipe viewer's item list, off it. Optional. |
|
||||
|
||||
The menu it gets:
|
||||
|
||||
|
||||
@@ -147,15 +147,20 @@ The fishing table, `bworld:gameplay/fishing`, isn't a file: the base game builds
|
||||
}
|
||||
```
|
||||
|
||||
| Field | What |
|
||||
| --------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `weight` | How often it's caught against the other fish, 1 when not given. |
|
||||
| `seasons` | The [seasons](../worldgen/biomes.md#seasons) it's caught in where the hook is, every one when not given. |
|
||||
| `biomes` | The [biomes](../worldgen/biomes.md#biome-ids) and [biome tags](../worldgen/biomes.md#biome-tags) it's caught in where the hook is, every one when not given. |
|
||||
| `time` | The hours it's caught at on a 24 hour clock, from `from` up to `to`, like `6.5` for 06:30. When `from` is past `to` it wraps around midnight. All day when not given. |
|
||||
| Field | What |
|
||||
| ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||
| `weight` | How often it's caught against the other fish, 1 when not given. |
|
||||
| `seasons` | The [seasons](../worldgen/biomes.md#seasons) it's caught in where the hook is, every one when not given. |
|
||||
| `biomes` | The [biomes](../worldgen/biomes.md#biome-ids) and [biome tags](../worldgen/biomes.md#biome-tags) it's caught in where the hook is, every one when not given. |
|
||||
| `time` | The hours it's caught at on a 24 hour clock, from `from` up to `to`, like `6.5` for 06:30. When `from` is past `to` it wraps around midnight. All day when not given. |
|
||||
| `minigame` | What the player does to land it once it's reeled in, in a screen that holds the fish until they win. Closing it lets the fish get away. Caught right away when not given. The base game's are `"test"`, a Catch button, `"hold"`, a bar that fills while the mouse is held and empties while it isn't: full lands the fish, empty loses it, and `"valley"`, Stardew Valley's, where holding the mouse lifts a bar to keep the fish in it. |
|
||||
| `difficulty` | How hard its minigame is, 10 when not given. In `"hold"`, the bar empties `1 + difficulty / 100` times as fast as it fills: 1.1 at 10, 2 at 100. In `"valley"`, it's Stardew Valley's fish difficulty: the higher, the more the fish darts around. |
|
||||
|
||||
When every fish can be ruled out, nothing is caught, so keep one that's always caught.
|
||||
|
||||
`/fish` reels in what the table gives where you stand, without casting, and `/fish <fish>` reels in that fish, minigame
|
||||
and all, for trying them out.
|
||||
|
||||
Those become the `bworld:season`, `bworld:biome` and `bworld:time` conditions, which any table can use too:
|
||||
|
||||
| `condition` | Fields | Holds when |
|
||||
|
||||
Reference in New Issue
Block a user