• 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.

[Scripting Question] pbSetSeen/Owned

153
Posts
4
Years
    • Seen Feb 4, 2020
    Hello everyone,

    I would like to use another dynamic for collection in my game. Let's say in addition to the capture of wild pokemons it would be possible to collect informations about trees.

    I think the easiest way is to add a regional pokedex which has only trees in it and add trees in the pokemon.txt file but then I need to understand how to add info to this pokedex without fighting trees.

    I found the pbSetSeen/Owned functions but they never work...

    How can I use them in an event to add the seen/owned data to the new dex?
    I tried them with existing pokes like pbSetSeen(RAICHU) but they say unitialized constant...

    Many thanks in advance!
     
    Last edited:
    1,403
    Posts
    10
    Years
    • Seen Apr 29, 2024
    I don't know about the rest of your question, but I think you want pbSetSeen(:RAICHU) (note there's a colon—i.e. :—in front of the Pokémon name).
     
    153
    Posts
    4
    Years
    • Seen Feb 4, 2020
    Hey,

    Thanks for your answer but I tried many different syntax and I always get this.
     
    Last edited:
    233
    Posts
    5
    Years
    • Seen Oct 9, 2023
    It's not pbSetSeen, that's for battle scripts only. Use this instead (and replace TREESPECIES with whatever tree species you need):
    Code:
    $Trainer.seen[:TREESPECIES]=true
     
    Last edited:
    233
    Posts
    5
    Years
    • Seen Oct 9, 2023
    Oh I see, try this instead:
    Code:
    $Trainer.seen[getConst(PBSpecies, :TREESPECIES)]=true
     
    Last edited:
    153
    Posts
    4
    Years
    • Seen Feb 4, 2020
    Hey, it works perfectly thanks! I managed to do it as well by using the number
    $Trainer.seen[900]=true
    which might be easier :)

    I'm now facing a new problem. I created a new pokedex both in debug (edit regional dexes) and in the setting script. I added a new region map, footprints for my trees (pictures of leaves) a cry and everything i could think of.

    However each time i click on a tree in the dex I have this error:



    Do you have any idea where it comes from?
    Also why is it necessary to create a new game to make new dexes work?

    Sorry I have so many questions :D

    Edit: I tried a lot of different things and it looks like the method of adding a pokemon as owned (for seen it works) is creating a bug with checking its data in the pokedex. When the pokemon is given to the player afterward the pokedex appears perfectly

    Edit2: indeed when I use pbAddPokemonSilent(:TREE,20) and directly after pbRemovePokemonAt(index). The pokedex works. Though i don't know how to look for a pokemon in the computer and delete it so it won"t work later in the game... Any ideas?

    Edit3: last idea I had:
    Still has the problem of interfering with other daycare pokes, I think I'll try to copy the daycare script and change the names of the copy so I can have the same system but for other purposes like this one
     
    Last edited:
    Back
    Top