Go Back   The PokéCommunity Forums > ROM Hacking > ROM Hacking Hub
Reload this Page Script Help Thread (DO NOT REQUEST SCRIPTS)

Notices
For all updates, view the main page.

ROM Hacking Hub General discussions about ROM Hacking and Emulation. Not sure where to start? This is the place for you.
Posting links to ROMs is illegal and is not tolerated anywhere on the forum.
New threads in this forum are to be approved by a moderator before they are displayed.



Closed Thread
 
Thread Tools
  #5076    
Old January 9th, 2011 (11:49 PM).
avolonsaber avolonsaber is offline
 
Join Date: Oct 2010
Posts: 182
I decided to change something up in the hack I'm working on, but don't know how to go about it. I started with a script where you'd talk to a guy and he'd activate the Pokemon menu, the Running Shoes, give the player a Totodile, then "walk out" of the room. What I decided to do was change the script so that you have a choice between Squirtle, Totodile, or Mudkip, but everything else stays the same. So it would essentially be the same script as below, but he'd ask something like "Do you want Squirtle?" and you could either say "Yes" or "No, "So you want Totodile?" "Yes" or "No", "Well I heard you like Mudkip" "Yes" or "No". I've tried time & time again to get this, but I cannot. I don't know how to get it right, and I've tried playing around with other scripts of the same nature, but its not going good. Since I can't ask for a script, can someone give me some hints as to how to go about modifying the one below to get it to do what I want? The ROM is FireRed if it helps.
Spoiler:
#dynamic 0x3213C2

#org @start
lock
faceplayer
message @1 6
setflag 0x828
givepokemon 0x9E 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
message @2 6
applymovement 0x2 @move
waitmovement 0x0
setflag 0x1200
release
end

#org @1
= Hey there, kiddo. Its about time\nyou're awake.\p\v\h01: Dad, what are you doing\nhere?\pI came by for a visit real\nquick, and also to give you\lsomething. I know I'm a little late\pbut here, take this.

#org @2
= I have to get back to work, but\nI'll be working in Sevi, so I\lexpect you to come find me.\p...\n...\l...\p\v\h01: See you around.

#org @move
#raw 0x10
#raw 0x10
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x9
#raw 0x1C
  #5077    
Old January 10th, 2011 (04:44 AM).
DrFuji's Avatar
DrFuji DrFuji is offline
Helfen, Wehren, Heilen
Crystal Tier
 
Join Date: Sep 2009
Location: Downia-upside
Age: 22
Gender: Male
Nature: Jolly
Posts: 1,322
Quote originally posted by avolonsaber:
I decided to change something up in the hack I'm working on, but don't know how to go about it. I started with a script where you'd talk to a guy and he'd activate the Pokemon menu, the Running Shoes, give the player a Totodile, then "walk out" of the room. What I decided to do was change the script so that you have a choice between Squirtle, Totodile, or Mudkip, but everything else stays the same. So it would essentially be the same script as below, but he'd ask something like "Do you want Squirtle?" and you could either say "Yes" or "No, "So you want Totodile?" "Yes" or "No", "Well I heard you like Mudkip" "Yes" or "No". I've tried time & time again to get this, but I cannot. I don't know how to get it right, and I've tried playing around with other scripts of the same nature, but its not going good. Since I can't ask for a script, can someone give me some hints as to how to go about modifying the one below to get it to do what I want? The ROM is FireRed if it helps.
Spoiler:
#dynamic 0x3213C2

#org @start
lock
faceplayer
message @1 0x6
goto @Squirtle

#org @Squirtle
msgbox @SquirtMsg 0x5
compare 0x800D 0x1
if 0x0 goto @Totodile
givepokemon 0x7 0x5 0x0 0x0 0x0 0x0
goto @Continue

#org @Totodile
msgbox @TotoMsg 0x5
compare 0x800D 0x1
if 0x0 goto @Mudkip
givepokemon 0x9E 0x5 0x0 0x0 0x0 0x0
goto @Continue

#org @Mudkip
msgbox @MudMsg 0x5
compare 0x800D 0x1
if 0x0 goto @Squirtle
givepokemon 0x102 0x5 0x0 0x0 0x0 0x0
goto @Continue

#org @Continue
fanfare 0x13E
message @2 0x6
applymovement 0x2 @move
waitmovement 0x0
setflag 0x828
setflag 0x82F
release
end

#org @1
= Hey there, kiddo. Its about time\nyou're awake.\p\v\h01: Dad, what are you doing\nhere?\pI came by for a visit real\nquick, and also to give you\lsomething. I know I'm a little late\pbut here, take this.

#org @2
= I have to get back to work, but\nI'll be working in Sevi, so I\lexpect you to come find me.\p...\n...\l...\p\v\h01: See you around.

#org @move
#raw 0x10
#raw 0x10
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x9
#raw 0x1C
Changes in red.

There you go. All you need to do is make three parts of the script that will repeat endlessly if the player doesn't accept the Pokemon being offered. Obviously the msgboxs in each part will be where you put the text like "doo u liek mudkipz??" and stuff.

As a side note, you don't need to setflag 0x1200 in the script as you are already setting 0x828 and 0x82F to activate the Pokemon Menu and Running Shoes. If you have anyone with an ID of 1200 you can change it 828/ 82F and they will still disappear once the script has ended.

I'd also suggest that you start using an offset from 0x800000 onwards as you might be overwriting some code that appears to be empty space but is actually needed in graphics or something. You could experience effects similar to the pixilating of your main menu like earlier.
__________________
  #5078    
Old January 10th, 2011 (11:40 AM). Edited January 10th, 2011 by avolonsaber.
avolonsaber avolonsaber is offline
 
Join Date: Oct 2010
Posts: 182
Quote originally posted by DrFuji:
I'd also suggest that you start using an offset from 0x800000 onwards as you might be overwriting some code that appears to be empty space but is actually needed in graphics or something. You could experience effects similar to the pixilating of your main menu like earlier.
After I added in the messages it worked like a charm, thank you (: I'm using Free Space Finder to get my offsets, is there still a chance I could get one that appears to be empty if I use it?

Edit: I added "showpokepic" for the Pokemon and made sure to put in their respective numbers/coordinates for the images to appear as well as "hidepokepic", and it works fine. I get the pixelation on the menu account again though. I tried using "0x800001" and a few other offsets, but it still gets pixelated?
  #5079    
Old January 10th, 2011 (12:59 PM).
lazinicki's Avatar
lazinicki lazinicki is offline
Spriter
 
Join Date: May 2009
Nature: Jolly
Posts: 132
can anyone help me with a national dex script for FR! i have been trying diffrent scripts, playing wiht oaks orginal script, looking at past msgs on this board... but all of them are confusing!
__________________
http://www.youtube.com/lazinicki
300+ subs


Im the maker but i still support it!

Poison type mono run user!
  #5080    
Old January 10th, 2011 (01:57 PM).
DrFuji's Avatar
DrFuji DrFuji is offline
Helfen, Wehren, Heilen
Crystal Tier
 
Join Date: Sep 2009
Location: Downia-upside
Age: 22
Gender: Male
Nature: Jolly
Posts: 1,322
Quote originally posted by avolonsaber:
After I added in the messages it worked like a charm, thank you (: I'm using Free Space Finder to get my offsets, is there still a chance I could get one that appears to be empty if I use it?

Edit: I added "showpokepic" for the Pokemon and made sure to put in their respective numbers/coordinates for the images to appear as well as "hidepokepic", and it works fine. I get the pixelation on the menu account again though. I tried using "0x800001" and a few other offsets, but it still gets pixelated?
0x800000-0x8FFFFF is always going to be free space, so you won't have any problems there :)

If you go back a page or two you can see how to resolve the menu issues in one of my earlier posts.

Quote originally posted by lazinicki:
can anyone help me with a national dex script for FR! i have been trying diffrent scripts, playing wiht oaks orginal script, looking at past msgs on this board... but all of them are confusing!
Inserting the National Dex is quiet easy as it only requires you to use the command 'special 0x16F' somewhere in your script, whereas the the ability to view the Dex in the main menu is unlocked in by the command 'setflag 0x828'.

If you are planning to insert the special command into Oak's script (and because you will be extending old script) repoint it so that you don't overwrite anything else.
__________________
  #5081    
Old January 10th, 2011 (03:56 PM).
avolonsaber avolonsaber is offline
 
Join Date: Oct 2010
Posts: 182
Quote originally posted by DrFuji:
0x800000-0x8FFFFF is always going to be free space, so you won't have any problems there

If you go back a page or two you can see how to resolve the menu issues in one of my earlier posts.
Gah, I wish I had known that earlier. I would have just used offsets from there instead of using FSF. I found that post that you were talking about, but I didn't understand it, lol. I used an offset that contained image data, but appeared to be free space, that's all I got out of it :p
  #5082    
Old January 11th, 2011 (08:03 AM).
Metroid Die Metroid Die is offline
 
Join Date: Mar 2009
Posts: 54
Hey can anyone tell me the command that is used when Oak checks your Pokedex in Fire Red?
  #5083    
Old January 11th, 2011 (08:36 AM).
altariaking's Avatar
altariaking altariaking is offline
Needs NO VMs...
 
Join Date: Dec 2009
Location: Scotland, Lesmahagow
Age: 40
Gender: Male
Nature: Naive
Posts: 1,098
Send a message via Windows Live Messenger to altariaking
Quote originally posted by Metroid Die:
Hey can anyone tell me the command that is used when Oak checks your Pokedex in Fire Red?
Idk if I'm understanding you correctly but if you mean a check to see if you have the pokedex, then it's:
Code:
checkflag 0x828
__________________
http://www.pokecommunity.com/member.php?u=253113
  #5084    
Old January 11th, 2011 (08:39 AM).
Spherical Ice's Avatar
Spherical Ice Spherical Ice is offline
Moderator
CS
 
Join Date: Nov 2007
Location: UK
Posts: 3,390
Send a message via Skype™ to Spherical Ice
No, he's asking how to check how Oak checks your progress on your Pokédex. I think it's a special or two, but the best way would be to debug Oak's script and find out.
__________________
  #5085    
Old January 11th, 2011 (08:56 AM).
Metroid Die Metroid Die is offline
 
Join Date: Mar 2009
Posts: 54
Quote originally posted by Spherical Ice:
No, he's asking how to check how Oak checks your progress on your Pokédex. I think it's a special or two, but the best way would be to debug Oak's script and find out.
Thanks for the help.


Another quick question, does anyone know where to find the script that activates when all your Pokemon faint and you HAVENT been to a Pokemon Center yet? It's the one where you "scurry home" and your mom talks to you. Any idea where I could find it to edit it, or create a new script to replace it?

Thanks again.
  #5086    
Old January 11th, 2011 (09:12 AM).
Spherical Ice's Avatar
Spherical Ice Spherical Ice is offline
Moderator
CS
 
Join Date: Nov 2007
Location: UK
Posts: 3,390
Send a message via Skype™ to Spherical Ice
It's a level script, which looks something like this:

"#dynamic 0xOFFSET

#org @start
sethealingplace 0x1
end"

It's a level script for the downstairs of the player's house in FR, as they're forced to go into that map.

If you haven't set the first healing place, for some reason you end up into Blaine's gym and the Pokéballs glitch up. :/
__________________
  #5087    
Old January 11th, 2011 (09:51 AM).
Metroid Die Metroid Die is offline
 
Join Date: Mar 2009
Posts: 54
Quote originally posted by Spherical Ice:
It's a level script, which looks something like this:

"#dynamic 0xOFFSET

#org @start
sethealingplace 0x1
end"

It's a level script for the downstairs of the player's house in FR, as they're forced to go into that map.

If you haven't set the first healing place, for some reason you end up into Blaine's gym and the Pokéballs glitch up. :/

Oh okay, yeah I see it. How would I go about editing what MOM says and all that?

Thanks for all the help btw
  #5088    
Old January 11th, 2011 (10:50 AM).
Spherical Ice's Avatar
Spherical Ice Spherical Ice is offline
Moderator
CS
 
Join Date: Nov 2007
Location: UK
Posts: 3,390
Send a message via Skype™ to Spherical Ice
Well, you could either search for the string in Advance Text, or, the less buggy option, use a table and hex editor and search for the string of text there.
__________________
  #5089    
Old January 11th, 2011 (12:23 PM).
Metroid Die Metroid Die is offline
 
Join Date: Mar 2009
Posts: 54
Quote originally posted by Spherical Ice:
Well, you could either search for the string in Advance Text, or, the less buggy option, use a table and hex editor and search for the string of text there.
I don't mean to sound desperate or anything but... I've never used a hex editor, and how would I go about searching for a string of text in hex workshop let alone edit it?

Sorry about all the questions
  #5090    
Old January 11th, 2011 (01:43 PM).
Atterny's Avatar
Atterny Atterny is offline
Pokemon Scarlet Head Hacker
 
Join Date: Jan 2010
Age: 19
Gender: Male
Nature: Naive
Posts: 5
How to you turn on the pokemenu, the thing that allows you to view your pokemon? I cant ever seem to turn it on in a script, so does anyone know the script for it?
__________________
All you do, no matter how amazing, will never amount to what you can do on any video rated 13+ or M, no matter what.
  #5091    
Old January 11th, 2011 (02:26 PM).
Metroid Die Metroid Die is offline
 
Join Date: Mar 2009
Posts: 54
Quote originally posted by Atterny:
How to you turn on the pokemenu, the thing that allows you to view your pokemon? I cant ever seem to turn it on in a script, so does anyone know the script for it?
add this to your script: setflag 0x828
  #5092    
Old January 11th, 2011 (02:37 PM).
colcolstyles's Avatar
colcolstyles colcolstyles is offline
Yours truly
Crystal Tier
 
Join Date: May 2008
Location: The Bay Area
Gender: Male
Nature: Lonely
Posts: 1,592
Quote originally posted by Metroid Die:
How would I go about editing what MOM says and all that?
I've answered this question at least twice in the Simple Questions Thread. Try searching that thread.
__________________

Brother of Vrai
  #5093    
Old January 11th, 2011 (02:42 PM).
Atterny's Avatar
Atterny Atterny is offline
Pokemon Scarlet Head Hacker
 
Join Date: Jan 2010
Age: 19
Gender: Male
Nature: Naive
Posts: 5
Ok, this has prbably been answered, but i couldnt find it, how do you get anything (like text ) to appear, no matter what my script, text never appears, the menu activates and i get the pokemon with a semi working start menu, but there is never text. Any ideas? (is that the same menu command for ruby too, or just fr?)
__________________
All you do, no matter how amazing, will never amount to what you can do on any video rated 13+ or M, no matter what.
  #5094    
Old January 12th, 2011 (12:08 PM).
Andrew McKenzie's Avatar
Andrew McKenzie Andrew McKenzie is offline
Meh.
 
Join Date: Feb 2007
Location: Ireland
Age: 24
Gender: Male
Nature: Relaxed
Posts: 354
Okay, so it's my first time scripting.
I'm using Score_Under's PSKV_UI tool.

And so far, my scripts work except for one.

Below is a script for an "Earthquake" shake that has a strength of 5 both horizontally and vertically.
And has a camera delay of 3.

Code:
#dyn 0x740004
#org @740A4F
lockall
setvar 0x8004 0x3
setvar 0x8005 5
setvar 0x8006 5
setvar 0x8007 6
special 0x136
waitspecial
releaseall
end
Next thing I did was apply the #org offset to the script offset on the script event in Advance Map, as I did with my other scripts that worked.
As for the other script values in Advance Map, I left them as is, at 0, because I thought
the game would just read the var values and numbers from the script itself without changing these in A.M.

Stepping on the tile with the script causes the game to freeze.

It'd be appreciated if someone can correct what is wrong or tell me how to do so myself for future references.
Even if the error is in the script itself or in that I didn't change the values in Advance Map other than the script offset.
  #5095    
Old January 12th, 2011 (01:08 PM).
Bolens's Avatar
Bolens Bolens is offline
Soul Hacker
Gold Tier
 
Join Date: Jan 2010
Location: PA
Age: 21
Gender: Male
Nature: Mild
Posts: 359
Quote originally posted by Andrew McKenzie:
Okay, so it's my first time scripting.
I'm using Score_Under's PSKV_UI tool.

And so far, my scripts work except for one.

Below is a script for an "Earthquake" shake that has a strength of 5 both horizontally and vertically.
And has a camera delay of 3.

Code:
#dyn 0x740004
#org @740A4F
lockall
setvar 0x8004 0x3
setvar 0x8005 5
setvar 0x8006 5
setvar 0x8007 6
special 0x136
waitspecial
releaseall
end
Next thing I did was apply the #org offset to the script offset on the script event in Advance Map, as I did with my other scripts that worked.
As for the other script values in Advance Map, I left them as is, at 0, because I thought
the game would just read the var values and numbers from the script itself without changing these in A.M.

Stepping on the tile with the script causes the game to freeze.

It'd be appreciated if someone can correct what is wrong or tell me how to do so myself for future references.
Even if the error is in the script itself or in that I didn't change the values in Advance Map other than the script offset.
For the script put 0300 in the Unknown, and 4050 in the Var Number. This is in the script tab of Advance Map. Hope it helps.
  #5096    
Old January 12th, 2011 (01:18 PM).
Andrew McKenzie's Avatar
Andrew McKenzie Andrew McKenzie is offline
Meh.
 
Join Date: Feb 2007
Location: Ireland
Age: 24
Gender: Male
Nature: Relaxed
Posts: 354
Quote originally posted by Bolens:
For the script put 0300 in the Unknown, and 4050 in the Var Number. This is in the script tab of Advance Map. Hope it helps.
That made it work and fixed the freezing problem.
Thanks, Bolens! =D

I'll be sure to use this thread more often (hopefully not D=) if I run into any scripting problems.
I'm just glad that we have such a helpful community here.
Other forums I visit elsewhere, the people are nice, and will comment on your work.
But they never seem to want to help, even if you ask nicely.

Thanks again! =D
  #5097    
Old January 12th, 2011 (01:40 PM). Edited January 12th, 2011 by deoxys121.
deoxys121's Avatar
deoxys121 deoxys121 is offline
White Kyurem Cometh
Gold Tier
 
Join Date: Dec 2010
Location: Flat Rock, MI, United States
Age: 23
Gender: Male
Nature: Calm
Posts: 1,260
Send a message via Yahoo to deoxys121
Hello, hackers. I need help with creating a script in my Ruby hack that will allow an early National Pokedex, preferably when you first receive your Pokedex. I have tried including the command "special fr_national_dex" in a script, but the game freezes when I reach the script in the game. I also cannot find the existing script in the game that gives the National Pokedex, or even the one that gives the first Pokedex. Any help here would be appreciated. An early National Dex is a must, as I have added the ability to acquire all 386 Pokemon.

Additional script help I would appreciate is adding legendary battle scripts. I can never get them to work properly with the PKSV Script Generator.
__________________
  #5098    
Old January 12th, 2011 (02:02 PM). Edited January 12th, 2011 by DrFuji.
DrFuji's Avatar
DrFuji DrFuji is offline
Helfen, Wehren, Heilen
Crystal Tier
 
Join Date: Sep 2009
Location: Downia-upside
Age: 22
Gender: Male
Nature: Jolly
Posts: 1,322
Quote originally posted by deoxys121:
Hello, hackers. I need help with creating a script in my Ruby hack that will allow an early National Pokedex, preferably when you first receive your Pokedex. I have tried including the command "special fr_national_dex" in a script, but the game freezes when I reach the script in the game. I also cannot find the existing script in the game that gives the National Pokedex, or even the one that gives the first Pokedex. Any help here would be appreciated. An early National Dex is a must, as I have added the ability to acquire all 386 Pokemon.
If you are having problems with instantanious freezing, look at the post above yours and make sure that everything is in order.

Quote originally posted by deoxys121:
Additional script help I would appreciate is adding legendary battle scripts. I can never get them to work properly with the PKSV Script Generator.
I'm not very familiar with PKSV, but I opened one of my own scripts with it to see how it works. You need the command 'wildbattle' followed by three values: The number of the Pokemon you want to battle, the level the Pokemon is at and the item it is carrying.

Code:
wildbattle 0x6D 0x7 0x0
This example is done in HEX and will allow you to fight a Koffing (0x6D = 109) at level 7 with no item attached to it.
__________________
  #5099    
Old January 12th, 2011 (03:03 PM).
Andrew McKenzie's Avatar
Andrew McKenzie Andrew McKenzie is offline
Meh.
 
Join Date: Feb 2007
Location: Ireland
Age: 24
Gender: Male
Nature: Relaxed
Posts: 354
Quote originally posted by deoxys121:
Hello, hackers. I need help with creating a script in my Ruby hack that will allow an early National Pokedex, preferably when you first receive your Pokedex. I have tried including the command "special fr_national_dex" in a script, but the game freezes when I reach the script in the game. I also cannot find the existing script in the game that gives the National Pokedex, or even the one that gives the first Pokedex. Any help here would be appreciated. An early National Dex is a must, as I have added the ability to acquire all 386 Pokemon.

Additional script help I would appreciate is adding legendary battle scripts. I can never get them to work properly with the PKSV Script Generator.
Best I can help you with hear is to check the Quick-Starter in the script generator.
It sets the flag for the POKEDEX first and then uses the special fr_national_dex so that the NatDex is enabled.

example:
Code:
setflag FR_POKEDEX
special FR_NATIONAL_DEX
  #5100    
Old January 15th, 2011 (03:41 PM). Edited January 15th, 2011 by FireFox.
FireFox's Avatar
FireFox FireFox is offline
Dialga Fangirl
 
Join Date: Aug 2004
Location: UK
Age: 28
Gender: Female
Nature: Timid
Posts: 58
Send a message via AIM to FireFox Send a message via Windows Live Messenger to FireFox Send a message via Yahoo to FireFox
[Fire Red] Hey folks, got an issue hiding sprites. Basically I'm trying to set a scene up similar to the S.S. Anne part where your Rival appears. Natually the sprite is invisible and when you step over the script tile, poof! He appears. My problem is, with my scene, I cannot hide the sprite, it's always there when I enter the map. I checked around the S.S. Anne Rival script but could not find an initial "hidesprite 0xRIVAL". I've tried making more script tiles and doing "hidesprite" on them but it still won't vanish.

What am I missing?
Thanks in advance.

-FireFox
__________________
Closed Thread
Quick Reply

Sponsored Links
Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are UTC -8. The time now is 12:33 AM.