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



Users browsing this thread: