what don't you understand specifically? What are you trying to do? Where are you getting stuck?
I'm trying to get a yes no confirmation before pokemon naming, and I know how to do it with command windows and stuff but there are lots of scripts in pokemon for ace so there are lots of conflicts when I do it that way.. I just want choice 1 to be yes, choice 2 to be no, when I hit "C" I want it to understand that I mean no. With yes I want rename method to be called and with no just add the pokemon to the party. I tried to do it but I couldn't get it to work, and I don't understand why. I probably didn't see something essential, for example naming the classes same as other scripts classes. Somewhere I read that I need more than just this snippet though, something about indents.
Splitting into its own topic
just because Show Choices is a bit complicated and might go on for a bit.
I don't have the answer - I avoid using scripts for this.
Hime wrote a "more choices" script as well as a "conditional choices" script. You might be able to look up both of those and see how they handle things.
for showing choice method you have first to create a method with a value
def choice?case choicewhen 0 return truewhen 1 return falseendenddef choice_select if choice == true p "name1" if choice == false p "name2" endendthis is incomplet but this is one method you can use
Does this work, in the player's eyes, like a Show Choices command? As I understand, the OP wants to do a Show Choices command where the player has to choose something, but he wants to script the outcome himself rather than doing it via events. The script snippet in the first post is taken from Game_Interpreter, but that isn't the whole thing - there's a Window_Choice script as well as the When [**] part of Game_Interpreter that is also a part of choice processing.
He says he needs to have a choice screen.
Show Choices (and the code behind it) works while you're on the map.
If you're scripting a different kind of scene, then I just suggest you create new windows and build your own choice selection script using Window_Selectable or Window_Command.
Hum it can alwauys do this...
class Scene_Map alias nio_initialize, initializedef initialize create_window nio_initializeenddef create_windowreturn @window = Nio_Choice_Window.new if Game.Variable[1] == trueelse return @window = nilendendendclass Nio_Choice_Window< Window_Selectabledef initialize(widht,height,choice_index,choice) super widht height contents.x = 100 contents.y = 100 @choice_index = 0 @choice = "" enddef widhtreturn 100enddef height return 100enddef choice_listing(choice_index,choice) case choice_index when 0 @choice = "choice1" when 1 @choice = "choice2" when 2 @choice = "choice3" when 3 @choice = "choice4"endend endthis is not complete but this is show a basic idea of how you can do
Well, as I said, I know how to do it with Window_Selectable or Window_Command but with lots of scripts I get lots of conflict issues, so show choices seemed like an easier decision 😀
My main problems are Class Sprites Script, Battle Symphony Script and Enemy Capture script.. First and last from Crystal Noel and Symphony from Yanfly.. Class Sprites lets every class have their own sprite depending on their class id's, enemy capture gets those id's and turns them into actors and keeps their classes and if I create choice list with windows those id's and variables get jumbled and Symphony -and other scripts- start to trow errors. Show choice is my best bet at keeping variables local in Enemy Capture scripts class.
But of course there is always the possibility of me doing something stupid, but with one method (that is adding a pokeon directly at your party, eg choosing starter) it works perfectly, I don't get any errors, problem starts with catching wild pokemon, which are not actors just troops which selected randomized (region based) classes, not actors, when I use my script snippet something about them turning into party members and actors conflict with Symphony and I get nomethoderror caused by spriteset method in symphony and a variable from what I wrote.
But I need that variable there to get the id's from capture method and put in rename class. I tried attr_accessor, writer and reader but couldn't get them to work either.
Tsukihime I will check your scripts but it's late here so I will report in the morning.