Submit Your Article


 
RPG Maker

Welcome Guest ( Log In | Register )


  Games Resources RPG Maker VX RPG Maker XP Scripts Tutorials Downloads

7 Pages V   1 2 3 > »   
Reply to this topicStart new topic
> Advance Text System v 3.0, A comprehensive message system with a number of unique features.
modern algebra
post Apr 2 2008, 07:41 PM
Post #1


Level 11
Group Icon

Group: Revolutionary
Posts: 191
Type: Scripter
RM Skill: Skilled




Advanced Text System
Version: 3.0c
Author: modern algebra
Date: September 7, 2010

Version History


  • Version 3.0c - 09.07.2010 - Fixed an issue with the :fit_window_to_text property, where it wouldn't resize when a message was shorter than a previous message. Also fixed an issue where paragraph format was thrown off when a new page was made, as well as another issue with choices, where the cancel condition would sometimes be changed when repeating a choice branch. Finally, I added the \x[n] code.
  • Version 3.0b - 07.23.2010 - Fixed the F12-related bugs. The script should now be F12-safe
  • Version 3.0a - 06.19.2010 - Added a feature that will automatically show the whole face unless you specify that it should only show a portion of it. Makes it simpler to use large faces.
  • Version 3.0 - 06.13.2010 - complete rewrite, adding in tons of new features, in addition to making the script more intuitive and easier to learn. See the features section for a list of some of the updates. Also, the Paragraph Formatter is no longer needed, as I wrote up a special formatter class for the ATS and included it in the script.
  • Version 2.0c - 11.6.2008 - bug with system if paragraph format is turned off but scrolling and Autopause are not
  • Version 2.0b - 09.21.2008 - a major bug with levelling fixed.
  • Version 2.0 - 09.17.2008 - a number of new features and script rewritten into a more friendly version.
  • Version 1.5 - 07.18.2008 - quite a few new features. See the updated features list for details.
  • Version 1.2b - 05.02.2008 - Minor bug fixes
  • Version 1.2 - 04.14.2008 - Minor positioning glitch fixed with message back sprites. Added an option to have more than one column with the choice boxes. Face can now be drawn mirrored. Now there are 52 runtime options.
  • Version 1.11 - 04.04.2008 - Minor bug fix with \px - added option to choose how many choices to show in a choicebox before it starts scrolling. - added option to change the back_sprite when you use dim background. So now 50 runtime messages
  • Version 1.1 - 03.31.2008 - It is now possible to set the position and size of the message window. Also, there are now 48 runtime message options and 29 special character codes in addition to the default ones. Note that it will not resize of the message back if you use dim messages
  • Version 1.0 - 03.18.2008 - Original Release. In addition to the default options, there are now 42 runtime message options and 23 special character codes


Description


This script allows for various complex message commands. Among the features are some that will be familiar from previous message scripts, such as Seasons in the Abyss' SMS and AMS. Others, such as the formatted text, expanded choice options, and speech tags, are completely new (as far as I know). See below for the features and command codes. The focus of this script is on customizability, which means that the script can seem daunting with all the properties and special message codes that you can use. However, whether to use these features is up to you, and it is very easy to plug in and just use the basic features that make sense for your game. Maybe all you want is appended choice branches and nameboxes ~ the basics are very easy and this script can be plug & play. But if you want to give your game that little extra something, the choice branches with subheadings, or the custom crafting scene, then that power is within this script, if you're willing to learn how.

Features


  • High in-game customizability, with control over practically everything, if you decide to use it
  • Great face handling, including the ability to use larger faces, set the faces lower than the message window, and scroll or fade them in
  • Animated Facesets
  • The ability to put faces in a window, and to set the border size of that window.
  • Appended Text Commands
  • Paragraph Formatting, allowing you to ignore the grey arrows when inputting text
  • Variable Letter-by-Letter Speed
  • Can play a sound effect as text is drawn
  • Scrolling, with a number of new features such as smooth scroll, the ability to scroll by page, and the ability for the player to review a scrolled message when it is paused by pressing up and down.
  • All relevant special message codes can be used anywhere they are useful
  • Name Window, with the ability to set the border size of the window and multiline support
  • Can set all of the windows to different sizes and positions
  • SpeechTag graphics can be used when setting a message window above or below a character (with the :character & :char_ref properties, or the \oc, \uc, or \e codes)
  • \+{} command allows you to expand the text of a choice well beyond the limitations of the program, and the ability to have multiline choices in either the default way or the choicebox makes this feature particularly useful ~ Choices can be sentences if you want them to be!
  • Conditional Choice Options, as well as the ability to skip or disable choices
  • Appended Choice Branches,
  • The new choicehelp window allows you to attach a description to any choice that will show to the player when hovering over that choice
  • The new word window allows you to create a line of instant text to be shown anywhere else on the screen
  • The ability to use dim graphics for all windows
  • Short hand codes for the names, descriptions, and prices for pretty much everything relevant. See the Special Message Codes section for details
  • Lots of text effects, including hex colouring, bold, italic, shadow, underline, and highlight.
  • A large number of vocab, actor, enemy, item, weapon, armor, skill, & state codes, allowing you to retrieve any publicly accessible value from them provided you know the method name.
  • Alignment and tab codes
  • Lots of other new message codes. See below for list
  • A property that you can set to avoid obscuring specified characters when using default positioning
  • Graphic Novel Support
  • A property that allows the player to move while the message window is visible
  • A property that will prevent the message window from refreshing, allowing you to do small things like Show Pictures and controlling switches without the text having to go to a new page.


Screenshots


From Left to Right: Large Faces; Multiline Choices and Name Window; Simple Crafting system made entirely from Advanced Choice Branches of the ATS; Message Window Character positioning with Speech Tag; Tabbing and icon and underline features; Paragraph Format with Justified Text in the midst of a smooth scroll

There are lots of other features too, but screenshots for all of them would be rather tedious

Instructions



Basically: paste the script in its own slot above Main and Below Materials in the Script Editor. If you are upgrading from ATS2, then you will also need this conversion patch. Paste it underneath the ATS3 in the Script Editor, but still above Main.

Complete instructions on what each property or code does can be found in the header of the script, from lines 149-754. But, in brief:

Special Message Codes


Special Message codes are codes placed in messages to be replaced by something specified or to achieve a special effect. An example of the former is \v[n], which, when used, is replaced by the value of Variable n. An example of the latter is \c[n], which, when used, makes all text following the colour with index n on the windowskin palette. The following, contained in the spoiler, are all the new and old special message codes that can be used in ATS3.

Special Message Codes

  • General Codes for all Windows
    • \lb - Line break. Go to next line
    • \v[n] - Draw the value of the variable with ID n
    • \n[n] - Draw the name of the actor with ID n
    • \c[n] - Set the colour of the text being drawn to the nth colour of the Windowskin palette
    • \c[#RRGGBB] - Set the colour of the text being drawn to any colour, using hexadecimal
    • \p[n] OR \pid[n] - Draw the ID of the actor in the nth position in the party
    • \ni[n] - Draw the name of the item with ID n
    • \nw[n] - Draw the name of the weapon with ID n
    • \na[n] - Draw the name of the armor with ID n
    • \ns[n] - Draw the name of the skill with ID n
    • \nt[n] - Draw the name of the state with ID n
    • \nc[n] - Draw the name of the class with ID n
    • \ne[n] - Draw the name of the event with ID n on the current map
    • \nm[n] - Draw the name of the enemy with ID n
    • \nl[n] - Draw the name of the element with ID n
    • \nv[n] - Draw the name of the variable with ID n
    • \nsw[n] - Draw the name of the switch with ID n
    • \np[n] - Draw the name of the actor in the nth position in the party
    • \map - Draw the name of the map the player is currently on
    • \map[n] - Draw the name of the map with ID n
    • \di[n] - Draw the description of the item with ID n
    • \dw[n] - Draw the description of the weapon with ID n
    • \da[n] - Draw the description of the armor with ID n
    • \ds[n] - Draw the description of the skill with ID n
    • \pi[n] - Draw the price of the item with ID n
    • \pw[n] - Draw the price of the weapon with ID n
    • \pa[n] - Draw the price of the armor with ID n
    • \i#[n] - Draw the number of the item with ID n that the party posesses
    • \w#[n] - Draw the number of the weapon with ID n that the party posesses
    • \a#[n] - Draw the number of the armor with ID n that the party posesses
    • \ac[n] - Draw the class of the actor with ID n
    • \i[n] - Draw the icon with index n
    • \ii[n] - Draw the icon of the item with ID n
    • \wi[n] - Draw the icon of the weapon with ID n
    • \ai[n] - Draw the icon of the armor with ID n
    • \si[n] - Draw the icon of the skill with ID n
    • \ti[n] - Draw the icon of the state with ID n
    • \fn[fontname] - Change the font to fontname
    • \fs[n] - Change the fontsize to n
    • \fa[n] - Change the alpha value (opacity) of the font to n
    • \b - Turn bold on
    • /b - Turn bold off
    • \i - Turn italic on
    • /i - Turn italic off
    • \s - Turn shadow on
    • /s - Turn shadow off
    • \u - Turn underline on
    • /u - Turn underline off
    • \hl[n] - Turn highlight with colour n on
    • /hl OR \hl[-1] - Turn highlight off
    • \l - align the text to the left
    • \r - align the text to the right
    • \c - align the text to the centre
    • \t - Tab. Draws the next character at the nearest pixel that is a multiple of 32
    • \f[key] - Draw the value corresponding to that key in the FILTERS array
    • \s[n,text] - Will only draw text if the switch with ID n is ON
    • \s![n,text] - Will only draw text if the switch with ID n is OFF
    • \vocab[method] - Will draw whatever Vocab.method returns, if it is a valid method call. A list of suitable methods are included in the full Instructions
    • \actor_method[n] - This will draw whatever actor.method returns for whoever actor n is. A list of suitable methods are included in the full Instructions
    • \i_method[n] - This will draw whatever item.method returns for the item with ID n. A list of suitable methods are included in the full Instructions
    • \w_method[n] - This will draw whatever weapon.method returns for the weapon with ID n. A list of suitable methods are included in the full Instructions
    • \a_method[n] - This will draw whatever armor.method returns for the armor with ID n. A list of suitable methods are included in the full Instructions
    • \s_method[n] - This will draw whatever skill.method returns for the skill with ID n. A list of suitable methods are included in the full Instructions
    • \t_method[n] - This will draw whatever state.method returns for the state with ID n. A list of suitable methods are included in the full Instructions
    • \enemy_method[n] - This will draw whatever enemy.method returns for whoever the enemy with ID n is. A list of suitable methods are included in the full Instructions in the Header
    • \#{code}# - This will evaluate code. So, if you know scipting, you can place any code there and it will draw whatever is returned by it
    • \resub - this feature will rerun the substitution method. It is useful if you want to use some message codes as arguments for other message codes

  • Message Window Specific Codes
    • \g - Shows a window with the party's gold. Closes if already open
    • \nb[name] - Shows a name box with name displayed in the box
    • /nb - Closes the namebox
    • \wb[word] - shows the word in its own window, similar to the gold window.
    • /wb - Closes a wordbox
    • \. - Wait 15 frames (1/4 second) before drawing the next letter
    • \| - Wait 60 frames (1 second) before drawing the next letter
    • \w[n] - Wait n frames before drawing the next letter
    • \! - Pause. Make the message wait for player input before continuing
    • \^ - Skip the next pause without waiting for player input
    • \> - Speed up the text drawing by reducing wait time between letters by one frame
    • \< - Slow down the text drawing by increasing wait time between letters byone frame
    • \S[n] - Change the speed the text draws by adding n to the current time between drawing letters
    • \S[=n] - Directly set the speed the text draws to n
    • \@ - Turn on Show line fast
    • /@ - Turn off Show line fast
    • \@@ - Turn on Show message fast. This will show the entire message instantly
    • /@@ - Turn off Show message fast
    • \% - Toggle Disable Text Skip through user input
    • \se[sound effect name] - Plays a sound effect
    • \me[music effect name] - Plays a musical effect
    • \ani[target_id,animation_id] - Shows animation_id on target_id
    • \bln[target_id,balloon_id] - Same as ani, but shows a balloon
    • \af[n] - Show the face of the actor with ID n
    • \pb - Page Break. Clear the contents and start drawing from the first line
    • \oc[n] - positions the message box over a character n
    • \uc[n] - same as \oc, but places box under character n
    • \lc[n] - same as \oc, but places box to left of character n
    • \rc[n] - same as \oc, but places box to right of character n
    • \e[n] - same as \oc, but if the box is too tall to comfortably fit, is moved below the character instead
    • \mxy[x, y] - Set the position of the message window to x, y
    • \fxy[x, y] - Set the position of the face window to x, y
    • \nxy[x, y] - Set the position of the name window to x, y
    • \#!{code}# - This will evaluate code at the time the window reaches this code when drawing

  • Choice Branch Specific Codes
    • \skip - Placing this in a choice text means that the player will not be able to hover over or select this option, but will skip to the next one
    • \soff[n] - A choice with this in it will only appear in the branch if the switch with ID n is OFF
    • \son[n] - Same as soff[n], but it will only appear if switch n is ON
    • \d[n] - A choice with this in it will be disabled (unselectable) if the switch with ID n is OFF. It will still show up, and the player can hover over it, but he or she will be prevented from selecting it
    • \d![n] - Same as \d[n], except it will be disabled if switch n is ON
    • \wb[text] - This code will create a help window. When the player hovers over that choice, it will show text in the help window. This allows you to explain the choice or make any content in the help window dependent on which choice the player is on
    • \+{text} - This is actually a code you can put in a comment that is directly below the when branch of a choice, and it will add text to the choice. This effectively ignores the normal limitations on the size of a message in a choice, allowing you to make longer choices



Properties


There are too many to list what each specifically does, so please refer to the Instructions in the Header for that information. What I will do here is give the names and expected value types for each. Properties are set by placing the following codes in a message box:
ats_next (:property, value)
ats_all (:property, value)
where :property is the property you want to change and value is the new value for that property. You should use ats_next when you want to change the text for the next message only, and ats_all if you want to change it for all following messages. Anyway, I will put down the names of each property and the type of value they expect in the form :property, expected value. Expected value may be: number (..., -2, -1, 0, 1, 2, ...); boolean (true/false); array ([a, b, c, ...]); range (a..cool.gif, string ("string")

Properties

  • General Properties
    • :max_lines, number
    • :message_speed, number
    • :skip_disabled, boolean
    • :append_text, boolean
    • :append_choice, boolean
    • :scrolling, boolean
    • :scroll_speed, number
    • :scroll_show_arrows, boolean
    • :scroll_autopause, boolean
    • :scroll_review, boolean
    • :scroll_by_page, boolean
    • :paragraph_format, boolean
    • :justified_text, boolean
    • :letter_sound, boolean
    • :letter_se, ["string", number, number]
    • :letters_per_se, number
    • :random_pitch, range
    • :speech_tag_index, number
    • :speech_tag_graphics
    • :start_sound, boolean
    • :start_se, ["string", number, number]
    • :finish_sound, boolean
    • :finish_se, ["string", number, number]
    • :pause_sound, boolean
    • :pause_se, ["string", number, number]
    • :terminate_sound, boolean
    • :terminate_se, ["string", number, number]
    • :move_when_visible, boolean
    • :graphic_novel, boolean
    • :hide_button, Input::Button
    • :gn_press_or_toggle, boolean
  • Message Window Properties
    • :message_x, number
    • :message_y, number
    • :wlh, number
    • :battle_wlh, number
    • :do_not_obscure, boolean
    • :obscure_characters, [number, number, ...]
    • :obscure_buffer, number
    • :fit_window_to_text, boolean
    • :message_width, number
    • :message_height, number
    • :message_opacity, number
    • :message_backopacity, number
    • :message_windowskin, number
    • :message_fontcolour, number
    • :message_fontname, "string"
    • :message_fontsize, number
    • :message_fontalpha, number
    • :message_dim, "string"
  • Face Window Properties
    • :face_x, number
    • :face_y, number
    • :face_z, number
    • :face_side, boolean
    • :face_offset_x, number
    • :face_offset_y, number
    • :face_width, number
    • :face_height, number
    • :face_mirror, boolean
    • :face_opacity, number
    • :face_blend_type, number
    • :face_fadein, boolean
    • :face_fade_speed, number
    • :face_scroll_x, boolean
    • :face_scroll_y, boolean
    • :face_scroll_speed, number
    • :animate_faces, boolean
    • :letters_per_face, number
    • :face_window, boolean
    • :face_window_opacity, number
    • :face_windowskin, "string"
    • :face_border_size, number
    • :face_dim, "string"
    • :face_use_dim, number
  • Choice Window Properties
    • :choice_text, "string"
    • :disabled_choice_text, "string"
    • :choicebox_text, "string"
    • :choice_window, boolean
    • :choice_x, number
    • :choice_y, number
    • :choice_offset_x, number
    • :choice_offset_y, number
    • :choice_width, number
    • :choice_height, number
    • :column_max, number
    • :row_max, number
    • :choice_spacing, number
    • :choice_opacity, number
    • :choice_backopacity, number
    • :choice_windowskin, "string"
    • :choice_fontcolour, number
    • :choice_fontname, "string"
    • :choice_fontsize, number
    • :choice_wlh, number
    • :choice_dim, "string"
    • :choice_use_dim, number
    • :choice_on_line, boolean
    • :choice_opposite_face, boolean
  • Choice Help Window Properties
    • :choicehelp_x, number
    • :choicehelp_y, number
    • :choicehelp_width, number
    • :choicehelp_height, number
    • :choicehelp_center, boolean
    • :choicehelp_opacity, number
    • :choicehelp_backopacity, number
    • :choicehelp_windowskin, "string"
    • :choicehelp_fontcolour, number
    • :choicehelp_fontname, "string"
    • :choicehelp_fontsize, number
    • :choicehelp_wlh, number
    • :choicehelp_dim, "string"
    • :choicehelp_use_dim, number
  • Name Window Properties
    • :name_x, number
    • :name_y, number
    • :name_offset_x, number
    • :name_offset_y, number
    • :name_opacity, number
    • :name_backopacity, number
    • :name_windowskin, "string"
    • :name_border_size, number
    • :name_wlh, number
    • :name_fontcolour, number
    • :name_fontname, "string"
    • :name_fontsize, number
    • :name_dim, "string"
    • :name_use_dim, number
  • Word Window Properties
    • :word_x, number
    • :word_y, number
    • :word_width, number
    • :word_height, number
    • :word_opacity, number
    • :word_backopacity, number
    • :word_windowskin
    • :word_wlh, number
    • :word_fontcolour, number
    • :word_fontname, "String"
    • :word_fontsize, number
    • :word_dim, "string"
    • :word_use_dim, number
  • ats_next-only Properties
    • :do_not_refresh, boolean
    • :character, number
    • :char_ref, number



The last three are only permitted to be changed by ats_next, not ats_all.


Script


You can retrieve the script either from the demo or the text document. If you are upgrading from ATS2, you also need the Conversion Patch. Paste it underneath the ATS3 in the Script Editor, but still above Main.

Credit



  • modern algebra


Thanks


  • Zeriab! for his tutorial on Regular Expression made this script possible, but mostly for being my mentor and friend. Without him, this script and all my others would never have existed


Support



Post in this topic at RMRK if you have any problems, as I check that forum more frequently. Remember, this script is mostly untested. There are a lot of different combinations of features that may or may not work, I'm not sure. Also, if you have any great ideas for additions to this script, then feel free to suggest them. There's no better time than now.

Known Compatibility Issues


All other Message scripts will not work with this one.

Demo



Download Demo

You can also retrieve the script from the text document.

If you are upgrading from ATS2, you also need the conversion patch. Paste it underneath the ATS3 in the Script Editor, but still above Main.

Graphics


Included in the demo are sample speechtag graphics. The graphics included are: Speech Tag 1, Speech Tag 2, and Thought Tag 1 ~ As you will notice, you need to put these in the SPEECHTAG_GRAPHICS array in the script if you want to be able to use them, and these files must be saved into the System folder of Graphics.

If you wish to create your own, you may use this template:

Basically, 1, 2, 3, & 4 are for the graphic that will appear when a message box is placed OVER a character. 5, 6, 7, & 8 are for the graphic that will show up when the message window is placed UNDER a character. 1 & 2, and 7 & 8 must be 16 pixels tall and this is the point of overlap. This part of the graphic is the part that overlaps with border of the message window. 3 & 4, and 5 & 6, are the parts that do not, and they can be as tall as you want them to be, but 3& 4 must be the same height as 5 & 6. Lastly, there are two columns: 1, 3, 5, & 7, and 2, 4, 6, & 8. The first column is for the background of the speech tag, and it will be shown at the same opacity as :message_backopacity. The second column will be the same opacity as :message_opacity. They can be whatever width you want them to be, provided that each column is the same width.

Author's Notes


Well, I figured it was about time to rewrite this script. I started off with very good intentions, but about halfway through I started coding pretty sloppily. So this script really isn't the best I could do, and I am sure there are a few bugs to be hammered out. But please, try this script out, mention any bugs or incompatibilities you find and I will do my best to fix them up. Also, if you have any suggestions, there is no better time than during this debugging period, as once this script is bugfree I have no intention of looking at it ever again.

This post has been edited by modern algebra: Sep 9 2010, 12:27 PM
Go to the top of the page
 
+Quote Post
   
Apkx24
post Apr 4 2008, 08:03 PM
Post #2


Level 4
Group Icon

Group: Member
Posts: 55
Type: None
RM Skill: Skilled




i get this error

<See attachment>
advanced dialogue script line 538??? No method error???? undefined method 'default_x' for nil:NilClass
right when i hit test play with this script, and i didnt even touch the scripting ( i didnt edit it)
help?
Attached File(s)
Attached File  error.bmp ( 107.27K ) Number of downloads: 186
 
Go to the top of the page
 
+Quote Post
   
modern algebra
post Apr 4 2008, 10:01 PM
Post #3


Level 11
Group Icon

Group: Revolutionary
Posts: 191
Type: Scripter
RM Skill: Skilled




That's very strange. Are you getting this error from the demo?

That error would occur if $game_dlgoptions is not created, so I am guessing that you have a custom script that overwrites the create_game_objects of Scene_Title. Try placing the ADS script below your other custom scripts in the Editor. If that doesn't work, link me to your other scripts or upload a duplicate of your game file (or recreate the error in a different project and upload that, if you don't feel comfortable sharing your real project).

Of course, if you are getting the error from the demo, then the point is moot.
Go to the top of the page
 
+Quote Post
   
PhantomH
post Apr 4 2008, 10:40 PM
Post #4


Ushiromiya Battler
Group Icon

Group: Revolutionary
Posts: 758
Type: Writer
RM Skill: Skilled




I was wondering if you can customize the choice boxes to make them align next to each other instead of on top, or both ways. Ex. of what I mean:

Layout 1:

Ch1 [XXXXX] Ch2 [XXXXX]

Layout 2:
Ch1 [XXXXX] Ch2 [XXXXX]
Ch3 [XXXXX] Ch4 [XXXXX]

I haven't looked at the demo yet, but I'll check it out when I get back on later so sorry if it's explained in there.


__________________________
Go to the top of the page
 
+Quote Post
   
SojaBird
post Apr 5 2008, 03:01 AM
Post #5


Level 51
Group Icon

Group: Revolutionary
Posts: 1,573
Type: Scripter
RM Skill: Advanced




I think I prefer Neo Messages better


__________________________
Art from the highest shelf?

Scriptology, scripting podcast



HUD's Request Lobby (multiple hud-scripts)


------------------------------------------------------------------

Random Stuff
OMG, it's Hab!!


This is a crazy drawing application! (by me)

How did I learned to script
QUOTE
Hey pim! I'm the Law G14!

For the past couple of months I've been learning RGSS and I've got the basic stuff down such windows, variables, conditional statements, ect. But, I can't see myself making big scripts such as a jumping system or a side view battle system. I was wondering how you learned to script because I really want to know how to script really well.

Thanks in advance.


Hey there,

Well I don't make battle neither though I can still teach you some things :)...
The way I've learned to script is by reading other scripts for the most part.
I've allways been interested in other peoples work but this time I though I had to try to make something myself...and it worked!!
The most importand thing when you go scripting is (at least in my case) that you want to make something to help an other wich can't script.
You also need to feel the competition that's around in the scripting-community.
Cause, I have to say, if you get pushed to get a sertain request done before an other scripter does, you feel POWERFULL!! :P
So that's an other thing...
You also don't need to be afraid to learn from others or helpfiles.
When I write my scripts, I actualy always have the helpfiles open to look things up I don't know or remember.
Then, you must be calm, cause you need to try the script a lot of times.
When I write a script, I test it after almost every changes.
First I set up the major structure.
Like when I make a window-script or part of a script I start with something like this:
CODE
class Window_Name < Window_Base
def initialize(x,y,width,height)
super(x,y,width,height)
refresh
end

def refresh
self.contents.clear
draw_contents
end

def draw_contents
draw_something(with, some, parameters)
end

def update
refresh if @something != @what_it_should_be
end
end
So that's also very important.
Then, the biggest thing I learned scripting from is TRIAL AND ERROR.
That's the most irritating way to learn something, cause it's more ERROR than TRIAL, but it does the trick realy good.

So that's it how I did it.
Now it's up to you.
Do some requests (if I didn't do it allready :P) and learn from them.

Hope that helped you out a little.
If not, keep your eye on the Scriptology-topic (see my sig) where I'll be updating for my scripting(video)tutorials.
Perhaps they're going to be usefull for you one day ;)


Greatzz,
SojaBird.
Go to the top of the page
 
+Quote Post
   
modern algebra
post Apr 5 2008, 08:52 AM
Post #6


Level 11
Group Icon

Group: Revolutionary
Posts: 191
Type: Scripter
RM Skill: Skilled




QUOTE (PhantomH @ Apr 5 2008, 01:54 AM) *
I was wondering if you can customize the choice boxes to make them align next to each other instead of on top, or both ways. Ex. of what I mean:

Layout 1:

Ch1 [XXXXX] Ch2 [XXXXX]

Layout 2:
Ch1 [XXXXX] Ch2 [XXXXX]
Ch3 [XXXXX] Ch4 [XXXXX]

I haven't looked at the demo yet, but I'll check it out when I get back on later so sorry if it's explained in there.


That's actually not an option, but I can add it if you like.

@pim321 - well NMS is a good script too. I think our two scripts have a different focus, though with some overlap, and obviously whichever focus suits your game is better for you to use.

This post has been edited by modern algebra: Apr 5 2008, 12:22 PM
Go to the top of the page
 
+Quote Post
   
Apkx24
post Apr 5 2008, 09:23 AM
Post #7


Level 4
Group Icon

Group: Member
Posts: 55
Type: None
RM Skill: Skilled




it doesnt allow me to upload it i tried doing the .exe installer, it wont let me and i tried doing the whole project, wont let me and i even tried just the script

and then it wont even let me upload an image it keeps saying i did not select a file, which i did....
and i tried 5 times and it says the same thing...
wtf? how do i get it to where you can d/l it? link to another website or is it because of my status as amember or something
Go to the top of the page
 
+Quote Post
   
modern algebra
post Apr 5 2008, 09:25 AM
Post #8


Level 11
Group Icon

Group: Revolutionary
Posts: 191
Type: Scripter
RM Skill: Skilled




Upload it to sendspace.com perhaps.
Go to the top of the page
 
+Quote Post
   
cyrus_the_virus
post Apr 5 2008, 03:14 PM
Post #9



Group Icon

Group: Member
Posts: 2
Type: Scripter
RM Skill: Beginner




i am a noob but can someone tell me how to exactly put the code in the game and how to operate with it
loved the demo
Go to the top of the page
 
+Quote Post
   
PhantomH
post Apr 5 2008, 03:24 PM
Post #10


Ushiromiya Battler
Group Icon

Group: Revolutionary
Posts: 758
Type: Writer
RM Skill: Skilled




QUOTE (modern algebra @ Apr 5 2008, 09:06 AM) *
That's actually not an option, but I can add it if you like.

@pim321 - well NMS is a good script too. I think our two scripts have a different focus, though with some overlap, and obviously whichever focus suits your game is better for you to use.


It'd be great if you can add it smile.gif . That's one of my most wanted things in a message script right now. Btw, when I tried talking to the character right beside the starting point, it says something about unable to find "MessageBackSmalls.".


__________________________
Go to the top of the page
 
+Quote Post
   
modern algebra
post Apr 5 2008, 03:30 PM
Post #11


Level 11
Group Icon

Group: Revolutionary
Posts: 191
Type: Scripter
RM Skill: Skilled




Oh, oops tongue.gif

I was testing the message back feature with her. I will upload a new version soon, but for now you can just delete that line from the event if you want to see the resized window features.

Also, @cyrus - just open the script editor in the demo (F11) and near the bottom of the list will be two entries titled Paragraph Formatter v 1.1 and ADS respectively. Just copy them and paste them in your project's editor.

This post has been edited by modern algebra: Apr 5 2008, 03:32 PM
Go to the top of the page
 
+Quote Post
   
cyrus_the_virus
post Apr 6 2008, 05:37 AM
Post #12



Group Icon

Group: Member
Posts: 2
Type: Scripter
RM Skill: Beginner




okay i succesfully added the script but i don't exactly know what script line does what?
Go to the top of the page
 
+Quote Post
   
modern algebra
post Apr 6 2008, 09:37 AM
Post #13


Level 11
Group Icon

Group: Revolutionary
Posts: 191
Type: Scripter
RM Skill: Skilled




I'll add more useful descriptions in the comments in the features, but for now just look at the constants section - since most off the command lines share the same name it should give you a good impression of what does what. The constants section starts at line 178 in the ADS script.
Go to the top of the page
 
+Quote Post
   
Apkx24
post Apr 9 2008, 03:10 PM
Post #14


Level 4
Group Icon

Group: Member
Posts: 55
Type: None
RM Skill: Skilled




http://www.sendspace.com/file/3d11vj

that is a blank project that has all my scripts, can someone look at it and plz help me?
im using the animated title, could that be it? how could i make both compatible with eachother? thx
Go to the top of the page
 
+Quote Post
   
modern algebra
post Apr 9 2008, 03:34 PM
Post #15


Level 11
Group Icon

Group: Revolutionary
Posts: 191
Type: Scripter
RM Skill: Skilled




Yeah, it's the Skip Title script. I'll have to give woratana a talking to tongue.gif

TO fix it, go to the Skip_Title entry in the editor and at line 82:

CODE
$game_temp = Game_Temp.new


insert a line right above that, so that it looks like this:

CODE
  $game_dlgoptions = Game_DialogueOptions.new
  $game_temp = Game_Temp.new


Also, I notice that you have Paragraph Format on in your script entry, but do not have the Paragraph Formatter script. You will have to get that script here in order for paragraph formatting to work.
Go to the top of the page
 
+Quote Post
   
Automaton
post Apr 13 2008, 12:30 PM
Post #16


Level 27
Group Icon

Group: Revolutionary
Posts: 632
Type: Artist
RM Skill: Skilled




QUOTE (modern algebra @ Apr 2 2008, 10:55 PM) *
Advanced Dialogue System
Version: 1.11
Author: modern algebra
Date: March 18, 2008

Version History


  • Version 1.11 - Minor bug fix with \px - added option to choose how many choices to show in a choicebox before it starts scrolling. - added option to change the back_sprite when you use dim background. So now 50 runtime messages. Also, Animated Facesets was changed to allow for many more frames.
  • Version 1.1 - It is now possible to set the position and size of the message window
  • Version 1.0 - Original Release.


Description


This script allows for various complex message commands. Among the features are some that will be familiar from previous message scripts, such as
Seasons in the Abyss' SMS and AMS. Others, such as the formatted text and the animated facesets, are completely new (as far as I know). See below for the features and command codes

Features


  • Separate Choice Box and Appended Choice Branches
  • Name Window
  • Paragraph Formatting
  • Animated Facesets
  • Appended Text Commands and Scrolling Message Window
  • Variable Letter-by-Letter Speed
  • Can play a sound effect as text is drawn
  • Lots of new message codes. See below for list
  • High in-game customizability
  • NEW in Version 1.1 - Can set the message window to different sizes and position


Screenshots





NEW in V. 1.1


There are lots of other features that screenchots cannot capture.

Some of the graphics I used, like those two facesets (three actually - the blonde guy is animated), are taken from one of the sample games

Commands

CODE
Special Codes:
   Retained Codes:
     \v[x] - Shows the value located in the variable x
     \n[x] - Shows the name of the Actor with ID x
     \c[x] - Changes the colour of the text to x. x can be 0 - 31
     \g    - Shows the gold window
     \.    - A short pause of 15 frames (1/4 second) before continuing drawing
     \|    - A longer pause of 60 frames (1 second) before continuing drawing
     \!    - Pause. Waits for user input before continuing
     \^    - Pause Skip. Forgoes user input at next pause. Can autoclose message
   Modified Codes:
     \>    - Speeds up the letter by letter process
     \<    - Slows down the drawing of the text
     \@    - Show Line Fast (the current line gets displayed quickly). This
             replaces the old functionality of \>, \<
     \@@   - Show message fast (to next scroll)
   New Codes:
     \nc[x]- Shows the name of class with ID x
     \ac[x]- Shows class of actor with ID x
     \np[x]- Shows the name of the Party Member with index x
     \ne[x]- Shows the name of Event with ID x on the map
     \nm[x]- Shows the name of Monster with ID x
     \ni[x]- Shows the name of Item with ID x
     \nw[x]- Shows the name of Weapon with ID x
     \na[x]- Shows the name of Armour with ID x
     \pi[x]- Shows the price of Item with ID x
     \pw[x]- Shows the price of Weapon with ID x
     \pa[x]- Shows the price of Armour with ID x
     \iicon[x] - Shows the Icon of Item with ID x
     \wicon[x] - Shows the Icon of Weapon with ID x
     \aicon[x] - Shows the Icon of Armour with ID x
     \icon[x] - Shows the Icon with ID x
     \fn[font name] - Changes the font to font name chosen
     \fs[x] - Changes the font size to x
     \name[name] - Shows a name box with name displayed in the box
     \ani[target_id,animation_id] - Shows animation_id on target_id. 0 => player,
                           other numbers indicate the ID of the event
     \bln[target_id,balloon_id] - Same as ani, but shows a balloon
     \lb - Line Break. Applies only when Paragraph Formatting and it goes
           to next line
     \% - Disable Text Skip through user input
     \se[sound effect name] - Plays a sound effect
     \me[music effect name] - Plays a musical effect
     \oc[character_id] - positions the message box over character. 0 => player;
                           other positive integers indicate events on map
     \uc[character_id] - same as oc, but places box under character
     \lc[character_id] - same as oc, but places box to left of character
     \rc[character_id] - same as oc, but places box to right of character
     \px[x] - Sets the box's x position at x
     \py[y] - Sets the box's y position to y

Special Settings:
   In addition to the new codes, there are new settings that can be set for messages through call script. To change a setting for an individual message, use the $game_message variant of the following codes. To change the setting for all messages, use the $game_dlgoptions variant. For the sake of convenience, only the $game_message codes will be run through, but each code can also be used by $game_dlgoptions:

     $game_message.x = positive integer (0-Resolution width, by def. 544)
     $game_message.y = positive integer (0-Resolution height, by def. 416)
     $game_message.width = positive integer (1-Resolution width, by def. 544)
     $game_message.height = positive integer (1-Resolution height, by def. 416)
     $game_message.faceside = true/false
     $game_message.facesize = positive integer (ex. 96)
     $game_message.opacity = positive integer between 0 and 255 (ex. 200)
     $game_message.fontname = "font name" (ex. "Arial", ["Arial", "Times New Roman"])
     $game_message.fontsize = positive integer (ex. 16)
     $game_message.windowskin = "Skin File" (ex. "Window")
     $game_message.paragraph_format = true/false
     $game_message.justified_text = true/false
     $game_message.wlh = positive integer (ex. 24)
     $game_message.scrolling = true/false
     $game_message.shown_lines = integer (ex. 4)
     $game_message.autopause = true/false
     $game_message.choicebox = true/false
     $game_message.choices_appended = true/false
     $game_message.choicebox_on_line = true/false
     $game_message.choicebox_width = positive integer (ex. 160)
     $game_message.choicebox_opacity = positive integer between 0 & 255 (ex. 200)
     $game_message.choicebox_fontname = "font name" (ex. "Arial")
     $game_message.choicebox_windowskin = "Skin File" (ex. "Window")
     $game_message.choicebox_offset_x = integer
     $game_message.choicebox_offset_y = integer
     $game_message.number_choices = positive integer (I'm an idiot. In the script I wrote positive integer > 1 :P)
     $game_message.lbl_se = true/false
     $game_message.message_se = "Audio File" (, volume, pitch) [volume and pitch optional]
     $game_message.mt_se = true/false
     $game_message.termination_se = "Audio File" (, volume, pitch) [volume and pitch optional]
     $game_message.mp_se = true/false
     $game_message.pause_se = "Audio File" (, volume, pitch) [volume and pitch optional]
     $game_message.ms_se = true/false
     $game_message.start_se = "Audio File" (, volume, pitch) [volume and pitch optional]
     $game_message.mf_se = true/false
     $game_message.finish_se = "Audio File" (, volume, pitch) [volume and pitch optional]
     $game_message.letter_frames = integer (ex. 1)
     $game_message.face_letters = integer (ex. 2)
     $game_message.sound_letters = integer (ex. 3)
     $game_message.namebox_fontname = "font name" (ex. "Arial")
     $game_message.namebox_fontsize = positive integer (ex. 16)
     $game_message.namebox_windowskin = "Skin File" (ex. "Window")
     $game_message.namebox_colour = positive integer between 0 & 31 (ex. 7)
     $game_message.namebox_opacity = positive integer between 0 & 255 (ex. 200)
     $game_message.namebox_offset_x = integer (ex. 8)
     $game_message.namebox_offset_y = integer (ex. 16)
         $game_message.back_sprite = "filename"

   Two Options which do not exist in dlgoptions but do in $game_message are:

     $game_message.character = integer (0 => player, >0 => events on map)
     $game_message.char_ref = integer (0 => above, 1 => below, 2=> left, 3=> right)

   These options allow you to position the window in reference to a character on the screen.

   If you want to reset all the values to default, just use the code:

     $game_dlgoptions.reset
     $game_message.clear

To use the Animated Facesets, all you need to do is name the facesets that are animated the same, but with the suffixes _1, _2, etc... Also, note that this script will interpret a face graphic with a $ in front of the name as being single, and will draw the entire file rather than 1/8 of it. This single does not extend to other places - only the message window, so do not use single facefiles for an actor and expect it to be drawn as such in the menu, etc...


Script



NB: If you use Paragraph Formatting, then this script requires the Paragraph Formatter that can be found here: http://rmrk.net/index.php/topic,25129.0.html

Script is too long.
Text document containing the script is attached. I'd recommend the demo so you can see how some of the features work.

Credit



  • modern algebra


Thanks


  • Zeriab! Not only did his instruction make the Paragraph Formatter possible, but his tutorial on Regular Expression made this script possible
  • Seasons In the Abyss - some of his ideas for his RMXP Message Systems were very good, like the name box and various commands of the sort
  • Arrow-1 - several of his ideas, including the animated facesets and the \se code (that was scripted by Zeriab). He also caught a significant bug with mid-message pauses and scrolling. His request gave em the motivation to write the script
  • Irock - His ideas for Text Advancement and Termination sound effects


Support


Post in this topic with any bugs or issues. Also any suggestions. Remember, this script is mostly untested. There are a lot of different combinations of features that may or may not work, I'm not sure. Hopefully, everything works properly though. Since I'm not particularly active at this forum, for the quickest support please post your concerns here. However, I will try to check back here so if you're patient, feel free to post it here.

Known Compatibility Issues


All other Message scripts will not work with this one, aside from aliased replacement codes. In other words, the only message scripts that will work with this one are ones that replace special codes with words. For instance, from default, the \n[y] code replaces itself with the name of Actor y. Message Scripts that alias the convert_special_codes method with codes like that will still work as long as they do not use the same code as one of mine.

Demo


http://www.sendspace.com/file/fb85o9

where do you post this!


__________________________
Go to the top of the page
 
+Quote Post
   
woratana
post Apr 13 2008, 01:00 PM
Post #17


Looking for scripter to hire? PM me *O*
Group Icon

Group: +Gold Member
Posts: 1,038
Type: Scripter
RM Skill: Undisclosed




Automaton, Do you mean where to put script?

Just put it above main smile.gif


__________________________
Check out my NEW blog!!!



MVP (Most Valuable Poster) Award 2008


Go to the top of the page
 
+Quote Post
   
kami no kitsune
post Apr 13 2008, 07:50 PM
Post #18


Level 5
Group Icon

Group: Member
Posts: 70
Type: Event Designer
RM Skill: Beginner




I'm getting a problem with the demo. The pink haired girl throws an error "unable to find Graphics/system/messagebacksmalls"


__________________________
Go to the top of the page
 
+Quote Post
   
modern algebra
post Apr 14 2008, 01:24 AM
Post #19


Level 11
Group Icon

Group: Revolutionary
Posts: 191
Type: Scripter
RM Skill: Skilled




Yeah, I was testing something out with her for the next version. I forgot to remove it when I released the demo. I also use an outdated code on one of the events in the cabin. Anyway, I'm uploading a new version now with a few minor changes. Namely:

  • Fixed a minor error in the positioning of back sprites.
  • Removed the Graphic not found error that would crash the game if a back sprite did not exist. It now defaults to the previously used back sprite
  • Choice boxes can have multiple columns.
  • Added option to draw the face mirrored.


Anyway, unless people find bugs, I think that is all I am planning to add to this script in terms of features. I guess if anyone has any really cool ideas, suggest them and I will consider adding them, but I think I'm pretty much done with this script smile.gif

I also changed the name of the script to Advanced Text Script as my previous name was rather poorly chosen. Dialogue in programming refers to something else entirely. Since I assume some people are using this already though, I did keep the game object name as $game_dlgoptions because I don't want to force people to go all through their events and change everything. Oh well sad.gif

This post has been edited by modern algebra: Apr 14 2008, 01:28 AM
Go to the top of the page
 
+Quote Post
   
Nessiah
post Apr 14 2008, 03:29 AM
Post #20


Sleep Deprived
Group Icon

Group: Revolutionary
Posts: 548
Type: Artist
RM Skill: Advanced




Is it also possible to be compatible with Neo Message System? Where you can use big facesets?


__________________________


I'm not joining any projects. The only way to make me is to either pay me or trading =v=)b

QUOTE
The way you speak about rm2k3, like "modules, arrays, pointers" sounds like you're some badass c++ programmer stuck in the past and only has rm2k3 to work with" -Gutts
Go to the top of the page
 
+Quote Post
   

7 Pages V   1 2 3 > » 
Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 

Lo-Fi Version Time is now: 19th May 2013 - 11:22 AM
RPG RPG Revolution is an Privacy Policy and Legal
eXTReMe Tracker