You are not logged in.
Pages: 1
Hello all,
Im hacking pokemon gold and I want to increase the stat difference between levels.
For example I want lvl 5 to be much stronger than lvl 3.
Does anyone of you know how I could do this? I've no idea
I've checked the formule of stats with levels at bulbapedia:
http://bulbapedia.bulbagarden.net/wiki/Stats
But I can find nothing in it that could do the thing I want.
Offline
Use Mateo's Pokémon Editor Ultimate.
Offline
Doenst work, because if I raise the base stat of a pokemon it will be stronger at lvl 5 but also on lvl 3 resulting in the same procentual difference.
I do have an Idea but i need some help there..
If you look at the damage formule:
http://bulbapedia.bulbagarden.net/wiki/ … ge_formula
I wanna add something in there.
For example:
Damage * ((level1 - level2)*0.10 +1) = Total damage (when level1 - level2 = <0 its capped at 0 Or when the extra part of the formule is going negative its set to 1)
level 1 = level of your pokemon
level 2 = level of enemies pokemon
Can someone help me adding something like this?
Or do you guys have a better idea?
Last edited by pkmgoldfan (2013-07-19 18:02:16)
Offline
You've got to hack the routine that determines the stat values based on level and DV/IV values.
Asm and debugging knowledge required.
Offline
and how about the damage formule idea?
Offline
That one doens't depend on stats at all
Maybe it's easier to do it that way?
Offline
So what do you even want to do exactly?
Not increase the stats but increase the damage inflicted by each move (by that pattern you've shown there) ?
That'd be probably easily doable, but... who would want to do it?
Offline
I want to make levels more important. So that a level 5 is stronger than a level 3. And a level 30 is stronger than a level 26.
I dont really care how its done. Giving the higher pokemon alot more stats, or just alot more defence/attack power.
I came up with an Idea to do this and that is to give the higher leveled pokemon an attack boost for each level that it is higher:
Damage * ((level1 - level2)*0.10 +1) = Total damage
If you use this formule you get this for example:
level 5 vs level 3 pokemon:
level 5 pokemon attacks level 3:
(5 - 3) * 0.10 + 1 = 1.2
So this means that the pokemon on level 5 will do 20% more damage on a lvl 3 because its 2 levels higher.
Last edited by pkmgoldfan (2013-07-19 19:00:23)
Offline
Well, it can be done but would require some coding to do.
You can code all kinds of mathematical routines with assembly. Or well, not really something like square or squareroot, but you can do adding, subtracting, multiplying (and dividing) pretty easily.
Offline
Could you help me out a little?
What kind of programs do I need and what kind of thing do I have to read to understand what I'm doing?
Offline
The thing is that doing this is far from your level of understanding. :\
You've to be familiar with editing all kinds of data with a hex editor, knowing how to program in general, understanding z80 assembly, and knowing how to use a debugger efficiently. I can do all of these, at least somewhat, and might be able to finish the stuff.
But if you really want to try and learn how to hack, I'd advise my video tutorials to you as well. Onwards from part 7, it starts to come "close" to doing this kind of stuff too.
Offline
Took a long time, but I've watched all your hacking tutorial videos, part 4A and 4b too.
I had some trouble with the last part, push and pop, but I understand that well too now.
Thank you for those videos, they are really well done and easy to follow :). Good job.
What do you advise me now in order to modify the damage formule?
Offline
What do you think?
How would write a routine for the damage formula?
Here we've got some documentation about parts of the ram used during battles:
http://datacrystal.romhacking.net/wiki/ … #IN_BATTLE
Offline
I do not really know how to find the routine for this formule.
Also I might have missed part 9, but I can't find it anywhere. It should be about debugging (A thing that you said I would need to know about.)
Do you have the link to part 9 somewhere?
Edit:
I dont know how to do things as multiplying too. Can't find a code for it in the ASM Commands text document.
Last edited by pkmgoldfan (2013-07-21 21:13:18)
Offline
I dont know how to do things as multiplying too. Can't find a code for it in the ASM Commands text document.
That's because the Z80GB doesn't have a multiplier/divider unit, nor a floating point unit for that matter. You will have to map a multiplication using basic arithmetic:
(see Wikipedia, where I stole this from)
Many implementations will actually use a trick to multiply quicker. They will perform a switch of operands so the multiplier is smaller than the multiplicand, so the summation loop runs faster. Also, many implementations will optimize the multiplication runtime by performing logic shifts on the operands using the dual number as a place value system for summands to arrive at their result in near-constant time instead of linear time.
cYa,
Tauwasser
Offline
Can anyone tell me where I can find the asm routine for the damage formule?
Or at least how to find it?
I know that it will search for certain values in ram: level, attack own pokemon and the defence of the enemy.
I cannot find the commands in GbAsmEdit so..
Offline
Download bgb emulator and open the rom, and debugger.
Set a breakpoint to the ram address where damage is stored and the emulator should stop executing at that part of the "program".
Next, you can debug the routine further on if you need to.
Offline
How to set a breakpoint to a ram adress?
Also were is the damage stored? it's not documented in the ram map.
Offline
Ok I've found something.
Because I dont know were the damage is stored I used the ram adress for enemy defence stat as a breakpoint. (the defence is used in the damage formula).
I did an attack and the emulator halted.
It shows ROMD: 5448 4E ld c, (hl) ;2 17
and WRA1: DFCF 4090
What do I have to do next? Its halfway in the damage formula now, but i dont know where it starts and where it ends, also I dont know how to edit it in this bgb emulator.
Offline
youre not actually in the damage formula, thats just the part where it gets the stats it needs like the enemys defense
check out crystal's damage formula
a good entry point would be after stuff like stats and move power are factored in like at d:565b (gold: d:579c)
; / 50
ld [hl], 50
ld b, $4
call Divide
so if youre trying to do (your level - enemy level)/10 + 1 you could cram in something right before like
; we need to use hl but we dont want to mess with the original flow
; if we wrap our stuff in push/pop we can preserve it
push hl
; get the opponent's level
ld hl, EnemyMonLevel
ld a, [hBattleTurn]
and a
jr z, .GotOpponentLevel
ld hl, BattleMonLevel
.GotOpponentLevel
; your level - opponent level
ld a, e
sub [hl]
jr nc, .ok
; if the opponent's level is higher, no bonus
xor a
.ok
pop hl
; instead of trying to multiply a float we can just multiply and divide by 10
add 10
ld [hMultiplier], a
call Multiply
ld a, 10
ld [hDivisor], a
ld b, 4
call Divide
Offline
Thanks alot for this information :D.
I will look deeper into it, cuz its hard for me to understand this all at this moment.
I might come back in a few days with some more questions :)
Offline
Pages: 1