Script Help Thread (DO NOT REQUEST SCRIPTS) Page 286

Started by HackMew December 20th, 2008 5:10 AM
  • 625717 views
  • 9682 replies
Seen August 2nd, 2012
Posted August 2nd, 2012
2 posts
10.8 Years
Hello everyone, I am a newcomer and a newbe rom hacker. I will be very happy if anyone could help me with my trouble. My problem could be a hard one but, if anyone has done similar thing(s) before, please tell me how to do it.

Basically, I am trying to hack the pokemon black2(or black, since the move information are basically the same) to make the move "Petal Dance" a non-continuous move(you can choose another move next turn).

The move information for Petal Dance in pokemon black is stored in address 06FBB2F4 (Posted on a Japanese website). Similar to that in those GBA versions, the power, PP, accuracy, special effect code .etc come one after another. I tried to copy the exact same special effect of the move "confusion" to replace the special effect of the original "Petal Dance" but it did not work. Enemy pokemon got confused sometimes but unlike those GBA versions in which the original effect will disappear completely, the "2-3 turn continuous" effect of it was still there.

There must be some other place that stores the special effect of "Petal Dance", "Outrage" and "Thrash", and there must be a place that stores the "move pointers" that specify the offset of the move information, special effects and their graphics.(As in those GBA versions)

I have been searching the hex codes for several days and could not find any similar code as in those GBA versions. My brain is almost dead now.

If anyone has experience of investigating moves or has experience of finding offsets or addresses in DS versions, please help me!
If anyone knows the address which has the special effect of those 3 moves or the address of those orignal pointers, please tell me!

This is a pretty long reply and thank you for reading it. I really need help.
Male
Seen October 25th, 2022
Posted January 5th, 2015
4 posts
10.8 Years
Hey there!
Listen i need help with my script, because every time i walked into this script in the rom the game is getting frozen.

Game: FR\LF
Script type: Scrpit (the box with the S in the advance map).

The code:
#dynamic 0x34F046
#org @start
checkflag 0x1000
if 0x1 goto @done
setflag 0x1000
lock
msgbox @msg1 0x6

applymovement 0xFF @wtf
waitmovement 0xFF

applymovement 0x6 @move
waitmovement 0x6

faceplayer
msgbox @msg2 0x6

givepokemon 0x93 0x7 0x0 0x0 0x0 0x0
msgbox @msg3 0x6

applymovement 0x6 @goaway
waitmovement 0x6

release
end

#org @msg1
=\v\h01, WAIT!!!

#org @wtf
#raw 0x0
#raw 0x63
#raw 0xFE

#org @move
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0x13
#raw 0xFE

#org @msg2
= Hey listen, before you go there I\nwant to give you a present for a\lgood luck.\l... ... ... ...\lI know your mother, she was my\lfriend in high school\land when she told me you might\lcome here\lI knew i have to come here and\lgive you my favorite pokemon.\lThis pokemon I raised for 2 years\land now i want him to be yours.\lI'm trust you to give him the\lmost devoted care you can give.\lGood luck son!

#org @msg3
=\v\h01! GOT DRATINI!

#org @goaway
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0xFE

#org @done
release
end
Could you help me please?
If there's nothing wrong in the script so maybe i didn't do something in the AdvanceMap.
Thank you very much!

NarutoActor

The rocks cry out to me

Age 29
Female
Brooklyn/Marlboro
Seen April 2nd, 2016
Posted March 22nd, 2016
1,974 posts
14.4 Years
First make sure you have a var in the var box, and that it is an unused var.
i.e 40E7
Also try using a lower flag that is unused, like 300
Hope this fixes your problem
PS. I removed the spaces, switched the flag, and relocated the lock command.

#dynamic 0x700000
#org @start
lock
checkflag 0x300
if 0x1 goto @done 
setflag 0x300
msgbox @msg1 0x6  
applymovement 0xFF @wtf 
waitmovement 0x0  
applymovement 0x6 @move 
waitmovement 0x0  
faceplayer
msgbox @msg2 0x6  
givepokemon 0x93 0x7 0x0 0x0 0x0 0x0 
msgbox @msg3 0x6  
applymovement 0x6 @goaway 
waitmovement 0x0  
release 
end
~There are those people who understand hex, F the rest
Male
Seen October 25th, 2022
Posted January 5th, 2015
4 posts
10.8 Years
First make sure you have a var in the var box, and that it is an unused var.
i.e 40E7
Also try using a lower flag that is unused, like 300
Hope this fixes your problem
PS. I removed the spaces, switched the flag, and relocated the lock command.

#dynamic 0x700000
#org @start
lock
checkflag 0x300
if 0x1 goto @done 
setflag 0x300
msgbox @msg1 0x6  
applymovement 0xFF @wtf 
waitmovement 0x0  
applymovement 0x6 @move 
waitmovement 0x0  
faceplayer
msgbox @msg2 0x6  
givepokemon 0x93 0x7 0x0 0x0 0x0 0x0 
msgbox @msg3 0x6  
applymovement 0x6 @goaway 
waitmovement 0x0  
release 
end
This is my script var values (nothing...)

unknown: 0000
var number: 0000
var value: 0000
uknown: 00|00
Male
Seen December 15th, 2012
Posted August 4th, 2012
2 posts
10.8 Years
ok this is my first post ever :)

my script is:

#dynamix 0x800000
#org @start
lock
faceplayer
msgbox @talk1 0x6
release
end

#org @talk1
= hi.

anyways, (dont know how to do spoiler sorry)
when i try to compile this it says"unknown keyword lock" @line 3. i don't know how to fix it either.

and a side note, when i load up my XSE it tells me that my command database is not found and i can't figure out for the life of me why!

anyway any help would be grately appreciated and i thank anybody in advance
connor

Renegade

Time for real life...

Male
United States
Seen January 8th, 2015
Posted December 31st, 2014
995 posts
11.5 Years
ok this is my first post ever :)

my script is:

#dynamix 0x800000
#org @start
lock
faceplayer
msgbox @talk1 0x6
release
end

#org @talk1
= hi.

anyways, (dont know how to do spoiler sorry)
when i try to compile this it says"unknown keyword lock" @line 3. i don't know how to fix it either.

and a side note, when i load up my XSE it tells me that my command database is not found and i can't figure out for the life of me why!

anyway any help would be grately appreciated and i thank anybody in advance
connor
Your #dynamix 0x800000 should be #dynamic 0x800000. Also, what version of XSE do you have?

NarutoActor

The rocks cry out to me

Age 29
Female
Brooklyn/Marlboro
Seen April 2nd, 2016
Posted March 22nd, 2016
1,974 posts
14.4 Years
This is my script var values (nothing...)

unknown: 0000
var number: 0000
var value: 0000
uknown: 00|00
Try:
unknown: 0000
var number: 4059
var value: 0000
uknown: 00|00

If that doesn't work try setting var 0x4059 to 0x0 in a different script.
~There are those people who understand hex, F the rest
Male
Carracosta Rock, Akmin Region
Seen May 14th, 2015
Posted July 10th, 2014
43 posts
11.3 Years
Hi guys. I made a simple trainer battle script where if the trainer sees you, he walks up to you and battles you. (POKEMON RUBY, XSE)

Spoiler:

#dynamic 0x6B0C6E

#org @start
trainerbattle 0x0 0x2B7 0x0 @before @after
msgbox @beaten 0x6
release
end

#org @before
= Do you got my money?

#org @after
= [blue_rs]is my special color

#org @beaten
= good job.


However, the moment he walks up to you, the game imediately goes to the title screen without saving your game. (you know, the title screen that says PRESS START) I'm not sure what I did wrong. Also if it helps:

Spoiler:
I am using Advance map 1.95. In the "TRAINER $00" box I put "TRAINER $01" and the "VIEW RADIUS $0000" box I put "VIEW RADIUS $0006"
Please help good people of pokecommunity :)
Age 31
Male
Uxbridge
Seen February 18th, 2021
Posted April 9th, 2020
124 posts
11.6 Years
Hi guys. I made a simple trainer battle script where if the trainer sees you, he walks up to you and battles you. (POKEMON RUBY, XSE)

Spoiler:

#dynamic 0x6B0C6E

#org @start
trainerbattle 0x0 0x2B7 0x0 @before @after
msgbox @beaten 0x6
release
end

#org @before
= Do you got my money?

#org @after
= [blue_rs]is my special color

#org @beaten
= good job.


However, the moment he walks up to you, the game imediately goes to the title screen without saving your game. (you know, the title screen that says PRESS START) I'm not sure what I did wrong. Also if it helps:

Spoiler:
I am using Advance map 1.95. In the "TRAINER $00" box I put "TRAINER $01" and the "VIEW RADIUS $0000" box I put "VIEW RADIUS $0006"
Please help good people of pokecommunity :)
From looking at it, I could only guess that it could be to do with the dynamic offset.
Try not to use any dynamic offsets lower then #dynamic 0x800000.
It could possibly be that the dynamic offset is interfering with another offset that is causing the game to restart.

Apart from that, I don't know. I'm a bit rusty at PokeHacking :P
Currently working on a new Pokemon Hack with an in-depth story line!
That's about as much as you're going to get for now...


Male
Carracosta Rock, Akmin Region
Seen May 14th, 2015
Posted July 10th, 2014
43 posts
11.3 Years
Pokemon Ruby
XSE
"Script Box"

I made a weather script, but whenever I step on it, nothing happens. I set my Var Number + Unknown the correct way, but I'm still not sure why nothing happens. Please help pokecommunity :)

Spoiler:

#dynamic 0x800C47

#org @start
setweather 0x03
doweather
release
end


just in case, I took the extra "0" out in a copy of the script, and it still didn't work.

Spoiler:

#dynamic 0x800C37

#org @start
setweather 0x3
doweather
release
end
Age 31
Male
Uxbridge
Seen February 18th, 2021
Posted April 9th, 2020
124 posts
11.6 Years
Pokemon Ruby
XSE
"Script Box"

I made a weather script, but whenever I step on it, nothing happens. I set my Var Number + Unknown the correct way, but I'm still not sure why nothing happens. Please help pokecommunity :)

Spoiler:

#dynamic 0x800C47

#org @start
setweather 0x03
doweather
release
end


just in case, I took the extra "0" out in a copy of the script, and it still didn't work.

Spoiler:

#dynamic 0x800C37

#org @start
setweather 0x3
doweather
release
end
If I remember correctly, I do believe you need to use setflag in a weather script.
So try this:
Spoiler:

#dynamic 0x800C37

#org @start
setweather 0x3
doweather
setflag 0x200 (If you haven't used 200, If you have, just use 201+)
release
end
Currently working on a new Pokemon Hack with an in-depth story line!
That's about as much as you're going to get for now...


Male
Seen December 15th, 2012
Posted August 4th, 2012
2 posts
10.8 Years
ok so i've been scripting for about 10 days (literally) and i've come up with a few questions i just can't figure out. so i thought i'll ask them here and hopefully get some answers!

A) what does altering the var number on tile scripts do? (the ones you walk on)
B) my givepokemon scripts won't work and i don't know why [not asking for one] here mine is
[spoiler]

#dynamic 0x800000
#org @start

lock
faceplayer
msgbox @talk 0x6
pause 0x1
givepokemon 0x1 0x5 0x0 0x0 0x0 0x0
release
end

#org @talk
= here, take this

[neither will my give item scripts, but my additem ones do.]

when doing flags, my events happen again if i go through a warp and then come back.
i assume it has something to do with the 0x828 flag. but i don't know what that even means!

anyway any help is appreciated!
-connor

okay me again.

i tryed makign a script (complicated for me).

it's ment to: talk to them, ask a yes/no question. yes goes to a fight and then they move. no ends the script.

problems: atm i doesn't work at all, i think LASTRESULT isn't even a command.?????



anyways here the script. appreciate it if you could point out what's wrong and how i can fix it? thanks.



#dynamic 0x800000
#org @start

checkflag 0x200
if 0x1 goto @done
faceplayer
msgbox @talk1 0x6
pause 0x1
message @talk2 0x5
callstd 1
if 0x1 goto @fight
else goto @no
end

#org @done
lock
faceplayer
msgbox @talk3 0x6
release
end




#org @talk1
= Hello there, i am stood here\nrecruiting for the new breeders\lguild that is opening.\pTo join you must prove your woth as\na POKEMON trainer and beat me in a\lshort battle.

#org @talk2
= Do you wish to join?

#org @talk3
= You may continue down this road,\nthen speak to my partner.

#org @talk4
= Go on, just down the road.

#org @fight
faceplayer
trainerbattle 0x0 0x02 0x0 @challenge @defeat
pause 0x1
applymovement 0x4 @move
waitmovement 0x4
msgbox @talk4 0x6
setflag 0x200
end


#org @no
end

#org @challenge
= Are you ready?

#org @defeat
= This was good, and you have\ndisplayed your worth as a trainer.\pI'm sure you'll be an asset to the\nguild.

#org @move
#raw 0x12
#raw 0x12
#raw 0x12
#raw 0x13
#raw 0xFE


-connor
Male
MI
Seen June 29th, 2014
Posted August 9th, 2013
16 posts
11.7 Years
Can someone please tell me what's wrong with my script? I'm trying to make this person give me the running shoes. Everything seems to work fine until I actually try to use the running shoes, which I then find out that I don't have it (or it doesn't work).

GAME: FR/LG
TYPE: setflag/giveitem
EDITOR: POKESCRIPT

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

#org $script
lock
faceplayer
checkflag 0x1202
if 0x01 goto $done
message $talk
$talk 1 = Hi \v\h01! You've gotten\nso tall.\pAnyway, I have a gift for you!
boxset 6
fanfare 0x13E
setflag 0x82F
message $recieve
$recieve 1 = You recieved the RUNNING SHOES!
boxset 4
waitfanfare
#raw 0x68
setflag 0x1201
message $cya
$cya 1 = Good luck on your journey!
boxset 6
setflag 0x1202
release
end

#org $done
message $bye
$bye 1 = Make sure you visit your\nmother from time to time.
boxset 6
release
end
Male
Seen December 4th, 2012
Posted December 4th, 2012
6 posts
10.9 Years
Hello, im brand new to scripting, and having trouble making a script box work in Pokemon Ruby. I've looked at many tutorial, but so far, nothing has worked. I am using PokéScript, and would appreciate any help. So here is the script:

#org $start
jingle
movesprite 0x03 0x09 0x08
message $ok
$ok 1 = Testing
boxset 6
apply movement 3 $move
$move 1 ; #binary 0x05 0x17 0x04 0x06 0x09 0x07 0xFE
pausemove 0
setvar 0x6000 0x0001
release
end
Male
MI
Seen June 29th, 2014
Posted August 9th, 2013
16 posts
11.7 Years
Okay, so I'm using Pokescript, and apparently the 0x82F command doesn't work!

I even tried going super basic:

#org $script
lock
faceplayer
message $talk
$talk 1 = Here's your stuff.
boxset 6
setflag 0x82F
release
end

This did not work either. Someone please help me!

0x82F is to get the RUNNING SHOES.
Male
Seen February 22nd, 2023
Posted January 28th, 2020
32 posts
12.2 Years
A) what does altering the var number on tile scripts do? (the ones you walk on)
The var numbers for scripts on map tiles give those scripts unique identities. It's been my experience that some scripts don't like to run if they don't have a variable assigned to them (but I'm probably doing something wrong).
With a var number assigned to the script, you can "turn off" the script simple by assigning a different value to that variable in a script.
That is, a good way to ensure that a script only runs once (even after warping back into an area) is to include a line such as "setvar 0x5000 (or whatever your scripts assigned var is) 0x1"

As far as your other concerns, just by looking at your scripts I can't say for sure; however I can say that you do not need the "pause" line at all.
Setting flag 0x828 may or may not be the problem; it's the flag which enables the "Pokemon" section on the Start menu.

anyways here the script. appreciate it if you could point out what's wrong and how i can fix it? thanks.

checkflag 0x200
if 0x1 goto @done
faceplayer
msgbox @talk1 0x6
pause 0x1
message @talk2 0x5
callstd 1
if 0x1 goto @fight
else goto @no
end
I don't know that it's necessary, but put "lock" and "faceplayer" at the very beginning of script; there's no need for them anywhere else after, usually.

You entered "message" rather than "msgbox" before @talk2.
Instead of callstd 1, put in "compare LASTRESULT 0x1"; LASTRESULT is not a command, it's a variable where data is temporarily stored. In this case, the answer to the yes/no question.

Also, it looks like you assigned flag 0x200 to this fight/dialogue; make sure you have the script set that flag at some point, if you want it recognize that the fight has already occurred.
Male
Seen June 25th, 2017
Posted August 13th, 2012
7 posts
10.8 Years
SOLVED

Game: Fire Red (US9
Type: Level
Editor: XSE
The problem is it actually works, but only once, and I want it to keep happening until I set the flag.
Script:
Spoiler:
'---------------
#org 0x71A5E0
#raw 0x2
#raw pointer 0x871A5E6
#raw 0x0

'---------------
#org 0x71A5E6
#raw word 0x4051
#raw word 0x0
#raw pointer 0x8800262
#raw word 0x0

'---------------
#org 0x800262
checkflag 0x1002
if 0x1 goto 0x8800294
applymovement 0xB 0x8800297
waitmovement 0x0
msgbox 0x880029B MSG_FACE '"You can't be here!!"
applymovement 0xB 0x88002B1
setvar 0x4051 0x1
clearflag 0x1002
warp 0x3 0x0 0x2 0x0 0x0
release
end

'---------------
#org 0x800294
release
end


'---------
' Strings
'---------
#org 0x80029B
= You can't be here!!


'-----------
' Movements
'-----------
#org 0x800297
#raw 0x4 'Face Down (Faster)
#raw 0x62 'Exclamation Mark (!)
#raw 0xFE 'End of Movements

#org 0x8002B1
#raw 0x1D 'Step Down (Fast)
#raw 0xFE 'End of Movements
If it looks like a duck, walks like a duck, and quacks like a duck, it's an Alpha Legionnaire in disguise.
Male
Seen January 8th, 2017
Posted March 13th, 2014
154 posts
11 Years
So, I recently messed up my rom by deleting scripts and flags that were important, and someone on here told me that most people when they hack roms dont even delete the scripts and flags from the actual memory, they just take them off the map and add their own, I only deleted them because I didnt think there would b enough room for all my scripts, which leads me to my question:
If I don't use any of the flags that are already in the game, is it possible tomake my own flags and use those? How woudl I do that?
Also, how will I know when there isn't enough memory in my rom while making new scripted events?

NG55

Male
Barrie, Ontario, Canada
Seen January 12th, 2023
Posted February 22nd, 2022
88 posts
13.6 Years
Pokemon FireRed At the beginning of the game when you choose a Pokemon and your rival chooses as well; I need to change that so the Player goes and gets two eggs from different aides and then the rival goes to a third aide and gets his one egg. I need that to work out so that Oak let's you leave. If deleting the battle is going to screw something up please tell me.

I also need to know how to make a signpost script

tajaros

Hi I'm dawg

Age 24
Male
Philippines
Seen August 7th, 2015
Posted April 15th, 2013
855 posts
11.1 Years
Game: Fire Red (US9
Type: Level
Editor: XSE
The problem is it actually works, but only once, and I want it to keep happening until I set the flag.
Script:
Spoiler:
'---------------
#org 0x71A5E0
#raw 0x2
#raw pointer 0x871A5E6
#raw 0x0

'---------------
#org 0x71A5E6
#raw word 0x4051
#raw word 0x0
#raw pointer 0x8800262
#raw word 0x0

'---------------
#org 0x800262
checkflag 0x1002
if 0x1 goto 0x8800294
applymovement 0xB 0x8800297
waitmovement 0x0
msgbox 0x880029B MSG_FACE '"You can't be here!!"
applymovement 0xB 0x88002B1
setvar 0x4051 0x1
clearflag 0x1002
warp 0x3 0x0 0x2 0x0 0x0
release
end

'---------------
#org 0x800294
release
end


'---------
' Strings
'---------
#org 0x80029B
= You can't be here!!


'-----------
' Movements
'-----------
#org 0x800297
#raw 0x4 'Face Down (Faster)
#raw 0x62 'Exclamation Mark (!)
#raw 0xFE 'End of Movements

#org 0x8002B1
#raw 0x1D 'Step Down (Fast)
#raw 0xFE 'End of Movements
You have to input a setvar command, use it so the event won't happen again, and again... xD

Use the setvar you use in the map script... :) And put it in the end of the script... :)

miksy91

Dark Energy is back in action! ;)

Male
Finland
Seen September 21st, 2022
Posted September 21st, 2022
1,480 posts
14.6 Years
So, I recently messed up my rom by deleting scripts and flags that were important, and someone on here told me that most people when they hack roms dont even delete the scripts and flags from the actual memory, they just take them off the map and add their own, I only deleted them because I didnt think there would b enough room for all my scripts, which leads me to my question:
If I don't use any of the flags that are already in the game, is it possible tomake my own flags and use those? How woudl I do that?
Also, how will I know when there isn't enough memory in my rom while making new scripted events?
Most people here rely on tools for checking where there is memory for the events you include or not. All pokemon roms have a lot of free space in them (even Emerald and 1st and 2nd gen games which I believe you're not looking an answer for). I personally delete most of the original events when I make those of my own but I'm a 2nd gen hacker and if you're going to go with FireRed for instance, you don't have to do this.

You can't make your own flags because flags are actually bits of memory in GBA's ram. Basically, someone has probably told you data consists of 0's and 1's. Well, when a flag is unset, a certain part of memory is 0 and when that flag is set, that part of memory turns into 1. Where there is free space in ram memory, lots of 0's (in hexadecimal, shown as 00), you can make your flags set bits (value of bit - 0/1) in there.

This probably felt a bit confusing and I know I wouldn't have understood a thing about it 2 years ago myself but still, this is how it goes. There are ought to be some unused flag bits around which you can use for unused ram memory (as explained above, contains lots of 00's of which values do not change during the gameplay). I believe there is a list of flag bits you can safely use in Research & Development section but that's only a belief (as I've seen a thread related to flags not a long time ago).
Pokémon Dark Energy
Some ROM hacking related stuff

Satoshi Ookami

Memento Mori

Age 30
Male
Abyss of Time, Great Seal
Seen August 5th, 2018
Posted July 3rd, 2018
14,253 posts
14.8 Years


You have to input a setvar command, use it so the event won't happen again, and again... xD

Use the setvar you use in the map script... :) And put it in the end of the script... :)
I think that's precisly what he doesn't want.
Since he wants script to happen over and over until the flag is set, setting the variable would be killing his wish =D
ROM hacking FAQ - Read before asking how to play a hack.

Anime List | PSN Trophy List

tajaros

Hi I'm dawg

Age 24
Male
Philippines
Seen August 7th, 2015
Posted April 15th, 2013
855 posts
11.1 Years

I think that's precisly what he doesn't want.
Since he wants script to happen over and over until the flag is set, setting the variable would be killing his wish =D
Oh, sorry I thought he said that it happens all over again and he/she doesn't want that to happen...

NG55

Male
Barrie, Ontario, Canada
Seen January 12th, 2023
Posted February 22nd, 2022
88 posts
13.6 Years
Pokemon FireRed
At the beginning of the game when you choose a Pokemon and your rival chooses as well; I need to change that so the Player goes and gets two eggs from different aides and then the rival goes to a third aide and gets his one egg. I need that to work out so that Oak let's you leave. If deleting the battle is going to screw something up please tell me.
And I also need to know how to make a signpost script