The PokéCommunity Forums

The PokéCommunity Forums (https://www.pokecommunity.com/index.php)
-   Binary Hack Tutorials (https://www.pokecommunity.com/forumdisplay.php?f=66)
-   -   Om3GA ARS3NAL's Scripting Secrets (https://www.pokecommunity.com/showthread.php?t=167263)

Liquid Shadow January 30th, 2009 9:56 PM

Quote:

Originally Posted by 0m3GA ARS3NAL (Post 4322028)
!!!!I have been trying to find those offsets! Can you please link me to that particular RHN?!!!!

(But yeah, I do believe that this method would work, I have renamed the first bit of information, to 'Explaining the Daycare Script'. But I do believe if I could find the location the pokemon were stored, I could pull this off... I can't find it though...)

What offsets lol? The ones for the OW? If so, they are located in the INI of Hackmew's Overworld Editor RE, but anyways here's the link to the RHN: http://www.pokecommunity.com/showpost.php?p=4216237&postcount=300

Oh and just a quick question to any scripters here... The loadbytefrompointer and loadbytetooffset would work on Ruby if you want to change the main players OW, correct?

0m3GA ARS3NAL January 30th, 2009 10:12 PM

Quote:

Originally Posted by NeoNemesis (Post 4322109)
What offsets lol? The ones for the OW? If so, they are located in the INI of Hackmew's Overworld Editor RE, but anyways here's the link to the RHN: http://www.pokecommunity.com/showpost.php?p=4216237&postcount=300

Oh and just a quick question to any scripters here... The loadbytefrompointer and loadbytetooffset would work on Ruby if you want to change the main players OW, correct?

By Offset, I mean the offsets in the RAM.
The bytes with the sprite information have to be stored somewhere... and the offsets to that have to be something, ammirite?
I know them now though, Darthatron showed me, I am going to check out that RHN now...

ZodiacDaGreat January 30th, 2009 10:41 PM

You can search for it in the RAM ^^ Open the Search For Cheats, and set it to this:
Search Type = Specific Value
Data Size = 32 bits
Compare Type = Equal
Signed/Unsigned = Hex
value = 08+pointertomale/female sprite data

liuyanghejerry January 31st, 2009 5:48 PM

This is the script that retaken the pokemons to the player.
But this is just a simple one,I remove the "check" thing,so if there's any problems about your team (Is it full?),it may go wrong.And I also remove the "Pay" function ,so that you can get your pokemon back for free.

Code:

'This script isn't safe,just for test!
#dynamic 0x575288
lock
faceplayer
setvar 0x8004 0x0
special2 LASTRESULT 0xC0
message @2 0x2
release
end

#org @2
= Done.


Hope it helps...

0m3GA ARS3NAL February 1st, 2009 11:29 PM

Quote:

Originally Posted by liuyanghejerry (Post 4323634)
This is the script that retaken the pokemons to the player.
But this is just a simple one,I remove the "check" thing,so if there's any problems about your team (Is it full?),it may go wrong.And I also remove the "Pay" function ,so that you can get your pokemon back for free.

Code:

'This script isn't safe,just for test!
#dynamic 0x575288
lock
faceplayer
setvar 0x8004 0x0
special2 LASTRESULT 0xC0
message @2 0x2
release
end

#org @2
= Done.


Hope it helps...

I think you dont understand Special2's function... Special2 writes a value to the variable given (In this case, it would be LASTRESULT (0x800D))
What this script here does, is...

Lock the player
Make the sprite face the player
set 0x8004 to 0
set LASTRESULT to an unknown value stored in special2 0xC0
Display a message
Unlock player and sprite
end script

This does not add the pokemon to the party, I am afraid...


Also, ZodiacDaGreat, how would searching for the sprite data make a difference? Shouldn't I search for the pokemon's party data?

ZodiacDaGreat February 2nd, 2009 12:13 AM

Excuse me? Who was it that wanted the pointer to where the player's sprite location is stored? Anyway, for pokemon party data its all here:
Quote:

* Ruby: 0x03004360
* Sapphire: 0x03004360
* Emerald: 0x02024190 (0x020244EC for US games??)
* FireRed: 0x02024284
* LeafGreen: 0x020241e4
He's what I can do, copy the data of one pokemon to another area in the ROM(Taking Pokemon) and copying it back(Giving) the only thing I have yet to try is whether or not the data copied to a different area of the ROM is saved if the player saves the game and turns off the GBA.

0m3GA ARS3NAL February 2nd, 2009 12:21 AM

Quote:

Originally Posted by ZodiacDaGreat (Post 4326933)
Excuse me? Who was it that wanted the pointer to where the player's sprite location is stored? Anyway, for pokemon party data its all here:

He's what I can do, copy the data of one pokemon to another area in the ROM(Taking Pokemon) and copying it back(Giving) the only thing I have yet to try is whether or not the data copied to a different area of the ROM is saved if the player saves the game and turns off the GBA.

Oh, *Facepalm* I know where they are now, I asked Darthatron, he told me a day ago...
Sorry, but in any case... What is the format of the Party Data? like, what do the different bytes mean?

ZodiacDaGreat February 2nd, 2009 12:34 AM

This should help ;) (Fillers)

0m3GA ARS3NAL February 2nd, 2009 12:47 AM

Well then... this should not be so hard... all we gotta do is insert a pokemon into the 'daycare' system, then search for the missing bytes elsewhere in the RAM, then once found, we gotta load the missing bytes into 100 different variables, and write them back to the missing party slot...

ZodiacDaGreat February 2nd, 2009 12:50 AM

lol, thats off - using 100 variables cause it makes no difference of wasting variables :/ ASM is your best bet here.

Edit: Its problematic if you try something like a read and write byte array with scripting.

0m3GA ARS3NAL February 2nd, 2009 12:58 AM

Quote:

Originally Posted by ZodiacDaGreat (Post 4326984)
lol, thats off - using 100 variables cause it makes no difference of wasting variables :/ ASM is your best bet here.

Well, if you could load the 100 byte string representing the pokemon inserted into the daycare, divided into 100 bytes, put onto 100 variables, then you could use writebytetooffset and write the bytes to the empty slot in the party.

thethethethe February 2nd, 2009 2:43 AM

Quote:

Originally Posted by 0m3GA ARS3NAL (Post 4326991)
Well, if you could load the 100 byte string representing the pokemon inserted into the daycare, divided into 100 bytes, put onto 100 variables, then you could use writebytetooffset and write the bytes to the empty slot in the party.

No ASM is the best way to do it. I've already written up a code to do it all, I just need to test it all out for any bugs and errors when I find the time.

Through the Pokemon script engine it would take up far too much space in the ROM with 100 writebytetooffset's, and load byte to offsets plus the rest of the script. Then again to send the data back, which would obviously take thousands of bytes. Those commands are only useful for the odd little thing. You're much better off with ASM and only using probably at most 1/10th of the space. It would also be more efficient time-wise.

@Zodiacdagreat
After you mentioned it to me, only some areas of the 02000000 range don't reset with the restart of the game. I didn't try the 03... range though. I only went off and found an offset that didn't reset.

0m3GA ARS3NAL February 2nd, 2009 2:48 AM

LOL, so true, I was just trying to think of a non-ASM alternative... I dont know ASM in any case, and most tutorials I find are confusing, and not written in a way I can understand it... I wish you would make an ASM tutorial thethethethe... you make good tutorials...

Charlzard February 2nd, 2009 3:55 AM

Are you not the guy who "made" a follow me script?

0m3GA ARS3NAL February 3rd, 2009 12:54 AM

Quote:

Originally Posted by Charlzard (Post 4327130)
Are you not the guy who "made" a follow me script?

I made a Diamond/Pearl/Platinum styled version of the script, where you have to place a copy of the tile on EVERY tile, and they can not follow you from map to map, but yes...
Why do you ask?

liuyanghejerry February 3rd, 2009 1:58 AM

Quote:

Originally Posted by 0m3GA ARS3NAL (Post 4326883)
I think you dont understand Special2's function... Special2 writes a value to the variable given (In this case, it would be LASTRESULT (0x800D))
What this script here does, is...

Lock the player
Make the sprite face the player
set 0x8004 to 0
set LASTRESULT to an unknown value stored in special2 0xC0
Display a message
Unlock player and sprite
end script

This does not add the pokemon to the party, I am afraid...

Hehe,I understand your doubt,but did you even try my script?
Let me show you :http://liuyanghejerry.hostse.com/K.rar
(There's a AVI video of 50+MB in this rar. Tell me if you can't watch it.)

Charlzard February 3rd, 2009 3:18 AM

Jw, because Roy said you and Younghove made a follow me script. Why don\'t you release that?

You must be a good scripter :p

foullump February 3rd, 2009 7:10 AM

Glad to see it's finally been cracked! Many people just edit the old script, but that's too buggy. More people should write the script manually.

Juan February 3rd, 2009 1:02 PM

I did a routine ASM to remove an Pokémon, and one for him again.
The tutorial is in Portuguese, do not translate because my English is very bad, and not rely so much on google.

Video(very simple):

http://br.youtube.com/watch?v=7ZD9_TVtKH0

Tutorial (BPRE): http://rhm.890m.com/site/index.php/rotinas-assembly/63-asm-take-pokemon.html

--------------------------------------------
PT-BR:
Eu fiz uma rotina ASM para remover um pokémon, e outra para pegá-lo novamente.
O tutorial está em português, não traduzo pois meu inglês é muito ruim, e não confio tanto no google.

0m3GA ARS3NAL February 3rd, 2009 1:42 PM

Quote:

Originally Posted by Charlzard (Post 4329579)
Jw, because Roy said you and Younghove made a follow me script. Why don\'t you release that?

You must be a good scripter :p

Well, it is not taht practical, since it has to be placed on every tile you want the player to be able to walk on... A follow Me Script would be to... space consuming... over 3000 lines of script for a very smooth one... pretty big... well, I might... let me think about it...

Quote:

Originally Posted by Juan (Post 4330502)
I did a routine ASM to remove an Pokémon, and one for him again.
The tutorial is in Portuguese, do not translate because my English is very bad, and not rely so much on google.

Video(very simple):

http://br.youtube.com/watch?v=7ZD9_TVtKH0

Tutorial (BPRE): http://rhm.890m.com/site/index.php/rotinas-assembly/63-asm-take-pokemon.html

--------------------------------------------
PT-BR:
Eu fiz uma rotina ASM para remover um pokémon, e outra para pegá-lo novamente.
O tutorial está em português, não traduzo pois meu inglês é muito ruim, e não confio tanto no google.

Well, No offence, but thethethethe also made one, I'll use both of yourse and compare them... may the best one win, but in any case, I started a revolution, hehehe. I am writing up some more usefull information, so expect an update sometime soon!

Juan February 3rd, 2009 3:15 PM

Quote:

Originally Posted by 0m3GA ARS3NAL (Post 4330611)
Well, No offence, but thethethethe also made one, I'll use both of yourse and compare them... may the best one win, but in any case, I started a revolution, hehehe. I am writing up some more usefull information, so expect an update sometime soon!

Not understand very well what he said, because the translator does not help much xD
But anyway, the idea was his, never said otherwise.
And I did not see the routine of thethethethe, and am still learning ASM, it served as a good training ^ ^
Who want to seize it any hack, or even optimize it, make a wish, it is even better because I learn more.
PS: the google translator is a bit better than the Cade, I did not know it ^


All times are GMT -8. The time now is 9:00 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.