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
  #6726    
Old April 7th, 2012 (08:04 AM).
Glitched Hacker's Avatar
Glitched Hacker Glitched Hacker is offline
Beginning Hacker
 
Join Date: Apr 2012
Gender: Male
Nature: Brave
Posts: 7
Oops! I must have overlooked that.
And thanks for helping me find out where to put my flag.

________________________________________________________________


Is there a way to script what Professor Oak says when you start the game? (when he asks you your gender and name and rival's name)

Also is there a way to script the first three slides? ( the pokemon storyboards, like the "press A and let your adventure begin".

Is there a way to edit both of those?
Thanks in advance!
__________________
If people knew how hard I worked to get my mastery, it wouldn't seem so wonderful at all.

-Michelangelo
  #6727    
Old April 7th, 2012 (08:14 AM).
Magic Maker Yo's Avatar
Magic Maker Yo Magic Maker Yo is offline
キュウコン
 
Join Date: Jan 2009
Location: UK
Age: 23
Gender: Male
Posts: 5,132
Quote originally posted by Glitched Hacker:
Oops! I must have overlooked that.
And thanks for helping me find out where to put my flag.

________________________________________________________________


Is there a way to script what Professor Oak says when you start the game? (when he asks you your gender and name and rival's name)

Also is there a way to script the first three slides? ( the pokemon storyboards, like the "press A and let your adventure begin".

Is there a way to edit both of those?
Thanks in advance!
Either the Advance Text tool(A-Text), hex editing the words, or repointing the data to a new text string. The first is easiest if you can find a link to A-Text, it should be in the toolbox somewhere?

For hex-editing and such there are a few tutorials in the appropriate section.
__________________
Looking for spriters/pixel artists for a ROM hacking project.
ENQUIRE WITHIN
  #6728    
Old April 7th, 2012 (09:10 AM). Edited April 7th, 2012 by ChikoritaMudkipz.
ChikoritaMudkipz's Avatar
ChikoritaMudkipz ChikoritaMudkipz is offline
Beginning Trainer
 
Join Date: Jun 2009
Gender: Male
Posts: 30
Quote originally posted by DrFuji:
You need to use two specials in order to separate the camera from the player - Specials 0x113 and 0x114. You use them like this:

Code:
#dynamic 0x800000

#org @Start
msgbox @Talk 0x2
special 0x113 // Detatches camera from the player
applymovement 0x7F @MoveCamera // 0x7F is the entity that you have apply the movements to for the camera to move
waitmovement 0x0
special 0x114 // Reattaches camera to the player
release
end

#org @Talk
= I'm going to shake your camera!

#org @MoveCamera
#raw 0x13
#raw 0x12
#raw 0x12
#raw 0x13
#raw 0xFE
Here is a thread that can tell you a bit more about moving cameras. Just be sure to move the camera back to the spot where your player is before the script ends otherwise things will look pretty wonky
Hey thanks a bunch! I had a feeling it was something along the lines of an apply movement script applied to the camera!

This shall help me do the event I need for my hack, which I hope you'll all check out when I release a beta soon!

Hey just out of curiosity, if you use the apply movement script without detaching the camera, what happens? does it just move the player too?

Alright, so I'm having a bit of an issue with my camera movement script.
So I have the main character standing somewhere with another character.
I pan the camera up to view a conversation, but when I bring the camera back to my player, the character he was with has disappeared. I do have a hidesprite in the code, but it seems to be activating way to soon.

I thought maybe when the camera was moving, the sprites got reset to there original area, so I added a movesprite in there, and stille the guy is no where to be seen.

The rest of the script goes on fine, except for the fact that he is either invisible, or nowhere to be found.

Here's my code.

Code:
#dynamic 0x2B9292

#org @start
lock
checkflag 0x1013
if 0x1 goto @done
msgbox @1 0x6
applymovement 0xFF @move
waitmovement 0x0
msgbox @2 0x6
applymovement 0x08 @move1
applymovement 0xFF @move2
waitmovement 0x0
msgbox @3 0x6
applymovement 0x08 @move3
applymovement 0xFF @move4
waitmovement 0x0
special 0x113
applymovement 0x7F @MoveCamera
waitmovement 0x0
msgbox @grunt1 0x6
msgbox @grunt2 0x6
msgbox @grunt3 0x6
msgbox @grunt4 0x6
msgbox @grunt5 0x6
msgbox @grunt6 0x6
movesprite 0x8 0x1D 0x25
applymovement 0x7F @MoveCamera2
waitmovement 0x0
special 0x114
hidesprite 0x01
setflag 0x1015
hidesprite 0x02
setflag 0x1014
msgbox @4 0x6
msgbox @5 0x6
applymovement 0x08 @move7
waitmovement 0x0
hidesprite 0x08
setflag 0x1013
release
end

#org @done
release
end

#org @1
= [rival]: [player]!\nOver here!

#org @2
= [rival]: There are some\nshady people up ahead,\land I think I heard one of\lthem mention the ship you\lwere on!\pCome on, let's see if we can\nhear what they're saying.

#org @3
= [rival]: Let's hide behind\nthis arch and see if we can\lsee them.

#org @grunt1
= [red_fr]Grunt 1: A tree? How did this\nget here?\pDo you have a pokemon that\nknows Cut with you?

#org @grunt2
= Grunt 2: Why would I bring\na pokemon with Cut?\pHey, did you hear that our\nboss was able to control a\lTentacruel?

#org @grunt3
= [red_fr]Grunt 1: I heard he got it to\nsink some kind of passenger\lship. 

#org @grunt4
= Grunt 2: Sounds like he may\nbe able to carry out our plan\lafter all.

#org @grunt5
= [red_fr]Grunt 1: Don't get too ahead\nof yourself.\pThe technology may not be\nstrong enough to control\llegendaries.
 
#org @grunt6
= Grunt 2: Well it's a step\nin the right direction.\pCome on, let's get to the\npower plant.

#org @4
= [rival]: Wow, I think that may\nhave been that Team Rocket\lthat my Grandfather used to\ltell me stories about.\pDecades ago they tried to\nsteal and control powerful\lpokemon.\pA young boy made their leader\ndisappear.\pThree years later, they tried\lagain.\pA different boy stopped them\nthat time.\pI wonder what prompted the\ngang to reassemble...  

#org @5
= [rival]: Anyway, we don't\nneed to worry about it.\pThe first gym is just up\nahead, and I can't wait to get\lmy first badge!

#org @move
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0xFE

#org @move1
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x3
#raw 0xFE

#org @move2
#raw 0x13
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x13
#raw 0x11
#raw 0x2
#raw 0xFE

#org @move3
#raw 0x12
#raw 0x3
#raw 0xFE

#org @move4
#raw 0x13
#raw 0x2
#raw 0xFE

#org @MoveCamera
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x11
#raw 0x13
#raw 0x13
#raw 0xFE

#org @MoveCamera2
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x12
#raw 0x12
#raw 0xFE

#org @move7
#raw 0x13
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0x10
#raw 0xFE
__________________
youtube channel: http://www.youtube.com/user/ChikoritaMudkipz
check out my shiny gold x run!
  #6729    
Old April 9th, 2012 (08:38 AM).
Magic Maker Yo's Avatar
Magic Maker Yo Magic Maker Yo is offline
キュウコン
 
Join Date: Jan 2009
Location: UK
Age: 23
Gender: Male
Posts: 5,132
Quote originally posted by ChikoritaMudkipz:
Alright, so I'm having a bit of an issue with my camera movement script.
So I have the main character standing somewhere with another character.
I pan the camera up to view a conversation, but when I bring the camera back to my player, the character he was with has disappeared. I do have a hidesprite in the code, but it seems to be activating way to soon.

I thought maybe when the camera was moving, the sprites got reset to there original area, so I added a movesprite in there, and stille the guy is no where to be seen.

The rest of the script goes on fine, except for the fact that he is either invisible, or nowhere to be found

I think your problem is the distance, movesprite only works when the sprites are close to the screen (not say 10 tiles off screen).

Try breaking down your movecam (on the way back) so it's:

...
applymovement 0x7F @MoveCamstep1
waitmovement 0x0
movesprite 0xWhatever 0x 0x
applymovement 0x7F @MoveCamstep2
...


Make step1 take you to just above the sprite that needs moving (2 tiles above or so) and step2 to take the rest of the way.
__________________
Looking for spriters/pixel artists for a ROM hacking project.
ENQUIRE WITHIN
  #6730    
Old April 10th, 2012 (11:32 AM).
ChikoritaMudkipz's Avatar
ChikoritaMudkipz ChikoritaMudkipz is offline
Beginning Trainer
 
Join Date: Jun 2009
Gender: Male
Posts: 30
Quote originally posted by SwiftSign:
I think your problem is the distance, movesprite only works when the sprites are close to the screen (not say 10 tiles off screen).

Try breaking down your movecam (on the way back) so it's:

...
applymovement 0x7F @MoveCamstep1
waitmovement 0x0
movesprite 0xWhatever 0x 0x
applymovement 0x7F @MoveCamstep2
...


Make step1 take you to just above the sprite that needs moving (2 tiles above or so) and step2 to take the rest of the way.
I think I may have mislead as to what my problem is.

My problem isn't the move sprite, the move sprite isn't even nesseary, I just thought it may fix my problem.

My problem is, when I move the camera away from my character, and then back to my character, a sprite that was next to him has vanished as if a hidesprite has been applied.
__________________
youtube channel: http://www.youtube.com/user/ChikoritaMudkipz
check out my shiny gold x run!
  #6731    
Old April 10th, 2012 (12:18 PM).
Magic Maker Yo's Avatar
Magic Maker Yo Magic Maker Yo is offline
キュウコン
 
Join Date: Jan 2009
Location: UK
Age: 23
Gender: Male
Posts: 5,132
Quote originally posted by ChikoritaMudkipz:
I think I may have mislead as to what my problem is.

My problem isn't the move sprite, the move sprite isn't even nesseary, I just thought it may fix my problem.

My problem is, when I move the camera away from my character, and then back to my character, a sprite that was next to him has vanished as if a hidesprite has been applied.

I'm not really sure what to suggest, sorry I interpreted as the player seemed hidden but was actually in it's original position off of screen ><.

Do decompile the script and check a hidesprite hasn't shifted position, if not try changing the hidesprite to another personID and see if the sprite then shows up. It's hard to visualise your problem haha.
__________________
Looking for spriters/pixel artists for a ROM hacking project.
ENQUIRE WITHIN
  #6732    
Old April 11th, 2012 (07:25 PM). Edited April 11th, 2012 by XFeralTSDX.
XFeralTSDX XFeralTSDX is offline
Beginning Trainer
 
Join Date: Apr 2012
Location: California.
Gender: Male
Posts: 24
I am terrible at scripting. I'm using PKSVUI and I need help. So I'm creating a gym leader fight where before the fight, the gym leader gives an item, and then the person talks and you battle.
But for some reason I can only get the give item part of the script to work, nothing else. D: And yes all the flags you see are unused, trust me.
Spoiler:
#dyn 0x740000
#org @start
checkflag 0x01FE
if 0x1 jump :end
copyvarifnotzero 0x8000 HM03
copyvarifnotzero 0x8001 1
callstd MSG_OBTAIN
setflag 0x01FE
:end
end
#org 0x816D54E
'-----------------------------------
setvar 0x8004 0x6
setvar 0x8005 0x2
special FAME_CHECKER_NEW
trainerbattle 0x1 0x1A2 0x0 0x819832E 0x8198444 0x816D580
checkflag 0x259
if false jump 0x816D5A6 ' Flag is unset
msgbox 0x8198481 ' When afflicted by TO...
callstd MSG_NOCLOSE ' Non-closing message
release
' Release commands close any open messages
end

#org 0x816D580
'-----------------------------------
setvar 0x8004 0x6
setvar 0x8005 0x1
special FAME_CHECKER
clearflag 0x9F
setflag 0x4B4
setflag FR_BADGE_5
setvar 0x8008 0x5
call 0x81A6B18
jump 0x816D5A6

#org 0x81A6B18
'-----------------------------------
copyvar 0x8000 0x8008
compare 0x8000 0x1
if == jump 0x81A6B76 ' Equal To
compare 0x8000 0x2
if == jump 0x81A6B7A ' Equal To
compare 0x8000 0x3
if == jump 0x81A6B81 ' Equal To
compare 0x8000 0x4
if == jump 0x81A6B8B ' Equal To
compare 0x8000 0x5
if == jump 0x81A6BA1 ' Equal To
compare 0x8000 0x6
if == jump 0x81A6BB4 ' Equal To
compare 0x8000 0x7
if == jump 0x81A6BCA ' Equal To
compare 0x8000 0x8
if == jump 0x81A6BE0 ' Equal To
end

#org 0x81A6B76
'-----------------------------------
cleartrainerflag 0x8E
return

#org 0x816D5A6
'-----------------------------------
msgbox 0x819850E ' Now that you have th...
callstd MSG_NOCLOSE ' Non-closing message
checkitemspaceinbag TM06 1
compare LASTRESULT 0x0
if == jump 0x816D5E7 ' Equal To
additem TM06 1
msgbox 0x819858F ' \v\h01 received TM06...
copyvarifnotzero 0x8000 TM06
copyvarifnotzero 0x8001 0x1
copyvarifnotzero 0x8002 0x101
callstd MSG_ITEM ' Shows a message, then... 'Player put the yyy in the zzz!'
setflag 0x259
msgbox 0x81985AB ' Sealed within that T...
callstd MSG_NOCLOSE ' Non-closing message
release
' Release commands close any open messages
end

#org 0x816D5E7
'-----------------------------------
msgbox 0x819860D ' Make space for this,...
callstd MSG_NOCLOSE ' Non-closing message
release
' Release commands close any open messages
end

#org 0x81A6B7A
'-----------------------------------
cleartrainerflag 0x96
cleartrainerflag 0xEA
return

#org 0x81A6B81
'-----------------------------------
cleartrainerflag 0x8D
cleartrainerflag 0xDC
cleartrainerflag 0x1A7
return

#org 0x81A6B8B
'-----------------------------------
cleartrainerflag 0x84
cleartrainerflag 0x85
cleartrainerflag 0xA0
cleartrainerflag 0x109
cleartrainerflag 0x10A
cleartrainerflag 0x10B
cleartrainerflag 0x192
return

#org 0x81A6BA1
'-----------------------------------
cleartrainerflag 0x126
cleartrainerflag 0x127
cleartrainerflag 0x120
cleartrainerflag 0x121
cleartrainerflag 0x124
cleartrainerflag 0x125
return

#org 0x81A6BB4
'-----------------------------------
cleartrainerflag 0x118
cleartrainerflag 0x119
cleartrainerflag 0x11A
cleartrainerflag 0x11B
cleartrainerflag 0x1CE
cleartrainerflag 0x1CF
cleartrainerflag 0x1D0
return

#org 0x81A6BCA
'-----------------------------------
cleartrainerflag 0xB1
cleartrainerflag 0xB2
cleartrainerflag 0xB3
cleartrainerflag 0xB4
cleartrainerflag 0xD5
cleartrainerflag 0xD6
cleartrainerflag 0xD7
return

#org 0x81A6BE0
'-----------------------------------
cleartrainerflag 0x128
cleartrainerflag 0x129
cleartrainerflag 0x142
cleartrainerflag 0x143
cleartrainerflag 0x144
cleartrainerflag 0x188
cleartrainerflag 0x190
cleartrainerflag 0x191
return


#org 0x819832E
= Mel: That HM03 is Surf.\pIt'll really help you!\nI'm Mel.\pI'm the Gym Leader here, and since\n you've used the kid's Fluffytail,\pyou clearly want to challenge me!\c\h0B\h56\h01

#org 0x8198444
= You've proven your worth!\pHere!\nTake the SOULBADGE!

#org 0x8198481
= When afflicted by TOXIC, a POK\eMON\nsuffers more and more.\pIt suffers worsening damage as the\nbattle wears on!\pIt will surely terrorize foes!

#org 0x819850E
= Now that you have the SOULBADGE,\nthe DEFENSE of your POK\eMON rises.\pIt also lets you SURF outside of\nbattle.\pAh!\nTake this, too!

#org 0x819858F
= \v\h01 received TM06\nfrom Mel.

#org 0x81985AB
= In that TM is\nToxic!\pIt helps if you're defensive, or\nif you simply can't beat that enemy!

#org 0x819860D
= Worthy opponent, take this!


EDIT:
I fixed it! I had to use the "Jump" command. xD
__________________
http://www.Youtube.com/user/XFeralTSDX
  #6733    
Old April 12th, 2012 (08:20 AM).
pikachuFan50's Avatar
pikachuFan50 pikachuFan50 is offline
Beginning Trainer
 
Join Date: May 2010
Gender: Male
Posts: 32
so the title says it.is there a way i could extract scripts from fr and lf.then edit them
  #6734    
Old April 13th, 2012 (11:40 PM).
Satoshi Ookami's Avatar
Satoshi Ookami Satoshi Ookami is offline
Memento Mori
Community Supporter
 
Join Date: Jul 2008
Location: Abyss of Time, Great Seal
Age: 22
Gender: Male
Nature: Calm
Posts: 12,693
Quote originally posted by pikachuFan50:
so the title says it.is there a way i could extract scripts from fr and lf.then edit them
Use A-Map and click on some OW sprites and if you set XSE as your editor then XSE prompts with the script.
__________________
ROM hacking FAQ - Read before asking how to play a hack. | Previous Sign 2 | Previous Sign

Anime List | PSN Trophy List
  #6735    
Old April 14th, 2012 (04:28 AM).
pikachuFan50's Avatar
pikachuFan50 pikachuFan50 is offline
Beginning Trainer
 
Join Date: May 2010
Gender: Male
Posts: 32
Quote originally posted by Ash493:

Use A-Map and click on some OW sprites and if you set XSE as your editor then XSE prompts with the script.
i get an error.aftewr i click open script =(
  #6736    
Old April 14th, 2012 (11:28 PM).
Satoshi Ookami's Avatar
Satoshi Ookami Satoshi Ookami is offline
Memento Mori
Community Supporter
 
Join Date: Jul 2008
Location: Abyss of Time, Great Seal
Age: 22
Gender: Male
Nature: Calm
Posts: 12,693
Quote originally posted by pikachuFan50:
i get an error.aftewr i click open script =(
That's why I said "if you set XSE as your script editor" which means you should have done it :D
__________________
ROM hacking FAQ - Read before asking how to play a hack. | Previous Sign 2 | Previous Sign

Anime List | PSN Trophy List
  #6737    
Old April 15th, 2012 (09:52 AM).
pikachuFan50's Avatar
pikachuFan50 pikachuFan50 is offline
Beginning Trainer
 
Join Date: May 2010
Gender: Male
Posts: 32
Quote originally posted by Ash493:

That's why I said "if you set XSE as your script editor" which means you should have done it :D
well i did.but it won't work
  #6738    
Old April 15th, 2012 (10:05 AM).
bensgraphicdesign bensgraphicdesign is offline
Beginning Trainer
 
Join Date: Apr 2012
Gender: Male
Posts: 48
Hello guys, how would could I make an event with PKSV so that I give someone an item and I get a Pokémon? N00b here!
__________________
  #6739    
Old April 15th, 2012 (10:11 AM).
Magic Maker Yo's Avatar
Magic Maker Yo Magic Maker Yo is offline
キュウコン
 
Join Date: Jan 2009
Location: UK
Age: 23
Gender: Male
Posts: 5,132
Quote originally posted by bensgraphicdesign:
Hello guys, how would could I make an event with PKSV so that I give someone an item and I get a Pokémon? N00b here!
I'm afraid asking for entire scripts (which this basically is) isn't allowed in this thread, have a read of this tutorial, as it takes you through different scripts.
__________________
Looking for spriters/pixel artists for a ROM hacking project.
ENQUIRE WITHIN
  #6740    
Old April 15th, 2012 (10:38 AM).
bensgraphicdesign bensgraphicdesign is offline
Beginning Trainer
 
Join Date: Apr 2012
Gender: Male
Posts: 48
Sorry dude, I suck at scripting... It confuses me! I don't know how to layer scipts, if you know what I mean. What does \v\ho2 mean!? What I did is I found a guy who wanted to trade to try and help me to create a script and it tells me this:

Spoiler:
#org 0x816B5D7
'-----------------------------------
lock
faceplayer
setvar 0x8008 0x3
call 0x81A8CAD
checkflag 0x24D
if true jump 0x816B649 ' Flag is set
msgbox 0x81949CB ' Hi!\nDo you have a \...
callstd MSG_YESNO ' Yes/No message
compare LASTRESULT NO
if == jump 0x816B631 ' Equal To
call 0x81A8CBD
compare 0x8004 0x6
if >= jump 0x816B631 ' Larger Than or Equal To
call 0x81A8CC9
comparevars2 LASTRESULT 0x8009
if != jump 0x816B63B ' Not Equal To
call 0x81A8CD9
msgbox 0x8194A44 ' Thank you!
callstd MSG_NOCLOSE ' Non-closing message
setflag 0x24D
release
end

#org 0x81A8CAD
'-----------------------------------
copyvar 0x8004 0x8008
special2 LASTRESULT 0xFC
copyvar 0x8009 LASTRESULT
return

#org 0x816B649
'-----------------------------------
msgbox 0x8194A4F ' How is my old \v\h03...
callstd MSG_NOCLOSE ' Non-closing message
release
' Release commands close any open messages
end

#org 0x816B631
'-----------------------------------
msgbox 0x81949FD ' That's too bad.
callstd MSG_NOCLOSE ' Non-closing message
release
' Release commands close any open messages
end

#org 0x81A8CBD
'-----------------------------------
special 0x9F
waitspecial
lock
faceplayer
copyvar 0x800A 0x8004
return

#org 0x81A8CC9
'-----------------------------------
copyvar 0x8005 0x800A
special2 LASTRESULT 0xFF
copyvar 0x800B LASTRESULT
return

#org 0x816B63B
'-----------------------------------
storepokemon 0x0 0x8009
msgbox 0x8194A0D ' [.]This is no \v\h02...
callstd MSG_NOCLOSE ' Non-closing message
release
' Release commands close any open messages
end

#org 0x81A8CD9
'-----------------------------------
copyvar 0x8004 0x8008
copyvar 0x8005 0x800A
special 0xFD
special 0xFE
waitspecial
lock
faceplayer
return


#org 0x81949CB
= Hi!\nDo you have a \v\h02?\pWant to trade it for my\n\v\h03?

#org 0x8194A44
= Thank you!

#org 0x8194A4F
= How is my old \v\h03?\pMy \v\h02 is doing great!

#org 0x81949FD
= That's too bad.

#org 0x8194A0D
= [.]This is no \v\h02.\pIf you get one, please trade it\nto me!

What is this?!
__________________
  #6741    
Old April 15th, 2012 (10:52 AM).
Magic Maker Yo's Avatar
Magic Maker Yo Magic Maker Yo is offline
キュウコン
 
Join Date: Jan 2009
Location: UK
Age: 23
Gender: Male
Posts: 5,132
Quote originally posted by bensgraphicdesign:
Sorry dude, I suck at scripting... It confuses me! I don't know how to layer scipts, if you know what I mean. What does \v\ho2 mean!? What I did is I found a guy who wanted to trade to try and help me to create a script and it tells me this:

Spoiler:
#org 0x816B5D7
'-----------------------------------
lock
faceplayer
setvar 0x8008 0x3
call 0x81A8CAD
checkflag 0x24D
if true jump 0x816B649 ' Flag is set
msgbox 0x81949CB ' Hi!\nDo you have a \...
callstd MSG_YESNO ' Yes/No message
compare LASTRESULT NO
if == jump 0x816B631 ' Equal To
call 0x81A8CBD
compare 0x8004 0x6
if >= jump 0x816B631 ' Larger Than or Equal To
call 0x81A8CC9
comparevars2 LASTRESULT 0x8009
if != jump 0x816B63B ' Not Equal To
call 0x81A8CD9
msgbox 0x8194A44 ' Thank you!
callstd MSG_NOCLOSE ' Non-closing message
setflag 0x24D
release
end

#org 0x81A8CAD
'-----------------------------------
copyvar 0x8004 0x8008
special2 LASTRESULT 0xFC
copyvar 0x8009 LASTRESULT
return

#org 0x816B649
'-----------------------------------
msgbox 0x8194A4F ' How is my old \v\h03...
callstd MSG_NOCLOSE ' Non-closing message
release
' Release commands close any open messages
end

#org 0x816B631
'-----------------------------------
msgbox 0x81949FD ' That's too bad.
callstd MSG_NOCLOSE ' Non-closing message
release
' Release commands close any open messages
end

#org 0x81A8CBD
'-----------------------------------
special 0x9F
waitspecial
lock
faceplayer
copyvar 0x800A 0x8004
return

#org 0x81A8CC9
'-----------------------------------
copyvar 0x8005 0x800A
special2 LASTRESULT 0xFF
copyvar 0x800B LASTRESULT
return

#org 0x816B63B
'-----------------------------------
storepokemon 0x0 0x8009
msgbox 0x8194A0D ' [.]This is no \v\h02...
callstd MSG_NOCLOSE ' Non-closing message
release
' Release commands close any open messages
end

#org 0x81A8CD9
'-----------------------------------
copyvar 0x8004 0x8008
copyvar 0x8005 0x800A
special 0xFD
special 0xFE
waitspecial
lock
faceplayer
return


#org 0x81949CB
= Hi!\nDo you have a \v\h02?\pWant to trade it for my\n\v\h03?

#org 0x8194A44
= Thank you!

#org 0x8194A4F
= How is my old \v\h03?\pMy \v\h02 is doing great!

#org 0x81949FD
= That's too bad.

#org 0x8194A0D
= [.]This is no \v\h02.\pIf you get one, please trade it\nto me!

What is this?!
Seriously, looking at a tutorial is the way to go.

Since you asked, \v\ho2 and \v\hh03 are buffers, they load a predefined word/name/number into a text.

Looking at a trade script isn't going to help you with what you want however, in the tutorial thread look up the following commands:

checkitem - Used to see if you have the item needed to 'trade'.
removeitem - Takes it off you, to simulate the trade.
givepokemon - Huzzah! You gave an item and got a Pokémon in exchange.

Each of these commands have certain criteria, numbers to include to specify what is it/how many, and is all explained clearly in the tutorial.

__________________
Looking for spriters/pixel artists for a ROM hacking project.
ENQUIRE WITHIN
  #6742    
Old April 15th, 2012 (07:51 PM). Edited April 15th, 2012 by RicePigeonKKM.
RicePigeonKKM's Avatar
RicePigeonKKM RicePigeonKKM is offline
Beginning Trainer
 
Join Date: Feb 2006
Nature: Rash
Posts: 30
Send a message via AIM to RicePigeonKKM
Got a problem with my new script. I'm using the music switching method found here for the following:

Code:
#dyn 0x740000
#org @begin
lock
faceplayer
msgbox @steven
callstd msg_normal
setvar 0x6008 0x129
setvar 0x600A 0x12B
trainerbattle 0x3 0x9 0x0 @defeat
msgbox @afterwards
callstd msg_normal
release
end

#org @steven
= Oh? Did you come to look\nfor fossils as well?\p[.]\pYour name is \v\h01?\nMine is STEVEN.\pI came from the HOENN region\nto look for rare fossils here\lat MT. MOON.\pI can tell by your eyes that\nyou are no ordinary trainer.\pCoincidentally, I was the also\nCHAMPION of the HOENN region for\la short time, so I know that\llook.\pYou've been through a tough journey,\nwhich has now brought you here.\pIt is no coincidence we have met.\nLet us battle to determine your\lworth.

#org @defeat
= Kudos to you, \v\h01.\pI can see that I was not\nmistaken.

#org @afterwards
= Well, that was exciting.\pIt seems as if all the fossils\nhere have already been dug\lup.\pCome again, I'll be happy to\nshare some of my own with you.
For the most part this works fine. It replaces the normal trainer music with the champion music, but if I lose and fight another trainer, the music does not change back. I tried setting both variables to FFFF after the battle but the same thing persists when I lose. Is there a way to solve this other than setting the variables for EVERY trainer in the game?
  #6743    
Old April 15th, 2012 (10:31 PM).
Spherical Ice's Avatar
Spherical Ice Spherical Ice is offline
 
Join Date: Nov 2007
Location: UK
Posts: 3,303
Send a message via Skype™ to Spherical Ice
Code:
#dyn 0x740000
#org @begin
lock
faceplayer
msgbox @steven
callstd msg_normal
setvar 0x6008 0x129
setvar 0x600A 0x12B
trainerbattle 0x3 0x9 0x0 @defeat
setvar 0x6008 0x
setvar 0x600A 0x
msgbox @afterwards
callstd msg_normal
release
end

#org @steven
= Oh? Did you come to look\nfor fossils as well?\p[.]\pYour name is \v\h01?\nMine is STEVEN.\pI came from the HOENN region\nto look for rare fossils here\lat MT. MOON.\pI can tell by your eyes that\nyou are no ordinary trainer.\pCoincidentally, I was the also\nCHAMPION of the HOENN region for\la short time, so I know that\llook.\pYou've been through a tough journey,\nwhich has now brought you here.\pIt is no coincidence we have met.\nLet us battle to determine your\lworth.

#org @defeat
= Kudos to you, \v\h01.\pI can see that I was not\nmistaken.

#org @afterwards
= Well, that was exciting.\pIt seems as if all the fossils\nhere have already been dug\lup.\pCome again, I'll be happy to\nshare some of my own with you.
I've added in the bolded text. You then just add the hex numbers for the ordinary battle theme (I'm not sure which, AdvanceMap has a list in the Header Tab). That should work, but I haven't tested it so I'm not 100% sure.
__________________
  #6744    
Old April 15th, 2012 (11:10 PM).
Satoshi Ookami's Avatar
Satoshi Ookami Satoshi Ookami is offline
Memento Mori
Community Supporter
 
Join Date: Jul 2008
Location: Abyss of Time, Great Seal
Age: 22
Gender: Male
Nature: Calm
Posts: 12,693
Quote originally posted by pikachuFan50:
well i did.but it won't work
Then what kind of error do you get?
__________________
ROM hacking FAQ - Read before asking how to play a hack. | Previous Sign 2 | Previous Sign

Anime List | PSN Trophy List
  #6745    
Old April 16th, 2012 (01:29 AM).
pikachuFan50's Avatar
pikachuFan50 pikachuFan50 is offline
Beginning Trainer
 
Join Date: May 2010
Gender: Male
Posts: 32
Quote originally posted by Ash493:

Then what kind of error do you get?
failed to execute C/the directory blah blahXSE/XSE.exe pokemon fire red and then some numbers
  #6746    
Old April 16th, 2012 (02:22 PM).
OMGWURMPLES!'s Avatar
OMGWURMPLES! OMGWURMPLES! is offline
För Sverige i tiden
 
Join Date: Mar 2010
Gender: Female
Nature: Adamant
Posts: 49
Hi, I'm working on a FireRed hack. At the moment, I am trying to make a script in which you choose your starter and your rival goes and chooses the other opposite...
I've gotten to the point where the rival moves from (soon to be her) spot, says, "I'll take this one!" and "takes" the PokeBall. Unfortunately, the setflag command does not seem to be working. The Pokeball's ID-thing is set as 920, but when I "setflag 0x920" it doesn't work. At all.
Here's my code (I plan on duplicating it with small changes to make it fit the other Pokeballs):
Code:
#dynamic 0x800260
#org @getstartersquirt
checkflag 0x910
if 0x1 goto @check
setflag 0x910
release
end

#org @take
givepokemon 0x7 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox @3 0x4
waitfanfare
closeonkeypress
msgbox @4 0x5
hidepokepic
compare 0x800D 0x1
if 0x1 gosub @name
msgbox @5 0x2
setflag 0x828
setflag 0x910
applymovement 8 @moverival
msgbox @6 0x06
checkflag 0x910
if 0x0 goto @pokedisappear
release
end

#org @name
countpokemon
subvar 0x800D 0x1
copyvar 0x8004 0x800D
fadescreen 0x1a
special 0x166
waitstate
return

#org @check
showpokepic 0x7 0x0A 0x03
msgbox @7 0x5
compare 0x800D 0x1
if 0x1 goto @take
hidepokepic
return

#org @7
= Do ya want this SQUIRTLE? \nIt's fun to raise!

#org @3
= You've received a SQUIRTLE!

#org @4
= Would you like to nickname this \nSQUIRTLE?

#org @5
= Take good care of it!

#org @6
= I'll have this one, then!

#org @moverival
#raw 0x03 0x13 0x013 0x01 0x11 0x03 0x013 0x13 0x13 0x0

#org @pokedisappear
setflag 0x920
release
end
Is there something I can do? Or an easier way to make this script? That would be great! Thank you.
__________________



Berwald Oxenstierna.
'Lion of the North'
Konungariket Sverige
Sweden
Team Sealand! Now recruiting

  #6747    
Old April 16th, 2012 (02:31 PM).
Magic Maker Yo's Avatar
Magic Maker Yo Magic Maker Yo is offline
キュウコン
 
Join Date: Jan 2009
Location: UK
Age: 23
Gender: Male
Posts: 5,132
Quote originally posted by OMGWURMPLES!:
Hi, I'm working on a FireRed hack. At the moment, I am trying to make a script in which you choose your starter and your rival goes and chooses the other opposite...
I've gotten to the point where the rival moves from (soon to be her) spot, says, "I'll take this one!" and "takes" the PokeBall. Unfortunately, the setflag command does not seem to be working. The Pokeball's ID-thing is set as 920, but when I "setflag 0x920" it doesn't work. At all.
Here's my code (I plan on duplicating it with small changes to make it fit the other Pokeballs):
Code:
#dynamic 0x800260
#org @getstartersquirt
checkflag 0x910
if 0x1 goto @check
setflag 0x910
release
end

#org @take
givepokemon 0x7 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox @3 0x4
waitfanfare
closeonkeypress
msgbox @4 0x5
hidepokepic
compare 0x800D 0x1
if 0x1 gosub @name
msgbox @5 0x2
setflag 0x828
setflag 0x910
applymovement 8 @moverival
msgbox @6 0x06
checkflag 0x910
if 0x0 goto @pokedisappear
release
end

#org @name
countpokemon
subvar 0x800D 0x1
copyvar 0x8004 0x800D
fadescreen 0x1a
special 0x166
waitstate
return

#org @check
showpokepic 0x7 0x0A 0x03
msgbox @7 0x5
compare 0x800D 0x1
if 0x1 goto @take
hidepokepic
return

#org @7
= Do ya want this SQUIRTLE? \nIt's fun to raise!

#org @3
= You've received a SQUIRTLE!

#org @4
= Would you like to nickname this \nSQUIRTLE?

#org @5
= Take good care of it!

#org @6
= I'll have this one, then!

#org @moverival
#raw 0x03 0x13 0x013 0x01 0x11 0x03 0x013 0x13 0x13 0x0

#org @pokedisappear
setflag 0x920
release
end
Is there something I can do? Or an easier way to make this script? That would be great! Thank you.
You need to actually hide the sprite, 'hidesprite 0x__' as well as set the flag to make it instant and permanent.
__________________
Looking for spriters/pixel artists for a ROM hacking project.
ENQUIRE WITHIN
  #6748    
Old April 16th, 2012 (04:45 PM).
myrrhman's Avatar
myrrhman myrrhman is offline
Challenge God
Community Supporter
 
Join Date: Feb 2010
Location: Knoxville, TN
Age: 24
Gender: Male
Nature: Sassy
Posts: 1,782
Send a message via AIM to myrrhman
Quick question:

A year or so ago, a friend and I started making a hack. We ran into the problem of accidentally saving new scripts over old scripts.

Now I know there is a free space finder thing that helps you find unused space, but my friend (who was doing the scripting) said that using a free space finder took a really long time.

Now, we're starting to make a hack again, but this time, instead of editing stuff like we were doing the first time around, we're starting from scratch. Could we just start at 0 (or wherever the beginning of script in the game is) and just save over everything? Or would we risk the chance of it saving over moves and accessing your PC and stuff like that?
  #6749    
Old April 16th, 2012 (05:03 PM).
Magic Maker Yo's Avatar
Magic Maker Yo Magic Maker Yo is offline
キュウコン
 
Join Date: Jan 2009
Location: UK
Age: 23
Gender: Male
Posts: 5,132
Quote originally posted by myrrhman:
Quick question:

A year or so ago, a friend and I started making a hack. We ran into the problem of accidentally saving new scripts over old scripts.

Now I know there is a free space finder thing that helps you find unused space, but my friend (who was doing the scripting) said that using a free space finder took a really long time.

Now, we're starting to make a hack again, but this time, instead of editing stuff like we were doing the first time around, we're starting from scratch. Could we just start at 0 (or wherever the beginning of script in the game is) and just save over everything? Or would we risk the chance of it saving over moves and accessing your PC and stuff like that?
You would single handedly corrupt that ROM with (probably) one script :3

What you should do is:
  1. Download XSE
  2. At the top of each script right 'Dynamic 0x740000'
  3. Then make all your pointers @descriptive
  4. Let XSE find the free space for you.
__________________
Looking for spriters/pixel artists for a ROM hacking project.
ENQUIRE WITHIN
  #6750    
Old April 16th, 2012 (05:25 PM).
RicePigeonKKM's Avatar
RicePigeonKKM RicePigeonKKM is offline
Beginning Trainer
 
Join Date: Feb 2006
Nature: Rash
Posts: 30
Send a message via AIM to RicePigeonKKM
Quote originally posted by Spherical Ice:
Code:
#dyn 0x740000
#org @begin
lock
faceplayer
msgbox @steven
callstd msg_normal
setvar 0x6008 0x129
setvar 0x600A 0x12B
trainerbattle 0x3 0x9 0x0 @defeat
setvar 0x6008 0x
setvar 0x600A 0x
msgbox @afterwards
callstd msg_normal
release
end

#org @steven
= Oh? Did you come to look\nfor fossils as well?\p[.]\pYour name is \v\h01?\nMine is STEVEN.\pI came from the HOENN region\nto look for rare fossils here\lat MT. MOON.\pI can tell by your eyes that\nyou are no ordinary trainer.\pCoincidentally, I was the also\nCHAMPION of the HOENN region for\la short time, so I know that\llook.\pYou've been through a tough journey,\nwhich has now brought you here.\pIt is no coincidence we have met.\nLet us battle to determine your\lworth.

#org @defeat
= Kudos to you, \v\h01.\pI can see that I was not\nmistaken.

#org @afterwards
= Well, that was exciting.\pIt seems as if all the fossils\nhere have already been dug\lup.\pCome again, I'll be happy to\nshare some of my own with you.
I've added in the bolded text. You then just add the hex numbers for the ordinary battle theme (I'm not sure which, AdvanceMap has a list in the Header Tab). That should work, but I haven't tested it so I'm not 100% sure.
Thats what I tried to do but losing the battle would keep the changed music.
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 09:19 PM.