Add a Opinion menu to the pause menu.

Helloo,
I'm trying to add an "Opinion" menu in the pause menu to know the actual state of the opinion of the mates. And I actually don't know how to add a menu and how you can make a variable appears (the opinion system in my game is actually just a variable that change with the decision you take in the game and I would like the number of the variable appears in the menu to know the opinion from a character with a percentage or whatever).

Thank you for taking the time to read this post and anybody who helps me.
Could you elaborate more on how this "Opinion" system of yours works, exactly? You've mentioned percentages but I don't fully understand how this would look. Could you provide me with any examples?
Could you elaborate more on how this "Opinion" system of yours works, exactly? You've mentioned percentages but I don't fully understand how this would look. Could you provide me with any examples?

Thanks for answering ! So like for example you have a choice and depending on the choice you make your teammates gain or lose some Opinion towards you. It would just work as a variable per character and depending on the decision you take the variable will change, and on a random moment on my game I can set un event to check the variable and if the variable is too low/high something could happen. And I just want a menu to see how much a teammate has opinion towards the player.
In Scene_Menu, underneath def create_command_window, add this line of code:
Ruby:
@command_window.set_handler(:opinion,   method(:command_opinion))

Add this into Scene_Menu as well.
Ruby:
def command_opinion
  $game_temp.reserve_common_event(ID)
end

In Window_MenuCommand, underneath def add_main_commands, add this line of code:
Ruby:
add_command("Opinions",    :opinion, main_commands_enabled)

This will add a new option in the pause menu with the name "Opinions". The rest we can do without needing to change scripts.

Create a common event that begins with Show Choices, with a choice for each applicable member of your party. Then simply display the variable in the following message. Go back and change "ID" in the Scene_Menu code you added to the ID of your common event.
In Scene_Menu, underneath def create_command_window, add this line of code:
Ruby:
@command_window.set_handler(:opinion,   method(:command_opinion))

Add this into Scene_Menu as well.
Ruby:
def command_opinion
  $game_temp.reserve_common_event(ID)
end

In Window_MenuCommand, underneath def add_main_commands, add this line of code:
Ruby:
add_command("Opinions",    :opinion, main_commands_enabled)

This will add a new option in the pause menu with the name "Opinions". The rest we can do without needing to change scripts.

Create a common event that begins with Show Choices, with a choice for each applicable member of your party. Then simply display the variable in the following message. Go back and change "ID" in the Scene_Menu code you added to the ID of your common event.

Thanks a lot for that !

But I got some issue with this command "
def command_opinion
$game_temp.reserve_common_event(001)
end"
I put the ID of the common event in the command, but when I go to the Opinion menu in the game, it just crash. And how could I display only the characters that I have on the Team ?
Don't add the leading zeros of the common event id.

$game_temp.reserve_common_event(1)
Don't add the leading zeros of the common event id.

$game_temp.reserve_common_event(1)
Still crashing. Maybe I put the script in a bad place ? (I put the script at line 129 of scene_menu)
Thanks for the help tho !
Got a backtrace log script? If not, you might wanna get one right away.
Plus, nobody knows what your common event is actually doing there so a screenshot might help, too.
Got a backtrace log script? If not, you might wanna get one right away.
Plus, nobody knows what your common event is actually doing there so a screenshot might help, too.
Am kinda new to making games on rpg maker, I don't even know what's a backtrace log script.
Here is a screenshot of the common event (I did what he told me to do)
1745508647224.png
It should say \v[1] instead.
BTW, I think that calling a common event under the current circumstances is a bad idea.
I'd prefer to create a custom scene that lets you mix Scene_Map's common events and does let you trigger the B button to leave that scene and go back to the menu.

EDIT #5 or #6?

Well, there might be a chance to call a common event BUT you'd have to leave the menu and go back to the map. At the end of your common event, you should call the Open Menu Screen command if you wanna go back there.

Ruby:
class Window_MenuCommand
  def add_original_commands
    add_command("Opinions", :opinion)
  end
end

class Scene_Menu
  alias :opinion_scn_mn_crt_cmd_win :create_command_window
  def create_command_window
    opinion_scn_mn_crt_cmd_win
    @command_window.set_handler(:opinion, method(:command_opinion))
    n = $game_variables[10]
    @command_window.select(n) if n > 0
    $game_variables[10] = 0
  end

  def command_opinion
    $game_temp.reserve_common_event(10)
    $game_variables[10] = @command_window.index
    return_scene
  end
end

Both the game variable and the common event are set to 10, yet, feel free to change their ID's at will.
It should say \v[1] instead.
BTW, I think that calling a common event under the current circumstances is a bad idea.
I'd prefer to create a custom scene that lets you mix Scene_Map's common events and does let you trigger the B button to leave that scene and go back to the menu.

EDIT #5 or #6?

Well, there might be a chance to call a common event BUT you'd have to leave the menu and go back to the map. At the end of your common event, you should call the Open Menu Screen command if you wanna go back there.

Ruby:
class Window_MenuCommand
  def add_original_commands
    add_command("Opinions", :opinion)
  end
end

class Scene_Menu
  alias :opinion_scn_mn_crt_cmd_win :create_command_window
  def create_command_window
    opinion_scn_mn_crt_cmd_win
    @command_window.set_handler(:opinion, method(:command_opinion))
    n = $game_variables[10]
    @command_window.select(n) if n > 0
    $game_variables[10] = 0
  end

  def command_opinion
    $game_temp.reserve_common_event(10)
    $game_variables[10] = @command_window.index
    return_scene
  end
end

Both the game variable and the common event are set to 10, yet, feel free to change their ID's at will.
I'm not sure to understand very well what I'm supposed to do with that script. I did put it where it should, but it just keeps telling me some errors and can't launch the game. Should I remove the old script that the previous peoples gave me, or should I keep it ? I'm kinda in a confusion right now.


Thanks for the help, tho !
Well, you could test mine and forget about the other one. It basically incorporates the changes other people might have suggested but added a call to go back to the map to run the common event as you intended.
Well, you could test mine and forget about the other one. It basically incorporates the changes other people might have suggested but added a call to go back to the map to run the common event as you intended.

That's the Error I get when I put your script.
1745534693066.png

Where I put every thing :

class Window_MenuCommand
def add_original_commands
add_command("Opinions", :opinion)
end
end
1745534767156.png


class Scene_Menu
alias :opinion_scn_mn_crt_cmd_win :create_command_window
def create_command_window
opinion_scn_mn_crt_cmd_win
@command_window.set_handler(:opinion, method(:command_opinion))
n = $game_variables[10]
@command_window.select(n) if n > 0
$game_variables[10] = 0
end

1745534811346.png


def command_opinion
$game_temp.reserve_common_event(10)
$game_variables[10] = @command_window.index
return_scene
end
end

1745534850749.png


I don't know if I did something bad, I feel kinda stupid rn lol
I do not recommend modifying the base scripts especially if you have other scripts.
1745536210251.png
I do not recommend modifying the base scripts especially if you have other scripts.
View attachment 338560
Wow! Thanks a lot, you just resolved everything with one apparition of you :') !
Just how could I display only the characters that I have on the Team ?
Wow! Thanks a lot, you just resolved everything with one apparition of you :') !
Just how could I display only the characters that I have on the Team ?

Depends on you. You can check if X is in Party.
1745536989220.png
Depends on you. You can check if X is in Party.
View attachment 338561
Oh yeah, didn't think about it-
Welp thanks a lot, you clearly made my day !

Depends on you. You can check if X is in Party.
View attachment 338561
But can I do like multiple peoples ?
Like, can I make a condition with multiple peoples ?

The problem that I actually got is that if i have 2 people it will still execute the first line because he is on the team.

1745538244047.png
But can i do like multiple peoples ?
Like can i make a conditions with multiple peoples ?
It depends on how you are doing your system for opinion. I don't know how your game functions.
If it were me, I would do something like this:

1745538550399.png

1745538620719.png

1745538639489.png
It depends on how you are doing your system for opinion. I don't know how your game functions.
If it were me, I would do something like this:

View attachment 338564
View attachment 338570
View attachment 338572
Thanks for the help !
Thanks for the help !

My French is not great but I see what's happening now. There's different ways for you to do this. I don't know if @Kiranyaki released their plugin yet, but you can use Conditional Choices or create a picture menu and have it display characters on screen instead and you can navigate through them.

Original thread: https://forums.rpgmakerweb.com/threads/add-a-opinion-menu-to-the-pause-menu.177149/