• Our software update is now concluded. You will need to reset your password to log in. In order to do this, you will have to click "Log in" in the top right corner and then "Forgot your password?".
  • Welcome to PokéCommunity! Register now and join one of the best fan communities on the 'net to talk Pokémon and more! We are not affiliated with The Pokémon Company or Nintendo.

[Script] NPC Won't Respond

3
Posts
2
Years
    • Seen Sep 15, 2021
    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):
    #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:
    #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:

    #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 😭
     
    3
    Posts
    2
    Years
    • Seen Aug 5, 2022
    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.)
     
    3
    Posts
    2
    Years
    • Seen Sep 15, 2021
    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
     
    3
    Posts
    2
    Years
    • Seen Aug 5, 2022
    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.
     
    3
    Posts
    2
    Years
    • Seen Sep 15, 2021
    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:

    '---------------
    #org 0x71D669

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

    Mahian23

    Behold my Supreme Power!
    523
    Posts
    4
    Years
  • 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

    Uwao
    237
    Posts
    3
    Years
    • Seen Apr 13, 2024
    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.
     
    Last edited:
    Back
    Top