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

Script: [v13+] Character Selection

That was the problem thanks, now i have a question how can i use the script to choose a partner? For example i define three tainers in the script and i want to choose one of them to be my partner.
Just use a simple conditional branch with my method result value:

Code:
overworld = ["trchar000","trchar001","trchar002","trchar003"]
battle = ["trainer000","trainer001","trainer002","trainer003"]
result = pbCharacterSelection(overworld,battle) 
if result==0
  pbRegisterPartner(PBTrainers::HOOPYTRAINER,"Zaphod",0)
elsif result==1
  pbRegisterPartner(PBTrainers::OTHERTRAINER,"Purple",0)
elsif result==2
  pbRegisterPartner(PBTrainers::ANOTHERTRAINER,"Gray",0)
elsif result==3
  pbRegisterPartner(PBTrainers::ONEMORETRAINER,"Brown",0)
end

Since this code is too big for a Script Event Command, I suggest you to put it above main, between a line with "def insertSomeMethodNameHere" and "end", and call it on the Event.
 
Just use a simple conditional branch with my method result value:

Code:
overworld = ["trchar000","trchar001","trchar002","trchar003"]
battle = ["trainer000","trainer001","trainer002","trainer003"]
result = pbCharacterSelection(overworld,battle) 
if result==0
  pbRegisterPartner(PBTrainers::HOOPYTRAINER,"Zaphod",0)
elsif result==1
  pbRegisterPartner(PBTrainers::OTHERTRAINER,"Purple",0)
elsif result==2
  pbRegisterPartner(PBTrainers::ANOTHERTRAINER,"Gray",0)
elsif result==3
  pbRegisterPartner(PBTrainers::ONEMORETRAINER,"Brown",0)
end

Since this code is too big for a Script Event Command, I suggest you to put it above main, between a line with "def insertSomeMethodNameHere" and "end", and call it on the Event.

Ok thanks, but i see that script only work one time, for example in a future event the partners must have more level with their team and when i put again the partner selection the partner had the team in the first trainer battle, how can i change that when the player has playing?
 
Ok thanks, but i see that script only work one time, for example in a future event the partners must have more level with their team and when i put again the partner selection the partner had the team in the first trainer battle, how can i change that when the player has playing?
This was nothing to do with my script...

Anyway change the last "0" argument in partner call for a variable number that you change per moment.
 
Hi,
I think this is an amazing addition to essentials, and I'm keen to start using it in my game.

I'd like it to be a "costume change" tool for the player, so they can change outfits, possibly bound to an item
e.g one of my player characters is misty so I'd like to be able to switch to anime, hgss, and swimsuit styles

Is that possible? If so, can this script also replace surf/bike/fish graphics?

Also, is it possible to have it be useable on NPC trainers/gymleaders via a menu or item?
tl;dr trying to make a pokemon "best of" where you can change the trainers as you see fit
 
I'd like it to be a "costume change" tool for the player, so they can change outfits, possibly bound to an item
e.g one of my player characters is misty so I'd like to be able to switch to anime, hgss, and swimsuit styles

Is that possible? If so, can this script also replace surf/bike/fish graphics?

Also, is it possible to have it be useable on NPC trainers/gymleaders via a menu or item?
tl;dr trying to make a pokemon "best of" where you can change the trainers as you see fit

You can activate the script by item. An item example:
Item data on PBS:
Code:
621,YOURITEMINTERNALNAMEHERE,YourItemNameHere,YourItemNameHere,8,0,"Description goes here",2,0,6

Item code:
Code:
ItemHandlers.addUseFromBag(:YOURITEMINTERNALNAMEHERE, proc {|item|
  overworld = ["trchar000","trchar001","trchar002","trchar003"]
  battle = ["trainer000","trainer001","trainer002","trainer003"]
  result = pbCharacterSelection(overworld,battle)
  # Do things with result. 
  next 1 # Continue
})

You can handle the result using game switches and variables to change NPCs outfits. For surf/bike/fish graphics this is a bit harder, I suggest you to set the $Trainer.outfit by result.
 
Sorry to bump such an old thread! I get this error when trying to use the script:
[PokeCommunity.com] [v13+] Character Selection
 
Sorry to bump such an old thread! I get this error when trying to use the script:
[PokeCommunity.com] [v13+] Character Selection
I tested with 17.2 right now and is working. Did you correctly follow the instructions and these four images ("trchar000","trchar001","trainer000" and "trainer001") were in the right folders?
 
Hi! I have a question:

I wanna know how can I set custom mugshots or color text for each character I pick up. For example, if I pick up the 1st one, I would use a specific mugshot for his dialogues. If I pick up the 2nd one, another mugshot. Help!😅
 
Last edited:
Hi! I have a question:

I wanna know how can I set custom mugshots or color text for each character I pick up. For example, if I pick up the 1st one, I would use a specific mugshot for his dialogues. If I pick up the 2nd one, another mugshot. Help!😅
This script only returns a number, right? Store this number in a variable and checks this variable using event command conditional branch. For each branch, call a different mugshot.

If you use this ofter, you can create a script who does this, so you only need to call the same method.

For text, setting the player gender and using '/pg' or '/pog' may solve your issue.
 
Hey thx for this content.
I've been trying to change the color of the text depending on a variable but \C[pbGet(60)] doesn't work. Is it possible to do that with what you suggested above? /pg or /pog?
 
Hey thx for this content.
I've been trying to change the color of the text depending on a variable but \C[pbGet(60)] doesn't work. Is it possible to do that with what you suggested above? /pg or /pog?
Yes, but /pg and /pog only uses red/blue colors based on player gender. To use more:

Code:
$game_variables[99] = [
"ff00ff",
"ff0000",
"00ffff",
"0000ff"][pbGet(60)]

And use the message:
Code:
<c=\v[99]>Hello World!</c>
 
Last edited:
thx for your answer I solved it by adding this in message script

Code:
  text.gsub!(/\\[Hh]/,"\\C[1]") if pbGet(60)==1
  text.gsub!(/\\[Hh]/,"\\C[3]") if pbGet(60)==3
  text.gsub!(/\\[Hh]/,"\\C[5]") if pbGet(60)==5
  text.gsub!(/\\[Hh]/,"\\C[6]") if pbGet(60)==6

but your solution is maybe even cleaner. However this is easier to use as it only needs a \h to start changing the color
 
Last edited:
I get the following error.

[Pokémon Essentials version 17.2]
Exception: RuntimeError
Message: Script error within event 1 (coords 0,0), map 1 (Intro):
Exception: SyntaxError
Message: (eval):9:in `pbExecuteScript'compile error
(eval):8: syntax error
***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","trcha
r003"]
battle =
["trainer000","trainer001","trainer002","tr
ainer003"]
result = pbCharacterSelection
(overworld,battle)
pbChangePlayer(result)


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:163:in `update'
Scene_Map:161:in `loop'
Scene_Map:170:in `update'
Scene_Map:234:in `main'
 
I have an error with this script :(

---------------------------
Pokémon Essentials Esp v16.3
---------------------------
Excepción: RuntimeError

Mensaje: Script error within event 2, map 1 (Intro):

Exception: NoMethodError

Message: (eval):3:in `pbExecuteScript'undefined method `pbCharacterSelection' for #<Interpreter:0x1328ad20>

***Full script:

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


Interpreter:243: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'

Scene_Map:101:in `loop'



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'
 
Back
Top