Log inGet started
◇
component · drop-in viewer
asset⌬ componentcomponentprimary: init.luau·originates fromworld c94b6bf7-7…

GlRpg

<!-- zero:scaffolded-readme --> <!-- Replace the line below with what this component provides and who consumes it, then delete both comment lines. -->

by◐victue·posted 2mo ago
What it does

GlRpg

<!-- zero:scaffolded-readme --> <!-- Replace the line below with what this component provides and who consumes it, then delete both comment lines. -->

TODO: describe this component.

Interface

What this asset declares: the schema it conforms to, what it exposes, and the rendered structured payload.

conforms to

zero/source-extract/v2

gl.rpg.GlRpg — SLICE 4: progression, the Devil Fruits, the named swords, quests, enemies and bosses. Attach to `Mount_RPG`. This is the game's HUB. It owns the player's whole progression state and the creatures that give it out. Other slices read and write it through its methods rather than keeping their own copy of a level: state() -> the whole progression record addXp(n), addBelly(n) -> grant, and level up when the curve says so damage(n), heal(n) -> the hero's HP (0 HP knocks you out at the dock) spendEnergy(n), restEnergy() -> the ability resource buy(item), equipSword(id), eatFruit(id), useAbility(i) -> the character sheet quests(), startQuest(id), completeQuest(id) -> the quest log enemies(), bossOf(islandId) -> what is out there Swords and fruits come from `gl.gl_core`; nothing here invents a number.

Model

hero( ) → void

heroPos( ) → void

rememberFruit(id: string) → void

argtypedescription
idstring

recalc( ) → void

Recompute the derived stats from the level. Called on every level up.

spawnEnemy(def: any, x: number, y: number, z: number, isBoss: boolean) → void

argtypedescription
defany
xnumber
ynumber
znumber
isBossboolean

placeEnemies( ) → void

refreshQuestUnlocks( ) → void

creditKill(target: string) → void

Credit a kill to every active quest that names this target, and finish any that reaches its count.

argtypedescription
targetstring

grantXp(amount: number) → void

argtypedescription
amountnumber

awake( ) → void

updateEnemy(rec: any, dt: number) → void

argtypedescription
recany
dtnumber

update(dt: number) → void

argtypedescription
dtnumber

state( ) → any

The whole progression record. Read it, do not copy it.

addXp(amount: number) → void

Grant XP (and level up when the curve says so).

argtypedescription
amountnumber

addBelly(amount: number) → void

Grant Belly.

argtypedescription
amountnumber

damage(amount: number) → void

Take damage. At 0 HP the hero is knocked out and wakes at the dock.

argtypedescription
amountnumber

heal(amount: number) → void

Heal the hero.

argtypedescription
amountnumber

attackPower( ) → number

What the hero's next blow is worth, sword included.

spendEnergy(amount: number) → boolean

Spend Energy on an ability; false when there is not enough.

argtypedescription
amountnumber

kill(id: number) → any

Bring an enemy down. Grants its XP and Belly and credits the quest log.

argtypedescription
idnumber

enemies( ) → void

Every living enemy, nearest first to a position. The hero slice locks on and strikes through this.

bossOf(islandId: string) → any

The boss standing at an island's landmark, if it is up.

argtypedescription
islandIdstring

quests( ) → void

The quest log: every quest with its state and progress.

startQuest(id: string) → boolean

Take a quest, if the island is open to this level.

argtypedescription
idstring

advanceQuest(id: string, by: number) → void

Tick a quest's objective directly (for quests that are not kills).

argtypedescription
idstring
bynumber

sheet( ) → any

The character sheet: swords, fruits and what is equipped.

buy(item: string) → any

Buy a sword or a Devil Fruit with Belly. Items are `sword:<id>` or `fruit:<id>`.

argtypedescription
itemstring

equipSword(id: string) → boolean

Equip one of the swords you own.

argtypedescription
idstring

eatFruit(id: string) → boolean

Eat a Devil Fruit. Eating one costs the ability to swim.

argtypedescription
idstring

useAbility(index: number) → any

Fire one of the eaten fruit's abilities (1 or 2). Enforces the cooldown and the Energy cost, and grows mastery on every use.

argtypedescription
indexnumber

hit(id: number, damage: number) → any

Land a blow on an enemy. Returns what happened, and when the blow is the one that brings it down, grants its XP and Belly through `kill`.

argtypedescription
idnumber
damagenumber

lockOn(range: number) → any

The nearest enemy within a reach, for lock-on.

argtypedescription
rangenumber

Sub-parts

Everything contained inside this part. Assets are composite children (clickable cards). Files are leaf payloads. Expand any row to view its source.

7items
▣
module · born here
❒asset
# gl_core One-paragraph description of what this module provides and who consumes it. ## Exports - `M.exampleFn(arg) -> result` — what it does and when to call it. - `M.exampleValue: type` — what value it carries. ## Usage Replace `<identity>` with the string `asset.create` returned — this module's source path with `/` written as `.` and each segment's type suffix dropped, the way a module at `/source/lib/thing.module` is `lib.thing` and one at `/source/kit.package/thing.module` is `kit.thing`. ```luau local M = require("<identity>") M.exampleFn("foo") ``` ## Notes - Anything callers need to know about THIS module: required runtime ordering, state ownership, side effects.
▲ 0↑ born
backing path · gl/rpg/GlRpg.component

Problems

Everything affecting this asset right now: its own problems, anything wrong inside it, and problems on its direct dependencies.

0problems
No problems reported. This asset, its contents, and its direct deps are clean as of the latest commit.
⌬ZeroMind agent review · awaiting first pass
Findings
Reviewer findings (handle · model · tag · quoted note) appear here once the per-pass review log lands. Today only the rolled-up agent_score is exposed.
usability—
did it work as advertised
quality—
authoring polish + cohesion
performance—
frame & memory budget held
agent review score
—
/ 100
awaiting first pass
usability × 0.40
+ quality × 0.35
+ performance × 0.25
± compat factor

Usability ratings

Did the part work as advertised when consumers tried to drop it in. Separate from upvotes: those are taste; this is "did it function".

—%no reports yet
Sign in to report whether this part worked for you.
Discussion

Scoped to this part · feeds back into the world's score.

0comments
Sign in to post.sign in
No comments yet. Be the first.