• 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?".
  • 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.

Pokemonguy1990

Pokemon Shoto Saga Creator
45
Posts
13
Years
Close, but no cigar, keep reading the document, and you'll see 2 more commands that specifically remove a script, automatically figuring the space it takes.

You see, the #erase command can be dangerous, because if you erase something at the wrong place, or if you erase too many bytes, you can potentially ruin other stuff in the ROM.
No, I'm speaking of the #remove, and #removeall commands.
#remove 0xOffset removes the main portion of the script at the offset, but leaves the text, movements, mart data it contains (If it contains any), braille (If any) and other things behind, for future use.
#removeall 0xOffset erases the WHOLE thing, text data, movement data, everything that script pointed to.

For instance, if you were to use the fat guy in Pallet tow's offset for the #remove command, his speech about technology will still exist in the ROM, but the rest of the script is gone, but if you use #removeall instead, that speech is gone, and freespace is left over.

Though if you want to erase images, ASM, and other NON-SCRIPT crap, #erase is your best friend.

Thank you very much. So if i use the #removeall, or #erase, FSF will find these offsets again if it's within the size of bytes i need/ specify?
 

sab

Now too much of a life.
999
Posts
15
Years
I have a script for xse. The problem is that it locks the player from moving. how can I avoid this?
Spoiler:
 
Last edited:

colcolstyles

Yours truly
1,588
Posts
15
Years
@sab:
One, you should probably use a "copybyte" statement at the beginning in order to capture the value of the input register immediately after the "waitkeypress" is passed. Otherwise, you run the risk of reading different values each time you use "comparefarbytetobyte". Two, you can't write to the ROM. That's why it's called Read-Only Memory.
 
3
Posts
13
Years
  • Seen Dec 19, 2010
Here is my script
Spoiler:


It works fine but when I step on the place where the script activates the event keeps on activating over and over I need it to only happen once
 

0m3GA ARS3NAL

Im comin' home...
1,816
Posts
16
Years
Thank you very much. So if i use the #removeall, or #erase, FSF will find these offsets again if it's within the size of bytes i need/ specify?

#removeall will erase the entire script that you point it to, no matter how large it is, and #erase erases ANYTHING in it's path, the size you give it, so #erase 0x800000 0x10 will erase 16 bytes starting at 0x800000

(I don't however, know if #removeall follows goto commands and erases what they point to as well, you'll have to test that for yourself...

Here is my script
Spoiler:


It works fine but when I step on the place where the script activates the event keeps on activating over and over I need it to only happen once

You forgot to setflag 0x828, changes are in BOLD
 
Last edited:

tyhone

Good Mapper and Spriter
7
Posts
16
Years
  • Age 29
  • Seen Jan 10, 2020
Game: Fire red
Type: on step script
Problem: whenever i step on the script my character gets locked and i cant move, but i know it hasent frozen as the music still plays normaly

Spoiler:

I have been trying to fix this for ages now, any help would be apprecitated =D
(also ill give you a muffin)
 

Zeffy

g'day
6,402
Posts
15
Years
  • Age 27
  • Seen Feb 7, 2024
Game: Fire red
Type: on step script
Problem: whenever i step on the script my character gets locked and i cant move, but i know it hasent frozen as the music still plays normaly

Spoiler:

I have been trying to fix this for ages now, any help would be apprecitated =D
(also ill give you a muffin)
I've fixed the script for you. Next time, don't add anything at a "msgbox" pointer.
Spoiler:

Oh and, don't forget to do this in A-map:
whattodo.png
 
26
Posts
13
Years
  • Seen Jan 22, 2012
I'm using Fire Red

Spoiler:

When I talk before going to see Prof Oak, there isn't any message appear, it just makes a noise as if i had, then lets me walk away. Any idea whats going on there?

Spoiler:


So then this happens, and I go back to the elder, he acknowledges that I have a Pokemon, the screen fades black and back to normal but he is still there.

Someone might say that it's the removesprite command, is that the Event Number, or the Number underneath the type of event (I'm using Advance Map).

Any help would be greatly appreciated.


EDIT: I have sort of solved that, I didn't put the setflag number in the ID, but still he doesn't say anything when spoken to before receiving the Pokemon and he only disappears after going in and out of a house.

Another problem I've encountered with another script:
Spoiler:


Basically theres a person who's stuck in a fenced off area with a Cut tree blocking it, the problem I'm having is when I talk to the person it comes out as a load of jiberish, not anything I typed, then it comes up with player received the Pokemon Bulbasaur and freezes. I don't get it, sorry if the mistakes are obvious ones.

I corrected half the problem with the Bulbasaur script, it completed it (still in jiberish) went black screen came back, and the guy was still there.
 
Last edited:

Nerketur

PokéScripter
104
Posts
13
Years
Changes in RED.

And as a note, I don't use anything but XSE to script, so I may have the commands wrong. I'd suggest moving to XSE, and I've put a corrected version in XSE style for your convenience =)

Non-XSE -- If this doesn't work, I'm not sure what to tell you
Spoiler:

XSE:
Spoiler:

Also, do understand that the number you need for applymovement and hidesprite and those commands is the person EVENT number. Which is the number at the very bottom of your Advance Map picture. So, you may need to change the "1" to "2" in the scripts for it to work perfectly

As for your third script, I don't know where your error is. =( I'm guessing it might have something to do with how you make your scripts, or it could be that the script editor you use is a bit buggy. Either way, I hope I helped with the first two! =)
 
Last edited:

Andrut

Collecting dust since 1898
284
Posts
14
Years
I browse through free script space,but i keep finding scripts with "nop" things all around them. Can i delete those "nop scripts" and make a new script instead them? Here's a sample...:
Spoiler:
 

Nerketur

PokéScripter
104
Posts
13
Years
I browse through free script space,but i keep finding scripts with "nop" things all around them. Can i delete those "nop scripts" and make a new script instead them?

I'm sure you could. The game doesn't use anything from #org 0x800000 and up, as far as I can tell, so if you're finding scripts in areas after that offset, I think you should be absolutely fine =)

Then again, this is assuming that you didn't put the data there yourself.

This is also assuming that you're using a Clean rom.
 

Alice

(>^.(>0.0)>
3,077
Posts
15
Years
Spoiler:


Absolutely nothing happens when I try this. At one point, while I was trying to get it to work, I got the text to pop up, but no movement. I also tried using script events, and talking to the npc.

I'm trying to make two npcs run off screen, while the player just stands there. I pretty much just started scripting today, so I'm sure I'm making some stupid mistake. lol
 

Nerketur

PokéScripter
104
Posts
13
Years
Spoiler:


Absolutely nothing happens when I try this. At one point, while I was trying to get it to work, I got the text to pop up, but no movement. I also tried using script events, and talking to the npc.

I'm trying to make two npcs run off screen, while the player just stands there. I pretty much just started scripting today, so I'm sure I'm making some stupid mistake. lol

Some of the fixes in RED
Also make sure that the people you are trying to move have the right person Event number. When you use applymovement, it expects the Person event number. In your script, it would only move the one whose event number was "1". =)

I also noticed that all the movement people also have the "unknown" box filled in as "03" Check Professor Oak's sprite for an example =) I don't know if this is required for it to work... but it worked for me.
 

Andrut

Collecting dust since 1898
284
Posts
14
Years
I'm sure you could. The game doesn't use anything from #org 0x800000 and up, as far as I can tell, so if you're finding scripts in areas after that offset, I think you should be absolutely fine =)

Then again, this is assuming that you didn't put the data there yourself.

This is also assuming that you're using a Clean rom.
Ah yes,i forgot i'm hacking Emerald. Would it be still safe,no matter on which of the games?
 

Nerketur

PokéScripter
104
Posts
13
Years
Ah yes,i forgot i'm hacking Emerald. Would it be still safe,no matter on which of the games?

Admittedly, I don't know much about Emerald in terms of Space. But I do remember somebody saying that all Freespace bytes in Emerald are "00" instead of "FF", and if that is the case, then you're dealing with a lot of freespace =) Cause "00" translates to "nop" in XSE. In other words, you're safe. I would assume the same for the rest of the games, yes. but if you're using dynamic offsets in XSE, you shouldn't have a problem.
 
47
Posts
13
Years
  • Seen Feb 28, 2014
I have a question about movesprite scripts
i see them in a lot of hacks and in the original games when they make a rival come battle you and then walk away after.
I know its movesprite 0x 0x 0x
the first 0x is the sprite # in advanced map and i know the next two are coords but they never match the coords that apear on my advanced map. i might be looking at the coords in the wrong place?
i look at the bottom left of the program.
 

Alice

(>^.(>0.0)>
3,077
Posts
15
Years


Some of the fixes in RED
Also make sure that the people you are trying to move have the right person Event number. When you use applymovement, it expects the Person event number. In your script, it would only move the one whose event number was "1". =)

I also noticed that all the movement people also have the "unknown" box filled in as "03" Check Professor Oak's sprite for an example =) I don't know if this is required for it to work... but it worked for me.
Hmm, I made those changes, and it didn't work... are there any other things that I might be doing wrong outside of the actual script?


Oh crap, I'm retarded. I was using the ruby/sapphire movements for an emerald rom... So, it works now that I did it on Ruby. I can only get it to work when I talk to the NPC though... I tried using it with a script event, and it just freezes the game.
 
Last edited:
Status
Not open for further replies.
Back
Top