I have modified and enhanced azurile13's (credits and kudos to him) routine to make this supported on the Compiler's THUMB.bat. These are the things I modified:
Added routines creating the hooks that are to be copy-pasted on their respective locations. There are 11 hooks.
Added the master location of the routine in which the hooks will create locations for those routines. Insert your free space on .equ MyLoc. Format: 0x###### (Hexadecimal Number)
This works really well, so I thank all of you that contributed to making this.
I have a question if it's possible to modify this so that in the Search Modes (Alphabetical, Type, etc.) it's able to display the Pokemon added to the regional dex. It only appears to still display only the original 151 in those Modes.
This works really well, so I thank all of you that contributed to making this.
I have a question if it's possible to modify this so that in the Search Modes (Alphabetical, Type, etc.) it's able to display the Pokemon added to the regional dex. It only appears to still display only the original 151 in those Modes.
EDIT: I have tried to compile all these to my THUMB Assembler but I got no luck because the code is too many that the compiler can't manage to assemble lol. Is there anyway I can compile it? I tried CMD and what I always get is error... tried piece-by-piece assembly but still the compiler can't process it.
Slr, it is now I saw this. Yes. Those are in their actual index number. If you have custom index list, then of course you have to change it on your own. I just followed the index numbers based on MrDollSteak's and thedarkdragon's sprites. Forms actually work through different indexes such as Rotom with an exception of Castform (also Cherrim and Aegislash?). They just need to have same Pokedex slot.
Can you also get which lines are getting the error? This vanilla modified coding of mine works well. PM me if you have errors rather than discussing it here.
You can also modify and expand those. Check this post:
To clarify, it seems if the National Dex flag is set, it allows all Pokemon to display in the Search Modes which makes sense. Before it is set, only the 151 are able to be seen.
I haven't added any new Pokemon yet so I don't think I need to expand, but I have made it so that Gen 2 related Pokemon appear with their families in the regional dex.
The order isn't what I want to edit, but just the trigger for displaying Pokemon that get added to the regional dex. It seems there is only one pointer to each table as well so there's probably something that changes what gets displayed based on the National Dex flag.
Slr, it is now I saw this. Yes. Those are in their actual index number. If you have custom index list, then of course you have to change it on your own. I just followed the index numbers based on MrDollSteak's and thedarkdragon's sprites. Forms actually work through different indexes such as Rotom with an exception of Castform (also Cherrim and Aegislash?). They just need to have same Pokedex slot.
Can you also get which lines are getting the error? This vanilla modified coding of mine works well. PM me if you have errors rather than discussing it here.
Edit: I've adapted these new routines for emerald and they work a goddamn treat!
I got all the offsets I'm using from the .map file of the pokeemerald disassembly (and from just searching for copies of the offsets spherical had found in a vanilla rom)
Here's what I've changed (in bold)::
Spoiler: Script
Code:
...
countpokemon
callasm ROUTINE_ONE+1
compare LASTRESULT 0x1
if 0x5 goto @snippet1
msgbox @string1 MSG_NORMAL
call @snippet2
callasm ROUTINE_TWO+1
bufferpartypokemon 0x0 0x0
bufferboxname 0x1 0x4036
goto @snippet4
//---------------
#org @snippet2
special 0xa2
waitstate
Compare 0x8004 0xff
if 0x1 goto @fail
special2 lastresult 0x149
compare lastresult 0x19c
if 0x1 goto 0x8209b46//name rater saying "now now that is merely an egg
return
//---------------
#org @fail
msgbox @string5 MSG_NORMAL
release
end
#org @string5
= Oh well, come back soon.
Thanks to DizzyEgg, Lunos and the EBEU team for the battle engine, features, dynamic expansion, and the mind-bogglingly excellent disassembly project, lu-ho for a-map, Gamer2020 for pge, about 5 different hex editors, especially HexEdit which didn't suck, Microsoft Windows for Task Manager, Chaos rush for sprites and an animation disable tutorial, Spherical Ice for several excellent asm routines, Neon Skylar for Pokemon data past gen 3, YAPE while it lasted, Scizz, Knizz, darthatron's numerous tools, hackmew, Chronosplit.
I've managed to adapt routine 2 for emerald, but routine 1 is still not checking for filled boxes correctly. Keeps coming back as fine when there isn't any space left. Which isn't really a huge issue, it's a very unlikely outlier case, but it's still not great.
Does this only happen with your Emerald port, or is it an issue with my routine too? Because I've just tested it in my ROM and it works properly with all 14 boxes being full or having less than 5 empty spaces (or however many it takes to empty the party).
Quote:
Originally Posted by luuma
Another thing I should mention is that you need a failsafe for special 0x9f/0xa2 in the .xse script in case the player presses B or cancels, or the routine will try to carry on while producing a bad egg. Include
Code:
Compare 0x8004 0xff
if 0x1 goto @fail
after the waitstate command
Yup, I myself noticed this when troubleshooting in my hack. Another edge case that is worth noting that you missed out is if the player selects an Egg: I'll update the FR script, and I assume an equivalent to special 0x147 exists in Emerald which you can use.
Does this only happen with your Emerald port, or is it an issue with my routine too?
Presumably just my emerald port, sorry to have bothered you. I'll give the asms in emerald a look this eve, I assumed FR 0x8BA18 was the same routine as EM 0xd1d30 because they were described in the same way in documentation, but I'm now realising I haven't even checked. Will take a look at the actual contents of the fr asm linked this eve and see if I can find anything similar in emerald
I'm guessing you've tried with e.g 2 pokemon in party needing depositing with 2 empty spaces cause besides that, I think thatcould be the only difference with how we tested. I'll try that myself too (would make little sense if that was the reason but still worth a look)
Thanks for spotting that I needed a failsafe for eggs! Emerald special is 0x149 iirc in this case, before I forget
Edit: I actually think I have a question for you!
Am i being dumb as hell or could I make routine 2 delete all pokemon but one by simply cutting out the one part that actively transfers to a pc box? my asm knowledge is appalling but I can just cut out
ldr r3, =(0x0806b490|1) @ pokemon_add_to_pc
right? the lines above are just lining up to use that routine on the correct pokemon, as far as i can tell
Thanks to DizzyEgg, Lunos and the EBEU team for the battle engine, features, dynamic expansion, and the mind-bogglingly excellent disassembly project, lu-ho for a-map, Gamer2020 for pge, about 5 different hex editors, especially HexEdit which didn't suck, Microsoft Windows for Task Manager, Chaos rush for sprites and an animation disable tutorial, Spherical Ice for several excellent asm routines, Neon Skylar for Pokemon data past gen 3, YAPE while it lasted, Scizz, Knizz, darthatron's numerous tools, hackmew, Chronosplit.
I actually think I have a question for you!
Am i being dumb as hell or could I make routine 2 delete all pokemon but one by simply cutting out the one part that actively transfers to a pc box? my asm knowledge is appalling but I can just cut out
ldr r3, =(0x0806b490|1) @ pokemon_add_to_pc
right? the lines above are just lining up to use that routine on the correct pokemon, as far as i can tell
Oh, my bad, I did some further testing and it does indeed not work properly. I can give rewriting it a go.
Oh, my bad, I did some further testing and it does indeed not work properly. I can give rewriting it a go.
As for your question, routine 2 is supposed to:
That would be awesome but it's not something I really need that much. I can just put it in as a bug report honestly. twelve years down the line we'll maybe see some poor soul on the wayback machine losing a high level pokemon to whatever trash they were ev grinding
Alright to get my deletion routine I've just changed cmp r6 #6 to cmp r6 #0. Not exactly efficient but it's a neat trick for anyone who wants all but their first mon to get deleted at some point (like I do).
Thanks to DizzyEgg, Lunos and the EBEU team for the battle engine, features, dynamic expansion, and the mind-bogglingly excellent disassembly project, lu-ho for a-map, Gamer2020 for pge, about 5 different hex editors, especially HexEdit which didn't suck, Microsoft Windows for Task Manager, Chaos rush for sprites and an animation disable tutorial, Spherical Ice for several excellent asm routines, Neon Skylar for Pokemon data past gen 3, YAPE while it lasted, Scizz, Knizz, darthatron's numerous tools, hackmew, Chronosplit.
That would be awesome but it's not something I really need that much. I can just put it in as a bug report honestly. twelve years down the line we'll maybe see some poor soul on the wayback machine losing a high level pokemon to whatever trash they were ev grinding
Alright to get my deletion routine I've just changed cmp r6 #6 to cmp r6 #0. Not exactly efficient but it's a neat trick for anyone who wants all but their first mon to get deleted at some point (like I do).
Many thanks for routine 2, it is a beaut!
I've rewritten routine 1 and it seems like it's working properly now, from the tests I've done.
Thanks to DizzyEgg, Lunos and the EBEU team for the battle engine, features, dynamic expansion, and the mind-bogglingly excellent disassembly project, lu-ho for a-map, Gamer2020 for pge, about 5 different hex editors, especially HexEdit which didn't suck, Microsoft Windows for Task Manager, Chaos rush for sprites and an animation disable tutorial, Spherical Ice for several excellent asm routines, Neon Skylar for Pokemon data past gen 3, YAPE while it lasted, Scizz, Knizz, darthatron's numerous tools, hackmew, Chronosplit.
I don't know if anyone here has already posted this one,
But i'm sure someone researched this and used it in their hack. (BTW It's Glazed if you don't know)
Credits to: TheCreatorofGlazed for the wonderful Idea, BluRose for the Initialization and Touched Sensei for everything else.
Here it is:
[FR] Text Display Input Routine
Basically what this do is get an input from user via naming_function and stores it somewhere in the ram then compare it to some string you can define.
Note: I'm not GOOD at ASM so don't judge me if i said something wrong or explained something wrong. Please point it out instead . It's just that those ones who I asked to help me are very GOOOOOOOOOOOOD at ASM.
Routine:
You can define your password by putting :
loadpointer 0 @password
before the callasm. (note: you can't set your password more than the max Characters in the Input or else it will fail)
#org @password
= yourpass (yes you treat it like a msgstring and also remember the note above)
and what does this do if the input matches your password?
it sets var 0x800D to 1
and if not ViceVersa
and also. instead of defining the password on your script , you can point it out at any address in the rom as long as it's a string that is not more than the max input char.
you can do that by changing the label real_password to the address of your password.
That's it .
and another one , You can also change the "Rival's Name" text or "PKMN name" if you found out how to do that . It'll be really helpful :)
This Routine can be used for many things not just for Password System. You can use it to name People in your game , It's up to you.
and also feel free to ask what is what :D
Hello everyone, I edited this routine to support the byte manipulation using vars so we don't have to shift bits just for us to use icon above 0xFF.
Spoiler:
Code:
.text
.align 2
main:
push {r4, lr}
sub sp, #8
ldr r0, var_8000 @set this to 0x1 or 0x2 for Pokemon_nicknaming and 0x4 for rival (if you change it to Rival im not sure if it will require additional args)
ldrb r0, [r0]
ldr r1, fcode_buffer
ldr r2, var_8001
ldrh r2, [r2]
mov r3, #0
mov r4, #0
str r4, [sp]
adr r4, continue
add r4, #1
str r4, [sp, #4]
ldr r4, display_text
bl call_via_r4
add sp, #8
pop {r4, pc}
.align 2
display_text: .word 0x0809d954|1
continue:
push {r4, lr}
ldr r0,fcode_buffer
ldr r1, real_password
ldr r1, [r1]
ldr r4, strcomp
bl call_via_r4
cmp r0, #0
beq matched
mov r0, #0
b return
matched:
mov r0, #1
return:
ldr r1, var_800D
strh r0, [r1]
ldr r4, =0x080568E0|1
bl call_via_r4
pop {r4, pc}
call_via_r4:
bx r4
.align 2
strcomp: .word 0x08008E28|1
fcode_buffer: .word 0x02021CE0
real_password:.word 0x03000EB0+0x64
var_800D: .word 0x020370D0
var_8000: .word 0x020370B8
var_8001: .word 0x020370BA
For Variable 0x8000:
set it to 3 if you want Pokemon icons to be used
set it to anything if you want other formats (do not use bytes above 0x04 if you haven't expanded the table yet)
For Variable 0x8001:
Set it to the index number of your desired Pokemon Icon.
Do not forget to add "waitstate" command after calling the ASM.
Doing this will save you some spaces as you don't have to make many routines if you are wanting for a multiple password formats.
I have modified and enhanced azurile13's (credits and kudos to him) routine to make this supported on the Compiler's THUMB.bat. These are the things I modified:
Added routines creating the hooks that are to be copy-pasted on their respective locations. There are 11 hooks.
Added the master location of the routine in which the hooks will create locations for those routines. Insert your free space on .equ MyLoc. Format: 0x###### (Hexadecimal Number)
Created and added a new index list of Pokémon up to Generation VI including the formes in style of KDS/Chacha Dinosaur from the filenames of MrDollSteak's sprites in his Sugimori and Gen VI threads. I think there is no master index list for Generation VII. If there is, please PM me and I will add those.
With the list created as stated above, you will just have to create your own Regional Pokédex by copy-pasting from your Excel and Notepad file to below "regional_dex_order" and .hword 0x0000 should be first in the list. Make sure the names are all CAPS-LOCKED. In case of Nidorans, Farfetch'd, Mr. Mime, Ho-Oh, Mime Jr., Porygon-Z, and Flabébé, their characters are changed so you'll have to look for them in the master list. NOTE: Cohagrigus have been filtered out and changed into asterisks (*). Remember to correct its name before generating the binary file otherwise the .asm file won't work.
So I have an addendum to this that allows for Pokémon in the custom regional dex to be seen in the Pokédex Search Modes.
It's a bit hacky, as it technically allows every Pokémon in the National Dex to be seen, so they'll be listed as No. 000 if using the the quoted custom regional dex routine. What it does is hijack the routine for loading each Pokédex Search Mode to increase the limit of the regional dex to 386 Pokémon like the National Dex mode routine does.
If anyone can improve it so that it allows for only custom regional dex Pokémon before getting the National Dex, please do so. My knowledge of ASM hacking is pretty limited, so this is the best I can do for now.
0x12EB54: 45 66 05 08
0x054A68: 3C 4C
0x054A6A: 20 68
0x054A6C: 00 49
0x054A6E: 01 E0
0x054A7E: 34 4E
0x054B3A: 00 00
0x054B3C: 00 00
0x054A70: REVERSED POINTER TO TEXT CONTAINING YOUR DEFAULT NAME (max 8 chars, last char must be 0)
EDIT: Despite what he says about last char having to be zero, I think its a typo for FF. The name's size limit is 7 bytes (chars) the last byte must be 0xFF (string terminator). If the name is less than 7 characters, pad the remaining characters with 0xFF.
Is there a way to set a pre-defined name for the Rival too though?
Because without something like that, this is what happens In-Game.
Edit: Updated 23/12/2015, the old routines had a few errors that I forgot to update after making changes to my ROM. I've also confirmed what bluefont should be in a vanilla ROM. Enjoy!
Correct?
Welp, I can't get more than 44 items.
This is the script that I'm trying, and all the items after Calcium are being omitted: https://pastebin.com/gK3UpwHA
EDIT: I also tried to put all the items after the Calcium in a separate script, but it's useless. I'm just not getting them.
The bag still ends at Calcium, the 44th item.
I think I'm screwing up somewhere, because I can't get this to work.
Basically, the process as you explain it Skelli is:
Correct?
Welp, I can't get more than 44 items.
This is the script that I'm trying, and all the items after Calcium are being omitted: https://pastebin.com/gK3UpwHA
EDIT: I also tried to put all the items after the Calcium in a separate script, but it's useless. I'm just not getting them.
The bag still ends at Calcium, the 44th item.
You need to use it in conjunction with this routine posted by Azurile13:
Isn't that the very first step that I described though?
I made a mistake in that post. Assemble the new routine, goto the offset in the routine, and copy what’s there in the .bin file to that offset in your rom.
I made a mistake in that post. Assemble the new routine, goto the offset in the routine, and copy what’s there in the .bin file to that offset in your rom.
So, what I have to put in 0x1083F4 now is basically:
10 B5 08 4C F1 20 A0 30 C0 00 FA F6 CD FB 20 60 00 28 06 D0 04 48 FA F6 C7 FB 60 60 00 28 00 D0 01 20 10 BD 18 AD 03 02 E3 11 00 00 ^ That is the routine that you just gave to me right here.
Then I go to 0x99E44 and Ctrl+B this:
10 49 0C 48 08 60 96 20 40 00 88 80 08 48 88 60 3C 20 08 73 08 48 08 61 1B 20 08 75 07 48 88 61 80 20 08 77 06 48 08 62 24 31 43 20 08 70 70 47 C0 59 02 02 D0 C6 03 02 3C 58 02 02 D0 C4 03 02 B0 58 02 02 8C 98 03 02
As you explained in this post.
And then it should be working?
Because it's not. The Items pocket of my bag is still capping at 44 items.
EDIT: Alright, we were able to solve the issue on Discord.
The procedure is simple and I'm gonna leave it right here in order to avoid any kind of confusion:
1) Compile the routine that Skeli posted right here and Ctrl+B it in 0x1083F4.
2) Compile this ASM Routine that he wrote and Ctrl+B it in 0x99E44.
3) Save and test, but make sure to start a new savefile. Old savefiles will not work.
And that's it.
This ASM hack is one for infinite use of the Elemental Hyper Beam tutor and I've made it so that all of the final starter evolutions have access to their respective ultimate moves just like in newer games as well. It isn't like the other tutors where you can just clear or never set a particular flag just by looking at the flags in the script and it also uses two routines to check for compatibility.
You can also change the move table name offset if you are using a custom one, but if you're just using the normal one then comment out the identified routines before compiling.
Also this clears the flags at 0x2DE, 0x2DF, and 0x2E0 which are set by special2 0x800D/LASTRESULT 0x1A4 after teaching each of the moves once allowing for infinite tutoring! This also doesn't set flag 0x2 which prevented you from teaching another move unless you exited the house and came back in again.
If there are any problems, questions, or improvements don't hesitate to reply to this message or PM me.
Find 0x49C bytes of free space at a word-aligned address, and take note of it.
Set the EV-reducing berries' Type to Type 1 ("Out of battle").
Set the items' Field script pointers to the address you noted, plus 1.
Set the items' Battle script pointer to 0xA2239.
Assemble the following routine, changing 0xXXXXXX to the address you noted (not plus 1).
Open the generated .bin file, navigate to the location address, and select 0x49C bytes.
Copy the bytes and paste them in your ROM, at the same address.