-
Notifications
You must be signed in to change notification settings - Fork 2
Cookbook Items And Balls
Mechanism: Concepts: Registries; worked path: Tutorial 04.
mod.content.items:register("MODBERRY", {
id = "MODBERRY", name = "MODBERRY", price = 250, tossable = true,
})
mod.content.text_pointers:patch("ViridianMart", {
TEXT_VIRIDIANMART_CLERK = { mart = { __append = { "MODBERRY" } } },
})Checkpoint: the Viridian clerk sells MODBERRY. Marts are mart lists on
clerk TEXT entries in the text_pointers deep registry; __append
extends the shelf, a bare list replaces it.
mod.content.item_effects:register("MODBERRY_EFFECT", {
use = function(...) ... end,
field = true, battle = true, needsTarget = true,
})
mod.content.items:patch("MODBERRY", { effect = "MODBERRY_EFFECT" })Checkpoint: modkit validate accepts both records and the effect merges
to Data.item_effects with the item's effect reference resolved.
Vanilla use behavior lives in src/inventory/ItemEffects.lua; its
result-verb contract — "consumed", "kept", "failed", "ball",
"learn" — is the shape a use handler speaks.
mod.content.items:register("MODBALL", {
id = "MODBALL", name = "MODBALL", price = 500, ball = "MODBALL",
})
mod.content.balls:register("MODBALL", {
randMax = 120, hpFactor = 10, wobbleFactor = 120,
tossAnim = "ULTRATOSS_ANIM", flicker = true,
})Checkpoint: thrown in battle, MODBALL catches better than an Ultra Ball
(randMax 150). The fields are the real Gen 1 math
(src/battle/Catching.lua); autoCatch = true is the Master Ball
behavior, and attempt = fn replaces the roll outright.
Engine 1.0.0 · mod API 2 · repository · Discord
This project ships no ROM data. All game content is decoded on the player's machine from their own verified Pokemon Red ROM; mods ship recipes and original assets, never extracted content.
Start here
Concepts
Tutorials
- The ladder
- 01 Sprite and Text Tweak
- 02 Balance Patch
- 03 New Species
- 04 New Item and Ball
- 05 New Move
- 06 NPC and Dialogue
- 07 New Map
- 08 Quest
- 09 Custom Music
- 10 New Mechanic
- 11 Custom UI Screen
- 12 Mini Total Conversion
Reference
Guides
Playing