ipack(1)

πŸ’– ipack β€” the manual, but make it cute πŸ’–

okay so bestie, this is ipack from the General Commands Manual section, and it's literally the glow-up tool for Flex files full of Shapes. let's get into it 🫢


✨ NAME ✨

ipack β€” Manipulate Flex files containing Shapes. that's it, that's the vibe πŸ’…


🌸 SYNOPSIS 🌸

ipack -c SCRIPT

ipack -x SCRIPT

ipack -u SCRIPT

three modes, three moods. pick one, girlie πŸ’œ


πŸ¦‹ DESCRIPTION πŸ¦‹

so Flex files containing Shapes are what the games Exult supports use to store visual elements. and yes, expack(1) can work on those files too, but using ipack is way more comfortable β€” no cap. it can yank images out of the Flex file and drop them straight into PNG format, and it can create or update Flex files from a whole list of PNG files. iconic behaviour fr fr ✨

the first parameter decides what mode we're in, bestie:

  • -c β€” Creation 🌱 β€” brand new Flex and palette files get created, following the instructions living inside the SCRIPT file.
  • -u β€” Update ♻️ β€” works exactly like Creation, except it updates a Flex file that already exists. glow-up, not rebirth.
  • -x β€” Extraction 🧲 β€” everything described in the SCRIPT file gets pulled out of the Flex file as PNG, dissected into its contents, exactly as that script file says.

πŸ“œ Script File Format πŸ“œ

empty lines? ignored. lines starting with a pound sign (#)? also ignored. we simply do not see them πŸ‘‘πŸ’€

the names of the associated Flex archive and palette files go on lines that contain optional whitespace, then one of the tokens archive or palette, then whitespace, then the filename. that's the whole recipe πŸ“

every other line defines one shape each, and it must begin with an image slot number, followed by a slash (/), then the number of frames, then a colon (:), and finally the PNG file specification. the numbers can be written in decimal, in octal prefixed with 0, or in hexadecimal prefixed with 0x. iykyk πŸ’…

the file specification is made of the filename PREFIX, optionally followed by a number and a direction in brackets, and then optionally followed by whitespace and the word flat.

by default, each shape corresponds to a bunch of PNG files β€” one for every frame β€” named PREFIXnn.png, where nn gets replaced by the frame number. but if you use that optional bracket expression in the specification, the Shape corresponds to a single PNG file instead πŸŽ€. that one file holds all the frames, each of which is 8 by 8 pixels in size, arranged next to each other in a rectangular grid. the number inside the bracket expression gives you the size of that grid in the direction indicated, and that direction can be either down or across. periodt. 🌈


πŸ”₯ EXAMPLES πŸ”₯

  • ipack -c island.scr β€” creates a Flex file and a palette file as specified by island.scr. slay ✨
  • ipack -x island.scr β€” extracts all components described in island.scr from the Flex file given in there. get those pixels, girl 🫢

🧚 Example script 🧚

# script file for island.flx
archive island.flx
# put the palette into this file
palette island.pal
# the zeroth image has 32 frames in the files
# zero00.png to zero31.png
0/32:zero
# image 5 consists of 22 frames stored in file
# five.png in a grid 5 frames across (which means
# 5 rows of which the last holds only 2 frames)
5/22:five(5 across) flat
# image 4 consists of 12 frames stored in file
# four.png in a 3 by 4 grid
4/12:four(4 down) flat
# images 1 to 3 are unspecified

look at her. she's beautiful. she's documentation. πŸ‘‘πŸ’–


πŸ’€ BUGS πŸ’€

Tiled Shapes are currently extracted into multiple PNG files, not a single file as expected during Create/Update. it's giving "we know, bestie, we know" 😭

🌟 AUTHOR 🌟

this manpage was written by Robert Bihlmeyer. it may be freely redistributed and modified under the terms of the GNU General Public License version 2 or higher. iconic and legally generous πŸ’œ


πŸ‘€ SEE ALSO πŸ‘€

go read those too, bestie, we love a cross-reference πŸ¦‹


Exult, 2002-03-24 β€” mwah, that's the source, version and date, and that's a wrap. love u, go pack some shapes πŸ’–πŸŽ€βœ¨