RMRK is retiring.
Registration is disabled. The site will remain online, but eventually become a read-only archive. More information.

RMRK.net has nothing to do with Blockchains, Cryptocurrency or NFTs. We have been around since the early 2000s, but there is a new group using the RMRK name that deals with those things. We have nothing to do with them.
NFTs are a scam, and if somebody is trying to persuade you to buy or invest in crypto/blockchain/NFT content, please turn them down and save your money. See this video for more information.
Breaking the "Show Choices" Character Limit (XP to VX Conversion)

0 Members and 1 Guest are viewing this topic.

**
Rep:
Level 79
I was wondering if it would be possible to convert RPG Advocate's "Breaking the "Show Choices" Character Limit" (originally found at Phylomortis.Com and saved here) from XP to VX? The reason being, I like using Yanfly's CMS and don't want to change to a more complex message system but would still like to use a feature like this.


Code: [Select]
# Breaking the "Show Choices" Character Limit
# by RPG Advocate


#==============================================================================
# ** Interpreter (part 1)
#------------------
# This interpreter runs event commands. This class is used within the
# Game_System class and the Game_Event class.
#==============================================================================

class Interpreter
#--------------
# * Object Initialization
# depth : nest depth
# main : main flag
#--------------
alias longchoice_initialize initialize
def initialize(depth = 0, main = false)
@longchoice = []
longchoice_initialize (depth, main)
end
#--------------
# * Show Text
#--------------
def command_101
# If other text has been set to message_text
if $game_temp.message_text != nil
# End
return false
end
# Set message end waiting flag and callback
@message_waiting = true
$game_temp.message_proc = Proc.new { @message_waiting = false }
# Set message text on first line
$game_temp.message_text = @list[@index].parameters[0] + "\n"
line_count = 1
# Loop
loop do
# If next event command text is on the second line or after
if @list[@index+1].code == 401
# Add the second line or after to message_text
$game_temp.message_text += @list[@index+1].parameters[0] + "\n"
line_count += 1
# If event command is not on the second line or after
else
# If next event command is show choices
if @list[@index+1].code == 102
# If choices fit on screen
if @list[@index+1].parameters[0].size <= 4 - line_count
# Advance index
@index += 1
# Choices setup
$game_temp.choice_start = line_count
# The added long choice system
long_choice if @longchoice != []
setup_choices(@list[@index].parameters)
end
# If next event command is input number
elsif @list[@index+1].code == 103
# If number input window fits on screen
if line_count < 4
# Advance index
@index += 1
# Number input setup
$game_temp.num_input_start = line_count
$game_temp.num_input_variable_id = @list[@index].parameters[0]
$game_temp.num_input_digits_max = @list[@index].parameters[1]
end
end
# Continue
return true
end
# Advance index
@index += 1
end
end
#--------------
# * Show Choices
#--------------
def command_102
# If text has been set to message_text
if $game_temp.message_text != nil
# End
return false
end
# Set message end waiting flag and callback
@message_waiting = true
$game_temp.message_proc = Proc.new { @message_waiting = false }
# Choices setup
$game_temp.message_text = ""
$game_temp.choice_start = 0
# The added long choice system
long_choice if @longchoice != []
setup_choices(@parameters)
# Continue
return true
end
#--------------
# * Long Choices
#--------------
def long_choice
s1 = ""
s2 = ""
s3 = ""
s4 = ""
@list[@index].parameters[0] = []
s1 = @longchoice[0] if @longchoice[0] != nil
s2 = @longchoice[1] if @longchoice[1] != nil
s3 = @longchoice[2] if @longchoice[2] != nil
s4 = @longchoice[3] if @longchoice[3] != nil
@list[@index].parameters[0][0] = s1 if s1 != ""
@list[@index].parameters[0][1] = s2 if s2 != ""
@list[@index].parameters[0][2] = s3 if s3 != ""
@list[@index].parameters[0][3] = s4 if s4 != ""
@longchoice = []
end
end
.: Current Project :.