Go Back   The PokéCommunity Forums > ROM Hacking > ROM Hacking Hub
Reload this Page [ARCHIVE] Simple Questions (SEARCH BEFORE ASKING A QUESTION)

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
  #22151    
Old July 21st, 2012 (01:49 PM).
Vandette Vandette is offline
 
Join Date: Feb 2009
Posts: 3
I'm new to scripting, but not new to programming.
I wrote a pretty basic script with some messages and movement and I tried putting it into a script tile on a map in AdvanceMap after I complied it. The script does not activate upon stepping on the tile. I set the unknown value for the tile to 0003 (I tried 0300 too) and the Var number to 4050 as instructed, but to no avail. I know the issue is not with the script itself, because I checked it by assigning it to a Person Event, and it ran as intended.

Any idea what I'm doing wrong?
  #22152    
Old July 21st, 2012 (02:16 PM).
Renegade's Avatar
Renegade Renegade is offline
Time for real life...
 
Join Date: Nov 2011
Location: United States
Gender: Male
Nature: Careful
Posts: 998
Quote originally posted by Vandette:
I'm new to scripting, but not new to programming.
I wrote a pretty basic script with some messages and movement and I tried putting it into a script tile on a map in AdvanceMap after I complied it. The script does not activate upon stepping on the tile. I set the unknown value for the tile to 0003 (I tried 0300 too) and the Var number to 4050 as instructed, but to no avail. I know the issue is not with the script itself, because I checked it by assigning it to a Person Event, and it ran as intended.

Any idea what I'm doing wrong?
Could you please post the script? (Just so I know what is supposed to happen)
Also, do you want the script to activate the instant the player walks into a new map?
  #22153    
Old July 21st, 2012 (03:08 PM).
Vandette Vandette is offline
 
Join Date: Feb 2009
Posts: 3
Thanks for your response! Here's a copy of the script I'm using. I realize that it does have errors (which I noticed when I ran it out of the person event, but I'd like to get the script tile to work before I do that.)

Spoiler:

'---------------
#org 0x71A400
goto 0x871A47A

'---------------
#org 0x71A47A
textcolor 0x0
pause 0x1E
playsong 0x12E 0x0
msgbox 0x871A4F0 MSG_KEEPOPEN '"???: Hey you!"
closeonkeypress
applymovement 0x2 0x871A68F
waitmovement 0x0
msgbox 0x871A501 MSG_KEEPOPEN '"ALEKO: I'm glad that\nI ran into y..."
closeonkeypress
givepokemon 0x85 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox 0x871A589 MSG_KEEPOPEN '"ALEKO gives you an EEVEE!"
waitfanfare
closeonkeypress
setflag 0x828
msgbox 0x871A5A5 MSG_YESNO '"Would you like to give a\nnickname..."
compare LASTRESULT 0x1
if 0x1 call 0x871A4E9
msgbox 0x871A5D3 MSG_NORMAL '"ALEKO: I know that you've\nalways ..."
applymovement 0x2 0x871A69B
waitmovement 0x0
releaseall
end

'---------------
#org 0x71A4E9
call 0x81A74EB
return

'---------------
#org 0x1A74EB
showbox 0x1A 0x8 0x9 0x4
goto 0x81A7507

'---------------
#org 0x1A7507
special 0x17F
return


'---------
' Strings
'---------
#org 0x71A4F0
= ???: Hey you!

#org 0x71A501
= ALEKO: I'm glad that\nI ran into you before\nI head off to the Pokemon\nLeague for my internship.\nI got you something to\nremember me by.

#org 0x71A589
= ALEKO gives you an EEVEE!

#org 0x71A5A5
= Would you like to give a\nnickname to EEVEE?

#org 0x71A5D3
= ALEKO: I know that you've\nalways wanted a Glaceon,\nbut Ice Stones are\nreally hard to come by\nthese days.\nI'm going to be late\nif I don't leave now\nso I gotta run.\n


'-----------
' Movements
'-----------
#org 0x71A68F
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x66 'Happy ()
#raw 0xFE 'End of Movements

#org 0x71A69B
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x12 'Step Left (Normal)
#raw 0x12 'Step Left (Normal)
#raw 0x12 'Step Left (Normal)
#raw 0x12 'Step Left (Normal)
#raw 0x12 'Step Left (Normal)
#raw 0x12 'Step Left (Normal)
#raw 0x12 'Step Left (Normal)
#raw 0x60 'Hide
#raw 0xFE 'End of Movements


So that's it. The script event tile is on the Route 1 map, so it's not activating as soon as I enter a new map, no. I just want it to activate once this particular tile is stepped on, and that's not happening.
  #22154    
Old July 21st, 2012 (03:37 PM).
Matheus290's Avatar
Matheus290 Matheus290 is offline
 
Join Date: Jan 2011
Location: Brasil
Age: 21
Gender: Male
Posts: 5
Send a message via Windows Live Messenger to Matheus290
Guys, I need help with two problems.

First: I created a new map, 1.123. I connected it with the existing map 1.113 (both are inside the folder "ICEFALL CAVE"). Done correctly, the 1.123 with 1.113 and 1.113 with 1.123. Went to test in VBA. When I move the map 1.113 to 1.123, the character goes through normally. However, when I went over 1.123 for 1.113, he did not return. It is as if the map were not connected. Tried to turn the maps by Advance 1.92 and 1.95 Map and none worked. How to solve this problem?

Second: This second map that I created, the character does not run. Just walk or use the bike. But if I press the B button (GBA) the character does not run. How to resolve?

Thank you!
  #22155    
Old July 21st, 2012 (03:40 PM). Edited July 21st, 2012 by Renegade.
Renegade's Avatar
Renegade Renegade is offline
Time for real life...
 
Join Date: Nov 2011
Location: United States
Gender: Male
Nature: Careful
Posts: 998
Quote originally posted by Vandette:
Thanks for your response! Here's a copy of the script I'm using. I realize that it does have errors (which I noticed when I ran it out of the person event, but I'd like to get the script tile to work before I do that.)

Spoiler:

'---------------
#org 0x71A400
goto 0x871A47A

'---------------
#org 0x71A47A
textcolor 0x0
pause 0x1E
playsong 0x12E 0x0
msgbox 0x871A4F0 MSG_KEEPOPEN '"???: Hey you!"
closeonkeypress
applymovement 0x2 0x871A68F
waitmovement 0x0
msgbox 0x871A501 MSG_KEEPOPEN '"ALEKO: I'm glad that\nI ran into y..."
closeonkeypress
givepokemon 0x85 0x5 0x0 0x0 0x0 0x0
fanfare 0x13E
msgbox 0x871A589 MSG_KEEPOPEN '"ALEKO gives you an EEVEE!"
waitfanfare
closeonkeypress
setflag 0x828
msgbox 0x871A5A5 MSG_YESNO '"Would you like to give a\nnickname..."
compare LASTRESULT 0x1
if 0x1 call 0x871A4E9
msgbox 0x871A5D3 MSG_NORMAL '"ALEKO: I know that you've\nalways ..."
applymovement 0x2 0x871A69B
waitmovement 0x0
releaseall
end

'---------------
#org 0x71A4E9
call 0x81A74EB
return

'---------------
#org 0x1A74EB
showbox 0x1A 0x8 0x9 0x4
goto 0x81A7507

'---------------
#org 0x1A7507
special 0x17F
return


'---------
' Strings
'---------
#org 0x71A4F0
= ???: Hey you!

#org 0x71A501
= ALEKO: I'm glad that\nI ran into you before\nI head off to the Pokemon\nLeague for my internship.\nI got you something to\nremember me by.

#org 0x71A589
= ALEKO gives you an EEVEE!

#org 0x71A5A5
= Would you like to give a\nnickname to EEVEE?

#org 0x71A5D3
= ALEKO: I know that you've\nalways wanted a Glaceon,\nbut Ice Stones are\nreally hard to come by\nthese days.\nI'm going to be late\nif I don't leave now\nso I gotta run.\n


'-----------
' Movements
'-----------
#org 0x71A68F
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x13 'Step Right (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x10 'Step Down (Normal)
#raw 0x66 'Happy ()
#raw 0xFE 'End of Movements

#org 0x71A69B
#raw 0x11 'Step Up (Normal)
#raw 0x11 'Step Up (Normal)
#raw 0x12 'Step Left (Normal)
#raw 0x12 'Step Left (Normal)
#raw 0x12 'Step Left (Normal)
#raw 0x12 'Step Left (Normal)
#raw 0x12 'Step Left (Normal)
#raw 0x12 'Step Left (Normal)
#raw 0x12 'Step Left (Normal)
#raw 0x60 'Hide
#raw 0xFE 'End of Movements


So that's it. The script event tile is on the Route 1 map, so it's not activating as soon as I enter a new map, no. I just want it to activate once this particular tile is stepped on, and that's not happening.
Okay, try this:

You need a "lockall" command at the beginning of your script. (Just before "textcolor 0x0") Also, there needs to be a "setvar 0x4050 0x1" command just before your "releaseall" command at the end of your script.

Your AdvancedMap settings are correct, but since you used 4050 for the var number, you also need to insert a "setvar 0x4050 0x1" command at the end of your script. This will make it so that when the script ends, it will be removed from the game forever.

Quote originally posted by Matheus290:
Guys, I need help with two problems.

First: I created a new map, 1.123. I connected it with the existing map 1.113 (both are inside the folder "ICEFALL CAVE"). Done correctly, the 1.123 with 1.113 and 1.113 with 1.123. Went to test in VBA. When I move the map 1.113 to 1.123, the character goes through normally. However, when I went over 1.123 for 1.113, he did not return. It is as if the map were not connected. Tried to turn the maps by Advance 1.92 and 1.95 Map and none worked. How to solve this problem?

Second: This second map that I created, the character does not run. Just walk or use the bike. But if I press the B button (GBA) the character does not run. How to resolve?

Thank you!
For the first problem:

Where exactly does the player end up after they go from 1.123 to 1.113? Does the game freeze or does the player get warped to a random map or something?

For the second problem:

Go to the second map's header. Under "Map Options" and "Type", what does it say? If it says "Inside", change it to something else. Any map with an "Inside" typing will disable the run feature for that specific map.
  #22156    
Old July 21st, 2012 (04:05 PM). Edited July 21st, 2012 by Matheus290.
Matheus290's Avatar
Matheus290 Matheus290 is offline
 
Join Date: Jan 2011
Location: Brasil
Age: 21
Gender: Male
Posts: 5
Send a message via Windows Live Messenger to Matheus290
Thank you for answering me. Well, I linked the maps. I'll show a image so that you understand what's going on... (open the Spoiler to see the prints)

Spoiler:












It was not to have problems ...

---------

On the second problem, the character cannot run. No, is set to "Underground" instead of "Inside". See:

Spoiler:




Why this is happening?


------------


EDIT: The second problem I fix changing set the "Show name on entering" to "??? [07]". But the first problem persists.
  #22157    
Old July 21st, 2012 (04:09 PM).
Vandette Vandette is offline
 
Join Date: Feb 2009
Posts: 3
Thanks for the help! I had another script using the same variable which would explain why this one wasn't triggering.

I appreciate the explanation, it really helped!
  #22158    
Old July 21st, 2012 (04:31 PM).
mewmasterify's Avatar
mewmasterify mewmasterify is offline
Actual Mew
 
Join Date: Apr 2011
Location: Faraway Island
Age: 15
Gender: Male
Nature: Quiet
Posts: 71
how do i insert an item that does a different effect like a Life orb into a gba rom?
__________________
  #22159    
Old July 21st, 2012 (04:40 PM).
Renegade's Avatar
Renegade Renegade is offline
Time for real life...
 
Join Date: Nov 2011
Location: United States
Gender: Male
Nature: Careful
Posts: 998
Quote originally posted by mewmasterify:
how do i insert an item that does a different effect like a Life orb into a gba rom?
Try this tutorial:

http://www.pokecommunity.com/showthread.php?t=258426&highlight=Item+creation
  #22160    
Old July 21st, 2012 (04:45 PM).
redriders180's Avatar
redriders180 redriders180 is offline
Mastermind of Pokemon Glazed
 
Join Date: Jun 2010
Location: Path of Victory, Tunod
Gender: Male
Nature: Quirky
Posts: 538
Send a message via AIM to redriders180 Send a message via Skype™ to redriders180
Quote originally posted by Matheus290:
Thank you for answering me. Well, I linked the maps. I'll show a image so that you understand what's going on... (open the Spoiler to see the prints)

Spoiler:












It was not to have problems ...

---------

On the second problem, the character cannot run. No, is set to "Underground" instead of "Inside". See:

Spoiler:




Why this is happening?


------------


EDIT: The second problem I fix changing set the "Show name on entering" to "??? [07]". But the first problem persists.
This might be a complete hunch, but it might be that your offset is an odd number. The game seems finnicky about odd numbers as an offset...if you look in the original games, I don't think any map has an odd number as an offset. I've had a few in my game that cause problems, and a few that don't. I can't think of anything else, though :\
__________________


Superfan of Pokemon Glazed? Click here to join the official Pokemon Glazed Facebook Page!

Thank you for hatching the eggs!
Please view these dragons! Just click them and you're done!
If you don't help them grow up, they'll die...


  #22161    
Old July 21st, 2012 (06:50 PM). Edited July 21st, 2012 by FrozenInfernoZX.
FrozenInfernoZX's Avatar
FrozenInfernoZX FrozenInfernoZX is offline
Legendary Trainer ZX
 
Join Date: Jun 2012
Location: United States
Gender: Male
Nature: Adamant
Posts: 584
Send a message via AIM to FrozenInfernoZX
Is it safe to use Advance Map 1.92 and 1.95 interchangeably? Due to me having to use the World Map editor.

Edit - I also want to remake my map as a DPPt map. How do I get the correct palettes for inserting into the game? It was easier for a FRLG map since the maps uses the original palettes.
__________________

-----------------------------------------------
Pokémon Teal Version
: Alphere's Throne
Pokémon Ultimate ZX
: God of Restoration
Uiyto region map still in progress...
  #22162    
Old July 21st, 2012 (10:55 PM).
dragonluver449's Avatar
dragonluver449 dragonluver449 is offline
 
Join Date: Nov 2010
Posts: 15
Quote originally posted by dragonluver449:
I'm curious, would it be possible at all to script this:
In my hack I would like to do something like, you get a glitch pokemon however it can be 'disinfected' (remove the glitch turn it back into a normal pokemon, while retaining nicknames, moveset, held items, level ect.). Upon 'disinfecting' a roaming legendary would spring up but what legendary it is would be determined by the starter you chose. I was wondering if there could be a way to do that??? If not I'll just leave that feature out of the game.

Thanks in advance!
Not trying to be pushy or seem impatient but my scripter was bugging me about this and saying that it's impossible, so I'd really like to know. Thanks~
  #22163    
Old July 22nd, 2012 (03:54 AM).
Ark_Silvanos's Avatar
Ark_Silvanos Ark_Silvanos is offline
 
Join Date: Jan 2009
Location: Texas
Age: 23
Gender: Male
Posts: 150
Quote originally posted by dragonluver449:
Not trying to be pushy or seem impatient but my scripter was bugging me about this and saying that it's impossible, so I'd really like to know. Thanks~
nope its possible... though not to the extent your hoping for... but it requires some asm routines + good knowledge of scripts + a little imagination.

encryption/decryption routines.
Changing Pokemon Species.

Those plus clever use of flags and scripts and you've got urself atleast something similar to what you want.
__________________


  #22164    
Old July 22nd, 2012 (05:28 AM).
Jasmin88's Avatar
Jasmin88 Jasmin88 is offline
 
Join Date: Oct 2011
Gender: Male
Nature: Quiet
Posts: 37
Hello, guys can anyone please help me. I just started editing Pokemon Wild Encounters in LeafGreen using Advance Map 1.95 and everything worked great i tried it in the game. So then i looked in the folder where ROM is located and i have Pokemon - Leaf Green Version (USA).bak extension. How can i combine or patch this extension so it can stay attached to the ROM, so i can only have Pokemon - Leaf Green Version (USA).gba ROM.
__________________

  #22165    
Old July 22nd, 2012 (05:36 AM).
tajaros's Avatar
tajaros tajaros is offline
Hi I'm dawg
 
Join Date: Apr 2012
Location: Philippines
Age: 16
Gender: Male
Nature: Timid
Posts: 857
Send a message via Windows Live Messenger to tajaros
Quote originally posted by Jasmin88:
Hello, guys can anyone please help me. I just started editing Pokemon Wild Encounters in LeafGreen using Advance Map 1.95 and everything worked great i tried it in the game. So then i looked in the folder where ROM is located and i have Pokemon - Leaf Green Version (USA).bak extension. How can i combine or patch this extension so it can stay attached to the ROM, so i can only have Pokemon - Leaf Green Version (USA).gba ROM.
As far as I know, you can't, that .bak file serves as a save file for the ROM (something like that) but it's not needed anyway why bother....
__________________
  #22166    
Old July 22nd, 2012 (05:38 AM).
Jasmin88's Avatar
Jasmin88 Jasmin88 is offline
 
Join Date: Oct 2011
Gender: Male
Nature: Quiet
Posts: 37
Quote originally posted by tajaros:


As far as I know, you can't, that .bak file serves as a save file for the ROM (something like that) but it's not needed anyway why bother....
Thanks for answering. So if i delete the bak extension will the stuff i edited be lost?
__________________

  #22167    
Old July 22nd, 2012 (05:43 AM).
Banjora Marxvile's Avatar
Banjora Marxvile Banjora Marxvile is offline
Oui Oui Si Si Ja Ja Da Da
 
Join Date: May 2008
Age: 21
Gender: Male
Nature: Lonely
Posts: 3,444
Quote originally posted by Jasmin88:
Thanks for answering. So if i delete the bak extension will the stuff i edited be lost?
No, it shouldn't, but do not delete it yet, as it is a backup version of your ROM. Basically, if something does now go wrong, you can change the extension to GBA, and you'll have the ROM as it was before the next edit, or that edit... One or the other, either way, it's a handy backup of your ROM.
__________________

Man of Steel
He harbors no shame
Got cut a raw deal
But he holds no blame
Gone and forgot to feel
Numb for pretentious pain
As he spins the wheel
There's no loss nor no gain...


Nerves o
f Steel
He must remain
Even if it kills
To remember my name
A view to a thrill
Like Campari and Champagne
I'm on the rocks
Please tell me, What Is My Name?

  #22168    
Old July 22nd, 2012 (06:20 AM).
Jasmin88's Avatar
Jasmin88 Jasmin88 is offline
 
Join Date: Oct 2011
Gender: Male
Nature: Quiet
Posts: 37
Quote originally posted by Banjora Marxvile:
No, it shouldn't, but do not delete it yet, as it is a backup version of your ROM. Basically, if something does now go wrong, you can change the extension to GBA, and you'll have the ROM as it was before the next edit, or that edit... One or the other, either way, it's a handy backup of your ROM.
Thank you that makes sense. I was also wandering in the A-Trainer tool, is there easier way to find trainers, like by IDs or is there some kind of list of IDs for trainers.
__________________

  #22169    
Old July 22nd, 2012 (08:20 AM).
LugiaMZ's Avatar
LugiaMZ LugiaMZ is offline
 
Join Date: Dec 2011
Gender: Male
Posts: 72
Hello everybody, I have a question here. How to edit grass animation tile?
  #22170    
Old July 22nd, 2012 (02:32 PM).
Matheus290's Avatar
Matheus290 Matheus290 is offline
 
Join Date: Jan 2011
Location: Brasil
Age: 21
Gender: Male
Posts: 5
Send a message via Windows Live Messenger to Matheus290
I managed to fix the first problem, the connections of the maps.

What I did to fix? I connected random maps on 4 directions (up, down, left and right) in the "rebellious map".

After I connect the 4, I removed all. So I connected just the map needed to be connected. Voila, problem solved. Thank you! :D
  #22171    
Old July 22nd, 2012 (02:37 PM).
dragonluver449's Avatar
dragonluver449 dragonluver449 is offline
 
Join Date: Nov 2010
Posts: 15
Me again. Ummm, how would I make this patch work on Ruby?
http://www.pokecommunity.com/showpost.php?p=6201310&postcount=164
I love the tiles and really want to use them but I don't want to use Fire Red.
  #22172    
Old July 22nd, 2012 (02:51 PM).
Robert Conley's Avatar
Robert Conley Robert Conley is offline
GPXPlus.net/user/Robert+Conley
 
Join Date: Oct 2008
Location: The Anti Spiral Homeworld
Gender: Male
Nature: Docile
Posts: 330
Quote originally posted by dragonluver449:
Me again. Ummm, how would I make this patch work on Ruby?
http://www.pokecommunity.com/showpost.php?p=6201310&postcount=164
I love the tiles and really want to use them but I don't want to use Fire Red.
I don't think there is anyway to get it to work on Ruby. The only way to use these in Ruby would probably be to insert them manually. If you look in the tutorials section there are quite a few tile insertion tutorials.







My Question:
Is there any way to prevent items from disappearing out of the inventory when they are used? There are a few items I want to make multi-use, including the TMs
__________________
  #22173    
Old July 22nd, 2012 (02:58 PM).
dragonluver449's Avatar
dragonluver449 dragonluver449 is offline
 
Join Date: Nov 2010
Posts: 15
Thanks, how would I get the tiles for manual insertion? Or would I have to ask the maker of the patch for them?
  #22174    
Old July 22nd, 2012 (03:39 PM).
oobio oobio is offline
 
Join Date: Jun 2010
Gender: Male
Posts: 13
How can I change the respawn point of the player when they lose a battle?
  #22175    
Old July 22nd, 2012 (03:41 PM).
Robert Conley's Avatar
Robert Conley Robert Conley is offline
GPXPlus.net/user/Robert+Conley
 
Join Date: Oct 2008
Location: The Anti Spiral Homeworld
Gender: Male
Nature: Docile
Posts: 330
Quote originally posted by dragonluver449:
Thanks, how would I get the tiles for manual insertion? Or would I have to ask the maker of the patch for them?
You have to either get the image from the post you linked to and create the tiles yourself from that or apply the patch to a Firered rom and then use Advance Map to get the tiles.
__________________
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 02:34 PM.