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)
-   -   Other Completely Stumped (https://www.pokecommunity.com/showthread.php?t=419129)

KitsuV March 15th, 2019 7:05 AM

Completely Stumped
 
I was trying to get the hang of editing with XSE and AdvanceMap, and I've run into a few problems right off the bat.

First, when I try to rename FireRed maps, I get an error message saying there isn't space for it, after about 2 or 3 names. Just overwriting names shouldn't take up any noticable amount of free space, and I can't find any reasons for it on here.

Second problem, and a slightly more inconvenient one, I can't seem to get even as simple of a script as talking to an npc into my rom. I was following the video tutorials on the Beginners' Directory, and even though I followed the video word for word, the npc event won't speak. If I really get it wrong, though I still don't know how, trying to talk to the npc freezes my entire game.

Can anyone help out with these? I'm at a loss here, and can't find any solutions

Avara March 15th, 2019 7:14 AM

Quote:

Originally Posted by KitsuV (Post 9993172)
I was trying to get the hang of editing with XSE and AdvanceMap, and I've run into a few problems right off the bat.

First, when I try to rename FireRed maps, I get an error message saying there isn't space for it, after about 2 or 3 names. Just overwriting names shouldn't take up any noticable amount of free space, and I can't find any reasons for it on here.

Second problem, and a slightly more inconvenient one, I can't seem to get even as simple of a script as talking to an npc into my rom. I was following the video tutorials on the Beginners' Directory, and even though I followed the video word for word, the npc event won't speak. If I really get it wrong, though I still don't know how, trying to talk to the npc freezes my entire game.

Can anyone help out with these? I'm at a loss here, and can't find any solutions

When you're renaming the maps, how long are the names? There's a character limit. I can't remember what it is off the top of my head for sure but I think it might be 15 characters maximum. If your new name exceeds this limit that could be what's causing the error, I haven't had that happen to me before though.

I'd never looked at the video series that's stickied in the tutorials section until now but from what I could tell the creator was using the batch compiler feature of XSE, in my experience there's really no need to use that for a single script. Try this way. Failing that if it isn't a compiling issue you could post your script and someone could take a look at it for you to see what the problem is =)

KitsuV March 15th, 2019 7:24 AM

Quote:

Originally Posted by Avara (Post 9993178)
When you're renaming the maps, how long are the names? There's a character limit. I can't remember what it is off the top of my head for sure but I think it might be 15 characters maximum. If your new name exceeds this limit that could be what's causing the error, I haven't had that happen to me before though.

I'd never looked at the video series that's stickied in the tutorials section until now but from what I could tell the creator was using the batch compiler feature of XSE, in my experience there's really no need to use that for a single script. Try this way. Failing that if it isn't a compiling issue you could post your script and someone could take a look at it for you to see what the problem is =)

Thanks for the help! While I can't check at the moment, I don't think any of my names were 15 characters or longer, though I'll be sure to make sure when I get home! As for the scripting, if the batch compiler didn't work, I don't think this method will either. I was still using the right offset, without results, so I think the problem might be somewhere else. And I know it's not a problem with my script, as I used the exact same script used in the video, as a test.

Avara March 15th, 2019 12:04 PM

Quote:

Originally Posted by KitsuV (Post 9993185)
Thanks for the help! While I can't check at the moment, I don't think any of my names were 15 characters or longer, though I'll be sure to make sure when I get home! As for the scripting, if the batch compiler didn't work, I don't think this method will either. I was still using the right offset, without results, so I think the problem might be somewhere else. And I know it's not a problem with my script, as I used the exact same script used in the video, as a test.

No worries! Without being able to see the error/method/exactly what's going on it can be hard to diagnose the problem haha. Let us know how you get on x

KitsuV March 15th, 2019 12:14 PM

Quote:

Originally Posted by Avara (Post 9993274)
No worries! Without being able to see the error/method/exactly what's going on it can be hard to diagnose the problem haha. Let us know how you get on x

Well, I'll be able to check my character counts and my script in an hour or two, so I'll let you know. And the 15 character limit might be wrong, because Ever Grande City has 16, unless I'm spelling it wrong. I'll be sure to check it out!

KitsuV March 15th, 2019 2:05 PM

If it helps, here's the simple script I was testing. I don't think there''s anything wrong with what I'm doing, but it just won't work

#dynamic 0x800000
#org @start
lock
faceplayer
msgbox @talk 0x6
release
end

#org @talk
= Please work

DrFuji March 15th, 2019 6:11 PM

You're probably using XSE v1.0.0 which is incredibly buggy and infamously can't do msgboxes correctly. You can see which version you have by going to 'Help > About' in the program and seeing the number in the bottom right of the new window. Here's a link to XSE v1.1.1 which should be able to compile that script correctly.

KitsuV March 15th, 2019 6:39 PM

Quote:

Originally Posted by DrFuji (Post 9993373)
You're probably using XSE v1.0.0 which is incredibly buggy and infamously can't do msgboxes correctly. You can see which version you have by going to 'Help > About' in the program and seeing the number in the bottom right of the new window. Here's a link to XSE v1.1.1 which should be able to compile that script correctly.

I just checked, and I am using 1.1.1, so it couldn't be that. I've decided to put it off for now, and keep asking for answers while I do all the mapping. Unfortunately, there isn't a clear reason for this problem, so I was thinking I'd get help with the scripting once the maps are mostly done

Ace Trainer Slash March 15th, 2019 7:20 PM

Have you tried putting a line of space between #dynamic 0x800000 and #org @start? I'm not sure if that's needed, but it works for me.

Try set it up like this?

#dynamic 0x800000

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

#org @talk
= Please work.


Hopefully this works out for you. :)

KitsuV March 15th, 2019 8:05 PM

Quote:

Originally Posted by Ace Trainer Slash (Post 9993378)
Have you tried putting a line of space between #dynamic 0x800000 and #org @start? I'm not sure if that's needed, but it works for me.

Try set it up like this?

#dynamic 0x800000

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

#org @talk
= Please work.


Hopefully this works out for you. :)

Unfortunately, I just tested it out, and it froze once again when I tried to speak to the npc. I know events work on my emulator, so I know that's not the problem, but I can't see a single thing that should be going wrong here! I'm starting to wonder if I should just leave scrripting entirely u to someone else, though I would definitely prefer to be able to do it myself:laugh-squinted:

BrandoSheriff March 16th, 2019 12:09 AM

That is a really peculiar problem. I'm not sure what's wrong either. I'm kinda stumped too lol. Without being able to know exactly what is happening, here's a few things I can think of that may help:

~Maybe try using 0x2 instead of 0x6? With 0x6, you don't need the lock, faceplayer, or release commands. Though even if that does anything, it doesn't really solve the main issue.

~How is the rom being loaded in order to compile? Are you compiling it through AdvanceMap or by opening it in XSE?

~I tested the script in question out in a dummy testing rom, and it worked as it should have. Here's my process, in case it differs:
Spoiler:
1.) I opened the rom in XSE
2.) I copy/pasted the script as is, then hit compile, copying the script offset next to @start
3.) I opened the rom in AdvanceMap, and chose a random NPC to give the script to
4.) I pasted the copied offset into where it said "script offset", hit save, and playtested. It worked as intended.

~Which "script" are you using? In AdvanceMap, there are the green script square events that activate upon walking on them, and scripts tied to NPC person events that activate upon interacting with them. The NPC person event is the one that should be used here.

~Did you happen to remove the little "$" in the script offset box in AdvanceMap while putting in your new offset? If you happen to accidentally erase that and save it, the offset changes into a different one.

And that's all I can think of for now. I tried my best to try and diagnose the problem without knowing exactly what's happening, so I hope this helps you in some way!

KitsuV March 16th, 2019 8:52 AM

So I finally got around to trying to compile without the batch compiler, and I noticed that the compile button isn't actually clickable, so I'm starting to think this problem is specifically from XSE, though it shouldn't be giving me problems

To add to that, when I tried using the batch compiler today, it showed "script compiled in 0.** seconds" in the corner, but never brought up the menu that I can copy the offsets from. Any ideas? Because I'm still stumped. I'm gonna try uninstalling XSE and using the link I was given in this thread to reinstall it.
EDIT: It didn't work

Jakob99 March 16th, 2019 10:03 AM

Quote:

Originally Posted by KitsuV (Post 9993578)
So I finally got around to trying to compile without the batch compiler, and I noticed that the compile button isn't actually clickable, so I'm starting to think this problem is specifically from XSE, though it shouldn't be giving me problems

To add to that, when I tried using the batch compiler today, it showed "script compiled in 0.** seconds" in the corner, but never brought up the menu that I can copy the offsets from. Any ideas? Because I'm still stumped. I'm gonna try uninstalling XSE and using the link I was given in this thread to reinstall it.
EDIT: It didn't work

Forget XSE almost entirely. Use PokeScript Editor instead. Just open it up, load your rom, and then from the tools dropdown box, there should be Script Generator. Click that and then click on Person Talking. Unless you are confident, open up XSE, and go to tools and text adjuster. Type in your desired text, convert it, and then copy and paste it into PSE. Go back to the begining of said text and remove the = sign so you don't have it appear in your text. After, click Ok and it will tell you how you would like your text prepared. If you're using an NPC, select person, if using a signpost, select that option. Once done, find the 0x740000 offset and paste it with an offset of your choice from Free Space Finder. Once done, go back to tools and hit compile. Two boxes should appear. One will have the messagebox stuff and the other will have two offsets. Write down the top most offset and paste it in to A-map as something like this 0x00999888. Once done, go to file>Save As and save the code. Load up the rom to make sure it works, and if it does, you can get rid of the script file you saved. Hope that works better than XSE.

Avara March 16th, 2019 10:48 AM

PokeScript is extremely outdated. It's up to you if you want to try it but use at your own risk tbh x

Strange that the compile button isn't clickable? You do mean this one, right?

http://i.imgur.com/LhAyeRP.png

And you're putting the offset here?

http://i.imgur.com/REBXppW.png

And you're not seeing something like this when you compile??

http://i.imgur.com/Z3TCuUX.png

The only other thing I can think of where the compile button might not be clickable/that above screen isn't showing is if your XSE's not hooked up to AdvanceMap which seems unlikely. You can view a person event's script when you double click it in A-map, right?

KitsuV March 16th, 2019 4:16 PM

Quote:

Originally Posted by Avara (Post 9993608)
PokeScript is extremely outdated. It's up to you if you want to try it but use at your own risk tbh x

Strange that the compile button isn't clickable? You do mean this one, right?

http://i.imgur.com/LhAyeRP.png

And you're putting the offset here?

http://i.imgur.com/REBXppW.png

And you're not seeing something like this when you compile??

http://i.imgur.com/Z3TCuUX.png

The only other thing I can think of where the compile button might not be clickable/that above screen isn't showing is if your XSE's not hooked up to AdvanceMap which seems unlikely. You can view a person event's script when you double click it in A-map, right?

Alright, so to answer all of that:

First, yes, that button, and the compile button in the right-click menu. Second, I am putting the offset in that slot. Third, that window used to pop up, but as of today it's stopped. And finally, I can open up an npcs script when I click on them in AdvanceMap, so it is connected.

BrandoSheriff March 16th, 2019 6:10 PM

I guess the things I listed couldn't solve the issue. I honestly can't see what's wrong either. :/

So the compile button isn't working? The only time I've seen the compile button not clickable is when I don't have the rom opened in XSE, or I do have the rom loaded but haven't written anything. And you said you can open scripts just fine in AdvanceMap, so it's not the connection. From that, i assume you're editing scripts through AdvanceMap, right? By double clicking the NPCs and stuff? All I can think of right now is to try doing it outside of AdvanceMap, like the method in the spoiler in my previous comment. If you've already tried, I'm sorry I couldn't help further. I'll continue to think of other reasons it won't work.

KitsuV March 16th, 2019 6:36 PM

Quote:

Originally Posted by Darkrai Lv.1000 (Post 9993764)
I guess the things I listed couldn't solve the issue. I honestly can't see what's wrong either. :/

So the compile button isn't working? The only time I've seen the compile button not clickable is when I don't have the rom opened in XSE, or I do have the rom loaded but haven't written anything. And you said you can open scripts just fine in AdvanceMap, so it's not the connection. From that, i assume you're editing scripts through AdvanceMap, right? By double clicking the NPCs and stuff? All I can think of right now is to try doing it outside of AdvanceMap, like the method in the spoiler in my previous comment. If you've already tried, I'm sorry I couldn't help further. I'll continue to think of other reasons it won't work.

I haven't actually tried to edit through Advance Map, since I noticed the problem while just trying to get a script into the game, and not actually scripting anything important. I didn't actually realize that's what you meant in your original post, so I didn't actually address that. I'm sure if I tried that, it would probably work better, but that doesn't help for when I have to script something new, which will be a large chunk of what I'll need:laugh-squinted: I'll probably edit some scripts, but mostly I intend on making my own, since it works better for what I have planned.

Avara March 16th, 2019 7:07 PM

Quote:

Originally Posted by KitsuV (Post 9993777)
I haven't actually tried to edit through Advance Map, since I noticed the problem while just trying to get a script into the game, and not actually scripting anything important. I didn't actually realize that's what you meant in your original post, so I didn't actually address that. I'm sure if I tried that, it would probably work better, but that doesn't help for when I have to script something new, which will be a large chunk of what I'll need:laugh-squinted: I'll probably edit some scripts, but mostly I intend on making my own, since it works better for what I have planned.

If you can open NPC scripts through A-Map try overwriting what's there with your own script (#dynamic 0x800000 etc) and then compiling that. Using #dynamic means it'll automatically search for free space from the offset you specify.

Also never edit existing scripts, always make your own - the former causes issues more often than not x

KitsuV March 16th, 2019 7:18 PM

Quote:

Originally Posted by Avara (Post 9993791)
If you can open NPC scripts through A-Map try overwriting what's there with your own script (#dynamic 0x800000 etc) and then compiling that. Using #dynamic means it'll automatically search for free space from the offset you specify.

Also never edit existing scripts, always make your own - the former causes issues more often than not x

I thought as much, which is another reason why I didn't intend on really doing it:laugh-squinted:

So I apparently fixed the compile button, though I don't know how. When testing it out though, the npc I put in didn't even show up. I hope that this is an easier problem to fix, though once again there shouldn't have been any problems with my script

Alright, just gonna give a bit more information, because I want to be able to start scripting soon, I'm sick of mapping empty maps. So when I try to put my script on an npc, and then try to open my script through Advance Map, I just get a jumble of commands that I really don't think should be there, doing stuff like checking my inventory and such. So maybe that has something to do with the problem

Here's what I got when I checked in my latest test

'---------------
#org 0x1E880
bufferitem 0x0 0x1880
bufferitem 0x78 0x4680
comparevars 0x234A 0x148
braille 0x43482058
bufferdecoration 0x18 0x1C08
compare 0x30 0x1578
comparebanktobyte 0x40 0x45
call 0x221C08D0
checksound
nop
braille 0xD10A4540
comparebanktobyte 0x4C 0x21
closeonkeypress
gotostd 0x1

So I feel like something is very wrong here

DrFuji March 16th, 2019 10:14 PM

Quote:

Originally Posted by KitsuV (Post 9993793)
Here's what I got when I checked in my latest test

'---------------
#org 0x1E880
[...]

So I feel like something is very wrong here

That offset is incredibly wrong. Since you're using the #dynamic command, your script should be trying to find free space from offset 0x800000 onwards, but you're pulling a random section of data from near the beginning of the ROM. You either accidentally deleted a number or didn't copy the entire offset when you were pasting it into AdvanceMap.

Even though you said you had XSE v1.1.1, just try downloading the version from my earlier post anyway as I can guarantee that one works correctly. Also, if you aren't doing so already, you need to exit/ reenter the map whenever you're testing scripts. This will reload everything and actualize any changes that you've made to NPCs.

If you ever lose the pop-up window that appears after you compile, just click the notepad icon near the compile button.

BrandoSheriff March 16th, 2019 10:19 PM

Quote:

Originally Posted by KitsuV (Post 9993819)
Here's what I got when I checked in my latest test

'---------------
#org 0x1E880
bufferitem 0x0 0x1880
bufferitem 0x78 0x4680
comparevars 0x234A 0x148
braille 0x43482058
bufferdecoration 0x18 0x1C08
compare 0x30 0x1578
comparebanktobyte 0x40 0x45
call 0x221C08D0
checksound
nop
braille 0xD10A4540
comparebanktobyte 0x4C 0x21
closeonkeypress
gotostd 0x1

So I feel like something is very wrong here

Just for future reference, what was the offset you intended to place your test script at that resulted in the above script? I may know what's happening. I mentioned it earlier though I wasn't too sure, but is it possible you removed the $ in AdvanceMap's script offset box when inputting your script's offset in? Doing so does change the offset into a different one. I'm sure it isn't 0x1E880, as that one exists in the actual game.

This can also tie into the other issue where the NPC didn't show up, as the offset may have changed into one with a script where said NPC is hidden until some flag is set/cleared.

KitsuV March 16th, 2019 10:22 PM

Quote:

Originally Posted by DrFuji (Post 9993837)
That offset is incredibly wrong. Since you're using the #dynamic command, your script should be trying to find free space from offset 0x800000 onwards, but you're pulling a random section of data from near the beginning of the ROM. You either accidentally deleted a number or didn't copy the entire offset when you were pasting it into AdvanceMap.

Even though you said you had XSE v1.1.1, just try downloading the version from my earlier post anyway as I can guarantee that one works correctly. Also, if you aren't doing so already, you need to exit/ reenter the map whenever you're testing scripts. This will reload everything and actualize any changes that you've made to NPCs.

If you ever lose the pop-up window that appears after you compile, just click the notepad icon near the compile button.

I know I pasted the right offset, because I checked a few times to be sure, but I'll check again to be safe. And yeah, I usually do, but sometimes I do forget and just hit the save button before trying. I'll try once more tonight, and if it doesn't work I'll try again in the morning

KitsuV March 16th, 2019 10:24 PM

Quote:

Originally Posted by Darkrai Lv.1000 (Post 9993839)
Just for future reference, what was the offset you intended to place your test script at that resulted in the above script? I may know what's happening. I mentioned it earlier though I wasn't too sure, but is it possible you removed the $ in AdvanceMap's script offset box when inputting your script's offset in? Doing so does change the offset into a different one. I'm sure it isn't 0x1E880, as that one exists in the actual game.

This can also tie into the other issue where the NPC didn't show up, as the offset may have changed into one with a script where said NPC is hidden until some flag is set/cleared.

I don't remember what offset it was, I pasted the @talk offset I was given from compiling. And I know I didn't delete the $ because I've been very careful not to

KitsuV March 16th, 2019 10:34 PM

Okay! So big update on this problem! I was very careful to copy and past the right offset into Advance Map, but when I opened the script, it was wrong again. So I manually entered the offset myself, and when I opened it it worked perfectly! Had some troubles saving so I could test it when I tried to use a brand new npc, but when I replaced an existing npcs offset with my own, I actually got the right dialogue for once! Finally I can make this game actually playable

BrandoSheriff March 16th, 2019 11:07 PM

Quote:

Originally Posted by KitsuV (Post 9993843)
Okay! So big update on this problem! I was very careful to copy and past the right offset into Advance Map, but when I opened the script, it was wrong again. So I manually entered the offset myself, and when I opened it it worked perfectly! Had some troubles saving so I could test it when I tried to use a brand new npc, but when I replaced an existing npcs offset with my own, I actually got the right dialogue for once! Finally I can make this game actually playable

Glad you finally got it working! When in doubt, manual does the trick lol.

To answer the previous comment, pasting the @talk offset would result in getting the wrong script. It's the @start offset you want.

KitsuV March 16th, 2019 11:12 PM

Quote:

Originally Posted by Darkrai Lv.1000 (Post 9993847)
Glad you finally got it working! When in doubt, manual does the trick lol.

To answer the previous comment, pasting the @talk offset would result in getting the wrong script. It's the @start offset you want.

That's what I meant. I have been trying to use the @start offset, I just typed talk for some reason. And if I can get an answer quickly, is it safe to edit my own scripts after putting them in game? The text I put in is a little choppy, and I don't want to have to insert a brand new script

BrandoSheriff March 17th, 2019 12:47 AM

Quote:

Originally Posted by KitsuV (Post 9993848)
That's what I meant. I have been trying to use the @start offset, I just typed talk for some reason. And if I can get an answer quickly, is it safe to edit my own scripts after putting them in game? The text I put in is a little choppy, and I don't want to have to insert a brand new script

I can't really give a clear answer on that one myself. I think it should be fine if you're doing like minor text touch-ups and there's enough free space after the script to accommodate for it. I personally wouldn't recommend editing existing scripts tho, but I believe it'll ask for repointing if it's needed. Not too sure however.

It's kinda weird, but what I usually do if I mess up a script is go to its location in the rom using a hex editor and... just delete it by replacing it with free space. I fix the script in question and recompile it in the same location it originally was. That way I don't have to edit the offset in AdvanceMap or keep having to revert back to my previous backup.

Oh yeah, backups are your friend. I'd recommend making one every time a script is successfully inserted and works as intended.

Ace Trainer Slash March 17th, 2019 2:25 AM

Wait, have you tried using a clean ROM of what you're hacking? Maybe that might be the issue. If not, try doing scripting on an untouched ROM and see if the problems still persist.

If the problems are still present, I have no idea how to solve your issue, sorry.

Anyways, I hope you get that scripting issue solved soon. :)

KitsuV March 17th, 2019 8:56 AM

Quote:

Originally Posted by Ace Trainer Slash (Post 9993896)
Wait, have you tried using a clean ROM of what you're hacking? Maybe that might be the issue. If not, try doing scripting on an untouched ROM and see if the problems still persist.

If the problems are still present, I have no idea how to solve your issue, sorry.

Anyways, I hope you get that scripting issue solved soon. :)

I always use a clean ROM when I'm testing, because I don't want to mess up the one I'm working on lmao. And thankfully, I finally managed to fix the problem at about 2 am last night! So now I can finally get to work on making this playable! Of course, I still have problems, but they're easy problems like having the wrong hex codes, or missing a command, so those I can solve alone, usually.

Ace Trainer Slash March 17th, 2019 1:52 PM

Quote:

Originally Posted by KitsuV (Post 9994014)
I always use a clean ROM when I'm testing, because I don't want to mess up the one I'm working on lmao. And thankfully, I finally managed to fix the problem at about 2 am last night! So now I can finally get to work on making this playable! Of course, I still have problems, but they're easy problems like having the wrong hex codes, or missing a command, so those I can solve alone, usually.

Oh, awesome, I'm glad your issue was resolved! :)


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