• 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!
  • Our weekly protagonist poll is now up! Vote for your favorite Conquest protagonist in the poll by clicking here.
  • 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.

A Few Problems with Trading and Surfing

Nickalooose

--------------------
  • 1,309
    Posts
    17
    Years
    • Seen Dec 28, 2023
    This is something I've never done before so, I'm assuming I make a new thread for this... If not, explain where and I'll do that next time haha.

    I'm using the "new years" Essentials.

    So far, I've come across some dodgy things with adding Pokémon and trading, if you set no nickname, the Pokémon has no name at all...

    Code:
    pbStartTrade(pbGet(1),
    PBSpecies::PIKACHU,
    "","Bob"
    )
    Leaves PIKACHU's name as blank, Nevertheless, I fixed this myself, now, adding a foreign Pokémon on the other hand, I'm having more trouble with, reading the wiki (which explains nothing in all fairness), using;

    Code:
    $Trainer.party[$Trainer.party.length-1](
    poke.makeShiny,
    poke.status=1,
    poke.statusCount=3
    )
    Gives an error...
    Spoiler:


    Code:
    $Trainer.party[$Trainer.party.length-1](
    poke.makeShiny,
    poke.status=1
    )
    Also gives an error...
    Spoiler:



    Code:
    $Trainer.party[$Trainer.party.length-1](
    poke.makeShiny
    )
    Gives the same error...
    Spoiler:



    Code:
    $Trainer.party[$Trainer.party.length-1]
    Does nothing (obviously)...

    But upon checking the newly added Pokémon VIA Pokémon menu, the name is blank, IF, no nickname is given... I'm having trouble fixing this one!
    Code:
    pbAddForeignPokemon(PBSpecies::PIKACHU,32,_I("Bob"),_I([B][COLOR=SeaGreen]""[/COLOR][/B]),[B][COLOR=Red]1[/COLOR][/B])
    There are a couple problems with this, as you see in GREEN, PIKACHU should have no nickname and as you see in RED, PIKACHU should be female...
    Spoiler:


    Adding new lines within the adding foreign Pokémon script section, causes errors like, undefined method shiny or item and so on...

    Is there any fixes for this yet? Or even any ideas, I'll try anything once.

    This is such a stupid problem, but it is a problem and I cannot solve this myself...

    Another problem I found...

    Surfing, you cannot walk on water, true, you cannot swim on land, true...

    But if you choose to surf, as long as and autotile is surfable, despite it being underneath a non surfable tile, you can surf on it...
    Spoiler:


    I figure this is the, player facing tile, script, is not checking if the tile is a land tile and/or is skipping the land tile because it found a surfable tile... the reason I have come across this error is because the illusion of under water paths, needs the autotile to seem as though it continues under ground, but if I stop the water at land, it will have the grass edges as you can see in the pictures...

    Any solutions?

    These problems are bugging me to where I've stopp progress on my game to attempt to fix, but after everything I tried, I give up, maybe someone here has a fix. Thanks for reading.
     
    here's the script error fix:
    the red is where you went wrong
    Code:
    [COLOR="Red"]poke=[/COLOR]$Trainer.party[$Trainer.party.length-1](
    poke.makeShiny,
    poke.status=1,
    poke.statusCount=3
    )

    for the trade:

    Code:
    [COLOR="red"]x=PBSpecies::PIKACHU[/COLOR]
    pbStartTrade(pbGet(1),
    [COLOR="Red"]x[/COLOR],
    "",[COLOR="red"]PBSpecies.getName(x)[/COLOR]
    )
     
    Trading
    It is assumed that all traded Pokémon will have nicknames. However, if you don't want the received Pokémon to have a nickname, you can use the following

    Code:
    poke=PBSpecies::PIKACHU
    pbStartTrade(pbGet(1),poke,PBSpecies.getName(poke),_I("Dave"))
    Technically that sets the nickname to be the same as the species name, which isn't the whole solution (it just makes the trade scene look right). Immediately after the trade is done, use the following line to remove the nickname completely:
    Code:
    $Trainer.party[pbGet(1)].name=nil
    Adding a foreign Pokémon
    pbAddForeignPokemon only sets a couple of details about the Pokémon (species, level and nickname), and you need to edit the rest of them (gender, ribbons, etc.) afterwards.

    Code:
    pbAddForeignPokemon(PBSpecies::PIKACHU,32,_I("Bob"),[COLOR=Red]nil[/COLOR],[COLOR=Green]1[/COLOR])
    pbAddForeignPokemon(PBSpecies::PIKACHU,32,_I("Bob"))
    The red nil means no nickname. The green number is not the gender of the Pokémon, but the gender of the Original Trainer (Bob) - is 0 (male) if not defined. If it's a male Original Trainer, you can just use the second version instead.

    Since the new Pokémon will (should) go at the end of the player's party, it's easy to find and therefore edit. Use something like the following:

    Code:
    poke=$Trainer.party[$Trainer.party.length-1]
    [COLOR=Red]poke.setGender(true)[/COLOR]
    poke.makeShiny
    poke.status=1
    Note the lack of commas. The red line is how you make the Pokémon female.


    Surfing on land
    If the problem is because there is a surfable autotile beneath the path, I suggest you remove it. If you hold down Shift while erasing the under-path water tiles, it won't affect the "bending". Alternatively, you can double-click an autotile and choose which tile to place (top left tile is the regular placing again), so you can pick the corners and just pop them down without needing to tile past them just to get the corners.
     
    here's the script error fix:
    the red is where you went wrong
    Code:
    [COLOR=Red]poke=[/COLOR]$Trainer.party[$Trainer.party.length-1](
    poke.makeShiny,
    poke.status=1,
    poke.statusCount=3
    )
    for the trade:

    Code:
    [COLOR=red]x=PBSpecies::PIKACHU[/COLOR]
    pbStartTrade(pbGet(1),
    [COLOR=Red]x[/COLOR],
    "",[COLOR=red]PBSpecies.getName(x)[/COLOR]
    )

    Thanks for your reply, it was a simple mistake, but I thought I never put poke=blahblahblah before, but thanks for your reply.

    Trading
    It is assumed that all traded Pokémon will have nicknames. However, if you don't want the received Pokémon to have a nickname, you can use the following

    Code:
    poke=PBSpecies::PIKACHU
    pbStartTrade(pbGet(1),poke,PBSpecies.getName(poke),_I("Dave"))
    Technically that sets the nickname to be the same as the species name, which isn't the whole solution (it just makes the trade scene look right). Immediately after the trade is done, use the following line to remove the nickname completely:
    Code:
    $Trainer.party[pbGet(1)].name=nil
    Adding a foreign Pokémon
    pbAddForeignPokemon only sets a couple of details about the Pokémon (species, level and nickname), and you need to edit the rest of them (gender, ribbons, etc.) afterwards.

    Code:
    pbAddForeignPokemon(PBSpecies::PIKACHU,32,_I("Bob"),[COLOR=Red]nil[/COLOR],[COLOR=Green]1[/COLOR])
    pbAddForeignPokemon(PBSpecies::PIKACHU,32,_I("Bob"))
    The red nil means no nickname. The green number is not the gender of the Pokémon, but the gender of the Original Trainer (Bob) - is 0 (male) if not defined. If it's a male Original Trainer, you can just use the second version instead.

    Since the new Pokémon will (should) go at the end of the player's party, it's easy to find and therefore edit. Use something like the following:

    Code:
    poke=$Trainer.party[$Trainer.party.length-1]
    [COLOR=Red]poke.setGender(true)[/COLOR]
    poke.makeShiny
    poke.status=1
    Note the lack of commas. The red line is how you make the Pokémon female.


    Surfing on land
    If the problem is because there is a surfable autotile beneath the path, I suggest you remove it. If you hold down Shift while erasing the under-path water tiles, it won't affect the "bending". Alternatively, you can double-click an autotile and choose which tile to place (top left tile is the regular placing again), so you can pick the corners and just pop them down without needing to tile past them just to get the corners.

    Problem,
    poke.setGender seems a little broken somehow, (not really)
    poke.setGender(true) returns the Pokémon to become male...
    poke.setGender(false) returns the Pokémon female...
    Not sure if this is from and update or it is my Essentials, this isn't really a problem, will just have to reverse the true/false thing, that is all, just thought I'd let you know.

    EDIT: I lied, poke.setGender actually does nothing... So this comment was irrelavent! It was just ironic, that all the times I tried, PIKACHU was male, but when I switched to false, PIKACHU was female.

    EDIT... AGAIN: I read up about shininess, and read that making a Pokémon shiny, re-calculates stats... Turns out, it re-does the gender too! So, setGender, and anything else should be changed after makeShiny.

    Everything else on the other hand is perfect, quick question on the nicknames thing, so if I use:
    Code:
    $Trainer.party[pbGet(1)].name=nil
    If PIKACHU evolves, the name will then be RAICHU, right? I used debug to find this, but I'm assuming that debug mode will automactically change PIKACHU to RAICHU nickname or not, because I can only change species!

    The surfing problem, I never even knew I could double click an autotile, learn something new everyday, so thanks for the information on that, still have a lot to learn clearly.
     
    Last edited:
    Actually, changing gender/nature will undo the effect of makeShiny, because all three things depend on the same number (the personal ID) which is changed when you change any of those factors. Technically there is a chance that a shiny Pokémon will remain shiny after changing its gender, but that's as rare as getting a shiny Pokémon in the first place. I'll be coming up with an easier way around this mess soon.

    Setting a value (such as the Pokémon's name) to nil removes it. Since Pikachu no longer has a name, it simply uses the name of whatever species it happens to be (i.e. Pikachu, or Raichu after you use a Thunderstone). The debug options will not affect nicknames, so if you turn a Geodude called Bob into a Mew, it will still be called Bob - the only thing that the debug option "Change species" does is change the species.

    I only found out about the double-clicking an autotile thing recently, so I'm still learning things too!
     
    Oh okay, I never checked to see if Shiny remained after I switched the order of makeShiny and setGender, but, changing the Pokémon to female deffinitly didn't work when it was before makeShiny, but, it worked when in order #2... If you do come up with an easier way, I would be ever so greatful :classic:. X
     
    Surfing on land
    If the problem is because there is a surfable autotile beneath the path, I suggest you remove it. If you hold down Shift while erasing the under-path water tiles, it won't affect the "bending". Alternatively, you can double-click an autotile and choose which tile to place (top left tile is the regular placing again), so you can pick the corners and just pop them down without needing to tile past them just to get the corners.

    I never, NEVER knew that.. Wow, that's useful!

    Also, about the surfing... Try using the nuetral terrain tag (13) on all your grass/path tiles. Tiles with a Terrain Tag are ignored by essentials due to the fact that any water tile on a layer below 3 will always have another tile of it... Essentials sees 0 as "Ignore me". Using 13 will fix your problem entirely.
     
    Back
    Top