- 252
- Posts
- 12
- Years
- Seen Jul 6, 2019
Is it that hard to read?Oh! Thanks man, about Weather effects, who worked with that? I bet the tut. was here in PC.
Is it that hard to read?Oh! Thanks man, about Weather effects, who worked with that? I bet the tut. was here in PC.
I'm working on stat reducing berries atm.
Weather effects is being worked on by HidoranBlaze. Weather effects adding is already done. As for the Bike one, I haven't decided yet :P
.text
.align 2
.thumb
.thumb_func
main:
push {r0-r2, lr}
ldr r0, =(0x20370D0)@get tree data
ldrh r0, [r0]
ldr r1, .SAVEBLOCK
mov r2, #0x6
mul r0, r0, r6
add r0, r0, r1
ldr r1, =(0x20370C2) @put values in vars
ldrb r2, [r0]
strb r2, [r1] @current stage
add r0, r0, #0x1
add r1, r1, #0x2
ldrh r2, [r0]
strh r2, [r1] @time planted
add r0, r0, #0x2
add r1, r1, #0x2
ldrb r2, [r0]
strb r2, [r1] @was watered
add r0, r0, #0x1
add r1, r1, #0x2
ldrb r2, [r0]
strb r2, [r1]@times watered
add r0, r0, #0x1
add r1, r1, #0x2
ldrb r2, [r0]
strb r2, [r1]@PlantID
updateStage:
@check time passed and update
ldr r1, = (0x300500C)
ldrh r2, [r1, #0xE] @hours
mov r3, #0x3C
mul r2, r2, r3
ldrb r3, [r1, #0x10]@minutes
add r2, r2, r3 @current time in minutes
ldr r3, =(0x20370C4)
ldrh r3, [r3]
sub r2, r2, r3
mov r3, #0x0
mov r1, #0x14 @CHANGE THIS TO CHANGE TIME BETWEEN PHASES
loop:
cmp r1, r2
blo setWater
lsl r1, r1, #0x1
add r3, r3, #0x1
b loop
setWater:
ldr r1, =(0x20370C2)
ldrh r1, [r1]
cmp r3, r2
ble end
ldr r2, =(0x20370C2)
strb r3, [r2]
ldr r2, =(0x20370C6)
mov r3, #0x0
strb r3, [r2]
pop {r0-r2, pc}
.align 2
.SAVEBLOCK:
.word 0x203C000
07 B5 1A 48 00 88 18 49 06 22 70 43 40 18 18 49 02 78 0A 70 01 30 02 31 02 88 0A 80 02 30 02 31 02 78 0A 70 01 30 02 31 02 78 0A 70 01 30 02 31 02 78 0A 70 0F 49 CA 89 3C 23 5A 43 0B 7C D2 18 0D 4B 1B 88 D2 1A 00 23 14 21 91 42 02 D3 49 00 01 33 FA E7 06 49 09 88 93 42 FE DD 04 4A 13 70 06 4A 00 23 13 70 07 BD 00 C0 03 02 D0 70 03 02 C2 70 03 02 0C 50 00 03 C4 70 03 02 C6 70 03 02
.text
.align 2
.thumb
.thumb_func
main:
push {r0-r4, lr}
ldr r0, =(0x202370B8) @max
ldr r1, =(0x202370BA) @min
ldrb r1, [r1]
mov r2, r0
sub r2, r2, r1 @max -min
bl generateRand
mov r4, r3
add r4, r4, r1 @rand between min and max
ldr r3, =(0x202370C8)
ldrb r3, [r3] @times watered
sub r3, r3, #0x1
mul r2, r2, r3 @apply DPPT berry yield formula
add r2, r2, r4
lsr r2, r2, #0x2
add r2, r2, r1
ldr r1, =(0x202370D0) @store result in 0x800D
strb r2, [r0]
pop {r0-r4, pc}
generateRand:
push {r0-r2}
ldr r3, =(0x8044EC8 +1)
bl linker
lsl r0, r0, #0x10
lsr r0, r0, #0x10
pop {r2}
mov r1, r2
push {r2}
ldr r3, =(0x81E4684 +1)
bl linker
ldrb r3, [r0]
pop {r0-r2}
bx lr
linker:
bx r3
.align 2
1F B5 11 48 11 49 09 78 02 1C 52 1A 00 F0 0C F8 1C 1C 64 18 0E 4B 1B 78 01 3B 5A 43 12 19 92 08 52 18 0C 49 02 70 1F BD 07 B4 0B 4B 00 F0 0B F8 00 04 00 0C 04 BC 11 1C 04 B4 08 4B 00 F0 03 F8 03 78 07 BC 70 47 18 47 B8 70 23 20 BA 70 23 20 C8 70 23 20 D0 70 23 20 C9 4E 04 08 85 46 1E 08
.text
.align 2
.thumb
.thumb_func
main:
push {r0-r3, lr}
ldr r1, =(0x300500C)
ldrh r2, [r1, #0xE]
mov r3, #0x3C
mul r2, r2, r3
ldrb r3, [r1, #0x10]
add r2, r2, r3
ldr r3, =(0x20370C4)
strh r2, [r3]
pop {r0-r3, pc}
.align 2
0F B5 04 49 CA 89 3C 23 5A 43 0B 7C D2 18 02 4B 1A 80 0F BD 0C 50 00 03 C4 70 03 02
.text
.align 2
.thumb
.thumb_func
main:
push {r0-r2, lr}
ldr r0, =(0x20370BC)@get tree data
ldrh r0, [r0]
ldr r1, .SAVEBLOCK
mov r2, #0x6
mul r0, r0, r6
add r0, r0, r1
ldr r1, =(0x20370C2) @put values in vars
ldrb r2, [r1]
strb r2, [r0] @current stage
add r0, r0, #0x1
add r1, r1, #0x2
ldrh r2, [r1]
strh r2, [r0] @time planted
add r0, r0, #0x2
add r1, r1, #0x2
ldrb r2, [r1]
strb r2, [r0] @was watered
add r0, r0, #0x1
add r1, r1, #0x2
ldrb r2, [r1]
strb r2, [r0]@times watered
add r0, r0, #0x1
add r1, r1, #0x2
ldrb r2, [r1]
strb r2, [r0]@PlantID
pop {r0-r2, pc}
.align 2
.SAVEBLOCK:
.word 0x203C000
07 B5 0E 48 00 88 0C 49 06 22 70 43 40 18 0C 49 0A 78 02 70 01 30 02 31 0A 88 02 80 02 30 02 31 0A 78 02 70 01 30 02 31 0A 78 02 70 01 30 02 31 0A 78 02 70 07 BD C0 46 00 C0 03 02 BC 70 03 02 C2 70 03 02
'This is a comment
#dyn 0x740000
#org @start
lock
copyvar 0x8002 0x800D
callasm 0xOffset +1'set tree data
callasm 0xOffset + 1 'get tree data
compare 0x8005 0x0
if == jump @nonePlanted
compare 0x8005 0x1
if == jump @fresh
compare 0x8005 0x2
if == jump @sprouted
compare 0x8005 0x3
if == jump @growing
compare 0x8005 0x4
if == jump @blooming
callasm 0xOffset +1 'get yeild
storevar 0x0 0x800D
storevar 0x1 0x8009
additem 0x8009 0x800D
msgbox @recieved
callstd MSG_NORMAL
setvar 0x8005 0x0
setvar 0x8006 0x0
setvar 0x8007 0x0
setvar 0x8008 0x0
setvar 0x8009 0x0
callasm 0xOffset +1 'set tree data
msgbox @returned
callstd MSG_NORMAL
release
end
#org @nonePlanted
msgbox @none
callstd MSG_YESNO
compare LASTRESULT 0x0
if == jump @end
fadescreen 0x1
setvar 0x8000 0x7E
setvar 0x800E 0x0
callasm 0x0A1881
pauseevent 0x0
setvar 0x8000 0x0
compare 0x800E 0x0
if == jump @end
copyvar 0x8009 0x800E
storeitem 0x0 0x8009
msgbox @addedBerry
callstd MSG_NORMAL
setvar 0x8005 0x1
setvar 0x8007 0x0
setvar 0x8008 0x0
callasm 0xOffset +1' set time
callasm 0xOffset +1' set tree data
removeitem 0x8009 0x1
release
end
#org @fresh
storeitem 0x0 0x8009
msgbox @newplant
callstd MSG_NORMAL
compare 0x8007 0x0
if <= jump @water
msgbox @wateredAlready
callstd MSG_NORMAL
release
end
#org @sprouted
storeitem 0x0 0x8009
msgbox @sprouting
callstd MSG_normal
compare 0x8007 0x0
if <= jump @water
msgbox @wateredAlready
callstd MSG_NORMAL
release
end
#org @growing
storeitem 0x0 0x8009
msgbox @tall
callstd MSG_NORMAL
compare 0x8007 0x0
if <= jump @water
msgbox @wateredAlready
callstd MSG_NORMAL
release
end
#org @blooming
storeitem 0x0 0x8009
msgbox @bloom
callstd MSG_NORMAL
compare 0x8007 0x0
if <= jump @water
msgbox @wateredAlready
callstd MSG_NORMAL
release
end
#org @water
checkitem 0x1 0x1 'checks you have one masterball. Change 0x1 to your watering item
if != jump @end
msgbox @wantWater
callstd MSG_YESNO
compare LASTRESULT 0x0
if == jump @end
msgbox @finishedWatering
callstd MSG_NORMAL
addvar 0x8007 0x1
addvar 0x8008 0x1
copyvar 0x800D 0x8005
callasm 0x800001 'set tree data
release
end
#org @end
release
end
#org @addedBerry
= You planted a \v\h02 here.
#org @returned
= The soil returned to it's soft and\nloamy state.
#org @newplant
= A \v\h02 was planted here.
#org @none
= The soil is soft here[.]\nPlant a berry?
#org @bloom
= The \v\h02 plant is in bloom!
#org @tall
= The \v\h02 plant\nis growing bigger.
#org @sprouting
= The \v\h02 has sprouted.
#org @wantWater
= The plant can use some water[.]\nWould you like to water it?
#org @wateredAlready
= It's been watered already.
#org @recieved
= \v\h01 found \v\h02 \v\h03!
#dyn 0x740000
#org @start
setvar 0x8000 0x[max berry yield]
setvar 0x8001 0x[min berry yield]
setvar LASTRESULT 0x[Tree ID]
jump 0x8[Offset where you compiled the above script]
General variables:
var 0x8000: Max berry yield for tree
var 0x8001: Minimum berry yield for tree
var 0x8005: Current stage
var 0x8006: Time planted
var 0x8007: Was watered
var 0x8008: Times watered
var 0x8009: ID of berry
RAM Data storage:
[Current Stage: 1 byte]
[Time planted: 2 bytes]
[Watered: 1 byte]
[times watered: 1 byte]
[ID of plant: 1 bytes]
Another suggestion about your Silent evolution hack, you can improve it by letting a certain pokemon holing specific item evolve in your method than a pokemon in an specific slot.
I'll do that from future. I'm too lazy to do it for these :PMay I suggest? Will you make a compile version for your hacks, I lost my effective and super cool THUMB compiler and I forgot where todownload that kinda awesome tool...
In addition to the EV berries, it would be awesome if you could make berries that can call new asm or something to create the new berries like custap and roseli :D
How about an specific pokemn rather than Pokemon party slot..
by the way what is the name of your THUMB compiler?
.text
.align 2
.thumb
.thumb_func
main:
push {r0-r4, lr}
ldr r0, = (0x20370C0)
ldrb r1, [r0]
ldr r0, =(0x2024284)
mov r2, #0x64
mul r1, r1, r2
add r0, r0, r1
mov r4, r0
ldr r2, =(0x20370D0)
ldrb r1, [r2]
push {r4}
ldr r3, =(0x803FBE8 +1)
bl linker
pop {r4}
ldr r2, =(0x20370B8)
ldrb r3, [r2]
cmp r3, r0
bhi NoEffect
sub r0, r0, r3
mov r3, r0
end:
mov r0, r4
ldr r2, =(0x20370D0)
ldrb r1, [r2]
strh r3, [r2]
ldr r3, =(0x804037C +1)
bl linker
pop {r0-r3, pc}
noEffect:
ldr r2, =(0x20370d0)
mov r1, #0xFF
strb r1, [r2]
pop {r0-r4, pc}
linker:
bx r3
.align 2
1F B5 10 48 01 78 10 48 64 22 51 43 40 18 04 1C 0E 4A 11 78 10 B4 0E 4B 00 F0 13 F8 10 BC 0D 4A 13 78 83 42 FE D8 C0 1A 03 1C 20 1C 07 4A 11 78 13 80 09 4B 00 F0 05 F8 0F BD 04 4A FF 21 11 70 1F BD 18 47 C0 70 03 02 84 42 02 02 D0 70 03 02 E9 FB 03 08 D2 70 03 02 7D 03 04 08
#dyn 0x740000
#org @start
special 0x9f
waitspecial
storepartypokemon 0x0 0x8004 'bufferpokemon2 in xse
setvar LASTRESULT 0x[EV to modify]
setvar 0x8000 0x[amount to decrease EV by]
callasm 0x[routine +1]
compare LASTRESULT 0xFF
if == jump @failed
storevar 0x1 0x800F 'buffervar in xse
msgbox @gain
callstd MSG_NORMAL
removeitem 0x[ID] 0x1
release
end
#org @failed
msgbox @noEffect
callstd MSG_NORMAL
release
end
#org @noEffect
= It would have no effect!
#org @gain
= \v\h02 gained \v\h03\nInsert the EV your berry gives
There's a routine made by itari that returns the number of specified Pokemon you have. It'd be easy to modify that to return the party slot of a specific pokemon.Ok I have a request. Could you make an asm routine that searches your party for a specific pokemon and then stores its party slot in a variable?
And could you possibly do it for emerald cause I know thats a thing for fire red all ready.
.text
.align 2
.thumb
.thumb_func
.global CountPartyPokemonSpecies
main:
push {r0-r7, lr}
ldr r6, var
ldr r7, party_amount
ldrb r4, [r7] @ Get Pokemon count from r7
cmp r4, #0x0
beq exit
ldrh r3, [r6] @ Get the species to check
cmp r3, #0x0
beq exit @ Don't allow Missingno. This doesn't limit the species from going up, though.
mov r7, #0x0
loop:
ldr r0, first_pokemon @ Offset of first Pokemon
mov r1, #0x64 @ Length of Pokemon RAM data
mul r1, r1, r7 @ r7 holds current index
add r0, r0, r1
bl decrypt_poke_species @ Get this specific species.
mov r9, r0
pop {r0-r7}
cmp r9, r3
beq exit
next:
add r7, r7, #0x1 @ Increase party index
cmp r7, r4 @ And compare against the number in the party
blo loop @ I could use a bls here?
mov r7, #0xFF
exit:
str r7, [r6, #0x10] @ Store the index (r7) in r6 (the var -- 0x800D)
pop {r0-r7, pc} @ Return
decrypt_poke_species:
push {r0-r7}
mov r1, #0xB @ This is the index for the Pokemon species.
ldr r2, decrypt_poke @ Call the Pokemon decryption code
bx r2
.align 2
party_amount:
.word 0x02024029
first_pokemon:
.word 0x02024284
var: @ Got this beauty from HackMew.
.word 0x020270B8 + (0x8004 * 2)
decrypt_poke:
.word 0x0803FBE9
Can you give a full script on how it works?Use special 0x9F to select the Pokemon then callasm.
EV Reducing berries
Speaking of special 0x9F, I finished EV reducing berries which was rather easy.
First of all, follow this tutorial: https://www.pokecommunity.com/threads/258426
until you get to the part where you have to give the item an effect via script.
Compile and insert into free space the following routine:
Spoiler:
Code:.text .align 2 .thumb .thumb_func main: push {r0-r3, lr} ldr r0, = (0x20370C0) ldrb r1, [r0] ldr r0, =(0x2024284) mov r2, #0x64 mul r1, r1, r2 add r0, r0, r1 mov r4, r0 ldr r2, =(0x20370D0) ldrb r1, [r2] ldr r3, =(0x803FBE8 +1) bl linker ldr r2, =(0x20370D2) ldrb r3, [r2] sub r3, r3, r0 cmp r3, #0x0 bls setZero b end setZero: mov r3, #0x0 end: mov r0, r4 strh r3, [r2] ldr r2, =(0x20370D0) ldrb r1, [r2] ldr r3, =(0x804037C +1) bl linker pop {r0-r3, pc} linker: bx r3 .align 2
For the part of inserting a script to give your item functionality, you need to insert this script.
Code:#dyn 0x740000 #org @start special 0x9f storepokemonvar 0x0 0x8004 'bufferpartypokemon2 in xse setvar LASTRESULT 0x[EV to modify] setvar 0x800F 0x[amount to decrease EV by] callasm 0x[routine +1] storevar 0x1 0x800F 'buffervar in xse msgbox @gain callstd MSG_NORMAL release end #org @gain = \v\h02 gained \v\h03\nInsert the EV your berry gives
In variable 0x800F put the amount the EV is to decrease by.
In variable 0x800D put which EV you want to modify, in this format:
0x1A - HP EV
0x1B - Attack EV
0x1C - Defence EV
0x1D - Speed EV
0x1E - Sp. Attack EV
0x1F - Sp. Defence EV
Ok I have a request. Could you make an asm routine that searches your party for a specific pokemon and then stores its party slot in a variable?
And could you possibly do it for emerald cause I know thats a thing for fire red all ready.
Thanks :PThere's a routine made by itari that returns the number of specified Pokemon you have. It'd be easy to modify that to return the party slot of a specific pokemon.
And, here you go! Credits to itari for the original ASM routine, which I modified a tad. The original routine can be found here: https://www.pokecommunity.com/posts/8388671/
If you want this to work for EM, just use the same offsets she posted.
Code:.text .align 2 .thumb .thumb_func .global CountPartyPokemonSpecies main: push {r0-r7, lr} ldr r6, var ldr r7, party_amount ldrb r4, [r7] @ Get Pokemon count from r7 cmp r4, #0x0 beq exit ldrh r3, [r6] @ Get the species to check cmp r3, #0x0 beq exit @ Don't allow Missingno. This doesn't limit the species from going up, though. mov r7, #0x0 loop: ldr r0, first_pokemon @ Offset of first Pokemon mov r1, #0x64 @ Length of Pokemon RAM data mul r1, r1, r7 @ r7 holds current index add r0, r0, r1 bl decrypt_poke_species @ Get this specific species. mov r9, r0 pop {r0-r7} cmp r9, r3 beq exit next: add r7, r7, #0x1 @ Increase party index cmp r7, r4 @ And compare against the number in the party blo loop @ I could use a bls here? mov r7, #0xFF exit: str r7, [r6, #0x10] @ Store the index (r7) in r6 (the var -- 0x800D) pop {r0-r7, pc} @ Return decrypt_poke_species: push {r0-r7} mov r1, #0xB @ This is the index for the Pokemon species. ldr r2, decrypt_poke @ Call the Pokemon decryption code bx r2 .align 2 party_amount: .word 0x02024029 first_pokemon: .word 0x02024284 var: @ Got this beauty from HackMew. .word 0x020270B8 + (0x8004 * 2) decrypt_poke: .word 0x0803FBE9
This should store the party slot (which would be from 0-5) in 0x800D. Haven't tested it, but I'm fairly confident it should work.
EDIT: Ok, realized there was an oversight, so I modified it a bit. This should return 0xFF if the specified Pokemon doesn't exist in your party. I shouldn't be modifying routines at 2 am lol.
Make sure you set the var 0x8004 to the species you want. The routine should return a value between 0-5 if the Pokemon exists, or 0xFF if it doesn't exist, in var 0x800D. Check for those in a script.
Can you give a full script on how it works?
This is great! man! Just a request or anyone here who can give me a THUMB compiler.
While it is possible, you would have to put these Pokemon into a save block. Each Pokemon take 100 bytes of space (but if it's just for storage this value is a little less). Needless to say, even with JPAN's save block hack you would only be able to have about 37 Pokemon in this storage. It would be fine for a small team of 5 I suppose. This is an idea I thought up of some time ago as well, however, back then I didn't have the expertise to implement it. Hopefully now I can try for a smaller team size (no promises :P).I've came up with another idea, I hope it is not very complicated xD.
The main thing is being able to have two separated teams. I know havingo two different Storage Sistems would be really difficult, but I thougth it might be easier this way. For example you are playing with a character, and then you want to change the perspective and take control of another one; you don't want to have the same team for both, so you need to store the first team and give the second character it's own team that is stored in other place...
Is this possible??
It's not just hard, it requires a complete rework of the current system. The system assumes you have only four moves when:If this is hard, ignore this post:
You can have more than 4 moves.
I will give you some ideas and suggestions:
A routine for Mega Evolution, we dont need a Mega Ring because it is very hard, I think:
1.Routine of Item effect(Held item) that checks an specific specie of pokemon then go to Evolution routine(You can use silent evolution so it is not time consuming)
TIP: You can compare how Berries affect in battle so that, instead of eating it, it will go to silent evolution routine. Also, you can use your method in Ev reducing berries to call a script so that you are now able to search certain species
2.Routine of "Return Specie" after the battle it will goto Silent evolution method
With these routines, Advance rom will now be Mega Advance rom XD
This "Inheriting IVs from parents (via Destiny Knot, in the daycare)" is amazing but something is missing is "everstone" since in emerald and later games give 50-100% to inherit the natu of the poke holding the item, could you do that??
Thanks dude, are you working in Weather effects when a certain pokemon enters a battle?
Ohhh ok!
Ahhmm...
Thinking of my new request
. .
Manaphy and Phione Breeding strategy
... ...Can you make it that Even though Phione wont evolve into Manaphy, if bread in Ditto, it produces Phione.
Change Sprite without changing its dex number
... ...I do mean Rotom's forms, An Item effect(For Arceus forme) and/or script (for rotom forme)
Beauty Port from RSE to FR
... ...So Can you port RSE's Beauty feature into FR?