392 lines
32 KiB
Markdown
392 lines
32 KiB
Markdown
# SPEC R5: stone nodes (boulders) and the axe for wood
|
|||
|
|
|
||
|
|
Status: BUILT 2026-10-06, pending the owner's run. The owner's build decisions (below) override the draft's **Rec.** where they
|
||
|
|
differ; the rows marked **Decided** are what the code does.
|
||
|
|
Paths: `G/` = game root `LonaRPG/`, `RPS/` = `ModScripts/_Mods/RolePlayS/`, `LC/` = `ModScripts/_Mods/LonaCraft/`.
|
||
|
|
Map ids: `G/Data/MapNNN.rvdata2`. EV = event id in that map.
|
||
|
|
|
||
|
|
Owner decisions this spec builds on (2026-10-06): (1) Rough Stone comes from its own boulder nodes on some
|
||
|
|
wilderness maps, easy early-game, mined with a pickaxe like the game's ore nodes; (2) in this mod, wood from
|
||
|
|
trees requires an axe.
|
||
|
|
|
||
|
|
Build decisions (owner, 2026-10-06): boulders as 2.1-2.3 (option A, 9 hits, 4 Rough Stone, 15% Iron Ore, deleted
|
||
|
|
when spent, `$_boulder` placeholder, `LonaCraft_Boulder.png` when present); **pickaxe REQUIRED** (over the draft's
|
||
|
|
recommendation); Hatchet both bought and crafted; the tree rule through `$mod_load_script` wrappers (section 4).
|
||
|
|
|
||
|
|
**Change 2026-10-07 (owner):** "The hatchet is not a weapon, instead, it's an item. The pickaxe is a weapon. You require
|
||
|
|
the pickaxe equipped in your hand to mine. But for the hatchet, all you need is the item in your inventory. Change that so
|
||
|
|
the hatchet is actually an equippable item/weapon. Just use whatever default axe sprite for it being held in your hand, but
|
||
|
|
it should be weaker than any axes in the game. It should require the hatchet in your hand to farm trees." Built:
|
||
|
|
|
||
|
|
| Point | Now | Where |
|
||
|
|
|---|---|---|
|
||
|
|
| Hatchet | an `RPG::Weapon` in `$data_weapons` (was an `RPG::Item`): wtype `NormalEQ`, etype `MH`, skill `WoodenClubNormal` (seals `BasicNormal`), price 150, weight 5, pot Wood 1, mod icon cell 12 | `Item/Hatchet.json` (game weapon format), `Scripts/0_Core.rb` WEAPONS / load_weapons |
|
||
|
|
| Stats | atk_plus +1, weak -4, sexy -5 (max); RPG params [0, 0, 10, 0, 0, -5, 0, -15]. Wooden Club +1 / -5 / -15, params 0; pickaxe +3 / -8 / -15 (RolePlayS +1.3), params ATK 20; RolePlayS Lumberjack Axe +1.1 / -10 / -20 | same |
|
||
|
|
| Held picture | `MainArm` = `MhWoodenClub`: the base game has no axe part in `G/Data/CHSConfig/CHSconfigs_Actors/Lona/Layer/200_MH.json` (the axe parts are RolePlayS's, not used) | `Item/Hatchet.json` lonaStat_json_hash |
|
||
|
|
| Tiers | the Hatchet gets no quality tiers (always the plain weak tool) | `Scripts/50_Tiers.rb` craftable_base_item? |
|
||
|
|
| Tool rule | trees need an `AXES` entry and boulders a pickaxe **in the main hand** (`TOOLS_IN_HAND = true`; `false` = the 2026-10-06 "carried or equipped" rule). A quality-tier copy (`_LC2`-`_LC5`) of a listed tool counts. Popups: "Need an axe in hand to cut wood." / "Need a pickaxe in hand to break this." | `Scripts/45_Nodes.rb` tool_ok? / held_tool |
|
||
|
|
| STA | boulder: always 1 per swing now (9 per boulder; the "2 when carried" branch is only reached with `TOOLS_IN_HAND = false`); RolePlayS gets the item in hand as its tool name. Tree: unchanged, the game's 5 per swing (RolePlayS: 1 with its Lumberjack Axe in hand, else 5) | `45_Nodes.rb` lonacraft_mine_boulder |
|
||
|
|
| Saves | save data version 3 lists the mod's weapons as "W". A version 2 save's Hatchet (kind "I") moves from the party's items to its weapons (console line); a Hatchet item in a storage box becomes the weapon (by name, any version). A version 1 save: a Hatchet in the bag is left as it is | `Scripts/70_Save.rb` |
|
||
|
|
|
||
|
|
The rows below that say "carried or equipped" (2.2, 3.3) describe the 2026-10-06 build; this note overrides them.
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## 1. Ore nodes today
|
||
|
|
|
||
|
|
### 1.1 Mechanics
|
||
|
|
|
||
|
|
| Node (EventLib name) | Defined | HP | Hits per drop | Drops per node | STA per swing, vanilla | STA per swing, RPS | Script |
|
||
|
|
|---|---|---|---|---|---|---|---|
|
||
|
|
| StaticSaltpeter | Map001 EV807 (`@summon_data = {:HP => 6}`) | 6 | 3 | 2 Saltpeter | 1 with pickaxe equipped, 2 without | 1 / 2 (+STR/CON exp) | `G/Data/HCGframes/event/Mining_Saltpeter.rb` |
|
||
|
|
| StaticPhosphorus | Map001 EV808 (HP 6) | 6 | 3 | 2 Phosphorus | 1 / 2 | 1 / 2 | `Mining_Phosphorus.rb` (identical but line 16) |
|
||
|
|
| StaticCrystalOre (RPS only) | `RPS/MapObject.rvdata2` EV98 (HP 9) | 9 | 3 | 3 Crystal Ore | - | 1 / 2 | `RPS/HCGframes/event/Mining_Mineral.rb` |
|
||
|
|
| Prison wall (ItemMineral) | Map050 EV011-EV033, inline, no script file | - | - | per quest | - | - | `reserve_summon_event("ItemMineral",x,y,player id)` |
|
||
|
|
|
||
|
|
Evidence, `Mining_Saltpeter.rb`:
|
||
|
|
|
||
|
|
| Line | What |
|
||
|
|
|---|---|
|
||
|
|
| 1-3 | STA <= 0: buzzer + "sta_too_low", nothing else |
|
||
|
|
| 5 | swing animation `animation_atk_mh` |
|
||
|
|
| 7 | `equips_0_id = $game_player.actor.equips[0].id` (main hand) |
|
||
|
|
| 11-12 | `sta -= 1`; `sta -= 1 if equips_0_id != 11` (comment: no pickaxe equipped) |
|
||
|
|
| 13 | `summon_data[:HP] -= 1` |
|
||
|
|
| 15-16 | every 3rd hit (`HP % 3 == 0`): `EvLib.sum("ItemSaltpeter", player x, y)` (drop on Lona's tile) |
|
||
|
|
| 17 | `get_character(0).delete if HP <= 0` |
|
||
|
|
|
||
|
|
RPS replaces lines 6-12 with `calc_harvest_sta_cost(1, "ItemMhPickAxe")` (`RPS/HCGframes/event/Mining_Saltpeter.rb:14`,
|
||
|
|
`Mining_Phosphorus.rb:14`, `Mining_Mineral.rb:7`). That helper (`RPS/Scripts/0_CORE.rb:1418-1440`): tool looked up by
|
||
|
|
name (`$data_ItemName[tool].id`, :1419), counts only when **equipped in main hand** (`actor.equips[0]`, :1422);
|
||
|
|
cost 1 with tool, `1 + base_cost` without (:1425); adds STR/CON exp (WIS/SUR for the sickle), half without the tool (:1430-1436).
|
||
|
|
|
||
|
|
LonaCraft on top (`LC/Scripts/40_Mining.rb`): every ore yielded while a `*/Mining_*` script runs rolls 60% Rough Stone
|
||
|
|
and 35% Iron Ore (:23-26, :56-66 depth counter, :68-87 `reserve_summon_event` alias); the prison wall is recognised by
|
||
|
|
its player-id argument (:41).
|
||
|
|
|
||
|
|
### 1.2 What "pickaxe" means
|
||
|
|
|
||
|
|
| Question | Answer | Evidence |
|
||
|
|
|---|---|---|
|
||
|
|
| Item | `ItemMhPickAxe`, price 200, main-hand weapon, icon 406 | `G/Data/Effects/Weapons/MhPickAxe.json`; RPS overrides stats only (`RPS/Weapon/MhPickAxe.json`) |
|
||
|
|
| Equipped or carried | equipped (main hand) only; carried does nothing | `Mining_Saltpeter.rb:7,12`; `RPS/Scripts/0_CORE.rb:1422` |
|
||
|
|
| Required? | never; it only halves STA (1 vs 2 per swing) | `Mining_Saltpeter.rb:11-12` |
|
||
|
|
| Vanilla id check | hard-coded id 11 | `Mining_Saltpeter.rb:12` |
|
||
|
|
| Where sold | Noer blacksmith (amount 1), common weapon traders | `G/Data/Barters/NoerBlackSmithShopTrader.json:25`, `CommonWeaponTrader.json:25` |
|
||
|
|
|
||
|
|
### 1.3 States and refill
|
||
|
|
|
||
|
|
| Question | Answer | Evidence |
|
||
|
|
|---|---|---|
|
||
|
|
| Used / empty frame | **none**. The node is deleted when HP reaches 0. `@pattern = rand(3)` is a random look, not a used state. | `Mining_Saltpeter.rb:17`; Map001 EV807 init |
|
||
|
|
| Nap | not re-initialised (`@nap_initialize=3`) | Map001 EV807; meaning in `G/Data/Scripts/Frames/39_Game_Event.rb:54-59` |
|
||
|
|
| Refill | **every visit**. Each entry from the overmap sets `ReRollHalfEvents = 1` (`34_Functions_ChangeMap.rb:138`), the map's BIOS event re-rolls its resources (nodes, plants, fruit trees) on random tiles of an in-map region (`$game_map.region_map[N]`, built in `31_Game_Map.rb:270-280`), then `enter_static_region_map` sets it back to 0 (`34_Functions_ChangeMap.rb:104-114`). No daily timer. | r7 BIOS (Map037 EV1): 4 x `EvLib.sum("StaticPhosphorus", region 39 tile)`, 1st always, others `if asd >= rand(25/50/75)`, `asd = 1 + WIS + 2*SUR` |
|
||
|
|
| Where nodes spawn | Saltpeter: Orkind caves Map018/023/024/046, Fishkind caves Map072/095, prison Map050 (BIOS, 2-4 per visit). Phosphorus: r7 mountain Map037/184 (region 39), Map050. Crystal: RPS MinerPrison map. | BIOS events of those maps |
|
||
|
|
|
||
|
|
ASSET_PROMPTS.md (line 15) says the game's ore nodes have an unlit/used frame: they do not (see above). Fix in B5.
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## 2. Stone nodes (boulders)
|
||
|
|
|
||
|
|
### 2.1 Event model
|
||
|
|
|
||
|
|
| Option | What | For | Against |
|
||
|
|
|---|---|---|---|
|
||
|
|
| **A (Rec.)** | EventLib event `LonaCraftBoulder`, cloned at boot from `StaticSaltpeter` (as `register_drop_events` clones `ItemRawMeat`, `0_Core.rb:195-223`), graphic and script swapped; summoned with `EvLib.sum` when a region map is entered | the game's own node lifecycle (overlap guard, nap rule, delete at HP 0, gone when the map is left); 1 table + 1 hook | none found |
|
||
|
|
| B | runtime `RPG::Event` from `Furniture.build_event` (`90_Furniture.rb:542-602`) injected in `setup_event_hack` (`:886-896`), like TOWN_STATIONS | reuses furniture code | `setup_event_hack` runs before the BIOS and before `ReRollHalfEvents` is known to be a fresh visit; own lifecycle and HP state to write; TOWN_STATIONS are fixed tiles, the r-maps are not |
|
||
|
|
|
||
|
|
Boulder event (option A), page 0 of Map001 EV807 with these changes:
|
||
|
|
|
||
|
|
| Field | StaticSaltpeter | LonaCraftBoulder |
|
||
|
|
|---|---|---|
|
||
|
|
| graphic | `grimdark32_02` idx 6 (white specks, ground decal) | `LonaCraft_Boulder` (owner PNG, one cell, `@manual_cw = @manual_ch = 1` as `90_Furniture.rb:580`) if present, else placeholder `$_boulder` idx 0 dir 2 pattern 0 |
|
||
|
|
| priority / through | 1 / false (blocks) | same |
|
||
|
|
| `@forced_z = -10`, `@blend_type = 1`, `@opacity = 200+rand(50)`, `@pattern = rand(3)` | glitter decal | drop all four (an upright opaque rock) |
|
||
|
|
| `@forced_y = 4 - rand(8)`, `@mirror` | jitter | keep |
|
||
|
|
| `@summon_data` | `{:HP => 6}` | `{:HP => 9}` |
|
||
|
|
| overlap guard, `@nap_initialize=3` | yes | keep |
|
||
|
|
| script | `load_script("Data/HCGframes/event/Mining_Saltpeter.rb")` | `load_script("<LC path>/HCGframes/Mining_Boulder.rb")` (one line: `lonacraft_mine_boulder`); the name keeps `/Mining_` so 40_Mining's depth counter stays consistent; Rough Stone is not in `MINING_ORES` (`40_Mining.rb:21`), so no double by-product roll |
|
||
|
|
|
||
|
|
Placeholder `$_boulder.png` (`G/Graphics/Characters/`, 96 x 128, 3 x 4 cells of 32 x 32, a rolling-boulder sheet used on
|
||
|
|
Map003 NpcLab and Map061 ScoutCampOrkind). Render: scratchpad `r5/boulder_sheet.png`, with the ore decals for comparison in
|
||
|
|
`r5/r5_placeholder_rocks.png`. The other rock sheets do not fit (`!$_DedOneRock0` is a sign, `!$_WinterRock0` an ice pillar).
|
||
|
|
|
||
|
|
### 2.2 Mining a boulder
|
||
|
|
|
||
|
|
| Item | Value (**Decided**) | Option | Why |
|
||
|
|
|---|---|---|---|
|
||
|
|
| Hits | 9 (HP 9), a yield every 3 hits | HP 6 like the ore | 3 yields |
|
||
|
|
| Per yield | 1 Rough Stone, 100% | - | main drop |
|
||
|
|
| Last yield (HP 0) | +1 Rough Stone | - | 4 Rough Stone per boulder |
|
||
|
|
| Iron Ore | **15% per yield** (about 0.45 per boulder) | 35% as `MINING_BYPRODUCTS` | boulders are on many open maps and come back every visit; 35% x 3 gives about 1 Iron Ore per boulder, which floods the Furnace chain that ore nodes gate today |
|
||
|
|
| Saltpeter / Phosphorus | none | - | owner |
|
||
|
|
| Pickaxe required? | **Yes** (owner): `ItemMhPickAxe` (the game's weapon id 11; RolePlayS updates the same item, `RPS/Scripts/0_CORE.rb:321-328`) carried or equipped (`has_item?(item, true)`, `29_Game_Party.rb:303`). Without it the swing does nothing but show `LonaCraft:Nodes:Boulder/need_pickaxe` (buzzer, no STA, no hit) | not required, halves STA (draft) | owner's call |
|
||
|
|
| STA per swing | the game's ore-node rule kept: **1 with the pickaxe equipped in main hand, 2 when only carried** (`Mining_Saltpeter.rb:11-12`); under RPS its `calc_harvest_sta_cost(1, "ItemMhPickAxe")` (same 1/2 plus attribute exp) | - | game rule |
|
||
|
|
| STA per boulder | 9 equipped / 18 carried | - | - |
|
||
|
|
| STA <= 0 | game's "sta_too_low" popup, nothing else | - | `Mining_Saltpeter.rb:1-3` |
|
||
|
|
| Drop tile | Lona's tile (`EvLib.sum(..., player x, y)`) | - | as the ore |
|
||
|
|
| Depleted | deleted (game rule, `Mining_Saltpeter.rb:17`); no rubble, no used sprite (the BoulderBroken prompt was dropped) | rubble event like a tree stump | nodes have no used state |
|
||
|
|
| Refill | every visit (2.3) | daily timer | the game's own rule, no save data |
|
||
|
|
|
||
|
|
Furnace (6 Stone Block + 8 Rough Stone = 20 Rough Stone, README Stations) = 5 boulders = 45-90 STA.
|
||
|
|
|
||
|
|
### 2.3 Where
|
||
|
|
|
||
|
|
How a field map is reached: overmap tile region id -> `change_map_enter_region` picks
|
||
|
|
`$data_region_maps[region].sample` (`34_Functions_ChangeMap.rb:257-269`, :263). The list is built from each map's note
|
||
|
|
`region=N` (`5_DataManager.rb:351-369`); RPS appends `r1_PlainField4`, `r4_RainFroest4`, `r11_RoadPlain4`
|
||
|
|
(`RPS/Scripts/0_CORE.rb:147-156`). So **the same overmap tile does not always give the same map**, and every map is
|
||
|
|
reloaded fresh on entry. "Known spots" per world tile cannot exist without changing map selection.
|
||
|
|
|
||
|
|
Campsites does not touch r-maps: it keeps camps in `$game_system` (`Campsites/Scripts/10_Campsites.rb:272-284`), shows an
|
||
|
|
overmap icon (:165-174) and sends the player to its own camp map through `$data_tag_maps` (:247-252, :221-225).
|
||
|
|
|
||
|
|
Placement rule:
|
||
|
|
|
||
|
|
| Option | What | Verdict |
|
||
|
|
|---|---|---|
|
||
|
|
| Fixed hand-picked tiles (TOWN_STATIONS style, `90_Furniture.rb:146-151`) | a table of (map, x, y) | 60 maps by hand; the map a tile opens is random anyway |
|
||
|
|
| Chosen once per overmap tile, persisted (Campsites style) | save data per tile | meaningless: the r-map is re-sampled on every entry |
|
||
|
|
| **Random per visit on the map's own region (Rec.)** | on a fresh entry, sample N tiles from `region_map[R]` of that map, as the BIOS does for phosphorus and plants | follows the game; no save data; one table |
|
||
|
|
|
||
|
|
Tile filter (Rec.): region R tile, the tile and its 4 neighbours passable, no map event within 1 tile, not within 6 tiles
|
||
|
|
of `-point-StartPoint`. For r7 only: region 39 (rock faces where the game puts phosphorus), the tile itself impassable and
|
||
|
|
at least 1 of its 4 neighbours passable (mined from the path). Counted with the scratchpad tool `r5/cand.py` / `r5/wall39.py`
|
||
|
|
(layer passability only).
|
||
|
|
|
||
|
|
Hook (Rec.): `Game_Interpreter#enter_static_region_map` (module `GIM_ADDON`, `34_Functions_ChangeMap.rb:5,104`, included
|
||
|
|
in `Game_Interpreter`, `40_Game_Interpreter.rb:19`): every r-map BIOS calls it exactly once on entry (checked on 28 maps: all 20 boulder maps plus
|
||
|
|
8 controls Map019/027/029/034/080/093/163 and RPS r4_RainFroest4; scratchpad `r5/esr.py`), with `ReRollHalfEvents` still 1. Override
|
||
|
|
with `super`: spawn first if `ReRollHalfEvents == 1`, then `super` (which resets it at :114). No other mod overrides it (grep
|
||
|
|
of all `_Mods/*/Scripts`).
|
||
|
|
|
||
|
|
Every r-map family (`region=` note; rock-like events = what its BIOS or map events already place):
|
||
|
|
|
||
|
|
| Family | Map ids | Rock-like content today | Boulders max (Rec.) | Region R | Free tiles (min over maps) |
|
||
|
|
|---|---|---|---|---|---|
|
||
|
|
| r1 PlainField | 28, 26, 16, RPS r1_PlainField4 | 3 StaticRockInsect0 on region 11 | **2** (early game, Noer area) | 11 | 138 |
|
||
|
|
| r2_r27 Beach | 27, 147, 149 | 2 StaticRockCrab (region 10) | 0 | - | - |
|
||
|
|
| r3 BadlandMountain | 39 | 3 StaticRockInsect1-3 (region 9) | **4** | 9 | 32 |
|
||
|
|
| r4 RainForest | 29, 80, 93, RPS r4_RainFroest4 | none | 0 | - | - |
|
||
|
|
| r5 PineForest | 30, 13, 124 | 3 StaticRockInsect0 (region 9) | **2** | 9 | 45 |
|
||
|
|
| r6 BadlandForest | 21, 127 | none (18 Humpshroom) | **3** | 9 | 8 |
|
||
|
|
| r7 PineForestMountain | 37, 184 | 4 StaticPhosphorus (region 39) | **4** | 39 (face rule) | 88 |
|
||
|
|
| r8_25 Swamp | 19, 163 | none | 0 | - | - |
|
||
|
|
| r9 AbandonedHouse | 45, 47 | none | 0 | - | - |
|
||
|
|
| r10 Slum | 17, 170 | none | 0 | - | - |
|
||
|
|
| r11 RoadPlain | 34, 32, 33, RPS r11_RoadPlain4 | none | 0 | - | - |
|
||
|
|
| r12 RoadNoerNob | 83 | none | 0 | - | - |
|
||
|
|
| r13_24 SwampRoad | 101, 102 | none | 0 | - | - |
|
||
|
|
| r14 AbomDesert | 107, 112 | 3 StaticRockInsect1-3 (region 9) | **2** | 9 | 286 |
|
||
|
|
| r15_26 Marsh | 108, 125 | none | 0 | - | - |
|
||
|
|
| r16 PlainBadland | 131, 134 | 3 StaticRockInsect1-3 (region 9) | **3** | 9 | 83 |
|
||
|
|
| r17 RoadSyb | 145, 146 | 3 StaticRockInsect1-3 (region 12) | 0 | - | - |
|
||
|
|
| r18 TownSyb | 150 | 3 StaticRockInsect1-3 | 0 | - | - |
|
||
|
|
| r19 OrkDesert | 111, 159 | 3 StaticRockInsect1-3 (region 9) | **2** | 9 | 268 |
|
||
|
|
| r20 RefugeeCamp | 35, 73 | none | 0 | - | - |
|
||
|
|
| r21 NoerTown | 5, 4, 7 | none | 0 | - | - |
|
||
|
|
| r22 RoadNoer | 48, 56, 57 | none | 0 | - | - |
|
||
|
|
| r23 Boulevard | 51, 54, 55 | none | 0 | - | - |
|
||
|
|
| r28 OrkBadland | 160, 161 | 3 StaticRockInsect1-3 (region 9) | **3** | 9 | 73 |
|
||
|
|
| r29 SYB_KeepAbom | 191 | none | 0 | - | - |
|
||
|
|
| r30 SYB_KeepOrk | 192 | none | 0 | - | - |
|
||
|
|
| r31 SYB_RoadOrk | 200 | none | 0 | - | - |
|
||
|
|
| r32 SYB_AlleyOrk | 201 | none | 0 | - | - |
|
||
|
|
|
||
|
|
Totals: 28 families, 60 maps (57 game + 3 RPS); 9 families with boulders (20 maps). Count per visit (Rec., the game's
|
||
|
|
own roll): boulder 1 always, boulder k (k >= 2) `if asd >= rand(25 * (k - 1))`, `asd = 1 + WIS + 2*SUR` (Map037 EV1 phosphorus
|
||
|
|
formula). Table key: map name prefix `r<N>_` (the family), so RPS's extra maps are covered without ids.
|
||
|
|
|
||
|
|
Why not plains/roads beyond r1: roads and towns are paths and buildings; swamps, marsh, beach and rainforest have no rock.
|
||
|
|
r1 is in because the owner wants early-game stone and the plains already "hide" rock insects on region 11.
|
||
|
|
|
||
|
|
Renders (scratchpad, region R shaded yellow, filtered tiles green, 4 sample boulders red, start point blue):
|
||
|
|
|
||
|
|
| File | Map | Reading |
|
||
|
|
|---|---|---|
|
||
|
|
| `r5_r16_PlainBadland1_boulders.png` | Map131, region 9 | open badland, boulders sit off the paths: good |
|
||
|
|
| `r5_r7_PineFroestMountain1_boulders.png` | Map037, region 4 | region 4 is the 1-tile mountain path: a boulder there blocks the route. This is why r7 uses region 39 (rock faces) instead |
|
||
|
|
|
||
|
|
Caves (Orkind/Fishkind): **no boulders (Rec.)**. They already spawn 2-4 ore nodes per visit (Map018/023/024/046/072/095
|
||
|
|
BIOS) and each ore already rolls 60% Rough Stone (`40_Mining.rb:23-26`); caves are mid-game and dangerous, the opposite
|
||
|
|
of "easy early stone".
|
||
|
|
|
||
|
|
### 2.4 Loose stones (owner addition 2026-10-06, **Decided**, built)
|
||
|
|
|
||
|
|
"Loose stones that we can pick up, separate from the rock nodes."
|
||
|
|
|
||
|
|
| Item | Value | Evidence |
|
||
|
|
|---|---|---|
|
||
|
|
| Event | `LonaCraftLooseStone`, a static node cloned from the game's `StaticSaltpeter` (Map001 EV807) like the boulder, **not** a ground drop: owner, 2026-10-06, "as a dropped item, they despawn after a while". Same init (overlap guard, `@nap_initialize=3`), stays for the whole visit, rebuilt fresh each visit, no save data | `45_Nodes.rb` clone_node |
|
||
|
|
| Trigger / priority / through | action key while facing it (priority 1, "same as characters", as the boulder), but **through** so a stone never blocks a narrow path (r7's path); the action key still starts it | `45_Nodes.rb` clone_node `through = true` |
|
||
|
|
| Action | `HCGframes/Mining_LooseStone.rb` -> `lonacraft_pick_loose_stone`: `common_pickup_item("ItemLonaCraftRoughStone", true)` (the game's pickup: pick-up pose, `optain_item` sound and "+1" icon popup, the same feedback as picking up a dropped material), then the event is deleted. No tool, no stamina, no hit count | `29_Functions_417_Interpreter.rb:861-867, 410-418` |
|
||
|
|
| Picture | the game's own small-rock drop: `item_icon01` index 5, dir 2, pattern 1 (the `ItemRock` drop, Map001 EV93); or `LC/Graphics/Characters/LonaCraft_LooseStone.png` (one 32 x 32 cell, `@manual_cw/ch = 1`) when present. Render: scratchpad `r5/r5_loose_stone_placeholder.png`, whole sheet `r5/item_icon01_dir2.png` | `G/Graphics/Characters/item_icon01.png` (288 x 192, 24 x 24 cells) |
|
||
|
|
| Gives | 1 Rough Stone, one pick, no tool, no STA | - |
|
||
|
|
| Count | 1-3 per fresh visit (`LOOSE_MIN + rand(3)`), after the boulders (their pending summons count as taken) | `45_Nodes.rb` spawn_loose_stones |
|
||
|
|
| Tile rule | the boulders' `:open` rule (tile + 4 neighbours passable, nothing within 1 tile) but only **not within 2 tiles** of the start point (`LOOSE_START_CLEAR = 3`) | - |
|
||
|
|
| Maps (`LOOSE_MAPS`) | the 9 boulder families on their boulder region, except r7 on its walkable path (region 4; boulders use the rock faces, 39); **plus r11 RoadPlain** on region 11 (all 4 maps have it, 45-201 tiles; their BIOS places nothing there) | dry run below |
|
||
|
|
|
||
|
|
Dry run (layer passability; candidate tiles with the looser filter):
|
||
|
|
|
||
|
|
| Maps | Region | Candidates (min-max) |
|
||
|
|
|---|---|---|
|
||
|
|
| r11 RoadPlain 34 / 32 / 33 / RPS r11_RoadPlain4 | 11 | 39 / 189 / 177 / 113 |
|
||
|
|
| r1 PlainField x4 | 11 | 231-286 |
|
||
|
|
| r3 BadlandMountain 39 | 9 | 32 |
|
||
|
|
| r5 PineForest x3 | 9 | 45-87 |
|
||
|
|
| r6 BadlandForest 21 / 127 | 9 | 53 / 8 |
|
||
|
|
| r7 PineForestMountain 37 / 184 | 4 | 65 / 53 |
|
||
|
|
| r14, r19 x2 each | 9 | 336-390 |
|
||
|
|
| r16 131 / 134 | 9 | 206 / 100 |
|
||
|
|
| r28 160 / 161 | 9 | 133 / 84 |
|
||
|
|
|
||
|
|
All 24 maps call `enter_static_region_map` once; every map has at least 3 candidates (fewest: r6_BadlandForest2, 8).
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## 3. Trees and the axe
|
||
|
|
|
||
|
|
### 3.1 Trees today
|
||
|
|
|
||
|
|
All tree scripts: `G/Data/HCGframes/event/CommonTree*.rb` (6). Common to all: in combat -> "incombat" popup, STA <= 0 ->
|
||
|
|
"sta_too_low"; per swing: animation, chop sound, `switch2_id -= 1`; a yield every 3 swings (`switch2_id`, reset to 3);
|
||
|
|
`switch1_id` yields per tree (`rand(3)+1` default, line 9; the map's "high tree" events set `@switch1_id = 3` on a fresh
|
||
|
|
visit, Map037 EV3 init); at 0 the tree falls and leaves a stump (`ChopedTreeBig/Small`). No cooldown: trees are re-rolled
|
||
|
|
on every visit like nodes (high tree init moves to a random region-10 tile when `ReRollHalfEvents == 1`).
|
||
|
|
|
||
|
|
| Script | Placed by | Yield | STA vanilla | Tool, vanilla | STA under RPS | RPS tool |
|
||
|
|
|---|---|---|---|---|---|---|
|
||
|
|
| CommonTree.rb | r-map "high tree" events (most r-maps) | Wooden Club (:19) | 5 per swing (:12), 45 per tree | none | 1 equipped / 5 (`calc_harvest_sta_cost(4,"ItemMhLumbAx")`, `RPS/.../CommonTree.rb:24`) | Lumberjack Axe |
|
||
|
|
| CommonTreeNoble.rb | r12 RoadNoerNob (4 trees) | Wooden Club (:21) + MoralityDown30 (:19) | 5 per swing (:12) | none | same as vanilla (RPS copy unchanged) | - |
|
||
|
|
| CommonTreeApple.rb | StaticAppleTree (Map001 EV223), r7 | Apple (:23) | 1 sickle / 3 per yield (:16-20) | Sickle id 10, equipped | 1 / 4 (`calc_harvest_sta_cost(3,"ItemMhSickle")`) | Sickle |
|
||
|
|
| CommonTreeArecaNut.rb | StaticArecaNut, r2 | 2 Areca Nut (:23-24) | 1 / 3 per yield | Sickle | 1 / 4 | Sickle |
|
||
|
|
| CommonTreeBanana.rb | StaticBananaTree, r4 | Banana (:24) | 1 / 3 per yield | Sickle | 1 / 4 | Sickle |
|
||
|
|
| CommonTreeNuts.rb | StaticNutsTree, r5 | Nuts (:23) | 1 / 3 per swing (:14-18) | Sickle | 1 / 4 | Sickle |
|
||
|
|
|
||
|
|
Wooden Club is also bought: 20 barters list it (e.g. `NoerBlackSmithShopTrader.json:9`, `CommonWeaponTrader.json:9`), price
|
||
|
|
100 (`G/Data/Effects/Weapons/MhWoodenClub.json:4`); RPS start kits include one (`RPS/Scripts/0_CORE.rb:299-312`). Clubs are
|
||
|
|
also fuel: placing the player's dark pot takes 1 (`480_EventCharacterBatch.rb:1384,1399`), Glass and Smelt take 1
|
||
|
|
(`LC/Scripts/30_Process.rb:30-31`).
|
||
|
|
|
||
|
|
### 3.2 Axe-like items
|
||
|
|
|
||
|
|
| Item | Source | Kind | Price | Sold | Notes |
|
||
|
|
|---|---|---|---|---|---|
|
||
|
|
| (none) | game | - | - | - | vanilla `Effects/Weapons` has no axe; PickAxe and Sickle only |
|
||
|
|
| ItemMhLumbAx "Lumberjack Axe" | RPS `Weapon/MhLumbAx.json` | main-hand weapon, STR 2 | 500 | CommonWeaponTrader x1.2, FishKindWeaponry (`0_CORE.rb:561,574`); chest loot (:1293) | RPS's tree tool (STA 1/swing equipped) |
|
||
|
|
| ItemMhPoleaxe | RPS `Weapon/MhPoleaxe.json` | main-hand war axe | 12000 | Noer blacksmith x2 (`0_CORE.rb:534`); chest loot (:1290) | an axe, not a tool |
|
||
|
|
|
||
|
|
No hatchet exists anywhere. Axe items found: 2 (both RPS).
|
||
|
|
|
||
|
|
### 3.3 The Hatchet (**Decided**)
|
||
|
|
|
||
|
|
| Field | Value | Option |
|
||
|
|
|---|---|---|
|
||
|
|
| Name / id | Hatchet, `ItemLonaCraftHatchet`, `LC/Item/Hatchet.json` | - |
|
||
|
|
| Kind | tool item, `"type": "Other"` (not equippable) | main-hand weapon: needs Lona arm sprites (`CHSConfig` MainArm layer, as RPS does for LumbAx) |
|
||
|
|
| Price / weight | 150 / 5 | - |
|
||
|
|
| Registration | 13th row of `LonaCraft::ITEMS` (`0_Core.rb:36-50`), icon cell 12 (free: cells 12-15, 70-79 of `Iconset_LonaCraft.png`) | separate TOOLS list (needs a 70_Save edit) |
|
||
|
|
| Save | covered: `ITEM_NAMES` is already remapped (`70_Save.rb:52-55`) | - |
|
||
|
|
| Icon placeholder | a drawn 24 x 24 hatchet in cell 12 (cell 12 was empty; the game has no axe icon, 3.2) until the owner icon exists | - |
|
||
|
|
| Icon prompt (for ASSET_PROMPTS, 24 x 24 icon) | "A small hatchet icon: short pale wooden handle angled up-left, a grey iron wedge head with a bright edge facing right, a strip of leather wrapped at the grip." | - |
|
||
|
|
|
||
|
|
Rule (**Decided**): with LonaCraft on (`LonaCraft::Nodes::AXE_REQUIRED = true`), `CommonTree.rb` and `CommonTreeNoble.rb` need an axe
|
||
|
|
**carried or equipped** (`$game_party.has_item?(item, true)`, `29_Game_Party.rb:303`). Accepted, when registered:
|
||
|
|
`ItemLonaCraftHatchet`, `ItemMhLumbAx`, `ItemMhPoleaxe`. Without one: buzzer + popup `LonaCraft:Nodes:Tree/need_axe` ("Need an
|
||
|
|
axe to cut wood."), no swing, no STA, the tree's counters untouched. STA stays the scripts' own (vanilla 5/swing; RPS 1
|
||
|
|
with the Lumberjack Axe equipped): the Hatchet unlocks, the Lumberjack Axe speeds up.
|
||
|
|
|
||
|
|
Fruit trees (Apple, ArecaNut, Banana, Nuts): **unchanged, fruit by hand (Rec.)**; they give no wood.
|
||
|
|
|
||
|
|
### 3.4 Bootstrap (**Decided**: pickaxe required)
|
||
|
|
|
||
|
|
| Way | Chain |
|
||
|
|
|---|---|
|
||
|
|
| Buy | Hatchet in `NoerBlackSmithShopTrader` and `CommonWeaponTrader`, amount 1, `itemPrice*(shopNerf+1)` (`0_Core.rb` BARTER_ADDS) |
|
||
|
|
| Craft | `LC/Recipes/Hatchet.json`: 1 Wooden Club + 2 Rough Stone + 1 Rope, `station ["hand", "carpentry"]`, `fixed_tier 1`, skill 0 |
|
||
|
|
|
||
|
|
**Gold-free start (back with the loose stones, 2.4).** Stone without a tool comes from loose stones; the Wooden Club is
|
||
|
|
in Lona's start kit (`G/Data/Effects/_Sys_Actor/Lona.json:14`; RPS kits too, `RPS/Scripts/0_CORE.rb:299-312`), so the
|
||
|
|
hand Hatchet needs no gold. A pickaxe is still needed for boulders (Furnace onwards).
|
||
|
|
|
||
|
|
First pickaxe (price 200, `G/Data/Effects/Weapons/MhPickAxe.json`):
|
||
|
|
|
||
|
|
| Seller | Barter | Price |
|
||
|
|
|---|---|---|
|
||
|
|
| Noer blacksmith | `G/Data/Barters/NoerBlackSmithShopTrader.json:25` | 200 x (shopNerf+1) |
|
||
|
|
| Common weapon traders (Noer market, forts) | `CommonWeaponTrader.json:25` | 200 x (shopNerf+1) |
|
||
|
|
| Fishkind weaponry, North FL dock | `FishKindWeaponry.json:29`, `NorthFL_Dock_WeaponTrader.json:31` | markup |
|
||
|
|
| Arena slave-fight supply | `NoerArenaB1_SlaveFight.json:37` | 200 flat (arena route only) |
|
||
|
|
| Prison mine quartermaster | `HumanPrisonMineQuartermaster.json:17` | captured route only |
|
||
|
|
|
||
|
|
Gold-free path to the Carpentry Bench:
|
||
|
|
|
||
|
|
| Step | Get | How | Needs | Evidence |
|
||
|
|
|---|---|---|---|---|
|
||
|
|
| 1 | 2 Rough Stone | pick up loose stones on a plains / road / badland visit (1-3 per visit, no tool) | - | 2.4 |
|
||
|
|
| 2 | 12 plants | forage by hand | - | plants on every r-map BIOS |
|
||
|
|
| 3 | 3 Rope | by hand, 4 plants -> 1 | step 2 | README Stations |
|
||
|
|
| 4 | Hatchet | by hand: 1 Wooden Club (start kit) + 2 Rough Stone + 1 Rope | 1, 3 | `LC/Recipes/Hatchet.json` |
|
||
|
|
| 5 | 3 Wooden Clubs | chop 1 high tree (9 swings, 45 STA vanilla) | Hatchet carried | `CommonTree.rb:12,19`; Map037 EV3 `@switch1_id = 3` |
|
||
|
|
| 6 | 6 Planks | by hand, 1 club -> 2 | step 5 | `30_Process.rb:24` |
|
||
|
|
| 7 | Carpentry Bench | by hand: 6 Plank + 2 Rope | 3, 6 | `LC/Recipes/Furniture_CarpentryBench.json` |
|
||
|
|
|
||
|
|
With gold the Hatchet can simply be bought (150 x markup, step 4); the bench needs no stone.
|
||
|
|
|
||
|
|
Stone path (Furnace onwards): loose stones (1-3 per visit), or buy a pickaxe (200 x markup) -> boulders on r1/r3/r5/r6/r7/r14/r16/r19/r28 (2.3), 4 Rough
|
||
|
|
Stone each; 20 Rough Stone for the Furnace = 5 boulders. With stone in hand a second Hatchet can be crafted (1 club + 2
|
||
|
|
Rough Stone + 1 Rope).
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## 4. Hook points and RolePlayS collision
|
||
|
|
|
||
|
|
`load_script(path)` (`G/Data/Scripts/102_ScriptImport.rb:61-76`): `path = $mod_load_script.fetch(path, path)` (:63), then
|
||
|
|
`instance_eval` for `Data/HCGframes/` paths, `eval` with binding otherwise (:68-72). `Game_Interpreter#load_script` overrides
|
||
|
|
run before the redirect and see the event's own path.
|
||
|
|
|
||
|
|
RPS redirects every file in its `HCGframes/event/` (34 files) through `$mod_load_script` at script load
|
||
|
|
(`RPS/Scripts/0_CORE.rb:1707-1717`), including all 6 `CommonTree*.rb` and `Mining_Saltpeter.rb`, `Mining_Phosphorus.rb`
|
||
|
|
(plus its own `Mining_Mineral.rb`, called by path from StaticCrystalOre). No other mod touches these scripts or
|
||
|
|
`enter_static_region_map` (grep of `_Mods/*/Scripts`).
|
||
|
|
|
||
|
|
| Way | What | Collision with RPS | Verdict |
|
||
|
|
|---|---|---|---|
|
||
|
|
| **`$mod_load_script` wrappers (Decided, built)** (Homes pattern, `100_Homes.rb:945-972`, `:1393-1403`) | `LC/HCGframes/CommonTree.rb` + `CommonTreeNoble.rb`, each `lonacraft_tree_chop("<game path>")`: check the axe, then run the previous script (RPS copy or vanilla) with the redirect lifted | `45_Nodes.rb` loads after RPS and stores RPS's entry as "previous", so RPS's copy runs unchanged; if RPS were loaded after LonaCraft it would overwrite the redirect and the axe rule would not apply (the load-order warning, `0_Core.rb` LOAD_AFTER, covers this) | built |
|
||
|
|
| `Game_Interpreter#load_script` gate (draft Rec.) | in new `45_Nodes.rb`, `alias_method` on the override 40_Mining defines (`40_Mining.rb:56-66`; a second `def` would replace it): if `File.basename(path) =~ /\ACommonTree(Noble)?\.rb\z/` and no axe -> popup, return; else call the chain | none: runs before the redirect, RPS's copy still runs unchanged | no files, order-proof |
|
||
|
|
|
||
|
|
Scripts wrapped: `CommonTree.rb`, `CommonTreeNoble.rb`. Not touched: the 4 fruit-tree scripts, all
|
||
|
|
`Mining_*.rb` (ore nodes stay as the game and RPS have them; their 60/35 by-products stay). New: `LC/HCGframes/Mining_Boulder.rb`
|
||
|
|
(called by the boulder event, not a redirect). Spawn hook: `Game_Interpreter#enter_static_region_map` override (2.3).
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
## 5. Save impact and build items
|
||
|
|
|
||
|
|
Save: nothing new. Boulders are summoned per visit and vanish with the map; the axe rule is stateless; the Hatchet id is
|
||
|
|
remapped with the other `ITEM_NAMES` (`70_Save.rb:52-55`). Old saves: no change needed.
|
||
|
|
|
||
|
|
Built (2026-10-06):
|
||
|
|
|
||
|
|
| Item | Files | State |
|
||
|
|
|---|---|---|
|
||
|
|
| Hatchet | `Item/Hatchet.json` (new), `Scripts/0_Core.rb` (ITEMS row 13 cell 12, BARTER_ADDS: Noer blacksmith + new CommonWeaponTrader row), `Recipes/Hatchet.json` (new), `Text/<CHT ENG KOR RUS UKR>/Items.txt`, `Graphics/System/Iconset_LonaCraft.png` cell 12 | built |
|
||
|
|
| Axe rule | `Scripts/45_Nodes.rb` (redirects, `lonacraft_tree_chop`), `HCGframes/CommonTree.rb`, `HCGframes/CommonTreeNoble.rb` (new), `Text/*/Nodes.txt` (new) | built |
|
||
|
|
| Loose stones | `Scripts/45_Nodes.rb` (`LonaCraftLooseStone` node cloned from StaticSaltpeter, LOOSE_MAPS, spawn after the boulders), `HCGframes/Mining_LooseStone.rb` (new) | built, game `item_icon01` stone; `LonaCraft_LooseStone.png` override |
|
||
|
|
| Boulders | `Scripts/45_Nodes.rb` (EventLib clone, BOULDER_MAPS, filter, `enter_static_region_map` override, `lonacraft_mine_boulder`, own `load_mod_database` alias), `HCGframes/Mining_Boulder.rb` (new), `loader.rb` (line after 40_Mining.rb) | built, `$_boulder` placeholder |
|
||
|
|
| Owner sprite | `Graphics/Characters/LonaCraft_Boulder.png` picked up when present (`@manual_cw/ch = 1`) | code built, **needs the generated 48 x 48 sprite** |
|
||
|
|
| Docs | `README.md`, `docs/ASSET_PROMPTS.md`, `docs/BOARD.md` | built; debug keys not added (95_Debug.rb belongs to another build) |
|
||
|
|
|
||
|
|
Draft plan (kept for reference):
|
||
|
|
|
||
|
|
| Item | What | Files | Lines (approx.) | Sprite? | Order note |
|
||
|
|
|---|---|---|---|---|---|
|
||
|
|
| B1 Hatchet | item, icon cell 12 (placeholder from icon 406), 2 barter rows, recipe, texts | `Item/Hatchet.json` (new), `Scripts/0_Core.rb` (ITEMS row, BARTER_ADDS rows), `Recipes/Hatchet.json` (new), `Text/*/Items.txt`, `Graphics/System/Iconset_LonaCraft.png` | 45 | icon: placeholder ships | after the recipe-layer merge (it edits `Recipes/`) |
|
||
|
|
| B2 Axe gate | `AXE_REQUIRED`, `AXES`, load_script alias, popup text | `Scripts/45_Nodes.rb` (new), `Text/*/Info.txt` | 50 | no | after B1 |
|
||
|
|
| B3 Boulders | EventLib clone `LonaCraftBoulder`, `BOULDER_MAPS` table (family prefix -> max, region, rule), tile filter, spawn in `enter_static_region_map`, `lonacraft_mine_boulder` (STA, yields, 15% Iron Ore, last-yield bonus, delete) | `Scripts/45_Nodes.rb`, `HCGframes/Mining_Boulder.rb` (new, 1 line), call from `0_Core.rb load_database` | 140 | ships with `$_boulder` placeholder | after B2 |
|
||
|
|
| B4 Owner sprites | `LonaCraft_Boulder.png` picked up when present (`@manual_cw/ch = 1`) (the rubble / BoulderBroken idea was dropped) | `Scripts/45_Nodes.rb`, `Graphics/Characters/` | 30 | **yes: needs the generated sprites** (prompts already in ASSET_PROMPTS.md lines 12-13) | any time after B3 |
|
||
|
|
| B5 Docs and debug | README (materials table: Rough Stone from boulders; Mining; Hatchet; tree rule), ASSET_PROMPTS (remove the "used frame" claim, add the Hatchet icon line), debug key to summon a boulder in front of Lona and give a Hatchet | `README.md`, `docs/ASSET_PROMPTS.md`, `Scripts/95_Debug.rb` | 40 | no | after the recipe layer (it edits `95_Debug.rb`) |
|
||
|
|
|
||
|
|
Total about 305 lines, 4 new files. Gates for the builder: boot log clean; on r16/r3/r7 summon count and tiles; 9 hits ->
|
||
|
|
4 Rough Stone, STA 9/18; tree with/without Hatchet, with RPS Lumberjack Axe equipped; fruit tree by hand; RPS on and off.
|