Jump to content

Theme© by Fisana


New tool: ZT Studio

  • Please log in to reply
60 replies to this topic

#1 jbl89


    Advanced Member

  • Members
  • PipPipPip
  • 214 posts

Posted 16 January 2015 - 02:57 PM

For easy reference, I'll put a link to the most recent version here.
Distribution is currently exclusive to Zoo Tek Phoenix and my GitHub pages.


- Windows 7/8: install MS .NET Framework 4.5 (alternatively 4.6 or 4.7)
- Windows 10: the MS .NET Framework 4.5 (alternatively 4.6 or 4.7) are installed by default. You're most likely fine.

  • ZT Studio @ GitHub
    Use: After installation, your first job should be to hit the [Settings] button and to change the path to whatever you'd specify as your working folder / root path (=the folder you'd specify in Zoot. Subdirectories can be: 'animals', 'objects' ...).

    You'll also find some how-to's under the Wiki section on the GitHub project.




Build 2017.06.03 looks like this. I thought it was time to add a screenshot so people just following this thread can see how it's progressed.





All information below is from the original first post. It also contains out of date screenshots, so you can see how it all started.




I actually wanted to find out how you could properly replace colors in user created buildings, so I started researching the format again. Thanks to notes by MadScientist (creator of Zoot) and Jay, I managed to figure out most stuff. Apparently, it won't be a first to have downloads where  you can choose the color (think building roofs), but this tool should make it a lot easier to generate such content.


Anyhow, here's a screenshot of a few evenings of work (mainly figuring out how the graphic files in ZT1 actually work). Right now, it's limited to reading/rendering those images. But, it does the job better than APE and Zoot. Here's a rendered version of the restaurant, for example. Try that in APE, Zoot... It's not possible. I think I also managed to add support for a rare file format, which is used for some submerged animations (ssurfswi for dolphin for example).




As you can see, you see the main color palette.
There's also the possibility to just open a color palette - it shows you the palette in a small window. Or open a color palette and replace certain colors in the main palette (right of the screen). As you can see, I changed the roof color to red already (default it's gray + blue) by just selecting a color palette. There's also an option to set up quick access to a folder with 8-color palettes, and one with 16-color palettes.


You can easily change the background color as well. And when you move over a pixel in the image, it will show you the coordinates of that pixel, the color (R,G,B) values, and the index the color has in the palette.


What's planned?

- creating ZT1 graphics.

- an easy way to create buildings with color replacement possibilities

- adjusting "rotations" (offsets) for all frames in 1 ZT1 graphic file

- batch export: select a folder, all ZT1 graphics will be converted to PNG-files:  " view_SE_0001.png " (1 PNG per frame in each graphic)

- batch import: select a folder, a ZT1 graphic file will be created from each PNG-file (based on filename, see 'import')


Unlikely, but possible:

- more general content creation. In that case, you would select any object from the ZT1 universe. Only the necessary files would be copied from the original game and not messed up. Characteristics would be  described as easy as possible (as far as we know about how they work) and you would also be able to see in which files the characteristic is used (so you have some sort of reference). It would also contain a way to find out if you have the "perfect" exhibit configuration, using the rules I've set for my Animal Antics-project.

Edited by jbl89, 03 June 2017 - 03:07 AM.

#2 Vondell


    Advanced Member

  • (Designer)Designer
  • PipPipPip
  • 195 posts
  • Gender:Male
  • Location:Dayton, Ohio, USA

Posted 16 January 2015 - 03:11 PM

This is exciting stuff! Very interested to see how this develops. :)

#3 jbl89


    Advanced Member

  • Members
  • PipPipPip
  • 214 posts

Posted 17 January 2015 - 05:35 PM

I'm happy to announce that I just finished the code which can write a basic ZT1 Graphic (=the type APE and Zoot can create).


A bit of further testing is needed, there's also one byte  of which I haven't uncovered the meaning yet (neither did Zoot's creator, nor does Jay know. It's apparently not very significant).


So currently, it reads these types of ZT1 graphics:

- very basic ones (=APE, Zoot read/write this).

- "FATZ / ZATF"-files: the simple type.  Example: the restaurant's  icons in the purchase menu.

- "FATZ / ZATF"-files: the complicated type. APE crashes on these, Zoot doesn't render them correctly either. Example: restaurant

- compressed format for shadows. Example: "ssurfswi"  animation of the dolphin.



- basic ones.


I might add support to create the other types, but there's not really much use of it. A bit more likely, but also not that important: have graphic files share one palette. This is just some further (supposed) optimizing for ZT.


I've also made a mock-up window whiwh would assist in "batch conversion" from one file type  (e.g. ZT1 Graphic) to another (e.g. PNG frames).

Furthermore, I've also  been thinking about allowing users to run the tool from the command line.


I also ran into a little annoyance with t he datagridview control in VB.Net (which I used to show the color palettes). It's a bit slow. Looking to improve it, but not sure how.

#4 jbl89


    Advanced Member

  • Members
  • PipPipPip
  • 214 posts

Posted 18 January 2015 - 06:20 AM

I've greatly improved the rendering for certain animations. I'm now caching the frames, and they're only repainted if there have been changes (e.g. color palette applied).

The datagridview for the color palette is still very slow, still hoping to replace it, but I think I might release an alpha version of the tool anyhow for those who want to look at certain files and easily export them (think restaurant etc).

I was happy yesterday that I managed to create an identical copy  of the  bamboo's SE-view, but it seems like something's wrong in my code at the moment when I try to save images with multiple frames. The hex doesn't match up, mine seems to be a tad longer (too long in fact) compared to the original ZT1 file. Yet, Zoot is able to show it, but it suddenly drops 1 pixel. So I'm thinking something is wrong with the offsets - which would also make sense: my file is 46kb while the original is 43kb, and it seems like I have 8 colors while ZT1 has 7 colors. (the first frame seems to have been rendered properly, identical even; so I think it might have to do with the way width/height and offsets are stored).

I'll probably leave this project alone for  a few days now, I'm getting a bit tired of looking at hex values and comparing files etc.

Update: I just found the nasty little bug. The file length matches now.

Planned: a short break for now. I've seen enough hex the last few days. I still need to check on the X/Y-offsets compared to the 'center', which seems to be a little different, but I should be able to figure that out too. It's only another minor adjustment. Next: a userfriendly interface to add/delete frames, proper rotation fixing. Once that's right, things should move on fast.

Oh, and I'm not sure whether I mentioned this: currently the PNG's are exported in the canvas size, which is 512x512. You'd think it would make for big file sizes, but it's actually a  very small file due to all the transparency. ( 3KB for a frame of the SE-view of the grizzly bear). I'll probably add two more export options when it comes to canvas size: 'take width/height of the biggest frame', 'crop to relevant pixels').

Potential previews (depending on whether I'll take a break or not.):
Alpha 1: what I've got so far + graphics properly created.
Alpha 2: includes the batch conversion and command line options.
Alpha 3: re-ordering of the color palette. By this version, I also hope to show the color palettes faster.
Now, what does this mean?  You load the PNG file you've created. Now, let's say you want a building with 2 parts of which you would like users to replace the color in ZT1. In your design, you preferably use 2 distinct colors - just to make it easier for yourself (e.g. pink and blue - you do not use these colors anywhere else). Color A can have up to 16 "shades" of the color - e.g. pink, color B can have up to 8 shades of the color - e.g. blue. In the palette, you will be able to reorder those colors to a specific place (there will be some guidance). When they have specific places in the palette, users will be able in ZT1 to select the 2 colors they want to use. (like the Restaurant).

Beta 1: this would be the hopefully stable version of the tool. I'll listen to feedback, but it's likely this beta - except for some bug fixes - will be very close to the final version.

Version numbering: 1.0.2015.0118 - this will tell you the main version (1.0), and when it was released (18th of January, 2015).

#5 jbl89


    Advanced Member

  • Members
  • PipPipPip
  • 214 posts

Posted 23 January 2015 - 07:10 AM

Any feature requests?


These are the things I want to implement (or have done so already) before releasing a public version.


= Frames =

- save frame to PNG + option: each frame takes the canvas size, or the animation's relevant pixel area, or the frame's relevant pixel area. Default will be the canvas size - it has the most advantages)

- add from .PNG files

- add empty

- remove

- copy frame to "bitmap" (clipboard) - for those who hate saving and loading etc.

- paste "bitmap" to clipboard

- rotation fixing (default: rotation fix for one frame -> the same offset is applied to other frames in the graphic. Although I'll allow to do them one by one as well.)

- reordering frames


= "Preview" of the graphic =

- play animation (or manually adjust slider)

- change background color

- change colors in preview image (currently limited to the 8 and 16 color palettes in ZT1. But for instance, you can see what the restaurant looks like with red/yellow/green/blue... roofs).

- open 2 graphics at once. You will only be able to edit one, but you can put another one in the background. This is something I'd like to implement so you can look at a toy's "used" animation (rope swing) and combine it with the animation of the animal that uses the toy (orang utan swinging the rope), so you see the complete thing (orang utan using rope swing).


= ZT1 Graphics =

- open ZT1-graphics

-- 'basic'/ZTAF - default. (e.g. bamboo)

-- 'basic'/ZTAF - with extra animation (e.g. waterfall, restaurant, lots of animated things)

-- compressed format (e.g. certain shadows for the dolphin)


- save ZT1 graphics

-- 'basic'/ZTAF - default

-- 'basic'/ZTAF - with extra animation


Future versions might support the compressed format.




= Batch conversion =


- Convert all ZT1-files to .png-files.

- Convert .PNG-files to ZT1 files. + option: each frame takes the canvas size, or the animation's relevant pixel area, or the frame's relevant pixel area. Default will be the canvas size - it has the most advantages)

-  Option: Automatic clean up of the original graphic files after conversion



First public version will by default write the output to the same folder.


Default naming pattern:

"NE" <=> "NE_0000.png", "NE_0001".png ...   (I will probably add an option to start at either frame with 'index' 0, or frame 'number' 1.)



= Color palettes =

- view color palettes.

- open just a .pal-file to view, rather than a graphic


Future versions should add flexibility to easily change and reorder colors (= easy to add color replacement feature for buildings).

I might also add the possibility to try to generate 1 color palette for multiple graphics (=the way the actual game graphics work. Limit: 255 colors), for performance reasons.


= Command line =

- Basic conversion will be added. Filename + options. Future versions will add more flexibility (wildcards in names etc, destinations,...).



#6 jbl89


    Advanced Member

  • Members
  • PipPipPip
  • 214 posts

Posted 27 January 2015 - 02:18 PM

Alpha 1: finished.
Alpha 2: currently working on batch conversion, implementing command line options and tweaking the graphics.


I've also worked a bit on the user interface. Currently it looks something like this: (the frame's toolstrip has some stand-in icons at the moment).


One of the new features: show a ZT1 Graphic file (orang utan swinging rope: this is only 2 ropes and the orang utan) and use another ZT1 Graphic file as background (the "used" animation of the rope swing has only 2/4 ropes). These 2 graphics form one animation. Hint for designers: they share some colors, but you can *theoretically* have 2x 255 colors in what looks like one animation!

Attached File  alpha_20150127.png   87.64KB   2 downloads


Attached File  alpha_20150127_b.png   26.81KB   0 downloads


I'm hoping to release an alpha version soon.


Also, and this might be of particular interest with people who still have a slow connection nowadays - and more importantly, website owners who are hosting a lot of content: in  a future versions, I'm planning to add a "ZT1 Graphics Optimizer" tool. This would do two seperate things:

- it will check if it is possible to create just one palette for all files in that folder. [and in a later version, maybe one .pal file for a complete animal]

- it will check if the file's animated or not. In that case, it will try to render the "extra frame" - but only if the gain would be significant enough. This should really decrease file sizes of e.g. animated flags (the flag pole would be the extra frame, the other frames would only keep the "flag" pixels).

Edited by jbl89, 28 January 2015 - 03:48 AM.

#7 jbl89


    Advanced Member

  • Members
  • PipPipPip
  • 214 posts

Posted 01 February 2015 - 07:41 AM

I know this has been a mostly technical thread, but any interest in this tool so far?

#8 Vondell


    Advanced Member

  • (Designer)Designer
  • PipPipPip
  • 195 posts
  • Gender:Male
  • Location:Dayton, Ohio, USA

Posted 01 February 2015 - 08:29 AM

Absolutely! We've been talking via PMs but I'll add my voice in here to say that this is really interesting stuff you're tackling! Can't wait to try out the alpha whenever that may be!

#9 Cricket


    Advanced Member

  • (Admin)Root Admin
  • PipPipPip
  • 17,770 posts
  • Gender:Female
  • Location:Westfield, Indiana (USA)

Posted 01 February 2015 - 03:58 PM

I would love to check it out :)

#10 Savannahjan


    Incorrigible Wench

  • (Admin)Root Admin
  • PipPipPip
  • 19,432 posts
  • Gender:Female
  • Location:Alabama
  • Interests:Birdwatching, couponing, cooking, crafts, and the greatest game of all time, Zoo Tycoon

Posted 01 February 2015 - 06:22 PM

Oh yes, me too.  I have been making items for years, but have always felt very limited due to primitive tools.  I need to read through this thread thoroughly to see if there are any features I can think of that would also be helpful.  Some of this is a little too technical for me during my first pass; takes the old gal a few readings to get it.  :elkgrin:

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Copyright © 2017 Your Company Name