The PokéCommunity Forums

The PokéCommunity Forums (https://www.pokecommunity.com/index.php)
-   Binary ROM Hacking (https://www.pokecommunity.com/forumdisplay.php?f=284)
-   -   [Archive] Script help thread (https://www.pokecommunity.com/showthread.php?t=120081)

Shadows September 30th, 2008 4:07 PM

Quote:

Originally Posted by Hackimon12 (Post 3989275)
Thanks T
Whats the command for a Fadescreen again?

Fadescreen 0x0, or Fadescreen 0x1(the only ones I've used.)
Check thethethethe's tut for uses for each.

Surf September 30th, 2008 5:37 PM

Whats wrong with this

'-----------------------
#org 0x800D00
msgbox 0x8750000 '"Gah more rain!!!"
callstd 0x6
setweather 0x5
doweather
end


'---------
' Strings
'---------
#org 0x750000
= Gah more rain!!!


when i step on the tile nothing happens

Thrace September 30th, 2008 5:40 PM

Quote:

Originally Posted by Hackimon12 (Post 3989694)
Whats wrong with this

'-----------------------
#org 0x800D00
msgbox 0x8750000 '"Gah more rain!!!"
callstd 0x6
setweather 0x5
doweather
end


'---------
' Strings
'---------
#org 0x750000
= Gah more rain!!!


when i step on the tile nothing happens

On the script tile in Advance Map you must set the var number to 4052 and the first unknown to 0003.

2Scribble September 30th, 2008 8:57 PM

My brother and four little sisters were arguing a few nights ago about which pokemon game they liked the most. Eventually it came down to what you could CATCH and I was inspired to alter Pokemon Emerald (the going favorite) to include all 386 pokemon. So far I've had no trouble getting the pokemon to show up - gotta love AdvanceMap - but the blasted nationaldex data won't show up!

So I go and do a little MORE research and it turns out that without the National Dex the nationaldex data will NEVER show up (I knew this about FR and LG - having been a long-time player, but I'd never bothered with Emerald before now) so I decide to try my hand at scripting.

I've found pleanty of samples and codes to use to make the national dex turn up - but no matter how had I try it won't work. So I decided to make my job SIMPLER by replace a line of text for one character - namely the scientist in Birches lab - so that he gives me the national dex right off. Unfortunately, despite opening it from Advancemap and then attempting to edit it with XSE, no matter what changes I make - it won't let me compile the script.

The tutorials all say, that all I need to do, is create my script, then open the rom file and then compile it - but so far, no matter what I try, it won't make the freakin changes! If I could get Birch to give me the national dex right off I'd settle for that... if I could get that stupid scientist to give me the national dex I'd be a happy camper - HELL, I'd even take it from May. I'm not experienced enough to make my own script but since it won't even save my edits I'm at my whits end...

Could anyone here help?

Thrace September 30th, 2008 10:11 PM

Quote:

Originally Posted by 2Scribble (Post 3990301)
My brother and four little sisters were arguing a few nights ago about which pokemon game they liked the most. Eventually it came down to what you could CATCH and I was inspired to alter Pokemon Emerald (the going favorite) to include all 386 pokemon. So far I've had no trouble getting the pokemon to show up - gotta love AdvanceMap - but the blasted nationaldex data won't show up!

So I go and do a little MORE research and it turns out that without the National Dex the nationaldex data will NEVER show up (I knew this about FR and LG - having been a long-time player, but I'd never bothered with Emerald before now) so I decide to try my hand at scripting.

I've found pleanty of samples and codes to use to make the national dex turn up - but no matter how had I try it won't work. So I decided to make my job SIMPLER by replace a line of text for one character - namely the scientist in Birches lab - so that he gives me the national dex right off. Unfortunately, despite opening it from Advancemap and then attempting to edit it with XSE, no matter what changes I make - it won't let me compile the script.

The tutorials all say, that all I need to do, is create my script, then open the rom file and then compile it - but so far, no matter what I try, it won't make the freakin changes! If I could get Birch to give me the national dex right off I'd settle for that... if I could get that stupid scientist to give me the national dex I'd be a happy camper - HELL, I'd even take it from May. I'm not experienced enough to make my own script but since it won't even save my edits I'm at my whits end...

Could anyone here help?

Theres already a hack for this. Its called Emerald 386, use google to find it. Are you able to compile, does it come up with the log or is it coming up with an error message?

2Scribble September 30th, 2008 10:28 PM

I know there already is (technically speaking there are four '368' hacks for Emerald - none have what I want) I was hoping to learn how to do this myself as I've been stalking around this forum for close onto five years now and have gained a smattering of knowledge that I'd like to put to use.

There is no error message and it comes up with a log

Thrace September 30th, 2008 10:39 PM

Quote:

Originally Posted by 2Scribble (Post 3990438)
I know there already is (technically speaking there are four '368' hacks for Emerald - none have what I want) I was hoping to learn how to do this myself as I've been stalking around this forum for close onto five years now and have gained a smattering of knowledge that I'd like to put to use.

There is no error message and it comes up with a log

The professors script is quite large and there is a possibility that editing it could cause problems in the game. Why not add an NPC? It'd be a really simple script:

Spoiler:
#dynamic 0x800000

#org @start
lock
faceplayer
checkflag 0x1000
if 0x1 goto @done
message @hello
boxset 0x6
special 0x1F3
setflag 0x1000
message @d
boxset 0x6
release
end

#org @done
message @d
boxset 0x6
release
end

#org @d
= There you go! All done!

#org @hello
= Here, let me upgrade your PokeDex!


If you really want to edit it make sure you change the offset of the script you are adding special 0x1f3 to. For example if you had

#org 0x80800000
...
....
end

you would need to make it

#dynamic 0x800000

#org @new
...
special 0x1f3
....
end

Surf September 30th, 2008 10:56 PM

I have problems with this

'-----------------------
#org 0x2E50D7
lock
faceplayer
checkflag 0x455
if 0x1 goto 0x82D8A0C
if 0x0 goto 0x82D8A13
end

'-----------------------
#org 0x2D8A0C
msgbox 0x82DD0F8 '"I can't let you through"
callstd 0x3
release
end

'-----------------------
#org 0x2D8A13
msgbox 0x82D8A21 '"The Prof will see you now."
callstd 0x3
fadescreen 0x1
fadescreen 0x0
hidesprite 0xCEC3
setflag 0x456
release
end

'---------
' Strings
'---------
#org 0x2DD0F8
= I can't let you through

#org 0x2D8A21
= The Prof will see you now.

but when i compile it it goes like this

'-----------------------
#org 0x2E50D7
lock
faceplayer
checkflag 0x455
if 0x1 goto 0x82D8A0C
if 0x0 goto 0x82D8A13
end

'-----------------------
#org 0x2D8A0C
msgbox 0x82DD0F8 '"I can't let you through"
callstd 0xF
nop
compare 0x2D8A 0x908
return

'-----------------------
#org 0x2D8A13
msgbox 0x82D8A21 '"The Prof will see you now."
callstd 0x3
fadescreen 0x1
fadescreen 0x0
hidesprite 0xCEC3


'---------
' Strings
'---------
#org 0x2DD0F8
= I can't let you through

#org 0x2D8A21
= The Prof will see you now.

please help asap

2Scribble September 30th, 2008 10:57 PM

I'll give it a try, creating scrips hasn't been my problem - its getting them to SAVE to the rom that's been difficult.

I've done it just like I was told every time.

1. Make sure the script you want to compile is open in XSE.

2. Go into the "File" menu and click "Open...", select the ROM you want to compile the script into.

3. Then click the Compile button , and that's it. Your script is comiled into your ROM.

But - when I start the rom or look at it from AdvanceMaps - no changes have been made

Thrace September 30th, 2008 11:53 PM

Quote:

Originally Posted by Hackimon12 (Post 3990465)
I have problems with this

'-----------------------
#org 0x2E50D7
lock
faceplayer
checkflag 0x455
if 0x1 goto 0x82D8A0C
checkflag 0x455
if 0x0 goto 0x82D8A13
end

'-----------------------
#org 0x2D8A0C
msgbox 0x82DD0F8 '"I can't let you through"
callstd 0x6
release
end

'-----------------------
#org 0x2D8A13
msgbox 0x82D8A21 '"The Prof will see you now."
callstd 0x6
fadescreen 0x1
fadescreen 0x0
hidesprite 0xCEC3
setflag 0x456
release
end

'---------
' Strings
'---------
#org 0x2DD0F8
= I can't let you through

#org 0x2D8A21
= The Prof will see you now.

but when i compile it it goes like this

'-----------------------
#org 0x2E50D7
lock
faceplayer
checkflag 0x455
if 0x1 goto 0x82D8A0C
if 0x0 goto 0x82D8A13
end

'-----------------------
#org 0x2D8A0C
msgbox 0x82DD0F8 '"I can't let you through"
callstd 0xF
nop
compare 0x2D8A 0x908
return

'-----------------------
#org 0x2D8A13
msgbox 0x82D8A21 '"The Prof will see you now."
callstd 0x3
fadescreen 0x1
fadescreen 0x0
hidesprite 0xCEC3


'---------
' Strings
'---------
#org 0x2DD0F8
= I can't let you through

#org 0x2D8A21
= The Prof will see you now.

please help asap

You can't edit it directly. You need to change those static offsets in to dynamic ones. I've made some changes to the script as well.

Quote:

Originally Posted by 2Scribble (Post 3990470)
I'll give it a try, creating scrips hasn't been my problem - its getting them to SAVE to the rom that's been difficult.

I've done it just like I was told every time.

1. Make sure the script you want to compile is open in XSE.

2. Go into the "File" menu and click "Open...", select the ROM you want to compile the script into.

3. Then click the Compile button , and that's it. Your script is comiled into your ROM.

But - when I start the rom or look at it from AdvanceMaps - no changes have been made

Well, you have to change the script offset for that person too. If you've done that, then the problem could be that you're rom is set to read-only.

Surf October 1st, 2008 12:13 AM

Quote:

Originally Posted by dshayabusa (Post 3990540)
You can't edit it directly. You need to change those static offsets in to dynamic ones. I've made some changes to the script as well.

what are static offsets
and what changes have ou made?

Satoshi Sugimori October 1st, 2008 4:13 AM

Quote:

Originally Posted by Satoshi Sugimori (Post 3982074)
Every script that I compile comes out like this:
http://i128.photobucket.com/albums/p190/Poke-Roy/notgood.png
Does anyone know how to fix it?

I really need an answer to this because I really need it fixed for my hack...:(

Hiche.. October 1st, 2008 4:17 AM

Quote:

Originally Posted by Satoshi Sugimori (Post 3990998)
I really need an answer to this because I really need it fixed for my hack...:(

You tried it like this?

#org $begin
message $sign
boxset 0x3
end

#org $sign
$sign 1 = \v\h01's House

liuyanghejerry October 1st, 2008 4:57 AM

Quote:

Originally Posted by Satoshi Sugimori (Post 3990998)
I really need an answer to this because I really need it fixed for my hack...:(

If your XP isn't an English one,try this before you use any script programs:
1.open Control Panel
2.go to the Language and Regional Options
3.set them to English(US)
4.maybe you should restart your XP
5.now,start your scripting.
By the way,you'd better turn off all the rest programs.


This is what I did when I got that problem.

Satoshi Sugimori October 1st, 2008 11:23 AM

Quote:

Originally Posted by Tamerhaidar (Post 3991004)
You tried it like this?

#org $begin
message $sign
boxset 0x3
end

#org $sign
$sign 1 = \v\h01's House

It's not because of the scripts because I tried it in every way... But thanks anyway..

Quote:

Originally Posted by liuyanghejerry (Post 3991065)
If your XP isn't an English one,try this before you use any script programs:
1.open Control Panel
2.go to the Language and Regional Options
3.set them to English(US)
4.maybe you should restart your XP
5.now,start your scripting.
By the way,you'd better turn off all the rest programs.


This is what I did when I got that problem.

But then my clock will stand on english and I don't only use this computer so the time can't be in english :( (Isn't there any other way to fix it???)

Hiche.. October 1st, 2008 11:23 AM

Satoshi,

Try this:


Spoiler:

#org $start
#raw 0xCA
message $1
boxset 6
#raw 0xCB
release
end

#org $1
$1 1 = /v/h01's House.

-DarK- October 1st, 2008 11:29 AM

Code:

#dynamic 0x800000

#org @start
checkflag 0x861
if b_false goto @hide
checkflag 0x204
if b_true goto @end
setvar 0x5040 0x0
checkflag 0x861
if b_true goto @script
end

#org @hide
hidesprite 0x9
releaseall
end

#org @script
compare 0x5040 0x0
if b_true goto @dex0
compare 0x5040 0x1
if b_true goto @dex1
compare 0x5040 0x2
if b_true goto @dex2
end

#org @dex0
showsprite 0x9
lockall
applymovement 0x9 @move0
waitmovement 0x0
msgbox @upgrade
boxset 0x6
special 0x1F3
fanfare 0x13E
msgbox @got
boxset 0x6
waitfanfare
fadescreen 0x1
hidesprite 0x9
setflag 0x204
fadescreen 0x0
releaseall
end

#org @dex1
showsprite 0x9
lockall
applymovement 0x9 @move1
waitmovement 0x0
msgbox @upgrade
boxset 0x6
special 0x1F3
fanfare 0x13E
msgbox @got
boxset 0x6
waitfanfare
fadescreen 0x1
hidesprite 0x9
setflag 0x204
fadescreen 0x0
releaseall
end

#org @dex2
showsprite 0x9
lockall
applymovement 0x9 @move2
waitmovement 0x0
msgbox @upgrade
boxset 0x6
special 0x1F3
fanfare 0x13E
msgbox @got
boxset 0x6
waitfanfare
fadescreen 0x1
hidesprite 0x9
setflag 0x204
fadescreen 0x0
releaseall
end

#org @end
releaseall
end

#org @move0
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x0A
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x0B
#raw 0xFE

#org @move1
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x0A
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x0B
#raw 0x0B
#raw 0xFE

#org @move2
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x0A
#raw 0x08
#raw 0x08
#raw 0x08
#raw 0x0B
#raw 0x0B
#raw 0x0B
#raw 0x0B
#raw 0xFE

#org @upgrade
= Take this, but don't say anything\nto PROF.BIRCH. He doesn't know that\lI took this prototype NATIONAL DEX\l... ... ...

#org @got
= [player]'s POKéDEX got upgraded.


ROM: Emerald, Usage: Gimme national dex AFTER I got the pokedex from birch... There are 2 problems: 1) the sprite doesn't hide before I get pokedex and 2) script doesn't even work after I get pokedex.. Plz help....

Shadows October 1st, 2008 1:16 PM

What are the specials to activate Dex, National Dex, and PKMN Menu?

Surf October 1st, 2008 1:19 PM

Dex and Pkmn menu are flags
Dex: 0x829
pkmn menu: 0x828

Hiche.. October 1st, 2008 1:26 PM

And National dex in fire red is: special 0x16F
and in Emerald: it's special 0x1F3

Eletj October 1st, 2008 4:48 PM

Can someone tell me whats wrong with this script?
Spoiler:
#Dynamic 0x823322

#org @Main
lock
checkflag 0x1001
if 0x1 goto @done
setflag 0x1001
faceplayer
callstd 0x4
special 0x16F
release
end

#org @done
release
end

Shadows October 1st, 2008 4:52 PM

Quote:

Originally Posted by Eletj (Post 3993004)
Can someone tell me whats wrong with this script?
Spoiler:
#Dynamic 0x823322

#org @Main
lock
checkflag 0x1001
if 0x1 goto @done
setflag 0x1001
faceplayer
callstd 0x4
special 0x16F
release
end

#org @done
release
end

Theres no text...
Heres a script you base it on:
#Dynamic 0x823322

#org @Main
lock
checkflag 0x1001
if 0x1 goto @done
setflag 0x1001
faceplayer
message @1
callstd 0x6

special 0x16F
release
end

#org @done
release
end

#org @1
= Type the text here.

Eletj October 1st, 2008 5:01 PM

Whoops, you're right. Thanks

Symbol October 1st, 2008 5:57 PM

Big time problem
 
Ok I have a big problem.

Whenever I make an Applymovement script, I have to be able to see the character I want to move, On my screen, if the character isnt on my screen, it wont move.

Can someone help me out? I wanna move a character without it having to be on my screen [IN THE GAME]

Everything works, but I cant move my Rival [Hes near the healing mechine in professor oak's lab]

If you cant understand what i am saying: I can move characters that I have view of in my screen in-game, but if I cant see the character, it wont move.



My script

Code:

#org $start
checkflag 0x203
if b_true goto $done
applymovement 0xFF $move
pausemove 0x0
applymovement 0xFF $move2
pause 0x30
message $1
boxset 6
message $2
boxset 6
message $3
boxset 6
applymovement 0x08 $move3
pausemove 0
message $4
boxset 6
#raw 0x53 0x06 0x00
message $5
boxset 6
applymovement 0x08 $move4
pausemove 0
applymovement 0xFF $move5
pausemove 0
playsound 0x133
nop
message $6
boxset 6
applymovement 0xFF $move6
applymovement 0x10 $move6
applymovement 0x08 $move6
pausemove 0
applymovement 0x0B $move7
pausemove 0
applymovement 0x0B $move8
pausemove 0
#raw 0x53 0x05 0x00
applymovement 0x0B $move9
pausemove 0
fadesound 0x12C
nop
#raw 0x53 0x11 0x00
setflag 0x202
release
end

#org $done
release
end

#org $move
#raw 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0x11 0xFE

#org $move2
#raw 0x12 0x11 0x11 0xFE

#org $move3
#raw 0x08 0x0F 0x0F 0x0F 0x0F 0x0F 0x01 0xFE

#org $1
$1 1 =Oak: Hello \v\h01 your finally here.\n Glad you could make it.

#org $2
$2 1 =Oak:As you can see someone has\nalready gotten a starter so there\pare only two left.

#org $3
$3 1 =\v\h06: I'll choose first!

#org $4
$4 1 =\v\h06: I'll take this one

#org $5
$5 1 =Oak: Go get yours \v\h01

#org $move4
#raw 0x02 0xFE

#org $move5
#raw 0x08 0x0F 0x0F 0x09 0x03 0xFE

#org $6
$6 1 =???: Actually, i'll be taking that Pokemon.

#org $move6
#raw 0x62 0xFE

#org $move7
#raw 0x1D 0x20 0x20 0x20 0x20 0x1E 0x20 0x20 0x20 0x20 0xFE

#org $move8
#raw 0x20 0x20 0x01 0xFE

#org $move9
#raw 0x1F 0x1F 0x1D 0x1D 0x1D 0x1D 0x1D 0x1D 0x1D 0x1D 0xFE



destinedjagold October 1st, 2008 7:21 PM

Quote:

Originally Posted by Presents (Post 3993201)
Ok I have a big problem.

Whenever I make an Applymovement script, I have to be able to see the character I want to move, On my screen, if the character isnt on my screen, it wont move.

Can someone help me out? I wanna move a character without it having to be on my screen [IN THE GAME]

Everything works, but I cant move my Rival [Hes near the healing mechine in professor oak's lab]

If you cant understand what i am saying: I can move characters that I have view of in my screen in-game, but if I cant see the character, it wont move.

If the PLAYER's too far away from the person you want to move, it will never move.
If you want a person to move towards the PLAYER, that person should be...

If the person will appear from either right or left, then the person should be 8 tiles away from the PLAYER so the screen won't show him.
If the person will appear from either above or at the bottom, then the person should be 6 tiles away from the PLAYER...

http://i203.photobucket.com/albums/aa154/destinedjagold/LifeofGuardians_01-1.png

The center of the screen is always the PLAYER, so this means, the screen is 15x11 in size.

What I am trying to say is that, put that person 8 tiles away from the PLAYER if he moves in from either left or right, and/or 6 tiles away if he moves from either up or down. ;)


All times are GMT -8. The time now is 2:34 AM.


Like our Facebook Page Follow us on Twitter © 2002 - 2018 The PokéCommunity™, pokecommunity.com.
Pokémon characters and images belong to The Pokémon Company International and Nintendo. This website is in no way affiliated with or endorsed by Nintendo, Creatures, GAMEFREAK, The Pokémon Company or The Pokémon Company International. We just love Pokémon.
All forum styles, their images (unless noted otherwise) and site designs are © 2002 - 2016 The PokéCommunity / PokéCommunity.com.
PokéCommunity™ is a trademark of The PokéCommunity. All rights reserved. Sponsor advertisements do not imply our endorsement of that product or service. User generated content remains the property of its creator.

Acknowledgements
Use of PokéCommunity Assets
vB Optimise by DragonByte Technologies Ltd © 2023.