Draft
Conversation
- Add cooking recipe db table and pack it into cache tables - Implement cooking interactions for ranges/fires (cook click + item-on-object) - Show Make-X selection and process cooking loop (burn chance + xp) - Add simple recipe registry (lookup by raw/cooked) - Add DEV-only ::cooktest presets for quick testing - Define gamevals for cooking table + initial dbrows
GameValProvider stores mapping keys as fully-qualified "<table>.<key>" entries (matching the base/binary loader), but putMapping() previously checked conflicts against the unqualified key.\n\nThat mismatch allowed a TOML-provided mapping to slip past conflict detection and effectively override an existing entry while still being stored as a qualified key. In practice this can mask mapping mistakes until runtime, where they surface as confusing DB/table decode errors (e.g., missing columns when opening the cooking UI).\n\nChanges:\n- Compute a single qualifiedKey (".") in putMapping().\n- Use qualifiedKey consistently for both conflict detection and insertion.\n\nResult: mapping conflicts are detected reliably at load time, preventing silent overrides and making bad overrides fail fast with a clear error.
Bring in upstream changes: - Smithing skill implementation (OpenRune#79) - Separate client/server cache split (OpenRune#80) - Rev 236 update (OpenRune#81) - GameVal auto-assign for unset (-1) values - RSProt dependency upgrade + fix - Firemaking locking improvements Resolve conflict in QueueTaskExt: keep cooking branch dialog improvements (continues param, public closeDialog, itemMessageBox overload) alongside upstream produceItemBox documentation and postAndWait race-avoidance; remove duplicate EventManager import.
…ecture Architecture: - 3-layer design: Cache (recipe defs) → Runtime (DB row registry) → Content (event handlers) - Recipe data defined in cache module, packed into DB tables at build time - Runtime loads from generated Row classes into CookingActionRegistry - GameVal auto-assignment for all new DB row IDs Cache layer (new): - CookingConstants: trigger types, outcome kinds, station masks - CookingModels: ActionDef, InputDef, OutcomeDef, PrepStepDef, HeatStepDef - CookingHelpers: heatCook(), spitRoast(), multiStepCook() builder functions - CookingTables: DB table builders for actions, inputs, outcomes - CookingRecipeRegistry: central aggregator of all recipe definitions Recipe files (new): - FishRecipes: 23 fish (shrimp→manta ray, karambwan, rainbow fish, cave eel, snails) - MeatRecipes: 7 basic meats, 2 spit roasts (bird/beast), 6 hunter meats - BakedGoodsRecipes: garden pie (3-step prep + bake), cake (mixing + bake) - BreadRecipes, PizzaRecipes, PieRecipes, StewRecipes, PotatoRecipes - MiscFoodRecipes, WineRecipes Content layer (new): - CookingEvents: main event wiring (heat-source, item-on-item, Camdozaal) - CookingUtils: station detection, burn rate calculation, equipment checks - CookingOutcomes: weighted outcome selection, count rolling - CamdozaalPrepTable: knife-based fish preparation (guppy→catfish) - CookingActionRegistry: runtime data loading from DB tables - CookingConstants (runtime): Trigger and OutcomeKind constants Burn rate system: - Uses computeSkillingSuccess() with linear interpolation - Separate stopBurn levels for fire vs range - Station-specific base success rates (fire: 30%, range: 45%) Deleted old files: - cache/.../Cooking.kt (monolithic recipe definitions) - content/.../CookingEvents.kt (old event handler) - content/.../CookingRecipes.kt (old recipe lookup) Other: - CookingTestCommandsPlugin: expanded with all recipe presets - gamevals.toml: ~250 new DB row ID mappings
- Fix RSCM key 'items.cooking_gauntlets' → 'items.gauntlets_of_cooking' in hasCookingGauntlets(), which caused rollCookSuccess() to throw, silently killing the cook queue task with no in-game feedback - Wrap hasCookingGauntlets() and hasCookingCape() in runCatching for defensive safety against future RSCM key issues - Fix 39 invalid RSCM keys across 7 recipe files (BreadRecipes, FishRecipes, MiscFoodRecipes, PieRecipes, PizzaRecipes, PotatoRecipes, StewRecipes) - Replace 307 placeholder -1 values in gamevals.toml with sequential IDs - Fix MESSAGE_GAME overflow in cooktest command (auto-split at 250 chars) - Split large cooktest presets to fit 28-slot inventory limit
- Add ChanceDef data class and ChanceModifier constants for modifier bitmasks (gauntlets, hosidius +5%/+10%, lumbridge range) - Embed burn chance profiles directly in all recipe definitions (fish, meat, bread, pies, pizza, stews, misc food, potatoes, baked goods) - Rewrite rollCookSuccess() with modifier-aware chance matching system, falling back to legacy stopBurn for recipes without profiles - Add CookingRecipeTests to verify heat-source recipes have chance data - Add chancesByAction lazy map in CookingActionRegistry for runtime lookup - Fix station masks for chompy (fire-only) and scrambled egg (range-only) - Remove old wikidata/ source files (now embedded in code) - Add cooking design docs
Add comprehensive food entries covering all cookable items from the Old School RuneScape wiki food table. New entries organized by category: - Basic fish (anchovies, sardine, cod, haddock, halibut, etc.) - Sailing fish (yellowfin, bluefin, marlin, swordtip squid, etc.) - Produce & fruits (banana, cabbage, potato, dragonfruit, pumpkin, etc.) - Cooked meats (rabbit, chompy, scrambled egg, wrapped oomlie) - Spit-roasted meats (bird, beast, rabbit) - Snails & spiders (3 snail variants, spider on stick/shaft) - Hunter meats (kebbit, larupia, graahk, kyatt variants) - Baked potatoes (plain, butter, cheese, chilli, egg, mushroom, tuna) - Bowl foods (stew, fried mushrooms, fried onions, egg+tomato) - Dorgesh-Kaan foods (bat shish, frog burger, green gloop soup, etc.) - Crab meats (red, blue, rainbow) - Drinks & ales (beer, wine, grog, stout, cider, etc.) - Gnome cocktails (blurberry, choc saturday, drunk dragon, etc.) - Miscellaneous (jubbly, sweetcorn, baguette, kebab, choc-ice, etc.) All RSCM item keys verified against gamevals.dat binary data. Includes reference CSV from wiki at docs/cooking/osrs_food_all.csv. Total food entries: 52 -> 195
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
https://oldschool.runescape.wiki/w/Cooking
https://oldschool.runescape.wiki/w/Burnt_food
#53