Jump to content

Photo

tango.zh


  • Please log in to reply
398 replies to this topic

#76 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 02 June 2014 - 04:49 AM

Yes. Currently, menus are drawn instantly, starting from the first @choice(). That may be made optional in the future, but for now, that's just how it works.

 

Good, good; I was worried that was either another proboem with my set-up, or a bug.  Is that function replicated with the INSTANTANEOUS flag?

 

The interesting part, is that any text that follows a menu choice, is also instantaneous, but text prior to that choice is not.

 

This, if you have something like this:

 

    int line1[]="MUSCLE@tab(56)@number(@d0)@26";
    int line2[]="BODY@tab(56)@number(@d1)@26";
    int line3[]="MIND@tab(56)@number(@d2)@26";
    int line4[]="@choice(1)More@26";
    int line5[]="MYSTIC@tab(56)@number(@d3)@26";
    int line6[]="LUCK@tab(56)@number(@d4)@26";
    int line7[]="INFL@tab(56)@number(@d5)@26";
    int line8[]="@choice(2)Done@domenu(1)@suspend()";
 
        Tango_LoadString(WINDOW_SLOT_2, line1);
        Tango_AppendString(WINDOW_SLOT_2, line2);
        Tango_AppendString(WINDOW_SLOT_2, line3);
        Tango_AppendString(WINDOW_SLOT_2, line4);
        Tango_AppendString(WINDOW_SLOT_2, line5);
        Tango_AppendString(WINDOW_SLOT_2, line6);
        Tango_AppendString(WINDOW_SLOT_2, line7);
        Tango_AppendString(WINDOW_SLOT_2, line8);
        Tango_AppendString(WINDOW_SLOT_2, menuEnd);
        Tango_ActivateSlot(WINDOW_SLOT_2);
 

 

 

Lines 1, 2, and 3 will print slowly, then as soon as the window hits the choice presented in line 4, the rest will instantly appear. (To my understanding there's no way to switch back, to single-character mode, and I don't know if you can set normal text to display instantly.)

 

Assuming that the flag INSTANTANEOUS replicates the instant menu printing, you may want to consider a set of text speed flags, that the user can insert into lines as commands, or roll display speed into the Tango_Loadstring and Tango_AppendString functions.

 

I think that the former, with commands like @instant, @fast, @normal, and @slow, used in the strings directly, would be the best approach, as it would allow the user to set up flows in any manner they need, or desire. That would allow some degree of control, over dramatic pause. You could eve use those types of tags, to instantly display (labels of) portions of a dialogue, while filling in the information of each portion at a desired rate. I think that, a @simultaneous text flag could also be useful, to draw characters presented by multiple appends, at the same time.

 

That is, two appends draw characters slowly, at one time, rather than the second, waiting for the first to finish.



#77 Saffith

Saffith

    IPv7 user

  • Members

Posted 02 June 2014 - 01:40 PM

Is that function replicated with the INSTANTANEOUS flag?

Yes.
 

The interesting part, is that any text that follows a menu choice, is also instantaneous, but text prior to that choice is not.

Yes, that's right.
 

(To my understanding there's no way to switch back, to single-character mode, and I don't know if you can set normal text to display instantly.)

It will switch back after the menu is finished.
 

Assuming that the flag INSTANTANEOUS replicates the instant menu printing, you may want to consider a set of text speed flags, that the user can insert into lines as commands, or roll display speed into the Tango_Loadstring and Tango_AppendString functions.

Text speed is one of the style parameters, and you can @set() @speed mid-string. A speed of 0 is also instantaneous, but requires more processing than the flag, so the latter should be preferred when possible.
 

You could eve use those types of tags, to instantly display (labels of) portions of a dialogue, while filling in the information of each portion at a desired rate. I think that, a @simultaneous text flag could also be useful, to draw characters presented by multiple appends, at the same time.

You can have multiple strings running at once. Simultaneous updates in a single string would be quite difficult.

#78 Saffith

Saffith

    IPv7 user

  • Members

Posted 05 June 2014 - 02:50 PM

I added another helper quest: https://www.dropbox....leFontSizer.qst

This one is to help create tile-based variable-width fonts. It lets you set character widths easily and will write a font definition to allegro.log. Just paste your tiles over the font that's already loaded (tile page 2). There are also a couple of script constants you can set, if you like.

#79 SpacemanDan

SpacemanDan

  • Members
  • Location:Ontario, Canada

Posted 01 July 2014 - 07:21 PM

I think I'm doing something horribly wrong with this. ._. Here's the code I'm using -

 

Code!

 

Font

 

I'm getting the box to show up and I can make it go away by pressing 'A', but no text is actually showing up. I used a lot of code from the demo, and the font code comes from the Final Fantasy Tactics submission on the DB, though I changed the actual font tiles, but I don't think that really changes much. ._. Any idea on what I'm dong wrong? I haven't worked with tango enough to really know what I'm doing yet, so my apologies if it's something very simple. ._.



#80 Saffith

Saffith

    IPv7 user

  • Members

Posted 01 July 2014 - 08:01 PM

You shouldn't call ShowMessage in a loop, but that shouldn't break it. Otherwise, that looks all right. Any chance it's an old save issue? Any errors logged? Does it work if you use a built-in font?

#81 SpacemanDan

SpacemanDan

  • Members
  • Location:Ontario, Canada

Posted 01 July 2014 - 09:02 PM

I'm not seeing any errors in Allegro.log. I tried swapping it to a default one as well as try a new save and it doesn't seem to work. ._. Was there anything I was supposed to set up with tango before using it? (Similar to setting up a bunch of constants before using ghost?) I may have forgotten or something if that's the case. ._.

 

EDIT: I cleared out all my tango stuff and 'reinstalled' it, which seems to have fixed it. I think I didn't quite update correctly earlier. >_< Sorry for the trouble.



#82 Lemon

Lemon

    Legend

  • Members

Posted 03 July 2014 - 03:08 PM

Well this is just outstanding. I haven't done much scripting yet, so it does appear tedious, but if I'm not mistaken this should make doing FFT-style dialog fairly routine. 

Lttsn8Pl.png

 

 

Look forward to confused questions from me as I try to finagle through this.



#83 Saffith

Saffith

    IPv7 user

  • Members

Posted 20 August 2014 - 01:18 PM

I'm thinking about adding custom variables and constants. That'd be another pair of simple functions that need implemented. It'd look something like this:
 
float myVar;
const float VAR_MYVAR = 4.0889;

float Tango_GetCustomVar(float var)
{
    if(var==VAR_MYVAR)
        return myVar;
    else
    {
        Tango_LogInvalidVariable(var);
        return 0;
    }
}

void Tango_SetCustomVar(float var, float value)
{
    if(var==VAR_MYVAR)
        myVar=value;
    else
        Tango_LogInvalidVariable(var);
}
If I do that, is it worth keeping Tango_D[] around as well? A bit of scratch space can be handy, but when you can provide it yourself, having it built in seems kind of pointless. Breaking existing code isn't a big concern, since Tango_D[] can easily be added as a custom variable.

#84 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 21 August 2014 - 05:39 AM

I think you'll need it to support legacy users. I know that both MoscowModder, and I, use Tango->D.



#85 Saffith

Saffith

    IPv7 user

  • Members

Posted 22 August 2014 - 07:19 PM

It's very easy to add it back as a set of custom variables, though.
 
float Tango_D[8];

const float VAR_TANGO_D0      =  0.0055;
const float VAR_TANGO_D7      =  0.0062;

float Tango_GetCustomVar(int var)
{
    if(var>=VAR_TANGO_D0 && var<=VAR_TANGO_D7)
        return Tango_D[(var-VAR_TANGO_D0)*10000];
    else
    {
        Tango_LogInvalidVariable(var);
        return 0;
    }
}

void Tango_SetCustomVar(int var, float value)
{
    if(var>=VAR_TANGO_D0 && var<=VAR_TANGO_D7)
        Tango_D[(var-VAR_TANGO_D0)*10000]=value;
    else
        Tango_LogInvalidVariable(var);
}
That's all it would take.

#86 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 24 August 2014 - 07:30 AM

That's why I suggest making it a legacy feature, imported like ghost_legacy. If a user doesn't need it, they won't have it, but if someone was already using it, they need only un-comment one import command.



#87 Saffith

Saffith

    IPv7 user

  • Members

Posted 25 August 2014 - 12:49 AM

It can't be a separate file; it has to be integrated into the regular get and set functions.
I do try to support old versions, but we're talking about two, maybe three people using a beta feature that can be re-enabled with fewer than ten lines of code that's already been written. As far as I'm concerned, that's not a factor. The only issue is whether it's useful enough to keep around when it can be improved upon so easily.

#88 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 25 August 2014 - 10:37 AM

What are your plans for improvement, and what prevents having them, while retaining what exists?

I use it to store specific vales that are in constant use, and to display those numeric vales as part of menus. I was however, likely going to expand the index size, assuming there's not a valid reason that this would break something.

#89 Saffith

Saffith

    IPv7 user

  • Members

Posted 25 August 2014 - 10:55 AM

Custom variables. You can use meaningful names rather than an arbitrary @d#. There's no reason they can't coexist; there just isn't much reason they should. It's an unnecessary use of a global variable and an array.

Maybe I'll include it as a default custom array. It's probably good enough for a lot of people, and it's even easier to remove it than to add it.

#90 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 26 August 2014 - 07:49 AM

That's my sentiment there, especially if Tango becomes more popular, as it's good to have a default variable for people to use, that they can expand , or modify, assuming they comprehend how to do either.

That's far more effective than requiring people to self-define it, particularly for new users; and advanced userzs can always excise what they don't need. If you make it a default, I suggest expanding its index size to 128, or 256, as that shouldn't hurt anything, from what I understand on active arrays, and index sizes. (IIRC, 4,096 active arrays, with 214,478 elements each.). People can self-define constants for that; but why can't it be part of an import?

I know that both global arrays , and functions can be imported, so I'm not certain on what technical limitation is preventing that. Is that because of relationships between the array, and the custom Tango language?

You may also want to integrate the menu functions, and some of the JRPG stuff that I'm using, including the expanded number of active bitmaps, so that others can use them, as part of a template, without needing to self-define those (for > 4 active menus at one time).

I'd also be interested in making a custom font, but it'd be one with around 80 characters (symbols), plus mathematical symbols, from my science-fiction, and I'd love both a tutorial on making fonts, and some in-depth information on how they work, and if it's possible to generate special characters with special codes. The language has many more consonants than a Roman alphabet, and about 20 main vowels. (Numerics are base-8, but the mathematical symbols are extensive.)

I'd also love to see text few options of left to right, right to left (e.g. Hebrew, Arabic), and columnar (up to down, starting at the left column, and up to down, starting with the right column) at some future point. Given that the routine to draw characters should be able to draw in any orientation, I don't think that'd be too difficult, but I'd need to deeply examine the way that the drawing operations work.

Edited by ZoriaRPG, 26 August 2014 - 07:58 AM.



0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users