Jump to content

Photo

tango.zh


  • Please log in to reply
398 replies to this topic

#286 Saffith

Saffith

    IPv7 user

  • Members

Posted 01 July 2016 - 07:28 PM

Here's another thing: ttftozc.zip
It's a program that'll create tile sheets and tango.zh font definitions from PC font files (TTF, OTF, FON). Nothing too fancy, but it should work okay.
It requires SDL2 and SDL2_ttf, which aren't included (see the readme). Also, the Mac version is untested because my dinky VM can't run it.

#287 Moosh

Moosh

    Tiny Little Questmaker

  • ZC Developers

Posted 19 August 2016 - 08:54 AM

I just ran into a rather frustrating bug relating to tango, possibly relating to ZC 2.5.2. My tango strings that worked in 2.5.0 were suddenly playing popping sounds on the string's end. I initially thought the cause was my other SFX because of some unfortunate timing, but eventually isolated the cause to TANGO_STYLE_TEXT_END_SFX. Previously I had not needed to set it when setting up my style, but now if I don't set it to 0 (It should be initializing to 0, should it not?), the popping happens. So a minor inconvenience overall, but it became a major one because I was an idiot.



#288 Saffith

Saffith

    IPv7 user

  • Members

Posted 19 August 2016 - 09:06 AM

It should default to 0, yes. Could you try tracing it to make sure it isn't, or see what it is instead? There's Tango_GetStyleAttribute() for that.

#289 Moosh

Moosh

    Tiny Little Questmaker

  • ZC Developers

Posted 19 August 2016 - 11:29 PM

Hmm...I undid the fix to the script. Now according to the trace, it's initializing to 0 as it should have. The popping sound is gone as well, even on a fresh save file. I have not touched anything tango or global variable related since moving this quest to my new computer. Since I don't have a backup of my save before the fix, I'd have no way of knowing what the value used to be.



#290 Saffith

Saffith

    IPv7 user

  • Members

Posted 20 August 2016 - 10:05 AM

Huh. We'll just chalk it up to ZC being ZC, I guess.

#291 Avaro

Avaro

    o_o

  • Members
  • Real Name:Robin
  • Location:Germany

Posted 20 August 2016 - 10:58 AM

In this thread: http://www.purezc.ne...ic=70652&page=2 ZoriaRPG stated that a pop sounds plays if you call 

Game->PlaySound(0);

in some versions. Maybe thats what happened? I personally never had it happen to me though.


Edited by Avataro, 20 August 2016 - 10:59 AM.


#292 Saffith

Saffith

    IPv7 user

  • Members

Posted 20 August 2016 - 04:48 PM

Yeah, that would be worth fixing on the ZC side. It validates input, but it does accept 0. I don't what data is actually there, but it's likely to be just a random pop.

#293 Saffith

Saffith

    IPv7 user

  • Members

Posted 16 September 2016 - 01:21 PM

Updated, and now in the database: http://www.purezc.ne...=scripts&id=247

* Added Tango_SetMenuAutosaveDest(), which allows a menu's state to be saved automatically when a selection is made.
* Added Tango_SetMenuFlags() and Tango_DeactivateMenu().
* A menu can now be persistent (i.e. it won't close when a selection is made).
* Tango_ActivateMenu() no longer takes an argument. The functionality is now handled by setting the TANGO_MENU_CAN_CANCEL flag.
* @domenu()'s first argument is now menu flags rather than a simple "can cancel" bool.
* Fixed an error in scrolling menus.
* Added tangoZHChangelog.txt.

#294 Timelord

Timelord

    The Timelord

  • Banned
  • Location:Prydon Academy

Posted 17 September 2016 - 02:43 PM

One request I've gotten for Tango scripts, is an auto scroll. (Something that moves a wall of text.)

 

I know of no Tango functions that automate that, so I've done it by hand, but that might be good for the future.

 

Another user also complained that he couldn't set up circular or curved menus, but that pretty much belongs in Subscreen.zh, which I may some day return to finishing.



#295 Saffith

Saffith

    IPv7 user

  • Members

Posted 17 September 2016 - 03:05 PM

Well, maybe next version. Might've been done already if people just made their requests to the guy in charge of implementing them, but whatever.

#296 isilmo

isilmo

    Recipient of Ways

  • Members

Posted 25 September 2016 - 08:41 PM

When I pull from the uploaded zip, I get this error:

 

Pass 1: Parsing
Pass 2: Preprocessing
Can't open input file
Scripts/tango.zh, line 261: Error P01 : Failure to parse imported file tango/1.2/script.z.

 

When using import "tango.zh".

When I did the same from the new ghost, it's works without issue.



#297 Saffith

Saffith

    IPv7 user

  • Members

Posted 25 September 2016 - 09:09 PM

Did you extract the tango folder into ZC's directory? It should go in the same place as the ghost_zh folder. It should have a subdirectory named 1.2 containing 19 files and another named font with 17 files.

#298 ywkls

ywkls

    Master

  • Members

Posted 10 October 2016 - 01:14 AM

Time for convoluted Tango.zh stuff!

 

Thanks to some menus made for me by ZoriaRPG, I'm starting to get the hang of creating custom Tango functions.

 

However, I'm having some trouble with a few things; possibly because I didn't have the tango.zh help files for whatever reason.

 

I've got those now, but understanding them is a different matter entirely.

 

I'm creating two window slots with text in them. The left one is a menu and the right one, a string of text that is supposed to reflect the values of variables that are set by the menu.

 

Unfortunately, while the values of those variables are being set; the slot that shows what they are isn't updated until you leave the menu. I thought that @sync would do this, but it doesn't.

 

Anyways, here's the code. Its a bit convoluted; relying on the existence of a vast global array for storing data and things.

 

Experimental Control Setup

 

Anyways, thanks in advance to anyone who can help me clear this up!



#299 Saffith

Saffith

    IPv7 user

  • Members

Posted 10 October 2016 - 10:07 AM

@sync just makes one string stop to let the other catch up. I don't actually know what it'll do if used between @choice and @domenu, but it sound like it doesn't break anything.

The text needs to be reset every time it changes. Take the window 2 setup block - everything from SetUpWindow(WINDOW_SLOT_2...); to Tango_ActivateSlot(WINDOW_SLOT_2); - move it to a new function, and call it each time the setup changes. You'll need to remove @sync from both strings, or one will probably hang.
  • ywkls likes this

#300 ywkls

ywkls

    Master

  • Members

Posted 15 October 2016 - 05:15 PM

So, I got the control menu working... mostly. Your idea did work, but the sheer complexity of trying to set each button (and make sure no others match) led me to create preset button combinations you could choose from instead.

 

Moving on from that, I wanted to create a scripted subscreen that was run via an ffc script that was launched from the global.

I've got the menu loaded up fine, but I was wondering whether or not it was possible to run multiple tango menu's simultaneously and switch between them at will?

 

Any thoughts on this would be appreciated.




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users