The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > Creative Discussions > Emulation & ROM Hacking
Register New Account FAQ/Rules Chat Blogs Mark Forums Read

Notices

Emulation & ROM Hacking The center for the community emulation scene. Come and discuss all things emulation and develop your own hacks!



Reply
Thread Tools
  #3751  
Unread May 2nd, 2010, 09:59 PM
SwiftSign's Avatar
SwiftSign
Scary Fire Demon
 
Join Date: Jan 2009
Location: England
Age: 21
Gender: Male
Nature: Rash
Quote:
Originally Posted by Nikolai Fox View Post
Game: Fire Red(US)

Okay I'm back..now with a movement script problem. Here is my script:

Spoiler:
'---------------
#org 0x16069F
lock
checkflag 0x64
if 0x1 goto 0x81607FD
msgbox 0x816081D MSG_NORMAL '"[blue_fr]Dad: Hey, where are you g..."
applymovement 0xFF 0x816081B
release
end

'---------------
#org 0x1607FD
release
end


'---------
' Strings
'---------
#org 0x16081D
= [blue_fr]Dad: Hey, where are you going? I\ntold you I need to speak to you.


'-----------
' Movements
'-----------
#org 0x16081B
#raw 0x11 'Step Up (Normal)
#raw 0xFE 'End of Movements


I want the message box to show up when the player steps on a tile, then move up one. The message box shows up but the player doesn't move :/
you need waitmovement 0x0 after the applymovement.
__________________
Reply With Quote
  #3752  
Unread May 3rd, 2010, 12:30 AM
dr4g0n12's Avatar
dr4g0n12
Δράκος
 
Join Date: May 2009
Location: The past
Age: 17
Gender: Male
Nature: Adamant
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
Reply With Quote
  #3753  
Unread May 3rd, 2010, 12:44 AM
Nikolai Fox's Avatar
Nikolai Fox
Smoochum
 
Join Date: Mar 2010
Gender: Male
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.

Last edited by Nikolai Fox; May 3rd, 2010 at 01:02 AM.
Reply With Quote
  #3754  
Unread May 3rd, 2010, 09:25 AM
SwiftSign's Avatar
SwiftSign
Scary Fire Demon
 
Join Date: Jan 2009
Location: England
Age: 21
Gender: Male
Nature: Rash
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.
__________________
Reply With Quote
  #3755  
Unread May 3rd, 2010, 10:02 AM
Nikolai Fox's Avatar
Nikolai Fox
Smoochum
 
Join Date: Mar 2010
Gender: Male
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?

Last edited by Nikolai Fox; May 3rd, 2010 at 12:37 PM. Reason: Your double post has been automatically merged.
Reply With Quote
  #3756  
Unread May 3rd, 2010, 12:46 PM
Jordy San's Avatar
Jordy San
The fire-breathing Dutch-Boy
 
Join Date: Jun 2008
Location: Holland
Gender:
Nature: Brave
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:
Reply With Quote
  #3757  
Unread May 3rd, 2010, 12:53 PM
destinedjagold's Avatar
destinedjagold
Reviving SkyLine~ 'ω'
 
Join Date: May 2007
Location: Philippines
Age: 22
Gender: Male
Nature: Careful
Send a message via Skype™ to destinedjagold
^
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.
__________________
Reply With Quote
  #3758  
Unread May 3rd, 2010, 12:54 PM
Nikolai Fox's Avatar
Nikolai Fox
Smoochum
 
Join Date: Mar 2010
Gender: Male
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?

Last edited by Nikolai Fox; May 3rd, 2010 at 04:18 PM.
Reply With Quote
  #3759  
Unread May 3rd, 2010, 04:47 PM
Binary's Avatar
Binary
え?
 
Join Date: Aug 2007
Age: 18
@Nikolai Fox: Make a level script that checks the flag and shows the sprite if it is set.
__________________
Reply With Quote
  #3760  
Unread May 3rd, 2010, 05:40 PM
Nikolai Fox's Avatar
Nikolai Fox
Smoochum
 
Join Date: Mar 2010
Gender: Male
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 :/
Reply With Quote
  #3761  
Unread May 3rd, 2010, 06:04 PM
Binary's Avatar
Binary
え?
 
Join Date: Aug 2007
Age: 18
Quote:
Originally Posted by Nikolai Fox View Post
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.
__________________
Reply With Quote
  #3762  
Unread May 3rd, 2010, 06:17 PM
Nikolai Fox's Avatar
Nikolai Fox
Smoochum
 
Join Date: Mar 2010
Gender: Male
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)
Reply With Quote
  #3763  
Unread May 3rd, 2010, 06:51 PM
PeregrineFig's Avatar
PeregrineFig
Starting Pokémon Obsidian
 
Join Date: Feb 2010
Location: Michigan, USA
Age: 18
Gender: Male
Nature: Hardy
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

Reply With Quote
  #3764  
Unread May 3rd, 2010, 07:42 PM
Nikolai Fox's Avatar
Nikolai Fox
Smoochum
 
Join Date: Mar 2010
Gender: Male
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 :/

Last edited by Nikolai Fox; May 3rd, 2010 at 07:56 PM.
Reply With Quote
  #3765  
Unread May 3rd, 2010, 11:00 PM
DawnGold's Avatar
DawnGold
Beginning Trainer
 
Join Date: Mar 2009
Gender:
Quote:
Originally Posted by SwiftSign View Post

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?
Reply With Quote
  #3766  
Unread May 3rd, 2010, 11:20 PM
shiny quagsire's Avatar
shiny quagsire
I'm pixular!
 
Join Date: May 2009
Location: In a House, duh!
Age: 15
Gender: Male
Nature: Jolly
Quote:
Originally Posted by DawnGold View Post
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.
__________________



Reply With Quote
  #3767  
Unread May 3rd, 2010, 11:24 PM
PeregrineFig's Avatar
PeregrineFig
Starting Pokémon Obsidian
 
Join Date: Feb 2010
Location: Michigan, USA
Age: 18
Gender: Male
Nature: Hardy
Quote:
Originally Posted by Nikolai Fox View Post
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

Reply With Quote
  #3768  
Unread May 3rd, 2010, 11:57 PM
Nikolai Fox's Avatar
Nikolai Fox
Smoochum
 
Join Date: Mar 2010
Gender: Male
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 =/

Last edited by Nikolai Fox; May 4th, 2010 at 12:03 AM.
Reply With Quote
  #3769  
Unread May 4th, 2010, 03:08 AM
shiny quagsire's Avatar
shiny quagsire
I'm pixular!
 
Join Date: May 2009
Location: In a House, duh!
Age: 15
Gender: Male
Nature: Jolly
Quote:
Originally Posted by Nikolai Fox View Post
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????
__________________



Reply With Quote
  #3770  
Unread May 4th, 2010, 11:38 AM
Nikolai Fox's Avatar
Nikolai Fox
Smoochum
 
Join Date: Mar 2010
Gender: Male
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 :/
Reply With Quote
  #3771  
Unread May 4th, 2010, 12:40 PM
AlexAhnon's Avatar
AlexAhnon
Lurking around.
 
Join Date: Feb 2008
Location: Norway
Age: 16
Gender: Male
Nature: Brave
Quote:
Originally Posted by Nikolai Fox View Post
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.
__________________
You must be very jelly of this awesome signature of mine.
Reply With Quote
  #3772  
Unread May 4th, 2010, 03:01 PM
Nikolai Fox's Avatar
Nikolai Fox
Smoochum
 
Join Date: Mar 2010
Gender: Male
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

Last edited by Nikolai Fox; May 4th, 2010 at 03:17 PM.
Reply With Quote
  #3773  
Unread May 4th, 2010, 04:26 PM
Giga Universe's Avatar
Giga Universe
Working on a tool.
 
Join Date: Aug 2007
Location: South Africa
Age: 18
Gender: Male
Nature: Calm
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 View Post
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.
__________________
Reply With Quote
  #3774  
Unread May 4th, 2010, 04:35 PM
AlexAhnon's Avatar
AlexAhnon
Lurking around.
 
Join Date: Feb 2008
Location: Norway
Age: 16
Gender: Male
Nature: Brave
Quote:
Originally Posted by Nikolai Fox View Post
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.
__________________
You must be very jelly of this awesome signature of mine.
Reply With Quote
  #3775  
Unread May 4th, 2010, 05:59 PM
Nikolai Fox's Avatar
Nikolai Fox
Smoochum
 
Join Date: Mar 2010
Gender: Male
"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?
Reply With Quote
Reply
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. The time now is 05:51 AM.


Style by Perdition Haze, artwork by Sa-Dui.
Like our Facebook Page Follow us on TwitterMessage Board Statistics | © 2002 - 2013 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to Pokémon USA, Inc. and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company, Pokémon USA, Inc., The Pokémon Company International, or Wizards of the Coast. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2013 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 posts belong to the user.