Conversation Between FamiliaWerneck and kearnseyboy6
Showing Visitor Messages 16 to 30 of 33
-
June 13th, 2015 11:53 PMkearnseyboy6.text
.align 2
.thumb
.thumb_func
.global sylveon
main:
push {r0-r7}
add r0, r6, r7 @standard in every routine
lsl r0, r0, #0x3 @standard in every routine
add r0, r2, r0 @standard in every routine
add r3, r0, r3 @standard in every routine
ldrh r2, [r3, #0x2] @this loads the 'argument' you see in G3HS. There is no need for this...
mov r0, r8 @standard in every routine
mov r5, #0x0 @this is the move counter (read on)
loop:
bl decrypt @go to the decrypt section in the routine and return when finished it
mov r4, r0 @safely moves the returned move to r4
pop {r0-r2} @clears the registers we pushed in the branch
mov r1, r4 @move the move ID back to r1
ldr r4, movedata @must be the move data ADDRESS LOCATION
mov r6, #0xC @move data is 12 bytes long ie. 0xC
mul r6, r1 @ Move ID times 0xC
add r4, r4, r6 @adds this value to the start of the table to get to the move fingerprint data
ldrb r4, [r4, #0x2] @loads the byte 2 bytes after the current byte... The move type hint hint!
cmp r4, #0x16 @This must be the value assigned to Fairy? check the MrDS ini to confirm.
beq true @If the moveID was 0x16 goto true
cmp r5, #0x3 @if the counter is 3 (checked for 4 moves) then quit
beq exit @goto no evolution
add r5, #0x1 @add 1 to the loop counter for the next move
b loop @start the loop again
decrypt:
push {r0-r2}
mov r1, #0xD @sets the Move1 attribute
add r1, r1, r5 @adds the counter to r1 (for Move2,3,4)
ldr r2, decryptpoke @loads the special routine
bx r2 @gets the move and puts it in r2 and goes back to the loop
true:
mov r9, r3
pop {r0-r7}
mov r1, r9
ldr r0, levelcheckloc
bx r0
exit:
pop {r0-r7}
ldr r0, noevo
bx r0
.align
movedata: .word 0x08900000
levelcheckloc: .word 0x0804310D
noevo: .word 0x08043111
decryptpoke: .word 0x0803FBE9 -
June 12th, 2015 9:05 PMFamiliaWerneckNo need to test.
I actually wanted a step-by-step explanation of your own routines, and then show you what I can make of it.
For example, I'll take the Male Evolution. Let's look at it in parts:
Part 1:
Spoiler:.text
.align2
.thumb
.thumb_func
.global maleevo
Until here, all good. Every simple tutorial has these explained. They just need to be there, ok, got it. Thank you, you are welcome.
Part 2:
Spoiler:main:
push {r0-r7}
Ok, main is called and you start the code by pushing register r0 to r7 (total 8 registers) into the stack. Here lies my first doubt. Why, like in three tutorials I saw in the site, you didn't push lr (link register) into the stack, aswell?
Part 3:
Spoiler:add r0, r6, r7
Well. Right here is where all my reasoning breaks. Why do you add r6 and r7 and place the result in r0? I mean, you just pushed those registers into the stack. Weren't they supposed to be empty? Why did you add those? How could you? (Too dramatic? =P Just kidding. But seriously...) And what does this add do? What is stored in r6 and r7 that you need added?
Rest of the code:
Spoiler:lsl r0, r0, #0x3
add r0, r2, r0
add r3, r0, r3
ldrb r2, [r3, #0x2]
mov r0, r8
bl decrypt2
mov r11, r0
pop {r0-r7}
mov r1, r11
cmp r1, r2
blt exit
mov r0, r8
mov r1, #0xFF
ldr r0, [r0, #0x0]
and r1, r0
mov r0, r8
bl decrypt
mov r11, r0
pop {r0-r7}
mov r5, r11
ldr r2, pokemondata
mov r4, #0x1C
mul r5, r4
add r5, r5, r2
ldrb r5, [r5, #0x10]
cmp r1, r5
blt exit
mov r10, r3
pop {r0-r7}
mov r1, r10
ldr r0, levelcheckloc
bx r0
exit: pop {r0-r7}
ldr r0, noevo
bx r0
decrypt: push {r0-r7}
mov r1, #0xB
ldr r2, decryptpoke
bx r2
decrypt2: push {r0-r7}
mov r1, #0x38
ldr r2, decryptpoke
bx r2
.align
levelcheckloc: .word 0x0804310D
noevo: .word 0x08043111
decryptpoke: .word 0x0803FBE9
pokemondata: .word 0x08254784
I won't ask the rest until I understand parts 2 and 3.
If you wanna help (and it's no problem, of course), I'd love to learn from you. I swear I'm very dedicated and a fast learner, though this may be disguised by my curiosity. =P
joexv also said he wanted to help me. =D
Anyways, thanks in advance man. You are awesome! -
June 12th, 2015 6:28 PMkearnseyboy6Yeah post a routine, I wont be ale to test though Im super busy with finding a job but I'll have a quick read of it.
-
June 11th, 2015 4:40 AMFamiliaWerneckSup man.
Sorry bothering you with stuff likethis.
Can you help me in the ASM field?
I started studying it this week, and I'm getting better, but I need help with the evolution routines.
Can you check if what I do is right? I believe from a code to another, I'll just have to change the item, as the evolution method will be probably the same.
Can you help? -
May 28th, 2015 2:56 PMFamiliaWerneckThanks for the help. I'll try not messing too much up.
I just asked that because of my National Pokédex test. I'm feeling something's missing there.
Sorry bothering you more with this, I'll get into it later, waiting for the weekend, actually.
But how do you find tables and locations in hex, asm or scripts for game mechanics, like the evolution methods?
I'm trying to find breeding and nature mechanics so I can change them.
Again, thanks for the help man. Anything you need, though I'm only a beginner, you just ask. -
May 28th, 2015 4:22 AMkearnseyboy6"I have to make an evolution like that for each item, like Metal Coat" That's correct.
I don't even change anything, just repoint and extend the tables. So no I cannot have broken it. If you still want to ensure this fire up IDA and the database and check where the evolution routines are called...
- On level up from item (rare candy)
- At the end of every battle
- During a trade
That is it! Trust me it doesn't break XD It only crashes if you write a routine incorrectly and it is called! -
May 25th, 2015 6:48 AMFamiliaWerneckGot it. So you just put a Pokémon with that type of evolution in Route 1, put him to evolve at a low level, or have someone give you an item, and them you try it.
I actually do this.
But is there any chance you just ruin something else, while this part of the game you changed works correctly.
Also "And yes you were right (it was the last one)". What was I right about? I said so much... =P -
May 25th, 2015 1:27 AMkearnseyboy6Easy, the evolution routine is only called at the end of a battle. If it crashes at the end of a match then it's broken, if not, then it works. And yes you were right (it was the last one) :)
-
May 24th, 2015 6:15 PMFamiliaWerneckAlso, this question comes from a second line of research I'm doing. XP (oh yeah! HAHAHAHA)
I tried a new way of unlocking the National Dex early in the game. I've tested it, and so far, so good.
But how do you test what you do? How do you know if you didn't psyduck something up in the game? -
May 24th, 2015 6:12 PMFamiliaWerneckOk, but if it's doable ok.
I made a list with every Pokémon I intend to have in my game, with their respectives evolution conditions. I don't mind writing an evolution for each.
Question is, do I have to make an evolution like that for each Pokémon like Onix, or for each item, like Metal Coat?
I'm using that only in last case.
Also, thought of another way. Using these items like "evolutionary stones". But they would only work if the Pokémon was at least level X.
Pokémon wouldn't need to hold the item to evolve, thus making one less argument.
Can that be done more efficiently? Or would I have to write an evolution method for each "evolutionary stone" too? -
May 24th, 2015 5:29 PMkearnseyboy6Yes, you can. But it will be specific to Onix only. THe routine will have to check for Metal Coat and then branch to the level check location after it. That is the routine, if you want it for kings rock, you need to write a brand new evolution method. Possible, just not efficient enough for my liking.
-
May 24th, 2015 4:36 AMFamiliaWerneckOh, I get it. So basically, I can't for example make Onix evolve into Steelix at level 50+ with Metal Coat. Is that it?
-
May 24th, 2015 4:07 AMkearnseyboy6You can but it will be a bad evolution.
You will be limited for one item per routine. So you can only check for 'Light Clay' and 'Any Level'.
Or you can check 'Any Item' and level '27'.
You can't have 'any item' and 'any level'. It's just not supported because there is only one argument in the evolution method (check G3HS) -
May 24th, 2015 1:55 AMFamiliaWerneckI didn't get it. Why can't I make a Level + Item evolution?
I believe that already exists in some hacked ROMs, plus a lot of people discussed this in yor thread.
What do you mean by "there is only one argument allowed you cannot."? -
May 23rd, 2015 10:37 PMkearnseyboy6Level + Item... No not really. Because there is only one argument allowed you cannot. But for male and female evolutions yes you can. Just combine the 2 routines from gender and held item :)


