• Just a reminder that providing specifics on, sharing links to, or naming websites where ROMs can be accessed is against the rules. If your post has any of this information it will be removed.
  • Ever thought it'd be cool to have your art, writing, or challenge runs featured on PokéCommunity? Click here for info - we'd love to spotlight your work!
  • 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] Appearing sprite levelscript issue

Captain W'Kos

Geevee La Forge
  • 29
    Posts
    3
    Years
    Hi!
    Can someone can tell me, what I made wrong with this level script? I want to make that sprite is appearing while player got a Pokemon and every time, when player is entering the map afterwards.

    #org 0x88007C4
    compare 0x4055 0x4
    if >= jump 0x88007D0
    end

    #org 0x88007D0
    reappear 0x5
    end

    The script trigger is "On entering the map/not menu is closing."

    The sprite is just not appearing on the map.
     
    Last edited:
    @Captain W'Kos

    These aren't even XSE commands? Not sure what you're trying to do exactly, but you should probably set a variable or a flag which should be checked in a level script. I recommend taking Anthroyd's Gen III ROM Hacking Video Tutorials on Youtube to get an understanding of some of the basics of scripting. That will probably help you further;)
     
    I am using PKSV Script Editor bcause it's clear to me. I'm trying to make a new starting town in Kanto and I have scripted person that stops the player when he is trying to leave the town. After he got a starter Pokemon the person stands near the town entrance. And I'm trying to make the levelscript is checking if player got starter Pokemon (variable 4055 is in 4 or larger) then the person sprite appears. If not, he not appears.

    About tutorials, I am watching this guy, but I think, his XSE commands are outdated or something, bcause they're different than in-game or compiler scripts, for example #dynamic than #dyn.
    I know, #dyn is only for automatic assign code to memory cells, and it isn't saving in code, but this is only example.

    Edit: I have modified the script for working in opposite way, I mean, if variable 4055 is smaller than 4 it makes sprite disappear. It still not working like the game is skipping the compare command or the variable isn't smaller than 4 (but it is, bcause variable in that situation is set to 0)

    Anyway, the script is now:
    #dyn 0x800000
    #org @start
    compare 0x4055 0x4
    if < jump @no
    end

    #org @no
    disappear 0x5
    end

    The levelscript trigger is still on entering map/not on menu close.
     
    Last edited:
    @Captain W'Kos

    About tutorials, I am watching this guy, but I think, his XSE commands are outdated or something, bcause they're different than in-game or compiler scripts, for example #dynamic than #dyn.
    I know, #dyn is only for automatic assign code to memory cells, and it isn't saving in code, but this is only example.

    Yes, XSE is probably outdated, but PKSV is even more outdated. Really, you should switch to XSE. It's the standard that is used in the community for binary hacking. That it's different than ''in-game'' or ''compiler'' scripts is just nonsense. It probably just has different names for certain commands than PKSV does.

    #dyn 0x800000
    #org @start
    compare 0x4055 0x4
    if < jump @no
    end

    #org @no
    disappear 0x5
    end

    This is not how you hide a sprite (semi-)permanently. I'm not familiar with the ''disappear''-command in PKSV, but it's probably the ''hidesprite''-command (entry 0x53) in XSE. That command is only used in an instant script activation to temporarily hide a certain sprite. To hide a sprite (semi-)permanently, you need to assign a flag to an event sprite and set the flag in a script. If you have no idea what I'm talking about, check out Anthroyd's tutorials I mentioned earlier.
     
    Really, you should switch to XSE.

    OK, but there's a little problem here: I am doing everything on the phone and the XSE is crashing when I am launching it by ExaGear. But I'll try to make it work, maybe it needs additional program or something...

    And I have a question: Did you know how to decompile addresses that are used by commands? For example special 0x9D and I want to decompile 0x9D address, check how it's made and make a copy with different values. Everything is in my another post "Forcing starter Pokemon gender. And some other issues".
     
    Last edited:
    OK, I am on the PC...
    I have compiled the levelscript with that hidesprite command.
    It's still not working.

    #org 0x80084C
    compare 0x4055 0x4
    if 0x0 jump 0x88005CC
    end


    #org 0x8005CC
    hidesprite 0x5
    end

    And are there somewhere a list of equation codes? Belive me, < tells me a little bit more than 0x0...

    I have tried it with spriteinvisible, but the effect is still the same...

    Tried to split the script into compare and set flag and script with trigger 02 that just executes the hidesprite. I didn't even believe that this thing would work. And it didn't.

    script1, trigger 03:

    #org 0x80084C
    compare 0x4055 0x4
    if 0x0 goto 0x88005CC
    end

    #org 0x8005CC
    setflag 0x11
    end

    Script2, trigger 02:

    #org 0x80085B
    spriteinvisible 0x5 0x43 0x0
    release
    end
     
    Last edited:
    @Captain W'Kos

    Read my last post again. I explicitly told you that this would not work. You need to assign a flag to the overworld sprite and set that flag to make the sprite disappear. Take a look at Anthroyd's tutorials, specifically the one about flags and variables. Although it's probably a good idea to take them all.
     
    Something like this?
    This is what I deduced from the tutorial...
    Or maybe I am too dumb...

    '---------------
    #org 0x80084C
    hidesprite 0x5
    setflag 0x11
    compare 0x4055 0x4
    if 0x0 jump 0x8005CC
    end

    '---------------
    #org 0x8005CC
    clearflag 0x0011
    end


    Yeah, I'm dumb... It's not working.
     
    Last edited:
    This is not how you hide a sprite (semi-)permanently. I'm not familiar with the ''disappear''-command in PKSV, but it's probably the ''hidesprite''-command (entry 0x53) in XSE. That command is only used in an instant script activation to temporarily hide a certain sprite. To hide a sprite (semi-)permanently, you need to assign a flag to an event sprite and set the flag in a script. If you have no idea what I'm talking about, check out Anthroyd's tutorials I mentioned earlier.

    How to assign the flag to sprite?

    Nevermind, I have found a similar post...
    https://www.pokecommunity.com/showthread.php?p=9915945
     
    Back
    Top