![]() |
Noob script problem
I recently started some scripting for my Fire Red hack. I'm a complete noob in scripting. I'm using PKSV-UI (I'm writing the scripts from scratch so without the auto-script-choose thingie). Now I have the following script:
Spoiler:
What I want is I talk to some random ass dude, and when I don't have a national dex, giving the national dex (flag FR_NATIONAL_DEX I thought) and showing msgbox, else showing different msgbox. Now what happens is I talk to the guy, game will freeze for few seconds, no message box is shown and AFAIK I don't get the national dex. I don't know what the problem is. |
First, you need to assign the script an unused flag (200-2FF are safe to use assuming we're talking FireRed). Having said that, FR_NATIONAL_DEX is not a flag. It's a special that upgrades the basic pokedex to a national dex. You'll want to include that in the part of the script where the checkflag is false (meaning the player doesn't already have the national dex in this case). Also, I personally thinks it better to put the more complicated part of the script into modules (in this case, the parts that upgrades the dex), so I changed 'alreadyHas' to 'doesnothave'. Trust me, it can save some confusion in the long run. It should look more like so:
Spoiler:
Let me know if you have any questions about that. |
That works, got the national dex, HOWEVER the messagebox when the dex is given doesn't show up. Neither when I already have it.
|
With PKSV, you have to script your messages like so:
msgbox @installedTxt callstd MSG_NORMAL Sorry, I'd forgotten about that. The first part loads it into memory and the second part shows it in memory. Is there any particular reason you're using PKSV by the way? XSE is better in just about every way. |
Quote:
|
Personally I like PKSV better too. I think it's a little more user friendly. XSE might be better when you're dealing with a lot of memory stuff and different offsets but PKSV has some nice features.
|
There is a script help thread, you should post in there instead of creating a whole new topic :3
Either way, I use XSE. Its the standard in rom scripting for pokemon. I suggest you to use XSE. |
Quote:
PKSV is broken when it comes to recompiling scripts with callasm, compiling certain money commands and score_under seemed to take some of Hackmew's incorrect command names. In the end, we're left with two very popular, yet poor scripting programs. Hopefully someone comes along and makes one which is more versatile and multi-platform. I'd love to have a thread about script command research or something. A large chunk of these script commands need name reworking. Also, hopefully in the near future, we can expand the script commands to incorporate a larger command library. Setting up ASM routines in scripts using temporary variables is stupidly bad and takes up more space than it should. Hopefully by the end of this year, we can get something started and move the ROM hacking scene in a better direction. Right now we have newcommers learning incorrect things from incorrect tutorials, and trying out these outdated script editors. Your post clearly illustrates this, as you have no idea about either script editor, yet you're promoting one. We need to fix that. |
| All times are GMT -8. The time now is 2:23 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.