[Unsupported] Game Strings (Streamline dialogue!)
#2
The description of this script is somewhat confusing.
This script provides a means of using shortcuts for commonly used lines in show messages.
In other words you get a \st[id] tag which will be substituted with another string in-game. This string can be evaluated dynamically given you more freedom than simple common phrases.

@PK8:
The substitution should happen before the original Special Characters conversion. (Assuming you want other tags in the substituted strings to be parsed)
Of course this script should be placed below any other script aliasing convert_special_characters. (Well, almost all. There might be some weird case)
Code:
#==============================================================================
# ** Window_Message
#------------------------------------------------------------------------------
#  This message window is used to display text.
#==============================================================================
class Window_Message < Window_Selectable
  alias pk8_game_strings_convert_special_characters :convert_special_characters
  #--------------------------------------------------------------------------
  # * Convert Special Characters
  #--------------------------------------------------------------------------
  def convert_special_characters
    # This adds the \ST command in your messages.
    @text.gsub!(/\\ST\[([0-9\-]+)\]/i) { $game_strings[$1.to_i] }
    @text.gsub!(/\\ST\[\'([\w\W]+)\']/i) { $game_strings[$1.to_s] }
    @text.gsub!(/\\ST\[\"([\w\W]+)\"]/i) { $game_strings[$1.to_s] }
    @text.gsub!(/\\ST\[([\w\W]+)]/i) { $game_strings[$1.to_s] }
    # Original conversion
    pk8_game_strings_convert_special_characters
  end
end

Additionally I suggest using ' instead of " for the example customizations. The reason is that with ' you can just write \c[2] for a color change while with " you must write \\c[2]. Of course the need for escaping ' should be noted.

I am not finished with your script yet >:3

*hugs*
- Zeriab
[Image: ZeriabSig.png]
Reply }


Messages In This Thread
Game Strings (Streamline dialogue!) [Exclusive] - by Zeriab - 07-22-2009, 04:25 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
   Name Game Switch & Variable VX + ACE kyonides 0 89 10-28-2024, 01:39 AM
Last Post: kyonides
   DerVVulfman's Game Data Sneak DerVVulfman 0 135 04-04-2013, 03:50 AM
Last Post: DerVVulfman
   In game Tone change ! Grimimi 1 5,294 10-09-2012, 01:31 AM
Last Post: Samven
   Arcade Game System WIP computerwizoo7 0 5,202 03-25-2010, 01:20 PM
Last Post: computerwizoo7
   [Unsupported] Actor & Party's Self Switches VX PK8 0 5,114 09-16-2009, 10:57 PM
Last Post: PK8
   [Unsupported] PK8's Self Variables VX PK8 1 6,153 09-16-2009, 10:20 AM
Last Post: Kain Nobel
   [Unsupported] Title Skip 2 VX PK8 0 4,906 12-07-2008, 12:36 PM
Last Post: PK8



Users browsing this thread: 1 Guest(s)