Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
 [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 RG kyonides 0 681 06-27-2023, 09:17 PM
Last Post: kyonides
Photo  Map Tileset Changer during the game Narzew 1 5,881 05-06-2013, 09:18 PM
Last Post: Narzew
   DerVVulfman's Game Data Sneak DerVVulfman 2 6,809 04-04-2013, 03:50 AM
Last Post: DerVVulfman
   Mr.Mo ABS Game Log Window JayRay 0 4,887 10-30-2012, 06:54 AM
Last Post: JayRay
   Limit Breaker - breaks game limits Narzew 1 5,871 10-09-2012, 10:35 AM
Last Post: MetalRenard
   In game Tone change ! Grimimi 1 4,828 10-09-2012, 01:31 AM
Last Post: Samven
   [Unsupported] PK8's Self Variables XP PK8 4 9,514 03-08-2012, 01:54 PM
Last Post: LilyKnight
   1 Save Slot / AutoLoad Saved Game kyonides 1 6,099 07-09-2010, 08:38 AM
Last Post: Kread-EX
   Arcade Game System WIP computerwizoo7 0 4,808 03-25-2010, 01:20 PM
Last Post: computerwizoo7
   [Unsupported] Title Skip 2 XP PK8 3 8,549 02-17-2010, 12:01 PM
Last Post: Villain



Users browsing this thread: