PDA

View Full Version : New String Editor: mostly functional



_L_
01-05-2007, 12:11 AM
For the complete, up-to-date list of string control codes, consult the ZCWiki page (http://www.shardstorm.com/ZCwiki/String_Editor).

Here are the changes so far: firstly, you now input strings in the box at the top. The bottom pane is now used simply to preview the string. (EDIT: Also, you can change the Y position of the string by inputting a number into the box which I didn't have time to align properly. Also, you can set a 2x2 frame for your string by clicking the black tile. No, you can't make it transparent just yet.) Importantly, if you insert certain numeric codes into your string, you can make them do a variety of things.

(Henceforth, replace instances of "X" with a number from 0 to 254. Usage example: insert "\20\12" into a string to play sound effect 12 at that point.
Silvered-out codes are probably not present in this beta.)

Formatting Codes:

\1\X\X - Text Colour. Changes the following text to a certain colour. Argument 1 is the CSet, and argument 2 is the colour.
\2\X - Text Speed. Sets the length of the delay between text characters appearing. Normally 5. If 0, text appears instantaneously. Argument 1 is the speed. (Note: probably doesn't work just right yet.)

Switch Codes:

\3\X\X\X - Goto If Global. If a certain global script variable (that is, a value handled by the ZASM command GDD) is at or above a certain value, then ZC switches to another string. Argument 1 is the global variable ID, argument 2 is the value, and argument 3 is the string to switch to.
\4\X\X - Goto If Random. There is a one-in-(argument 1) chance that ZC switches to another string (argument 2).
\5\X\X - Goto If Item. If Link has a certain item, then ZC switches to another string. Argument 1 is the item ID (consult the I_* code listing in std.zh), and argument 2 is the string to switch to.
\6\X\X\X - Goto If Counter. If a counter is at or above a certain value, then ZC switches to another string. Argument 1 is the counter, argument 2 is the value, and argument 3 is the string to switch to.
\7\X\X\X - Goto If Counter %. If a counter is at or above a certain percentage of its maximum, then ZC switches to another string.
\8\X\X - Goto If Triforce. If Link has acquired the Triforce from a certain level, then ZC switches to another string. Argument 1 is the level, and argument 2 is the string to switch to.
\9\X\X - Goto If Triforce Count. If Link has acquired a certain number of Triforce pieces, then ZC switches to another string. Argument 1 is the quantity, and argument 2 is the string to switch to.

Counter Codes:

\10\X\X - Counter Up. Increases a counter by a certain value. Argument 1 is the counter, and argument 2 is the value.
\11\X\X - Counter Down. Reduces a counter by a certain value. Argument 1 is the counter, and argument 2 is the value.
\12\X\X - Counter Set. Sets a counter to a certain value. Argument 1 is the counter, and argument 2 is the value.
\13\X\X - Counter Up %. Increases a counter by a certain percentage of its maximum. Argument 1 is the counter, and argument 2 is the percentage.
\14\X\X - Counter Down %. Reduces a counter by a certain percentage of its maximum. Argument 1 is the counter, and argument 2 is the percentage.
\15\X\X - Counter Set %. Sets a counter to a certain percentage of its maximum. Argument 1 is the counter #, and argument 2 is the percentage.
Other:
\20\X - Plays a sound effect. Argument 1 is the sound effect.


Super Short Example Quest Sunshine! (http://www.greyfire.org/~l/dialoguetest.qst)

Yes, you need beta 16c!

Please test them out and report bugs!

idontknow
01-05-2007, 12:32 AM
Sweet! How about codes that actually show the value of the counter in the string! Perhaps by using brackets [] instead of slashes \\

For instance lets say counter 1 is for bombs, counter 2 is for super bombs, & counter 3 is for keys, & counter 4 is for rupees.

If you put [1] in your string, then the message will insert the number of bombs that the player currently has into this string.

So for example, you could have a message in a bomb shop which appears in zquest as:
"Link I see that you have [1] bombs with you. Would you like to buy more?"
However, when actually playing the quest, [1] is replaced by the counter's actual value, such as:
"Link I see that you have 4 bombs with you. Would you like to buy more?"

You could also use have the following in a shop.
"Link, I see that you have [4] Rupees and [2] Super Bombs."

In zquest it would actually shows those values. Then if the amount of rupees link has equals or is is greater than the cost of super bombs in that shop, the shopkeeper could say "Link, why don't you buy some more super bombs?"

If not, then a string appears that says "Oh too bad you don't have enough rupees to buy more super bombs!"

Stungun
01-05-2007, 01:55 AM
Speaking of \\, can we use \\ just to print a backslash in our strings?

_L_
01-05-2007, 02:29 AM
Uhh... maybe later.

Shoelace
01-05-2007, 03:30 AM
I love it. Thank you so much _L_! The only thing limiting now is the LoZ invisible wall where you can't walk in the first 5 combos from the top (and of course the size and style of the words, but I bet that is what \3 and \4 are saved for). But this is exactly what I wanted. Thank you.

CastChaos
01-05-2007, 12:20 PM
So, now we don't have to hussle with One Time Events, we don't need to waste DMaps to change a string after getting a Triforce piece... Just set the string and go... Since the counter modifiers, it can be used even when the give away item needs to change, too. Maybe in the distant future strings will give us items, too... so it will be "time up" for One Time Events...

The_Amaster
01-05-2007, 06:54 PM
Well, now more than ever, I want custom item classes, cause my trading swquence just got a whole lot easier.

Stungun
01-05-2007, 07:41 PM
Do the counter modifiers respect counter maximums, and can we use erronious counter IDs just for reference? (e.g. counter 50, and use these as primitive variables)

Or perhaps you have plans to allow variable support in these codes.

The_Amaster
01-07-2007, 03:13 PM
Hey L, any chance we could get a tag for item giving? For example, \#\X\X, where the first X is item class, second is item level.
And I'm still hoping for generic itme classes.

Master_of_Power
01-14-2007, 02:22 PM
I noticed you can change the font, how is this done?

ShadowTiger
01-14-2007, 02:26 PM
There's no way to insert these tags via a right-click command, is there? Just a random, stray thought.

DarkFlameWolf
01-15-2007, 06:02 PM
Any way you can have the switch to options be tagged to a global variable script. It would make quest givers like in games of Morrowind or Oblivion be possible. For example, you could have multiple quest lines going at the same time, but as long as you had global script variables it checks for, the strings would come out all right. Did this make any sense?

_L_
01-19-2007, 01:11 PM
A control code, "Goto if global variable >= X"? It's possible... I think.


I noticed you can change the font, how is this done?

By patiently waiting until I've enabled it in the editor!

Freelancer
01-28-2007, 09:40 PM
This really will be useful when I wish to have characters give clues/emphasise their words like in most of the zelda games these days. I have some ideas though (I hope I'm not getting annoying).

- option to automaticly add an item (not just a counter item to the character's iventory.

- option to automaticly take away an item from the character's inventory. Yes I do have a way of using this.

- there was one more thing related to this that I wish to add. When I remember it, I'll add it to the list.

Thank you!

Saffith
01-29-2007, 01:43 PM
Writing strings out in that one-line box at the top is a bit awkward, as you know. I wonder if it wouldn't be possible to separate out the control codes from the string text in the presentation.

What I'm thinking is this. Let the string text be written in the preview box, like it was originally, and automatically escape any backslashes typed there. Then the text field at the top would be used only to edit control codes at the current cursor position. There'd have to be little markers in the preview indicating where there were codes, then.
Does that sound doable?

ShadowTiger
01-29-2007, 02:20 PM
There's no way to insert these tags via a right-click command, is there? Just a random, stray thought.I keep thinking this would be a good idea. (No, I am not replying to myself. :p Just recalling a good idea.)

While we seem to have a fairly limited amount of string control codes at the moment, I figure they wouldn't be expanding a right-click menu too much. Even so, you could still create subgroups. When you click on an end point in the submenus, i.e. a color code or font code, it'd prompt you for the type. It'd mean no more looking up the codes or colors or fonts etc.

_L_
06-04-2007, 12:49 PM
Oops - forgot to list the "Goto If Random" code. Very handy if you want to make LttP-style fortune tellers.

Din
10-31-2007, 03:12 PM
Cool, plus there's an all new code, which gives you a certain item, the editor is going to be popular in 2.5 quests.