![]() |
Om3GA ARS3NAL's Scripting Secrets
Hello all, and thanks for even opening this! ^-^
Anyways... I am not about to make this all flashy and pretty, because it isn't, these scripting techniques should not be tried unless you are sure you know what you are doing! This is for Advanced - Expert Scripters, fluent in PokeCode. (XSE is preferable, since that is what I will be using.) Also, in each special script I show you, I will use 'OFFSET-A', or 'OFFSET-B' as placeholders for whatever you want. Okies... here is the first thing I will be including in this document... The quite sought after... Explaining the Daycare Script Ok, First off, lets post the WHOLE code, then I'll break it down, and explain each line individually. Code:
Code:
Code:
Code:
Code:
Code:
Code:
Code:
Code:
Code:
Code:
If you have any questions, you know how to post here! Don't ask about how to return taken pokemon to the player, I am still working out the kinks to that! |
Nice tutorial. A long-ass method of returning the Pokémon would be to save the Pokémon's statistics into RAM (copybyte) at the end of this script, and then to copyvar them back in a different script.
|
Yes you posted it!
You are seriously a scripting god Omega I needed the take pokemon for globel earth Tanks |
Quote:
Hehe, I am just working out the kinks... and trying to find out how to copy a value loaded into [buffer1] into a variable... If you can help me do that, then I'll post how to return pokemon, since that is needed to do so... I've read your stuff, tutorials and such, but I like your style Cy-Chan, and you seem to know alot about the more advanced things about a Pokemon ROM... so I gotta ask, do you know how to copy [Buffer1] to a varialbe? (Like LASTRESULT or 0x8008?) |
Yeah, the only problem is, normally, returning Pokemon involves paying. To cancel that out, we just need to find out how much money is taken away and use givemoney to give that much. :\
|
Quote:
|
Quote:
But if you went that way, there isn't too much point in going with removing the Pokemon through ways of the in built scripting engine thing, you'd just go with this way. Quote:
Then again, I haven't done too much lately and I could be wrong. |
taking a pokemon, huh? it's really cool.
useful for my hack. thanks for this. :) |
What thethethethe said pretty much sums it up, I'd think... I can't really expand on that.
Maybe if you tried checking where the Pokémon is stored in RAM, after being taken? In order to retrieve it, the data still has to be there, after all. |
Quote:
|
Quote:
If it's not moved (the data simply disappears), then the game has no way of remembering the Pokémon deposited, and no return Pokémon script can be made from this script. If it is moved, well... good! |
Quote:
|
Ah! Well, I'm not sure, really. I was just saying, the Pokémon needs to be stored in RAM after it's taken away, otherwise it can't be returned, right?
|
I thought of something that may or may not help. Don't ridicule me cause im only an ok scripter.
But maybe you can figure out a give pokemon script if you look at the daycare script. They always give back the pokemon and stuff. idk. it's just an idea. |
Quote:
|
Quote:
EDIT* would this script work with ruby? |
Quote:
But it is not hard to figure out... Just look at the Daycare script from ruby and do some testing with that! (Also, this script is not very practical for stealing pokemon... since you have to select the pokemon yourself... but I think it might work like a phony pokemon daycare, like Cassidy and Burt did on an episode of pokemon... *Butch yells- I TOLD YOU, MY NAME IS BUTCH!* |
Quote:
|
Quote:
If I could figure out how to ASM hack... I would do it... does anyone know where I can find some semi-understandable ASM tutorials? (I have always wanted to learn ASM, but I could never find a tutorial that I could understand...) |
Wow...
OMG. I have been trying to find this for ages, and here it is sticking out at me. This will really help me with my one script, so Thanks! All I need to do now is find out how to remove the select a Pokemon Special. Maybe it uses one of the special variables, such as 0x8002?
|
Sorry if I say that but... this is just the way the Pokémon Daycare works. It's not really like a "takepokemon" in the true meaning of the term. Basically a surrogate, if you ask me. "Who cares if it works?" you may say. Well, it doesn't really work because you wouldn't be able to use the daycare in your hacks. Keep in mind Daycare = eggs as well.
Now, what's my idea about takepokemon? ASM hacking + scripting of course. First you need to make the usual checks to make sure the player has at least 2 Pokémon (the second one not being an egg, for example). Then you would set a variable, like 0x8000, in order to choose the Pokémon that should be taken away. Then you would check the value hold by the variable is in a proper range, that is it couldn't be 0x5 when you have just 2 Pokémon. If everything was fine you set another variable like 0x8001 to either 0x0 or 0x1. The reason of this will be explained in a minute. Then an ASM script would be called. The ASM script would first check if some Pokémon was taken away already. If so, unless variable 0x8001 is set to 0x1, the ASM script would end. Otherwhise it would get the Pokémon data and store it on a safe memory area (overwriting anything there in case a Pokémon was removed already and 0x8001 was set to 0x1). Then the Pokémon data would be erased and the rest of the data adjusted eventually. Finally a "takepokemon flag" would be set. That flag would be useful of course in case you want to get back the Pokémon with another ASM script later on or in case you want to check if a Pokémon was taken away so far. Pretty complex? Maybe. I wish I knew more ASM. |
True HackMew, this is not quite a 'tekepokemon' per say, but it is an acceptable placeholder...
For instance, you could infact add a daycare later in the game, if this event were to come first. (In the hack I am working on, the player has the option of giving a little girl her first pokemon, and later in my hack, there is in fact a daycare, and it works out perfectly... I have tested it and everything.) But I do think ASM would work much better, that is why I want to learn it, and that is why I said... Quote:
|
Quote:
|
Quote:
(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...) |
I can try to attempt a routine a cheapo one first without any check for egg or party amount then improve from there. I don't promise anything though XD
|
Quote:
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? |
Quote:
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... |
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 |
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:
|
Quote:
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? |
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:
|
Quote:
Sorry, but in any case... What is the format of the Party Data? like, what do the different bytes mean? |
This should help ;) (Fillers)
|
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...
|
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. |
Quote:
|
Quote:
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. |
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...
|
Are you not the guy who "made" a follow me script?
|
Quote:
Why do you ask? |
Quote:
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.) |
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 |
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.
|
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. |
Quote:
Quote:
|
Quote:
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. |
![]()
© 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.