You are not logged in.
I'm trying to make it so all Pokemon are catchable in my Silver rom hack. This includes the legendaries, but I want them to be intractable (like Lugia and Ho-Oh) and, for the life of me, I cannot figure out how.
I've read every post on this website (at least, near every post) dealing with adding these Pokemon events. None make sense to me because I am a beginner (Don't know Hex coding, first time rom hacking). I've fiddled around with both Jotoh Map and PKSV to make a script, nothing works in success. After that I tried using PKSV's script generator and the NPC I replace with the pokemon always gives me different results. A crash, Glitch Dimension, the NPC is gone entirely, or nothing changes.
That said, I learn best from visuals so I looked at Ho-Oh's script and some other working scripts made by people.
With Ho-Oh's this is how I perceive it:
#org 0x16E913 (This is the Script location, according to JohtoMap)
2writetext 0x693B (I have no idea how this is calculated...) ' 0x16E93B (+20 is added onto the end of this line...? It is for certain scripts at least)
cry 0xFA (Pokemon's cry)
pause 0xF (I'm assuming the amount of time it's pausing for)
if true 0x6930 ' 0x16E930
writecode 0x3 0xA
loadpokedata 0xFA 0x28
(from setbit to disappear 0x2 I am lost)
writecode 0x3 0xA
loadpokedata 0xFA 0x46
(I see some scripts have this additional part and some not? I don't know the meaning)
#org 0x16E93B (Text, same script number as the second number on 2writetext)
In essence, what I'm struggling with is understanding this script as a newbie. Like, what would the script look like if it was for encountering, say, Mew as the berry tree on the first route you visit in Johto? And what does this text all stand for?
Furthermore, how come PKSV's script generator looks different from Ho-Oh's or other scripts and doesn't work (for me at least)?
Apologies because I know this question has been asked before, but none of the posts help me as I don't understand most of it...^^'' if I need to be more clear on what I'm asking/saying then just tell me!!
Standard advice for all Gen 1 and 2 hacks: use the disassembly if at all possible. pokecrystal provides complete assembly source code for Pokémon Crystal, no tools needed except a text editor. And the scripts use named constants instead of obscure numbers—"loadwildmon HO_OH, 70" is more self-explanatory than "loadpokedata 0xFA 0x46".
I've previously described the whole map script for encountering Lugia. Check out pokecrystal and read through some of its map scripts line by line, such as the encounters for Red Gyarados, Sudowoodo, etc.
While I have heard many great things about Pokecrystal, I've already made a big chunk of progress in the hack and I'd rather try and grasp the concept of how PKSV scripts work vs. re-doing everything in a new program I've never used...if that makes sense.
I really do appreciate the suggestion and I did look into it, I just feel it really wouldn't be the thing for me. Call it silly but using multiple programs that have interfaces are easier for me to grasp and feel secure working with, even if it does mean the methods of hacking will be a bit more difficult or take longer.
Update, I've fiddled around some more and replaced the blue lady's code in Cherrygrove city with Lapras' code as a test. And it worked! But not entirely.
Surprised, I edited the pokedata to be 0xFB so you would encounter Celebi and it would have the cry. That worked, too. However both of these tests had an issue: no matter if you ran, caught, or lost to the pokemon in question it would still be there after battle. I don't know why that's happening, especially since I'm directly using Lapras' code. Maybe it has something to do with using an NPC as my base...?
Furthermore more, I used Lugia's code and tweaked it the same I did with Lapras to make it Celebi. Even with the silver wing, the game sent me into Glitch Dimension rather than entering the battle. Why is that?
What that "disappear 0x2" there is to make the person event 02 to disappear, but also "set" its Bit number / Flag. Person event 00 is reserved for player, and 01 is probably unused (?). The way JohtoMap for example shows the person events, 0 stands for 02, 1 for 03, 2 for 04 etc. In other words here disappear 0x2 hides the person event 0 as JohtoMap shows it and in Lugia's chamber, Lugia is the person event having that value so it vanishes.
What Lugia also has is a "non-FFFF" bit number associated with it. What I mean by this is that if you check that person event with JohtoMap, you can see a couple of boxes that stand for flag or bit number (I don't remember exactly what are the names of those boxes though). Both of those values are not FF FF. If they were, Lugia would re-appear when you re-enter that room.
This issue here is related to the fact that the game has to store information in ram about events that occur in the game (if they can't re-occur again). With those Bit Number values, you practically specify, where to store information, whether or not this sprite should be shown or not when the map is entered. FF FF is a special value though. If that is set to a person event, making them disappear won't write anything in ram. If the Bit number was for example 3A 05 instead (not that you should use those values for the Bit number, but this is just an example), the person event wouldn't show up anymore when you make it disappear via script and re-enter the map.
I also did some looking to find some tutorials that could help you out understanding that script format and Bit numbers better. You could first go here (https://hax.iimarckus.org/topic/6675/) and there, you can find some documentation on pointers and scripting (related to the issue you were having understanding the script), and there is also lots of nice information related to Gen II hacking in general. You could also check my "Bytes and Bits" explanation which also has an example about these Bit numbers.
Nevertheless, you would achieve a lot more by editing pokecrystal disassembly than by doing conventional rom hacking using Pokemon Gold or Silver as the base rom. I personally however see it being a good thing trying to learn some concepts by editing rom files at first, but if you ever feel like starting a bigger project, study how to use pokecrystal disassembly first and do it based on that.
Last edited by Miksy91 (2017-09-26 19:56:54)
Thank you! Your explanation was really helpful! I've been messing around with PKSV for a bit and I've figured out how to program standard events w/o items which is a huge accomplishment! So thank you!
I do agree Pokecrystal would be more useful, but in all honesty this is just a simple rom I'm making, and programming events is the most complex thing I'm doing with it. Everything else could be accomplished through tools. Yes, primitive, but it's more simplistic and it's just what I need. (Plus I think it's a good beginner's experience for somebody like myself) so I thought PKSV would be the best course of action.