The PokéCommunity Forums  

Go Back   The PokéCommunity Forums > ROM Hacking > ROM Hacking Hub
Sign Up Rules/FAQ Live Battle Blogs Mark Forums Read

Notices

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
Click here to go to the first staff post in this thread.  
Thread Tools
  #6526    
Old March 2nd, 2012, 02:56 PM
TarnWilliamson
Beginning Trainer
 
Join Date: Feb 2012
Hey everyone, i have a small problem. I am using a script with a flag in it. All is ok until i leave a house and the re-enter, the flag is cleared. And i have to activate the script to set the flag again. How can i make it so when the flag is set, it is set permanently (unless i use another script with a clearflag in it). Thanks.
  #6527    
Old March 2nd, 2012, 03:00 PM
Echidna's Avatar
Echidna
Community Supporter
 
Join Date: Aug 2010
Location: Vaniville Town
Age: 20
Gender: Male
Nature: Brave
Quote:
Originally Posted by TarnWilliamson View Post
Hey everyone, i have a small problem. I am using a script with a flag in it. All is ok until i leave a house and the re-enter, the flag is cleared. And i have to activate the script to set the flag again. How can i make it so when the flag is set, it is set permanently (unless i use another script with a clearflag in it). Thanks.
When you set a flag, it is, by default permanently set. I think the problem is that you're using a flag that is either map specific, or one that the game is already using. So I think your problem should be solved if you use a flag above 1000.
__________________






  #6528    
Old March 2nd, 2012, 03:12 PM
TarnWilliamson
Beginning Trainer
 
Join Date: Feb 2012
Thank you so much, you were right, i tried using a flag above 1000 and it worked Thanks again
  #6529    
Old March 3rd, 2012, 03:05 PM
Hacks0rus's Avatar
Hacks0rus
Monster Raving Looney
 
Join Date: Jul 2011
Gender: Male
Nature: Timid
Hello all, Having a bit of trouble getting item scripts to work. These are items that the player will find in the pokeballs across the map like in the normal games.

However, I cannot seem to get the item to disappear after finding it.
my script (using advance map and xse):

#dynamic 0x(offset)
#org @start

giveitem 0x4 0x1 0x1
end

This is what I saw in a scripting tutorial. I also tried setflag on the person ID, but the item came back when I left and re-entered the route. Any help would be much appreciated.
  #6530    
Old March 3rd, 2012, 10:45 PM
goldenyellowcrystal's Avatar
goldenyellowcrystal
A Black Crystal of Mystery
 
Join Date: Aug 2011
Location: Aspertia City, Unova
Age: 16
Gender: Male
Nature: Relaxed
How come when I compile my script in xse it doesnt work but I hear the clicking sound when i play it? (I dont know how to spoiler the script)
Pokemon Fire Red BPRE

#dynamic 0x800000

#org @start
lock
faceplayer
msgbox @hello 0x6
release
end

#org @hello
= Hello there.
__________________
Black 2 FC: 5201 0498 7362 (Yellow)
Black FC: 1077 8979 1077 (Yellow)
  #6531    
Old March 3rd, 2012, 11:07 PM
DrFuji's Avatar
DrFuji
Helfen, Wehren, Heilen
Community Supporter
 
Join Date: Sep 2009
Location: Upside-downia
Age: 21
Gender: Male
Nature: Jolly
Quote:
Originally Posted by goldenyellowcrystal View Post
How come when I compile my script in xse it doesnt work but I hear the clicking sound when i play it? (I dont know how to spoiler the script)
Pokemon Fire Red BPRE

#dynamic 0x800000

#org @start
lock
faceplayer
msgbox @hello 0x6
release
end

#org @hello
= Hello there.
Your script is correctly written so that leads me to believe that it is your version of XSE that is the problem. You most likely have version 1.0.0 (which is notoriously buggy) when you need 1.1.1. Here is a link to download the newer XSE.

As for spoilering text use [spoiler] and [/spoiler] before and after the stuff you want to hide.
__________________
  #6532    
Old March 4th, 2012, 03:15 AM
Spherical Ice's Avatar
Spherical Ice
Community Supporter
 
Join Date: Nov 2007
Location: UK
Send a message via Skype™ to Spherical Ice
Is there some form of level script code that would make it so that when I warp to a map it starts at a black screen? Using fadescreen leaves a second gap where you can see everything and kinda ruins the effect.
__________________
  #6533    
Old March 4th, 2012, 03:55 AM
Magic's Avatar
Magic
DLOA - Please contact Adventure
Community Supporter
 
Join Date: Jan 2009
Location: UK
Age: 23
Gender: Male
Quote:
Originally Posted by Spherical Ice View Post
Is there some form of level script code that would make it so that when I warp to a map it starts at a black screen? Using fadescreen leaves a second gap where you can see everything and kinda ruins the effect.
I suppose you could use the fadescreen on the script that warps you there originally? No idea if that actually works or if it's what you mean :3
__________________
  #6534    
Old March 4th, 2012, 03:58 AM
Spherical Ice's Avatar
Spherical Ice
Community Supporter
 
Join Date: Nov 2007
Location: UK
Send a message via Skype™ to Spherical Ice
Quote:
Originally Posted by SwiftSign View Post
I suppose you could use the fadescreen on the script that warps you there originally? No idea if that actually works or if it's what you mean :3
That doesn't work but I'm just putting the script that would happen on Map B happen on Map A and then warp over. Only problem is the fadescreen cancels for a second before it warps so it's just as bad >:

e Well I just cheated and moved the camera while the fadescreen was up to a part of the map that was black and just left it there. It's a cheat but it works I guess.
__________________

Last edited by Spherical Ice; March 4th, 2012 at 04:09 AM.
  #6535    
Old March 4th, 2012, 05:49 PM
aradatm
Beginning Trainer
 
Join Date: Feb 2012
Gender: Female
I've been using JPAN's FireRed Hack Rom for a week now and I've looked into the Sethealingplace command and I feel I've gotten it right but I guess I put it as the wrong level script or maybe I didn't actually get it right? I'm trying to duplicate the 'warping back to mom when you lose' so here's what I did:

#dynamic 0x80000
#org @main
sethealingplace 0x1
setvar 0x405A 0x0004 (that's how it is for bank4, map0, right?)
setvar 0x405B 0x0008 (x-coordinate)
setvar 0x405C 0x0005 (y-coordinate)
end

I put that script in script no (0), script type (on entering map/not on menu close (3))

Then I have:

#dynamic 0x80000
#org @main
special 0x182
end

on script no (1), script type (on entering map/on map close (5))

I'm not sure what I did wrong.
  #6536    
Old March 5th, 2012, 03:23 AM
Magic's Avatar
Magic
DLOA - Please contact Adventure
Community Supporter
 
Join Date: Jan 2009
Location: UK
Age: 23
Gender: Male
Quote:
Originally Posted by Spherical Ice View Post
That doesn't work but I'm just putting the script that would happen on Map B happen on Map A and then warp over. Only problem is the fadescreen cancels for a second before it warps so it's just as bad >:

e Well I just cheated and moved the camera while the fadescreen was up to a part of the map that was black and just left it there. It's a cheat but it works I guess.
Aha that works, also using a tiny completely black map can be useful as then you can warp after the script (and it could be recycled).
__________________
  #6537    
Old March 5th, 2012, 04:02 AM
DrFuji's Avatar
DrFuji
Helfen, Wehren, Heilen
Community Supporter
 
Join Date: Sep 2009
Location: Upside-downia
Age: 21
Gender: Male
Nature: Jolly
Quote:
Originally Posted by aradatm View Post
I've been using JPAN's FireRed Hack Rom for a week now and I've looked into the Sethealingplace command and I feel I've gotten it right but I guess I put it as the wrong level script or maybe I didn't actually get it right? I'm trying to duplicate the 'warping back to mom when you lose' so here's what I did:

#dynamic 0x80000
#org @main
sethealingplace 0x1
setvar 0x405A 0x0004 (that's how it is for bank4, map0, right?)
setvar 0x405B 0x0008 (x-coordinate)
setvar 0x405C 0x0005 (y-coordinate)
end

I put that script in script no (0), script type (on entering map/not on menu close (3))

Then I have:

#dynamic 0x80000
#org @main
special 0x182
end

on script no (1), script type (on entering map/on map close (5))

I'm not sure what I did wrong.
Yeah, that's how JPAN's hacked sethealingplace command works and you've set it out correctly so I'm not sure what could be going wrong. What exactly happens when you've whited out in your hack? Does the game crash? Are you warped to a different map? Does it display the wrong text etc?

I'm also not sure why you're using special 0x182 - Is it really necessary?

Also, you should add an extra '0' onto the end of your #define commands ;)
__________________
  #6538    
Old March 5th, 2012, 04:37 PM
Locust_Arts
Your Rival
 
Join Date: Mar 2012
Gender: Male
Nature: Adamant
I am using the following code to attempt to hack Pokemon Emerald. It's a script to give the player a TOGEPI egg. My editor is PKSV-UI.
Spoiler:
#dyn 0x740000
'-----------------------------------
#org @start
lock
checkflag 0x200
if 0x1 jump @given
setflag FR_POKEMON
countpokemon
compare LASTRESULT 6
if == jump @noroom
giveegg TOGEPI
setflag 0x200
message @get-msg
release
end

#org @noroom
msgbox @noroom-msg
callstd MSG_NOCLOSE
release
end

#org @given
msgbox @given-msg
callstd MSG_NORMAL
release
end

#org @noroom-msg
= You don't have enough room in your party.

#org @get-msg
= You got a \v\h02!

#org @given-msg
= I hope you can take better care of that EGG than I can[.]

If anyone could help me find out what exactly is wrong with this code because it doesn't let me compile it into the game D= that would be AWESOME and I'd love you forever (a long time) =D
  #6539    
Old March 5th, 2012, 07:29 PM
Rumille's Avatar
Rumille
Togepi
 
Join Date: Feb 2012
Gender: Male
So, what's the deal with the Script Offset in Advance Map? I'm trying to create new signs, I get the event placed, but I can't seem to figure out how the script is corresponding with the Script Offset function. I now randomly change one or two symbols in the code (0x168CD4 becomes 0x168CD3 for example), but that can't be the right way, can it?

For example, in the bedroom you start in, you have this:
Quote:
'-----------------------
#org 0x168CD2
msgbox 0x818D50B '"[player] played with the NES.\p[.]O..."
callstd 0x3
end


'---------
' Strings
'---------
#org 0x18D50B
= [player] played with the NES.\p[.]Okay!\nIt's time to go!
Now, I have created a new room with another NES and I want it to say something else instead of 'played with the NES', for example '[player] kicked the computer's butt with Mario Kart'. To get that script to work on the second NES, I have to put in a code in the script offset, which in this case should be $168CD2, but that code is already used in the first bedroom. How does this work? Is there a trick to get a new code very easy?
  #6540    
Old March 5th, 2012, 07:35 PM
droomph's Avatar
droomph
mmm gurl that 90s
Community Supporter
 
Join Date: Sep 2011
Location: bar'jách
Age: 17
Gender: Male
Nature: Impish
Quote:
Originally Posted by Rumille View Post
So, what's the deal with the Script Offset in Advance Map? I'm trying to create new signs, I get the event placed, but I can't seem to figure out how the script is corresponding with the Script Offset function. I now randomly change one or two symbols in the code (0x168CD4 becomes 0x168CD3 for example), but that can't be the right way, can it?

For example, in the bedroom you start in, you have this:


Now, I have created a new room with another NES and I want it to say something else instead of 'played with the NES', for example '[player] kicked the computer's butt with Mario Kart'. To get that script to work on the second NES, I have to put in a code in the script offset, which in this case should be $168CD2, but that code is already used in the first bedroom. How does this work? Is there a trick to get a new code very easy?
Create a new script with XSE or PKSV or whatever, and then paste the offset that it compiles to into the second Script offset box.

Quote:
Originally Posted by Locust_Arts View Post
I am using the following code to attempt to hack Pokemon Emerald. It's a script to give the player a TOGEPI egg. My editor is PKSV-UI.
Spoiler:
#dyn 0x740000
'-----------------------------------
#org @start
lock
checkflag 0x200
if 0x1 jump @given
setflag FR_POKEMON
countpokemon
compare LASTRESULT 6
if == jump @noroom
giveegg TOGEPI
setflag 0x200
message @get-msg
release
end

#org @noroom
msgbox @noroom-msg
callstd MSG_NOCLOSE
release
end

#org @given
msgbox @given-msg
callstd MSG_NORMAL
release
end

#org @noroom-msg
= You don't have enough room in your party.

#org @get-msg
= You got a \v\h02!

#org @given-msg
= I hope you can take better care of that EGG than I can[.]

If anyone could help me find out what exactly is wrong with this code because it doesn't let me compile it into the game D= that would be AWESOME and I'd love you forever (a long time) =D
It should be #dynamic, not #dyn.
__________________
did u no there r 21 letters in the alphabet
o i forgot 5
uraqt



Last edited by droomph; March 5th, 2012 at 07:39 PM. Reason: Your double post has been automatically merged.
  #6541    
Old March 5th, 2012, 07:54 PM
itman
Back to ROM hacking. :D
 
Join Date: May 2007
Age: 20
Nature: Adamant
Is there a command in XSE to "checkpokemon" in your party? Like, if you have a Blastoise, go to this, while if you have a Charizard, go to this...
  #6542    
Old March 5th, 2012, 08:56 PM
aradatm
Beginning Trainer
 
Join Date: Feb 2012
Gender: Female
Quote:
Originally Posted by DrFuji View Post
Yeah, that's how JPAN's hacked sethealingplace command works and you've set it out correctly so I'm not sure what could be going wrong. What exactly happens when you've whited out in your hack? Does the game crash? Are you warped to a different map? Does it display the wrong text etc?

I'm also not sure why you're using special 0x182 - Is it really necessary?

Also, you should add an extra '0' onto the end of your #define commands
I'm warped to the first map under heading 0, one of those battle union rooms. I figured out that I had to first use the 'setvar 0x4056' and I tried it but the map completely ignored my level script for some reason. I guess something went wrong with the rom somewhere because I tested the level script in a fresh rom and it worked fine. It might have something to do with me changing the starting point map because when I tried to open the program again using that rom, it gave me a 'runtime error' which didn't happen in the past. I don't know why. I guess I'll just have to start over on a clean rom. Oh well. Thanks for replying anyway.
  #6543    
Old March 6th, 2012, 04:48 AM
Rumille's Avatar
Rumille
Togepi
 
Join Date: Feb 2012
Gender: Male
Quote:
Originally Posted by droomph View Post
Create a new script with XSE or PKSV or whatever, and then paste the offset that it compiles to into the second Script offset box.
Well, yes, I get that, but how do I decide what the 6-symbol offset is? I mean, I have to make one in the script, don't I?

Quote:
#org 0x168CD2
How do I decide which 6 symbols to use here?
  #6544    
Old March 6th, 2012, 01:12 PM
DrFuji's Avatar
DrFuji
Helfen, Wehren, Heilen
Community Supporter
 
Join Date: Sep 2009
Location: Upside-downia
Age: 21
Gender: Male
Nature: Jolly
Quote:
Originally Posted by Rumille View Post
Well, yes, I get that, but how do I decide what the 6-symbol offset is? I mean, I have to make one in the script, don't I?


How do I decide which 6 symbols to use here?
Use a dynamic offset when writing your script - That is why at the top of one you almost always see the command #dynamic 0x800000'. It will automatically search for free space starting at that point in the ROM and then insert your script when it finds an opening. When you compile the script you'll be given several offsets, choose the first one that is presented as it will correlated to the start of your script if you've written it in a coherent manner. Copy it and place it in the event's script box.
__________________
  #6545    
Old March 6th, 2012, 01:38 PM
Rumille's Avatar
Rumille
Togepi
 
Join Date: Feb 2012
Gender: Male
Quote:
Originally Posted by DrFuji View Post
Use a dynamic offset when writing your script - That is why at the top of one you almost always see the command #dynamic 0x800000'. It will automatically search for free space starting at that point in the ROM and then insert your script when it finds an opening. When you compile the script you'll be given several offsets, choose the first one that is presented as it will correlated to the start of your script if you've written it in a coherent manner. Copy it and place it in the event's script box.
This actually makes so much sense. Thanks!
  #6546    
Old March 7th, 2012, 02:09 PM
Hacks0rus's Avatar
Hacks0rus
Monster Raving Looney
 
Join Date: Jul 2011
Gender: Male
Nature: Timid
Hello, I was wondering if any could help me out here.
Im setting up some level scripts in Pallet, in the downstairs of your house when you are leaving.
I get the script to work all fine and stop after it has activated, but the script starts whenever I enter the map, not on the tile that I want it to activate and have set the script on (at the exit).
How do I get the script to activate when I stand on it?
  #6547    
Old March 8th, 2012, 09:41 AM
Rumille's Avatar
Rumille
Togepi
 
Join Date: Feb 2012
Gender: Male
Is it possible to change the standard script for things like bookcases, cabinets, dressers and stuff like that?

So you won't get stuff like 'It's a nicely made dresser. It will hold a lot of stuff.'
  #6548    
Old March 8th, 2012, 09:49 AM
Spherical Ice's Avatar
Spherical Ice
Community Supporter
 
Join Date: Nov 2007
Location: UK
Send a message via Skype™ to Spherical Ice
Quote:
Originally Posted by Rumille View Post
Is it possible to change the standard script for things like bookcases, cabinets, dressers and stuff like that?

So you won't get stuff like 'It's a nicely made dresser. It will hold a lot of stuff.'
In Advance Map, go to the Block Editor and select the tile you want to change (a TV, bookshelf, whatever), and edit the number in the first box that's titled "Behavior Byte" and change it to $00. So using the example of the Bookshelf tile, you'd replace the $89 part to $00. Hope this helps ;)

Quote:
Originally Posted by Hacks0rus View Post
Hello, I was wondering if any could help me out here.
Im setting up some level scripts in Pallet, in the downstairs of your house when you are leaving.
I get the script to work all fine and stop after it has activated, but the script starts whenever I enter the map, not on the tile that I want it to activate and have set the script on (at the exit).
How do I get the script to activate when I stand on it?
Level scripts are activated upon entry to the map they are assigned to providing the variable they need is not set. Scripts on the Green S tiles are Trigger Events and are activated when the player steps on them. I think you may have gotten a bit confused there :D
__________________
  #6549    
Old March 8th, 2012, 10:05 AM
Rumille's Avatar
Rumille
Togepi
 
Join Date: Feb 2012
Gender: Male
Quote:
Originally Posted by Spherical Ice View Post
In Advance Map, go to the Block Editor and select the tile you want to change (a TV, bookshelf, whatever), and edit the number in the first box that's titled "Behavior Byte" and change it to $00. So using the example of the Bookshelf tile, you'd replace the $89 part to $00. Hope this helps
Well, yes, that's a way, but then you have to add signs to get a new message. I was wondering if it was possible to change the core of that script, you know that if a sprite has $89, you will get the message you have defined personally.
  #6550    
Old March 8th, 2012, 10:18 AM
Spherical Ice's Avatar
Spherical Ice
Community Supporter
 
Join Date: Nov 2007
Location: UK
Send a message via Skype™ to Spherical Ice
Quote:
Originally Posted by Rumille View Post
Well, yes, that's a way, but then you have to add signs to get a new message. I was wondering if it was possible to change the core of that script, you know that if a sprite has $89, you will get the message you have defined personally.
Well, you could always text edit the script, or use JPAN's patch that allows you to make custom Behaviour Bytes.
__________________
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
Minimum Characters Per Post: 25



All times are UTC -8. The time now is 11:29 PM.


Style by Nymphadora, artwork by Sa-Dui.
Like our Facebook Page Follow us on Twitter © 2002 - 2014 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2014 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.