Goddiga

Veteran
Veteran
Joined
Oct 3, 2015
Messages
61
Reaction score
10
First Language
Thai
Primarily Uses
RMMV
Hello! I would like to request plugins for an extra settings for choice and cursor! I used to request this in VX ACE but now I'm planning to use them in MV as well.

*Noted that I might use them in a commercial project so please tell me about your deal and permission.

1. Scrolling choice/cursor
- The cursor on the choice or anywhere (menu/item screen) will scroll from top to bottom (or bottom to top as well if possible)

2. Arrow lock
- Lock the directional button on the choice or anywhere (menu/item screen) so that you can only press confirm or cancel. This can be combined with the previous method to make an unmovable scrolling choice.

3. Persist Choice
- Return the choice highlighted to a specified choice no matter how much the player trying to choose another choice within a specified time. (e.g. The first choice is persisted and I want to choose the third choice. I have to move to the second choice and press a confirm button fast enough or else the choice highlighted will return to the first one.)


*Here's the RGSS3 code in VX ACE
#----------------------------------------------------------------------------
# Extra Settings for Choices Script By Black Mage (Credit required to use)
# Version : 1.0
#----------------------------------------------------------------------------
#
# This script have several function regarding choices command.
#
# 1. Scrolling Choices
# You can make the choices cursor scrolling from top to the bottom by using
# this script call:
#
# choice_scroll(boolean, delay)
#
# where boolean value is true or false. When boolean is false, nothing is
# happened, and you can put delay value whatever you like. If the boolean
# is true, however, then the choices will start to scrolling from top to the
# bottom of available choices. The speed of the scrolling is depends on the
# value of delay. The smaller the delay value, means the scrolling speed
# will be faster.
#
# 2. Arrow Lock
# You can lock the directional button during choice selection, leaving
# player to have access only on confirm and cancel button, by using this
# script call:
#
# choice_arrow_lock(value)
#
# where the value is true or false. Set the value on true to disable the
# directional button, and set it on false to enable the directional button.
#
# 3. Forced Choices
# This setting will make the choice cursor will always return to a specified
# index, no matter where the player move the cursor. The cursor will return
# to the specified index after several delay. You can use it by calling this
# script call:
#
# choice_forced(boolean, index, delay)
#
# where boolean is either true or false, determining wether the setting is
# used or not. index is where the choice cursor will return at. And delay is
# how many frame passed before the cursor return to the specified index.
#
# 4. Timed Choice
# This will make the choice have an invisible timer on it. When the timer
# reaches 0, the highlited choice will be selected, or it will trigger
# another event depending on the setting. You can use it by using this script
# call:
#
# choice_timer(boolean1, boolean2, duration, common_event)
#
# where boolean1 stands for determining wether the setting is in effect or
# not. Set it to false so you don't need to worry about the other arguments
# value, just put whatever on them.
#
# boolean2 stands for wether when the time is running out, a specific common
# event will be played or it will choos the highlighted choice. When this
# value is false, the highlighted choice will be selected. When this is true,
# a common event will be played depending on common_event value.
#
# duration is how many frames will passed before Boolean2 setting took effect.
#
# common_event is an ID for which common event get executed if boolean2 value
# is true. If boolean2 value is false, you can put whatever on it's value.
#----------------------------------------------------------------------------

#==============================================================================
# * Initial Setting. Just left them untouched.
#==============================================================================
module BLACK_CHOICES
SCROLL = [false, 0] # Setting, delay
TIMER = [false, false, 0, 0] # Setting, event on, duration, common event]
ARROW_LOCK = false
FORCED = [false,0,0] # Setting, index, delay
end

#==============================================================================
# ■ Game_System
#==============================================================================
class Game_System
attr_accessor :choice_scroll
attr_accessor :choice_timer
attr_accessor :choice_arrow_lock
attr_accessor :choice_remaining_time
attr_accessor :choice_forced

alias black_initialize initialize
def initialize
@choice_scroll = [BLACK_CHOICES::SCROLL[0], BLACK_CHOICES::SCROLL[1]]
@choice_timer = [BLACK_CHOICES::TIMER[0], BLACK_CHOICES::TIMER[1], BLACK_CHOICES::TIMER[2]]
@choice_arrow_lock = BLACK_CHOICES::ARROW_LOCK
@choice_forced = [BLACK_CHOICES::FORCED[0], BLACK_CHOICES::FORCED[1], BLACK_CHOICES::FORCED[2]]
black_initialize
end
end

#==============================================================================
# * Game Interpreter
#==============================================================================
class Game_Interpreter
#--------------------------------------------------------------------------
# * Choice scroll setting
#--------------------------------------------------------------------------
def choice_scroll(boolean, delay)
$game_system.choice_scroll = [boolean, delay]
end
#--------------------------------------------------------------------------
# * Choice timer
#--------------------------------------------------------------------------
def choice_timer(boolean1, boolean2, timer, common_event)
$game_system.choice_timer = [boolean1, boolean2, timer, common_event]
end
#--------------------------------------------------------------------------
# * Arrow lock
#--------------------------------------------------------------------------
def choice_arrow_lock(value)
$game_system.choice_arrow_lock = value
end
#--------------------------------------------------------------------------
# * Choice forced.
#--------------------------------------------------------------------------
def choice_forced(boolean, index, delay)
$game_system.choice_forced = [boolean, index, delay]
end
end

class Window_ChoiceList < Window_Command
#--------------------------------------------------------------------------
# * Update
#--------------------------------------------------------------------------
def update
super
scrolling_choices if $game_system.choice_scroll[0] == true
countdown_timer if $game_system.choice_timer[0] == true
forced_choices if $game_system.choice_forced[0] == true
end

#--------------------------------------------------------------------------
# * Method for scrolling choices
#--------------------------------------------------------------------------
def scrolling_choices
@speed = 0 if @speed == nil
@speed += 1
@speed = 0 if @speed >= $game_system.choice_scroll[1]
if self.active and @speed == 0
if @index == ($game_message.choices.size - 1)
@index = 0
else
@index += 1
end
update_cursor
end
end

#--------------------------------------------------------------------------
# * Method for timed choices
#--------------------------------------------------------------------------
def countdown_timer
$game_system.choice_remaining_time = $game_system.choice_timer[2] if @timer == nil
@timer = true
$game_system.choice_remaining_time -= 1
if $game_system.choice_remaining_time <= 0 and @timer != nil
if $game_system.choice_timer[1]
deactivate
close
black_reset
$game_temp.reserve_common_event($game_system.choice_timer[3])
else
process_ok
end
end
end

#--------------------------------------------------------------------------
# * Method for forced choices
#--------------------------------------------------------------------------
def forced_choices
@delay = $game_system.choice_forced[2] if @delay == nil
@delay -= 1
if @delay <= 0
@delay = nil
select($game_system.choice_forced[1])
end
end

#--------------------------------------------------------------------------
# * Call OK Handler
#--------------------------------------------------------------------------
alias black_call_ok_handler call_ok_handler
def call_ok_handler
black_reset
black_call_ok_handler
end

#--------------------------------------------------------------------------
# * Call Cancel Handler
#--------------------------------------------------------------------------
alias black_call_cancel_handler call_cancel_handler
def call_cancel_handler
black_reset
black_call_cancel_handler
end

#--------------------------------------------------------------------------
# * Reset setting
#--------------------------------------------------------------------------
def black_reset
@timer = nil
@delay = nil
$game_system.choice_forced[0] = false
$game_system.choice_timer[0] = false
end

#--------------------------------------------------------------------------
# * Arrow lock
#--------------------------------------------------------------------------
def cursor_movable?
super if !$game_system.choice_arrow_lock
end
end

You can do some of them if you don't want to complete all requests! If someone is willing to help, I'd be really grateful! Thank you very much!

*I also included the demo for VX ACE if you would like to get the better idea on how they work.
https://www.mediafire.com/file/ccvlda3rsc16cv3/scriptinfo.rar

*Credit to Black Mage from gdunlimited.

*I also posted this here : https://rpgmaker.net/forums/topics/23345/ , http://www.rpgmakercentral.com/topic/41114-scroll-persist-and-change-direction-for-choicescursors/
 
Last edited:

Goddiga

Veteran
Veteran
Joined
Oct 3, 2015
Messages
61
Reaction score
10
First Language
Thai
Primarily Uses
RMMV
*Included the base code from RGSS3 in VX ACE

"Scripts 1-3"
#----------------------------------------------------------------------------
# Extra Settings for Choices Script By Black Mage (Credit required to use)
# Version : 1.0
#----------------------------------------------------------------------------
#
# This script have several function regarding choices command.
#
# 1. Scrolling Choices
# You can make the choices cursor scrolling from top to the bottom by using
# this script call:
#
# choice_scroll(boolean, delay)
#
# where boolean value is true or false. When boolean is false, nothing is
# happened, and you can put delay value whatever you like. If the boolean
# is true, however, then the choices will start to scrolling from top to the
# bottom of available choices. The speed of the scrolling is depends on the
# value of delay. The smaller the delay value, means the scrolling speed
# will be faster.
#
# 2. Arrow Lock
# You can lock the directional button during choice selection, leaving
# player to have access only on confirm and cancel button, by using this
# script call:
#
# choice_arrow_lock(value)
#
# where the value is true or false. Set the value on true to disable the
# directional button, and set it on false to enable the directional button.
#
# 3. Forced Choices
# This setting will make the choice cursor will always return to a specified
# index, no matter where the player move the cursor. The cursor will return
# to the specified index after several delay. You can use it by calling this
# script call:
#
# choice_forced(boolean, index, delay)
#
# where boolean is either true or false, determining wether the setting is
# used or not. index is where the choice cursor will return at. And delay is
# how many frame passed before the cursor return to the specified index.
#
# 4. Timed Choice
# This will make the choice have an invisible timer on it. When the timer
# reaches 0, the highlited choice will be selected, or it will trigger
# another event depending on the setting. You can use it by using this script
# call:
#
# choice_timer(boolean1, boolean2, duration, common_event)
#
# where boolean1 stands for determining wether the setting is in effect or
# not. Set it to false so you don't need to worry about the other arguments
# value, just put whatever on them.
#
# boolean2 stands for wether when the time is running out, a specific common
# event will be played or it will choos the highlighted choice. When this
# value is false, the highlighted choice will be selected. When this is true,
# a common event will be played depending on common_event value.
#
# duration is how many frames will passed before Boolean2 setting took effect.
#
# common_event is an ID for which common event get executed if boolean2 value
# is true. If boolean2 value is false, you can put whatever on it's value.
#----------------------------------------------------------------------------

#==============================================================================
# * Initial Setting. Just left them untouched.
#==============================================================================
module BLACK_CHOICES
SCROLL = [false, 0] # Setting, delay
TIMER = [false, false, 0, 0] # Setting, event on, duration, common event]
ARROW_LOCK = false
FORCED = [false,0,0] # Setting, index, delay
end

#==============================================================================
# ■ Game_System
#==============================================================================
class Game_System
attr_accessor :choice_scroll
attr_accessor :choice_timer
attr_accessor :choice_arrow_lock
attr_accessor :choice_remaining_time
attr_accessor :choice_forced

alias black_initialize initialize
def initialize
@choice_scroll = [BLACK_CHOICES::SCROLL[0], BLACK_CHOICES::SCROLL[1]]
@choice_timer = [BLACK_CHOICES::TIMER[0], BLACK_CHOICES::TIMER[1], BLACK_CHOICES::TIMER[2]]
@choice_arrow_lock = BLACK_CHOICES::ARROW_LOCK
@choice_forced = [BLACK_CHOICES::FORCED[0], BLACK_CHOICES::FORCED[1], BLACK_CHOICES::FORCED[2]]
black_initialize
end
end

#==============================================================================
# * Game Interpreter
#==============================================================================
class Game_Interpreter
#--------------------------------------------------------------------------
# * Choice scroll setting
#--------------------------------------------------------------------------
def choice_scroll(boolean, delay)
$game_system.choice_scroll = [boolean, delay]
end
#--------------------------------------------------------------------------
# * Choice timer
#--------------------------------------------------------------------------
def choice_timer(boolean1, boolean2, timer, common_event)
$game_system.choice_timer = [boolean1, boolean2, timer, common_event]
end
#--------------------------------------------------------------------------
# * Arrow lock
#--------------------------------------------------------------------------
def choice_arrow_lock(value)
$game_system.choice_arrow_lock = value
end
#--------------------------------------------------------------------------
# * Choice forced.
#--------------------------------------------------------------------------
def choice_forced(boolean, index, delay)
$game_system.choice_forced = [boolean, index, delay]
end
end

class Window_ChoiceList < Window_Command
#--------------------------------------------------------------------------
# * Update
#--------------------------------------------------------------------------
def update
super
scrolling_choices if $game_system.choice_scroll[0] == true
countdown_timer if $game_system.choice_timer[0] == true
forced_choices if $game_system.choice_forced[0] == true
end

#--------------------------------------------------------------------------
# * Method for scrolling choices
#--------------------------------------------------------------------------
def scrolling_choices
@speed = 0 if @speed == nil
@speed += 1
@speed = 0 if @speed >= $game_system.choice_scroll[1]
if self.active and @speed == 0
if @index == ($game_message.choices.size - 1)
@index = 0
else
@index += 1
end
update_cursor
end
end

#--------------------------------------------------------------------------
# * Method for timed choices
#--------------------------------------------------------------------------
def countdown_timer
$game_system.choice_remaining_time = $game_system.choice_timer[2] if @timer == nil
@timer = true
$game_system.choice_remaining_time -= 1
if $game_system.choice_remaining_time <= 0 and @timer != nil
if $game_system.choice_timer[1]
deactivate
close
black_reset
$game_temp.reserve_common_event($game_system.choice_timer[3])
else
process_ok
end
end
end

#--------------------------------------------------------------------------
# * Method for forced choices
#--------------------------------------------------------------------------
def forced_choices
@delay = $game_system.choice_forced[2] if @delay == nil
@delay -= 1
if @delay <= 0
@delay = nil
select($game_system.choice_forced[1])
end
end

#--------------------------------------------------------------------------
# * Call OK Handler
#--------------------------------------------------------------------------
alias black_call_ok_handler call_ok_handler
def call_ok_handler
black_reset
black_call_ok_handler
end

#--------------------------------------------------------------------------
# * Call Cancel Handler
#--------------------------------------------------------------------------
alias black_call_cancel_handler call_cancel_handler
def call_cancel_handler
black_reset
black_call_cancel_handler
end

#--------------------------------------------------------------------------
# * Reset setting
#--------------------------------------------------------------------------
def black_reset
@timer = nil
@delay = nil
$game_system.choice_forced[0] = false
$game_system.choice_timer[0] = false
end

#--------------------------------------------------------------------------
# * Arrow lock
#--------------------------------------------------------------------------
def cursor_movable?
super if !$game_system.choice_arrow_lock
end
end

"Script 4"
#By Marrend
class Window_Selectable < Window_Base
def cursor_down(wrap = false)
if $game_switches[1] == false
# If the game_switch with an ID of 1 is disabled, the cursor moves as normal
if index < item_max - col_max || (wrap && col_max == 1)
select((index + col_max) % item_max)
end
else
# Otherwise, invert the movement!
if index >= col_max || (wrap && col_max == 1)
select((index - col_max + item_max) % item_max)
end
end
end

def cursor_up(wrap = false)
if $game_switches[1] == false
# If the game_switch with an ID of 1 is disabled, the cursor moves as normal
if index >= col_max || (wrap && col_max == 1)
select((index - col_max + item_max) % item_max)
end
else
# Otherwise, invert the movement!
if index < item_max - col_max || (wrap && col_max == 1)
select((index + col_max) % item_max)
end
end
end
end
 

Latest Threads

Latest Posts

Latest Profile Posts

Doing RPG Maker News for 24th October 2021

I'm not sure how to do this so I'll just ask here, Wheres a good place to post your game (for free) once its done?
I don't know what I'm doing :D
So got my hearing tested to see if it was the cause of my mishearing what people say. Test showed no problems but talked with the doctor about anxiety and ADHD causing hearing issues and she agreed and also added that some people hear things differently. With my anxiety cause I am in fight or flight I pay attention to all the sounds in the area so body knows when react. Can't pay attention to one source.

Forum statistics

Threads
116,057
Messages
1,095,400
Members
151,418
Latest member
MythologixGD
Top