textpack(1)

πŸ’– textpack(1) β€” the manual page bestie πŸ’–

okay so you opened the manual for textpack, a General Commands Manual entry, and honestly? you're about to have the best time packing and unpacking Flex files full of text. no cap. let's get into it πŸ¦‹


✨ NAME ✨

textpack β€” pack and unpack Flex files containing text πŸ’…


✨ SYNOPSIS ✨

textpack -c FLEXFILE [TEXTFILE]

textpack -x FLEXFILE [TEXTFILE]

✨ DESCRIPTION ✨

so, Text Flex files are literally what the games Exult supports use to store their strings in. and yeah, expack(1) can operate on those files too, but bestie, using textpack to pack and unpack them is just… more comfortable. it's giving convenience. it's giving ease. 🌸

the first parameter is what decides the mode you're in: -c means creation, -x means extraction. pick your fighter. ✨

πŸŽ€ Creation

TEXTFILE gets read β€” or stdin if you didn't hand one over β€” and it must conform to the file format (peep the section below πŸ‘‡). then FLEXFILE gets created, holding all the strings from that input. boom. done. πŸ”₯

πŸŽ€ Extraction

the strings chilling inside FLEXFILE get extracted and written out to TEXTFILE β€” or to stdout if you didn't give a TEXTFILE β€” in the file format documented below. so demure. so mindful. πŸ’–

πŸŽ€ File Format

here's the tea, and you do need to know this part:

  • Empty lines? ignored. they said "not my business." πŸ™ˆ
  • Lines starting with a pound sign (#)? also ignored. comments stay unbothered.
  • Every other line has to begin with a number, followed by a colon (:). that number is the index of the string, and you can write it in:
    • decimal, plain and simple,
    • octal, prefixed with 0,
    • or hexadecimal, prefixed with 0x.
  • Anything after that colon belongs to the string, and it gets stored in the Flex verbatim. no edits, no notes, no opinions. πŸ’…
  • oh and β€” lines are limited in length to 1024 characters. that's the ceiling, bestie. do not test it.

✨ EXAMPLES ✨

  • textpack -x text.flx β€” writes every single string inside text.flx out to stdout, in the format we just talked about. slay. ⭐
  • textpack -c text.flx strings.list β€” reads strings.list and drops its contents into the Flex file text.flx. iconic behaviour. πŸ‘‘

🌈 Example text file

# An example
0:the zeroth string
# strings may be empty
1:
# holes are allowed, strings 2 to 16 will be empty
17:string seventeen
# 13 hexadecimal == 19 decimal, 24 octal == 20 decimal
0x13:nineteen
024:twenty
# numbers need not go up
18:eighteen
# this will overwrite the definition from above
19:overwritten

✨ 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. 🫢


✨ SEE ALSO ✨

expack(1), exult(6)


and that's the whole page, bestie!! πŸ’– this one's from the Exult crew, dated 2002-03-24, and it lives in section 1 of the manual β€” so go forth and pack those strings. mwah. πŸŽ€βœ¨πŸ¦‹