Main Menu
  • Welcome to The RPG Maker Resource Kit.

Advanced Text System 3.0c

Started by modern algebra, March 18, 2008, 09:32:30 AM

0 Members and 4 Guests are viewing this topic.

Xapples

Thanks for making such an awesome script!

I just have one question.

Is there any way to make each character have a different pitch for their "voice"?
I've tried changing it through a call script event, but it keeps throwing syntax errors back at me.

The script event: ats_all (:letter_se ~ "Cancel", 40, 130)

Is it just my scripting illiteracy, or is this not possible to do?

Thanks in advance!

modern algebra

Well, the mistake is the ~.

Put the following instead:

ats_all (:letter_se, ["Cancel", 40, 130])

Xapples

Thanks for the help!

Works perfectly now.

IXFURU

I have a question about the filters.   It's used by placing \f
  • .  Say I wanted one which said the names of the lead actor.  In my project, there are four.  So, in the following setup:
    [spoiler]FILTERS = {                   # See line 457.
        'ATS' => '\c[1]Advanced Text System\c[0], Version 3.0',
        0     => 'Numbered filters work too',[/spoiler]

    is the x representing the number or letters to the left?   Or should I set it up like this?


    'names'  => '\n[1], \n[2], \n[3], \n[4]'



    You say it will hold a hash, so do I call the \f[names, 3] if I want to say the 3rd Actor's name?

    What I've been doing is having to use multiple text boxes based on conditional branches.  I think this could help, if I could understand how to use it.  If it only holds the number on the left, then won't I still have to use conditional branches?

modern algebra

Yeah, you would. The filter takes the key on the right and replaces it with the string on the left. So, it wouldn't work for what you want it for.

However, you could simply use the code:


\np[0]


and that will print out the name of the lead actor.

Also, you might want to look into the \s and \s! codes, since they allow you to include text in a message on the basis of the value of a switch. That sounds more like what you are looking for. With that, for instance, you would be able to make a filter like the one you were asking about simply by having four switches and turning on one based on who the lead actor is. Like I said, however, better to simply use the \np code in that case, but it's an option if you wanted to do similar things, like change the dialogue based on who is the lead actor.

modern algebra

Alright, another new version! Sorry guys. I really hope this will be the last. None of the bugs fixed this time were fatal, but they are problematic if you wish to use the following features:

The primary reason for this update was to fix a non-fatal issue that deadnub brought to my attention: when using the :fit_window_to_text property, the window would not be resized if a message was smaller than a previous message. This has been fixed in 3.0c.

There was also a problem with the appended choices: in some cases, when a player repeated a choice branch, the cancel conditions would be thrown off. That has been fixed and it should work perfectly fine no matter how many times a player repeats an appended choice branch.

Another issue was when moving a text box around using the \oc, \e series of codes, the paragraph format would be thrown off for one line. That is now fixed as well.

And finally, I also added a new message code: \x[n]. This allows you to set the x position for drawing directly to n, a useful feature for formatting purposes and similar to the tab code, but more explicit.

Anyway, if you don't need any of the above, then it is not crucial to update to 3.0c.

kreavenkreaven

Great to see the :fit_window_to_text property work all fine now.

I've run into another little problem, though - using justification with italics (I suppose it concerns the bold text as well). Italics cause the text not to fit the window sometimes, if you're using justification. Making it work with the three default fonts would be good. Don't know how many people use justification, so it may be of little priority to fix it.

Cascading Dragon

With italics and bold fonts, its hard to guess the size they use. I believe MA has said somewhere that he can't make it work for everything, and its up the the developer to play test it.

modern algebra

Yeah, the paragraph formatter relies on the text_size method of Bitmap, which unfortunately is not accurate when it comes to italicized text (though I think it actually is with regard to bolded font). The way to fix it would be to manually tweak the text_size method to return the correct value for each font and for each individual character, which requires a scripter. I might be able to whip up a little RM-based program that will allow you to do the tweaking yourself and generate the code to do that for the text_size method, but I am very busy at the moment, so we'll have to see about that.

IXFURU

#309
Modern.

I have a question about the Choice Branches.

I've been trying to use a Choice Box to sell furniture to a player who has purchased a house in my project.   When you go to the furniture store, and select which house you wish to add to, you are given Appended Choice Branches, based on possible upgrades.  There are two possible upgrades for each room of the house.   Therefor, I've got it setup so only the second upgrade is not visible  (\son[]) until the first Upgrade is purchased.  At which point, the first upgrade choice is rendered disabled using \d[].

Now, after the player upgrades to the second one, both should be disabled.   That's when I'm having a hard time finishing the sequence. 

I'm looking for a way to make both codes work on the same line.  Like this \son[x]\d[y]LIVING ROOM 2

For some reason, though the code show selection if switch x is on and disable it if switch y is on, it simply disables it. 

Is it not possible to use a double code like that?

modern algebra

Well, they should work together, and I did a short test and they did. I think you're using the wrong code for what you want though. If you want to disable it when switch y is on, you should be using \d![y]. \d[y] disables the choice as long as switch Y is off.

That sounds confusing, so in other words, the way the code you have works is that the choice will not show up unless switch X is ON, and will be disabled unless switch Y is ON. If you want it to be disabled if switch Y is on (it sounds like you do), then use \d![y]

IXFURU

Yes, that was confusing.  But you were right.  It works.  Thanks again.

IXFURU

Just a suggestion, M_A:

afp[x] show face of actor in the nth position?

This would be helpful if there were multiple front of the party possibilities.

modern algebra

you could always do this:

\af[\p[x]]

The construction you have might be a little more simple though. What I really should have done is made it so that \n[0] and \af[0] would show the first actor in the party, as it was in RM2k3, but I forgot about it.

IXFURU


IXFURU

Hey Modern,

I'm still using the crap out of this script.  I wanted to let you know that I found what may or may not be considered another bug in it. 

For some reason, there are a few times, when I had an NPC say something, immediately followed by a choice branch.    And in certain instances, the choices wouldn't show and the game would resume as if by cancel.   I've been working around it, by excluding the choices in these situations.  But today, I had an idea that maybe since I left the default max lines at 4, and there wasn't room for the choices in the message box, that it wouldn't show them. 

I got this impression, because when it happens, the namebox disappears on the first spacebar or enter input, and it takes a second one to remove the message box.    At length, I decided to change the default "false" boolean which is designated to the "opens choices in another box" option to "true".   And it worked.

Anyway, I just wanted to let you know.  It's not a real problem and I doubt anyone has run into it before.  Most people can probably figure it out if it does.  I know you just released the new version, so I was hesitant to tell you.  But I figured you'd like to know in case the problem ever arises again. 

modern algebra

Alright, thanks for telling me. I will definitely look into it once I have the time.

Wiimeiser

Minor issue, Yanfly's game options script doesn't work correctly, in that the windowskin you choose won't be used. Surely this can be fixed?

modern algebra

Well, link me to it and I will take a look.

Deity

You're genius MA. :)
This is a very good Message System which have more features then anyone will be able to use. xD
Keep on doing such freaky scripts.

Deity
Greetings
DigiDeity


├Work┤
├Contact┤


Wiimeiser


modern algebra

Alright, well that script does more than just select a windowskin. It also sets the bold, italic, shadow, size, name, and color. Do you also want all that or just the windowskin?

Lysop

Is it possible to create a conditional branch for choices?
Like this:

If a switch or variable doesn't fit, an other choice is activated.
It should be all in one window!
(im sorry if there is a possibility, but I dont find it)

modern algebra

There are very good reasons for choices not being added externally in the way you describe, but there are other ways to do what you want - use the \soff and \son codes. You should find a description of how they work in the Instructions - special codes list. Essentially, the only thing they can check is the value of a switch, so it is not as extensive as a conditional branch, but you can use conditional branches beforehand to determine the value of the switch. So your example will look like this:


@>Show Choices: \d[200]Mission 2-1, \son[261]Mission 2-2, \soff[261]Mission 2-3, Mission 3-1
  :  When [\d[200]Mission 2-1]
    @>
  :  When [\son[261]Mission 2-2]
    @>
  :  When [\soff[261]Mission 2-3]
    @>
  :  When [Mission 3-1]
    @>
  :  When Cancel
    @>
  :  Branch End
@>


To use the full range of conditionals, then you would need to do the checks before hand and turn the switch on or off accordingly

Lysop

Oh, thanks, you are right! It's more or less that what I want :) !