Files
LonaRPG-Online-Games/ModScripts/_Mods/LonaCraft/docs/RESEARCH_INNS.md
T
2026-10-29 21:59:06 +04:00

21 KiB

Research R16: rentable rooms in every inn

Owner (2026-10-06): the Noer tavern room (rent, furnish, sleep) must work in every inn of the game, at a price that depends on the place. This file: which inns exist, one candidate room per inn with its numbers, the LOCATIONS rows ready to paste, the shared code changes, and the owner's choices. Game files are relative to LonaRPG/; Homes = LonaCraft/Scripts/100_Homes.rb (dev copy). Renders (session scratchpad r16/, not in the mod): <Map>_overview.png and <Map>_room.png for NoerTavern, PirateBaneInn, DoomFortressInn, FishTownInn, SouthFL_INN, NorthFL_INN; in the room renders green = room tiles, red = door tiles, blue box = wall tiles, E<n> = event id. Tile numbers below were worked out with the same flood fill as Homes.flood_room (100_Homes.rb:595-623); the script reproduces the Noer room's 11 tiles.

1. Inns found

An inn = a map whose NapEvent script gives a paid sleep for a room key bought from a keeper. There are exactly six; every key is item price 550 trade points, sold at item price (Barters json, default price = item price, Data/Scripts/Editables/29_Functions_417_Interpreter.rb:69-71).

# Inn (MapInfos name, map) Keeper (event, tile) Keeper script, menu Nap script (NapEvent) Key (item id) Price today
0 Noer tavern NoerTavern (Map059) Boss Mama -point-TavernWaifu EV69 (38,37) NoerTavernWaifu.rb, call_msg("\\optB[...]") (Homes SELLERS 100_Homes.rb:110-112) NoerTavern_Nap.rb EV38 (37,49) ItemNoerTavernNapKey (106) key 550/night; rent 2 LC/week (exists)
1 Pirate's Bane inn PirateBaneInn (Map081) -point-Keeper EV8 (25,20) PirateBaneInnKeeper.rb:9-21, call_msg("\\optB[#{cmd_text}]"), Barter = commonNPC/Barter (:11) PirateBaneInn_Nap.rb EV56 (31,31) ItemPirateBaneInnNapKey (114) 550/night (Data/Barters/PirateBaneInnKeeper.json:8-11)
2 Doom Fortress inn DoomFortressInn (Map097) -point-Keeper EV13 (32,34) DoomFortressInnKeeper.rb:8-20, \optB, Barter :10 DoomFortressInn_Nap.rb EV12 (17,26) ItemDoomFortressInnNapKey (116) 550 (DoomFortressInnKeeper.json:8-11)
3 Fish Town inn FishTownInn (Map117) Deepone -point-Keeper EV72 (37,21) FishTownInnKeeper.rb:12, call_msg("TagMapFishTownInn:InnKeeper/Begin"): a text key whose text ends in \optB[...] (Text/ENG/TagMapFishTownInn.txt:8-10) FishTownInn_Nap.rb EV13 (40,14) ItemFishTownInnNapKey (119) 550 (FishTownInnKeeper.json:8-11)
4 South front-line camp inn SouthFL_INN (Map135) guard asd EV14 (22,18) InnKeeper_SouthFL_INN.rb:7-21, \optB, Barter :10 SouthFL_INN_Nap.rb EV9 (37,25) ItemSouthFL_INN_Key (125) 550 (InnKeeper_SouthFL_INN.json:8-10, no price = item price)
5 Coastal Fortress inn NorthFL_INN (Map148) -point-Keeper EV66 (42,21) NorthFL_INN_Keeper.rb:13-28, \optB, Barter :17 NorthFL_INN_Nap.rb EV54 (23,29) ItemNorthFL_INN_Key (129) 550 (NorthFL_INN_Keeper.json:8-11)

Coins (Items.rvdata2 price): Copper ItemCoin1 200, Large Copper ItemCoin2 2000, Gold ItemCoin3 20000. A week of keys = 7 x 550 = 3850 trade points, about 2 LC: the Noer rent (4000) is "a key a night".

Not inns (nap scripts checked; no keeper sells a sleep):

Place Why no rent Ref
Noer Golden Bar (Map082) nap always "drive away" NoerGoldenBar_Nap.rb:105-109
Arise village (Map165) nap: death if aggro, else drive away AriseVillage_Nap.rb:7-23
Refugee camps (Map035, 073, 133, 166), Noer slums/roads free field nap, no keeper, no rooms NoerWildness_Nap.rb:108 (region_map_wildness_nap)
Saint Monastery (Map064/126) sleep only for the SaintBeliever title, else drive away SaintMonastery_Nap.rb:132-136
SM Cloud Village (Map182) free nap, no keeper SMCloudVillage_Nap.rb:236-248
Fish Town T / FishTownL/R guards / drive away, no keeper FishTownT_Nap.rb:112-137
Orkind caves/camps, bandit camps, Deepone caves, hives hostile; capture naps OrkindCave_Nap.rb, BanditCamp1_Nap.rb ...
Noer tavern 2F (Map076) same inn and key as Noer (NoerTavern2F_Nap.rb:108-125); optional 2nd Noer room, not drafted -
Sybaris no inn map exists (only Syb_WarBossRoom) -

2. What each inn's paid sleep gives

All six paid branches are the same code: lose 1 key, health / stamina / satiety to max (the "meal"), 4 x Command_Bath.rb, dirt 0, handleNap. No day/night rule in any of them. Before that branch each script runs the night-visitor loop (NapFucker NPCs within 3-5 tiles) and its own capture checks, which a rented room does not bypass (the Homes nap wrapper only makes the key count as held, 100_Homes.rb:1098-1118, 1391-1408).

Inn Paid branch Checks before it (still apply in the rented room) Without key
Noer NoerTavern_Nap.rb:129-136 Boss Mama gone / Cocona quest -> drive away; slave -> turned out (:117-128) turned out (:125-128)
Pirate's Bane PirateBaneInn_Nap.rb:133-140 slave or morality < 1 -> guards kidnap (:107-126) drive away (:128-131)
Doom Fortress DoomFortressInn_Nap.rb:136-143 slave or morality < 1 -> kidnap (:109-129) drive away (:131-134)
Fish Town FishTownInn_Nap.rb:136-143 slave or morality < 1 -> Fishkind kidnap (:109-126) sent out to FishTownL (:129-134)
South FL camp SouthFL_INN_Nap.rb:122-129 morality < 1 -> death (:109-120) plain handleNap (:130-131): a key only adds the restore
Coastal Fortress NorthFL_INN_Nap.rb:172-179 slave of the inn -> rape loop; slave or morality < 1 -> kidnap (:110-165) drive away (:167-170)

So the rented room's sleep needs nothing per inn: :nap_keys = that inn's key, the wrapper is the same two lines. Keepers: none of the five has a night or day rule on its event (Map081 EV8, Map097 EV13, Map117 EV72, Map135 EV14, Map148 EV66 have no $game_date line); every keeper script returns at once while $game_map.threat (line 1-5 of each); Fish Town's keeper attacks a slave Lona (FishTownInnKeeper.rb:6-10) and the Coastal Fortress keeper only gives the slave-work line to the inn's own slave (NorthFL_INN_Keeper.rb:7-10): no menu, so no rent / collect then. Boss Mama is deleted in some Cocona quest states (Map059 EV69).

3. RolePlayS

RolePlayS redirects every file in its HCGframes/event/ (RolePlayS/Scripts/0_CORE.rb:1707-1718). That folder (34 files) holds none of the 5 keeper scripts and none of the 5 nap scripts (inn files in it: companion scripts, NoerTavernGuildEmpolyee.rb, NoerTavernQuestBoard.rb). It also redirects Command_AreaNap.rb (the bed command; not touched here). It adds goods to the PirateBane and Noer keepers' barter lists (0_CORE.rb:487-488, 582-585): data only. No collision; the Homes redirect chains anyway (Homes.redirect keeps the previous target, 100_Homes.rb:955-964). No other mod in _Mods sets $mod_load_script for these files.

4. Candidate rooms (one per inn: the inn's own paid bedroom)

Each is the room holding the inn's -point-WakeUp bed (as in Noer). Small: these inns have 2 x 3 cells.

Inn Seed Bounds Door tiles Floor tiles (+override) Baked table override Events in room -> action Points moved to Floor rule Wall tiles (decor) Windows
Noer (exists) 32,30 30,27,35,33 31,33; 33,32 10 + 1 = 11 31,29 <- 31,30 WakeUp, EV087 bucket, SexPoint2; torch EV024 at 31,28 31,34; 32,34 32,30 31..34,28 33,27
Pirate's Bane 41,21 40,19,43,23 41,23; 42,23 (EV6/EV4 doors) 5 + 1 = 6 42,20 <- 42,21 (A2 3198 on 1590) -point-WakeUp EV11 (41,21) move; -point-SexPoint2 EV27 (42,21) move; MapBlockBox EV38 (41,20, bed head, Command_AreaNap) delete 41,24; 42,24 none (keeps the door curtains, layer 2 tiles 349/350 at 41,22 / 42,22) 41,19; 42,19 none (window 42,18 is above the wall row)
Doom Fortress 29,22 27,20,31,26 30,26 (EV5 door) 7 + 1 = 8 30,22 <- 30,23 (3198 on 1598) -point-WakeUp EV23 (28,23) move; -point-SexPoint2 EV15 (29,22) move; MapBlockBox EV24 (28,22) delete 29,27; 31,27 none needed (only layer-0 carpet pieces) 28..30,21 none (window 30,20 above wall row)
Fish Town 22,22 20,19,24,24 24,23 (EV34 door) 8 + 1 = 9 22,21 <- 22,22 (3198 on 1595) -point-WakeUp EV63 (21,22) move; -point-SexPoint4 EV64 (21,23) move; LinkBox EV62 (21,21, bed head) delete; EV1 water bucket (23,21, Command_AreaWater) delete 25,22; 25,21 22,23 (floor 1595): clears layer-2 clutter 508 (21,23), 509 (23,22) 21..23,20 none
South FL camp 14,21 12,19,16,23 16,22 (EV22 door) 7 + 1 = 8 13,22 <- 13,21 (stand B18 + torch event) -point-WakeUp EV19 (13,21) move; -point-SexPoint2 EV32 (14,20) move; MapBlockBox EV20 (13,20, bed head) delete; MapBlockBox EV56 (13,22, give_light("torch")) delete (light goes, as Noer's torch) 17,22; 18,22 see 6.2: carpet is a layer-1 autotile, so the current rule would flatten its border; use :floor_layers => [2] (new) to clear clutter 627 (14,20), 11 (14,22) 13,19; 14,19; 15,20 none
Coastal Fortress 31,14 30,12,34,18 33,18 (EV19 door) 7 + 1 = 8 32,14 <- 32,15 (3198 on 1580) -point-WakeUp2 EV6 (31,14, the inn bed, Command_AreaNap) erase in place (looked up only on NoerArenaB1, NoerArenaB1_Begin.rb:213); -point-SexPoint2 EV36 (32,15) move; EV23 water bucket (33,14) delete; wall torch EV43 (32,13) via remove_event_tiles (as Noer) SexPoint2 -> 33,19 32,15 (no decor left after override) 31..33,13 none (arrow slit 31,12 above wall row)

All move targets checked: passable 4 ways by layers, no event on the tile (Map081 41/42,24; Map097 29/31,27; Map117 25,21/22; Map135 17/18,22; Map148 33,19). Every room event above is restored at rent expiry (the map file is never changed; Homes reloads it, 100_Homes.rb:1225-1290).

5. LOCATIONS rows (paste after noer_inn_room, 100_Homes.rb:142-195)

Prices are the proposal of section 8; change :price / :coin per the owner's choice.

			# Pirate's Bane inn (Data/Map081 PirateBaneInn), the paid bedroom (the
			# right one of the three cells at the top; the other two hold sleeping
			# customers EV23/EV24). Floor 5 tiles (41,20..22) (42,21..22) plus the
			# small table (42,20). Doors: WoodenDoorSide4 EV6 (41,23), EV4 (42,23).
			{:id => "piratebane_inn_room", :name => "piratebane_inn_room/name", :mode => :rent,
			 :price => 3, :coin => "ItemCoin2", :seller => "PirateBaneInnKeeper",
			 :map => "PirateBaneInn",
			 :room_seed => [41, 21], :room_bounds => [40, 19, 43, 23],
			 :door_tiles => [[41, 23], [42, 23]],
			 :keep => [],
			 :move_points => {"-point-WakeUp" => [41, 24], "-point-SexPoint2" => [42, 24]},
			 :tile_overrides => [[42, 20, 42, 21]],
			 :remove_event_tiles => [],
			 # no :floor_ref: the door curtains (layer 2, 41,22 / 42,22) stay
			 :window_tiles => [],
			 :nap_script => "Data/HCGframes/event/PirateBaneInn_Nap.rb",
			 # PirateBaneInn_Nap.rb:128, 133-134 (by name)
			 :nap_keys => ["ItemPirateBaneInnNapKey", 114],
			 :clear_existing => true},
			# Doom Fortress inn (Data/Map097 DoomFortressInn), the middle cell of the
			# three at the top: 2 x 2 floor + the passage to its door EV5 (30,26),
			# plus the small table (30,22).
			{:id => "doomfortress_inn_room", :name => "doomfortress_inn_room/name", :mode => :rent,
			 :price => 2, :coin => "ItemCoin2", :seller => "DoomFortressInnKeeper",
			 :map => "DoomFortressInn",
			 :room_seed => [29, 22], :room_bounds => [27, 20, 31, 26],
			 :door_tiles => [[30, 26]],
			 :keep => [],
			 :move_points => {"-point-WakeUp" => [29, 27], "-point-SexPoint2" => [31, 27]},
			 :tile_overrides => [[30, 22, 30, 23]],
			 :remove_event_tiles => [],
			 :window_tiles => [],
			 :nap_script => "Data/HCGframes/event/DoomFortressInn_Nap.rb",
			 # DoomFortressInn_Nap.rb:131, 136-137
			 :nap_keys => ["ItemDoomFortressInnNapKey", 116],
			 :clear_existing => true},
			# Fish Town inn (Data/Map117 FishTownInn), the bottom-left room: 3 x 3
			# floor with the small table (22,21); door EV34 (24,23).
			{:id => "fishtown_inn_room", :name => "fishtown_inn_room/name", :mode => :rent,
			 :price => 4, :coin => "ItemCoin2", :seller => "FishTownInnKeeper",
			 :map => "FishTownInn",
			 :room_seed => [22, 22], :room_bounds => [20, 19, 24, 24],
			 :door_tiles => [[24, 23]],
			 :keep => [],
			 :move_points => {"-point-WakeUp" => [25, 22], "-point-SexPoint4" => [25, 21]},
			 :tile_overrides => [[22, 21, 22, 22]],
			 :remove_event_tiles => [],
			 # floor 1595; clears the clutter at (21,23) and (23,22) (with the
			 # new :floor_layers => [2], (23,22) keeps its own floor 1603)
			 :floor_ref => [22, 23],
			 :window_tiles => [],
			 :nap_script => "Data/HCGframes/event/FishTownInn_Nap.rb",
			 # FishTownInn_Nap.rb:129, 136-137
			 :nap_keys => ["ItemFishTownInnNapKey", 119],
			 :clear_existing => true},
			# South front-line camp inn (Data/Map135 SouthFL_INN), the top-left room;
			# door EV22 (16,22). (13,22) is the torch stand (EV56), made floor.
			{:id => "southfl_inn_room", :name => "southfl_inn_room/name", :mode => :rent,
			 :price => 8, :coin => "ItemCoin1", :seller => "InnKeeper_SouthFL_INN",
			 :map => "SouthFL_INN",
			 :room_seed => [14, 21], :room_bounds => [12, 19, 16, 23],
			 :door_tiles => [[16, 22]],
			 :keep => [],
			 :move_points => {"-point-WakeUp" => [17, 22], "-point-SexPoint2" => [18, 22]},
			 :tile_overrides => [[13, 22, 13, 21]],
			 :remove_event_tiles => [],
			 # carpet = layer-1 autotile: only layer 2 (clutter 627, 11) is cleared.
			 # NEEDS the new :floor_layers option (section 6.2); without it leave
			 # :floor_ref out (clutter stays) rather than flatten the carpet border.
			 :floor_ref => [14, 21], :floor_layers => [2],
			 :window_tiles => [],
			 :nap_script => "Data/HCGframes/event/SouthFL_INN_Nap.rb",
			 # SouthFL_INN_Nap.rb:122-123
			 :nap_keys => ["ItemSouthFL_INN_Key", 125],
			 :clear_existing => true},
			# Coastal Fortress inn (Data/Map148 NorthFL_INN), the right one of the
			# three cells at the top: 2 x 2 + the passage to its door EV19 (33,18),
			# plus the small table (32,14).
			{:id => "northfl_inn_room", :name => "northfl_inn_room/name", :mode => :rent,
			 :price => 1, :coin => "ItemCoin2", :seller => "NorthFL_INN_Keeper",
			 :map => "NorthFL_INN",
			 :room_seed => [31, 14], :room_bounds => [30, 12, 34, 18],
			 :door_tiles => [[33, 18]],
			 :keep => [],
			 # -point-WakeUp2 (the inn bed) stays as an invisible point: nothing on
			 # this map looks it up (only NoerArenaB1_Begin.rb:213, another map)
			 :move_points => {"-point-SexPoint2" => [33, 19]},
			 :tile_overrides => [[32, 14, 32, 15]],
			 # the wall torch above the table (EV43, give_light "torch_weak")
			 :remove_event_tiles => [[32, 13]],
			 :floor_ref => [32, 15],
			 :window_tiles => [],
			 :nap_script => "Data/HCGframes/event/NorthFL_INN_Nap.rb",
			 # NorthFL_INN_Nap.rb:167, 172-173
			 :nap_keys => ["ItemNorthFL_INN_Key", 129],
			 :clear_existing => true}

SELLERS lines (100_Homes.rb:100-113):

			"PirateBaneInnKeeper"   => ["Data/HCGframes/event/PirateBaneInnKeeper.rb", "commonNPC:commonNPC/Barter"],
			"DoomFortressInnKeeper" => ["Data/HCGframes/event/DoomFortressInnKeeper.rb", "commonNPC:commonNPC/Barter"],
			# menu is a text key (FishTownInnKeeper.rb:12) whose \optB has its own
			# words: no marker (UKR says "Обмін" there, "Бартер" in commonNPC/Barter)
			"FishTownInnKeeper"     => ["Data/HCGframes/event/FishTownInnKeeper.rb", nil],
			"InnKeeper_SouthFL_INN" => ["Data/HCGframes/event/InnKeeper_SouthFL_INN.rb", "commonNPC:commonNPC/Barter"],
			"NorthFL_INN_Keeper"    => ["Data/HCGframes/event/NorthFL_INN_Keeper.rb", "commonNPC:commonNPC/Barter"]

Wrappers (HCGframes/, two lines each like HCGframes/NoerTavernWaifu.rb / NoerTavern_Nap.rb): PirateBaneInnKeeper.rb, DoomFortressInnKeeper.rb, FishTownInnKeeper.rb, InnKeeper_SouthFL_INN.rb, NorthFL_INN_Keeper.rb -> lonacraft_home_seller("<key>"); PirateBaneInn_Nap.rb, DoomFortressInn_Nap.rb, FishTownInn_Nap.rb, SouthFL_INN_Nap.rb, NorthFL_INN_Nap.rb -> lonacraft_home_nap("Data/HCGframes/event/<file>").

6. Shared code changes in 100_Homes.rb

# Change Why Size
6.1 Text-key menus in the call_msg alias (100_Homes.rb:1535-1547): when no \optB is in args[0] and it looks like a text key, resolve $game_text[key, true]; if that text has \optB[, run lonacraft_home_menu(full) and show the extended text with $game_message.background/position = args[1]/args[2] (defaults 0/2), $game_message.add(text), wait_for_message (what call_msg does, 29_Functions_417_Interpreter.rb:202-207, minus the \t[...] wrapper: the text holds ], and \T[([^\]]+)] (Frames/53_Window_Base.rb:248) would cut it) Fish Town keeper ~20 lines
6.2 :floor_layers (default [0, 1, 2]): the decor rule (100_Homes.rb:1264-1276) copies and compares only these layers of :floor_ref South FL carpet is a layer-1 autotile (room tiles' layer 1 = 3008..3048): the current rule would turn every border piece into the centre piece; Fish Town keeps its 1603 tile ~5 lines
6.3 marker = nil already means "no marker" (100_Homes.rb:1376 gives "", extend_menu skips the check, :1042) Fish Town none
6.4 Several rooms per map: owned_rooms_on / furniture_allowed_at? already take every room of a map; home_at_map? returns the first (100_Homes.rb:691-704) only needed for a 2nd room on one map (e.g. Noer 2F); not in this draft none now
6.5 Self-test rows (98_SelfTest.rb:211-213 ITEM_LISTS + the 5 keys and ItemCoin1; :247-258 MAPS + 81, 97, 117, 135, 148 with their tileset ids 22, 22, 38, 22, 22; :275-280 GAME_FILES + the 10 scripts). No TILESETS row: the overrides copy tiles of the same map, no tile id is baked gate coverage ~20 lines
6.6 Docs: README "Homes" + TECHNICAL "Homes" table (TECHNICAL.md:515-519) and the room paragraphs - -

7. Work breakdown (builder)

Item Per inn x5
LOCATIONS row (section 5) + SELLERS line paste 5
HCGframes/<keeper>.rb, HCGframes/<nap>.rb 2 two-line files 10 files
Texts Text/<lang>/Homes.txt: <id>/name, rent_opt, extend_opt, status_opt, coin_week (coin word per inn: "LC a week" / "copper a week"), rented, extended, no_coins, status, expired (names that inn's keeper: "the innkeeper is holding your belongings") 10 keys x 5 languages (CHT ENG KOR RUS UKR) 250 entries
Shared: 6.1 (Fish Town only), 6.2 (South FL, Fish Town), 6.5, 6.6 once -
Verify in game (runner): rent / extend / status / collect at each keeper; sleep in the room with no key = paid sleep; outside the room unchanged; expiry restores bed / bucket / table; screenshot each room rented and furnished per inn 5

Order: Pirate's Bane, Doom Fortress, Coastal Fortress (row + wrappers only), South FL (needs 6.2), Fish Town (needs 6.1 + 6.2).

8. Choices for the owner

Proposed rent per week, relative to Noer (2 LC = about a key a night):

Inn Place (keeper's own words) Proposed Trade points (keys/night equiv.) Reasoning Alternative
Noer tavern the capital 2 LC (keep) 4000 (1.0) base -
Pirate's Bane "one of the few safe havens under the Rudesind Family protection" (TagMapPirateBane.txt InnKeeper/About_here) 3 LC 6000 (1.6) safest, noble-protected, refugees crowd in: dearest 2 LC
Doom Fortress Ingalend's front-line fortress ("always been the front lines") 2 LC 4000 (1.0) royal fortress, steady soldier trade: as Noer 3 LC
Coastal Fortress (NorthFL) ex salt field, villages around fell; the keeper takes slaves 1 LC 2000 (0.5) besieged, dangerous to sleep in 2 LC
South FL camp a keep that fell, rebuilt as a camp from the ruins 8 Copper 1600 (0.4) ruined camp, worms; sleeping there is free anyway without a key 1 LC
Fish Town Deepone town, keeper hostile to outsiders ("you all will be extinct") 4 LC 8000 (2.1) outsider surcharge in a hostile town no rent at all
Golden Bar, refugee camps, Arise, Orkind/bandit camps, Saint Monastery, Sybaris no paid sleep / no inn no rent - section 1 -
Question Recommendation
Which inns get a room all five above (Fish Town last; it needs 6.1)
Coin Large Copper everywhere except South FL in Copper (8); Gold nowhere (1 Gold = 10 LC a week, above every inn)
Pirate's Bane room is 6 tiles (the inn's cells are 2 x 3) accept; the other cells hold sleeping customers
South FL: make the torch stand (13,22) floor (torch light goes, 8 tiles) or keep it (7 tiles) make it floor, as Noer's torch
Coastal Fortress: remove the wall torch over the table (EV43) remove, as Noer
Noer 2F second room not now