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 NPC Won't Respond (https://www.pokecommunity.com/showthread.php?t=458404)

JustPollux September 13th, 2021 5:08 PM

NPC Won't Respond
 
Hi there,

I'm brand new to ROM hacking and have learned how to do basic dialogue in XSE and map editing in AM 1.92. I'm working in Fire Red right now. Today, I tried to learn how to do the "givepokemon" command, but for some reason, whatever NPC I put it on, they just... stop responding? I'll go up to them and hit A, and they don't move or anything. Everyone else is working fine, except the NPC I want giving the Pokemon. I don't think it's a problem with the script that I wrote, as I've copied and pasted directly from tutorials I've been looking at, and it yields the same results.

The only thing I can think of is that I took away Prof. Oak stopping the player from leaving Pallet, and that somewhere in his dialogue, he triggers a flag that allows you to get a Pokemon-- one other than 0x828, because I've tested that one, too.

These are the scripts I've put in so far:

My own, which I have done ~8 or 9 variations of that haven't worked (0x2, no 0x828 flag mention, no setvar, etc):
Quote:

#dynamic 0x71D572

#org @givepokemon
lock
faceplayer
setflag 0x828
checkflag 0x100
if 0x0 goto @give
msgbox @2 0x6
release
end

#org @give
msgbox @1 0x6
setvar 0x5000 0x85
givepokemon 0x5000 0x5 0x44 0x0 0x0 0x0
setflag 0x100
end

#org @1
= We have too many Eevee! Please\ntake one off of our hands!

#org @2
= How is that Eevee doing? Are you\ntaking good care of it?
1st Tutorial one I tried, from here:
Quote:

#dynamic 0x800000
#org @givepokemon
checkflag 0x100
if 0x0 goto @give
msgbox @2 0x2
end

#org @give
msgbox @1 0x2
givepokemon 0x7B 0x5 0x44 0x0 0x0 0x0
setflag 0x100
end

#org @1
= Please take care of my SCYTHER for\nme.

#org @2
= How is my Scyther doing [player]?
2nd, from the XSE Guide:

Quote:

#dynamic 0x800000

#org @start
checkflag 0x1019
if 0x1 call @nomore
givepokemon 0x19 0x5 0x0 0x0 0x0 0x0
setflag 0x1019
end

#org @nomore
msgbox @msg 0x2
end

#org @msg
= Sorry, no more Pikachus :P
If anyone knows how I can fix this, I'd really appreciate the help. My brain is melting trying to figure this out 😭

Cameo5958 September 13th, 2021 8:03 PM

I believe the problem may be with the NPC's configuration. Just to be sure, can you tell us all the different configurations on the NPC?

(It's the info that pops up when you select the NPC in AdvanceMap.)

JustPollux September 14th, 2021 11:53 AM

Yeah! The top bit is set to Person event, No. 6, and then under the delete event is Person event no. 7 (which none of the other person event numbers have matched up, either). Picture number is 26, and then everything except for Position and script offset is set to 0's. His movement type is Look Down

Cameo5958 September 14th, 2021 2:06 PM

Anything that looks down should (ideally) have movement 11. You should try changing that.

Also, there may be a chance that the "Talking Level" is wrong. Maybe check if the "talking level" and the movement permission of the tile that you stand on are correct.

JustPollux September 14th, 2021 3:38 PM

Quote:

Originally Posted by Cameo5958 (Post 10406472)
Anything that looks down should (ideally) have movement 11. You should try changing that.

Also, there may be a chance that the "Talking Level" is wrong. Maybe check if the "talking level" and the movement permission of the tile that you stand on are correct.

Ok so I tried both, and neither worked... But, I noticed that when I click on the script for that NPC, this is all that comes up:

Quote:

'---------------
#org 0x71D669
I've tried it with multiple scripts, now, and they just... don't compile?

Mahian23 September 15th, 2021 2:31 AM

Did you put the correct offset on the NPC?Can you make a video or atleast some screenshots so we can learn your actual problem and solve it. and did you put the var value correctly in A-Map?I don't think you're using a safe var number!

Asith September 15th, 2021 12:08 PM

Quote:

Originally Posted by JustPollux (Post 10406501)
Ok so I tried both, and neither worked... But, I noticed that when I click on the script for that NPC, this is all that comes up:

I've tried it with multiple scripts, now, and they just... don't compile?

1) Write a script in XSE
2) Press compile
3) XSE gives a dialog box on successful completion, with offsets for all your dynamic (@) labels. Copy the first one (just press the "copy" button right there in the dialog box)
4) Paste that offset into the NPC script offset box in advance map and hit save.

If the NPC script is still empty when you open it like you showed above, then there's a mismatch between what XSE is doing and what AMap is doing. It may seem stupid, but please make sure that both programs are accessing the same ROM. It's an easy mistake to have one accidentally be opening a backup or different ROM copy.


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