Log inGet started
World

Banana 2077

Branchmain
Branchesmain
Commit49a1306fab

README.md

game.rpg.menu

The widget trees for V's menu in Banana 2077, Cyberpunk 2077 2.0 style. It draws one full-screen panel with four tabs:

  • INVENTORY: the seven equipment slots (katana, baton and five cyberware slots), a tier-framed item grid (M.COLS × M.ROWS visible, scrolling) with category filters, and a detail card. The card shows the item's effects, a comparison against what is equipped, the salvage yield and the upgrade cost, with EQUIP / USE, DISASSEMBLE and UPGRADE buttons.
  • CHARACTER: the five attributes, the perk-tier gates at 4 / 9 / 15 / 20, unspent points, and the derived stats.
  • PERKS: the five attribute trees (SOLO, BLADES, ENGINEER, NETRUNNER, HEADHUNTER). Each has four tiers, requirement links and ranks, plus BUY and RESPEC.
  • SKILLS: street cred with its title track, and the five level-by-doing skills with their milestones.

It is a pure builder over game.rules state plus a view model. It owns no state and registers no screen. The game.rpg.Character component owns the view model, puts M.tree(m) on screen rpg_menu (layer 156), and routes the clicks back in through its onCallback.

API

  • M.tree(m) returns the whole frame: header (level, eddies, points), tab bar, the active tab's body, and a footer with that tab's keycaps.
  • M.itemRows(filter) returns the sorted {id, count, def} rows for an inventory filter.
  • M.perkOrder(tree) returns a tree's perks in tier/column order (this is what perkSel indexes).
  • M.perkState(perk) returns "maxed" | "owned" | "ready" | "open" | "locked".
  • M.primaryLabel(row) returns EQUIP | UNEQUIP | USE | INSPECT.
  • M.tier(id), M.icon(def, color), M.iconKind(def), M.effects(id, def), M.compare(id, def), M.filterLabel(f), and M.currentItem(m).
  • Constants: M.TABS, M.ACCENT, M.FILTERS, M.COLS, M.ROWS.

View model m

fieldmeaning
tab"inventory" | "character" | "perks" | "skills"
msg, msgColorfooter feedback line
filtera key from M.FILTERS, or "slot:<slot>"
itemsM.itemRows(filter)
sel, topselected item (1-based) and first visible grid row (0-based)
focus, slotSel"grid" | "slots" and the highlighted slot index
attrSelhighlighted attribute index (CHARACTER)
tree, perkSelattribute id of the open tree and index into M.perkOrder(tree)
respecArmedthe respec button asks for confirmation

Click ids

menu:close, menu:tab:<t>, menu:filter:<f>, menu:item:<i>, menu:slot:<i>, menu:scroll:-1|1, menu:act, menu:dis, menu:up, menu:attr:<i>, menu:spend:<attr>, menu:tree:<attr>, menu:perk:<i>, menu:buy, menu:respec.