The PokéCommunity Forums

The PokéCommunity Forums (https://www.pokecommunity.com/index.php)
-   Binary ROM Hacking (https://www.pokecommunity.com/forumdisplay.php?f=284)
-   -   Help Thread Quick Questions & Answers (https://www.pokecommunity.com/showthread.php?t=335486)

Sayuri October 1st, 2015 6:33 PM

I have two problems that recently popped up:

1. I inserted a new map and everything went fine, but I can't run when I enter it. I have the type set to ROUTE, as well.

2. When I press Start, it opens up a menu like I'm in the Safari Zone; ?71/600 balls, RETIRE option, etc. Is there a way to fix this, and what may have caused it?

azurile13 October 1st, 2015 6:33 PM

Quote:

Originally Posted by DraconianWing (Post 8949959)
Is there a way to edit/find the encounter rate of each Pokemon in A-Map 1.92? I know there is a slide dial for "Encounter ratio", but I'm assuming that it's used to adjust the frequency of encounters? (not the actual chance of finding a respective species)


Iirc, the first two are ~20%, the next four are ~10%, the next two are 5%, the next two are 4%, and the last two are 1%. If you want to edit those numbers, it wouldn't be hard, but you would be affecting every grass map encounter in the game. Also I only know the specific offsets for FireRed.

Blah October 2nd, 2015 6:50 AM

To be specific, these are the values and calculations for Fire Red which I've found.
Code:

rand(100) = n
{n ∈ ℕ : n < 100} = { 0, 1, 2, 3, ..., 99}

zero    :rand(100) - 0  <  20          = 0  to 19      = 20%
one    :rand(100) - 20 <= 19          = 20 to 39      = 20%
two    :rand(100) - 40 <= 9            = 40 to 49      = 10%
three  :rand(100) - 50 <= 9            = 50 to 59      = 10%
four    :rand(100) - 60 <= 9            = 60 to 69      = 10%
five    :rand(100) - 70 <= 9            = 70 to 79      = 10%
six    :rand(100) - 80 <= 4            = 80 to 84      = 5%
seven  :rand(100) - 85 <= 4            = 85 to 89      = 5%
eight  :rand(100) - 90 <= 3            = 90 to 93      = 4%
nine    :rand(100) - 94 <= 3            = 94 to 97      = 4%
ten    :rand(100) - 98 >  0            = 99 to 100    = 1%
eleven  :rand(100) - 98 =  0            = 98 to 98      = 1%



Code:

ROM:0808274C wild_pokemon_rand_grass:                @ CODE XREF: sub_8082AEC:loc_8082B16p
ROM:0808274C                                        @ wild_pokemon_rand_for_map:loc_8083060p
ROM:0808274C                PUSH    {LR}
ROM:0808274E                BL      rand
ROM:08082752                LSLS    R0, R0, #0x10
ROM:08082754                LSRS    R0, R0, #0x10
ROM:08082756                MOVS    R1, #0x64 @ 'd'
ROM:08082758                BL      __umodsi3
ROM:0808275C                LSLS    R0, R0, #0x18
ROM:0808275E                LSRS    R1, R0, #0x18
ROM:08082760                CMP    R1, #0x13
ROM:08082762                BHI    loc_8082768
ROM:08082764                MOVS    R0, #0
ROM:08082766                B      loc_8082802
ROM:08082768 @ ---------------------------------------------------------------------------
ROM:08082768
ROM:08082768 loc_8082768:                            @ CODE XREF: wild_pokemon_rand_grass+16j
ROM:08082768                MOVS    R0, R1
ROM:0808276A                SUBS    R0, #0x14
ROM:0808276C                LSLS    R0, R0, #0x18
ROM:0808276E                LSRS    R0, R0, #0x18
ROM:08082770                CMP    R0, #0x13
ROM:08082772                BHI    loc_8082778
ROM:08082774                MOVS    R0, #1
ROM:08082776                B      loc_8082802
ROM:08082778 @ ---------------------------------------------------------------------------
ROM:08082778
ROM:08082778 loc_8082778:                            @ CODE XREF: wild_pokemon_rand_grass+26j
ROM:08082778                MOVS    R0, R1
ROM:0808277A                SUBS    R0, #0x28 @ '('
ROM:0808277C                LSLS    R0, R0, #0x18
ROM:0808277E                LSRS    R0, R0, #0x18
ROM:08082780                CMP    R0, #9
ROM:08082782                BHI    loc_8082788
ROM:08082784                MOVS    R0, #2
ROM:08082786                B      loc_8082802
ROM:08082788 @ ---------------------------------------------------------------------------
ROM:08082788
ROM:08082788 loc_8082788:                            @ CODE XREF: wild_pokemon_rand_grass+36j
ROM:08082788                MOVS    R0, R1
ROM:0808278A                SUBS    R0, #0x32 @ '2'
ROM:0808278C                LSLS    R0, R0, #0x18
ROM:0808278E                LSRS    R0, R0, #0x18
ROM:08082790                CMP    R0, #9
ROM:08082792                BHI    loc_8082798
ROM:08082794                MOVS    R0, #3
ROM:08082796                B      loc_8082802
ROM:08082798 @ ---------------------------------------------------------------------------
ROM:08082798
ROM:08082798 loc_8082798:                            @ CODE XREF: wild_pokemon_rand_grass+46j
ROM:08082798                MOVS    R0, R1
ROM:0808279A                SUBS    R0, #0x3C @ '<'
ROM:0808279C                LSLS    R0, R0, #0x18
ROM:0808279E                LSRS    R0, R0, #0x18
ROM:080827A0                CMP    R0, #9
ROM:080827A2                BHI    loc_80827A8
ROM:080827A4                MOVS    R0, #4
ROM:080827A6                B      loc_8082802
ROM:080827A8 @ ---------------------------------------------------------------------------
ROM:080827A8
ROM:080827A8 loc_80827A8:                            @ CODE XREF: wild_pokemon_rand_grass+56j
ROM:080827A8                MOVS    R0, R1
ROM:080827AA                SUBS    R0, #0x46 @ 'F'
ROM:080827AC                LSLS    R0, R0, #0x18
ROM:080827AE                LSRS    R0, R0, #0x18
ROM:080827B0                CMP    R0, #9
ROM:080827B2                BHI    loc_80827B8
ROM:080827B4                MOVS    R0, #5
ROM:080827B6                B      loc_8082802
ROM:080827B8 @ ---------------------------------------------------------------------------
ROM:080827B8
ROM:080827B8 loc_80827B8:                            @ CODE XREF: wild_pokemon_rand_grass+66j
ROM:080827B8                MOVS    R0, R1
ROM:080827BA                SUBS    R0, #0x50 @ 'P'
ROM:080827BC                LSLS    R0, R0, #0x18
ROM:080827BE                LSRS    R0, R0, #0x18
ROM:080827C0                CMP    R0, #4
ROM:080827C2                BHI    loc_80827C8
ROM:080827C4                MOVS    R0, #6
ROM:080827C6                B      loc_8082802
ROM:080827C8 @ ---------------------------------------------------------------------------
ROM:080827C8
ROM:080827C8 loc_80827C8:                            @ CODE XREF: wild_pokemon_rand_grass+76j
ROM:080827C8                MOVS    R0, R1
ROM:080827CA                SUBS    R0, #0x55 @ 'U'
ROM:080827CC                LSLS    R0, R0, #0x18
ROM:080827CE                LSRS    R0, R0, #0x18
ROM:080827D0                CMP    R0, #4
ROM:080827D2                BHI    loc_80827D8
ROM:080827D4                MOVS    R0, #7
ROM:080827D6                B      loc_8082802
ROM:080827D8 @ ---------------------------------------------------------------------------
ROM:080827D8
ROM:080827D8 loc_80827D8:                            @ CODE XREF: wild_pokemon_rand_grass+86j
ROM:080827D8                MOVS    R0, R1
ROM:080827DA                SUBS    R0, #0x5A @ 'Z'
ROM:080827DC                LSLS    R0, R0, #0x18
ROM:080827DE                LSRS    R0, R0, #0x18
ROM:080827E0                CMP    R0, #3
ROM:080827E2                BHI    loc_80827E8
ROM:080827E4                MOVS    R0, #8
ROM:080827E6                B      loc_8082802
ROM:080827E8 @ ---------------------------------------------------------------------------
ROM:080827E8
ROM:080827E8 loc_80827E8:                            @ CODE XREF: wild_pokemon_rand_grass+96j
ROM:080827E8                MOVS    R0, R1
ROM:080827EA                SUBS    R0, #0x5E @ '^'
ROM:080827EC                LSLS    R0, R0, #0x18
ROM:080827EE                LSRS    R0, R0, #0x18
ROM:080827F0                CMP    R0, #3
ROM:080827F2                BHI    loc_80827F8
ROM:080827F4                MOVS    R0, #9
ROM:080827F6                B      loc_8082802
ROM:080827F8 @ ---------------------------------------------------------------------------
ROM:080827F8
ROM:080827F8 loc_80827F8:                            @ CODE XREF: wild_pokemon_rand_grass+A6j
ROM:080827F8                CMP    R1, #0x62 @ 'b'
ROM:080827FA                BEQ    loc_8082800
ROM:080827FC                MOVS    R0, #0xB
ROM:080827FE                B      loc_8082802
ROM:08082800 @ ---------------------------------------------------------------------------
ROM:08082800
ROM:08082800 loc_8082800:                            @ CODE XREF: wild_pokemon_rand_grass+AEj
ROM:08082800                MOVS    R0, #0xA
ROM:08082802
ROM:08082802 loc_8082802:                            @ CODE XREF: wild_pokemon_rand_grass+1Aj
ROM:08082802                                        @ wild_pokemon_rand_grass+2Aj ...
ROM:08082802                POP    {R1}
ROM:08082804                BX      R1


The encounter ratio in Advance Map is just an encounter ratio for when to do a wild battle, rather than the Pokemon's encounter ratios. These encounter ratios, as you see, are hard coded. It wouldn't be hard at all to expand this into map specific values. I'd hook right before this is called and compare the map values before deciding how to roll it.

Blah October 2nd, 2015 6:58 AM

Quote:

Originally Posted by DogPolice (Post 8950002)
I have two problems that recently popped up:

1. I inserted a new map and everything went fine, but I can't run when I enter it. I have the type set to ROUTE, as well.

2. When I press Start, it opens up a menu like I'm in the Safari Zone; ?71/600 balls, RETIRE option, etc. Is there a way to fix this, and what may have caused it?

Bleh, just enable running shoes everywhere imo.

Running:
0x805BA38 - Running Shoes without flag insert 00 00 00 00 00 00 00 00 00 00 00 00
0x805BA52 - Running inside insert 00 00 00 00 00 00 00 00

gazelle93 October 3rd, 2015 1:20 AM

So, having a setback in my Hack. For some reason everytime I write a script that involves moving another sprite (i.e. rival/trainer) the game just freezes. My script looks no different then one off the original game but this issue still continues to happen. Any solutions or has anybody else experienced this issue?

Fristi61 October 3rd, 2015 1:39 AM

Quote:

Originally Posted by DraconianWing (Post 8949959)
Is there a way to edit/find the encounter rate of each Pokemon in A-Map 1.92? I know there is a slide dial for "Encounter ratio", but I'm assuming that it's used to adjust the frequency of encounters? (not the actual chance of finding a respective species)

As said before, for grass, Pokemon 1&2=20%, 3-6=10%, 7&8=5%, 9&10=4%, 11&12=1%.
You can have the same pokemon in multiple slots, so for example if you have the same pokemon in slots 1, 3, 8 and 11 then that pokemon will have a 20% + 10% + 5% + 1% = 36% chance of appearing.

However, I figured you might also be interested in the rates for surfing, rock smash and fishing, which are different and hadn't been mentioned yet.

Surfing/rock smash/"tree" (only 5 slots):
Slot 1 = 60%.
Slot 2 = 30%.
Slot 3 = 5%
Slot 4 = 4%
Slot 5 = 1%

Fishing (as you can see, the first 2 slots only pertain to old rods, the next 3 to good rods and the last 5 to super rods):
Slot 1: 70% when using old rod.
Slot 2: 30% when using old rod.
Slot 3: 60% when using good rod.
Slot 4&5: 20% when using good rod.
Slot 6&7: 40% when using super rod.
Slot 8: 15% when using super rod.
Slot 9: 4% when using super rod.
Slot 10: 1% when using super rod.

Aruaruu October 3rd, 2015 4:25 AM

What about the Rock Smash encounters? They have 5 slots so same as Surfing?

Fristi61 October 3rd, 2015 4:40 AM

Quote:

Originally Posted by Aruaruu (Post 8952069)
What about the Rock Smash encounters? They have 5 slots so same as Surfing?

Good call, I forgot those. Yes, those slots all seem to have the exact same weights as those in surfing.

Meister G. Rool October 3rd, 2015 9:05 PM

I'm not sure if I'm wording this correctly, but if I make a mistake on a script, how do I use a hex editor to change the data back to being unused? Is there any kind of universal method or does it depend on the hex editor I'm using?

chrunch October 4th, 2015 12:47 AM

Quote:

Originally Posted by Meister G. Rool (Post 8953234)
I'm not sure if I'm wording this correctly, but if I make a mistake on a script, how do I use a hex editor to change the data back to being unused? Is there any kind of universal method or does it depend on the hex editor I'm using?

You don't have to use one, you can just do #removeall 0x(your script) in XSE.

Meister G. Rool October 4th, 2015 9:18 AM

Wow, that's really convenient. Thank you very much!

TheEndeavor October 4th, 2015 4:48 PM

Hello! I decided to use LCCoolJ95's 650 Emerald patch and quickly remembered that when you add Pokemon to a ROM they don't magically appear in A-Map. I was wondering if it was possible to add Pokemon on A-Map(1.95 or 1.92)'s Pokemon listing?

PurpleOrange October 5th, 2015 12:07 AM

Quote:

Originally Posted by TheEndeavor (Post 8954388)
Hello! I decided to use LCCoolJ95's 650 Emerald patch and quickly remembered that when you add Pokemon to a ROM they don't magically appear in A-Map. I was wondering if it was possible to add Pokemon on A-Map(1.95 or 1.92)'s Pokemon listing?

emerald 650 comes with an a-map in in, just use that

TheEndeavor October 5th, 2015 3:52 AM

Quote:

Originally Posted by PurpleOrange (Post 8954694)
emerald 650 comes with an a-map in in, just use that

Oh, right then. Thank you I missed that entirely.

chestertagat October 5th, 2015 4:00 AM

Guys im having Problem fixing the Errors on my Newly inserted Tiles in my Hack . Ive Replaced all the Contents of Tileset0(Including its Pallettes (0-6)) and Replaced it with the new ones that i inserted ive also changed the Placements of The Tiles. Now im having problem because whenever i load my game and goto to that map , Some other tiles is Replaced by A Running Water Animation, A Flower animation and Sea Water Animation . If anybody can help me with these or Give tips , It will be Appreciated. TIA :) Anyway im using A-Map 1.95

Sniper October 5th, 2015 4:39 AM

Quote:

Originally Posted by chestertagat (Post 8954778)
Guys im having Problem fixing the Errors on my Newly inserted Tiles in my Hack . Ive Replaced all the Contents of Tileset0(Including its Pallettes (0-6)) and Replaced it with the new ones that i inserted ive also changed the Placements of The Tiles. Now im having problem because whenever i load my game and goto to that map , Some other tiles is Replaced by A Running Water Animation, A Flower animation and Sea Water Animation . If anybody can help me with these or Give tips , It will be Appreciated. TIA :) Anyway im using A-Map 1.95

You probably replaced the animation tiles with your tiles. That's why it shows the animation even though you replaced them. So there's two solution for that. Is either reinsert your tiles by not placing your tiles on the animation tiles or by removing the animation tiles using animation tile editor and vanishing those animations completely. But you'll loose the original animation but I guess you won't be needing them since you replaced it already.

But I suggest you put some space if you need some animation for your tiles. Having tiles with no animation is clearly boring as hell, right? Also, I suggest you use A-map 1.95 for tile inserting and use A-map 1.92 for mapping to prevent mapping error. I can't quite explain but I highly recommend you take my advice. I guess that's enough details. You go on the rest ^^

PiGreat October 5th, 2015 1:07 PM

This is probably gonna sound really dumb but whatevs. So I'm performing the long, arduous process of adding Pokémon into my hack (using MrDollSteak's decapitalisation and attack ROM base) but I think I kinda screwed up since ALL of the moves' names and what have you are replaced with "\x". Can I fix this? Is this normal? Am I boned?

Here's a pic:

Thanks in advance~

Blah October 5th, 2015 3:03 PM

Quote:

Originally Posted by PiGreat (Post 8955308)
This is probably gonna sound really dumb but whatevs. So I'm performing the long, arduous process of adding Pokémon into my hack (using MrDollSteak's decapitalisation and attack ROM base) but I think I kinda screwed up since ALL of the moves' names and what have you are replaced with "\x". Can I fix this? Is this normal? Am I boned?

Here's a pic:

Thanks in advance~

You're not boned. Go back and fix the ini, the table it's reading from is a bunch of 0xFF bytes. MrDS's patch comes with a table of offsets, make sure they are matched in your ini file.

PiGreat October 5th, 2015 4:05 PM

Right. I know I'm running the risk of seeming stupid here (well, I mean, I am. Technically. We've all gotta start somewhere I guess), but I'm correct in assuming that the table of offsets is in the rather appropriately named "tablelocations.txt", right? That being the case, where exactly do I put each the offsets in the .ini file? There are a whole bunch of different offsets here and I'm scared of screwing up.

Sorry about all this.

Blah October 5th, 2015 4:50 PM

Quote:

Originally Posted by PiGreat (Post 8955458)
Right. I know I'm running the risk of seeming stupid here (well, I mean, I am. Technically. We've all gotta start somewhere I guess), but I'm correct in assuming that the table of offsets is in the rather appropriately named "tablelocations.txt", right? That being the case, where exactly do I put each the offsets in the .ini file? There are a whole bunch of different offsets here and I'm scared of screwing up.

Sorry about all this.

Further than that I have no idea, sorry. I just know what the issue is, I haven't used GS3, nor do I know how it's ini is formatted :(

The idea is you replace the outdated/incorrect table offset in the ini with the corresponding real one from DS's patch. Unfortunately in DS's table.txt he doesn't mention where the original ones are, however I see in your GS3 UI it says that it's reading from 0x257494 for turtwig. Try going to the first entry, subtracting the length of the data once from that for the 0th entry and looking for the corresponding offset. Iirc, you go to 0xFFFFFE and type in 00 00 then change BPRE to MrDS or something like that (unsure once again, since I haven't tried it).

NewDenverCity October 5th, 2015 4:54 PM

Quote:

Originally Posted by PiGreat (Post 8955458)
Right. I know I'm running the risk of seeming stupid here (well, I mean, I am. Technically. We've all gotta start somewhere I guess), but I'm correct in assuming that the table of offsets is in the rather appropriately named "tablelocations.txt", right? That being the case, where exactly do I put each the offsets in the .ini file? There are a whole bunch of different offsets here and I'm scared of screwing up.

Sorry about all this.

If you downloaded the official zip in the thread, you'll have all the inis you want. Just replace the original ini with the one that came with the zip.

Geodude6 October 6th, 2015 11:32 AM

Do we know how to do tag battles yet in FRLG? I want to have the player do a battle similar to the battle against Volkner and Flint in Pt, (and I want to have them cheat and use 4 pokes each) but a while back I read that one of the "pros" of using Emerald is that it's the only Gen III game with tag battles. Do we now know how to do that in FRLG or does this statement still ring true?

DonSems October 6th, 2015 1:10 PM

Quote:

Originally Posted by Geodude6 (Post 8956437)
Do we know how to do tag battles yet in FRLG? I want to have the player do a battle similar to the battle against Volkner and Flint in Pt, (and I want to have them cheat and use 4 pokes each) but a while back I read that one of the "pros" of using Emerald is that it's the only Gen III game with tag battles. Do we now know how to do that in FRLG or does this statement still ring true?

I accidently selected dual battle in A Trainer and it worked fine for me. I haven't tried using dual battles yet as I am a noob and not really that far into my hack. I've heard people say it can be glitchy like if you have 1 poke in your party it will send out 2 of the same poke. Play around with it see what happens.

DonSems October 6th, 2015 1:13 PM

Any1 know of a link to Nameless Sprite Editor Classic or any other decent tool to edit overworld sprites? The link here in pokecommunity doesn't seem to be working for me.

Geodude6 October 6th, 2015 1:15 PM

Quote:

Originally Posted by DonSems (Post 8956591)
I accidently selected dual battle in A Trainer and it worked fine for me. I haven't tried using dual battles yet as I am a noob and not really that far into my hack. I've heard people say it can be glitchy like if you have 1 poke in your party it will send out 2 of the same poke. Play around with it see what happens.

I'm not talking about double battles like the battles with couples, twins, etc. I'm talking about tag battles, like in HGSS where you team up with Lance to fight Ariana. IE, 2-on-2 trainer battles with each trainer using one at a time. Though, the way I want to implement it is with the player fighting alone, using two Pokemon at once while the other two trainers team up against the player.


All times are GMT -8. The time now is 2:33 AM.


Like our Facebook Page Follow us on Twitter © 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.