26 KiB
SPEC R2: crafting from the main menu, pot back to vanilla, arrows, recipe config
Status: research done 2026-10-06, every choice PROPOSED, the owner decides. Nothing is built.
Path prefixes: LC/ = _Mods/LonaCraft/, RPS/ = _Mods/RolePlayS/, G/ = LonaRPG/Data/Scripts/.
Load order assumed: RolePlayS before LonaCraft (decided, BOARD R1).
0. Facts this spec rests on
| Fact | Where |
|---|---|
The craft scene already takes a station: LonaCraft.open_craft_scene(station), falls back to :pot if the station is not in Stations::LIST |
LC/Scripts/80_CraftScene.rb:34-43 |
It lists Recipes.for_station(station) plus the PROCESS rows of that station |
80_CraftScene.rb:116-150; 55_Recipes.rb:320-327 |
Stations: LIST = [:pot, :carpentry, :furnace, :anvil, :tailor]; pot recipes = PROCESS "Plank" and "RopeFibre" + Furniture_CarpentryBench.json "station": ["pot","carpentry"] |
55_Recipes.rb:49-61; LC/Recipes/Furniture_CarpentryBench.json:5 |
| Leaving the scene always goes to the map | 80_CraftScene.rb:786-789 |
Tier roll is one line: tier = recipe.fixed_tier ? ... : Skill.roll_tier(req); the station is not known there |
55_Recipes.rb:423 |
Displayed chances: CraftUI.tier_chances(entry) |
80_CraftScene.rb:242-257 |
Tiers has no per-station notion; Tiers.variant(base, tier) just maps a tier to an item |
50_Tiers.rb:138-145 |
Override files: one output each, amount always 1, non-craftable outputs forced to fixed_tier 1, missing output/input = skipped + console line |
55_Recipes.rb:245-273 (249-251, 257-259, 265, 272) |
A recipe with no station and no Wood/Metal/Cloth/Leather tag goes to the Carpentry Bench |
55_Recipes.rb:66, 103-106, 276-285 |
Pot Craft is blocked only by $game_map.threat (buzzer + "incombat" popup) and for non-Lona actors |
20_Station.rb:133-138 |
| Furniture is blocked on the overmap and in combat | 90_Furniture.rb:322-323, 1007-1018 |
| Skill above Lona's level BLOCKS the craft in the scene (buzzer, skill line blinks), while README:187 says it only rolls low | 80_CraftScene.rb:795-799 vs LC/README.md:187 (open discrepancy, not part of R2) |
| Display bug: a Recipes-list process row is shown as x1 (Wooden Club -> "Plank", gives 2) because the entry is built with qty 1 | 80_CraftScene.rb:134 (Recipes.craft gives recipe.amount, 55_Recipes.rb:428) |
lonacraft_process_menu (old pot Process list) has no caller any more |
LC/Scripts/30_Process.rb:117-132 |
1. A "Craft" entry in the main menu
1.1 How the menu is built
| Piece | Where | Note |
|---|---|---|
Page list init_contents: [label, PageClass], 9 pages; Equips/Items/Skills only if !$game_player.cannot_control; System only if !menuSystem_disabled |
G/Frames/170_menu_base.rb:66-78 | the one list builder |
| Page objects are built once with the actor | 170_menu_base.rb:61 | PageClass.new(@actor) |
Row position y = 28 + index*18, 120x28 bitmap |
170_menu_base.rb:263-291 (y at 284) | 10 rows -> last at y 190 |
OK on a row: Menu_Contents#process_ok -> @menu.deactivate; page.enter_page (only if the page responds to it) |
170_menu_base.rb:220-222, 412-417 | |
Every page's update runs every frame, shown or not |
170_menu_base.rb:428-430 | |
Page base Menu_ContentBase (viewport, show/hide) |
170_menu_base.rb:457-526 | |
Template of a one-action page: Menu_Exit#enter_page (goes to the map), unused in the list |
G/Frames/194_menu_08_0_System.rb:8-14 | exactly the pattern needed |
Precedent for going back to the menu from another scene: SceneManager.goto(Scene_Menu) |
G/Frames/111_Scene_Save.rb:37-45 | |
SceneManager.call/return pop a debug msgbox; use goto |
G/Frames/6_SceneManager.rb:91-102 | |
| Menu opens unless an event runs / action state / message; only Hardcore>=2 blocks it near enemies | G/Frames/102_00_Scene_Map.rb:203-216 | so the menu CAN be open in combat |
| Gauge text starts at y 209 (vanilla) | 170_menu_base.rb:857 | screen 640x360, G/60_FullScreenPlus.rb:269 |
Cocona's menu has its own init_contents (5 pages), no super |
G/Editables/5000_Npc_UniqueCocona.rb:76-93 | an alias on Scene_Menu does not reach it |
RolePlayS (loaded files only: RPS/loader.rb:33-43 load Scripts/Frames/; Scripts/Frames2/ with its own init_contents is NOT loaded):
| RolePlayS hook | Where | Effect on a new entry |
|---|---|---|
Menu_Command#initialize redefined (font LARGE = 17, same y = 28 + i*18) |
RPS/Scripts/Frames/170_menu_base.rb:7-40; RPS/Scripts/0_CORE.rb:817 | none, row picks up the font |
Scene_Menu#start alias: clamps the saved index with init_contents.length |
RPS/.../170_menu_base.rb:83-92 | counts the new entry automatically |
create_cursor, create_background (adds bg_hud_menu 640x360) |
RPS/.../170_menu_base.rb:97-130 | none |
process_exit_menu keeps the page index |
RPS/.../170_menu_base.rb:135-141 | menu reopens on Craft |
Menu_Gauge top 215 |
RPS/.../170_menu_base.rb:176 | 10th row at y 190 overlaps the panel (from y 207) by ~5 px: 85_MenuCraft.rb re-spaces rows to 17 px when a menu has more than 9 rows (verified 2026-10-06) |
Scene_Menu#start alias (cache preload) |
RPS/Scripts/2_PersistentCache.rb:257-277 | none (the file is commented out in RolePlayS's loader.rb, so it never loads) |
Other mods: none adds a menu entry. Lona Big Booba redefines one page class (Menu_SexStats, Lona_Booba_Graphics/BoobaMod.rb:188); CustomDifficulty, EasyTravel, Campsites only alias save/load/nap/overmap code (CustomDifficulty/Scripts/10_CustomDifficulty.rb:12-13, 58-59, 119-120; EasyTravel/Scripts/20_OverMap.rb:8-10, 30_InMap.rb:5-6; Campsites/Scripts/10_Campsites.rb:240-331). Nothing hard-codes menu indices (grep prevOptChooseSet(<number>) / menu_index == <n>: 0 hits).
1.2 Where the entry sits (PROPOSED)
| Option | Order | For | Against |
|---|---|---|---|
| A (recommended) | ... Equip, Items, Craft, Skills, Traits, Letters, System | next to the inventory it works on; hidden with Items when cannot_control |
Skills/Traits/Letters/System move down one row |
| B | ... Letters, Craft, System | only System moves | far from Items |
| C | a button inside the Items page | no new row | RolePlayS rewrites the Items page (RPS/Scripts/Frames/191_menu_07items.rb); two layouts to patch |
How: alias Scene_Menu#init_contents, find the row whose class is Menu_Items, insert [$game_text["LonaCraft:Craft:Menu/entry"], Menu_LonaCraft] after it; no Menu_Items row (cannot_control) = no Craft row. Same code with and without RolePlayS (neither changes the list builder). Cocona's menu is untouched (own init_contents).
1.3 How it is drawn and what it opens (PROPOSED, recommended)
Menu_LonaCraft < Menu_ContentBasein a newLC/Scripts/85_MenuCraft.rb(loaded after 80_CraftScene.rb in LC/loader.rb:17).- The page shows one sprite on its viewport: title "Crafting by hand", one hint line ("Press OK to work with what you carry"), crafting level, and, when blocked, the reason in red.
enter_page(OK key; mouse: left click on the page area outsideSceneManager.scene.menu_rect, checked in the page'supdateonly while its viewport is visible) runsLonaCraft.open_craft_scene(:hand, :menu).open_craft_scene(station, back = :map)storesback;Scene_LonaCraft#exit_scene(80_CraftScene.rb:786-789) goes toScene_Menuwhenback == :menu, else the map. The menu reopens on the Craft page (saved index, 170_menu_base.rb:170; RPS 170:138).- New station symbol
:handinStations::LIST, textLonaCraft:Craft:Station/hand= "By Hand" (6 x Text//Craft.txt, next toStation/potat line 85).
1.4 When it is blocked (PROPOSED, recommended: all four)
| Case | Test | Today at the pot | Proposed at the menu |
|---|---|---|---|
| Combat | $game_map.threat |
blocked (20_Station.rb:133-137) | buzzer, red line on the page, @menu.activate (process_ok deactivated it) |
| World map | $game_map.isOverMap |
n/a (no pot there) | blocked, same as furniture (90_Furniture.rb:322); "find a place to sit down" |
| Not Lona (NPC channel) | LonaCraft.vanilla_only_actor? |
vanilla pot (20_Station.rb:138) | blocked |
| No control | $game_player.cannot_control |
n/a | row not shown (like Items) |
| No stamina | actor.sta <= 0 |
per craft | per craft, unchanged (55_Recipes.rb:385) |
No map popup from the menu (popups need the map spriteset), hence the red line.
2. The hand-crafting list
2.1 What "limited" means technically (PROPOSED, recommended: both)
| Lever | How | Hook |
|---|---|---|
| Limited SET | only recipes that name "hand" (config / recipe file) or a PROCESS row with :hand; default_stations never returns :hand |
55_Recipes.rb:51-61, 276-285 (no change needed beyond the data) |
| Limited QUALITY = Common only | per-station cap Stations::MAX_TIER = {:hand => 1}, applied at the roll and in the shown chances |
below |
Exact hook (station cap):
# 55_Recipes.rb, module Stations
LIST = [:hand, :carpentry, :furnace, :anvil, :tailor]
ALIASES = {:pot => :hand} # old "station": "pot" in recipe files
MAX_TIER = {:hand => 1} # nil = no cap
def self.max_tier(station); MAX_TIER[station]; end
# parse (line 78): sym = ALIASES[sym] || sym
# 55_Recipes.rb:405, 423
def self.craft(recipe, interpreter = nil, station = nil)
tier = recipe.fixed_tier ? recipe.fixed_tier.to_i : LonaCraft::Skill.roll_tier(recipe.skill_req)
cap = LonaCraft::Stations.max_tier(station)
tier = cap if cap && tier > cap
# 80_CraftScene.rb:299 LonaCraft::Recipes.craft(entry.source, nil, LonaCraft.craft_station)
# 80_CraftScene.rb:242-257 tier_chances: fold every chance above the cap into the cap tier
The cap is a safety net: every default hand recipe below is fixed tier 1 already; it keeps a gear recipe that a user moves to "hand" Common-only, while the same recipe still rolls at its bench. "Common only, no roll" for the whole station is the recommendation; a cap of 2 (Uncommon) is one number in the config (section 6).
2.2 PROPOSED default hand list (recommended)
| # | Item | Materials | Skill | STA | Why it fits "by hand" | Source of the recipe today |
|---|---|---|---|---|---|---|
| 1 | 2 Plank | 1 Wooden Club | 0 | 1 | split a club with what she carries; first material of everything | PROCESS "Plank" (30_Process.rb:24; 55_Recipes.rb:52) |
| 2 | 1 Rope | 4 plants/herbs (any) | 0 | 1 | twisting fibre needs no tools | PROCESS "RopeFibre" (30_Process.rb:28; 55_Recipes.rb:58) |
| 3 | Carpentry Bench | 6 Plank, 2 Rope | 1 | 8 | the owner's starting place; a lashed frame, no nails | Recipes/Furniture_CarpentryBench.json |
| 4 | Light Arrows (x10) (RolePlayS only) | 1 Plank, 1 Bone | 0 | 2 | RolePlayS: "simple... stone tip, easy to make" (RPS/Text/ENG/DataItem.txt:42-47) | new (section 4) |
4 recipes (3 without RolePlayS). All Common, all skill <= 1.
2.3 "Maybe" items
| Item | Materials (proposed) | For | Against | Call |
|---|---|---|---|---|
| 1 Rope from 3 Cloth Bolt | as Tailor (30_Process.rb:27) | harmless, cloth already bought | duplicate path, tailor exists for it | no |
| 1 Cloth Bolt from 4 plants | as Tailor (30_Process.rb:29) | early cloth without a town | weaving needs a loom; makes the Tailor's Table trivial | no |
| 1 Stone Block from 2 Rough Stone | as Bench (30_Process.rb:32) | early Furnace | masonry needs tools; the bench is the next step anyway | no |
Bedroll (key PottedPlant, FURNITURE_LIST.md:41) |
today 2 Stone Block, 1 Plank; by hand e.g. 2 Hide, 1 Rope | the only sleep piece without a bench | placeable only in an owned home (README:298-301); the field nap works without it | no (maybe later) |
Cooking Fire (key Campfire, 90_Furniture.rb:93) |
2 Plank, 4 Stone Block | camp feel | decoration only, no Cook action; needs Stone Block | no |
| Wooden Club from 2 Plank | Recipes/WoodenClub.json | — | circular with recipe 1; gear belongs at the bench | no |
| Fire Arrows (x10) | section 4 | arrows in one place | oil + flame + cloth wrap: bench work | no (bench) |
2.4 Never by hand (rule, PROPOSED)
- Anything whose recipe today needs heat or metal: every Furnace and Anvil recipe (Iron Ingot, Glass, Nails), every recipe with Iron Ingot or Nails as input.
- All weapons and armour (they roll tiers at their bench).
- All furniture and decoration except the Carpentry Bench.
- Leather (tanning) and Cloth Bolt (weaving).
- Anything with skill > 1, and nothing above Common (cap 1).
The config validator (section 6) does NOT enforce this; it is the default data. A user may break the rule on purpose.
3. Removing Craft from the dark pot / stove
| File:line | Change (PROPOSED, recommended) |
|---|---|
20_Station.rb:129 LonaCraft.install_pot_redirect |
delete: every pot runs Data/HCGframes/Command_DarkPot.rb (or another mod's redirect) directly |
20_Station.rb:44-57 (station_script, pot_previous, install_pot_redirect) and :132-151 (lonacraft_pot_station) |
delete |
20_Station.rb:155-164 lonacraft_run_original_pot |
keep the name (the Stove calls it, 90_Furniture.rb:1068-1070), body becomes load_script(LonaCraft::POT_SCRIPT); load_script applies other mods' redirects itself (G/102_ScriptImport.rb:63) |
| LC/HCGframes/Command_PotStation.rb | delete (only 20_Station.rb:45 points to it) |
30_Process.rb:117-161 (lonacraft_process_menu, lonacraft_process_run) |
delete (no caller); keep PROCESS_RECIPES and the fibre helpers |
| 55_Recipes.rb:49, 52, 58 | :pot -> :hand (LIST, "Plank", "RopeFibre"); ALIASES = {:pot => :hand} so third-party "station": "pot" still lands on the hand list |
| 80_CraftScene.rb:34-43 | default and fallback :pot -> :hand |
| 90_Furniture.rb:1074 | `kind[:station] |
| Recipes/Furniture_CarpentryBench.json:5 | ["hand", "carpentry"] |
Text//Station.txt:7-9 Pot/begin (6 languages) |
delete |
Text//Craft.txt:85-86 Station/pot |
replace with Station/hand; add Menu/entry, Menu/title, Menu/hint, Menu/blocked_threat, Menu/blocked_overmap |
| README.md:9-14, 36, 43, 62, 71, 73-76, 192-193, 309, 480-481 | rewrite: pot = vanilla Cook; "By hand" station; bootstrap starts from the menu |
| docs/RPS_INTEGRATION.md:108 | note the pot redirect is gone |
Stove furniture: already Cook only (:actions => [:cook, :pickup, :cancel], 90_Furniture.rb:81) through lonacraft_run_original_pot; unchanged for the player. Inn pots, stoves, "Set Dark Pot": vanilla Craft-less menu; RolePlayS's pot recipes (incl. its arrows, section 4) still work through Cook.
Dead :pot id: nothing in the save stores a station (grep station|pot in 70_Save.rb: 0 hits; salvage boxes are keyed :carpentry/:anvil/:tailor, 20_Station.rb:30). $mod_load_script is set at boot, not saved. So :pot can go; keep it only as the parse alias above.
4. Arrows (RolePlayS)
4.1 What exists
3 families x 5 bundles = 15 items, all RPG::Item, type/tag "Arrows", consumable, no pot_data (RPS/Item/Projectiles_Arrows*.json:2-21).
| Family | Item names | Quiver stat | Price x5/x10/x15/x20/x25 | Per arrow | Weight x5..x25 | Bows (RPS/Scripts/102_map_hud_new.rb:134-146) |
|---|---|---|---|---|---|---|
| Light | ItemArrowsShortX5..X25 | arrows_short | 50/100/150/200/250 | 10 | 1..5 | Item2MhShortBow, Item2MhHunterBow |
| Medium | ItemArrowsMediumX5..X25 | arrows_medium | 200/400/600/800/1000 | 40 | 1..5 | Item2MhAssBow, Item2MhLongBow, Item2MhSniperBow, Item2MhElvenBow |
| Fire | ItemArrowsFireX5..X25 | arrows_fire | 150/300/450/600/750 | 30 | 1..5 | Item2MhBowJaeger |
- Using a bundle adds N to the actor stat (
use_item_effect"+N", e.g. RPS/Item/Projectiles_ArrowsMedium_x10.json:16-21). Stat rows[25, 0, 99, 99, ...]light,[0, 0, 99, 99, ...]medium/fire: light starts at 25, cap 99 (RPS/Scripts/25_Skills.rb:394-396, accessors 400-407). - Per shot: 1 arrow for every bow skill that names one (
adjustment1: BowJaegerNormal/Control.json:43/53, ElvenBowNormal/Control:43/53, HunterBowControl:56, LongBowControl:60, MediumBowNormal:43, ShortBowNormal:43, SniperBowControl:60); ShortBowControl lists 0 (RPS/Skill/ShortBowControl.json:53) and its multishot takes 1 light arrow per projectile (RPS/Scripts/480_EventCharacterBatch.rb:226-233). - Sources today: bow enemies drop bundles at 50% (e.g. RPS/NPC/GoblinBow.json:68-71 x10 light, UndeadEliteBow.json:67-70 x5 medium); RolePlayS dark-pot (Cook) recipes, 5 arrows per set: Light = Wood + Rock, Medium = Wood + CrystalOre, Fire = Wood + Rock + Oil (RPS/Alchemy/400_darkPot_Arrows.json:7-24, 100-115, 183-198). LonaCraft's Plank (Wood 1) and Rough Stone / Stone Block (Rock 1) already count there (LC/Item/Plank.json:16-18, RoughStone.json:16-18, StoneBlock.json:16-18).
- LonaCraft derivation does NOT reach them: CRAFTABLE needs Weapon/Armor with a craft tag (50_Tiers.rb:78-94). They need explicit recipes; an override for a non-craftable output is fixed tier 1 (55_Recipes.rb:265), so they never roll.
4.2 PROPOSED recipes (recommended; one x10 bundle per craft, no code change for the amount)
| Output | Materials | Value in / out | Skill | STA | Station | Note |
|---|---|---|---|---|---|---|
Light Arrows (x10) ItemArrowsShortX10 |
1 Plank, 1 Bone | 90 / 100 | 0 | 2 | hand, carpentry | bone tip; alt: 1 Plank + 2 ItemRock (vanilla rock, price 0) |
Medium Arrows (x10) ItemArrowsMediumX10 |
2 Plank, 4 Nails | 220 / 400 | 3 | 6 | anvil | steel tip = metal work; RolePlayS pot equivalent costs 2 Crystal Ore (400) + 2 Wood |
Fire Arrows (x10) ItemArrowsFireX10 |
1 Light Arrows (x10), 1 Cloth Bolt, 2 Oil (ItemOil, price 1) |
162 / 300 | 2 | 4 | carpentry | upgrade of the light bundle; oil-soaked cloth |
Value in = materials at their own price (Plank 60, Bone 30, Nails 25, Cloth Bolt 60; README:34-47). Every recipe is >= 54% of the output price, so buying materials and selling arrows is not a money pump. Skill = the default rule round(sqrt(price/50)) except Light (0 instead of 1, so it is in the hand list from the start).
- Tiers: no (fixed tier 1, automatic).
- Group in the scene: today an
RPG::Itemfrom an override lands in "Processing" (80_CraftScene.rb:106-110, 128-133) and gives gear exp 5 + skill (60_Skill.rb:131). PROPOSED (recommended): category"ammo"-> group "Ammunition" (newGroup/Ammotext key, GROUPS 80_CraftScene.rb:72-79, OVERRIDE_CATEGORIES 55_Recipes.rb:135) and 1 exp like processing (60_Skill.rb:131), since bundles are cheap and repeatable. - Without RolePlayS: the outputs do not exist -> the recipes are skipped with one console line each (55_Recipes.rb:249-251); the player sees nothing. With the config's
"requires": ["RolePlayS"](section 6) they are skipped without the console line. If RolePlayS loads after LonaCraft the same skip happens (items not yet defined atRecipes.build, 0_Core.rb:143).
5. Save / compatibility
| Area | Impact |
|---|---|
| Save data | none: recipes, stations, the menu page and the config are rebuilt at boot; $game_system crafting data (60_Skill.rb:20-27) unchanged |
| Item ids | no new items; arrows are RolePlayS's (not in LonaCraft's remap, 70_Save.rb) |
| Old saves | load unchanged; pots simply stop asking Craft/Cook |
| Other mods replacing Command_DarkPot.rb | now win in any order (LonaCraft no longer redirects it) |
| RolePlayS absent | menu entry works; arrow recipes vanish |
| Cocona menu | untouched |
| Screen | 10 menu rows: last at y 190, gauge text at 209 (vanilla) / 215 (RolePlayS); needs a screenshot both ways |
6. Recipe config file (owner addition, 2026-10-06)
Today: three layers, highest first: Recipes/*.json overrides (full replacement per output, 55_Recipes.rb:148, 228-273) > derived from pot tags (55_Recipes.rb:205-226) ; plus PROCESS_RECIPES and the station maps in code (30_Process.rb:23-33; 55_Recipes.rb:51-67). 56 recipe files ship (54 furniture, WoodenClub, ShortSword).
Parsing available: the game's JSON.decode (G/101_jsonEnDecoder.rb:69-74), which skips // line comments (:181-188) but treats only space, \n, \t as whitespace (:175-176), so strip \r first (Notepad CRLF). JSON.encode writes one line and does not escape quotes (:76-121): a written file needs a small pretty-printer. Ini style is parsed by hand in other mods (Campsites/Scripts/0_Config.rb:7-14, key = value per line).
6.1 Options
| A: one file with everything | B: per-item files + small configs | C: ini LonaCraft.cfg |
D: user file + generated defaults (recommended) | |
|---|---|---|---|---|
| Files | Config/Recipes.json, derived recipes written into it on first run |
keep Recipes/*.json, add Config/Hand.json, Config/Overrides.json |
Config/LonaCraft.cfg, one line per recipe out = stations | skill | in:n,in:n |
Config/Recipes.json (user, partial entries) + Config/Recipes_defaults.json (written at every boot, read-only reference) |
| Non-coder finds it | one file, but hundreds of entries | three places | one file, cryptic lines | user file is short; defaults list every recipe with its display name as a // comment |
| Derived / other mods' gear | frozen at first run; new mod gear appears only if merged in | as today | needs writing out too | defaults file is rewritten each boot from what is loaded (RolePlayS gear, arrows) |
| Mod update changes a default | user's file shadows it forever | fine | as A | fine: user entries only hold what the user changed |
| Missing item / material | skip + console line | same | same | skip + console line; requires skips silently |
| Precedence | file = everything | config > files > derived | cfg > files > derived | user config (field merge) > Recipes/*.json > derived/PROCESS |
| Reload | restart, or debug key | same | same | restart; DEBUG build: a free numpad key (Numpad * if the game's Input maps it; 2/4/6/8 are taken, 95_Debug.rb:5) re-runs Recipes.build (recipes are not saved, safe) |
| Format | JSON (game loader) | JSON | hand parser | JSON (game loader) |
| Save impact | none | none | none | none |
Recommendation: D. It keeps the shipped Recipes/*.json as the mod's default layer (unchanged format, nothing replaced), wraps the derived recipes, PROCESS rows and station rules, and adds one short user file where an entry only names what it changes.
6.2 Schema (D)
Config/Recipes.json:
| Key | Type | Default | Meaning |
|---|---|---|---|
stations.<id>.max_tier |
1..5 | hand 1, others none | best tier a station can give (section 2.1) |
stations.<id>.cost |
1..10 | hand 1.25, others 1.0 | input multiplier at that station, ceil(count x cost) per input (owner 2026-10-06; Recipes.inputs_at, 55_Recipes.rb) |
recipes[].id |
string, required | — | output item_name, or process:<Key> for a PROCESS row (30_Process.rb:24-32) |
enabled |
bool | true | false removes the recipe everywhere |
station |
string or list | from lower layer | hand, carpentry, furnace, anvil, tailor (pot = hand) |
skill |
0..20 | from lower layer | crafting level needed |
inputs |
{item_name: count} | from lower layer | *plant = any plant; replaces the whole input list |
amount |
int >= 1 | 1 | how many outputs per craft (also fixes the x1 display, 80_CraftScene.rb:134) |
max_tier |
1..5 | none | per-recipe cap (1 = always Common) |
category |
gear/furniture/decoration/ammo | from lower layer | list group |
requires |
[mod id] | [] | skip silently unless these mods are loaded ($mod_manager.mods, 0_Core.rb:101) |
Unknown keys: console line, ignored. An entry with an unknown id, input or station: entry skipped, console line, never a message box. Partial entries merge field by field onto the lower layer; an id with no lower layer needs station and inputs (a new recipe).
Example (5 entries):
{"stations": {"hand": {"max_tier": 1}},
"recipes": [
{"id": "ItemLonaCraftFurnitureCarpentryBench", "station": ["hand", "carpentry"], "skill": 1, "inputs": {"ItemLonaCraftPlank": 6, "ItemLonaCraftRope": 2}},
{"id": "ItemArrowsShortX10", "requires": ["RolePlayS"], "category": "ammo", "station": ["hand", "carpentry"], "skill": 0, "inputs": {"ItemLonaCraftPlank": 1, "ItemLonaCraftBone": 1}},
{"id": "process:RopeFibre", "station": ["hand", "tailor"]},
{"id": "ItemMhShortSword", "skill": 6}
]}
Shipped state: the user file ships with only stations and comments (defaults stay in Recipes/*.json, "we keep the defaults for now"); the three arrow recipes ship as Recipes/Arrows_Light.json, Arrows_Medium.json, Arrows_Fire.json with requires. Config/Recipes_defaults.json is written only when its content changed.
7. Work breakdown (PROPOSED)
| Item | What | Files |
|---|---|---|
| B1 Hand station, pot back to vanilla | :hand + alias + MAX_TIER cap; pot redirect and old pot/process menus removed; scene defaults; x1 display fix; return-to-menu argument |
LC/Scripts/55_Recipes.rb, 80_CraftScene.rb, 20_Station.rb, 30_Process.rb, 90_Furniture.rb:1074; delete LC/HCGframes/Command_PotStation.rb; LC/Recipes/Furniture_CarpentryBench.json; Text/<6 langs>/Station.txt, Craft.txt |
| B2 Main menu page | Menu_LonaCraft + init_contents alias, blocks (threat, overmap, actor), mouse click |
new LC/Scripts/85_MenuCraft.rb; LC/loader.rb; Text/<6 langs>/Craft.txt (Menu/*) |
| B3 Arrows | 3 recipe files, ammo category + group + 1 exp, requires |
LC/Recipes/Arrows_*.json; 55_Recipes.rb:135; 80_CraftScene.rb:72-79, 128-133; 60_Skill.rb:131; Text/<6 langs>/Craft.txt (Group/Ammo) |
| B4 Recipe config | Config/Recipes.json reader (field merge, requires, validation, \r strip), defaults writer, debug reload key |
55_Recipes.rb (build/load_overrides), new LC/Config/Recipes.json, 95_Debug.rb |
| B5 Docs | README (pot, stations, bootstrap, recipes, config), BOARD, RPS_INTEGRATION note | LC/README.md, docs/BOARD.md, docs/RPS_INTEGRATION.md |
Gate after B2: screenshots of the menu with and without RolePlayS (row 10 vs gauge), the hand screen, a blocked line in combat. Order: B1 -> B2 -> B3 -> B4 -> B5 (B3 and B4 both touch 55_Recipes.rb; one at a time).
Open for the owner (not decided here): the skill block vs README (80_CraftScene.rb:795-799 vs README:187).