• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Forum moderator applications are now open! Click here for details.
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

Script Help Thread (DO NOT REQUEST SCRIPTS)

Status
Not open for further replies.
9
Posts
13
Years
  • Age 30
  • Seen Nov 16, 2010
thanks again zeffy, you are a good person x]
the sad thing is i ended up fixing it myself before you had posted this
oh the reason i had changed the one you gave me originally is because xse told me to because @done wasnt pointing to anything :p
Spoiler:

thats the script now lol it works fine except for it only hides the sprite once i re-enter the room? huh oh well works good enough for me

i do have a problem problem with a new script though xP
okay so the problem im having is after the yes/no option if i select yes the game freezes, im assuming it has something to do with an incorrect line but i cant for the life of me figure out which one (ive been looking through tutorials and other peoples similar scripts and it seems right to me)
script:
Spoiler:

sorry for the constant stream of issues :/ hopefully things will go better for a while
 

Kevin

kevin del rey
2,686
Posts
13
Years
thanks again zeffy, you are a good person x]
the sad thing is i ended up fixing it myself before you had posted this
oh the reason i had changed the one you gave me originally is because xse told me to because @done wasnt pointing to anything :p
Spoiler:

thats the script now lol it works fine except for it only hides the sprite once i re-enter the room? huh oh well works good enough for me

i do have a problem problem with a new script though xP
okay so the problem im having is after the yes/no option if i select yes the game freezes, im assuming it has something to do with an incorrect line but i cant for the life of me figure out which one (ive been looking through tutorials and other peoples similar scripts and it seems right to me)
script:
Spoiler:

sorry for the constant stream of issues :/ hopefully things will go better for a while
It has to be in hexadecimal. :( So Bagon's decimal is 395, but in hex it is 18B. You need to convert. Because 395 in hex is 915 in decimal, which is too big. Convert before compiling a script. Everything is in HEX.
 

Zeffy

g'day
6,402
Posts
14
Years
  • Age 27
  • Seen Feb 7, 2024
thanks again zeffy, you are a good person x]
the sad thing is i ended up fixing it myself before you had posted this
oh the reason i had changed the one you gave me originally is because xse told me to because @done wasnt pointing to anything :p
Spoiler:

thats the script now lol it works fine except for it only hides the sprite once i re-enter the room? huh oh well works good enough for me

i do have a problem problem with a new script though xP
okay so the problem im having is after the yes/no option if i select yes the game freezes, im assuming it has something to do with an incorrect line but i cant for the life of me figure out which one (ive been looking through tutorials and other peoples similar scripts and it seems right to me)
script:
Spoiler:

sorry for the constant stream of issues :/ hopefully things will go better for a while
In the earlier script, put the Person Event Number not the Person ID. I have a tutorial on disappearing sprites, look it up. ;D
 

pkmntrainerpaul

New account: P-Sign
440
Posts
15
Years
Game: Pokemon Fire Red
Type: Person Event
Editor: XSE
Comments
I want to use 2 person events in one map, both items.
Script:
Script of Item 1
Spoiler:

Script of Item 2:
Spoiler:

Script of Item 1 after Compiling:
Spoiler:

Script of Item 2 after compiling:
Spoiler:
 

metapod23

Hardened Trainer
673
Posts
15
Years
  • Seen Aug 18, 2016
Game: Pokemon Fire Red
Type: Person Event
Editor: XSE
Comments
I want to use 2 person events in one map, both items.
Script:
Script of Item 1
Spoiler:

Script of Item 2:
Spoiler:

Script of Item 1 after Compiling:
Spoiler:

Script of Item 2 after compiling:
Spoiler:

You already have data at offset 0x800013. You don't want to choose the offsets yourself, let XSE choose them for you based on how many bytes your script takes. To do that put this instead:

Code:
#dynamic 0x800000

#org @item1
lock
faceplayer
giveitem 0x44 0x1 MSG_FIND
hidesprite 0x1
setflag 0x1001
release
end

The #dynamic tells the game to search for enough free space for your script starting at offset 800000. The @item1 indicates a new offset you want to be found. Copy the offset it shows after its compiled and you should no longer have this problem.

Also, I don't think you need all of that for a random item, though. Just the giveitem command by itself, followed by end is enough. All the other stuff will happen automatically.
 
49
Posts
14
Years
  • Seen Sep 10, 2011
Game: FR with the Fire Red Hacked patch that wipes the rom.

Hey guys... I was wondering, how do I set it up so when you run out of usable pokemon you arrive at home, or in a pokemon center? At the very begining of my hack, before I get to a pokemon center (which isn't scripted into the rom yet), When I run out of usable pokemon I get sent to a glitched room and the game freezes. (possibly because I don't have healing areas scripted yet? Will it automatically send me to a healing spot?) I'm about to write moms healing script, will this fix the problem, or do I need to add a bit of script that tells the game when I run out of pokemon to send me back home?

Thanks for all the help guys :)
 

Zeffy

g'day
6,402
Posts
14
Years
  • Age 27
  • Seen Feb 7, 2024
Game: FR with the Fire Red Hacked patch that wipes the rom.

Hey guys... I was wondering, how do I set it up so when you run out of usable pokemon you arrive at home, or in a pokemon center? At the very begining of my hack, before I get to a pokemon center (which isn't scripted into the rom yet), When I run out of usable pokemon I get sent to a glitched room and the game freezes. (possibly because I don't have healing areas scripted yet? Will it automatically send me to a healing spot?) I'm about to write moms healing script, will this fix the problem, or do I need to add a bit of script that tells the game when I run out of pokemon to send me back home?

Thanks for all the help guys :)
sethealingplace is a command for that, me thinks. There is a tutorial on that in the Tutorials section. Search for "Killing the Pokémon Center Glitch", or somewhere around that line.
 
49
Posts
14
Years
  • Seen Sep 10, 2011
sethealingplace is a command for that, me thinks. There is a tutorial on that in the Tutorials section. Search for "Killing the Pokémon Center Glitch", or somewhere around that line.


Cool thanks, I'll go look around in that and see.
 

Drithlan

Self Proclaimed Cartographer
47
Posts
13
Years
Game: FR

Spoiler:

I finally got this script working on a standard Script tile. I made it work for a Level script but when I run it I don't get released at the end. Did I put something wrong in the script? Or a setting in AM? See Spoiler above for script. and Below for attached Screen Shot.

Spoiler:
 
49
Posts
14
Years
  • Seen Sep 10, 2011
Wasn't sure which was a better place to ask, so heres my question from the Killing PC Glitch. It seems pretty complicated since I've used that patch, but maybe not. Any help would be wounderfull.

Posted:
Hey, I'm hacking FR and used this patch
http://www.pokecommunity.com/showthread.php?t=194241

When I run out of usable pokemon I show up in a glitched room and the game freezes.
There are currently no healing spots yet and I'm working to set up mom, at home, to heal you. Is this enough for the game to send me there or to a pokemon center when out of pkmn? Or do I need to sethealingplace all of the PCs and home since the rom is wiped clean with that patch?


EDIT: Ok, so I tried adding sethealingplace 0x01 on moms script and when I run out of pkmn it loads me in the black border of a map (me thinks its CELEDON DEPT. 0.0 ), in which I can't move. (stuck there, but can face different directions) The text that appears when you white out and go home shows up as usual, but I'm in an area I can't ecape. Do I need to assign a person ID to mom to make me show up next to her? Same with the pokemon centers, do they need to be assigned something so thats where I go when I run out of pkmn? I know I need to sethealingplace 0xXX, but that wasn't enough with the patch I have I guess. Help please!!!!! Thank you.
 
Last edited:

DuoRyan

Hack'in as usual, it seem.
335
Posts
14
Years
Wasn't sure which was a better place to ask, so heres my question from the Killing PC Glitch. It seems pretty complicated since I've used that patch, but maybe not. Any help would be wounderfull.

Posted:
Hey, I'm hacking FR and used this patch
http://www.pokecommunity.com/showthread.php?t=194241

When I run out of usable pokemon I show up in a glitched room and the game freezes.
There are currently no healing spots yet and I'm working to set up mom, at home, to heal you. Is this enough for the game to send me there or to a pokemon center when out of pkmn? Or do I need to sethealingplace all of the PCs and home since the rom is wiped clean with that patch?


EDIT: Ok, so I tried adding sethealingplace 0x01 on moms script and when I run out of pkmn it loads me in the black border of a map (me thinks its CELEDON DEPT. 0.0 ), in which I can't move. (stuck there, but can face different directions) The text that appears when you white out and go home shows up as usual, but I'm in an area I can't ecape. Do I need to assign a person ID to mom to make me show up next to her? Same with the pokemon centers, do they need to be assigned something so thats where I go when I run out of pkmn? I know I need to sethealingplace 0xXX, but that wasn't enough with the patch I have I guess. Help please!!!!! Thank you.

used this
#dynamic 0x800000
#org @start
compare 0x4056 0x0
if 0x1 call @set
end

'---------------
#org @set
sethealingplace 0x1
setvar 0x405A 0x4
setvar 0x405B 0x8
setvar 0x405C 0x5
return

I think you should read the manual next time carefully!
 
49
Posts
14
Years
  • Seen Sep 10, 2011
used this
#dynamic 0x800000
#org @start
compare 0x4056 0x0
if 0x1 call @set
end

'---------------
#org @set
sethealingplace 0x1
setvar 0x405A 0x4
setvar 0x405B 0x8
setvar 0x405C 0x5
return

I think you should read the manual next time carefully!


Didn't work...lol...
You do understand what I want to happen and that I used that patch right?
I'm trying to add a bit of script to mom (or where ever I need it) so that when I faint I get sent to the last healing spot (being mom, or PC) If I can get an example of where I change this and how for both a pc and mom, I'd be very happy. Keep in mind I'm a noob at this, lol.
 

metapod23

Hardened Trainer
673
Posts
15
Years
  • Seen Aug 18, 2016
Game: FR

Spoiler:

I finally got this script working on a standard Script tile. I made it work for a Level script but when I run it I don't get released at the end. Did I put something wrong in the script? Or a setting in AM? See Spoiler above for script. and Below for attached Screen Shot.


Some possible changes in bold. You can't really "return" from an 0x1 trainerbattle. You don't really need the checkflag or the setflag (if it's only for the checkflag) because once you set variable 0x5500 to 0x1, the script won't activate again.

Didn't work...lol...
You do understand what I want to happen and that I used that patch right?
I'm trying to add a bit of script to mom (or where ever I need it) so that when I faint I get sent to the last healing spot (being mom, or PC) If I can get an example of where I change this and how for both a pc and mom, I'd be very happy. Keep in mind I'm a noob at this, lol.

The gist of how it works is this:

variable 0x405A is the map you want the player to appear at when he faints. The bank # and the map # are reversed, and you must change it to hex. So, if you want the player to heal at map 4.0, you would write:

setvar 0x405A 0x0004

Make sense?

Second, variable 405B and 405C determine your X-Y position on the map. 405B is X and 405C is Y. So if you want the player to revive at position 0x7 0x4, you would write:

setvar 0x405B 0x7
setvar 0x405C 0X4

Lastly, use the sethealingplace command. If I remember correctly, sethealingplace 0x1 will display the mother's message, and anything else will display the Pokemon Center message, along with the balls in the healing machine animation, I think. However, setting it to 0x0 never works for me, so I always set it to 0x1 for the mother message and 0x2 for the Pokemon Center message.

In Fire Red, the sethealingplace for the mom is set in the header of the player's room when the game first starts. If you want the mother to be the first place to heal you, you should do the same.
 
Last edited:

Drithlan

Self Proclaimed Cartographer
47
Posts
13
Years
@metapod23

I tried your solution and it brings me to a loop after the battle where at the end of the script it loops to the Dialogue after the battle and goes through the script again.
 

metapod23

Hardened Trainer
673
Posts
15
Years
  • Seen Aug 18, 2016
@metapod23

I tried your solution and it brings me to a loop after the battle where at the end of the script it loops to the Dialogue after the battle and goes through the script again.

Can you post the new script fully compiled (not the script you wrote, but the one that's now in the game). Thanks.
 

Drithlan

Self Proclaimed Cartographer
47
Posts
13
Years
Can you post the new script fully compiled (not the script you wrote, but the one that's now in the game). Thanks.


Spoiler:


Here you go.
 

metapod23

Hardened Trainer
673
Posts
15
Years
  • Seen Aug 18, 2016
Spoiler:


Here you go.

Why did you change the trainerbattle from 0x1 to 0x0? If I'm not mistaken, any trainerbattle but 0x1 will cut off the script when the battle's over. Anything in the script after the trainerbattle is then taken as what is said when you talk to the person after the battle is over.

I'll just write again what I think should work in the spoilers.
 

Drithlan

Self Proclaimed Cartographer
47
Posts
13
Years
This time it doesn't loop. All I get after the script finishes I cannot move or use Start menu. But the animations and music continue. Have you tried the script? Does it work for you?
 
Last edited:

metapod23

Hardened Trainer
673
Posts
15
Years
  • Seen Aug 18, 2016
This time it doesn't loop. All I get after the script finishes I cannot move or use Start menu. But the animations and music continue. Have you tried the script? Does it work for you?

So I just tested it. I can't really tell if the movements for the other sprites work properly. I also see that you didn't put waitmovement 0x0 after most of the applymovement commands. Add those to make the movements that aren't working work.

That being said, the script released fine for me at the end. Did you make sure to fix the Map Script Offset in the Professional Header of A-Map? That would definitely cause some problems if you didn't.

http://www.pokecommunity.com/showthread.php?t=191500
 
Status
Not open for further replies.
Back
Top