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)
-   -   Script Warp Script Issue (https://www.pokecommunity.com/showthread.php?t=462217)

evangraham December 14th, 2021 5:47 PM

Warp Script Issue
 
2 Attachment(s)
I'm trying to get this warp to send me to a specific tile on another map and I can get it to send me using just basic X Y coordinates like 0x0 0x0 or 0x1 0x1 but when I try to set the exact tile it is either seemingly way off or giving me black screen.

More details if needed - map I'm trying to get to is the ferry port in Slateport City, in front of it as if you just got off the boat, for example.

What am I not understanding about this warp script? Also tried "warpmuted" before and same results. TIA for any help!

Asith December 14th, 2021 10:12 PM

1) Why don't you want to use exact coordinates? Figuring out the exact coordinates of your "tile" and using those is a valid solution, if I'm understanding correctly.

2) Your screenshot is you attempting to not use coordinates? In that case, it's not right. Having that 0xFF parameter in there is exactly what tells the game that you're using basic xy coordinates. If you don't want to do that, get rid of that byte.

This is the other commonly used warp command:
Code:

warp 0x[Map Bank] 0x[Map Number] 0x[Warp Number] 0x0 0x0


As you can see, it doesn't use the 0xFF byte. As you can also see, however, it is used to go to warps specifically, not just any tile. Afaik, the only way to go to any tile is to use coordinates.

evangraham December 15th, 2021 4:21 AM

Problem is though, when I go to change the coordinates part of the script to 0x7 0x10 (assuming that's in front of the boat) I just get black screened. I figure I'm misunderstanding the coordinates, but I'm not sure.

ScripNewbie December 15th, 2021 6:01 AM

Quote:

Originally Posted by evangraham (Post 10441442)
Problem is though, when I go to change the coordinates part of the script to 0x7 0x10 (assuming that's in front of the boat) I just get black screened. I figure I'm misunderstanding the coordinates, but I'm not sure.

Can i see what is your script?

When im writing warp command my script is:

Spoiler:
darkenroom 0x10 (for smooth transition)
warpmuted (or any type of warp) 0x[bank]
0x[map]
0x[FF/PLAYER]or[coordinates]
if coordinate:
Code:

0x[x]
0x[y]


then follow it by 3 nop0
for clean warp then waitspecial and end.

PKSV EXAMPLE:
Code:

darkenroom 0x10
warpmuted 0x4 0x1 0xFF 0x4 0x6
nop0
nop0
nop0
waitspecial
end


XSE EXAMPLE:
Code:

darken 0x10
warpmuted 0x4 0x1 0xFF 0x4 0x6
nop
nop
nop
waitstate
end




I use it when working in my hack but i didn't encounter a problem in warp scripting when im using this method.

Ps. Sorry for bad english

evangraham December 15th, 2021 12:32 PM

1 Attachment(s)
Sure I've attached the script with the exact coordinates I'm trying to use. This gives me black screen.

ScripNewbie December 15th, 2021 7:47 PM

Try my suggestion.
If it didn't work then i will say something that might be the problem

Spoiler:
1. Put your script in free space,
What i see in your script is it's located in 23D3F0, it's so crowded of number in there i advice you put your script in something more spacy, like 800000, 900000.

2. Don't compile the file, many times.
I mean if you compile a file and something is wrong in there or you didn't like what you write in your script but you already compile it, change your script to your liking but don't compile it again.. You need to hex edit it. Go to the offset where you put your unlovable script and erase it, so that when you compile your recreated script it's clean and it will function the way that you want it..

3. Tips for compiling a script is
Example of script
PKSV:
Code:

#dyn 0x800000
#org @1
lock
faceplayer
message @2
callstd msg_normal
release
end

#org @2
= Not BAQ \v\h01


As you can see there is a mistake, the BAQ, you want to change it,
then change it.
#org @2
= Not BAD \v\h01
(Don't compile it yet)
But what if you delete your file or you didn't save it but you want to still edit the mistake, then open your script in your rom, it will be:
PKSV:
Code:

#org 0x8800001
lock
faceplayer
msgbox 0x8800008
callstd msg_normal
release
end

#org 0x8800008
= Not BAQ \v\h01


Change it to look like what you want and change all the pointer to @
Code:

#dyn 0x800000
#org @1
lock
faceplayer
message @2
callstd msg_normal
release
end

#org @2
= Not BAD \v\h01


Now you change it, and you want to compile it now, but first goto where you put your script in your rom, that's 800000. (If you put it in free space you can navigate your script fast and clean.)
Code:

YOUR FIRST SCRIPT:
800000      FC AB 67 10 00 00 80 08
800010      FF FF FF FF FF FF FF FF
800020      FF FF FF FF FF FF FF FF


Clean it, fill it with FF so it will be free space again. Then compile your script again.
Code:

YOUR FIRST SCRIPT:
800000      FF FF FF FF FF FF FF FF
800010      FF FF FF FF FF FF FF FF
800020      FF FF FF FF FF FF FF FF


This method is important because if you didn't clean your rom before recompiling, it will add some rubbish offset and number and will make your script not clean and not functioning well, it will take a lot space too.
I recommend you if you want to write your next script, make a space to edit the other.
Example in hex:
Code:

YOUR FIRST SCRIPT:
800000      FC AB 67 10 00 00 80 08
800010      FF FF FF FF FF FF FF FF
800020      FF FF FF FF FF FF FF FF


Put your next script in 800020 for you to freely edit the your first script if something you want to change.

Code:

#dyn 0x800020 //always change dyn for clean compiling and never worry about @
#org @1
lock
faceplayer
message @2
callstd msg_normal
release
end

#org @2
= 2nd Script


3. Don't place your setflag after warp, after the warp the script below the warp script will be rubbish and just going to make your script big, put your script before warp.

XSE:
Code:

Setflag 0x8AB
darken 0x10
warp 0x9 0x9 0xFF 0x8 0x7
nop
nop
nop
waitstate
end




If all of that is not the problem, then the problem is the map where you want to teleport to.

Asith December 16th, 2021 1:12 PM

Quote:

Originally Posted by evangraham (Post 10441597)
Sure I've attached the script with the exact coordinates I'm trying to use. This gives me black screen.

Your coordinates/map is definitely wrong. 0x9 0x9 would mean map 9.9, which is a small map that certainly doesn't have room for a 0x10 y coordinate. Remember that you're working in hexadecimal, not decimal. By 0x7 0x10 you probably actually meant to use 0x7 0xA.


All times are GMT -8. The time now is 9:20 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.