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

Renegade

Time for real life...
995
Posts
12
Years
Thanks so much, that tutorial helped a lot. I still have a question though.
I was able to successfully compile a movement script, however when the compile buttons was clicked, it generated about 5 codes with names like; @start @done @ move etc, and I was wondering how I am supposed to insert these codes. Am i only supposed to do a specific one, or is there a specific way to add them all?

Those are pointers - here's a tutorial on how to simply insert a script after creating it:

http://www.pokecommunity.com/showthread.php?t=185188

Hope you figure it out!
 
16
Posts
11
Years
  • Seen Aug 1, 2013
So I'm trying to change the script for one of the in-game trades, but I have no clue how these work. I've tried looking for the hexadecimal index numbers of the Pokémon that are normally being traded, but that didn't give me any results. Can anyone help me with changing the Pokémon that are used for these trades or maybe someone has a skeleton for a trade script?
 
72
Posts
12
Years
  • Seen Sep 30, 2017
Ok, I tried to figure it out, but I'm really stumped.

I have this level script:
Code:
'---------------
#org 0x71AC0C
#raw 0x3
#raw pointer 0x880006F
#raw 0x0

'---------------
#org 0x80006F
hidesprite 0x1
setflag 0x300
end

It makes a sprite in the map disappear. However, I want to have that sprite reappear and then walk past me. I want to start easily with making him visible, so I used this script:

Code:
'---------------
#org 0x800607
lock
showsprite 0x1
clearflag 0x300
release
end

However, it didn't work. What's wrong with the second script?
 

Kaith

Hacker of Fire
49
Posts
12
Years
Okay, I've got a pretty long script here, but let me spell out my problem first. Everything seems to work perfectly, except after the command 'msgbox @2 0x6' the sprite for Birch (0x05) becomes hidden. I can't seem to figure out what the problem is so I'm hoping another pair of eyes might be able to help me figure out if the problem lies within my script of if it's elsewhere.

Before Compiling It
Spoiler:


After Compling It
Spoiler:
 

Renegade

Time for real life...
995
Posts
12
Years
I have a question. Hope someone can answer.

I'm having a problem with this script working as a level script:

Code:
#dynamic 0x800000

#org @start
checktrainerflag 0x2B2
if 0x1 goto @go
release
end

#org @go
lockall
pause 0x20
applymovement 0xE @m1
waitmovement 0x0
pause 0x10
applymovement 0xFF @m2
waitmovement 0x0
pause 0x20
message @t1 6
pause 0x20
message @t2 6
pause 0x20
applymovement 0xE @m3
waitmovement 0x0
applymovement 0xFF @m4
waitmovement 0x0
pause 0x20
message @t3 6
pause 0x10
showsprite 0xF
clearflag 0x563
pause 0x10
applymovement 0xFF @m5
waitmovement 0x0
pause 0x10
hidesprite 0xF
setflag 0x563
giveitem 0x175 0x1 MSG_OBTAIN
message @t4 6
pause 0x20
message @t5 6
applymovement 0xE @m6
waitmovement 0x0
hidesprite 0xE
setflag 0x562
setvar 0x5032 0x1
releaseall
end

#org @m6
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0x20
#raw 0xFE

#org @t5
= \c\h01\h02Argh, forget this place!\nUs black suits will NOT give up,\lhear me?!

#org @m5
#raw 0x49
#raw 0x49
#raw 0xFE

#org @t4
= \c\h01\h02That \c\h01\h06DARK DIAMOND\c\h01\h02 is a\nvery powerful object.\pIf only I could collect\nall eight of them...\pThen my boss would be\nso proud of me...

#org @m4
#raw 0x3
#raw 0xFE

#org @m3
#raw 0x2
#raw 0xFE

#org @t3
= \c\h01\h02But you defeated me.\nI can't believe my whole\lcrew of men were defeated\lby a kid...\pArgh, the boss is going\nto be so upset!\pAnyways, take it.\nI'll just find another one.

#org @t2
= \c\h01\h02What happened with my machine...\nWhy did it self-destruct like\lthat?\pI don't understand...

#org @t1
= \c\h01\h08HYPHIS\c\h01\h02: The... The HQ...

#org @m2
#raw 0x1
#raw 0xFE

#org @m1
#raw 0x62
#raw 0xFE

Whenever I step into the map, my game just freezes. I'm not sure why. Any solutions?

Thanks for your time in advanced. :)
 
8
Posts
11
Years
I have a question, don't know whether associated with this thread or not, but...

Is it possible to edit/hack the Intro script in Pokemon Ruby so that rather than choosing you are a boy or girl and insert your name, you get to answer some personality questions or choose where you want to start off and stuff.
 
24
Posts
11
Years
  • Seen Dec 21, 2016
I'm trying to make it so that after I finish a battle, I return back to talking with the NPC, such as when you beat a rival, gym leader, Elite 4 member in a Pokemon match, you would resume talking to them after you win, instead of needing to talk to them again.

I am using PKSV. I'm very new to it so I'm taking parts of generated and example scripts and putting it together.

How can I do this?

Part of the script that's the problem:

msgbox @text-start
callstd MSG_Standard
trainerbattle 0x0 0x068 0x0 @after @defeat
msgbox @win-msg
callstd MSG_NORMAL
 
Last edited:
7
Posts
15
Years
I'm new to this whole thing, I'm just trying to get a basic script down but I can't seem to get it working...

I've followed several guides all that pointed me to the same way I'm doing it but I've noticed a few things.

What I've done -

Code:
#dynamic 0x2DD1DA

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

#org @gary1
= Hey,\nI'm waiting on Gramps...\pI want my new Pokémon already!!

I got the offset from FSF from my ROM, I opened the rom in XSE, compiled it, copied it, put it into the Script offset leaving the $.

What I've noticed is that when I go into the game and talk to the guy I made, it makes the "Beep" sound as if I activated it and started talking, but then it just freezes...

When I look back at the offset in AM the offset is different then the one I put in.. Is that the cause of this problem?

If someone could give me a hand that'd be awesome! I've searched through many videos and tried to look for threads but none seem to be fixing my problem.

Thanks!
 

tajaros

Hi I'm dawg
855
Posts
11
Years
I'm new to this whole thing, I'm just trying to get a basic script down but I can't seem to get it working...

I've followed several guides all that pointed me to the same way I'm doing it but I've noticed a few things.

What I've done -

Code:
#dynamic 0x2DD1DA

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

#org @gary1
= Hey,\nI'm waiting on Gramps...\pI want my new Pokémon already!!

I got the offset from FSF from my ROM, I opened the rom in XSE, compiled it, copied it, put it into the Script offset leaving the $.

What I've noticed is that when I go into the game and talk to the guy I made, it makes the "Beep" sound as if I activated it and started talking, but then it just freezes...

When I look back at the offset in AM the offset is different then the one I put in.. Is that the cause of this problem?

If someone could give me a hand that'd be awesome! I've searched through many videos and tried to look for threads but none seem to be fixing my problem.

Thanks!
Try using #dynamic 0x800000 it's much convenient and has a lot of Free-Space in it... :) It's a much safer. :)
 
7
Posts
15
Years
Try using #dynamic 0x800000 it's much convenient and has a lot of Free-Space in it... :) It's a much safer. :)

Tried changing...

change the offset in the script, compiled into rom, put offset on the script in AM saved and tried again, same thing happens.

GO in game > Talk to script NPC > Beep, Freeze > Close rom > open AM > Offsets different than the one i put in...

Hmmm. Im stumped.

Edit: err, now im going crazy.

I got it to work, not sure what i did, was trying a bunch of stuff.

Moved the script outside of the start house to outside oaks lab, doesn't show up anymore.

I click open script and there's a random script in there that I never made, dont know what it is... but it's huge...
 
Last edited:

tajaros

Hi I'm dawg
855
Posts
11
Years
Tried changing...

change the offset in the script, compiled into rom, put offset on the script in AM saved and tried again, same thing happens.

GO in game > Talk to script NPC > Beep, Freeze > Close rom > open AM > Offsets different than the one i put in...

Hmmm. Im stumped.

Edit: err, now im going crazy.

I got it to work, not sure what i did, was trying a bunch of stuff.

Moved the script outside of the start house to outside oaks lab, doesn't show up anymore.

I click open script and there's a random script in there that I never made, dont know what it is... but it's huge...

By any chance did you put 2 zero's before you type your offset? so if you used #dynamic 0x800000 then the offset that you're going to use in A-map is 00800000. And are you sure you compile it to the Right Rom and copy the offset properly? :/
 
7
Posts
15
Years
By any chance did you put 2 zero's before you type your offset? so if you used #dynamic 0x800000 then the offset that you're going to use in A-map is 00800000. And are you sure you compile it to the Right Rom and copy the offset properly? :/

Oh... If I put an offset in I gotta add 2 0's to the front?

edit: tried putting 2 0's in front, still no luck.
 

Teh Blazer

Divider of Zero
776
Posts
15
Years
Oh... If I put an offset in I gotta add 2 0's to the front?

edit: tried putting 2 0's in front, still no luck.

Why do you do all this stuff for one message box? Wouldn't it just be easier to use "msgbox @1 0x2" instead of all of those commands?
 
21
Posts
11
Years
  • Seen Apr 20, 2013
Hi, I'm trying to get the beep to play when the [!] appears, but it won't work.
Code:
 #dynamic 0x800000  #org @start lockall sound 0x15 applymovement 0x1 @move1 waitmovement 0x0 applymovement 0xFF @move2 waitmovement 0xFF textcolor 0x02 msgbox @talk1 0x4 textcolor 0x03 fanfare 0x13E preparemsg @talk2 waitmsg waitfanfare msgbox @talk3 0x4 closeonkeypress setvar 0x406C 0x1 setflag 0x82F releaseall end  #org @talk1 = [player]!\pYou should put these on before\nyou go on your adventure.  #org @talk2 = [player] received the NEW SHOES\nfrom MOM.  #org @talk3 = [player] switched shoes with the\nNEW SHOES.  #org @move1 #raw 0x62 #raw 0x3 #raw 0xFE  #org @move2 #raw 0x10 #raw 0x12 #raw 0xFE
How do i fix this? Any help is appreciated. Sorry code won't post on multiple lines.
 
4
Posts
11
Years
  • Seen Dec 29, 2016
@Pokepie
I'm trying to make it so that after I finish a battle, I return back to talking with the NPC, such as when you beat a rival, gym leader, Elite 4 member in a Pokemon match, you would resume talking to them after you win, instead of needing to talk to them again.

I am using PKSV. I'm very new to it so I'm taking parts of generated and example scripts and putting it together.

How can I do this?

Part of the script that's the problem:
after trainerbattle, change the first 0x0 to "0x4" (Gym battle) or "0x9" (Special kind of battle that allows you to give them extra messages when you win or lose, then automatically continues the script)
0x4 would be simplest, it's basically a normal battle that automatically continues the script once the battle is over, rather than ending it. The setup for 0x4 is almost identical to 0x0, but 0x9 requires some other syntax that I can't really explain at the moment. You can look that up in most XSE or PKSV tutorials.


NOW FOR MY QUESTION:
NOTE: Reposted from the Simple questions thread, this place seems like a better place for it, even if it is a little hardcore

Game: Pokemon FireRed
Type: HEX/XSE/Pokescript for music
Editor: XSE/PKSV

I've been on these forums awhile, but never posted posted once, hiya!

Anyway, I'm not EXACTLY sure if my question fits this thread, so apologies.
Question:
So far the only way to change what music plays at any given time in FireRed (specifically in battle) is MMX's Music Replacement hex code thing, right?

I'm trying to use it, but I've only been learning hex for about 3 weeks (because relying on tools is for noob hackers).
Here's the main routine, as you can see it's not changed from the one at sfc.pokefans.net
(just go to the lessons page, "Fancy Knowledge #3." I'm not at 15 posts yet and I don't think you would appreciate me gumming up your forum trying to reach 15 before posting this. The site is just there for reference, hopefully all the information needed is in this post)

Spoiler:


And my edited musicloader:
Spoiler:


The game loads perfectly, all music and sounds: check.
however, I have been, as of yet, unable to actually REPLACE any music.
quick example:
Spoiler:

The music values are just there for test, I forgot which is which, I actually created TWO scripts that flops them around.
I'm TRYING to replace basic battle music. What I replace it with isn't important at the moment, I'm testing this in a clean ROM before even daring to attempt it on my hack, which uses an extended music table.
I am not EXACTLY sure what the problem is, but I may have narrowed it down:
a. I'm just using the wrong music values?
b. I'm just using the setvar command wrong? (unlikely imo, setvar isn't that hard)
c. There has been some babble about variable values being the cause of most, if not all problems had with this loader, if that is the case, help me out!
d. I derped up a pointer or something. Very likely.

EDIT:
Ran a quick test, trying to change the overworld music for Pallet, didn't work. Not sure if it's just the map header overriding what I put in, but that leads me to think it might be a problem with the hex or syntax, not the actual music values.

Whatever the problem is, please point me in the right direction for fixing it! (Or if this is the wrong thread, please point me to the right one!)

Thank you so much in advance!
 
Last edited:
8
Posts
11
Years
Okay, so I had this personality setflag checkflag script which does not work properly. The ROM that is used is Pokemon Ruby. I use XSE and put them in the same map. Everytime it goes into the result: ESTJ even though the choices are different.

Results script (I place it at a place where I have finish all the personality tests script):
Spoiler:

Personality test scripts:
EorI
Spoiler:
SorN
Spoiler:
TorF
Spoiler:
JorP
Spoiler:

Thanks in advanced for those who can help me~
 
17
Posts
13
Years
  • Seen Oct 15, 2018
I'm new to this whole thing, I'm just trying to get a basic script down but I can't seem to get it working...

I've followed several guides all that pointed me to the same way I'm doing it but I've noticed a few things.

What I've done -

Code:
#dynamic 0x2DD1DA

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

#org @gary1
= Hey,\nI'm waiting on Gramps...\pI want my new Pokémon already!!

I got the offset from FSF from my ROM, I opened the rom in XSE, compiled it, copied it, put it into the Script offset leaving the $.

What I've noticed is that when I go into the game and talk to the guy I made, it makes the "Beep" sound as if I activated it and started talking, but then it just freezes...

When I look back at the offset in AM the offset is different then the one I put in.. Is that the cause of this problem?

If someone could give me a hand that'd be awesome! I've searched through many videos and tried to look for threads but none seem to be fixing my problem.

Thanks!

Use Dynamic 0x800000, but before you do that could you tell me what version of XSE you're using? In XSE go to help, then about and tell me the numbers at the bottom right of the box that pops up. Ex. v1.0.2
 
78
Posts
11
Years
  • Seen Mar 16, 2014
This(I think) is the wild battle command, as it's name suggests(I ripped this from Moltres' code): setwildbattle 0x91 0x32 0x0. Anyway, I was wondering which of those values next to it decides what Pokemon you are battling, if any of them do. I need to know this stuff because I'm currently unsure of how to set up my own legendary battles.
 

DrFuji

[I]Heiki Hecchara‌‌[/I]
1,691
Posts
14
Years
This(I think) is the wild battle command, as it's name suggests(I ripped this from Moltres' code): setwildbattle 0x91 0x32 0x0. Anyway, I was wondering which of those values next to it decides what Pokemon you are battling, if any of them do. I need to know this stuff because I'm currently unsure of how to set up my own legendary battles.

The setwildbattle command is constructed like this:

setwildbattle 0x[Pokemon number] 0x[Level of Pokemon] 0x[Item held]

All of the values are in HEX so once you convert them into decimal it turns out to be: setwildbattle 145 50 0, or in English, a Moltres (Pokedex number 145) at level 50 with no item attached.

Edit: Actually, Moltres is number 146 or 0x92 in the original script ;P
 
Last edited:
Status
Not open for further replies.
Back
Top