Binary Hack Research & DevelopmentGot a well-founded knack with your binary Pokémon hacks? Love reverse-engineering them? For the traditional Pokémon ROM hacker, this is the spot for polling and gathering your ideas, and then implementing them! Share your hypothesis, get ideas from others, and collaborate to create!
How about an ability to add overworld Pokemon abilities, such as rock smash, surf, fly, sweet scent, etc. For custom made moves such as "Future Sight" in the celebi movie where it's used to find time warps, but not limited to just this move, but to any move one would choose to have a custom script activated for it. (I feel like this may have already been implemented but can't find where at, though I know you can do it FBI Agent :D )
__________________
To steal ideas from one person is plagiarism; to steal from many is research.
How about an ability to add overworld Pokemon abilities, such as rock smash, surf, fly, sweet scent, etc. For custom made moves such as "Future Sight" in the celebi movie where it's used to find time warps, but not limited to just this move, but to any move one would choose to have a custom script activated for it. (I feel like this may have already been implemented but can't find where at, though I know you can do it FBI Agent :D )
This is done with a script that checks if a pokemon knows a move. In ultra violet version I used earthquake to clear some rocks...
The only issue is its not usable from the start menu (like fly or flash) u use it by 'talking' to the target (like surf cut or rocksmash). It would require asm to make them show in the pokemon menu.
Thanks for the requests, it keeps me having something to do. Though a few things I would like to mention. First of all the thread got a little rework, so I'm no longer really allowed to restrict the kinds of requests people ask in here anymore. However, I'm still not doing any battle script related, graphics related or non FireRed hacks because that's just my policy. You're welcome to ask anyways, maybe someone else will do them for you. :)
Quote:
Originally Posted by Sisyphean
I have had an idea for some time about creating a system where the levitate ability is not an ability but rather a toggle-able byte on each pokemon. For instance, one could feasibly create a Hydreigon with the ability intimidate that also has the benefits of levitate, (by virtue of the hack). It's always bothered me that I had to choose between giving pokemon that weren't flying-type like venomoth the ability levitate or a real ability.
I believe abilities as BS related. What you would need for something like this, is probably a bitmap showing which species of Pokemon "passively" have levitate. Though, sadly, because it is battle script related, I'm not going to be fulfilling this. Hopefully someone else jumps on and lends you a hand :)
Quote:
Originally Posted by KDS
A suggestion.
Hey how about implementing an Ability Capsule from Gen VI which helps you to toggle between the primary and secondary abilities of a mon in the overworld.
Hi, I'll look into this. If I end up needing to adjust the PID, it may end up a little much :x
Quote:
Originally Posted by Turtl3Skulll
How about an ability to add overworld Pokemon abilities, such as rock smash, surf, fly, sweet scent, etc. For custom made moves such as "Future Sight" in the celebi movie where it's used to find time warps, but not limited to just this move, but to any move one would choose to have a custom script activated for it. (I feel like this may have already been implemented but can't find where at, though I know you can do it FBI Agent :D )
Overworld abilities can be added by scripting. Try decompiling the script on a cut tree and you'll see what I mean :)
Quote:
Originally Posted by jiangzhengwenjzw
Errrr... Which one of the byte changes is about the bad egg?
Here:
Spoiler:
Quote:
To insert:
insert the following bytes at the following offsets:
0x2D496: E0 E0
0x40B36: 00 00 00 00 00
Quote:
Originally Posted by ThatOnePokeTrainer
To be able to see the enemy's hp in battle
That sounds like a cool addition, though I don't know how to make the number appear onto the HP bar. Maybe someone with graphical knowledge will jump in and help you on this one.
Quote:
Originally Posted by LocksmithArmy
This is done with a script that checks if a pokemon knows a move. In ultra violet version I used earthquake to clear some rocks...
The only issue is its not usable from the start menu (like fly or flash) u use it by 'talking' to the target (like surf cut or rocksmash). It would require asm to make them show in the pokemon menu.
Hi FBI! Just wanted to say THANK YOU SO MUCH for your help with calling a different event after snagging a Trainer's Pokémon! I now have a fully functioning script template I can reuse into infinity for loads of awesome snag battles. So yeah, that's awesome, and I couldn't have done it without you :)
...That sort of leads into my request, which I really hope is a quick'n'easy one - might there be a way to preserve the Original Trainer's name in the stats of a snagged Pokémon?
I know it seems like a small thing to be bothered about, but I just really like the idea of a player being able to look back at their party at various points during the game and see which Trainers they stole their team from. It'd make the whole thing a lot more personal and just plain cool - plus it doesn't make an awful lot of sense for the stats to display a different ID number with the Player's OT name. :) Um, as always, please don't bother with it this if it's not your thing, though :)
Along the same sort of lines, it'd be nice to be able to do the same thing with the givepokemon command. Hang on, I can explain this better:
1) Pokémon snagged in Trainer battles always have the Trainer's ID number but the Player's OT.
2) Pokémon given in scripts always have the Player's ID number and the Player's OT.
So essentially, what I'm asking is whether it's possible to retain the Trainer's OT in snagged Pokemon, and also whether it's possible to temporarily force the givepokemon command to encode a different ID number and Trainer's OT - for events where I want to show the Player 'stealing' a Pokémon without battling a Trainer.
Um, I know the second one might be harder because it has to deal with extra stuff like whether the Pokémon goes to the party, the PC or the boxes are full, so I'm really sorry if it sounds like I'm asking too much. But hey, if you don't ask you'll never know ;) so I figured I'd throw it out there just in case.
Thanks so much again, and mega-super-ultra-kudos on all the routines you've churned out since my last visit! Keep on rockin' :D
5: everytime you re-enter a route, all the trainer battles are reset(eg when you step in front of them they will challenge you again
Thanks in advance!
2 has already been done... id put it here but its not my work. Just search the forum for it. Real simple to insert.
5 can be done with a level script, just reset each trainer flag and battle flag on that map... this is nice cause u can do it for only certain maps (not every map)
So, wanting to do something similar to older Final Fantasy games, in which the game goes back to the title screen after your party falls, I dove into knizz's IDB and used a lot of trial and error to create this little feature. Let it be my first contribution to ASM hacking.
at offsets 0x7F5B6 and 0x7F5D0 to reset the game after displaying the "...player scurried <home/PC>" text.
Credits to FBI for the ASM, shinyquagsire for explaining what this is to me in layman's terms, as well as an improvement, and to knizz for his amazing IDB that helped me find these offsets.
This can be useful for nuzlocke hackers that wish to implement a Savegame delete function when a battle is lost, by simply making a different function, namely, a delete savefile function, and putting a pointer at those offsets instead of my reset code. It can also be useful as a way to create a "GAME OVER" screen of sorts (Just edit the text as necessary). I put those offsets as is because there's enough room for either a very small ASM routine, or a pointer to a location for a different routine in case you want to do more things.
Also, the reason there's two pointers for this is because there's two different cases I have to handle: One for heading back home after losing, and one for heading to the Pokémon Center. That should cover virtually all cases of loss, but I might have missed a few. If I did, let me know, and I'll find and edit in the additional offsets to modify.
I tried getting it to delete the save file and to return to the titlescreen afterwards, but I couldn't get a brief flash of the pokécenter to disappear. I might fix it later, but as for now, here's a much more simple version using SoftReset:
Code:
Type 5F F1 53 FC 00 DF at 0807F5B6 and F1 E7 at 0807F5D0.
Overworld abilities can be added by scripting. Try decompiling the script on a cut tree and you'll see what I mean :)
Sorry, I guess I wasn't as specific as I thought, I wanted the abilities to be accessible through the pokemon menu, such that I could call the move at any point rather than on signpost/person event.
I specifically mean like when you use fly from any place on a map, where it runs the animation and then the action happens, though as long as it runs to a script for the action, I don't necessarily need the animation
Actually I just though of a bunch more stuff after messing around my hack.
1: enemy pokemon to be able to have custom stats eg a ho-oh with 300 attack or a lugia with 500hp
Thanks in advance!
I'll look into doing number 1. The rest you've mentioned are already done, or in battle routines (which I don't like doing unless it's for something I want to do :3).
Quote:
Originally Posted by Vivacity
Hi FBI! Just wanted to say THANK YOU SO MUCH for your help with calling a different event after snagging a Trainer's Pokémon! I now have a fully functioning script template I can reuse into infinity for loads of awesome snag battles. So yeah, that's awesome, and I couldn't have done it without you :)
...That sort of leads into my request, which I really hope is a quick'n'easy one - might there be a way to preserve the Original Trainer's name in the stats of a snagged Pokémon?
I know it seems like a small thing to be bothered about, but I just really like the idea of a player being able to look back at their party at various points during the game and see which Trainers they stole their team from. It'd make the whole thing a lot more personal and just plain cool - plus it doesn't make an awful lot of sense for the stats to display a different ID number with the Player's OT name. :) Um, as always, please don't bother with it this if it's not your thing, though :)
Along the same sort of lines, it'd be nice to be able to do the same thing with the givepokemon command. Hang on, I can explain this better:
1) Pokémon snagged in Trainer battles always have the Trainer's ID number but the Player's OT.
2) Pokémon given in scripts always have the Player's ID number and the Player's OT.
So essentially, what I'm asking is whether it's possible to retain the Trainer's OT in snagged Pokemon, and also whether it's possible to temporarily force the givepokemon command to encode a different ID number and Trainer's OT - for events where I want to show the Player 'stealing' a Pokémon without battling a Trainer.
Um, I know the second one might be harder because it has to deal with extra stuff like whether the Pokémon goes to the party, the PC or the boxes are full, so I'm really sorry if it sounds like I'm asking too much. But hey, if you don't ask you'll never know ;) so I figured I'd throw it out there just in case.
Thanks so much again, and mega-super-ultra-kudos on all the routines you've churned out since my last visit! Keep on rockin' :D
I can do all of those. I'll put it on my list (I've got quite a few things I'm doing atm :X).
Quote:
Originally Posted by LocksmithArmy
2 has already been done... id put it here but its not my work. Just search the forum for it. Real simple to insert.
5 can be done with a level script, just reset each trainer flag and battle flag on that map... this is nice cause u can do it for only certain maps (not every map)
Thanks.
Quote:
Originally Posted by daniilS
I tried getting it to delete the save file and to return to the titlescreen afterwards, but I couldn't get a brief flash of the pokécenter to disappear. I might fix it later, but as for now, here's a much more simple version using SoftReset:
Code:
Type 5F F1 53 FC 00 DF at 0807F5B6 and F1 E7 at 0807F5D0.
Great work! I'll add it to the front post (or maybe the kind Spherical Ice will :3).
Quote:
Originally Posted by Turtl3Skulll
Sorry, I guess I wasn't as specific as I thought, I wanted the abilities to be accessible through the pokemon menu, such that I could call the move at any point rather than on signpost/person event.
I specifically mean like when you use fly from any place on a map, where it runs the animation and then the action happens, though as long as it runs to a script for the action, I don't necessarily need the animation
Oh man, the BRM (bottom right menu). I looked into the BRM when I was trying to remove fly, and ultimately gave up. It was very much a large amount of confusing code which wasn't made very organised. I'm going to have to turn down your request, simply because of how hard it is. Making a move come up in the BRM is actually a lot of work, lots of repointing and code that needs reworking.
I'll look into doing number 1. The rest you've mentioned are already done, or in battle routines (which I don't like doing unless it's for something I want to do :3).
If you do end up making the custom stats for enemies work then would it be possible to give it "auto-buffs"? As in, You start a battle with say - Zapdos. You can set it to have stage +4 Special Attack and stage +2 Speed. Or you could perhaps make it start with the Safeguard status or something.
Oh man, the BRM (bottom right menu). I looked into the BRM when I was trying to remove fly, and ultimately gave up. It was very much a large amount of confusing code which wasn't made very organised. I'm going to have to turn down your request, simply because of how hard it is. Making a move come up in the BRM is actually a lot of work, lots of repointing and code that needs reworking.
I understand, thanks for explaining the why, it makes me feel better about not getting the hack XP lol Honestly thanks :)
Last thing, did you (during the research) find out how to possibly replace an action from one, like 'sweet scent' like maybe the offset for it & I can try looking up a repointing of it maybe??
Gotta say I love the hacks I've tried out & definitely are changing the way I'm doing my hack :D
Brief introduction:
This is probably the longest and maybe complicated chunk of ASM implementation I've done. It's a 100% reproduction of the new generation roaming mechanics. I've also expanded a little bit to include customization of the maps the Pokemon can roam in (which is designed for expandibility for disjoint map selections). There is also other smaller customizations for the user like encounter chance, and time taken before the wild Pokemon moves on to a new map. The whole system is rather expandable, so you CAN have multiple Pokemon Roaming at once, and even multiple roaming the same map!
There IS a lot of work that went into this, and I do hope that a lot of people may end up using it. I'll maybe make a patch for it later, simply because of the sheer amount of insertions you need to do (maybe 15 mins worth. It took me much longer to make, lol).
Before inserting these routines, you need to insert BattleByMove and my Random routine
BattleByMove:
You need to change the table offset on the last line (and write it down).
Spoiler:
Code:
.text
.align 2
.thumb
.thumb_func
main
push {r0-r4}
mov r0, #0xBF @flag to check divided by 4
lsl r0, r0, #0x2
ldr r1, =(0x806E6D0 +1)
bl linker
cmp r0, #0x0
beq noCrash
ldr r4, .table
loop:
ldr r1, [r4]
mov r0, r1
lsr r0, r0, #0x18
cmp r0, #0xFF @check table entry is free space
beq noCrash
push {r4}
bl linker @call table routine
pop {r4}
add r4, r4, #0x4 @get next table routine
b loop
noCrash:
pop {r0-r4}
lsl r0, r0, #0x18
lsr r0, r0, #0x18
mov r10, r0
lsl r1, r1, #0x10
lsr r1, r1, #0x10
ldr r2, =(0x2022874)
ldr r0, =(0x800E2EA +1)
bx r0
linker:
bx r1
.align 2
.table:
0x[pointer to routine table] @THIS IS FREE SPACE IF IT'S YOUR FIRST TIME USING THIS ROUTINE
Navigate to E2E0 and ins: 00 4D 28 47 XX XX XX 08
XX XX XX =reverse hex pointer +1 to where you inserted this routine
Write down the offset you inserted this routine, as well as the table offset. They are needed later
Random
Spoiler:
Code:
.text
.align 2
.thumb
.thumb_func
main:
push {r4, lr}
ldr r4, =(0x8044EC8 +1)@gen random number
bl linker
lsl r0, r0, #0x10
lsr r0, r0, #0x10
ldr r1, =(0x20370B8) @convert to int between 0x0 to [var 0x8000] exclusive
ldrh r1, [r1]
ldr r4, =(0x81E4684 +1)
bl linker
ldr r1, =(0x20370D0) @store in last result
strh r0, [r1]
pop {r4, pc}
linker:
bx r4
.align 2
Insert into free space (write down the offset).
Roaming Pokemon Routines
Here's a run down video of what the routines actually do:
Spoiler:
Create Roaming Pokemon
I call this roam for short. It's a routine which handles the creation of a roaming Pokemon. If you've inserted my shiny Pokemon hack, it is compatible with my routine, and you can create a shiny legendary roamer.
Pokemon who roam will have 4 perfect IVs.
To insert:
Before compiling look at the orange text in the following routine and fill in the XXXXXX with a pointer to where you inserted the random number routine from before (add 1 to the pointer, but don't put it in reverse hex).
After that, compile into free space (and write down the offset).
This is the routine that creates your roaming Pokemon in RAM. It takes in variables a few paramaters and outputs a Pokemon in the RAM region of 0203D000s. If you want to make a Pokemon roam this is the routine you call.
In a script:
Code:
setvar 0x8000 0x[Species ID]
setvar 0x8001 0x[Level]
setvar 0x8003 0x[Map table index (to be explained in a later section)]
callasm 0x[this routine +1]
Purge Roamer
I called this delete roamer in the video. Basically it just deletes a currently roaming Pokemon. It is standalone, so you can use it in your scripts. Though it's main use is within another routine which will be introduced later.
How to insert:
Compile and insert into free space the following routine:
setvar 0x8000 0x[Which roaming Pokemon you want to delete (slot #)]
callasm 0x[this routine +1]
Cancel Roam
In the video I called this possible deletion. It basically makes it so the Pokemon won't be encountered again if the player makes it faint or captures it.
How to insert:
Before compiling the routine, look at the orange text. Set the XXXXXX to the pointer to where you inserted purge roamer +1 (once again, not in reverse hex).
Now navigate to 0x6D5F8 and insert these byte changes:
Code:
00 4A 10 47 XX XX XX 08
Where XX XX XX is the reverse hex pointer to where you inserted this routine +1.
Usage:
There is no use. It's run internally inside the game. I mean...magical use :3
Inject into Map
In the video I called this routine modEncounter. This routine checks if there is a Pokemon roaming in the map you're in. If there is, it will generate a random number and if the random number is zero the roaming Pokemon will appear instead of the normal Pokemon. You can set the "encounter chance" inside this routine.
To insert:
Before attempting to insert look for the orange text again. There are two occurrences. One is to control the encounter chance and the second should be a pointer. The pointer, is ofcourse, going to be where you inserted my random routine +1 (not in reverse hex). The encounter chance is going to control how many possible numbers we will get. The roaming Pokemon only shows if we get a zero. So that means the greater r1 is, the less of a chance we encounter the Pokemon. 1/r1 chance to be precise. By default I've left r1 as 0x1 = 1/1 = 100% chance. After the modifications compile and insert into free space.
Once you've modified the orange text, and have compiled the routine, navigate to 0x82A10 and insert the following byte changes:
Code:
00 48 00 47 XX XX XX 08
Usage:
Silly human, there is no usage! It's all done by the power of ASMAGIX.
Quick Roam map table mechanics overview
Here's a video explanation (instructions on how to make the table as well..which is kinda very important):
Spoiler:
Watch the video. When you see .TABLE being referenced, you should know it follows the above table format. In case you don't understand my words (sorry!) I'll explain rather briefly again.
The table is a table of pointers. Each pointer leads to another table. The second table contains
[1 byte (amount of maps)] [1 byte (Map bank)] [1 byte (Map number)]. Make sure when you're making the tables, the first one needs to be word aligned -1, and the second needs to be "half-word aligned" minus 1.
Map Change
Every X minutes, the maps which the roaming Pokemon are roaming change. What they change are randomized based on the table with the map's contents.
To insert:
Before inserting there's a bit of orange text that needs editing again. The first one is how often roaming Pokemon change maps. I have it set to 0x2 which is two minutes. You can change it to however long you want. Must be between 1 and 59 minutes. This is also the duration it will take once you've set the roamer, for it to actually appear in game. Realistically, I would think anywhere between 5-10 minutes (0x5 - 0xA) is ideal.
The second orange text, is just a pointer to where you inserted the random number generator +1 (not in reverse hex).
Finally the last orange text is a pointer to the table of map tables (basically a pointer to the main table). Once you've fixed the orange letters, compile the routine into free space.
Next you need to insert my minuteRun routine as well. But, at the bottom of the routine there's a pointer called Table which you need to change. Change this pointer table to be some new free ROM space you haven't used and won't be using. Make sure the offset is divisible by four and don't add 1.
Once you've fixed that pointer, compile and insert the minuteRun routine into free space.
Now navigate to 0x548A8 and insert the following byte changes:
Code:
00 48 00 47 XX XX XX 08
Where XX XX XX is the reverse hex pointer to where you inserted the minuteRun routine +1.
Next, go to the table offset you changed in minute run. Insert there a reverse-hex pointer to the map change routine +1 there.
Usage:
Dear user, there isn't a usage for making the Pokemon move maps every x minutes. The game's clock determines that, not you [insert non-spoink gif here]. :3
Flee battle
This is a large routine and that does A LOT of work.
1) Checks if the Roamer is trapped by trapping moves (block, mean look, ect..)
2) Checks if the Roamer is trapped by ability (arena trap, shadowtag, ect..)
3) Checks if the Roamer is trapped by duration move (wrap, fire spin, ect..)
4) Check if it's the Roamer's turn (i.e if the player is faster roamer will get hit before fleeing)
5) Saves any battle damage or status changes appied in battle (HP dmg, poison/paralyze)
6) Once the Roamer flees, change it's current roaming map location
How to insert:
There are two occurrences of orange text. The first one requires you to set the pointer to the random number generating routine +1 (not in reverse hex). The second one is a pointer to the table I've talked about prior. Once you've done those changes, compile the routine into free space.
Spoiler:
Code:
.text
.align 2
.thumb
.thumb_func
main:
push {r0-r5, lr}
ldr r0, =(0x20370C2) @toggled by var 0x8005 == 0xFF
ldrb r1, [r0]
cmp r1, #0xFF
bne end
ldr r0, =(0x2023E8A) @check player run away
cmp r0, #0x4
beq saveState
fleeChecks:
ldr r0, =(0x2023D6B) @check player's Pokemon's turn to attack
ldrb r0, [r0]
cmp r0, #0x0
beq end
ldr r0, =(0x2023D68) @Player is attacking
ldrb r0, [r0]
cmp r0, #0x0
beq end
@wild Pokemon's turn to go
trapCheck:
ldr r0, =(0x2023C8F) @moves preventing fleeing
ldrb r0, [r0]
cmp r0, #0x4
bls durationMoveCheck
trapCheckTwo:
cmp r0, #0x7
ble end
durationMoveCheck:
ldr r0, =(0x2023C8D) @duration of a move active on target
ldrb r0, [r0]
cmp r0, #0x0
bne end
abilityCheck:
ldr r0, =(0x2023C04) @ability of player's Pokemon
ldrb r0, [r0]
cmp r0, #0x17 @shadow trap
beq end
cmp r0, #0x47 @arena trap
bne magnetRise
ldr r1, =(0x2023C5D)
ldrb r2, [r1]
cmp r2, #0x2 @flying type
beq magnetRise
add r1, r1, #0x1
ldrb r1, [r1]
cmp r1, #0x2 @secondary flying type
beq magnetRise
ldr r1, =(0x2023C5C)
ldrb r1, [r1]
cmp r1, #0x1A @levitate
bne end
magnetRise:
cmp r0, #0x2A @magnet pull, check if steel type
bne runAway
checkTypeSteel:
ldr r0, =(0x2023C5D)
ldrb r1, [r0]
cmp r1, #0x8
beq end
add r0, r0, #0x1
ldrb r0, [r0]
cmp r0, #0x8
beq end
runAway:
ldr r0, =(0x2023E8A)
mov r1, #0x6
strb r1, [r0]
saveState:
ldr r0, .ROAMERS
add r0, r0, #0x1
ldr r1, =(0x20370C4)
ldrb r1, [r1]
mov r2, #0x68
mul r1, r1, r2
add r0, r0, r1 @dest
mov r4, r0
ldr r1, =(0x202402C) @src
mov r2, #0x64 @size
ldr r3, =(0x8040B08 +1) @func
bl linker
changeRoamingLocation:
mov r0, r4
add r0, r0, #0x67
ldrb r1, [r0] @map pointers table index
ldr r2, .TABLE
lsl r1, r1, #0x2
add r2, r2, r1
add r2, r2, #0x1 @pointer to roamable maps data
ldr r1, [r2] @data
ldrb r2, [r1] @amount of maps
ldr r3, =(0x20370BB8)
strb r2, [r5]
push {r0-r4}
ldr r3, =(0x8XXXXXX +1) @random function
bl linker
mov r5, r0
pop {r0-r4}
lsl r5, r5, #0x1
add r1, r1, #0x1
add r5, r5, r1 @map to set to
sub r0, r0, #0x2
ldrh r5, [r5]
strh r5, [r0] @update roaming maps
end:
pop {r0-r5, pc}
linker:
bx r3
.align 2
.ROAMERS:
.word 0x203D000
.TABLE:
.word 0x8XXXXXX
This is indeed a battle modes, Battle by move add-on routine. It's inserted as such too. Remember that offset I told you to write down?
Quote:
BattleByMove:
You need to change the table offset on the last line (and write it down).
I'm glad you listened and wrote it down, because now we need it :P
The table line which we edited at the bottom of the routine, is the specific line that we need. Navigate to that table location and insert the reverse hex pointer +1 of the flee routine there. That's it, the rest is handled by the Battle by move routine, luckily!
Usage
Quote:
That's it, the rest is handled by the Battle by move routine, luckily!
Please understand user, you don't really need to do anything :D
Bugs/Oddities
- If you make a Pokemon with explosion roam, trap it, and make it kill itself. It'll stick around roaming with the health it had before using explosion/suicide move. Try to avoid suicide roamers.
- Right before the "Wild X has fled" text appears, it says, "Wild X used Y move". Though the move isn't used, it's just said and then the flee text/fleeing action follows. It's a rather minor bug as it effects nothing, but an oddity anyways.
Demonstration
Sorry, I had to talk over this video too. There were some things that I wanted to make clear :P
Updates:
- Fixed a bug where levitate and flying types couldn't get away from arena trap
If you do end up making the custom stats for enemies work then would it be possible to give it "auto-buffs"? As in, You start a battle with say - Zapdos. You can set it to have stage +4 Special Attack and stage +2 Speed. Or you could perhaps make it start with the Safeguard status or something.
This is a battle script hack, which is against my normal policies. However, maybe someone else will pick it up for you :)
Quote:
Originally Posted by Turtl3Skulll
I understand, thanks for explaining the why, it makes me feel better about not getting the hack XP lol Honestly thanks :)
Last thing, did you (during the research) find out how to possibly replace an action from one, like 'sweet scent' like maybe the offset for it & I can try looking up a repointing of it maybe??
Gotta say I love the hacks I've tried out & definitely are changing the way I'm doing my hack :D
Research on field moves was done too by Touched, so you can always check that out. Though, for the BRM making the move appear is the problem, rather than making it do something. Back when I looked for it, I couldn't find the chunk of code that actually did the move check. I did find the text generation, but that's useless without knowing the location of the code that generates the text values. I might look at it again, the research I did do on the BRM was back when I was still very new the ASM, so maybe now I can figure it out :)
My to-do list:
1) Swarming Pokemon
2) Capturing trainer Pokemon with retained OT name
3) Giving Pokemon with different OT names
4) Enemy Pokemon custom stats (err...maybe if I feel like it :P)
5) Research on the menu option "Option" 6) Work on my own things
This is a battle script hack, which is against my normal policies. However, maybe someone else will pick it up for you :)
Ah, my mistake. Thanks anyway. :D
--
Also about that last video you posted... I thought Arena Trap wasn't meant to actually work on Flying types like Lugia?
In regards to Aruaruu's request: can't you update the battle framework to include the battle initialisation as well? This could result in lots of interesting things, including stat boosts since those are just values in the RAM.
Request ^_^ Skipping Titlescreen when youll play a new game
So, when you are about to start new game, instead of bootscreen will play, it starts in Prof. Oak intro.
so the pattern will be
the screen where Gamefreak and Nintendo appears»Oak Tutorial
Then if theres a saved game...
It will be normal
__________________
This signature has been disabled.
Scrollbar appears
Please review and fix the issues by reading the signature rules.
You must edit it to meet the limits set by the rules before you may remove the [sig-reason] code from your signature. Removing this tag will re-enable it.
Do not remove the tag until you fix the issues in your signature. You may be infracted for removing this tag if you do not fix the specified issues. Do not use this tag for decoration purposes.
Ah, my mistake. Thanks anyway. :D
--
Also about that last video you posted... I thought Arena Trap wasn't meant to actually work on Flying types like Lugia?
OMG! I don't play the Pokemon games, so I don't actually know how arena trap works ( or 90% of these abilities actually). I thought it just trapped people. Anyways, I fixed the rooutine. Thanks for pointing that out :)
Quote:
Originally Posted by KDS
Updated light ball to raise Pikachu's attack:
Spoiler:
At 3F020: 00 49 08 47 XX XX XX 08 00 00 00 00 00 00 00 00 00 00
In regards to Aruaruu's request: can't you update the battle framework to include the battle initialisation as well? This could result in lots of interesting things, including stat boosts since those are just values in the RAM.
Is that directed to me? I'm not interested in Pokemon battles much anymore. Most of the abilities and stuff can be done in BS n' stuffs.
Quote:
Originally Posted by Knight Of Duty
Can you create a move checker which would search the whole party for a pokemon with a move?
There's a scripting command for this. Also my partychecker can do it too.
Ability switching:
Very simple, it turned out to not have to adjust the PID.
How to insert:
Just compile the following routine into free space:
Set in variable 0x8004 the slot number of the Pokemon who's ability you want to swap. Note that Pokemon with only 1 ability won't have their abilities swapped. I've made it so it's easy to use with special 0x9F in your ability swap item script.
Someone in the beginner's lounge ASM help thread didn't know how to do this. It's kinda of technical and not very easy for a beginner. I wrote this routine out to help him, though it's probably useful to some other people too. All it does is convert a Pokemon's ability bit into a string which represents the Pokemon's ability name. There were two tables which I had to "surf" to fetch it.
How to insert:
Just compile and insert the following routine into free space:
Spoiler:
Code:
.text
.align 2
.thumb
.thumb_func
main:
push {r0-r4, lr}
ldr r1, =(0x20370C0) @var 0x8004
ldrb r1, [r1]
mov r2, #0x64
mul r1, r1, r2
ldr r0, =(0x2024284)
add r0, r0, r1 @slot
mov r4, r0 @save slot
mov r1, #0xB
ldr r3, =(0x803FBE8 +1) @get species
bl linker
getSpeciesBaseStats:
ldr r2, .BaseStatTable
mov r1, #0x1C
mul r1, r1, r0
add r2, r2, r1 @base stats table for species
checkAbility:
mov r0, r4 @slot
mov r4, r2 @save base stats table for species
mov r1, #0x2E
ldr r3, =(0x803FBE8 +1) @get ability bit of Pokemon in slot specified by 0x8004
bl linker
getAbility:
add r0, r0, #0x16 @first ability location + ability bit = ability number
add r4, r4, r0 @this is the ability number
ldrb r1, [r4]
cmp r1, #0x0
bne getAbilityName @if it has a second ability (not null)
@we will retrieve it's name, else retrieve 1st ability
firstAbility:
sub r4, r4, #0x1
getAbilityName:
ldrb r4, [r4]
ldr r0, .AbilityNames
mov r1, #0xD
mul r1, r1, r4
add r0, r0, r1 @ability's name pointer
mov r1, #0x0
writeToBuffer:
cmp r1, #0xD
beq end
mov r4, r0
add r4, r4, r1
ldrb r4, [r4] @char
ldr r3, =(0x2021D18) @location to store string
add r3, r3, r1
strb r4, [r3] @append char to buffer
add r1, r1, #0x1
b writeToBuffer
end:
pop {r0-r4, pc}
linker:
bx r3
.align 2
.BaseStatTable:
.word 0x8254784
.AbilityNames:
.word 0x824FC40
The routine requires variable 0x8004 to be the slot number of the Pokemon who's ability you want to buffer. The buffered string is placed in the script buffer which is at RAM offset 0x2021D18. The rest is automagic. It can be called in a script like this:
PKSV:
Spoiler:
Code:
#dyn 0x740000
#org @start
lock
faceplayer
msgbox @select
callstd MSG_NORMAL
special 0x9f 'special 0x9f sets variable 0x8004 to the pokemon you selected
waitspecial 0x0
callasm 0x[Where you inserted the routine +1]
storetext 0x0 0x2021D18 'This is the offset I buffered the text data into
msgbox @display
callstd MSG_NORMAL
release
end
#org @select
= I'll check out a Pok\emon\nfor you, which will it be?
#org @display 'name of the ability
= That Pok\emon's ability is undoubtedly\nthe ability \v\h02. Cool :D
XSE:
Spoiler:
Code:
#dynamic 0x740000
#org @start
lock
faceplayer
msgbox @lookup '"I'll check out a Pokémon\nfor you, ..."
callstd 0x6
special 0x9F 'This special puts in var 0x8004 the pokemon selected
waitstate
callasm 0x[Routine offset +1]
bufferstring 0x0 0x2021D18
msgbox @display '"That Pokémon's ability is undoubted..."
callstd 0x6
release
end
#org @lookup
= I'll check out a Pokémon\nfor you, which will it be?
#org @display
= That Pokémon's ability is undoubtedly\nthe ability [buffer1]. Cool :D
Every X minutes, the maps which the roaming Pokemon are roaming change. What they change are randomized based on the table with the map's contents.
Usage:
Dear user, there isn't a usage for making the Pokemon move maps every x minutes. The game's clock determines that, not you [insert non-spoink gif here]. :3
I am concerned about this small section... what if the hack does not have a DNS inserted. or is not using RTC at all. just vanilla red. could this still work? or is there a change that makes it pick a new map every time you change maps (like it did in original GS)
I would be very interested in making this into a tool for quick insertion. but I would want it to be usable as a standalone tool if the user did not have a RTC, if they did however, they could use this tool aswell (with a time limit like it currently is).