[Unsupported] Game Strings (Streamline dialogue!)
#1
Game Strings
Version: 1.1

Introduction
This script pretty much attempts to help the developer streamline dialogue by allowing the developer to set up strings.

Features
  • Set the value of each string.
  • Change strings in-game using $game_strings[id] = value with call script.
  • Use strings in messages with the \st[id] command.
  • Use strings in item/skills/equipment descriptions with the \st[id] command. (A last minute feature)

Screenshots
Really early screenshot
Screenshot 2
Set of screenshots of the messages
Strings getting parsed in equipment descriptions.

Demo
.zip   Game Strings.zip (Size: 257.1 KB / Downloads: 7)

Script
The script cannot fit into this post. Download the demo.

Instructions
Setting up the strings:
To set up the strings, jump to line #261 or wherever "def customize" may be and start setting them up.

Changing strings in-game:
Call Script: $game_strings[id] = value

Using strings in your messages:
Type \st[id]
Note that you may also use the \st[id] command for descriptions of items, skills and equipment.

The string ids that need to fetch data/variables:
Please include the id of a string that does this so it can constantly update. It's in the Game_Strings_Update array located in the PK8 class.

FAQ
I don't want to use the preset strings!
Then don't use them?

Compatibility
This script aliases...
  • set - Game_Strings (my own custom class)
  • set_text - Window_Help < Window_Base
  • convert_special_characters - Window_Message < Window_Selectable
  • update - Scene_Base
  • create_game_objects - Scene_Title < Scene_Base
  • write_save_data - Scene_File < Scene_Base
  • read_save_data - Scene_File < Scene_Base

Credits and Thanks
I don't know who to thank, I've forgotten who to thank since I've worked on this for pretty much a week now.

Thanks Lowell/Wulfspade for talking about adding the ability to parse the string command into descriptions of items/equipment/skills.

Author's Notes
I'm not exactly sure what made me want to go ahead and script this. I guess  it all started when I was checking to see if I could create strings via Game Variables which I was able to. But then I wanted to make it it's own thing. Just a separate place to hold game strings. I would really like to make a RMXP version of this someday but I can't. :(

Terms and Conditions
This is exclusive to RMVXP.
Reply }
#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 }
#3
Thought I'd give it a huge bump.

I just updated the script and I uploaded a new version.

Changes:
String conversions now happen before the original string conversions. Also, strings are wrapped in single quotes instead of double. To "escape" the single quotation mark, type \'.
Reply }
#4
I liked this while you were making it and I like it now too. :3

It's perhaps a more clean way of setting game_variables to strings and doing \v[], which I used to do :)
Reply }


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 138 04-04-2013, 03:50 AM
Last Post: DerVVulfman
   In game Tone change ! Grimimi 1 5,302 10-09-2012, 01:31 AM
Last Post: Samven
   Arcade Game System WIP computerwizoo7 0 5,205 03-25-2010, 01:20 PM
Last Post: computerwizoo7
   [Unsupported] Actor & Party's Self Switches VX PK8 0 5,117 09-16-2009, 10:57 PM
Last Post: PK8
   [Unsupported] PK8's Self Variables VX PK8 1 6,160 09-16-2009, 10:20 AM
Last Post: Kain Nobel
   [Unsupported] Title Skip 2 VX PK8 0 4,909 12-07-2008, 12:36 PM
Last Post: PK8



Users browsing this thread: 2 Guest(s)