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.
This is really great! I've been trying forever to figure out how to implement Rivalry in my little project, and this may have just helped me crack it. It shouldn't take much to modify it to read values in-battle ^^
(If I do get it working in-battle I'll be sure to credit you for it)
Tool is better than patch, but its not bad to make a patch for it. The disadvantages are it might overwrite the datas that are already consumed and it may cause a bug for edited rom. Tool is much better, it allows us to use free spaces.
Well, Im looking forward for tht kind of tool, FBIs awesome projects conpiler(FAPC), or Advance FBI Routines inserter(AFRI)
Lelz, just kidding
-stuffs-
And my request is an ASM code to Check the number of ribbons a Pokemon has from a particular contest. I'm not sure if Emerald has anything like Special 0x9F from Fire Red so if the code is only able to read the first Pokemon in the party I'm okay with that as I can check a Pokemon's ribbons from a particular contest and have that be output to LASTRESULT or something. I could probably do this on my own actually, but, I don't know where the game stores ribbon data, unfortunately.
Err, this is unfortunate, but I don't hack Emerald. Before the thread was stickied it was practically only me writing the routines (so I had a few personal rules one which included that I only work on FireRed). These mini-rules were removed at the assumption that other ASM hackers would be able to fill in and do requests from other ROM bases. So I'm afraid I will have to personally reject your request for a ribbon counter, however, maybe someone else can help you :)
A bit late, but actually, the gender of a Pokemon is determined by the "trainer gender" if and only if the Pokemon has a 50-50 gender. Other than that, it goes to the one that has a higher chance, like for example, a trainer's Torchic will always be male unless edited.
[FONT="]Thank you so much for all of your work. So many conveniences we can easily add to our hacks! Really, thank you![/FONT]
[FONT="]I do have some requests, mostly for those who seek to make battle facilities (i.e. tournaments) and the like into their hacks.[/FONT]
[FONT="]…The ability to turn off experience gain upon setting a flag (and [FONT="]on upon clearing it[/FONT]). This could also work well with the set level routine you've made, especially in parts where the team is temporarily set to a level to match the opponents (to avoid having the slightest advantage over them (gaining a level [FONT="]during the[/FONT] fight.))[/FONT]
[FONT="]…The ability to change battle styles (Shift, Set) via script. The battle style in battle facilities is always Set. In addition to that, this can be useful to people who want to make the important fights in their hack more chal[FONT="]lenging and [FONT="]perhaps "fairer"[/FONT][/FONT] -- by eliminating that one huge advantage the player has over the opponent temporarily.[/FONT]
[FONT="]…Givepokemon with custom attacks. Like Extremespeed Dratini in Crystal and event Pokémon.[/FONT]
How about some requests to actually break some trainers?
Can you add a battle mode like Battle Frontier battles? (You can't use items, battle is turned to set, you don't get XP during the battle.)
Let's say you use this battle style for certain trainers like Gym Leaders and Rivals. It would ramp up the difficulty of a hack without needing for some crazy stuff like giving Brock a lv.100 Diancie for the player's first gym battle.
Another suggestion I think that it would be interesting is expanded trainer sight.
For example, a trainer can spot you from a wider range (I always thought it was weird seeing the player at a diagonal spot close to the trainer and the trainer not even noticing.
How about a player detection system? Let's say the player is captured by team rocket.
The player needs to get out of the rocket base and there are no allied pokémon or cardboard boxes, so he needs to avoid the grunts patrolling. If he gets caught, he gets locked in again. That would be interesting to use with the expanded trainer sight I mentioned earlier.
A NPC that explicitly tells a pokémon's current IV and EV spread would be cool too, but I don't know if that can be done just with scripting.
Another NPC that tells what moves a pokémon can learn via level-up would be very useful too, since most hacks mess up with movepools, and since most hackers don't post their movepool changes the players are often left in the dark. And that's terrible.
And just some personal curiosity here. Is there a limit to how many Move Tutors you can have in the game?
Edit: More random curiosity. Since apparently there's no simple tool to edit some move effects of MrDollSteak's Rom Base, could you explain how I can edit the moves manually? I wanted to get more moves boosted by Mega Launcher, but I really have no idea on how to do that. Since it could require ASM, I figured that you might know something.
Good luck with your hack. Considering how much you've done just in this thread, I know that it's something to look forward to.
I'll look into battle frontier like battles. For the can't use items one, you can use the temporary bag deletion and delete the bag and restore it later. EXP during battles and set mode battling will be something I'll look into.
I feel like the only issue with patches is that they don't adjust well to existing ROMs. If you patch the ROM with the routine at 800000, then it could mess up someone else's hack by causing existing data to be overwritten. It would actually be kinda interesting (and maybe worthwhile as a personal project) to have a patcher which adjusts properly to different offsets and freespace, ie it could contain the binary data for the routine and a list of offsets to modify, and then just relocate the data as needed.
That's a really good idea, I've already written down areas of free space compatible with Jpan and Mrsteakdolls Rom-bases so I will definitely get looking into a more organized way of using these patches. Compatibility is my main concern with these patches, I had already made plans to make them modular as best I could.
I totally agree though, it's about time patches got more love.
Once I get a bit of planning done, I will look to collaborate with someone around the forum who can make a tool.
The idea now, based off what you've said, is to create a table of offsets leading to the actual routines which the program would locate the space for. However if I cannot get assistance from anyone with knowledge I will work my best to replicate a system using data near the end of the 16mb rom (ie. 80EB0000+) and one for a 32mb rom.
The new idea would be an easy way to add and remove patches, like a mod system. The program would look at the table of offsets, were you could then have the choice to delete, add, or edit. I understand some routines require hooks into vanilla stuff, but I imagine someone with programming skills can have it save a backup of all edits made in case deletion is required.
I actually think I may make a new thread on this, this will get more attention that way. But before I do I will make some form of a mockup.
The patching problem isn't as simple to solve as it may seem. Some of the routines require editing before being compiled, some of them use custom-sizable tables and the largest problem of all is that I note certain things in the comments about limiters in the routines. Those limiters for the most part are things which most people may find interest in changing.
I agree patches are a bad idea... a tool is a far better idea... maybe someone should get on that... hrmm that locksmitharmy guy might be tempted to make one. ;)
Im just worried about how adjustible they should be. I could make a tool that is expandible to add more stuff later...
What would we call it... the "awesome asm adder tool"?
While it seems pretty obvious most people are against a patch, I'd also like to say that I think that a patch would be a bad idea. It gets rid of the whole customisation aspect, as well as having quite a few logistical issues to work.
What about naming it something to do with FBI, such as FBI's Babies Inserter. Something like that.
(Babies cause y'know these routines are his babies).
This is really great! I've been trying forever to figure out how to implement Rivalry in my little project, and this may have just helped me crack it. It shouldn't take much to modify it to read values in-battle ^^
(If I do get it working in-battle I'll be sure to credit you for it)
On a side note:
Do we really need patches/tools for insertion? I think I've made the insertion instructions rather simple and honestly the most complicated thing in the process is knowing how to reverse hex a pointer and then add 1 to it :X
Well, I don't really mind if people make tools/patches. These routines are for public use, and can be used/modified in whatever way you wish.
On a more side side note:
Recently I've been working on chain fishing. FireRed's super rod Fishing Routines are actually rather limited. They don't support the suction cups or stick hold abilities, they don't cancel the fishing sequence if you hit A early and they don't let the Pokemon get away if you press A too late either. Anyways, I've got the chain fishing part and abilities working. For the pressing A too early and pressing A too late, I made my own routines for detecting key presses and such, everything works fine, but the game freezes afterwards. I'm not sure why that's happening, nor do I really want to investigate longer than the 3 days-ish I have been. I think I'm going to just post what I have, and maybe if I find myself with some extra time I'll add to it later.
This is a semi-complete port of the ORAS chain fishing feature onto FireRed. There are a few pre-requisite routines that you need to insert first as well, so make sure you've inserted those.
This is simply a routine that's run every step. Every time you take a step it sets variable 0x8002 to 0x0. This is completely save unless you're using 0x8002 for something long term (which you shouldn't because it IS a temporary variable).
How to insert:
Compile and insert the following routine into free space:
Now navigate to 0x6D5F6 and insert the following byte changes:
Code:
01 4A 10 47 00 00 XX XX XX 08
Where XX XX XX is where you inserted this routine +1.
Usage:
The routine is run automatically once a step is taken (i.e tile displacement occurs)
Ability Number getter
Very simply, just gets the abilityID of the first Pokemon in your party.
How to insert:
Compile and insert into free space the following routine:
Spoiler:
Code:
.text
.align 2
.thumb
.thumb_func
main:
push {r0-r4, lr}
ldr r0, =(0x2024284)
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 setReturn
firstAbility:
sub r4, r4, #0x1
setReturn:
ldr r1, =(0x20370B8)
ldrb r4, [r4]
strb r4, [r1]
end:
pop {r0-r4, pc}
linker:
bx r3
.align 2
.BaseStatTable:
.word 0x8254784
.AbilityNames:
.word 0x824FC40
Usage:
This one is a standalone routine actually. It will store into variable 0x8000 the ID number of the ability of your first Pokemon. It becomes needed for Sticky Hold and Suction Cups later!
Fixing the Suction cup/Sticky Hold abilities
This routine just takes into account suction cups and stick hold for the fishing rod routines. It is also expandable, so you can add your own things to increase catch rate. If you have questions about that feel free to ask later (I'm a little lazy to type out everything :D).
How to insert:
You need to have inserted the Random Number Generating routine and the ability number routine before you can continue and insert the main one. Once you've done that, look at the last line in the following routine and replace the ".word 0x8[OFFSET +1]" with the pointer to the RNG routine (not in reverse hex). Finally there's an all caps comment. It requires you to set the pointer there to the ability ID routine from before.
Now navigate to 0x5D66E and insert the following byte changes:
Code:
00 00 00 49 08 47 XX XX XX 08
Where XX XX XX is the reverse hex pointer to where you inserted this routine +1.
Usage:
The increments are automated...actually everything here will be automated. I'm just keeping this section here for consistency :)
Increased Shiny Encounter Chance
This feature isn't very documented at all. There's no numbers on it in any site I've tried, so I just kinda made up my own algorithm to create an increased chance-based shiny encounter with the amount of successful chains greatly swaying the chances. I'll explain how all the math comes together in a later section.
How to insert:
Before inserting this routine you need to have inserted my RNG routine from the prerequisites section. Once you've done that change the last line of this routine to match where you inserted the RNG routine (not reversed). After that, you can compile and insert into free space.
Finally, navigate to 0x5D2C2 and insert the following byte changes:
Code:
00 00 00 4D 28 47 XX XX XX 08
Usage:
None, it's automated every time you use your rod.
Explanation of Functionality
First of all, a successful chain is defined as every time the player hooks a Pokemon.
The chain counter starts at 0 and is increased by 0x1 once the Rod is used and again by 0x1 once a Pokemon is hooked. This means chainCounter%2 != 1 is a successful chain. Everytime the Rod is used this calculation is confirmed, and the chain counter is reset if the condition isn't matched.
How big of a margin does the chainCounter affect shiny encounters?
32640/65535 = approx 50% chance at max chains
The numerator starts at 0, and increases to by 128 per successful chain.
I've also done a little "pity" thing for the unlucky souls like me out there. Basically after 255 successful chains, you're guaranteed a shiny. The chance of this occurring is:
Sum of (i=0 to 255) {PR(x = (128 * i)/ 65535) : [rand (y = 65535) && y < 128 * i] } ; currentSum < 1
It's very very unlikely unless your the bad luck god like myself. Also, you'll have to forgive my dirty notation.
:)
Hi, I'll look into some of these. Though I'm not a fan of battle routines :X
I'll look into battle frontier like battles. For the can't use items one, you can use the temporary bag deletion and delete the bag and restore it later. EXP during battles and set mode battling will be something I'll look into.
Call it... ASMAGIX Inserter. Nvm, I was never good with names :P
Nice. It's going to be fun to see hacks where trainers can't overlevel or bribe their way to victory via healing item spam. Thanks for the hard work.
Now if we could block saving in certain areas like the Elite 4 rooms...
I vote for ASMAGIX Inserter. Despite the fact that I'm terrible with naming too.
Nice. It's going to be fun to see hacks where trainers can't overlevel or bribe their way to victory via healing item spam. Thanks for the hard work.
Now if we could block saving in certain areas like the Elite 4 rooms...
I vote for ASMAGIX Inserter. Despite the fact that I'm terrible with naming too.
I'm afraid you're late to the party, I'm not taking anymore requests right now. Though this could be quite interesting to have, so hopefully someone else will help you.
On a side note I've decided to drop these requests:
- Battle style set/shift toggling
- Other battle script related stuff
Battle style set/shift was done in a battle script as far as I could tell. I was hoping there'd be a byte in RAM I could just find and manipulate, but I couldn't find one (though I'm 65% sure it's probably done like this).
Also for this one
someone's request said:
Givepokemon with custom attacks. Like Extremespeed Dratini in Crystal and event Pokémon.
I'll post what I've done so far soon. Progress has been rather slow because I got sick and spent pretty much most of the last couple of days in bed X_X
It was brought to my attention by some requesters that for their battle/tournament events they wouldn't want their Pokemon leveling up. This routine disables the exp gains in battle. Note that the player can still use stuff like Rare Candy to level. The fix to that is exactly the same as this, but with slight modifications. I hope you don't give the player a chance to rare candy in battle though or I will go to your hack's thread and severly criticize your lack of common sense :c
How to insert:
Compile and insert the following routine into free space:
Now navigate to 0x21CFA and insert the following byte changes:
Code:
00 00 00 49 08 47 XX XX XX 08
Where XX XX XX is the reverse hex pointer to where you inserted this routine +1.
Usage:
If flag 0x202 is set, the EXP gains will be disabled. Obviously, to re-enable just clear the flag.
Currently the way I'm doing this is by making the game act like the player's party is already max level, so therefore they don't gain exp :)
Before compiling the routine look at the last line. There is a .word 0x8[RANDOM +1]. Change the content after the 0x8 to be a pointer to where you inserted RANDOM +1.
Once you've done that, look for the line that says "mov r0, #0x1 @item ID". Change 0x1 to the Item ID for your Shiny charm item. If you don't have one implemented, delete these lines:
Code:
mov r0, #0x1 @item ID
mov r1, #0x1
ldr r2, =(0x8099F40 +1)
bl linker
cmp r0, #0x0
beq normal
ldr r0, =(1365) @1/1365 chance with shiny charm
b calcChance
After you've done that, compile and insert the following routine into free space:
Before compiling the routine look at the last line. There is a .word 0x8[RANDOM +1]. Change the content after the 0x8 to be a pointer to where you inserted RANDOM +1.
Once you've done that, look for the line that says "mov r0, #0x1 @item ID". Change 0x1 to the Item ID for your Shiny charm item. If you don't have one implemented, delete these lines:
Code:
mov r0, #0x1 @item ID
mov r1, #0x1
ldr r2, =(0x8099F40 +1)
bl linker
cmp r0, #0x0
beq normal
mov r0, #0xA
lsl r0, r0, #0x7
add r0, r0, #0x55 @1/1365 chance with shiny charm
b calcChance
After you've done that, compile and insert the following routine into free space:
I'll look into battle frontier like battles. For the can't use items one, you can use the temporary bag deletion and delete the bag and restore it later. EXP during battles and set mode battling will be something I'll look into.
Do you have any kind of experience into implementing a battle frontier into FR? Not totally sure how many and what kind of ASM routines would be needed. Sort of a general question.
Hey fbi how would I go about making the battle by move asm to use a different flag for each routine? Cause I dont want the prevent whiteout and the delete pokemon on at the same time.:(
Do you have any kind of experience into implementing a battle frontier into FR? Not totally sure how many and what kind of ASM routines would be needed. Sort of a general question.
Hi, most of the hard Battle Frontier ones are also very stupid (like the random attack one). There are fun ones which are hard to do, like the rent a party/swap it with opponents party one. Some of the good ones like battle pyramid are easy though. I should mention I'm done writing public routines atm. There won't be more unless I'm very very bored on an eventless evening.
Hey fbi how would I go about making the battle by move asm to use a different flag for each routine? Cause I dont want the prevent whiteout and the delete pokemon on at the same time.:(
Hi FBI here, I'll answer this in place of fbi. You would put the flag check in the separate routines. If you've got more questions about how, you can ask in the ASM help thread.