Forum Mod Bakery Docs

CustomText Searcher

Please sign in to reply to this topic.
An interactive console-UI tool to run searches within CustomText-format/".ini" textbibles, either created for mods or exported from the game's textbible P3Ds via Lucas' Pure3D Editor. Made in Python 3 and requires a Python 3 interpreter - see the Python website. Completely free for reuse and such.


Features
  • Supports different encodings.
  • Filter by inclusion/exclusion of terms.
  • Filter within the scope of the results of the last filter, or restore the whole textbible.
  • Optional case-sensitivity/padding/fading.
  • Output results to a plain-text file.

Usage
 USAGE (op names case-insensitive):
        s|...    : Limit results pool to Strings containing "...".
        t|...    : Limit results pool to Texts containing "...".
        xs|...   : Limit results pool to Strings not containing "...".
        xt|...   : Limit results pool to Texts not containing "...".
        L        : Load whole textbible to results pool (asked for path and encoding).
        S        : Save current results pool to text file (asked for path and encoding).
        C        : Toggle case-sensitive mode for s/t/xs/xt operations.
        R        : Restore results pool to state upon last L operation.
        N        : State results pool size.
        PAD      : Toggle padding String-Text pairs for alignment when listing results pool pairs.
        CUT      : Toggle fading long Texts when listing results pool pairs.
        X        : Exit program.
        HELP     : Show usage information.
 String=Text
 You almost certainly want either "UTF-8" (mod) or "UTF-16" (vanilla) for encodings.
 PAD and CUT states do not affect S operation output, only results pool listings in UI.
 CLI users can do "python -m CTSearcher.py <path> <encoding>" or similar as a shortcut.

Notes
  • Text is handled/presented unformatted/"as-is" by design - it will not appear exactly as it would in-game in any sense.
  • As such, included formatting characters are searchable/excludable/included in outputs.
  • Supports ";" and "#" comments as well as inclusion of those characters within Text via "\" escape character.
  • Pairs found under CustomText "[Miscellaneous]" sections are ignored.
  • Pairs found under CustomText "[Variables]" sections are counted as normal pairs, but with "VARIABLES::" prefixed.
  • Pairs found under CustomText "[CustomText]" sections (or under no named section) are counted as normal pairs, with no prefix.
  • Pairs found under CustomText level/mission/side-mission-specific sections have their locality followed by "::" prefixed (i.e. "L1M2::STRING=TEXT").
  • Any added prefix is searchable/excludable/included in outputs.

Download/view via GitHub