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
  #3751    
Old May 2nd, 2010 (04:30 PM).
dr4g0n12's Avatar
dr4g0n12 dr4g0n12 is offline
Δράκος
 
Join Date: May 2009
Location: The past
Age: 19
Gender: Male
Nature: Adamant
Posts: 172
I do not understand why this doesnt work. When I talk to the sprite, it does the message, makes the player dissapear, then freezes. Can someone explain why this doesn't work?
Code:
 
#dynamic 0x803372
#org @fly
lock
faceplayer
msgbox @holdon 0x6
release
applymovement 0xFF @hide
waitmovement 0x0
applymovement 0x2 @flight
waitmovement 0x0
setflag 0x2B3
warp 0x0 0x64 0x0 0xF 0x14
end
 
#org @holdon
= Hold on tight!
 
#Org @hide
#raw 0x54
#raw 0xFE
 
#Org @flight
#raw 0x4 
#raw 0x3A
#raw 0x4 
#raw 0x4
#raw 0x4 
#raw 0x4 
#raw 0x4
#raw 0x4 
#raw 0x4 
#raw 0x4 
#raw 0x4 
#raw 0x4
#raw 0x4 
#raw 0x4 
#raw 0x4 
#raw 0x4
#raw 0x4 
#raw 0x4
#raw 0x4
#raw 0x4
#raw 0xFE
__________________

DON’T LET THE SPIRIT OF ROCK DIE!!


Friend code: 0732 2275 5722

Pokemon Online Username: dr4g0n12
  #3752    
Old May 2nd, 2010 (04:44 PM). Edited May 2nd, 2010 by Nikolai Fox.
Nikolai Fox's Avatar
Nikolai Fox Nikolai Fox is offline
 
Join Date: Mar 2010
Gender: Male
Posts: 199
Thanks again Swift

And another question.. How can you change what song a certain type of Trainer plays? (Eg: CHAMPION plays the champion theme and GYM LEADERs play the gym leader theme)

Edit: To the above: Did you make sure the warp is correct? Also, try removing that "release", it changes nothing with it being there anyway.

Also, if you want to save that tiny bit of extra text, remove the end after the warp. Warping automatically ends a script anyway.
  #3753    
Old May 3rd, 2010 (01:25 AM).
Mana's Avatar
Mana Mana is online now
Kariyai.
Moderator
CS
 
Join Date: Jan 2009
Location: UK
Age: 23
Gender: Male
Posts: 5,396
Dragon12:

warp 0x0 0x64 0xFF 0xF 0x14

Nikolai Fox:

I think you can do that in A-Trainer?

DawnGold:

You can use Shinyzer (In HackMew's thread) or the FireRed hacked engine here.
__________________
Titans!
a superhero roleplay
Kariyai
art by Churaka
  #3754    
Old May 3rd, 2010 (02:02 AM). Edited May 3rd, 2010 by Nikolai Fox.
Nikolai Fox's Avatar
Nikolai Fox Nikolai Fox is offline
 
Join Date: Mar 2010
Gender: Male
Posts: 199
Nah swift you can only change the intro music it plays when you interact with their overworlds in A-Trainer =/

What I mean is, when you select a Trainer in A-Trainer, you can give Trainers a tag like "BUG CATCHER", which plays the default Trainer battle music, or "LEADER" which plays the Gym Leader music in battle. I'm wondering if there's away you can get a list of these Trainer "types", and make it for example all Pokemon with the tag BUG CATCHER play the Gym Leader music.


And another question. How do I set someone a map, and have them hidden until I set a flag on another map?
  #3755    
Old May 3rd, 2010 (04:46 AM).
Jordy San's Avatar
Jordy San Jordy San is offline
The fire-breathing Dutch-Boy
 
Join Date: Jun 2008
Location: Holland
Gender:
Nature: Brave
Posts: 292
Hello guys.
i recently got into scripting again, and I screwed up somehwere in this code:
Code:
#dynamic 0x800FD8

#org @start
checkflag 0x1003
if 0x1 goto @rocket
end

#org @rocket
playsong 0x112 0x0
applymovement 0x04 @1
applymovement 0x05 @2
waitmovement 0x0
msgbox @10 0x2
applymovement 0xFF @3
waitmovement 0x0
applymovement 0x04 @4
applymovement 0x05 @5
msgbox @11 0x2
Showsprite 0x05
msgbox @12 0x2
setflag 0x828
givepokemon 0x19 0x5 0x0 0x0 0x0 0x0 
trainerbattle 0x0 0x15F 0x0 @before @after
fadescreen 0x1
setflag 0x2000
hidesprite 0x04
hidesprite 0x03
hidesprite 0x05
fadescreen 0x0



#org @1
#raw 0x65
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0xFE

#org @2
#raw 0x65
#raw 0x1F
#raw 0x1F
#raw 0x1F
#raw 0x1F
#raw 0x1F
#raw 0x1F
#raw 0x1F
#raw 0x1F
#raw 0x1F
#raw 0x1F
#raw 0x1F
#raw 0xFE

#org @3
#raw 0x10

#org @4
#raw 0x13
#raw 0x00

#org @5
#raw 0x00



#org @10
= Guy: Ok kid, hand over the egg!\pGirl: Do it now!

#org @11
= Guy: What's that?

#org @12
= Girl: The egg hatched!\pGuy: Well, we have no other choise\nthen to  battle you for it.

#org @before
= Hand that PIKACHU over!

#org @after
= How could we lose?
When I step on the tile the script uses, the player just gets locked. I know the flag is correct... soo.. Where did I screw up (this time) :\
__________________

Pokemon Diamond Friendcode: 0903 - 5848 - 6695
Pokemon Diamond Name: Jordy

Visuit my Trade Thread!
http://www.pokecommunity.com/showthread.php?t=176991


PM me if you want to battle! If you wanna know if i'm good, ask Turtwigtoon

Hacks I
Support:
Spoiler:
  #3756    
Old May 3rd, 2010 (04:53 AM).
destinedjagold's Avatar
destinedjagold destinedjagold is online now
Oh Hai Thar~ 'ω'
Silver Tier
 
Join Date: May 2007
Location: Philippines
Gender: Male
Nature: Careful
Posts: 7,024
^
Maybe add a "nop" command after your playsong command?
not sure though. Haven't used the playsong command for a while now.
Or maybe you need to set the Unknown numbers on your script tile on A-Map.
__________________

3DS FC: 0061-1111-6462
TSV: 1364(X), 0790(OR)


  #3757    
Old May 3rd, 2010 (04:54 AM). Edited May 3rd, 2010 by Nikolai Fox.
Nikolai Fox's Avatar
Nikolai Fox Nikolai Fox is offline
 
Join Date: Mar 2010
Gender: Male
Posts: 199
Jordy, did you give your script a variable number in Advance Map?


And another question. How do I set someone a map, and have them hidden until I set a flag on another map?
  #3758    
Old May 3rd, 2010 (08:47 AM).
Binary's Avatar
Binary Binary is offline
え?
 
Join Date: Aug 2007
Age: 20
Posts: 3,994
@Nikolai Fox: Make a level script that checks the flag and shows the sprite if it is set.
__________________
  #3759    
Old May 3rd, 2010 (09:40 AM).
Nikolai Fox's Avatar
Nikolai Fox Nikolai Fox is offline
 
Join Date: Mar 2010
Gender: Male
Posts: 199
Thanks Binary, how do I make a level script?

Also, what is wrong with this script?

Spoiler:
'---------------
#org 0x1617E8
lock
faceplayer
msgbox 0x81619E9 MSG_NORMAL '"Dad: Welcome back son.\p[player]: ..."
givepokemon 0x4002 0x1 0x8B 0x0 0x0 0x0
release
end


It should give me a pikachu (i copied it from my other script), but when i save it, it replaces release and end with
nop
braille2 0xoffset

And just freezes if I try it ingame :/
  #3760    
Old May 3rd, 2010 (10:04 AM).
Binary's Avatar
Binary Binary is offline
え?
 
Join Date: Aug 2007
Age: 20
Posts: 3,994
Quote originally posted by Nikolai Fox:
Thanks Binary, how do I make a level script?

Also, what is wrong with this script?

Spoiler:
'---------------
#org 0x1617E8
lock
faceplayer
msgbox 0x81619E9 MSG_NORMAL '"Dad: Welcome back son.\p[player]: ..."
givepokemon 0x4002 0x1 0x8B 0x0 0x0 0x0
release
end


It should give me a pikachu (i copied it from my other script), but when i save it, it replaces release and end with
nop
braille2 0xoffset

And just freezes if I try it ingame :/
A good level-script tutorial would be here.

Try decompiling and replacing the
nop
braille2 0xoffset
part with release end. Or maybe compile again in a free offset.
__________________
  #3761    
Old May 3rd, 2010 (10:17 AM).
Nikolai Fox's Avatar
Nikolai Fox Nikolai Fox is offline
 
Join Date: Mar 2010
Gender: Male
Posts: 199
I tried compiling it in a free offset, but it still froze. It kept the release and end though. Is it as simple as just using the "givepokemon" script?
It is the first pokemon as well, if that makes a difference.

(thanks for the link)
  #3762    
Old May 3rd, 2010 (10:51 AM).
PeregrineFig's Avatar
PeregrineFig PeregrineFig is offline
Starting Pokémon Obsidian
 
Join Date: Feb 2010
Location: Michigan, USA
Age: 20
Gender: Male
Nature: Hardy
Posts: 202
If it's the first Pokemon, a certain flag has to be set to receive it, I had a similar problem when writing my hack's starter script. I just dug up my script and found that if you're hacking FireRed, you need to precede the givepokemon command with setflag 0x828 and setflag 0x291. (or at least, that's what I have in my working script) Hope this works for you. Also, I've found that those issues where commands get changed to weird non-working things happens a lot in PKSV (I don't know if this is what you're using or not), which is why I switched over to XSE. A lot fewer bugs in compiling.
__________________
Current Projects:
POKéMON AQUA SAPPHIRE
POKéMON OBSIDIAN

  #3763    
Old May 3rd, 2010 (11:42 AM). Edited May 3rd, 2010 by Nikolai Fox.
Nikolai Fox's Avatar
Nikolai Fox Nikolai Fox is offline
 
Join Date: Mar 2010
Gender: Male
Posts: 199
EDIT: Okay next problem. I tried out that level script, and here it is:

'---------------
#org 0x160AA7
checkflag 0x104
if 0x1 goto 0x8160B0C
hidesprite 0x2
end

'---------------
#org 0x160B0C
showsprite 0x2
end

I have the person's person ID set to 2, I'm assuming that should work? I used the script type on entering map/not on menu close :/
  #3764    
Old May 3rd, 2010 (03:00 PM).
DawnGold's Avatar
DawnGold DawnGold is offline
 
Join Date: Mar 2009
Gender:
Posts: 4
Quote originally posted by SwiftSign:

You can use Shinyzer (In HackMew's thread) or the FireRed hacked engine
I don't want everything to be shiny.

I want to create a Red Gyrados type of event. How would i do that?
  #3765    
Old May 3rd, 2010 (03:20 PM).
Shiny Quagsire's Avatar
Shiny Quagsire Shiny Quagsire is offline
STOP HIM SAM, HE'S GONNA TELL US A STORY!!!
 
Join Date: May 2009
Location: Hoenn Safari Zone
Age: 17
Gender: Male
Nature: Jolly
Posts: 689
Quote originally posted by DawnGold:
I don't want everything to be shiny.

I want to create a Red Gyrados type of event. How would i do that?
Call the asm again to cancel it.
__________________



  #3766    
Old May 3rd, 2010 (03:24 PM).
PeregrineFig's Avatar
PeregrineFig PeregrineFig is offline
Starting Pokémon Obsidian
 
Join Date: Feb 2010
Location: Michigan, USA
Age: 20
Gender: Male
Nature: Hardy
Posts: 202
Quote originally posted by Nikolai Fox:
EDIT: Okay next problem. I tried out that level script, and here it is:

'---------------
#org 0x160AA7
checkflag 0x104
if 0x1 goto 0x8160B0C
hidesprite 0x2
end

'---------------
#org 0x160B0C
showsprite 0x2
end

I have the person's person ID set to 2, I'm assuming that should work? I used the script type on entering map/not on menu close :/
Person ID is used for flags. It would actually be far easier for you to set person ID to 0104 and delete the level script, that way if flag 104 is set the person vanishes. Hidesprite won't permanently hide it, as soon as you walk off the tile the script took place on the sprite reappears.
__________________
Current Projects:
POKéMON AQUA SAPPHIRE
POKéMON OBSIDIAN

  #3767    
Old May 3rd, 2010 (03:57 PM). Edited May 3rd, 2010 by Nikolai Fox.
Nikolai Fox's Avatar
Nikolai Fox Nikolai Fox is offline
 
Join Date: Mar 2010
Gender: Male
Posts: 199
Wow thanks peregrinfig. Now how would I make her re-appear? I've not used this method before.

Also: Is there a script to make music fade in? playmusic 0x000 just makes it burst straight in. Sounds quite sloppy =/
  #3768    
Old May 3rd, 2010 (07:08 PM).
Shiny Quagsire's Avatar
Shiny Quagsire Shiny Quagsire is offline
STOP HIM SAM, HE'S GONNA TELL US A STORY!!!
 
Join Date: May 2009
Location: Hoenn Safari Zone
Age: 17
Gender: Male
Nature: Jolly
Posts: 689
Quote originally posted by Nikolai Fox:
Wow thanks peregrinfig. Now how would I make her re-appear? I've not used this method before.
Use clearflag 0xFLAG. It will appear again.

Also, I made a script to edit wild pokemon data when a person is talked to. The script works, but it wont write the byte to the pokemon data offset. Why won't it write????
__________________



  #3769    
Old May 4th, 2010 (03:38 AM).
Nikolai Fox's Avatar
Nikolai Fox Nikolai Fox is offline
 
Join Date: Mar 2010
Gender: Male
Posts: 199
I don't know about that wild pokemon script =/

Next question..

What is wrong with this?

[spoiler]#dynamic 0x100000
#org @start
lock
faceplayer
checkflag 0x1000
if 0x1 goto @goplease
msgbox @goodmorningson 0x6
setflag 0x1000
setflag 0x82F
release
end

#org @goplease
msgbox @goonthen 0x6
release
end


#org @goodmorningson
= Dad:

#org @goonthen
= Dad:.[/spolier]

I want it to play the text (which it does) and to activate running shoes. I have it set the flag after speaking to him for this first time, but when i try to run outside, nothing :/
  #3770    
Old May 4th, 2010 (04:40 AM).
Xela's Avatar
Xela Xela is offline
Do you believe in yourself?
Gold Tier
 
Join Date: Feb 2008
Location: You know where.
Posts: 349
Send a message via Skype™ to Xela
Quote originally posted by Nikolai Fox:
I don't know about that wild pokemon script =/

Next question..

What is wrong with this?

Spoiler:
#dynamic 0x100000
#org @start
lock
faceplayer
checkflag 0x1000
if 0x1 goto @goplease
msgbox @goodmorningson 0x6
setflag 0x1000
setflag 0x82F
release
end

#org @goplease
msgbox @goonthen 0x6
release
end


#org @goodmorningson
= Dad:

#org @goonthen
= Dad:.


I want it to play the text (which it does) and to activate running shoes. I have it set the flag after speaking to him for this first time, but when i try to run outside, nothing :/
The reason is because you have two flags. Try removing the "checkflag 0x1000" and "setflag 0x1000" then add "checkflag 0x82F" at the start.
__________________
  #3771    
Old May 4th, 2010 (07:01 AM). Edited May 4th, 2010 by Nikolai Fox.
Nikolai Fox's Avatar
Nikolai Fox Nikolai Fox is offline
 
Join Date: Mar 2010
Gender: Male
Posts: 199
EDIT: I figured out my problem. I modified Pallet Town and Route 01 and somehow changed their place "type". So I can run but not in those areas. Gonna have a look what was changed when I imported them.

Nope. The solution was... Making the headers of those areas "Show Village Names" instead of "Show Names". Didn't think that would affect running but whatever XD
  #3772    
Old May 4th, 2010 (08:26 AM).
Giga Universe's Avatar
Giga Universe Giga Universe is offline
Working on a tool.
Crystal Tier
 
Join Date: Aug 2007
Location: South Africa
Age: 20
Gender: Male
Nature: Calm
Posts: 121
Send a message via ICQ to Giga Universe Send a message via AIM to Giga Universe Send a message via Yahoo to Giga Universe Send a message via Skype™ to Giga Universe
Quote originally posted by shiny quagsire:
Use clearflag 0xFLAG. It will appear again.

Also, I made a script to edit wild pokemon data when a person is talked to. The script works, but it wont write the byte to the pokemon data offset. Why won't it write????
Umm, because you can't write to the ROM? You wouldn't be able to make a script that does this. Remember, you can ONLY write to the RAM.
__________________
  #3773    
Old May 4th, 2010 (08:35 AM).
Xela's Avatar
Xela Xela is offline
Do you believe in yourself?
Gold Tier
 
Join Date: Feb 2008
Location: You know where.
Posts: 349
Send a message via Skype™ to Xela
Quote originally posted by Nikolai Fox:
EDIT: I figured out my problem. I modified Pallet Town and Route 01 and somehow changed their place "type". So I can run but not in those areas. Gonna have a look what was changed when I imported them.

Nope. The solution was... Making the headers of those areas "Show Village Names" instead of "Show Names". Didn't think that would affect running but whatever XD
Oh, well, I had a similar script, and the problem was because of having 2 flags in one script. :/

Also for information, editing the headers can also be a way to run inside, etc.
__________________
  #3774    
Old May 4th, 2010 (09:59 AM).
Nikolai Fox's Avatar
Nikolai Fox Nikolai Fox is offline
 
Join Date: Mar 2010
Gender: Male
Posts: 199
"Also for information, editing the headers can also be a way to run inside, etc. "
I noticed, I'll remember that

So does anyone know how to alter what players play what tracks? The way I understand it, the music that plays depends on the type of trainer, such as "BUG CATCHER", "RIVAL" or "LEADER". I'm assuming someone there is a script with a list of those, telling the game which track to play?
  #3775    
Old May 4th, 2010 (10:59 AM). Edited May 4th, 2010 by PeregrineFig.
PeregrineFig's Avatar
PeregrineFig PeregrineFig is offline
Starting Pokémon Obsidian
 
Join Date: Feb 2010
Location: Michigan, USA
Age: 20
Gender: Male
Nature: Hardy
Posts: 202
Quote originally posted by Nikolai Fox:
"Also for information, editing the headers can also be a way to run inside, etc. "
I noticed, I'll remember that

So does anyone know how to alter what players play what tracks? The way I understand it, the music that plays depends on the type of trainer, such as "BUG CATCHER", "RIVAL" or "LEADER". I'm assuming someone there is a script with a list of those, telling the game which track to play?
Use Google and see if you can find Mastermind_X's ASM routine. You just put in the hex (you'll need to change the variables used, his example doesn't work) and you can use variables to change the music to be played in a battle. There's really no easier way other than renaming classes, but that means you still only have one class with that music, just under a different name.

Quote originally posted by Nikolai Fox:
Wow thanks peregrinfig. Now how would I make her re-appear? I've not used this method before.

Also: Is there a script to make music fade in? playmusic 0x000 just makes it burst straight in. Sounds quite sloppy =/
As nobody answered this, fadesong 0x(song number) 0x0.
__________________
Current Projects:
POKéMON AQUA SAPPHIRE
POKéMON OBSIDIAN

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:01 AM.