Welcome to Data Crystal's new home! Data Crystal is now part of the TCRF family (sort of).
The wiki has recently moved; please report any issues in Discord. Pardon the dust.

Yu-Gi-Oh! Duel Monsters 4: Kaiba Deck/Tutorials: Difference between revisions

From Data Crystal
Jump to navigation Jump to search
No edit summary
Line 1: Line 1:
{{tutorials|game=Yu-Gi-Oh! Duel Monsters 4: Kaiba Deck}}
==Text boxes in battle - Magic/Trap/Ritual==
==Text boxes in battle - Magic/Trap/Ritual==
Usually you'll be outside of Bank 06, since you'll be mostly calling these for card effects and lingering effects such as Swords of Revealing Light.<br>
Usually you'll be outside of Bank 06, since you'll be mostly calling these for card effects and lingering effects such as Swords of Revealing Light.<br>
Line 8: Line 9:
These card_ids are 2 bytes long, and are stored in wC8F6, wC8F8, and wC8FA.<br>
These card_ids are 2 bytes long, and are stored in wC8F6, wC8F8, and wC8FA.<br>
You can display these card_id names in your textboxes using the special character codes (in DM3, these are 0xB5 to 0xB8, but it might be different in DM4, I will check).
You can display these card_id names in your textboxes using the special character codes (in DM3, these are 0xB5 to 0xB8, but it might be different in DM4, I will check).
{{Internal Data|game=Yu-Gi-Oh! Duel Monsters 4: Kaiba Deck}}

Revision as of 21:42, 23 October 2023

Chip tiny.png The following article is a Tutorial for Yu-Gi-Oh! Duel Monsters 4: Kaiba Deck.

Text boxes in battle - Magic/Trap/Ritual

Usually you'll be outside of Bank 06, since you'll be mostly calling these for card effects and lingering effects such as Swords of Revealing Light.
So do a rst 08 to Bank 06, grabbing the pointer at 6:400B, with the textbox ID in accumulator as the parameter.

3E 13            ld   a,13        ;0x13 is Stop Defense textbox
CF               rst  08
=> 0B 06                          ;Display text box

The parameter you send in accumulator is also used to retrieve up to 3 card_ids stored in three arrays at 6:41F3, used by display_textbox_func at 6:41B4.
These card_ids are 2 bytes long, and are stored in wC8F6, wC8F8, and wC8FA.
You can display these card_id names in your textboxes using the special character codes (in DM3, these are 0xB5 to 0xB8, but it might be different in DM4, I will check).