Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.
So I have read through and couldn't see anything about what I'm about to ask (or I could be blind and missed it)
I have a Japanese e-reader+ but have English Games, I was wondering if its possible to get the Japanese dotcodes to be read in the Japanese e-reader, to then work on an English game cart. Any ideas if this is possible?
I understand that you updated Ruby and Sapphire Disassembly to include the translated Regidoll. When I go to "Make" it the stripe 1 raw file is successfully generated but I get an "Error 5" on the second stripe. All the other e-reader card assemblies like the Eon ticket and battle Es work, except for the second Regi stripe, I went further and learned how to disassemble and change the regions from some Japan Regidoll raw files to triple check that WSL is working correctly, and all seems to work fine.
I'm really stuck now, does any have an idea what I could be doing wrong?
EDIT: Got it working. Turns out my frustration and subsequent turning off the computer did something (I'm running Win10pro with WSL + python 2.7.18). I retried the make assembly after the restart and it compiled correctly. Thank you Paccy for providing this awesome method of time travel :D
After successfully generated both Regi strips, I tested the e-reader cards in both MGBA and physically. Regirock works fine, The Regice says that it transfers but doesn't show up in the decoration items and Registeel doll gives a loading error on the receiving GBA. I've done multiple compiles and getting the same result. Has anyone else checked this or had this issue?
I understand that you updated Ruby and Sapphire Disassembly to include the translated Regidoll. When I go to "Make" it the stripe 1 raw file is successfully generated but I get an "Error 5" on the second stripe. All the other e-reader card assemblies like the Eon ticket and battle Es work, except for the second Regi stripe, I went further and learned how to disassemble and change the regions from some Japan Regidoll raw files to triple check that WSL is working correctly, and all seems to work fine.
I'm really stuck now, does any have an idea what I could be doing wrong?
EDIT: Got it working. Turns out my frustration and subsequent turning off the computer did something (I'm running Win10pro with WSL + python 2.7.18). I retried the make assembly after the restart and it compiled correctly. Thank you Paccy for providing this awesome method of time travel :D
I would like to mention I'm also having this same exact error now, but after a restart or two I still haven't gotten mine working... if anyone has any insight as to what exactly "Error 5" means it would be greatly appreciated!
I'm having trouble making giftpokemon in pokemon emerald.
I did the entire tutorial, added all the tools, I can do the make code, but the game says the following error: "This data can't be used in this version".
I used the rom MYSTERY_EVENT_DISTRO located by the channel "im a blisy ._." to unlock the MYSTERY EVENT in Pokémon Emerald. With the E-readers he made available, I was able to access some events he organized himself.
However, with the E-readers that I created using this tutorial, it gives this error "This data cannot be used in this version".
can anybody help me? I'm a bit new to programming, but I would really like to be able to hold my events on E-readers.
My intention is to do the events without having to change the original rom, so I used the rom MYSTERY_EVENT_DISTRO that the channel "im a blisy ._." did to unlock Mystery Event without having to change the original rom. That's what i understood.
Here's the link to his video too:
If anyone knows how to add the Pokémon gift in this way, I would be grateful, or if you have another suggestion on how to do it, I would be immensely grateful.
I'm having trouble making giftpokemon in pokemon emerald.
I did the entire tutorial, added all the tools, I can do the make code, but the game says the following error: "This data can't be used in this version".
I used the rom MYSTERY_EVENT_DISTRO located by the channel "im a blisy ._." to unlock the MYSTERY EVENT in Pokémon Emerald. With the E-readers he made available, I was able to access some events he organized himself.
However, with the E-readers that I created using this tutorial, it gives this error "This data cannot be used in this version".
can anybody help me? I'm a bit new to programming, but I would really like to be able to hold my events on E-readers.
My intention is to do the events without having to change the original rom, so I used the rom MYSTERY_EVENT_DISTRO that the channel "im a blisy ._." did to unlock Mystery Event without having to change the original rom. That's what i understood.
Here's the link to his video too:
If anyone knows how to add the Pokémon gift in this way, I would be grateful, or if you have another suggestion on how to do it, I would be immensely grateful.
I had the same issue with giftpokemon but is actually really easy to fix:
1st:press shift + left click to open cmd inside the folder.
2nd: decompile the raw file with nedcenc into a bin file
3rd: open the .bin file with a hex editor and delete everything from the beginning to the part that says vpk0 and save it as another .bin
4th: decode that new .bin with nevpk and save it as a .z80
5th: open that .z80 with the hex editor and set the languaje of the card and game version to FF and save the .z80 (the ones in red are the ones that need to be edited) (i got that info from im a blisy's video so thanks to him)
5th: convert the edited .z80 with nedcmake and set the type to z80 and region to usa and save it as a raw.
now it works!!!
that take a lot of reading, trial and error to get to work
I made a loop to run it 1000 times and not once did it compile correctly on this particular machine, however on my main machine it works perfectly fine.
Not sure how many would actually be interested in this but I recently discovered an archived thread by Háčky and their disassembly of some e-Reader cards for Ruby & Sapphire, pokecarde.
The e-Reader functionality was inaccessible in Pokemon Emerald versions outside of Japan but is still within the code and can be enabled to accept eCards.
And with pokeemerald eTrainers can be customised further to have 6 pokemon and use expanded pokemon, moves and items.
The Eon Ticket eCard works as well and also can be customised to create event gifts.
I've been playing around with making custom eCards and thought I'd write a tutorial in case anyone else is interested.
1. Setting Up pokeemerald
I found out how to reactivate the e-Reader from CitrusBolt's Pokemon Heliodor and the translation is from Sierraffinity's CrystalDust, so big thanks to them!
1.1 Activating e-Reader functionality
This will show the Mystery Event option when Mystery Gift is unlocked. And also gives translations for the Japanese text.
Code changes here.
1.2 Removing region lock(Optional)
This is only necessary if you want to use eCards from different regions.
Code changes here.
2. Building eCards
Hatschky's original repository can be used for Ruby, Sapphire and our now modified Emerald, albeit with some differences (eg. Trainer classes won't be correct in Emerald).
But I have also made branches for Emerald, to fix the differences, and also for Rom Hacking Hideout's pokeemerald-expansion to allow for the expanded pokemon, attacks and items.
Extract them both and move them to the battle-e folder as well.
Now that's out of the way you can go to the battle-e directory using a command line tool (WSL works best, powershell causes some issues) and build them using
Code:
make
The eCards should then compile into .raw files!
To make the Eon Ticket copy the programs you extracted to pokecarde/battle-e to pokecarde/eonticket (rgbasm, rgblink, nedcmake, nevpk, nedclib.dll) and use the make command.
This builds an English and German version of the card.
How to use eCards
For them to work you need to have unlocked Mystery Gift in your save.
I've been able to get these cards working with VisualBoyAdvance-M v2.1.4. as well as mGBA.
Open up two instances of it and link them together by going Options>Link>Start Network Link…
Set one to being the server and the other the client and click connect.
Load up Emerald which can now access Mystery Events and load the other with the e-Reader gba file.
For the e-Reader go to File>e-Reader>Load Dot Code… and select one of the raw files we've just created.
In Emerald select Mystery Event on the starting screen and follow the prompts.
You can also print them off for use with a real e-Reader using CaitSith2's Nintendo eReader DotCode Printer. I haven't got an e-Reader myself so I haven't confirmed that custom eCards work.
3. Custom Cards
3.1 Customising eTrainers
Doing simple customisations of eTrainers is pretty straightforward. The data for each trainer is kept in battle-e/trainers. Just open one up in a text editor and you'll be greeted with this
Spoiler:
INCLUDE "trainers/macros.asm"
; The type of eCard
Battle_Trainer
BT_Level MOSSDEEP ; What Battle Tower level the trainer appears in 50=Lv50 100= Lv100, MOSSDEEP=0 (doesn't appear in Battle Tower)
Class POKEFAN_F ; Trainer class
BT_Floor MOSSDEEP ; Battle Tower floor they appear on MOSSDEEP=0 doesn't appear
Text_EN "ALANA"8 ; Trainer Name (limited to 7 characters, the 8th is 0xFF)
OT_ID 00000, 00000
; Easy chat words for the battle intro, winning and losing to the player (limited to 6 words each)
Intro_EN LET_S,START,THIS,_ELIP,BATTLE,_EX
Win_EN OH_,DID,I,_ELIP,WIN,_QU
Loss_EN OH_,DID,I,_ELIP,LOSE,_QU
; The pokemon data structure
Pokemon TORKOAL
Holds QUICK_CLAW
Moves OVERHEAT, BODY_SLAM, FLAIL, YAWN
Level 82
PP_Ups 0,0,0,0
EVs 0,0,0,0,255,255
OT_ID 00000, 00000
IVs 15,15,15,15,31,31, TORKOAL_WHITE_SMOKE ;IVs and the pokemon's ability
PV $000000D9 ; Determines gender, nature and shininess, this torkoal is ♂ Quiet
Text_EN "TORKOAL"11 ; Pokemon name, limited to 10 characters
Friendship 255
You're able to change the trainer's name and class and pretty much everything about their pokemon.
In the constants folder there's text documents that list all the variables that are possible for making pokemon.
I've created a natures.asm file there so you don't need to memorise what PID will create what nature, gender or shininess (shininess works only if you leave the Trainer ID and SID as 00000).
In addition, pokemon can only have valid abilities but anything goes for their moves.
As you may have seen each eCard is compiled to a file starting with 08-A and then a number. These codes refer to a specific eCard which can be seen here on bulbapedia.
If you don't want to modify and replace one of the existing cards you'll need to create a new file in battle-e/ that follows this code pattern (eg. 08-A049.asm). Inside this file write something like this:
Code:
INCLUDE "../macros.asm"
CLASS EQUS "beauty"
TRAINER EQUS "cynthia"
INCLUDE "battletrainer-{REGION_NAME}.tx"
The class determines what image the eCard will display on the e-Reader. The images can be found in battle-e/sprites/trainers and they all use the palette battle-e/sprites/battletrainer5.pal.
The TRAINER variable should just be the name of your new trainer file that you'll put in battle-e/trainers.
Inside the Makefile you'll need to add the code to SERIES_1_NUMS and the name to SERIES_1_TRAINERS.
3.2 Further Customisation
6 Pokemon
Thanks to pokeemerald we can go even further with our customisation
Normally each eTrainer just has 3 pokemon but we can expand that to 6!
Both pokeemerald and pokecarde need to be edited for this to work.
Adding 3 new pokemon requires 132 more bytes of space in Saveblock2 but this wiki tutorial by hjk321 should give us enough.
Code change here.
Pokecarde needs to have the location of the checksum changed so it doesn't overwrite the new pokemon.
Code change here.
And there you go, you can now create eTrainers with 6 pokemon.
Each trainer must have data for 6 pokemon but If you want to use less, like 4 pokemon, just replace pokemon names with SPECIES_NULL or 0.
Hidden Abilities
If your hack has hidden abilities you can make use of them by changing one thing in pokecarde.
Code change here.
You can then use ABILITY3 or ABILITY_HIDDEN to assign hidden abilities to pokemon.
3.3 Customising Scripting Cards (Eon Ticket)
The Eon Ticket event card can be created in the eonticket folder, and the eonticket.asm file can be modified to send over different items and text. The most important parts to know are
Code:
db 8,1 ; Petalburg Gym
db 1 ; Norman
These lines give the map number and object ID to initiate the event script when spoken to, in this case Norman in Petalburg Gym. Pretty much any object can be chosen for this.
Code:
db 30 ; distribution limit from English release
this line allows the chosen item to be shared with other players using mix records and states how many times that can happen.
Code:
NormanScriptStart:
Here is the script Norman will use when spoken to, it deletes itself when it successfully gives the player the eon ticket.
Code:
PreloadScriptStart:
This script does several checks to make sure the player hasn't already received the eon ticket.
As an example I've customised eonticket.asm to give the character the Old Sea Map
Spoiler:
INCLUDE "../macros.asm"
INCLUDE "../constants/items_expansion.asm"
INCLUDE "../constants/scriptcommands.asm"
DataStart:
db IN_GAME_SCRIPT
db 15,3 ; Sootopolis PokeCentre 2F ; Map of object
db 4 ; Delivery Man ; Object ID
GBAPTR EventScriptStart
GBAPTR EventScriptEnd
db MIX_RECORDS_ITEM
db 1 ; ???
IF REGION == REGION_DE
db 5 ; distribution limit from German debug ROM
ELSE
db 30 ; distribution limit from English release
ENDC
dw OLD_SEA_MAP
db PRELOAD_SCRIPT
GBAPTR PreloadScriptStart
db END_OF_CHUNKS
GetYourGift:
Text_DE "Lauf und besuche deinen Vater in der\n"
Text_DE "ARENA von BLÜTENBURG CITY.@"
Text_EN "Pick up your gift at a Pokémon\n" ; This text appears immediately after receiving the gift from the e-Reader
Text_EN "Center.@"
; Start of the script we want the object to use
EventScriptStart:
setvirtualaddress EventScriptStart
; Checks to make sure we haven't already got Old Sea Map
checkitem OLD_SEA_MAP, 1
compare LASTRESULT, 1
virtualgotoif 1, .delete_script
checkpcitem OLD_SEA_MAP, 1
compare LASTRESULT, 1
virtualgotoif 1, .delete_script
checkflag $013C
virtualgotoif 1, .delete_script
copyvarifnotzero $8000, OLD_SEA_MAP ; Item to give
copyvarifnotzero $8001, 1 ; Amount to give
callstd 0 ; This is giveitem
setflag $013C ; set FLAG_RECEIVED_OLD_SEA_MAP
setvar $403F, 0 ; We want the delivery man to disappear after giving us a gift
virtualmsgbox AppearsToBeAFerryTicket
waitmsg
waitkeypress
release
.delete_script
killscript ; deletes the script
NoRoomToGive:
virtualmsgbox KeyItemsPocketIsFull
waitmsg
waitkeypress
release
end
GoodToSeeYou:
Text_EN "Thank you for using the Mystery\n"
Text_EN "Event System.\p"
Text_EN "You must be \v1.\n"
Text_EN "There is a ticket here for you.@"
Text_DE "VATER: \v1! Schön, dich zu sehen!\n"
Text_DE "Hier ist ein Brief für dich, \v1.@"
AppearsToBeAFerryTicket:
Text_EN "It appears to be for use at the\n"
Text_EN "Lilycove City port.\p"
Text_EN "Why not give it a try and see what\n"
Text_EN "it is about?@"
Text_DE "VATER: Ich bin mir nicht sicher, es\n"
Text_DE "könnte ein TICKET für eine Fähre sein.\p"
Text_DE "Du solltest nach SEEGRASULB CITY gehen\n"
Text_DE "und dich dort genauer erkundigen.@"
KeyItemsPocketIsFull:
Text_EN "The Key Items Pocket in your Bag\n"
Text_EN "is full.\p"
Text_EN "Move some key items for safekeeping\n"
Text_EN "in your PC then come see me.@"
Text_DE "VATER: \v1, die BASIS-TASCHE\n"
Text_DE "deines BEUTELS ist voll.\p"
Text_DE "Lagere einige deiner Basis-Items in\n"
Text_DE "deinem PC und komm dann wieder.@"
setvar $403F, 1 ; Make delivery man appear
virtualloadpointer GetYourGift
setbyte 2
end
.ineligible
virtualloadpointer MayBeplayedOnlyOnce
setbyte 3
end
.no_room
virtualloadpointer BagsKeyItemsPocketFull
setbyte 3
end
MayBeplayedOnlyOnce:
Text_ES "Este evento solo se puede jugar una vez."
Text_DE "Dieses GESCHEHEN kann nur einmal\n"
Text_DE "se reproducirá.@"
BolsasArtículos ClaveBolsilloCompleto:
Texto_ES "El bolsillo para artículos clave de tu bolso está lleno."
Text_DE "Deine BASIS-TASCHE ist voll.@"
Datos finales:
fin de año
[/REVELACIÓN]
Hacemos que el repartidor en el segundo piso del PokeCenter aparezca configurando var 0x403F a 1 usando la eCard y hacemos que el de Sootopolis te dé el Mapa del Mar Antiguo, pero ¿qué pasa si queremos que todos los repartidores te lo den (porque en su lugar te darán el Boleto Eon)?
No podemos hacer nada al respecto en la tarjeta electrónica, pero podemos cambiar algún código en pokeemerald para permitirlo.
El código cambia aquí .
gotoram va al script que envió la tarjeta electrónica, pero primero verifica si hay una wondercard válida y dado que no estamos usando wondercards, evitamos esa verificación.
3.4 Personalización de tarjetas de cinta
En la carpeta de cintas puedes crear tarjetas electrónicas que le den una cinta a cada uno de los miembros de tu grupo. Nuevamente copia rgbds y las herramientas de CaitSith2 en esta carpeta y usa make para compilar.
Aquí sólo hay dos líneas de interés:
[CÓDIGO]db MARINE_RIBBON ; Cinta Marina
db $01 ; descripción $01=CINTA DE CAMPEÓN DEL TORNEO REGIONAL 2003[/CÓDIGO]
La primera línea es el tipo de cinta que se puede encontrar en constants/ribbons.asm.
La segunda es la descripción de la cinta donde los valores se pueden encontrar en bulbapedia, donde 0x01 es la descripción inicial de la lista.
Ahora tú también puedes ser campeón del mundo.
3.5 Personalización de tarjetas de regalo de Pokémon
En la carpeta giftpokemon puedes crear tarjetas electrónicas que le den un pokemon al jugador, siempre que el grupo no esté completo. Copia nuevamente rgbds y las herramientas de CaitSith2 en esta carpeta y usa make para compilar.
Edita el archivo giftpokemon.asm para cambiar el Pokémon por el que desees.
El Pokémon sigue la estructura de 100 bytes en el juego que puedes ver en Bulbapedia , pero espero que mis comentarios proporcionen suficiente información para la personalización básica.
¡Asegúrate de hacer una copia de seguridad de tus partidas guardadas cuando pruebes esto en caso de que cometas un error!
3.6 Personalización de la tarjeta de decoración Regi
Hay una tarjeta electrónica específica de Japón que le da al jugador las muñecas Regi para usarlas para decorar.
Lo destacable de esta tarjeta es que hay un menú que te permite seleccionar la muñeca que quieres.
Es (relativamente) fácil cambiar todas las comprobaciones de región para enviarlas a juegos en inglés, pero el texto se desordena y no se ve bien.
Así que decidí desmontarlo, lo que te permite cambiar el texto a inglés pero también editar todo, como qué elementos enviar.
De hecho, ya he traducido todo el texto al inglés para tu comodidad.
Los archivos 08-O000.asm contienen las instrucciones asm para todo lo relacionado con el lector electrónico, es decir, elementos como el texto, los gráficos y el menú que aparecen en el lector electrónico.
Los archivos decoration.asm contienen los scripts que se envían y se ejecutan en el juego, es decir, el script que le da al jugador el elemento elegido.
He proporcionado un ejemplo editado (08-O002.asm y decoration-tickets.asm, solo Emerald, no R/S) que le brinda algunas entradas para eventos.
Recomiendo editar esta versión porque la tarjeta original usa una paleta que se comparte con las 3 muñecas Regi, así que modifiqué el código para usar la paleta correcta para cada artículo.
Cosas a tener en cuenta:
Los scripts en el archivo decoration.asm deben tener la misma longitud para los tres scripts. Si tienes scripts más cortos, puedes rellenarlos con cero bytes (db $00). De lo contrario, no estás limitado a enviar elementos, sino que también deberías poder enviar Pokémon o hacer cosas como configurar banderas.
Si edita estos elementos, deberá realizar algunos cambios manuales en el código. Primero deberá crear la sección de decoraciones siguiendo las siguientes instrucciones
Spoiler:
python ../scripts/regionalize.py decoration-tickets.asm decoration-tickets-ES.tx ES ES
./rgbasm -o entradas-decoracion-ES.o entradas-decoracion-ES.tx
./rgblink -o entradas-decoracion-ES.gbc entradas-decoracion-ES.o
python ../scripts/stripgbc.py decoración-tickets-ES.gbc decoración-tickets-ES.bin
python ../scripts/checksum_regi.py decoración-tickets-ES.bin decoración-tickets-ES.mev
[/REVELACIÓN]
Luego, abre decoration-tickets-EN.bin en un editor hexadecimal y busca el inicio de los 3 scripts diferentes (uno siempre está en 0x0000). Comienzan con
Code:
01 00 00 00 02 02
Toma nota de su posición y agrégales 0x170. Luego, en 08-O001.asm cerca del inicio hay una sección llamada DataPointers, intercambia los bytes de la primera y la segunda posición y reemplaza lo que esté allí. Por ejemplo, si un script comienza en 0x110, agrega 0x170 para obtener 0x280 e intercambia los dos bytes para obtener 0x80 y 0x2. Pónlos como db $80,$02.
He puesto comentarios en los archivos para etiquetar cosas como texto y gráficos y lo que creo que hacen un par de funciones.
Si alguna vez has creado Pokeemerald, puedes usar los sprites de 4bpp que crea y los archivos gbapal para esto. Recomiendo no usar sprites de más de 32x32 píxeles porque son bastante grandes y puedes terminar necesitando deslizar 6 o más tiras para iniciar el programa eReader (pero puedes hacerlo si realmente lo deseas).
Los tres sprites deben tener el mismo tamaño y, si cambia su tamaño, se deben modificar 2 bytes en 08-O001.asm para definir su tamaño.
Probablemente me he olvidado de algo, así que pídeme ayuda si te quedas atascado.
Hay más tipos de tarjetas electrónicas, pero aún no los he investigado, así que eso es todo por ahora.
En general, puede que esto no tenga mucho valor, pero creo que es algo interesante con lo que jugar.
Sería posible hacer cosas como cambiar el campeón del E4 cada cierto tiempo con una nueva tarjeta y es una forma novedosa de implementar cambios y eventos, ¡especialmente si imprimes las tarjetas y usas hardware real!
Actualizaciones
Se agregaron los entrenadores Battle-e Series 2 a todas las ramas.
Se agregó la tarjeta de decoración Regi.
Crédito
Háčky/Hatschky por su publicación y desmontaje
CitrusBolt para su código de activación de e-Reader
Traducciones de Sierraffinity para lectores electrónicos
hjk321 por su tutorial de ahorro de espacio
CaitSith2 para sus programas nvpktool, nedcmake y nedcprint
Todos los que trabajaron en rgbds
Not sure how many would actually be interested in this but I recently discovered an archived thread by Háčky and their disassembly of some e-Reader cards for Ruby & Sapphire, pokecarde.
The e-Reader functionality was inaccessible in Pokemon Emerald versions outside of Japan but is still within the code and can be enabled to accept eCards.
And with pokeemerald eTrainers can be customised further to have 6 pokemon and use expanded pokemon, moves and items.
The Eon Ticket eCard works as well and also can be customised to create event gifts.
I've been playing around with making custom eCards and thought I'd write a tutorial in case anyone else is interested.
1. Setting Up pokeemerald
I found out how to reactivate the e-Reader from CitrusBolt's Pokemon Heliodor and the translation is from Sierraffinity's CrystalDust, so big thanks to them!
1.1 Activating e-Reader functionality
This will show the Mystery Event option when Mystery Gift is unlocked. And also gives translations for the Japanese text.
Code changes here.
1.2 Removing region lock(Optional)
This is only necessary if you want to use eCards from different regions.
Code changes here.
2. Building eCards
Hatschky's original repository can be used for Ruby, Sapphire and our now modified Emerald, albeit with some differences (eg. Trainer classes won't be correct in Emerald).
But I have also made branches for Emerald, to fix the differences, and also for Rom Hacking Hideout's pokeemerald-expansion to allow for the expanded pokemon, attacks and items.
Extract them both and move them to the battle-e folder as well.
Now that's out of the way you can go to the battle-e directory using a command line tool (WSL works best, powershell causes some issues) and build them using
Code:
make
The eCards should then compile into .raw files!
To make the Eon Ticket copy the programs you extracted to pokecarde/battle-e to pokecarde/eonticket (rgbasm, rgblink, nedcmake, nevpk, nedclib.dll) and use the make command.
This builds an English and German version of the card.
How to use eCards
For them to work you need to have unlocked Mystery Gift in your save.
I've been able to get these cards working with VisualBoyAdvance-M v2.1.4. as well as mGBA.
Open up two instances of it and link them together by going Options>Link>Start Network Link…
Set one to being the server and the other the client and click connect.
Load up Emerald which can now access Mystery Events and load the other with the e-Reader gba file.
For the e-Reader go to File>e-Reader>Load Dot Code… and select one of the raw files we've just created.
In Emerald select Mystery Event on the starting screen and follow the prompts.
You can also print them off for use with a real e-Reader using CaitSith2's Nintendo eReader DotCode Printer. I haven't got an e-Reader myself so I haven't confirmed that custom eCards work.
3. Custom Cards
3.1 Customising eTrainers
Doing simple customisations of eTrainers is pretty straightforward. The data for each trainer is kept in battle-e/trainers. Just open one up in a text editor and you'll be greeted with this
Spoiler:
INCLUDE "trainers/macros.asm"
; The type of eCard
Battle_Trainer
BT_Level MOSSDEEP ; What Battle Tower level the trainer appears in 50=Lv50 100= Lv100, MOSSDEEP=0 (doesn't appear in Battle Tower)
Class POKEFAN_F ; Trainer class
BT_Floor MOSSDEEP ; Battle Tower floor they appear on MOSSDEEP=0 doesn't appear
Text_EN "ALANA"8 ; Trainer Name (limited to 7 characters, the 8th is 0xFF)
OT_ID 00000, 00000
; Easy chat words for the battle intro, winning and losing to the player (limited to 6 words each)
Intro_EN LET_S,START,THIS,_ELIP,BATTLE,_EX
Win_EN OH_,DID,I,_ELIP,WIN,_QU
Loss_EN OH_,DID,I,_ELIP,LOSE,_QU
; The pokemon data structure
Pokemon TORKOAL
Holds QUICK_CLAW
Moves OVERHEAT, BODY_SLAM, FLAIL, YAWN
Level 82
PP_Ups 0,0,0,0
EVs 0,0,0,0,255,255
OT_ID 00000, 00000
IVs 15,15,15,15,31,31, TORKOAL_WHITE_SMOKE ;IVs and the pokemon's ability
PV $000000D9 ; Determines gender, nature and shininess, this torkoal is ♂ Quiet
Text_EN "TORKOAL"11 ; Pokemon name, limited to 10 characters
Friendship 255
You're able to change the trainer's name and class and pretty much everything about their pokemon.
In the constants folder there's text documents that list all the variables that are possible for making pokemon.
I've created a natures.asm file there so you don't need to memorise what PID will create what nature, gender or shininess (shininess works only if you leave the Trainer ID and SID as 00000).
In addition, pokemon can only have valid abilities but anything goes for their moves.
As you may have seen each eCard is compiled to a file starting with 08-A and then a number. These codes refer to a specific eCard which can be seen here on bulbapedia.
If you don't want to modify and replace one of the existing cards you'll need to create a new file in battle-e/ that follows this code pattern (eg. 08-A049.asm). Inside this file write something like this:
Code:
INCLUDE "../macros.asm"
CLASS EQUS "beauty"
TRAINER EQUS "cynthia"
INCLUDE "battletrainer-{REGION_NAME}.tx"
The class determines what image the eCard will display on the e-Reader. The images can be found in battle-e/sprites/trainers and they all use the palette battle-e/sprites/battletrainer5.pal.
The TRAINER variable should just be the name of your new trainer file that you'll put in battle-e/trainers.
Inside the Makefile you'll need to add the code to SERIES_1_NUMS and the name to SERIES_1_TRAINERS.
3.2 Further Customisation
6 Pokemon
Thanks to pokeemerald we can go even further with our customisation
Normally each eTrainer just has 3 pokemon but we can expand that to 6!
Both pokeemerald and pokecarde need to be edited for this to work.
Adding 3 new pokemon requires 132 more bytes of space in Saveblock2 but this wiki tutorial by hjk321 should give us enough.
Code change here.
Pokecarde needs to have the location of the checksum changed so it doesn't overwrite the new pokemon.
Code change here.
And there you go, you can now create eTrainers with 6 pokemon.
Each trainer must have data for 6 pokemon but If you want to use less, like 4 pokemon, just replace pokemon names with SPECIES_NULL or 0.
Hidden Abilities
If your hack has hidden abilities you can make use of them by changing one thing in pokecarde.
Code change here.
You can then use ABILITY3 or ABILITY_HIDDEN to assign hidden abilities to pokemon.
3.3 Customising Scripting Cards (Eon Ticket)
The Eon Ticket event card can be created in the eonticket folder, and the eonticket.asm file can be modified to send over different items and text. The most important parts to know are
Code:
db 8,1 ; Petalburg Gym
db 1 ; Norman
These lines give the map number and object ID to initiate the event script when spoken to, in this case Norman in Petalburg Gym. Pretty much any object can be chosen for this.
Code:
db 30 ; distribution limit from English release
this line allows the chosen item to be shared with other players using mix records and states how many times that can happen.
Code:
NormanScriptStart:
Here is the script Norman will use when spoken to, it deletes itself when it successfully gives the player the eon ticket.
Code:
PreloadScriptStart:
This script does several checks to make sure the player hasn't already received the eon ticket.
As an example I've customised eonticket.asm to give the character the Old Sea Map
Spoiler:
INCLUDE "../macros.asm"
INCLUDE "../constants/items_expansion.asm"
INCLUDE "../constants/scriptcommands.asm"
DataStart:
db IN_GAME_SCRIPT
db 15,3 ; Sootopolis PokeCentre 2F ; Map of object
db 4 ; Delivery Man ; Object ID
GBAPTR EventScriptStart
GBAPTR EventScriptEnd
db MIX_RECORDS_ITEM
db 1 ; ???
IF REGION == REGION_DE
db 5 ; distribution limit from German debug ROM
ELSE
db 30 ; distribution limit from English release
ENDC
dw OLD_SEA_MAP
db PRELOAD_SCRIPT
GBAPTR PreloadScriptStart
db END_OF_CHUNKS
GetYourGift:
Text_DE "Lauf und besuche deinen Vater in der\n"
Text_DE "ARENA von BLÜTENBURG CITY.@"
Text_EN "Pick up your gift at a Pokémon\n" ; This text appears immediately after receiving the gift from the e-Reader
Text_EN "Center.@"
; Start of the script we want the object to use
EventScriptStart:
setvirtualaddress EventScriptStart
; Checks to make sure we haven't already got Old Sea Map
checkitem OLD_SEA_MAP, 1
compare LASTRESULT, 1
virtualgotoif 1, .delete_script
checkpcitem OLD_SEA_MAP, 1
compare LASTRESULT, 1
virtualgotoif 1, .delete_script
checkflag $013C
virtualgotoif 1, .delete_script
copyvarifnotzero $8000, OLD_SEA_MAP ; Item to give
copyvarifnotzero $8001, 1 ; Amount to give
callstd 0 ; This is giveitem
setflag $013C ; set FLAG_RECEIVED_OLD_SEA_MAP
setvar $403F, 0 ; We want the delivery man to disappear after giving us a gift
virtualmsgbox AppearsToBeAFerryTicket
waitmsg
waitkeypress
release
.delete_script
killscript ; deletes the script
NoRoomToGive:
virtualmsgbox KeyItemsPocketIsFull
waitmsg
waitkeypress
release
end
GoodToSeeYou:
Text_EN "Thank you for using the Mystery\n"
Text_EN "Event System.\p"
Text_EN "You must be \v1.\n"
Text_EN "There is a ticket here for you.@"
Text_DE "VATER: \v1! Schön, dich zu sehen!\n"
Text_DE "Hier ist ein Brief für dich, \v1.@"
AppearsToBeAFerryTicket:
Text_EN "It appears to be for use at the\n"
Text_EN "Lilycove City port.\p"
Text_EN "Why not give it a try and see what\n"
Text_EN "it is about?@"
Text_DE "VATER: Ich bin mir nicht sicher, es\n"
Text_DE "könnte ein TICKET für eine Fähre sein.\p"
Text_DE "Du solltest nach SEEGRASULB CITY gehen\n"
Text_DE "und dich dort genauer erkundigen.@"
KeyItemsPocketIsFull:
Text_EN "The Key Items Pocket in your Bag\n"
Text_EN "is full.\p"
Text_EN "Move some key items for safekeeping\n"
Text_EN "in your PC then come see me.@"
Text_DE "VATER: \v1, die BASIS-TASCHE\n"
Text_DE "deines BEUTELS ist voll.\p"
Text_DE "Lagere einige deiner Basis-Items in\n"
Text_DE "deinem PC und komm dann wieder.@"
setvar $403F, 1 ; Make delivery man appear
virtualloadpointer GetYourGift
setbyte 2
end
.ineligible
virtualloadpointer MayBeplayedOnlyOnce
setbyte 3
end
.no_room
virtualloadpointer BagsKeyItemsPocketFull
setbyte 3
end
MayBeplayedOnlyOnce:
Text_EN "This Event may be played only once.@"
Text_DE "Dieses GESCHEHEN kann nur einmal\n"
Text_DE "gespielt werden.@"
BagsKeyItemsPocketFull:
Text_EN "Your Bag's Key Items Pocket is full.@"
Text_DE "Deine BASIS-TASCHE ist voll.@"
DataEnd:
EOF
We make the delivery man on the 2nd floor of the PokeCenter appear by setting var 0x403F to 1 using the eCard and make the one in Sootopolis give you the Old Sea Map, but what if we want all the delivery men to give you it (because they will instead give you the Eon Ticket).
We can't do anything about that in the eCard but we can change some code in pokeemerald to allow for it.
Code changes here.
gotoram goes to the script that the eCard sent over, but it does check first if there's a valid wondercard and since we're not using wondercards we circumvented that check.
3.4 Customising Ribbon Cards
In the ribbons folder you can make eCards that give a ribbon to each of your party members. Once again copy rgbds and CaitSith2's tools to this folder and use make to compile.
There are only 2 lines of note here:
Code:
db MARINE_RIBBON ; Marine Ribbon
db $01 ; description $01=2003 REGIONAL TOURNEY CHAMPION RIBBON
The first line is the ribbon type which can be found in constants/ribbons.asm.
The second is the ribbon description where the values can be found on bulbapedia where 0x01 is the starting description on the list.
Now you too can be world champ.
3.5 Customising Gift Pokemon Cards
In the giftpokemon folder you can create eCards that give a pokemon to the player, providing the party isn't full. Once again copy rgbds and CaitSith2's tools to this folder and use make to compile.
Edit the giftpokemon.asm file to change the pokemon to whatever you'd like.
The pokemon follows the 100-byte structure in the game which you can see on Bulbapedia but hopefully my comments provide enough info for basic customisation.
Make sure to back up your save when testing this one out in case you make a Bad Egg!
3.6 Customising The Regi Decoration Card
There's a Japan specific eCard that gives the player the Regi Dolls to use for decorating.
What's notable about this card is there's actually a menu that let's you select which doll you want.
It's (relatively) easy to change all the region checks to get it to send to English games but the text gets all messed up and doesn't look nice.
So I decided to disassemble it which allows you to change the text to English but also edit everything out, like what items to send over.
I've actually already translated all the text to English for your convenience
The 08-O000.asm files contain the asm instructions for everything on the eReader side of things, so things like the text, graphics, menu that shows up on the eReader.
The decoration.asm files contain the scripts that are sent to and are run on the game, so the script that gives the player the chosen item.
I have provided an edited example (08-O002.asm and decoration-tickets.asm, Emerald only not R/S) that gives you some event tickets.
I recommend editing this version because the original card uses one palette that's shared with all 3 Regi Dolls so I've modified the code to use the correct palette for each item.
Things to note:
The scripts in the decoration.asm file need to be the same length for all three scripts, if you have scripts that are shorter you can pad them out with zero bytes (db $00). Otherwise you're not limited to sending items but should be able to send over pokemon as well or doing things like setting flags.
If editing these there are some manual changes that are needed for the code. You'll need to create the decorations section first using the following instructions
Then open decoration-tickets-EN.bin in a hex editor and find the start of the 3 different scripts (one is always at 0x0000). They start with
Code:
01 00 00 00 02 02
Take note of their position and add 0x170 to them. Then in 08-O001.asm near the start there's a section called DataPointers, swap the first and second position bytes and replace what's there. Eg. if a script start at 0x110, add 0x170 to get 0x280 and swap the two bytes to get 0x80 and 0x2. Put them in as db $80,$02.
I've put comments in the files to tag things like text and graphics and what I think a couple of the functions do.
If you've ever made pokeemerald you can use the 4bpp sprites it makes and the gbapal files for this. I recommend not using sprites over 32x32 pixels because they're quite large and you can end up needing to swipe in 6 or more strips to start the eReader program (but you can if you really, really want).
All 3 sprites need to be the same size and if you do change their size 2 bytes need to be modified in 08-O001.asm to define their size.
I've probably forgotten something so ask me for help if you get stuck.
There are more types of eCards but I haven't looked into them yet so that's it for now.
All in all this might not have too much value but I just think it's a neat thing to play around with.
It would be possible to do things like changing the champion of the E4 every so often with a new card and it's a novel way to implement changes and events, especially if you print out the cards and use actual hardware!
Updates
Added the Battle-e Series 2 trainers to all branches
Added the Regi Decoration card
Credit
Háčky/Hatschky for their post and disassembly
CitrusBolt for their e-Reader activation code
Sierraffinity for the e-Reader translations
hjk321 for their save space tutorial
CaitSith2 for their programs nvpktool, nedcmake and nedcprint
Everyone who worked on rgbds
Hi paccy, I'm trying to build my own trainer card but I need some help, it's my first time doing it and I don't know how to convert my e card into .raw, I try typing make in the cmd and it doesn't work, do I need to install other programmes?