• Welcome to Zoo Tycoon Community Download Directory.
 

How does one create a ".pal" file?

Started by johnrn1, August 11, 2010, 11:26:18 PM

0 Members and 1 Guest are viewing this topic.

Jeff

But not that much. The language bits, replacing the ID, changing extensions.

dr rick

lol! sometimes i use the APE ucs and uca as my starting point and other times i use text from the AI and paste it into the APE generated file to create the finished ucs, uca or ucb file. For animals I usually change so many items in the uca that it makes no difference what I start with, it is still going to take a LOT of editing!
Dr Rick<br /><br />How does that work?

Jay

Quote from: JeffBut not that much. The language bits, replacing the ID, changing extensions.

I also prefer to start with the original ".ai" files. And I encourage other designers to look at original ".ai" files even if they use APE or APExp to make a ".ucs" or ".uca" file. And for some objects it can be simple to convert from an original ".ai" file to a ".ucs". But the reason I am pointing out that it is not always a simple process is because there have been problems in the past. So I do not want others reading these posts to assume the process is always simple. For example, if someone copies a non-zero cEstheticWeight line from an official ".ai" file, either directly or via a version of APExp before version 3.2, and has cNameID set to 19000, the game will crash. Even worse, the game does not crash right away, so it might appear to work when testing the object in-game. Designers should try to understand the configuration in ".ai", ".ucs", ".uca", ".ucb", and ".cfg" files. That way problems can be avoided. Blue Fang has a lot of typos in their files. So understanding the configuration will also help to fix these typos for user made things. For APExp 3.2, I made extensive changes to avoid these various types of problems. At the end of this post, I have a list of the changes I made. This list was just for my benefit as I worked on APExp 3.2, so some of the things might not make sense to others. Some of these things are to make the objects or animals work properly in ZT. Some of these things are to fix typos. Some of these things are for efficiency. Some of these things are to make the things work in APE. Although that might not seem useful if one is creating something new without using APE or APExp, that can be useful later if it is found the internal ID conflicts with something made previously or if someone wants to have an object or animal liked by some other animal and there is not a letter near the beginning of the internal ID.

Here is the list of my notes for when I worked on APExp 3.2:

Add "APEXP" to start of ".ai" file name.
Remove all lines that start with ";" or "//" or ">>".
Remove blank lines within sections.
Except for a space right after =, remove spaces and tabs from end of lines.
Reduce multiple spaces to single spaces.
Have the Type setting match the ".ai" file name.
Upper case to lower in Type, f, m, y, cPlaqueImageName, cListImageName settings.
Upper case to lower for internal name in Icon settings.
Add [f/Characteristics/Integers] section with cPrefIconID line.
Copy cPrefIconID line from adult section to [y/Characteristics/Integers].
If [cCompatibleAnimals] is not right after [m/Characteristics/Mixed], add it.
Set animal's ID in [cCompatibleAnimals] to cGenus ID, or delete both if there.
Remove pairs of lines where 2nd line of pair is "v = 0".
Remove any lines in [cSuitableObjects] section that do not have "=".
To eliminate duplicates, put [m/Animations] lines in order.
Remove any lines in [m/Animations] section that do not have "=".
Copy [m/Animations] section to [f/Animations] and [y/Animations], if none.
Make all action names to left of = match in [m/Animations] and [y/Animations].
Make all animation names to right of = in Animations sections be ones in ztd's.
Change [Sounds] section to link directly to in-game sounds.
For any ".wav" in [Sounds] more than once, change fPlayWithSound lines to use 1.
Remove sound lines in [Sounds] that are not used, possibly matching softness.
Move all [AmbientAnims...] sections to before first BehaviorSet section.
Remove "m\" (or "f\") from all [m\BehaviorSet\b...] and [f\BehaviorSet\b...].
Have all behavior set lines end with ")".
Insert "," between number and "b" in any fPlaySetProb (such as "5b" to "5,b").
Change ", " to "," and remove " in BehaviorSet sections.
Remove any "," that are just before ")".
Change "(Baby1,40,bBaby2,40" to "(bBaby2,80".
Change fPlay(.,..) to fPlayTime(.,..) if .. is number or fPlayWithSound(.,..).
Change fPlayTime(...) without comma to fPlay(...).
Change fPlaySetTerrain(...) without comma to fPlaySet(...).
Change fPlayWithSoud to fPlayWithSound.
Change fTrot(keeper) to fFollow(keeper).
Make sure all behavior actions and sounds are in Animations and Sounds.
Remove all [.\BehaviorSet\b...] sections not in . fPlaySetProb + match adult's.
If all y\BehaviorSet not matching adult are fPlaySetProb, make [y/AmbientAnims.
Split into 2 sections any y fPlaySetProb line with more than 9 commas.
Remove all [y\BehaviorSet\b...] sections that have fEnterBuilding.
Delete land+water y bEscaped1, bChasePrey, bRunFromPredator, bRun if have fTrot.
Change y fTrot(0,0) to fMove(0,0,.,..) with . as action + .. as speed.
Change any y fMoveWithSound(.,..,...,....,.....) to fMove(.,..,...,....).
Change any y fMoveReverse(.,..,...,....) to fPlayReverse(...).
Change any [y\BehaviorSet\bEatenEgg] to [BehaviorSet\bEatenEgg].
Change fPlayStopAtEnd(egg_hatch) in bEatenEgg to fPlayStopAtEnd(egg_break).
If no y\BehaviorSet, add [y\BehaviorSet\bIdleY] with "f = fPlay(idle)" at end.
Fix any warning or error shown by animal configuration checker on uca.
At end of ".ai", add [defaultLCID] section with "LCID = 1033" line.
Remove any "cIsSpecialAnimal = 1" and "AvailableAtStartup=0" lines.
Remove any empty [Global] section.
Have Icon lines go to actual icons and using internal name used in cfg.
Change [Member] of "developer" to "scenery" and remove any "zoogate".
Have [Member] contain animals, foliage, rocks, or scenery.
Remove any [FilterSounds] section.
Remove any cAdultChange, cCapacity, cChildChange, and cEnergyChange lines.
Remove any cAlternatePanelTitle and cHideRegularInfo lines for scenery.
Remove any "cAutoRotate = 0" and "walkable = 0" lines.
Remove any cAvoidEdges line for scenery.
Remove any cCommerce, cDefaultCostIndex, and cIsColorReplaced lines.
Remove any "cDeadOnFlatWater=0" and "cDeadOnLand=0" lines.
Remove any cDecayedHealth, cDecayTime, and cFilterCleanAmount lines.
Remove any cDeletable and cUsedThought lines.
Remove any cDirectEntrance, cDrawUser, cSetUserFacing, and cShow lines.
Remove any cEstheticWeight and cGawkOnlyFromFront lines.
Remove any cExhibitViewer, cIdler, and cReturnBuilding lines.
Remove any cExplosionSound and cExplosionSoundAtten lines.
Remove any cFilterDecayedCleanAmount, cFilterDelay, and cFilterUpkeep lines.
Remove any cFoliage, cRock, cShelter, and cStartingHealth lines.
Remove any cFood, cFoodCategory, cFoodUnits, cKeeperFoodType, + cMaxFoodUnits.
For foliage menu without cHabitat of 9414, set cHabitat=9411 + cLocation= 9618.
For things in rocks menu, set cHabitat to 9411 and cLocation to 9618.
For scenery without "cHabitat = 9414", use "cHabitat = 9411".
If "cUnderwater = 1" and "cHabitat = 9414" for scenery, set cHabitat to 9411.
Remove any cHideUser, cHideBuilding, cHideCostChange, and cTimeInside lines.
Remove any cHoldsOntoUser lines.
Remove any cHungerChange, cThirstChange, and cBathroomChange lines.
Remove any cIsColorReplaced and cIsTransient lines.
Remove any "cLand = 1" line.
If foliage has cHabitat set to 9414 or if scenery, remove any cLocation line.
Remove any cMaxUsePeriod, cMinUsePeriod, and cRandomUse lines.
Remove any "cMoveable = 0" line.
For scenery, each ".ai" must have a different cNameID.
Remove any cNeedsConfirm line.
Remove any "cOnlySwims = 0", "cSwims = 0", and "cUnderwater = 0" lines.
Remove any cPlacementFootprintX and cPlacementFootprintY lines.
Remove any cSelectable line if there is no "cMoveable = 1" line.
Remove any cStink, cStrictBuildingCapacity, and cUserTracker lines.
Remove any "cSurface = 0" line.
Remove any cToySatisfaction, cUserStaysOutside, and cUserUsesExit lines.
Remove any cUseAnimCount, cUserTeleportsInside, and cUsesPlacementCube lines.
Remove any cUserInAnim and cUserUsesEntranceAsEmergencyExit lines.
Remove any "cUseNumbersInName=1" line.
Change any "empty = idle" line to "idle = idle".
Remove any used, half, full, decayed, off, broken, and explode lines.
Change full paths to animation names in [Animations] section.
Set negative esthetic values to 0 for objects converted to scenery.
Remove any [AmbientSound] and [UseSound] sections.
Remove any [Characteristics/Strings] and [Characteristics/Floats] sections.
Remove any [Removes], [Satisfies], and [Sells] sections.
Remove [slots], [slot], [slot0], [slot1], [slot2], [slot3], [slot4] sections.
Remove any [bigslot] [bigslot1], [smallslot11], and [smallslot22] sections.
Remove any [drawslots], [ordern], and [returnslot] sections.
Remove any [ordere], [orders], [orderw], [colorrep], and [cr_color] sections.
Remove any [smallslot1], [smallslot2], [smallslot3], and [smallslot4] sections.
Remove any [smallslot33] and [smallslot44] sections.
For objects, if no [EstheticBonus] section, add one with values of 0.

For things in rocks menu and for benches, add "Decorative" to dll messages.
For exhibit foliage, tables, and buildings, add "Decorative" to dll messages.
For toys, stands, carts, rides, and games, add "Decorative" to dll messages.
For vending machines, shelters, and show toys, add "Decorative" to dll messages.
Remove "stop" from purchase menu tooltips.

For TEXT blocks in dll:
If ..._GENERAL does not exist that matches animal Type in upper case, add it.
Change multiple spaces to single spaces, as well as in String blocks.
If ..._GENERAL has odd number of characters, add blank line at end.
Make each ..._GENERAL have less than 4096 characters.

dr rick

good gracious!! what can i say but  :praise2 :praise2 :praise2 and  :TY :hug
Dr Rick<br /><br />How does that work?

Jeff


Jeff

Just wanted to say I'm still waiting for any feedback. Seems like Vondell's been occupied with other stuff, and honestly, there's a lot of stuff going on in my professional life as well.

dr rick

I would be very happy to give you feedback but I know not where to find ZT Studio :duh :wub2
Dr Rick<br /><br />How does that work?

Jeff

There's some very specific testing I'd like to be done. Basically: creating a brand new animal from scratch, solely based on a folder structure including specifically named .PNG files.

There's a bit more to it too, and also proper error handling is being built in to alert that too many colors etc are used. Also looking into optimizing :)

dr rick

well as soon as you are ready for someone to play with it, I would love to do some testing. obviously there may be others you want to try it first, but i'll wait my turn because i'm still very excited at the possibilities this development raises.
Dr Rick<br /><br />How does that work?

Jeff

Well, if that particular test case goes well (I've collaborated with Vondell on some stuff, hence the favor), I'll release it publicly. As it is at this moment. The main features are all present ;)

dr rick

Dr Rick<br /><br />How does that work?

Jeff

I did a test with Vondell's tortoise.

Batch ZT1 Graphic files to PNG: (just created a 'new folder', and unzipped the ztd-file to it, then set the 'new folder' as the root folder. Similar to what you'd do in Zoot). Worked flawlessly except for one error message, which I'll look into, but I think it was because of the text file. The graphics were perfect.

Batch PNG to ZT1 Graphic files: there was one little bug, it's fixed already :)

It might be released soon now!

dr rick

#102
starts making unintelligible excited noises

eeeeeeeeeeeeeeeeeeeeeeeeeeee!
Dr Rick<br /><br />How does that work?

Jeff

I've been writing some documentation to go along with the first release. It's mostly a technical document for future reference, but I'm also planning to include some quick pointers on how some of the more complicated things work. Also waiting on one more permission.

I was just thinking that one small feature is missing from the batch conversions from PNG to ZT1, and that is something which technically has nothing to do with it. But I'm considering an option to auto-generate .ani files for folders which either contain only one graphic (think object icon, plaque) or 4 views (NE, SE, NW, SW).

The x0, y0, x1, y1... Any idea what they refer to? I vaguely remember they might be useless; but on the other hand: could this be the coordinate of the most top left pixel; and the most bottom right one?

dr rick

 i don't have any idea, but Jay might know... :praise2 :eggyes
Dr Rick<br /><br />How does that work?