![]() |
Var Mathematics For FireRed
In NPC scripting, there exist commands to add/subtract an integer value to a variable (AddVar an SubtractVar). However, these commands may be a little bit limited. It may be that you want to multiply or divide a var, or add two vars together. In that case, you can use these: What To Do First First, you will want to find two half-words of free RAM. It does not need to be permanent RAM (RAM that is saved with the game). However, you will need to know what number var that RAM corresponds to. I recommend NOT using the 0x8000+ temp vars, since then you will be unable to manipulate values stored into them. These routines use the vars 0x4074 and 0x4075 by default, but these can be changed in the following way. 1. Figure out the difference between the var you want to use and 0x4074. Keep in mind this is in hexadecimal. 2. Multiply that value by two. 3. Add (or subtract if your var is less than 0x4074) from 0x02026614. This is still in hexadecimal. You should then get the RAM address of the var you want to use. 4. Repeat for the second var if desired. 5. Change the addresses after .Var4074 and .Var4075. The Actual Routines The routines below perform the following operations: 1. Addition 2. Subtraction 3. Multiplication 4. Division 5. AND 6. OR For the AND and OR operations, I'll explain them a little for those who are not familiar with them. If you AND two binary numbers, the resulting number has the bit equal to one if the corresponding bits of the input numbers are the same, and zero if they were different. For example, 1011 AND 1100 = 1000. For the OR operation, if both bits of the input numbers are zero, it returns zero. Otherwise it returns one. In other words, if one OR the other number has a bit equal to one, the resulting number's bit is set equal to one. For example, 0010 OR 1000 = 1010. Add Vars Spoiler:
Subtract Vars Spoiler:
Multiply Vars Spoiler:
Divide Vars Spoiler:
AND Vars Spoiler:
OR Vars Spoiler:
How To Use Them These are meant to be used in NPC scripts. You use them as follows: #org @Script setvar 0x8000 0xAAAA ' Whatever value you want setvar 0x8001 0xBBBB ' Whatever value you want setvar 0x4074 0x8000 setvar 0x4075 0x8001 callasm 0x8AABBCC+1 ' AABBCC is the offset where you inserted the routine. Add one for THUMB. ... The result is stored into LASTRESULT. The original vars are not changed by the routine at all. |
how did you edit the IV values for hidden power types?
|
Quote:
These super low prices that are offered for each item appear to actually be the internal item ID number for each thing, converted to decimal format. One Potion, for instance, costs $13. It's item ID value is 0xD. Anyone have any ideas what's going on here? Did I do something wrong? |
Can anyone please help me add the Everstone 100% chance nature inheriting mechanism to the IV inheriting posted by FBI ?
Spoiler:
|
Hi, there! I've been making Pokémon FireRed hack roms for some time now, but never got to understand ASM, so I have a few requests about problems I've been facing. First of all, I'm familiar with XSE scripts and hexadecial numbers and HxD (hex editor), but not with how ASM works. The furthest I've reached is executing my custom menus (normal XSE scripts) via a key item using the "use of select" option in complete item editor. However this only works in overworld mode... I've miserably failed to run anything custom in-battle. I know battle scripts are different than XSE scripts, and have also downloaded the battle script pro tool, but that's about it. I have the thumb ASM compiler too. Well, I should go to the point now.
I'll start with the biggest issue. If flag 0x301 is set then receive all Pokémon from trainers upon trainer defeat (thief mode) Now I have a few questions here. Is there a way to call an ASM routine every time a trainer has been defeated? (or a battle ends, for that matter?) Trainer party data is located at ram offset 0x0202402C, is this data automatically cleared upon battle finish? I would need this data to be taken and then given to the player in the same way givepokemon works. What I mean by this is, first use the player's party slots then send the remaining Pokémon to the PC. In other words I need the party at said address to be given to the player as is (save maybe bug fixes?) If this being done automatically is not possible then I can script every single NPC in the game a callasm. That'd be more work, but it'd still be doable without having to manually script every single Pokémon from every single trainer in the game via givepokemon, special(s) and JPAN's hacks. That's a lot of work to do, you got the idea. Plus, in such a way it'd be impossible to replicate the IVs (and EVs as well?) from the stolen Pokémon, since I can't know their values during battle. Again, I know nothing of ASM but I guess just copying data from one ram location to another must not be too hard to script. But that's not my only concern. I also need a way to make battles against 1 Pokémon, fully customizable except for moves (default attacks), that you can't run away from, that you can't catch the Pokémon by any means and that you earn an also customizable amount of price money for. I'm unsure as to whether I can already do this with what's already on the internet. I used to "do this" by creating 386 new trainers with a single Pokémon each, but that's a lot of work to do and also "ugly" if you get my meaning. Unprofessional. Last but not least, we hear a lot about XSE scripts calling ASM, but what about it in reverse? Is it possible? (Guessing it is, since "virtually anything" is possible with ASM) I ask this because I want to change the exit option of the start menu to one that runs my XSE script with custom multichoice menus and submenus, instead of having to use a key item to be able to run the script from anywhere. Or even better, cancel button select "register" feature and call my script whenever select is pressed (without a custom item) Is it possible? Or even better, if I'm allowed to request, whenever you press the L and R buttons both at the same time in overworld mode (I have already disabled the annoying help system that takes priority over everything else, but had no luck with JPAN's key scripts nor walking scripts, changed default game settings as well) Thank you very much in advance for your help and please have a nice day ^^ If someone could lend me a hand with JPAN's key scripts and/or walking scripts, that would be a great plus. Edit: Oh, I almost forgot, JPAN's species changer leaves the name intact so I'd need code to set a Pokémon name to the default for its species, too. Edit2: Oh my God, I can't believe it but I managed to find the pointer to the script that runs when select is pressed and no item is registered, it's at offset 0x10ADA8! |
Quote:
Edit: After some more testing I found out neither of them worked because I was using a variable under 0x8000.. |
Nature Changing Before I begin, I should mention that this only works for FireRed at the moment. This is because it uses the Lustre stat, which in FireRed is unused but in Emerald is not. If you can find another stat to use, (or you don't have contests in your Emerald hack), then you can use this.Offsets listed here are for FireRed, though, so keep that in mind if you decide to port it. Anyway, without further ado, I present Nature Changing! How Does It Work? Skip this if you don't care about the behind the scenes stuff. Basically, this hijacks the GetNature function. It first checks the Lustre stat of the Pokemon in question. If it's equal to zero, then it gets the Nature form the PID as usual. If it's not zero, then it uses the Lustre value as the Nature, effectively changing the Pokemon's Nature without messing with the PID (and potentially messing up other stuff like the Pokemon's gender, Shininess, etc.). This does mean you can't set the Nature to Hardy, but this is not that big of a deal since there are other neutral Natures you can use. The Main Event I have written an instruction manual that explains how to use the hack in detail. It also contains links to download everything.The link presented below is the link to download the folder with the Instruction Manual and all the routines. Not every routine in the folder is one you need to insert, as there are a couple of optional add-ons to make changed Natures compatible with other hacks. Download: Here! |
Quote:
|
Quote:
A Timer System This is mainly for Fire Red, but it could also work for Emerald if you have enough Free RAM. More on that as we go.Anyway, this is a way to allow yourself to have timed events in Fire Red. As you may already know, FireRed does not have a Real Time Clock like Ruby/Sapphire/Emerald does. It does, however, have an internal clock that keeps track of how long you have been playing the game. You could, if you wanted, try to use it to have timed events. For example, if you wanted to have something occur every ten minutes, and you knew the RAM for where the time you've been playing is, then you could theoretically do something like this:
This is obnoxious for a variety of reasons. One, it kind depends on having a script run to end the event. Two, what happens if you've somehow been playing for 999 hours and 59 minutes. Then all your timed events break. Sure, that is a ridiculously long time, but still. Then, I came across a few hacks that other people had made, which when brought together, opened a whole new world for me. What You Need Before we get started, there are a few things that you will need to have in your game first.
Now, you may be wondering, what on Earth is this dubious, unnamed patch and what on Earth is it doing to my ROM? The answer to that is is disables the "Previously On Your Quest" feature (the little slideshow that happens when you boot up the game). Now why would this be required for a Timer System? The answer is that it frees up a TON of RAM. Like seriously, a TON. Like sooooooooo many bytes of RAM it's ridiculous. The best part? This RAM is saved by the game. Basically, if you want to expand your bag size, you don't need to use JPAN's Save Block anymore. If you have a hack in progress, this is objectively the better way to free up RAM because now you don't need to restart any save files. In fact, I would just do this anyway, unless you REEEEEEALLY need the "Previously On Your Quest" thing for some reason. What To Do First, you will need to create a table. This table will have all the RAM Addresses of all the timers that you will want to use. You are really only limited by the amount of free RAM you can use for Vars. You could have one timer, or 100! I personally have 96. Each entry of the table is four bytes long and is simply a pointer to the RAM addresss. If you want some help with figuring out what RAM addresses to use, click on the spoiler. The table needs to be terminated with FF FF FF FF. Spoiler:
If you are lazy and you applied the patch above, then you can use this table. It has 100 timers (you can use only part of it if you need less). It starts at 0x0202752C and ends at 0x020275F4. In Var terms, this is 0x4800 to 0x4864. Spoiler:
The second table you will need to insert is a table that has the time limits for all your timers. Each entry is a half-word (two bytes long) and you will need one for each timer that you have in the previous table. There are two options you have for each entry. If you enter in a number other than 0xFFFE, then it will function as a typical timer. For example, if you set it to 0x5, then after five minutes, it will be reset. If you use 0xFFFE, then it turns your timer into a stopwatch. This will make the timer keep going until it reaches 0xFFFF minutes. How long is that? 0xFFFF = 65,535 minutes = 1092.25 hours = 45.5 days = long enough that you probably won't get to that point. Okay, now you're ready to insert this routine somewhere and then add a pointer to it in the Minute Routine table (see FBI's Minute Routine post). Add the addresses of the tables after where it says .VarRAMTable and .TimeLimits. Advance Timer Routine Spoiler:
How To Use Now that we have it all inserted, how do we use it? In order to start a timer, just set the corresponding Var equal to 0x1. If it's a timer, the Var will reset itself when it reaches the limit. If it's a stopwatch, you will have to set it back to zero yourself.Here's an example script showing the basics. It uses the Subtract Var routine that I linked above. In the script, the player is asked if they want some Lemonade. If they accept, they are given a Lemonade item and the timer is set. They can come back after fifteen minutes and get another. If they talk to the NPC before 15 minutes have elapsed, the NPC will tell the player how long they have to wait. Note that this is fifteen minutes of in-game time. Turning off/pausing the game and coming back fifteen minutes later will not count. Spoiler:
Ideas Here are some ideas of what you can use this for.
|
Heyo, i really like the 80x80 Mugshot Routine jiangzhengwenjzw has made and try atm to make it work on emerald, but unfortunately, i couldn´t achieve this.
I already tried to research the offsets for emerald but i couldn´t find the correct offsets for this. So i would like to ask for some help. Can somebody of you help me with the routine, please? It would be awesome, because my knowledge is not the greatest. I also searched a lot on google, but the results, i found, aren´t really useful. |
The following development is done by DoesntKnowHowToPlay, and I have no part in it. This has been re-posted as the original link had died.
[FR] Displaying IV's on the stat screen A small piece of ASM that allows you to view IV's in the Pokémon stat screen. • Step 1 - Image insert First, insert the following image using NSE or TileMolester. Remember the address where you put it: Spoiler:
• Step 2 - Actual ASM Next you will need to insert the following ASM. It doesn't matter where, but do remember where you put it. Code:
Replace the 0x08XXXXXXwith the address of the image you just inserted (no +1 or reverse needed). • Step 3 - Byte changes
Ending notes With that, you should be good to go. In typical Pokémon fashion, this code does not give you the specific values; it instead gives you a unique two-value range. If you want to change that it's rather easy; cut every line starting with lsr in the code and reassemble it, then adjust the image so it has 32 meaningful values instead of 16. Credits DoesntKnowHowToPlay - Actual code, image Lunos - He did the actual Google cache magic too find it Again, this is done by DoesntKnowHowToPlay, and it is not done by me. Any credit should go DoesntKnowHowToPlay, and not me. |
Hey Upsurge,
First, thanks for the feedback at the other thread. Second, I have some questions (I told I was green)... 1) The image you kindly provided was saved at 71C000 (used Free Space Finder to find this spot). Should I replace the XXXXXX in your routine as 0x0871C000 or as 0x71C000? I guess it is the first option but I think it is best to ask. 2) I've copied your routine using Notepad++ and saved as IVRanking.asm but I have no idea about what I do with this file. So, I used a Thumb to turn this .asm into a .bin, opened this .bin file and my rom using HxD and pasted the bin's code inside the ROM starting at 71B500, I think this covers this step - let me know if I'm wrong, please. 3) Quote:
Thanks in advance. |
Quote:
1) This image was by DonestKnowHowToPlay, and yes, like this: 71C000. As an example, the routine would become: Spoiler:
2) Yes, it covers this step. To automagically insert routines into your ROM, use this tool. 3) Basically you go to address's 0x137BF0 and 0x137BE4 in any hex editor, and replace (Ctrl+B) them with the said bytes. |
Thanks for linking the tool, this will make my life easier in the future, I suppose.
Quote:
In your example 0x800000 became 00 80 08 and that is the part that I'm failing to understand. Can you please explain this further? My case is 71B500, would the final input be 00 49 08 47 01 00 71 B5 08? Again, thanks for taking the time to guide me through this. |
Quote:
|
1 Attachment(s)
Quote:
Looks like it is almost done but apparently I messed up somehow. The attached image shows the ranking boxes are there but no value inside though. Edit: This was how I've inserted the image NSE -> Load ROM -> Open Sprite -> Selected the one from the image above -> File -> Insert -> Image Data -> FreeSpaceFinder (checking from the beginning of the ROM and telling the size is 2048 bytes) -> 71C000 - Save It is working perfectly, I was dumb and using an old backup without the inserted image. Thanks for guiding me through this. Cheers! |
Does anyone know how to alter the ASM routine to use a 256x8 image instead of a 128x32 one?
Thanks! |
Quote:
I made all the changes but I can still sell TMs (they are reusable already). On top of your changes I've used HexManiacAdvance to alter the Mystery Byte of TMs to "1" (the same way that HMs are displayed). I'm using CFRU, by the way, but didn't set the flag for reusable TMs while installing that - everything achieved was through this thread (so far: reusable and no number display). Thanks! |
modulate experience with two scripting vars
https://cdn.discordapp.com/attachments/642222929312088065/756675053831323708/help.gif take your experience and multiply it by the "var numerator" and then divide it by the "var denominator" strongly suggest using higher numbers, i.e. if you want a 60% experience thing then set the numerator to 60 and the denominator to 100 so that the processor generates slightly more accurate numbers also make sure that you can't really get more than about 56,000 experience, as that causes interesting errors credit me and akamethebulbasaur for fire red: Spoiler:
|
not to double post but
give your opposing trainers evs and ivs based on a var each https://cdn.discordapp.com/attachments/642222929312088065/757336539675230296/help.gif this primarily to make difficulty hacks where there can be multiple difficulties put a value in one var that you want the opponents ivs to be and another value in another var that you want your opponent's evs to be (and yes, all of them will be the same) the pokemon has to have just a custom item (at least that check mark ticked in your favorite trainer editor) then all of their values will be set. custom moveset doesn't have to be defined :P pastebin right here credit me and doesntknowhowtoplay for fire red: Spoiler:
EDIT: new and improved! only needs you to check the custom item instead of going all in on the moveset too |
Quote:
While I know the CFRU engine exists and likely has these elements, I'm not looking to completely overhaul the game or re-do everything to use that base. I'm also unsure if these could be extracted from CFRU or not. My thinking is that the routines in the quoted post have not been written for FireRed, and a port of them are what I'd need. If someone out there is able to help me with this, please reach out to me on Discord or reply here. Thank you! :) |
Quote:
|
Quote:
- make the trainer's pokémon have a custom held item (moveset optional) - insert the routine - in any script, set the variables that you chose to the evs and ivs you desire i recommend using vars from 0x4012-0x40FF, or if you don't want to clean the rom of its scripts then 0x40C0-0x40FF si quieres un entrenador que tiene evs y ivs que cambian con dificultad, pues necesitas - hacer que el pokemon del entrenador tiene un objeto (moveset no es necesario) - insertar la rutina - en un script, carga las variables que escoges para tener los evs y los ivs a los valores que deseas recomiendo que uses vars desde 0x4012-0x40FF, o si no quieres borrar la rom de sus scripts 0x40C0-0x40FF |
It's been a long time since the main post was updated, so after a few hours I finished to update the index for you to easily find any ASM routine posted in this thread.
If a link is not properly working or I missed a routine feel free to PM me or any mod to add it to the index |
Quote:
Quote:
for fire red: Spoiler:
EDIT: added species requirements and now it doesn't crash wholly tested now basically EDIT: updated it to include gen 7's soul dew updates. note that it can't use the same held effect as the normal soul dew |
Gen 7 Soul Dew Update
link down |
Is there a way to change the species of an egg generated from the daycare to be random between parents? like instead of the egg always hatching as the mother's species, it has a chance if being the father's as well.
for example, if you breed Nidoking with with Kanghaskhan, the resulting egg has a 50% chance of being a Nidoran, instead of always generating a Kangaskhan egg. My idea is to have every pokemon be able to hatch from an egg from normal mothers, male only pokemon are stuck with ditto for mothers. |
I don't suppose you could show me the HEX codes or the compiled script on here.
I've followed everything you put and made the Numerator 60 and Denominator on 100 and it only keeps saying that the Pokémon only receives 1 EXP. Any help please would be great! |
Since the start menu only runs asm offset,
I'd like to request an asm routine that targets and runs any chosen normal script offset for the start menu's selection. Game: BPRE Fire red |
I would like to request for someone to make a fire red ASM routine that will always write the text string “Super Effective” if the move effectivness returns greater than 1 and “not very effective” if it returns less than 1.
I made changes to my type effectivness table to add better depth to it and now the game no longer prints the text! Ive been trying to understand ASM for months now and just cant seem to teach myself fully. Someone with amazing skills...Please help!!! |
Hello.
I'm starting to make a ROM hack (or at least trying to make), and I recently discovered a specific program called TLP which I can edit the sprites. Just to clarify, my plan is to make a Red or a Gold pokemon hack, with the main objective of maintaining the vintage aesthetic of the first game but with more pokemon beyond those that exist only in the first generation. These programs were all founded through google, more specificaly in other threads in this forum. In addition to this program, I am aware of what makes me able to edit the map as a puzzle, but I know that there are still many programs that I need to know and I need to see if I would be able to use it on my computer without problems (many programs that I found through internet had specific problems when I tried to run it, and it certainly has nothing related to problems in my computer, which has a good configuration). I really want to know if I'm on the right path and if there is things that I need to know before move forward with the project. For now, I'm making the sprites of the story characters. The history that I have in mind is a universe full of life, something that I have several texts telling from different moments besides being something that I share with my friends who help me in the story. This first ROM hack I plan on will tell only the beginning of the story. If it works, I intend to go to the end. If it goes as planned, I'm sure things will work out. |
Quote:
|
Hello,
This is a request. I'm learning XSE and trying to create a method to replace tileset dynamically for a map, but I cannot find the right script commands. I guess I'll have to go to ASM. Is it right? If so, it's a long learning curve LOL Use case explained: I want to use RNG Weather + Battle weather that mimics OW weather + dynamic change OW tiles to snow ones when it's snowing. - First I tried to create custom tileset, set it in the cities maps (A-Map) and using a script to change every tile using setmaptile... super impractical and waste of resource consumption... super ugly approach. - Then, I realized the tile positions (X,Y) are static, so creating a "snow tileset" version with tiles in the same position of the original would be much more efficient. I just need a way to dynamic change the tileset when it's snowing. That would be also useful if you want to generate events that dynamically change the map in general (e.g A HUGE Earthquake), so I believe this request could open many possibilities. Example: Spoiler:
Thanks in advance. PS: Yeah, I know about Seasons by DNS tool but I could not find the source code or anything to edit. The tool does not allow you to freely edit the months... e.g. I live in Brazil and December is Summer, not Winter... if anyone has a Github/source code on that, it should work as well. |
Quote:
|
Quote:
|
Quote:
|
Quote:
|
Quote:
Let's say the offset is 800000: 800000+1=800001: 01 00 80 Or if the number of digits is odd: 5673C+1=5673D=05673D: 3D 67 05 Then overwrite bytes at 5CA4C 00 48 00 47 [reverse hex pointer] 08 Then make the script |
Quote:
if my kirlia has a level-up evolution method and a gendered stone evolution method, then when leveling up the game will crash. adding the pointers for the stone evolution in the gendered stone entries will fix the crash. in effect, write 26 30 04 08 in those entries. |
Request for FIRERED:
An asm routine that gets into the Item storage in PC directly without opening any kind of menu first if (you get the gist ryt?) through calling the asm in a script. It would be useful in many ways. Thanks :) |
Summary Screen Wrap-Around First of all, I would like to thank Zeturic for creating the original routine for this. My routine is different from theirs, and I have extended it a bit, which is why I am posting this here. Anyway, this patch modifies the summary screens in both the Party Menu and in the PC so that if you are on the first Pokemon and you go upwards, you will loop around to the last Pokemon (and vice versa). Ordinarily, in this circumstance, nothing would happen. (Download) This folder contains the patch itself, and the two routines that comprise it. There were two functions which were replaced, and both of the new functions were shorter than the originals (hence why this could be turned into a patch). This patch will skip over Eggs when scrolling while in the Party or PC, but if you want to see the Egg's summary (to see how long it will take to hatch), you can select their summary individually. |
Quote:
Edit: I fixed the issue by changing the var to 0x8003, for some reason 8001 and 8002 were insufficient, as obtaining an item from an NPC would still trigger the lock. Now what I'm wondering/ am worried about is whether or not the game is going to trigger this var behind the scenes like it did with the others, if so are there any temporary vars that go completely unused? Thanks :) |
Quote:
I tried editing this line by line to check and see what works, but didn't have any success or changes aside from noticing a binary change. Could somebody please point me in the right direction? |
Quote:
https://i.imgur.com/FKayVct.png https://i.imgur.com/9QvzU7S.png |
Quote:
But the problem is that it thinks that the pokemon is valid, as long as it has the stat HIGHER or equal to what you use. For stuff like levels, atk, def etc. this has a use. But when searching stuff like species, items, attack or status ailments it completely falls apart (unless you want to check how deep down the pokedex a party member is? lol) Anyway, my ASM knowledge is probably negative, but for searching these I think that "bge PokeMatch" would need to be changed to "beq PokeMatch", if you want to match the stats you search (correct me if I'm wrong) and in a cavemanish way, have two of these inserted and using one when you need higher than and the other one for matching the stat. Honestly, it took me a while to figure out how the function is even supposed to work, since it's not very clearly explained. This one caused me quite a headache, so hopefully this helps some poor lad out. |
Quote:
|
Quote:
The IVs are: HP = 0x27 Attack = 0x28 Defence = 0x29 Speed = 0x2A Sp. Attack = 0x2B Sp. Defence = 0x2C So, it actually is as simple as using 0x8005 to modify the IVs directly. |
Quote:
Also, what do you mean by "repeated" OWs? Any more clonable sprites are always helpful, especially in the rom hack I'm making. |
Trying to make it work. Got a few questions, though...
Sorry for the noob questions, this is my first experience with Rom Hacking. |
Quote:
|
I was wondering, how does the variable 0x8000 store a value for 2 type pokemon? thanks
|
Hello,
I'd like to request an ASM to determine an NPC's location on a map. So if an NPC is moved (by the Copy-Player Movement f.ex.) and lands on a certain location, a script should trigger, like breaking a rock in order for the Player to pass. Thank you :) Best regards, Xero3C |
Quote:
|
Thick Club [ Fire Red ]
Spoiler:
|
Stick [ Fire Red ]
Spoiler:
|
Exp Block via Badge [ Fire Red ]
Spoiler:
Edit the level table to your liking. (AAAAAA) |
Quote:
Quote:
How would I solve this? |
Quote:
But I’m sitting here going crazy at the moment because every time I’m testing my rom to see if I have implemented everything correctly, I run into an issue. When I select a starter Pokémon my game freezes after choosing the Pokémon. It only does this after I rewrite 0x42E9C. I have chosen the offset 0x750040 for the routine. So it should be just replacing “00 B5 00 21 00 22 FC F7” with “00 49 08 47 40 00 75 08” right? Not sure if you have had this issue in the past or may have an idea of what I might be doing wrong. Any help is much appreciated! |
Quote:
|
Change Titlescreen Cry For CFRU/DPE based hacks
Simple ASM which changes the TS cry for the ROM's that utilize the CFRU/DPE (since manually changing them doesn't work). Code: Code:
Making it work: Put 01 48 00 47 C0 46 XX XX XX XX 00at x791EEwhere XX XX XX XXis your pointer + 1. That's about it. |
Quote:
|
Hidden Power + Held Item = 2nd Type [ Fire Red ]
Spoiler:
Same Hidden Power + Equivalent Held Item = 2nd Type (Only Works in Single Type Pokémon) Example: Alakazam + Hidden Power Dark + Black Glasses = Psychic / Dark Tauros + Hidden Power Fighting + Black Belt = Normal / Fighting Miltank + Hidden Power Rock + Hard Rock = Normal / Rock Stantler + Hidden Power Psychic + Twisted Spoon = Normal / Psychic |
I would like to request a routine that allows for more region maps in emerald.
I would also like to request a routine that allows for more map names in emerald I'm not sure how hard this would be and I appreciate anybody who writes ASM Routines |
Quote:
|
Quote:
https://www.pokecommunity.com/showpost.php?p=8526603&postcount=196 There is also this tool that assembles and compiles routines https://www.pokecommunity.com/showthread.php?t=314750 |
seemed to work but i cant find the offset mentioned in the post, i hate to sound like a noob, but can you post a video or something. im fairly new to this and i dont get all the lingo.
|
I would like a request an ASM that stores the current map bank and map ID that the player is currently in, in variable let's say in vars 0x8003 and 0x8004
For future dynamic usage :3 (Think of how you drop down to the underground mines and pop out to the surface at the recent route you were in.) |
Quote:
|
Quote:
Hi, the OAM sprite show works wonders. Although, is there a way to delete the OAM sprites rather than hide them? The hide OAM causes glitchy bugs. And after the battle or even talking to an NPC with a yes or no decision/buying at the show, it causes the OAM not to show up using Show OAM. |
Display move power on press select [Fire Red]
when you select some move in battle to change the position will show the power of it. here images for show what i mean. Spoiler:
or replacing the text completely(read the code for see how you can make this). Spoiler:
here the routine. Spoiler:
|
I couldn't find an Emerald equivalent of FBI's PID Generator (used for forced wild shiny encounters), so I decided to port it myself. This post also includes a port for the Random number generating routine that's necessary for the shiny encounter one. For the sake of clarity, the majority of the formatting is the same as FBI's original post.
Random Natural Number Generator Simply compile into free space the following routine: Spoiler:
Shiny Pokémon Before you can insert this routine you need to have inserted the Random number generating routine from before. Remember the offset which you inserted it because you're going to need to remember in a short while. Look at the orange text in spoiled code below. Insert inside the brackets the location of where you compiled the random number generator code. Make sure to add an 0x8 prefix. So if I compiled the random number generator at 0x743210, I'd write: Code:
Spoiler:
Now navigate to 0x067BF8 and insert the following byte changes: Code:
Finally, go to 0x067BEE and insert the following byte changes: Code:
Code:
Here are two Sharpedo generated with the same hack (no EVs). https://i.imgur.com/fZ922T5.png All credits go to FBI! I merely ported these routines to Emerald. |
Quote:
|
Ok so I have an .asm for a custom level/experience range system sent by a friend of mine but I am struggling to install it and he forgot to do so he can't help.
Spoiler:
I turned it into a bin, put the code in an empty space and wrote on the place was supposed to be, replacing the XX XX XX with my address of choice for the code as usual. However, every time I try I have 2 results, either it Doesn't work at all Every battle soft-resets the game Does anyone know what am I doing wrong, I'm doing it on Ruby and this code is for RSE btw and if I recall correctly, is based on this one https://www.pokecommunity.com/showpost.php?p=9727834&postcount=1251 |
Quote:
This code is not for ruby, it is for FR and Em, besides that I see that the one you are using is for FR due to the address of the table 0x254784, if you need it for ruby you should look for the corresponding compensations but the routines do not always work since at least in ruby there are many different things compared to FR and Em that are more similar. |
Quote:
Furthermore when I applied to Emerald, the game would soft reset every time I received the experience |
Quote:
|
Quote:
|
Quote:
I try the script for EM, first I modified 0x0804A67B to 0x0804A66B at line 10 because I don't use that Exp. All patch, then I compiled it and insert them into 0x32A5F0 since there has a lot of 00, modified 0x4A5AC to 00 48 00 47 F0 A5 32 08 as your tutorial said, seems it all OK, but... I tried to find a wild Pokemon to battle, after I win, the game crashed and mGBA gives an error message said somehow "Jumped to invalid address 0x09670880". Could you help me how to implement it so it works well? Thanks. |
Quote:
ldr r0, #=0x0832A5F1 bx r0 The first thing loads the location of the routine, and the second tells the game to jump there. However, when you use bx in particular, you need to add one to the location of the routine. The game has two modes, ARM and THUMB. When we do ASM, we use THUMB. The "bx r0" part jumps to the location you put in r0, but it also switches modes. If r0 has an even number, it goes to ARM mode (which we don't want). The solution is to add +1 to the routine so that r0 will be odd so it will stay in THUMB. So, any time you call a routine this way (which will be 99.99999% of the time), you need to add one. I thought I would explain it since maybe some people don't know exactly why you have to do that. Try doing that, and if it still doesn't work then we'll move from there! |
Quote:
This time emulator won't pop up an error, but game stucks on "Wild <Name> fainted!" and producing garbage audio. Oh wait, I need to try battle with trainer! However no luck, when my Pokemon defeat an enemy, game encounters an error, mGBA said jumped to invalid address 0xFDFFB954. I have no idea how to implement this correctly :( |
Quote:
You can change the routine you have now by replacing "D1 E6 06 08" with "91 D7 09 08". This should allow it to work, as this made it work on a clean ROM. |
Quote:
|
Automatic swap page on naming screen [Fire Red]
when you write the first character in the naming screen of a pokemon(or the player/rival) the page automatic swap to lower case. here the routine. Spoiler:
credits: Jaizu for the EM one made in C, i just port it to FR binary. |
Hiya! I have a hack request for FireRed or RSE: Universal Pokemon Randomizer (UPR) + In-Battle Type Display
I'd like to use UPR combined with a, to my knowledge, non-existent hack that shows a pokemon's typing(s) in battle so I can react to its randomized typing. I've attempted to mix UPR with Complete FireRed Upgrade (CFRU), as it has the type showing functionality, even following its documentation to remove functionalities I didn't want, but CFRU overall adds too many things past gen 3 that UPR doesn't handle. I should also mention that I have Radical Red (which has the in-battle type showing functionality), but its randomizer is very limited and it doesn't even randomize types. Something I could preferably patch before patching with UPR would be awesome. Patching after UPR would be fine too In the meantime I'll hopefully be researching ASM to attempt this myself Also please withhold fan game recommendations (rather than romhack recs), because I prefer playing roms on my 3ds |
Extremely decent instructional exercise!
The main thing I didn't comprehend is the motivation behind why we want midfix4agb.exe, as it appears to be not to be remembered for the instructional exercise. :( |
Quote:
Eu queria ver como era essa rotina em ação. ^_^ achei a temática legal. O pequeno problema é que mesmo seguindo tutoriais que nos mesmos, funcionam a expansão de métedos evolutivos, eu não consigo fazer os métodos novos funcionarem enquanto eu jogo =_= Queria saber ASM para fazer um metódo evolutivo igual ou semelhante ao de Basculegion, Ursaluna ou Wyrdeer e Overqwill T-T |
I dont know if it already exists but is there any routine to show Pokemon icon at desired X Y position.
|
Quote:
#dynamic 0x800000 #org @start showpokepic 0x[n° pokémon species to display] 0x[X coordinate] 0x[Y coordinate] pause 0x80 hidepokepic end |
No i meant the mini icons
The smaller one which we can seen in Pokemon selection screen. |
I know this is an old thread, but I tried porting this to Emerald, and I'm stuck.
Spoiler:
I can't find the equivalent of "sub_80A16D0" in Emerald. |
Quote:
(0x806B922 +1) (0x806B8A6 +1) 0x6B89A I already found the corresponding one for (0x30030F0). |
Quote:
|
Quote:
Spoiler:
I also tried using waitbutton command from PKSV then callasm this routine but It just sets the var to 0. Also waitbutton only accepts "A" and "B" Spoiler:
|
Quote:
|
Quote:
I correctly installed Delete Fainted Pokémon and it worked, but Sleep Clause did not :[ Quote:
|
How do you input these codes?
|
Quote:
I want to use this on my rom hack, Can you help me? i'm not really good at scripting |
Quote:
There is a huge problem: If I use a Kelpsy Berry, it will reduce my Pokémon's Attack EVs without error, but if I use a Protein, the item is not consumed. 😡 If I accidentally use it on a level 100 Pokemon, I can no longer increase the EVs. How can this be fixed? |
I wonder is there has a code implements BW item use system...
If selected item (such as Potion) has many, on map use it to a Pokemon (or it won't affect) won't back to bag automaticly unless that item is last one. |
Quote:
i think its on HMA discord. try join that and you will see |
| All times are GMT -8. The time now is 8:46 AM. |
![]()
© 2002 - 2018 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2016 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.
Acknowledgements
Use of PokéCommunity Assets
vB Optimise by DragonByte Technologies Ltd © 2023.