Set the default cursor/choice option with a variable

Theguysayshi

Villager
Member
Joined
Jul 18, 2018
Messages
27
Reaction score
2
First Language
English
Primarily Uses
RMVXA
Sorry in advance if this has been asked already, but I've searched all over and to no avail on any scripts that do this.

I have a game play idea that revolves around the the changing the default cursor position in menus. This would be done through a variable (Eg. when variable is set to 0, default is choice 1. When variable is set to 1, default is choice 2)

This seems simple enough, but I can't find a script anywhere that does it. The only one I did find was in Japanese, and had a bunch of different other choice options that conflicted with another script I had (Galv's Visual Novel Choices).

It doesn't need to be anything complicated or anything. Any help at all is much appreciated!
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,355
Reaction score
7,669
First Language
German
Primarily Uses
RMMV
It might be better if you tell us what you want to do instead of how you want to do it - something like that might require some big changes, and there aren't many scripters for Ace left.

The only thing I ever saw that comes even near this (and I once took a month to check through the entire ace master script list) is a script that allows the creation of tutorials by restricting and forcing menu commands.
 

A-Moonless-Night

WINTER IS COMING
Veteran
Joined
Mar 17, 2012
Messages
681
Reaction score
446
First Language
English
Primarily Uses
RMVXA
Give this a go:
Code:
=begin
#==============================================================================#
#   Cursor Position Variable
#   Version 1.01
#   Original Script: Jupiter Penguin (Option Extension ver.3.4)
#   URL: http://woodpenguin.blog.fc2.com/
#------------------------------------------------------------------------------#
#   Edited by: AMoonlessNight
#   Date: 20 Jul 2018
#   Latest: 20 Jul 2018
#==============================================================================#
#   UPDATE LOG
#------------------------------------------------------------------------------#
# 20 Jul 2018 - created the script based on Jupiter Penguin's Option Extension
#               script
#==============================================================================#
#   TERMS OF USE
#------------------------------------------------------------------------------#
# - As according to the original script by Jupiter Penguin:
#   http://woodpenguin.blog.fc2.com/blog-category-4.html
#==============================================================================#
    INSTRUCTIONS

 ** Use the following notetag in your event's comment box:
 
    <cursor_storage: n>
    
  Where n is the variable ID. The cursor will initially set to the value of
  the specified variable.

 ** For details on the original script, please see the following website:
    http://woodpenguin.web.fc2.com/rgss3/choice_ex.html
 
=end

#==============================================================================
#  Please do not edit below this point unless you know what you are doing.
#==============================================================================

class Game_Message
  attr_accessor :choice_var_id
  alias amn_choices_gamemessage_clear clear
  def clear
    amn_choices_gamemessage_clear
    @choice_var_id = 0
  end
end

class Game_Interpreter
 
  alias amn_choices_gameinterpreter_command_108 command_108
  def command_108
    amn_choices_gameinterpreter_command_108
    @comments.each do |comment|
      case comment
      when /<cursor_storage:\s*(\d+)>/i
        $game_message.choice_var_id = $1.to_i
      end
    end
  end

end

class Window_ChoiceList

  alias amn_choices_windowchoicelist_start  start
  def start
    amn_choices_windowchoicelist_start
    if $game_message.choice_var_id > 0
      select($game_variables[$game_message.choice_var_id])
    end
  end
 
end
 

Theguysayshi

Villager
Member
Joined
Jul 18, 2018
Messages
27
Reaction score
2
First Language
English
Primarily Uses
RMVXA
Give this a go:
Code:
=begin
#==============================================================================#
#   Cursor Position Variable
#   Version 1.01
#   Original Script: Jupiter Penguin (Option Extension ver.3.4)
#   URL: http://woodpenguin.blog.fc2.com/
#------------------------------------------------------------------------------#
#   Edited by: AMoonlessNight
#   Date: 20 Jul 2018
#   Latest: 20 Jul 2018
#==============================================================================#
#   UPDATE LOG
#------------------------------------------------------------------------------#
# 20 Jul 2018 - created the script based on Jupiter Penguin's Option Extension
#               script
#==============================================================================#
#   TERMS OF USE
#------------------------------------------------------------------------------#
# - As according to the original script by Jupiter Penguin:
#   http://woodpenguin.blog.fc2.com/blog-category-4.html
#==============================================================================#
    INSTRUCTIONS

 ** Use the following notetag in your event's comment box:
 
    <cursor_storage: n>
 
  Where n is the variable ID. The cursor will initially set to the value of
  the specified variable.

 ** For details on the original script, please see the following website:
    http://woodpenguin.web.fc2.com/rgss3/choice_ex.html
 
=end

#==============================================================================
#  Please do not edit below this point unless you know what you are doing.
#==============================================================================

class Game_Message
  attr_accessor :choice_var_id
  alias amn_choices_gamemessage_clear clear
  def clear
    amn_choices_gamemessage_clear
    @choice_var_id = 0
  end
end

class Game_Interpreter
 
  alias amn_choices_gameinterpreter_command_108 command_108
  def command_108
    amn_choices_gameinterpreter_command_108
    @comments.each do |comment|
      case comment
      when /<cursor_storage:\s*(\d+)>/i
        $game_message.choice_var_id = $1.to_i
      end
    end
  end

end

class Window_ChoiceList

  alias amn_choices_windowchoicelist_start  start
  def start
    amn_choices_windowchoicelist_start
    if $game_message.choice_var_id > 0
      select($game_variables[$game_message.choice_var_id])
    end
  end
 
end
Thanks! This is exactly what I want to do, and works perfectly with no problems. Thank you so much!
 

Users Who Are Viewing This Thread (Users: 0, Guests: 2)

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,853
Messages
1,016,986
Members
137,561
Latest member
visploo100
Top