Banana 2077
README.md
game.rpg.Character
V's menu in Banana 2077, in the style of Cyberpunk 2077 2.0. The scene entrypoint attaches it to the
mount_shops entity when play starts, next to game.shops.Shops. It needs no sibling components:
it reads and changes the game only through game.rules, and draws through game.rpg.menu.
What it does
- Opens and closes the menu. It activates
game.rpg.character.inputMapwhile a run isplaying.I, gamepadselector touch BAG toggles the menu (refused unlessR.canControl()), which opens on the INVENTORY tab. - Owns the screen. Screen
rpg_menusits on layer 156, built byMenu.tree(m)from the view model this component owns. It is rebuilt only on input or a rules event (eddies, items, equip, attributes, XP, perks, skills, cred, disassembly, upgrades), never per frame. - Takes the modal. While open, it holds focus
"inventory", unlocks the pointer (and re-locks it on close if it was locked), claims the platform Back, and activatesgame.shops.shopnavandgame.rpg.charnav. Those suppress the HUD, combat, walking, quest-HUD and story groups. If another system takes focus, the menu closes itself. - Inventory tab. A 6-wide item grid with category filters and the seven equipment slots. Enter equips, unequips or uses the item. X disassembles it into components. U upgrades it a tier for components and eddies. F cycles the filter. Left from the first grid column moves to the slot column, and Enter on a slot filters the grid to that slot. Back clears a slot filter before it closes the menu.
- Character tab. Left and right pick an attribute, and Enter spends an attribute point on it.
- Perks tab. Left and right switch tree, and up and down pick a perk. Enter buys a rank.
X arms a respec, and a second X within 3 s confirms it (
R.respec, costs eddies). - Skills tab. A read-only view of street cred and the five skills.
- Every result (equipped, not enough components, perk locked, and so on) shows in the footer.
Controls
| keyboard / mouse | gamepad | touch | |
|---|---|---|---|
| open / close | I | select | BAG / ✕ |
| switch tab | Q / E, Tab | LB / RB | tap a tab |
| move | arrows / WASD | d-pad | tap a tile, slot, card or perk |
| primary (equip, use, raise, buy) | Enter / Space, or click the selected tile | south | tap the button |
| disassemble / respec | X | west | DISASSEMBLE / RESPEC button |
| upgrade | U | north | UPGRADE button |
| cycle filter | F | right trigger | tap a filter chip |
| back | Esc / Backspace | east | ✕ |
Click ids
onCallback handles menu:close, menu:act, menu:dis, menu:up, menu:buy, menu:respec,
menu:tab:<tab>, menu:filter:<filter>, menu:item:<n>, menu:slot:<n>, menu:scroll:<±n>,
menu:attr:<n>, menu:spend:<attribute>, menu:tree:<attribute> and menu:perk:<n>.
Cost
Per frame it only checks a dirty flag. The input maps are activated once and released in
onDestroy, along with the screen and every rules listener.