• 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: [v13+] Character Selection

FL

Pokémon Island Creator
2,450
Posts
13
Years
    • Seen today
    gif.gif
    screen.png

    It's a character selection screen suggested for player selection or partner selection.

    Link

    Tested on Essentials v13, v18.1 and v20.1. If this script isn't working on latest Essentials version, please inform on this thread.
     
    Last edited:

    Qwertyis666

    Dragon Trainer Since 1996
    60
    Posts
    10
    Years
  • Nice! I was looking for something like this :) but I have one question :
    I call the script after or before the gender selection in the intro?
    I think I will use it to change outfit, so it will be after I guess?

    Thanks in advance and sorry for my bad english
     
    Last edited:

    Zeak6464

    Zeak #3205 - Discord
    1,101
    Posts
    11
    Years
  • Nice! I was looking for something like this :) but I have one question :
    I call the script after or before the gender selection in the intro?
    I think I will use it to change outfit, so it will be after I guess?

    Thanks in advance and sorry for my bad english

    I would do it after & make sure you have the Boy & Girl Characters Identified if your going to make this for Outfits. I personally love this script for adding in Tag Partner of your choice.
    There is a lot of stuff this script can be used for.
     
    9
    Posts
    7
    Years
    • Seen Sep 8, 2016
    how does this script work?

    i create a new script in script editor and name it "characterselect" then i go to "Intro" (map) and open the event where you must choose if you boy or girl and make this
    Comment: Initializes player 0 (PlayerA).
    ["pbChangePlayer" takes a value from 0 through 7;
    other values are not valid. To edit information about
    a player, choose "Set Metadata" in the Pokemon
    Essentials Editor and select "Global".]

    Script: pbCharacterSelection(overworld,battle)

    but this doesn´t work for me ...

    sorry my english and my knowledge about essentials and scripting is very weak.
    please help to get this script work for me i use the newest essentials (16v2)....

    i hope anyone can help me :(
     

    FL

    Pokémon Island Creator
    2,450
    Posts
    13
    Years
    • Seen today
    how does this script work?

    i create a new script in script editor and name it "characterselect" then i go to "Intro" (map) and open the event where you must choose if you boy or girl and make this

    but this doesn´t work for me ...

    sorry my english and my knowledge about essentials and scripting is very weak.
    please help to get this script work for me i use the newest essentials (16v2)....

    i hope anyone can help me :(
    Use the code:

    Code:
    overworld = ["trchar000","trchar001","trchar002","trchar003"]
    battle = ["trainer000","trainer001","trainer002","trainer003"]
    result = pbCharacterSelection(overworld,battle) 
    pbChangePlayer(result)
    And make sure that the first four players are initialized. If you want eight players, use eight sprite pairs (overworld and battle).
     
    35
    Posts
    7
    Years
    • Seen Nov 1, 2018
    Character selection by FL

    Everytime I choose character in the screen for the first click it looped me back to selection screen. After second click then the game proceed with the character you chose. I tried with any no. of character choices and it doesn't affect it. Even I answered no first then yes after wards it still looping me back.
    Anyone with the same case?Hope anyone can help me here.
     

    FL

    Pokémon Island Creator
    2,450
    Posts
    13
    Years
    • Seen today
    Everytime I choose character in the screen for the first click it looped me back to selection screen. After second click then the game proceed with the character you chose. I tried with any no. of character choices and it doesn't affect it. Even I answered no first then yes after wards it still looping me back.
    Anyone with the same case?Hope anyone can help me here.
    I tested right now on Essentials V16.2 and it's working. Probably is something that you done wrong on your code, like don't deactivate the event who trigger the script. Try putting a message after the character selection script call. If it doesn't works, post your code here.
     
    35
    Posts
    7
    Years
    • Seen Nov 1, 2018
    I tested right now on Essentials V16.2 and it's working. Probably is something that you done wrong on your code, like don't deactivate the event who trigger the script. Try putting a message after the character selection script call. If it doesn't works, post your code here.

    Well the full script was copied from thread tools so i don't think it was from syntax.

    I used this code in the event to call the script:

    overworld = ["trchar000","trchar001","trchar002","trchar003"]
    battle = ["trainer000","trainer001","trainer002","trainer003"]
    result = pbCharacterSelection(overworld,battle)
    pbChangePlayer(result)

    I tried it to put together in one script event. In separate script event but it all result same. First click do nothing after selecting yes but second click of the yes proceed with the choice character.

    I tried putting a msg after the characterselection script call and this error occur

    Exception: NoMethodError
    Message: Section173:517:in `pbChangePlayer'undefined method `<' for nil:NilClass
    ***Full script:
    pbChangePlayer(result)

    Interpreter:243:in `pbExecuteScript'
    (eval):1:in `pbExecuteScript'
    Interpreter:1606:in `eval'
    Interpreter:243:in `pbExecuteScript'
    Interpreter:1606:in `command_355'
    Interpreter:494:in `execute_command'
    Interpreter:193:in `update'
    Interpreter:106:in `loop'
    Interpreter:198:in `update'
    Scene_Map:103:in `update'
     
    Last edited:
    35
    Posts
    7
    Years
    • Seen Nov 1, 2018
    Sorry for multiple posting, I just want to say now it is working perfectly.
    Thank you so much for this awesome code!!
     
    10
    Posts
    6
    Years
    • Seen Aug 19, 2017
    Question, do any of you guys know how to remove the gender selection? I want the character and characters name to not be optional.
     

    FL

    Pokémon Island Creator
    2,450
    Posts
    13
    Years
    • Seen today
    Question, do any of you guys know how to remove the gender selection? I want the character and characters name to not be optional.
    I don't understand. You want a player selection with only one choice? I guess that this script should work, but what is the point?
     
    Last edited:
    10
    Posts
    6
    Years
    • Seen Aug 19, 2017
    I don't understand. You want a player selection with only one choice? I guess that this script should work, but what is the point?

    No I want to remove the choice option all together and make you play as just the one character.
     
    10
    Posts
    6
    Years
    • Seen Aug 19, 2017
    No I just want it removed completely, so Oak won't sqy "are you a boy or girl? What is your name?" The game will just start after he explains the world of Pokemon
     
    178
    Posts
    10
    Years
  • You just use the bottom example in the intro map. When making your event, it should look something like this:

    Code:
    @> Oak talking here
    @> Script: pbChangePlayer(0)
    @> Script: pbTrainerName(Red)

    You don't need this script to do that.
    And of course you can change both player and name to whatever you want.
     
    • Like
    Reactions: FL
    40
    Posts
    8
    Years
    • She/Her
    • Seen Apr 11, 2024
    I'm having trouble getting this to work too.
    As a test I'm only trying to make the male select another character.

    Here is my event code:
    Spoiler:

    Error message:
    Code:
    ---------------------------
    Shadowname
    ---------------------------
    Exception: RuntimeError
    
    Message: Script error within event 1, map 1 (Intro):
    
    Exception: SyntaxError
    
    Message: (eval):11:in `pbExecuteScript'compile error
    (eval):8: syntax error
    (eval):11: syntax error
    
    ***Line '(overworld,battle)' shouldn't begin with '('. Try
    
    putting the '(' at the end of the previous line instead,
    
    or using 'extendtext.exe'.
    
    ***Line '(overworld,battle)' shouldn't begin with '('. Try
    
    putting the '(' at the end of the previous line instead,
    
    or using 'extendtext.exe'.
    
    ***Full script:
    
    overworld = 
    ["trchar000","trchar001","trchar002",
    "trchar003"]
    battle = 
    ["trainer000","trainer001","trainer00
    2","trainer003"]
    result = pbCharacterSelection
    (overworld,battle)
    pbChangePlayer(result)
    pbCharacterSelection
    (overworld,battle)
    
    
    
    
    Interpreter:276:in `pbExecuteScript'
    
    Interpreter:1606:in `command_355'
    
    Interpreter:494:in `execute_command'
    
    Interpreter:193:in `update'
    
    Interpreter:106:in `loop'
    
    Interpreter:198:in `update'
    
    Scene_Map:103:in `update'
    
    Scene_Map:101:in `loop'
    
    Scene_Map:114:in `update'
    
    Scene_Map:68:in `main'
    
    
    
    This exception was logged in 
    
    C:\Users\User\Saved Games/Shadowname/errorlog.txt.
    
    Press Ctrl+C to copy this message to the clipboard.
    ---------------------------
    OK   
    ---------------------------
     
    178
    Posts
    10
    Years
  • something here

    Code:
    Exception: SyntaxError
    This line is saying what kind of error you are getting.

    And this is saying what you should do to fix the error:

    Code:
    ***Line '(overworld,battle)' shouldn't begin with '('. Try
    
    putting the '(' at the end of the previous line instead,
    
    or using 'extendtext.exe'.

    So you either put the '(' in the end of the previous line or use the "extendtext.exe". The extendtext is in the root of the game folder (the one where you run the game). Just double-click it and you are done. You will notice that yours message box became bigger than before. (it doesn't open a window of any kind, you won't even notice that it's running unless you insert text onto message boxes)
     
    • Like
    Reactions: FL

    Deatheye1

    Pokémon End of the World
    6
    Posts
    6
    Years
  • I use this code

    overworld = ["trchar000","trchar001","trchar002","trchar003"]
    battle = ["trainer000","trainer001","trainer002","trainer003"]
    result = pbCharacterSelection(overworld,battle)
    pbChangePlayer(result)

    But when i go to the script appears this message

    Code:
    Excepción: SyntaxError
    
    Mensaje: (eval):9:in `command_355'compile error
    (eval):8: syntax error
    
    EOW Antilag 1:201:in `command_355'
    
    Interpreter:494:in `eval'
    
    EOW Antilag 1:201:in `command_355'
    
    Interpreter:494:in `execute_command'
    
    Interpreter:193:in `update'
    
    Interpreter:106:in `loop'
    
    Interpreter:198:in `update'
    
    Scene_Map:103:in `update'
    
    Scene_Map:101:in `loop'
    
    Scene_Map:114:in `update'

    Edit: I fixed that, the error was another script that i have, but i have another error, is not a error message, when i choose another character nothing happens i still have the same overworld sprite
     
    Last edited:
    Back
    Top