Items
Relevant Scripts:
gml_GlobalScript_scr_spellgml_GlobalScript_scr_itemusegml_GlobalScript_scr_spelltextgml_GlobalScript_scr_iteminfogml_GlobalScript_scr_iteminfo_allgml_GlobalScript_scr_itemnamelistgml_Object_obj_battlecontroller_Step_0gml_GlobalScript_scr_itemdesc_single
Table of All Items
| Item ID | Item Name | Description | Value | Item Target? | Usable in Overworld? |
|---|---|---|---|---|---|
| 0 | --- | EMPTY | EMPTY | EMPTY | |
| 1 | Darker Candy | Heals#120HP | 120 | 1 - Selects an ally | True |
| 2 | ReviveMint | Heal#Downed#Ally | 400 | 1 - Selects an ally | True |
| 3 | Glowshard | Sell#at#shops | Value increases each Chapter | 0 - No decision given | False |
| 4 | Manual | Read#out of#battle | 1 | 2 - Selects an opponent | False |
| 5 | BrokenCake | Heals#20HP | 5 | 1 - Selects an ally | True |
| 6 | Top Cake | Heals#team#160HP | 150 | 2 - Selects an opponent | True |
| 7 | Spincake | Heals#team#XHP - X increases every chapter | 5 | 2 - Selects an opponent | True |
| 8 | Darkburger | Heals#70HP | 70 | 1 - Selects an ally | True |
| 9 | LancerCookie | Heals#50HP | 10 | 1 - Selects an ally | True |
| 10 | GigaSalad | Heals#4HP | 10 | 1 - Selects an ally | True |
| 11 | ClubsSandwich | Heals#team#70HP | 70 | 2 - Selects an opponent | True |
| 12 | HeartsDonut | Healing#varies | 40 | 1 - Selects an ally | True |
| 13 | ChocDiamond | Healing#varies | 40 | 1 - Selects an ally | True |
| 14 | Favwich | Heals#ALL HP | 10 | 1 - Selects an ally | True |
| 15 | RouxlsRoux | Heals#50 HP | 50 | 1 - Selects an ally | True |
| 16 | CD Bagel | Heals#80 HP | 100 | 1 - Selects an ally | True |
| 17 | Mannequin | Useless | 300 | 0 - No decision given | False |
| 18 | Rotten Tea | Heals#10HP | 2 | 1 - Selects an ally | True |
| 19 | Rotten Tea | Heals#10HP | 2 | 1 - Selects an ally | True |
| 20 | Rotten Tea | Heals#10HP | 2 | 1 - Selects an ally | True |
| 21 | Rotten Tea | Heals#10HP | 2 | 1 - Selects an ally | True |
| 22 | DD-Burger | Heals#60HP 2x | 110 | 1 - Selects an ally | True |
| 23 | LightCandy | Heals#120HP | 200 | 1 - Selects an ally | True |
| 24 | ButJuice | Heals#100HP | 200 | 1 - Selects an ally | True |
| 25 | SpagettiCode | Heals#team#30HP | 180 | 2 - Selects an opponent | True |
| 26 | JavaCookie | Healing#varies | 160 | 1 - Selects an ally | True |
| 27 | TensionBit | Raises#TP#32% | 100 | 2 - Selects an opponent | True |
| 28 | TensionGem | Raises#TP#50% | 300 | 2 - Selects an opponent | True |
| 29 | TensionMax | Raises#TP#Max | 1000 | 2 - Selects an opponent | True |
| 30 | ReviveDust | Revives#team#25% | 100 | 2 - Selects an opponent | True |
| 31 | ReviveBrite | Revives#team#100% | 4000 | 2 - Selects an opponent | True |
| 32 | S.POISON | Hurts#party#member | 110 | 1 - Selects an ally | True |
| 33 | DogDollar | Not#so#useful | Value decreases each Chapter | 0 - No decision given | False |
| 34 | TVDinner | Heals#100HP | 200 | 1 - Selects an ally | True |
| 35 | Pipis | Does#nothing | 0 | 1 - Selects an ally | True |
| 36 | FlatSoda | Heals#20HP | 2 | 1 - Selects an ally | True |
| 37 | TVSlop | Heals#80HP | 200 | 1 - Selects an ally | True |
| 38 | ExecBuffet | Heals#team#100HP | 600 | 2 - Selects an opponent | True |
| 39 | DeluxeDinner | Heals#140HP | 600 | 1 - Selects an ally | True |
| 40 | PunchBowl | Heals#team#200HP | 600 | 2 - Selects an opponent | True |
| 41 | Flavigne | Heals#130HP | 333 | 1 - Selects an ally | True |
| 42 | GreenTea | Heals#180HP | 777 | 1 - Selects an ally | True |
| 43 | OrangeJuice | Heals#80HP | 222 | 1 - Selects an ally | True |
| 60 | AncientSweet | Kris only#+400 | 1000 | 1 - Selects an ally | True |
| 61 | Rhapsotea | Heals#115HP | 250 | 1 - Selects an ally | True |
| 62 | Scarlixir | Heals#160HP | 450 | 1 - Selects an ally | True |
| 63 | BitterTear | Heals#All HP | 0 | 1 - Selects an ally | True |
| 64 | Schadenbrot | Heals#team#200HP | 600 | 2 - Selects an opponent | True |
| 65 | TreeCake | Heals#team#160HP | 200 | 2 - Selects an opponent | True |
| 66 | S.POTION | Heals#party#member | 500 | 1 - Selects an ally | True |
| 67 | Raw Moon | Raises#TP 16%#+100HP | 222 | 1 - Selects an ally | True |
| 68 | Phanta | Raises#TP 16%#+100HP | 222 | 1 - Selects an ally | True |
| 69 | FlowerySoda | Raises#TP 16%#+50HP | 222 | 1 - Selects an ally | True |
| 70 | Shikacola | Heals#team#80HP | 222 | 2 - Selects an opponent | True |
Items can be used during or outside of battle to various effects from healing to reviving to even tension
note
This is based on Chapter 2's code, reminder to go back and verify if this functions in all versions
Item Structure
In DELTARUNE items contain:
View gml_GlobalScript_scr_iteminfo to compare
- An ID
- This is used in the switch case statement inside of
scr_spellto decide what code to run and is checked inscr_spelltextto decide which code to display upon use. When it comes to items it appears that their IDs are offset by +200 inspellrelated scripts.
- This is used in the switch case statement inside of
- Item Name
- Known as
global.itemname[id], this is the name that will show up inside of overworld.
- Known as
- Battle Alias
- Known as
itemnameb, this is the name that will show up during battle
- Known as
- Item Description
- Known as
itemdesc[id] in scr_itemdesc(), this is the description that will show up in the the overworld.
- Known as
- Battle Description
- Known as
itemdescb, this is the name that will show up during battle
- Known as
- Item Target
- Known as
target, this is the target of the item- 0 doesn't give a decision
- 1 selects an ally
- 2 selects an opponent
- Known as
- Value
- Known as
value, this is the amount of D$ you will gain from selling it at a shop.
- Known as
- Usability
- Known as
usable, this determines wether or not the item is usable in the overworld.
- Known as
Key Items
Key Items do not appear in your invetory normally and as such have their own section
Key Items structure is much simpler, only containing a description. In scr_itemuse their ID's are offset by 300.
Light World Items
Light World Items are also quite simple, all scripts pertaining to them are prefixed with scr_litem
gml_GlobalScript_scr_litemname contains the names of Light World Items
gml_GlobalScript_scr_litemdesc contains the descriptions of Light World Items
gml_GlobalScript_scr_litemuseb handles using of Light World Items
gml_GlobalScript_scr_litemget is the recommended way to give a player a Light World item
Related Variables
global.item
global.item is an array which contains the entire inventory.
global.item[9] = 32
global.pocketitem
global.pocketitem is an array which contains the entire storage.
global.pocketitem[9] = 32
Scripts
This section is an overview of individual scripts related to spells
scr_spell
Handles how items are used during battle.
- arg0/spell is the ID of the item to be used, offset by 200
- arg1/caster is the caster of the spell
- star is the star of the item's use/the one who is targetted by the item
tip
Tension items are not found in scr_spell, they can instead be found in gml_Object_obj_battlecontroller_Step_0
This is to make the item's give you TP before it switches to the next party member
Example Usage
case 232:
scr_healitemspell(999);
item_use = true;
break;
scr_spellinfo_all
Inserts the items from scr_iteminfo into the global versions of their respective functions.
global.itemvalue[i] = value;
scr_itemget
The recommended way to give a item to a party member. As of Chapter 2+ if it fails to give an item in the player's inventory it will attempt to give it to the player's storage.
- arg0 is the party member
- arg1 is the ID of the spell to be given
Example Usage
scr_itemget(32)
scr_itemuse
This is for when an item is used specifcally in the overworld.
tip
The usable variable here determines wether or not the item gets used up.
Example Usage
case 32:
usable = 1;
scr_healitem_all(50);
if (scr_havechar(2))
scr_itemcomment(suspos, stringsetloc("Don't throw mints at me!", "scr_itemuse_slash_scr_itemuse_gml_538_0"));