The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Fan Games > Binary ROM Hacking > Binary Hack Research & Development
Reload this Page Quick Research & Development Thread

Notices
For all updates, view the main page.

Binary Hack Research & Development Got 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!

Ad Content
Reply
 
Thread Tools
  #651   Link to this post, but load the entire thread.  
Old May 3rd, 2015 (6:50 AM).
Navenatox's Avatar
Navenatox Navenatox is offline
 
Join Date: Jan 2015
Location: Austria
Age: 28
Gender: Male
Posts: 76
Event dependent map music

I wasn't sure if I should post this here or in the ASM resource thread, but I decided to post it here. If the ASM resource thread is more adequate for something like this, feel free to move it there.

So I've written a little routine that makes the game load a different track number than the one that's specified in the map header if a certain variable has a certain value. Basically what it does is it goes through a table and searches for a suited entry. The table can be inserted at any address at your convenience. Here's what an entry has to look like:
Byte: map bank
Byte: map number
Hword: track number
Hword: variable number
Hword: variable value

For example, if you want to have the map 3.0 play the song 0x130 when variable 0x40D0 holds the value 1, your entry should look like this: 03 00 30 01 D0 40 01 00.

Important: The table has to be terminated by FF FF, otherwise the routine wouldn't stop searching.
If the routine doesn't find any entry whose conditions are met, it will load the track from the map header. Vice versa, if more than one condition would be met, only the first track will be loaded. Also note that when you insert this routine, the already existing non-standard tracks of RSE (like the one during the weather crisis) won't work by default anymore.

To insert it, you have to write the following:
At 55D6C (FR) or at 8565C (EM)
Code:
00 49 08 47 XX XX XX XX
XX XX XX XX has to be replaced with the pointer to the routine (+1 of course).

The routine for FR is
Code:
30 B5 0E 4C 05 1C 20 88 0D 49 88 42 0E D0 29 88 88 42 09 D1 A0 88 0B 4A 00 F0 0F F8 00 88 E1 88 88 42 01 D1 60 88 07 E0 08 34 EC E7 28 78 69 78 05 4A 00 F0 02 F8 00 8A 30 BD 10 47 YY YY YY YY FF FF 00 00 55 E4 06 08 39 52 05 08
and for EM
Code:
30 B5 0E 4C 05 1C 20 88 0D 49 88 42 0D D0 29 88 88 42 08 D1 A0 88 0B 4A 00 F0 0E F8 E1 88 88 42 01 D1 60 88 07 E0 08 34 ED E7 28 78 69 78 06 4A 00 F0 02 F8 00 8A 30 BD 10 47 00 00 YY YY YY YY FF FF 00 00 95 D6 09 08 91 4A 08 08
YY YY YY YY has to be replaced with the pointer to the table mentioned above.
Reply With Quote
  #652   Link to this post, but load the entire thread.  
Old May 3rd, 2015 (7:48 AM).
Le pug's Avatar
Le pug Le pug is offline
Creator of Pokémon: Discovery / Fat Kid
 
Join Date: Aug 2013
Location: Le bed
Age: 30
Gender: Male
Nature: Bold
Posts: 870
Does your Emerald hack sound like this? Are you having sound corruption?

[hd]TUP78I9H4Qw[/hd]

Well then go to 0x2E0000 and you should see something like
Code:
00 00 00 00 00 00 00 00 00 68 C8 40 61 46 4C 68
Well for most cases just replace the 00s before the 68 byte with this line (just CTRL + B at 0x2E0000):

Code:
10 40 80 00 00 19 09 09 00 68 C8 40 61 46 4C 68
And there you have it, sound corruption fixed. Here's the same video with sound corrected:

[hd]WBwWDkCYut8[/hd]
__________________
Retired. Thank you guys for a wonderful five years.
Reply With Quote
  #653   Link to this post, but load the entire thread.  
Old May 13th, 2015 (8:30 PM).
Criminon's Avatar
Criminon Criminon is offline
Forever Spriting
 
Join Date: Aug 2012
Location: California
Gender: Male
Nature: Timid
Posts: 264
Quote:
Originally Posted by DoesntKnowHowToPlay View Post


XY added a feature that gives experience points when you catch pokemon. To duplicate this in FR, do the following:

Repoint the battle script at x1d9a42 to point to this:

2A 00 68 3D 02 02 05 00 50 9A 1D 08 60 0B 10 0B 01 F1 XX XX XX XX 2E E0 3F 02 02 00 2E 0C 3C 02 02 00 2E 0D 3C 02 02 00 23 00 10 0F 01 3A 2E 82 3E 02 02 00 F2 10 0D 01 3A 2E 82 3E 02 02 00 F3 80 9A 1D 08 F0 13 54 E6 3F 08 12 40 00 28 81 9A 1D 08

where XX XX XX XX is a pointer to:

2E E0 3F 02 02 00 2E 0C 3C 02 02 00 2E 0D 3C 02 02 00 23 00 10 0D 01 3A 2E 82 3E 02 02 00 F3 80 9A 1D 08 F0 13 54 E6 3F 08 12 40 00 28 81 9A 1D 08

To let the player's mons evolve from this experience, replace the bytes at x15A68 with A1 5A 01 08.

Edit: Changed the scripts, I assumed they cut off earlier than they actually did. Should work with full party+no nickname now.
Is there a fix for this on some page that I'm not seeing? I double checked my work before posting, so I'm confident that my inputs are correct. It seems that if your pokemon are level 100 (a full party) the game freezes after the "give it a name" and if you have one pokemon (level 100) in your party, once it asks you for a name, it takes you to the pokemon select screen and doesn't let you do anything.


Below are the exact steps I took:

Spoiler:
Install
2E E0 3F 02 02 00 2E 0C 3C 02 02 00 2E 0D 3C 02 02 00 23 00 10 0D 01 3A 2E 82 3E 02 02 00 F3 80 9A 1D 08 F0 13 54 E6 3F 08 12 40 00 28 81 9A 1D 08

at 7FFF50 which becomes 51 FF 7F 08 when turned into a pointer.

I then put this pointer in

2A 00 68 3D 02 02 05 00 50 9A 1D 08 60 0B 10 0B 01 F1 51 FF 7F 08 2E E0 3F 02 02 00 2E 0C 3C 02 02 00 2E 0D 3C 02 02 00 23 00 10 0F 01 3A 2E 82 3E 02 02 00 F2 10 0D 01 3A 2E 82 3E 02 02 00 F3 80 9A 1D 08 F0 13 54 E6 3F 08 12 40 00 28 81 9A 1D 08

and then I overwrote what was at x1d9a42 and then changed the bytes at x15A68 to A1 5A 01 08.
__________________
Unbound Team / Crown Team
Reply With Quote
  #654   Link to this post, but load the entire thread.  
Old May 14th, 2015 (12:11 AM).
jirachiwishmaker's Avatar
jirachiwishmaker jirachiwishmaker is offline
 
Join Date: Jul 2007
Location: Forina
Gender: Male
Nature: Lonely
Posts: 116
Quote:
Originally Posted by Criminon View Post
Is there a fix for this on some page that I'm not seeing? I double checked my work before posting, so I'm confident that my inputs are correct. It seems that if your pokemon are level 100 (a full party) the game freezes after the "give it a name" and if you have one pokemon (level 100) in your party, once it asks you for a name, it takes you to the pokemon select screen and doesn't let you do anything.


Below are the exact steps I took:

Spoiler:
Install
2E E0 3F 02 02 00 2E 0C 3C 02 02 00 2E 0D 3C 02 02 00 23 00 10 0D 01 3A 2E 82 3E 02 02 00 F3 80 9A 1D 08 F0 13 54 E6 3F 08 12 40 00 28 81 9A 1D 08

at 7FFF50 which becomes 51 FF 7F 08 when turned into a pointer.

I then put this pointer in

2A 00 68 3D 02 02 05 00 50 9A 1D 08 60 0B 10 0B 01 F1 51 FF 7F 08 2E E0 3F 02 02 00 2E 0C 3C 02 02 00 2E 0D 3C 02 02 00 23 00 10 0F 01 3A 2E 82 3E 02 02 00 F2 10 0D 01 3A 2E 82 3E 02 02 00 F3 80 9A 1D 08 F0 13 54 E6 3F 08 12 40 00 28 81 9A 1D 08

and then I overwrote what was at x1d9a42 and then changed the bytes at x15A68 to A1 5A 01 08.
The pointer doesn't need +1 at here, this is battle script and not ASM code, so the correct one is 50 FF 7F 08.
Reply With Quote
  #655   Link to this post, but load the entire thread.  
Old May 14th, 2015 (12:59 AM). Edited May 14th, 2015 by Criminon.
Criminon's Avatar
Criminon Criminon is offline
Forever Spriting
 
Join Date: Aug 2012
Location: California
Gender: Male
Nature: Timid
Posts: 264
Quote:
Originally Posted by jirachiwishmaker View Post
The pointer doesn't need +1 at here, this is battle script and not ASM code, so the correct one is 50 FF 7F 08.
TY!

Hmmm exact same problem. Wonder if JPAN's engine effects this?


Edit:
Got it working thanks for Percy. Looks like it was something to do with the offsets I was pointing to. Once pointed to 2D70C, and 2D7C4 it worked like a dream. Thanks so much everyone.
__________________
Unbound Team / Crown Team
Reply With Quote
  #656   Link to this post, but load the entire thread.  
Old May 15th, 2015 (1:32 PM).
RichterSnipes's Avatar
RichterSnipes RichterSnipes is offline
Not even a nibble...
 
Join Date: Oct 2011
Location: USA
Age: 30
Gender: Male
Nature: Modest
Posts: 507
Since we're talking about the caught Exp. gain implementation again, I was wondering if anyone ever figured out what was going on with this issue with it. No one ever responded to it, and I don't think anyone proposed a solution.
__________________
My hacks:


Reply With Quote
  #657   Link to this post, but load the entire thread.  
Old May 18th, 2015 (7:38 PM). Edited May 28th, 2015 by kleenexfeu.
kleenexfeu kleenexfeu is offline
 
Join Date: Aug 2013
Gender: Male
Posts: 218
Updated LightBall (Double Atk/Sp atk) for Emerald :

Spoiler:
Code:
CheckPoke:
ldrh r0, [r6]
cmp r0, #0x19
beq Lightball
ldr r0, =(0x0806983F)
bx r0

Lightball:
mov r3, r8
lsl r3, r3, #0x1
mov r8, r3
lsl r7, r7, #0x1
ldr r0, =(0x0806983F)
bx r0

##00 48 00 47 XX XX XX 08 00 00 00 at 0x69830.
Reply With Quote
  #658   Link to this post, but load the entire thread.  
Old May 23rd, 2015 (9:27 AM). Edited July 22nd, 2015 by kleenexfeu.
kleenexfeu kleenexfeu is offline
 
Join Date: Aug 2013
Gender: Male
Posts: 218
STATS BUFF CHANGES (and miscellaneous) :

Hi,

I'm not sure if this is the good place, so tell me if I have to move/remove it.

I was trying to make contrary when I realised that there was a bunch of things to take in count. So I started to make a table that I could use to simplify the task,

which is rather hard.

I looked at JPAN's battle script documentation, which had been really useful but I noticed there was some things that were missing.
That's why I started to change the bytes used in the stats change animation and such, one by one, and found some useful stuff.

All of this effect can be (I think) set in any attack by setbyte 0x0202448E or 0x02024335 in BattleScriptPro from Jambo51, or by using your hands and type them in

Hex. Note that for the first category (0202448E) I did the test through a modification of tail glow's setbyte, and through a modification of overheat for the second

(02024335).

I think I missed some of the command, for exemple I only found the nightmare one with percent, I actually didn't test all the possibility, perhaps there's the byte

"revenge effect" (which can be used for adjust technician for exemple) or "absorb effect", but most of the time I was full life with a classic situation.
I could have missed rapid spin, dream eater, weather ball, thaws, imprison, snatch, stomp etc (at least if they can be set here).
So, if a command is not documented it's because I couldn't found what it does (and if it does indeed something). Also I didn't mention the "buff HP" because they

actually do nothing.


Also, a thing to note to avoid confusion : when I say "percent" I meant you can set the probability of the effect to happen (in G3T for exemple, which you should

use). You can possibly make a move that has 30% to make the foe unable to attack for the next turn (must recharge). Of course you can think it's like "flinched"

except that there's no ability that can bypass this. You can make a foe fall in nightmare when it's asleep by hiting it, and adjust the probability to happens (a little bit

overpowered I confess). There's other weird effect that can be used for fun (see commands 0xB5-like).



I divided these effects in two category (with 2 sub-category for the second). The first is controled by the byte at 0x0202448E and the second by the byte at

0x02024335. So, here is what I found :


Always change. Non-damaging. Byte at 0x0202448E. Here the changement are most of the time applied to the target, though the user can also be the target (agility and such), and sometimes the user is buffed instead of the target (anc power/overheat/super power also use that byte) :

Spoiler:
Code:
0x1 = +0 attack
0x2 = +0 defense
0x2 = +0 speed
0x4 = +0 attspe
0x5 = +0 defspe
0x6 = +0 accuracy
0x7 = +0 evasiness
0x11 = +1 attack (howl)
0x12 = +1 defense (harden)
0x13 = +1 speed (part of dragon dance)
0x14 = +1 attspe
0x15 = +1 defspe (part of cosmic power)
0x16 = +1 accuracy
0x17 = +1 evasiness (double team)
0x21 = +2 attack (sword dance)
0x22 = +2 defense (iron defense)
0x23 = +2 speed (agility)
0x24 = +2 attspe (tail glow)
0x25 = +2 defspe (amnesia)
0x26 = +2 accuracy
0x27 = +2 evasiness
0x31 = +3 attack (no animation)
0x32 = +3 defense (no animation)
0x33 = +3 speed (no animation)
0x34 = +3 speatt (no animation)
0x35 = +3 spedef (no animation)
0x36 = +3 accuracy (no animation)
0x37 = +3 evasiness (no animation
0x41 = +4 attack (no animation)
0x42 = +4 defense (no animation)
0x43 = +4 speed (no animation)
0x44 = +4 speatt (no animation)
0x45 = +4 spedef (no animation)
0x46 = +4 accuracy (no animation)
0x47 = +4 evasiness (no animation
0x51 = +5 attack (no animation)
0x52 = +5 defense (no animation)
0x53 = +5 speed (no animation)
0x54 = +5 speatt (no animation)
0x55 = +5 spedef (no animation)
0x56 = +5 accuracy (no animation)
0x57 = +5 evasiness (no animation
0x61 = +6 attack (no animation)
0x62 = +6 defense (no animation)
0x63 = +6 speed (no animation)
0x64 = +6 speatt (no animation)
0x65 = +6 spedef (no animation)
0x66 = +6 accuracy (no animation)
0x67 = +6 evasiness (no animation
0x91 = -1 attack (growl)
0x92 = -1 defense (leer)
0x93 = -1 speed (string shot)
0x94 = -1 attspe
0x95 = -1 defspe
0x96 = -1 accuracy (sand attack)
0x97 = -1 evasiness
0xA1 = -2 attack (feather dance)
0xA2 = -2 defense (screech)
0xA3 = -2 speed (scary face)
0xA4 = -2 attspe
0xA5 = -2 defspe (metal sound)
0xA6 = -2 accuracy
0xA7 = -2 evasiness
0xB1 = -3 attack (no animation)
0xB2 = -3 defense (no animation)
0xB3 = -3 speed (no animation)
0xB4 = -3 attspe (no animation)
0xB5 = -3 defspe (no animation)
0xB6 = -3 accuracy (no animation)
0xB7 = -3 evasiness (no animation)
0xC1 = -4 attack (no animation)
0xC2 = -4 defense (no animation)
0xC3 = -4 speed (no animation)
0xC4 = -4 attspe (no animation)
0xC5 = -4 defspe (no animation)
0xC6 = -4 accuracy (no animation)
0xC7 = -4 evasiness (no animation)
0xD1 = -5 attack (no animation)
0xD2 = -5 defense (no animation)
0xD3 = -5 speed (no animation)
0xD4 = -5 attspe (no animation)
0xD5 = -5 defspe (no animation)
0xD6 = -5 accuracy (no animation)
0xD7 = -5 evasiness (no animation)
0xE1 = -6 attack (no animation)
0xE2 = -6 defense (no animation)
0xE3 = -6 speed (no animation)
0xE4 = -6 attspe (no animation)
0xE5 = -6 defspe (no animation)
0xE6 = -6 accuracy (no animation)
0xE7 = -6 evasiness (no animation)
0xF1 = -6 or 7 attack (no animation)
0xF2 = -6 or 7 defense (no animation)
0xF3 = -6 or 7 speed (no animation)
0xF4 = -6 or 7 attspe (no animation)
0xF5 = -6 or 7 defspe (no animation)
0xF6 = -6 or 7 accuracy (no animation)
0xF7 = -6 or 7 evasiness (no animation)




At this byte sometimes you can adjust the effect with a percent (with G3T or others). Byte at 0x02024335. Damaging moves use this. Here the user or the target may be affected :


Target :

Spoiler:
Code:
0x1 = make sleep (percent)
0x02 = poisoned (percent)
0x03 = burn (percent)
0x04 = freeze (percent)
0x05 = paralyze (percent)
0x07 = confuse (dizzy punch) (percent)
0x08 = Flinch (percent)
0x09 = Tri-attack (percent)
0xA = Make the foe using the same move than the user, only once (percent)
0xB = payday with percent
0xC = see the 0xB5-like (percent
0xD = "trapped by sand tomb" with warp animation (percent)
0xF = +1 attack (percent)
0x10 = +1 defense (percent)
0x11 = +1 speed (percent)
0x12 = +1 attspe (percent)
0x13 = +1 defspe (percent)
0x14 = +1 accuracy (percent)
0x15 = +1 evasiness (percent)
0x16 = -1 attack (percent)
0x17 = -1 def (rock smash) (percent)
0x18 = -1 speed (percent)
0x19 = -1 attspe (mist ball) (percent)
0x1A = -1 defspe (psychic) (percent)
0x1B = -1 accuracy (muddy water) (percent)
0x1C = -1 evasiness (percent)
0x1D = The foe must recharge (percent) yes, the foe
0x21 = Nightmare (percent) and if the foe's asleep
0x27 = +2 attack (percent)
0x28 = +2 defense (percent)
0x29 = +2 speed (percent)
0x2A = +2 attspe (percent)
0x2B = +2 defspe (percent)
0x2C = +2 accuracy (percent)
0x2D = +2 evasiness (percent)
0x2E = -2 attack (percent)
0x2F = -2 defense (percent)
0x30 = -2 speed (percent)
0x31 = -2 attspe (percent)
0x32 = -2 defspe (percent)
0x33 = -2 accuracy (percent)
0x34 = -2 evasiness (percent)
0x49 = Tri-attack effect (percent)
0x81 = sleep
0x82 = poisoned
0x83 = burn
0x84 = Freeze
0x85 = Paralyze
0x86 = badly poisoned
0x87 = Confused
0x88 = Flinch
0x89 = Same than C9
0x8A = same than 0xB5 combined with uproar, infinite loop in one vs one (until someone faint/miss)
0x8B = payday again
0x8C = same than 0xB5 but more weird, sometimes it stops, sometimes not, you shouldn't use it. infinite loop in one vs one (until someone faint/miss).
0x8D = "Trapped by sand tomb" but with warp animation
0x8F = +1 attack
0x90 = +1 defense
0x91 = +1 speed
0x92 = +1 attspe
0x93 = +1 defspe
0x94 = +1 accuracy
0x95 = +1 evasiness
0x96 = -1 attack
0x97 = -1 defense
0x98 = -1 speed
0x99 = -1 attspe
0x9A = -1 defspe
0x9B = -1 accuracy
0x9C = -1 evasiness
0x9D = Fun too. The FOE and not the user, must recharge 
0xA7 = +2 attack
0xA8 = +2 defense
0xA9 = +2 speed
0xAA = +2 attspe
0xAB = +2 defspe
0xAC = +2 accuracy
0xAD = +2 evasiness
0xAE = -2 attack
0xAF = -2 defense
0xB0 = -2 speed
0xB1 = -2 attspe
0xB2 = -2 defspe
0xB3 = -2 accuracy
0xB4 = -2 evasiness
0xB5 = Really funny. If you use this attack, the foe will use it as well even if it doesn't have it. Think about it, what about a ground pokémon that use this move 
(which could be electric)? Or a flying that use this move being ground? dark/psychic work as well and so on. Note : The user (as well as the foe) become confuse 
after few turn.
0xC9 = Freeze/Burn/Paralyze always
0xCB = "Coins scaterred everywhere" perhaps same effect than payday


User :

Spoiler:
Code:
0xE = hit + recoil (percent)
0x22 = +1 att/def/spe/attsp/defsp (percent)
0x25 = -1 attack/defense (percent)
0x26 = hit + recoil (percent)
0x35 = 0xB5 but with a percent, could be very useful.
0x3B = -2 att spe (percent)
0x41 = sleep (percent)
0x42 = poisoned (percent)
0x43 = Burned (with percent)
0x44 = freeze (percent)
0x45 = paralyze (percent)
0x46 = Badly poisoned (percent)
0x47 = Confused (percent)
0x4A = Uproar (percent)
0x4B = Payday effect but with percent
0x4C = You use the move infinite times (you can set the percent) until you confuse/miss/faint etc
0x4D = "trapped by sand tomb" with warp effect (percent)
0x4E = hit with recoil (percent)
0x4F = +1 attack (percent) 
0x50 = +1 defense (percent)
0x51 = +1 speed (percent)
0x52 = +1 attspe (percent)
0x53 = +1 defspe (percent)
0x54 = +1 accuracy (percent)
0x55 = +1 evasiness (percent)
0x56 = -1 attack (percent) 
0x57 = -1 defense (percent)
0x58 = -1 speed (percent)
0x59 = -1 attspe (percent)
0x5A = -1 defspe (percent)
0x5B = -1 accuracy (percent)
0x5C = -1 evasiness (percent)
0x5D = Another cool, hyper beam effect with percent (can't remember who looked for that)
0x5E = Rage effect (with percent)
0x62 = Ancien power (percent)
0x65 = -1 att/defense (percent)
0x66 = Hit with recoil, and weirdly with percent (doesn't depend on contact)
0x67 = +2 attack (percent)
0x68 = +2 defense (percent)
0x69 = +2 speed (percent)
0x6A = +2 attspe (percent)
0x6B = +2 defspe (percent)
0x6C = +2 accuracy (percent)
0x6D = +2 evasiness (percent)
0x6E = -2 attack (percent)
0x6F = -2 defense (percent)
0x70 = -2 speed (percent)
0x71 = -2 attspe (percent)
0x72 = -2 defspe (percent)
0x73 = -2 accuracy (percent)
0x74 = -2 evasiness (percent)
0x75 = Outrage/petal dance (percent)
0x76 = Apparently make you lost your item but say [the foe] lost [the item your holding]
0x7B = -2 spe attack
0x8E = hit with recoil
0x9E = Rage effect
0xA2 = +1 att/def/spee/attspe/defspe
0xA5 = -1 att/defense
0xA6 = hit with recoil
0xBB = -2 attspe
0xC1 = Sleep
0xC2 = Poisonned
0xC3 = Burn
0xC4 = Freeze
0xC5 = Paralyze
0xC6 = Badly Poisonned
0xC7 = Confusing
0xCA = Uproar
0xCC = Make you use the move infinite times, unless someone make you confused
0xCD = This one is weird, it says "trapped by sand tomb", it traps yourself, and does the 1/16 damage with wrap animation
0xCE = hit with recoil
0xCF = +1 attack
0xD0 = +1 def
0xD1 = +1 speed
0xD2 = +1 attspe
0xD3 = +1 defspe
0xD4 = +1 accuracy
0xD5 = +1 evasiness
0xD6 = -1 attack
0xD7 = -1 defense
0xD8 = -1 speed
0xD9 = -1 attspe
0xDA = -1 defspe
0xDB = -1 accuracy
0xDC = -1 evasiness
0xE2 = +1 att/def/speed/attspe/defspe
0xE5 = -1 att/def
0xE6 = hit with recoil
0xE7 = +2 attack
0xE8 = +2 def
0xE9 = +2 speed
0xEA = +2 attspe
0xEB = +2 defspe
0xEC = +2 accuracy
0xED = +2 evasiness
0xEE = -2 attack
0xEF = -2 def
0xF0 = -2 speed
0xF1 = -2 attspe
0xF2 = -2 defspe
0xF3 = -2 accuracy
0xF4 = -2 evasiness
0xFB = -2 attspe (overheat) (bypass clear body)




Any addition/correction is welcome :)
Reply With Quote
  #659   Link to this post, but load the entire thread.  
Old May 28th, 2015 (2:15 AM).
Xencleamas's Avatar
Xencleamas Xencleamas is offline
Suddenly lurking in the shadows...
 
Join Date: Feb 2014
Gender: Male
Nature: Adamant
Posts: 456
Quote:
Originally Posted by KDS View Post
The critical hit table is located at x250530 for FireRed and x31c128 for Emerald. Place the bytes 10 00 08 00 02 00 01 00 01 00 at the respective locations to update the table to Generation 6 mechanics.

I also might search the bytes for focus energy and high-critical hit ratio moves too and update this too.
EDIT: I checked the routines in FR,EM and Ruby ROMs. And in all of them, focus energy gives +2 crit level and high crit moves give +1 crit level which is up to gen vi standards. I also tested focus+scope lens combo (always getting crits) and high crit move+scope lens combo (not always giving critical but high chance). So i think no further byte change is required if the two tests pass which it did while i was testing in fire red.
Quote:
Originally Posted by KDS View Post
I found the way to emulate the critical-hit nerf (2x to 1.5x) in Gen III.
This just hijacks the way of manipulating the critical hit damage using the critical hit marker.

UDPATE: CORRECTED(Thanks to Aruaruu for finding the flaw)

For Fire Red:
Spoiler:

Insert this first mini-routine somewhere in free space

Code:
.text
.align 2
.thumb
.thumb_func

ldr r4, damage
ldr r1, crit
ldrb r1, [r1, #0x0]
add r1, r1, #0x1
mul r1, r0
lsr r1, r1, #0x1
ldr r3, return
bx r3

.align 2
damage: .word 0x02023D50
crit: .word 0x02023D71
return: .word 0x0801E5ED
At x1E5E4 place 00 4B 18 47 XX+1 XX XX 08
---
Then, insert this second routine

Code:
.text
.align 2
.thumb
.thumb_func

mov r1, #0x0
strh r1, [r6, #0x0]
ldr r1, crit
ldrb r1, [r1, #0x0]
add r1, r1, #0x1
mul r1, r0
lsr r1, r1, #0x1
ldr r3, return
bx r3

.align 2
crit: .word 0x02023D71
return: .word 0x0801E6E5
At x1E6DC: 00 4B 18 47 YY+1 YY YY 08 00 00


For Emerald:
Spoiler:

Insert this first mini-routine somewhere in free space

Code:
.text
.align 2
.thumb
.thumb_func

ldr r4, damage
ldr r1, crit
ldrb r1, [r1, #0x0]
add r1, r1, #0x1
mul r1, r0
lsr r1, r1, #0x1
ldr r3, return
bx r3

.align 2
damage: .word 0x020241F0
crit: .word 0x02024211
return: .word 0x08046DDD
At x46DD4 place 00 4B 18 47 XX+1 XX XX 08
---
Then, insert this second routine

Code:
.text
.align 2
.thumb
.thumb_func

mov r1, #0x0
strh r1, [r6, #0x0]
ldr r1, crit
ldrb r1, [r1, #0x0]
add r1, r1, #0x1
mul r1, r0
lsr r1, r1, #0x1
ldr r3, return
bx r3

.align 2
crit: .word 0x02024211
return: .word 0x08046ED5
At x46ECC: 00 4B 18 47 Y+1 YY YY 08 00 00
Question: Do I need to do and have them both? or the second quote can be done without the first quote?
__________________
Reply With Quote
  #660   Link to this post, but load the entire thread.  
Old May 28th, 2015 (2:28 AM).
Trainer 781
Guest
 
Posts: n/a
Quote:
Originally Posted by Sky High View Post
Question: Do I need to do and have them both? or the second quote can be done without the first quote?
Both can be done individually. The first one updates the chance of occurence of critical according the latest gen standards. While the second one decreases the power of critical hit to 1.5x from 2x.
Reply With Quote
  #661   Link to this post, but load the entire thread.  
Old May 28th, 2015 (8:29 PM).
Criminon's Avatar
Criminon Criminon is offline
Forever Spriting
 
Join Date: Aug 2012
Location: California
Gender: Male
Nature: Timid
Posts: 264
I'm not sure this deserves its own thread, but I know the information will be useful to someone.

There are two images used for the battle hud. The enemy hud, and your pokemon's hud.

The enemy hud location is:
D1F604

Your pokemon's is:
D1F340

Each of these use the same pallet at:
D11b84

Entering these into the program NSE and setting the width to "8" and the height to "16" will display a perfect image of them, only cut in half. Happy editing!
__________________
Unbound Team / Crown Team
Reply With Quote
  #662   Link to this post, but load the entire thread.  
Old May 30th, 2015 (6:41 AM).
MisterJoJo MisterJoJo is offline
 
Join Date: Feb 2014
Posts: 9
While inserting my new map into my hack I had the problem that the calculated map points were wrong.
Like for example ROUTE 1 has the block size 1x2 so at some point at the overworld the map shows your player at the upper point or the lower point.
When you change your map size things are messed up, because the calculation goes wrong. If you want to change this go to 0x083F2178. It takes some trying to find the right offset for your location. It starts with the citys which are 1x1.
Reply With Quote
  #663   Link to this post, but load the entire thread.  
Old May 31st, 2015 (5:49 AM).
FamiliaWerneck's Avatar
FamiliaWerneck FamiliaWerneck is offline
 
Join Date: May 2015
Location: São Paulo, Brasil
Gender: Male
Posts: 275
Two doubts/ideas/requests:
1 - Is there a way to make fainted wild Pokémon not disappear, so you could catch them easier after they faint? And making they get some health back after an attempt to capture (so it looks like the anime, a little more)?
2 - Also I know this have probably been discussed before, but how hard would it be to make a Pokémon have more than 4 attacks?
I know you wouldn't have to change anything within the Pokédex. Adding one or two summary page with another 4 attacks each (if we could make it to 8 attacks, or 12 respectively) would solve the OW problems.
Inside battles, I don't have knowledge to make a correct statement. But the way I see, you only would have to change the "'Pokémon X' is trying to learn 'move Y', but he already know four moves. Forget a move to make room for 'move Y'?" routine, the room for the moves themselves and a way to show four moves in three different sets.
Is all that too difficult? What would it take?
Reply With Quote
  #664   Link to this post, but load the entire thread.  
Old May 31st, 2015 (9:18 AM).
C me's Avatar
C me C me is offline
Creator of Pokemon League Of Legends
 
Join Date: Jan 2014
Age: 26
Gender: Male
Posts: 681
Quote:
Originally Posted by FamiliaWerneck View Post
Two doubts/ideas/requests:
1 - Is there a way to make fainted wild Pokémon not disappear, so you could catch them easier after they faint? And making they get some health back after an attempt to capture (so it looks like the anime, a little more)?
2 - Also I know this have probably been discussed before, but how hard would it be to make a Pokémon have more than 4 attacks?
I know you wouldn't have to change anything within the Pokédex. Adding one or two summary page with another 4 attacks each (if we could make it to 8 attacks, or 12 respectively) would solve the OW problems.
Inside battles, I don't have knowledge to make a correct statement. But the way I see, you only would have to change the "'Pokémon X' is trying to learn 'move Y', but he already know four moves. Forget a move to make room for 'move Y'?" routine, the room for the moves themselves and a way to show four moves in three different sets.
Is all that too difficult? What would it take?
I don't think there's enough RAM for that many moves, if there is space in the RAM it could be possible.
Reply With Quote
  #665   Link to this post, but load the entire thread.  
Old May 31st, 2015 (10:59 AM).
GoGoJJTech's Avatar
GoGoJJTech GoGoJJTech is offline
(☞゚ヮ゚)☞ http://GoGoJJTech.com ☜(゚ヮ゚☜)
 
Join Date: Nov 2012
Location: Earth
Age: 24
Gender: Female
Nature: Jolly
Posts: 2,475
Quote:
Originally Posted by FamiliaWerneck View Post
Two doubts/ideas/requests:
1 - Is there a way to make fainted wild Pokémon not disappear, so you could catch them easier after they faint? And making they get some health back after an attempt to capture (so it looks like the anime, a little more)?
2 - Also I know this have probably been discussed before, but how hard would it be to make a Pokémon have more than 4 attacks?
I know you wouldn't have to change anything within the Pokédex. Adding one or two summary page with another 4 attacks each (if we could make it to 8 attacks, or 12 respectively) would solve the OW problems.
Inside battles, I don't have knowledge to make a correct statement. But the way I see, you only would have to change the "'Pokémon X' is trying to learn 'move Y', but he already know four moves. Forget a move to make room for 'move Y'?" routine, the room for the moves themselves and a way to show four moves in three different sets.
Is all that too difficult? What would it take?
Each of those things requires tampering with the engine.

If you're adding or taking away any moves, even one, you have to break half the game and edit every single instance of move reading and writing, names and even things like position and structures.
So if you like to break the game in half and rewrite almost the entire engine for moves, start as soon as possible since you'll be at it for 8 years.
__________________
I believe in Jesus Christ my Savior. If you do too, and aren't scared to admit it, then copy and paste this into your signature.
The HGSS Music Patch - The BW/2 Music Patch - ASM: Switch Music Based on Seasons
Romhack.me Profile - Pokecommunity Profile - Youtube Channel

Support me at my site!
Pokémon Platinum Red and Blue
Reply With Quote
  #666   Link to this post, but load the entire thread.  
Old May 31st, 2015 (6:00 PM).
FamiliaWerneck's Avatar
FamiliaWerneck FamiliaWerneck is offline
 
Join Date: May 2015
Location: São Paulo, Brasil
Gender: Male
Posts: 275
Quote:
Originally Posted by C me View Post
I don't think there's enough RAM for that many moves, if there is space in the RAM it could be possible.
Quote:
Originally Posted by GoGoJJTech View Post
Each of those things requires tampering with the engine.

If you're adding or taking away any moves, even one, you have to break half the game and edit every single instance of move reading and writing, names and even things like position and structures.
So if you like to break the game in half and rewrite almost the entire engine for moves, start as soon as possible since you'll be at it for 8 years.
:( :( :( :( :( :( :( :(
It's hard... Tedious, long and super hard...

Even the first one? I saw the experience gain after catching a wild Pokémon, and I thought there could be a way to make the game "wait" for you to decide to capture it or not after the Pokémon faints.
Reply With Quote
  #667   Link to this post, but load the entire thread.  
Old June 1st, 2015 (1:32 AM).
C me's Avatar
C me C me is offline
Creator of Pokemon League Of Legends
 
Join Date: Jan 2014
Age: 26
Gender: Male
Posts: 681
Quote:
Originally Posted by FamiliaWerneck View Post
:( :( :( :( :( :( :( :(
It's hard... Tedious, long and super hard...

Even the first one? I saw the experience gain after catching a wild Pokémon, and I thought there could be a way to make the game "wait" for you to decide to capture it or not after the Pokémon faints.
I'm not really that familiar with it, but BSP has a faintpokemon command, which I think makes the Pokemon faint. You can start there.
Reply With Quote
  #668   Link to this post, but load the entire thread.  
Old June 1st, 2015 (6:52 AM).
FamiliaWerneck's Avatar
FamiliaWerneck FamiliaWerneck is offline
 
Join Date: May 2015
Location: São Paulo, Brasil
Gender: Male
Posts: 275
Quote:
Originally Posted by C me View Post
I'm not really that familiar with it, but BSP has a faintpokemon command, which I think makes the Pokemon faint. You can start there.
Thanks bro, I'll look into it. =D
Reply With Quote
  #669   Link to this post, but load the entire thread.  
Old June 1st, 2015 (2:52 PM).
Deokishisu's Avatar
Deokishisu Deokishisu is offline
Mr. Magius
 
Join Date: Feb 2006
Location: If I'm online, it's a safe bet I'm at a computer.
Gender: Male
Nature: Relaxed
Posts: 984
Quote:
Originally Posted by FamiliaWerneck View Post
Thanks bro, I'll look into it. =D
You'll most likely have to modify the catch rate formula for every Poke Ball as well, because I don't think they're set up to handle a Pokemon with 0.0% health left. From what I understand, you want the Pokemon to faint, but you want the battle's end to be delayed by a turn to give the player the chance to catch it?

Honestly, this feature seems like it's way above your current skill level. You should work your way up to that level with more "conventional" hacking before attempting this, I would think.

Furthermore, allowing every Pokemon to have more than four moves would require expanding the data structure that handles a Pokemon's information, not to mention you'd have to C up interfaces to display those extra moves, and find some way to handle switching sets in battle for both the player and the AI. If an AI Trainer is to have custom movesets, you'd have to set up a way to save eight moves per Pokemon in that structure too. The game is set up with the four move limit, and every structure/feature that involves using, displaying, or otherwise refers to Pokemon moves assumes that the limit is four. That's an almost insurmountable amount of research and targeted ASM edits to accomplish, and it has a good chance of breaking the game in ways that are not immediately obvious because of the scope of the changes. If, once you get to the skill level that how this all works is understandable to you, and you still think it's worth the effort to change, then go for it! But for those who do know how difficult and impractical this would be to implement, it's not worth the time investment to do for someone else.
Reply With Quote
  #670   Link to this post, but load the entire thread.  
Old June 1st, 2015 (3:51 PM).
FamiliaWerneck's Avatar
FamiliaWerneck FamiliaWerneck is offline
 
Join Date: May 2015
Location: São Paulo, Brasil
Gender: Male
Posts: 275
Quote:
Originally Posted by Deokishisu View Post
You'll most likely have to modify the catch rate formula for every Poke Ball as well, because I don't think they're set up to handle a Pokemon with 0.0% health left. From what I understand, you want the Pokemon to faint, but you want the battle's end to be delayed by a turn to give the player the chance to catch it?

Honestly, this feature seems like it's way above your current skill level. You should work your way up to that level with more "conventional" hacking before attempting this, I would think.

Furthermore, allowing every Pokemon to have more than four moves would require expanding the data structure that handles a Pokemon's information, not to mention you'd have to C up interfaces to display those extra moves, and find some way to handle switching sets in battle for both the player and the AI. If an AI Trainer is to have custom movesets, you'd have to set up a way to save eight moves per Pokemon in that structure too. The game is set up with the four move limit, and every structure/feature that involves using, displaying, or otherwise refers to Pokemon moves assumes that the limit is four. That's an almost insurmountable amount of research and targeted ASM edits to accomplish, and it has a good chance of breaking the game in ways that are not immediately obvious because of the scope of the changes. If, once you get to the skill level that how this all works is understandable to you, and you still think it's worth the effort to change, then go for it! But for those who do know how difficult and impractical this would be to implement, it's not worth the time investment to do for someone else.
The fainting Pokémon is just an idea based in the anime. Most of the times, a Pokémon is defeated there, before a capture is attempted.
I believe it could be easier, as the experience after catching a Pokémon was simple too. I never thought about the Pokéballs, actually. Just had the idea and let it out.
Believe me, not trying that until a lot of other stuff is done, here.

As for the maximum moves a Pokémon can have, I thought that would be easy to just add a new page to the "Summary" screen, as the same easy way to add a new layer to the "Fight" command inside a battle.
I didn't know it involved so much. Plus, I thought the moves were directed for each Pokémon. I thought each Pokémon had 4 slots, and the game would just "fill the blanks" for the Pokémon every time a move was shown (fighting, Summary screen, etc, etc). I thought just changing this number to 8 and adding a viewable way of using the other slots was enough.
I also thought after GoGoJJTech's explanation that maybe the attacks could be divided into "sets". That way, before the game "chooses" or "displays" (or whatever) using codes like "load move1, move2, move3 and move4" it would come with a "load set1, set2" beforehand. That way, you could still have codes for 4 moves, but you could choose what "block of 4 moves" you could use before.
I don't know if the way I explained it, it sounded silly or just plain stupid. I don't have much programming knowledge, but it seemed like an alternative (not by far a much efficient one) to rewriting half the game.

But no sweat, dropped it.
Maybe if I ever try to write a game from scratch, who knows...
Reply With Quote
  #671   Link to this post, but load the entire thread.  
Old June 1st, 2015 (9:24 PM).
Criminon's Avatar
Criminon Criminon is offline
Forever Spriting
 
Join Date: Aug 2012
Location: California
Gender: Male
Nature: Timid
Posts: 264
Quote:
Originally Posted by Dark Zeta View Post
Just curious. Do you have any more information on the full layout of the battle HUD. As in how to change its layout and font?
The rest of the offsets are:
D1F340 - Player normal battles
D1F794 - Player double battles
D1F604 - Enemy normal battles
D1F928 - Enemy double battles
D1FABC - Safari ui
D11BC4 HP bar (Pallet D11BA4)
D11BC4 XP bar (Pallet D11B84)
E7BB04 Trainer Pokeball line (think it uses pallet D11B84)

As for the maps, I have no clue where they are, and I'm still searching. The XP and health bars are missing another image, and once it gets to a certain point will change to that image, if you find it, post it here please. Also no clue on where the text is.
__________________
Unbound Team / Crown Team
Reply With Quote
  #672   Link to this post, but load the entire thread.  
Old June 2nd, 2015 (12:29 AM).
Splash's Avatar
Splash Splash is offline
But nothing happened.
 
Join Date: Oct 2009
Location: Just use an Old Rod
Gender: Male
Nature: Hasty
Posts: 658
Anyone know where I can edit the table(?) for the friendship/happiness?
To elaborate on this something like making the decrease of a pokemon's friendship 10 instead of 1..
__________________
༼ つ ◕_◕ ༽つ PRAISE Splash ༼ つ ◕_◕ ༽つ
|VM|PM
|
Reply With Quote
  #673   Link to this post, but load the entire thread.  
Old June 3rd, 2015 (11:48 PM).
Criminon's Avatar
Criminon Criminon is offline
Forever Spriting
 
Join Date: Aug 2012
Location: California
Gender: Male
Nature: Timid
Posts: 264
This stuff should help anyone wanting to check their party's hp.
0x20242DA is the address stored in RAM for the 1st pokemon in your party's HP.
0x20242DC is the max HP.
0x20242D4 is the status ailment a pokemon is currently suffering. (00 being nothing)

Using comparefarbytetobyte 0x20242DA 0xnumber you want to check
you can easily check a pokemon's hp.

using comparefarbytetobyte 0x20242DC 0xnumber you want to check
you can easily see if a pokemon has enough hp for something.

using writebytetooffset 0xstatus 0x20242D4
you can easily edit the status effecting them.

For the rest of your party, take these offsets and add 0x64 to them.
__________________
Unbound Team / Crown Team
Reply With Quote
  #674   Link to this post, but load the entire thread.  
Old June 4th, 2015 (2:11 AM).
robinjea's Avatar
robinjea robinjea is offline
 
Join Date: Sep 2012
Age: 25
Gender: Male
Nature: Quirky
Posts: 534
Quote:
Originally Posted by Haru~ View Post
After a long battle with cancer trying to find the RAM location of the player's money, I had a feeling that it is encrypted somewhere in the RAM and that's why I can't find it. So after going to my local POKeMART, I found a little routine that seems to decrypt something. After doing further testing, I made this routine to get the player's current money using the game's own code.

The routine:
Spoiler:

Code:
.align 2
.thumb

/*This routine does all the hard work in retrieving your current
money and stores it in vars 0x8000 and 0x8001.
    0x8000 - Lower half
    0x8001 - Upper half
*/

main:    push {r4-r6, lr}
    ldr r6, .DMA_MAP
    ldr r0, [r6, #0x0]
    mov r5, #0xA4
    lsl r5, r5, #0x2
    add r0, r0, r5
    ldr r1, .OTHER_RAMLOC
    ldr r1, [r1, #0x8]
    bl get_amount        /*Does the actual decrypting*/
    ldr r1, .VAR_8000
    str r0, [r1]
    pop {r4-r6, pc}

get_amount:    ldr r4, .DO_CALC
        bx r4

.hword 0x0000
.DMA_MAP:    .word 0x03005008
.OTHER_RAMLOC:    .word 0x02039934
.VAR_8000:    .word 0x020370B8 /*Var 0x8000-0x8001*/
.DO_CALC:    .word 0x0809FD59


I slept after that...
Umm... Hey guys, I need a little bit of help. I saw that code up there just now that Haru~ posted years ago, so I was trying to use it, and yeah it does what it does but it only works as long as your money is below 65535 (the var limit). What do I do?

And if it helps, here's my script.
Spoiler:
Code:
#dynamic 0x800000

#org @start
lock
faceplayer
callasm 0x71E5C1 (I inserted the routine at 0x71E5C0 just so you know)
buffernumber 0x00 0x8001
buffernumber 0x01 0x8000
msgbox @display_money
release
end

#org @display_money
= Your current money is:\n\hB7[buffer1][buffer2].


Thanks in advance!
Reply With Quote
  #675   Link to this post, but load the entire thread.  
Old June 4th, 2015 (12:09 PM). Edited June 5th, 2015 by kleenexfeu.
kleenexfeu kleenexfeu is offline
 
Join Date: Aug 2013
Gender: Male
Posts: 218
Choice Scarf for Emerald :
Spoiler:

Spoiler:

Code:
.text
.align 2
.thumb
.thumb_func
.global choicescarf


Start:
cmp r6, #0x18
beq DropSpeed
cmp r6, #0x1D	/*give to your choice scarf the same special than choice band*/
beq CheckHeld

Return:
ldr r2, =(0x02024084)
ldr r0, =(0x0803D164+1)
bx r0

DropSpeed:
lsr r7, r7, #1
b Return

CheckHeld:
cmp r5, #0x11	/*held item effect*/
bne Return
mov r0, r7
lsr r0, r0, #1
add r7, r0
b Return

.align 2

/*Type 00 48 00 47 XX+1 XX XX 08 at 0x0803D15C with XX XX XX being the address of your routine*/


Spoiler:

Code:
.text
.align 2
.thumb
.thumb_func
.global choicescarfadverse

Start:
cmp r6, #0x18
beq DropSpeed
cmp r6, #0x1D	/*give to your choice scarf the same special than choice band*/
beq CheckHeld

Return:
ldr r0, =(0x0803D07E+1)
bx r0

DropSpeed:
mov r2, r8
lsr r2, r2, #1
mov r8, r2
b Return

CheckHeld:
cmp r5, #0x11	/*held item effect*/
bne Return

BoostSpeed:
mov r2, r8
lsr r2, r2, #1
add r8, r2
b Return

.align 2

/*Type 00 48 00 47 XX+1 XX XX 08 at 0x0803D074 with XX XX XX being the address of your routine*/



Same idea than choice spec, give the special 0x1D to allow only one move, and give the same held effect than in the routine (which can be whatever you want). Choice scarf/spec MUST have a different held effect of course. There's two routines because there's apparently two checks (don't ask me why)
Reply With Quote
Reply

Quick Reply

Join the conversation!

Create an account to post a reply in this thread, participate in other discussions, and more!

Create a PokéCommunity Account
Ad Content

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


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