Skip to content

Marlinspike

LordOfMyatar edited this page May 17, 2026 · 2 revisions

Marlinspike - Search and Replace

Find anything, anywhere in your module.

The cross-tool search and replace engine for the Radoub toolset.


Table of Contents


Overview

TOC

Marlinspike searches and replaces text across all file types in your NWN module. It is available in two ways:

  • Trebuchet — the Marlinspike tab provides module-wide search and replace across all 17 supported GFF file types
  • Individual tools — Parley, Manifest, Quartermaster, Relique, and Fence each have inline search (Ctrl+F) for the currently open file

Marlinspike searches inside the files, not just filenames. It understands the structure of each file type and searches the right fields — dialog text, creature names, script references, item descriptions, faction names, palette entries, and more.


Using Marlinspike in Trebuchet

TOC

Open a module in Trebuchet, then click the Marlinspike tab (4th workspace tab, Ctrl+4).

Searching

  1. Enter your search text in the search box
  2. Configure options (case sensitivity, regex, etc.)
  3. Select which file types to search
  4. Press Enter or click Search

The status bar shows progress: "Searching file.dlg (5/47)". Click Cancel to stop a search in progress.

Search Options

Option Description
Case Sensitive Match exact letter case
Regex Interpret the search pattern as a .NET regular expression
Whole Word Only match complete words (word boundaries)
Category Filter which field types to search: Content, Identity, Script, Metadata, Variable, or All Fields
Search StrRefs Also search TLK-resolved text for StrRef values (requires TLK loaded). This has a performance cost for large modules.

File Type Filtering

Checkboxes control which file types are included in the search. Use Select All / Deselect All for quick toggling.

Supported types: DLG, UTC, BIC, UTI, UTM, JRL, UTP, UTD, UTE, UTT, UTW, UTS, GIT, ARE, IFO, FAC, ITP

Results

Results appear in a tree grouped by file type, then by file, then by individual matches with preview text.

  • Double-click a match to open the file in the appropriate Radoub tool (Parley for DLG, Quartermaster for UTC, Relique for UTI, etc.)
  • The status bar shows total match count, file count, and search duration
  • Files that failed to parse are listed separately as parse errors

Replacing

  1. Enter your replacement text in the replace box
  2. Click Replace All to replace every match, or Replace Selected to choose specific matches

Replace Selected opens a preview window where you can:

  • See each proposed change with before/after text
  • Check or uncheck individual matches
  • Review changes before committing

Replace Safety

Marlinspike protects your files during replace operations:

  • Automatic backup — files are backed up to ~/Radoub/Backups/{Module}/{Timestamp}/ before any changes
  • SHA256 verification — each backed-up file is verified with a hash
  • Rollback on failure — if any file write fails, all changes are automatically restored from backup
  • ResRef fields protected by default — resource reference fields are blocked from text replacement unless you enable Filename / ResRef Rename Mode (see below)

Filename / ResRef Rename Mode

TOC

Checking Include filename/ResRef changes Marlinspike from a text-replace tool to a module-wide rename tool. When enabled:

  • All file types (including the new NSS checkbox) are automatically selected
  • The "All Fields" category is automatically selected
  • The reference scan respects your file-type checkboxes — what you see in the results is what gets replaced. Unchecking a file type removes it from both the search and the rename.
  • In addition to GFF reference fields, Marlinspike also scans:
    • DLG script parameters (ActionParams, ConditionParams) when DLG is checked
    • .nss script source for the ResRef as a string literal when NSS is checked. High-confidence matches have surrounding quotes (e.g., "target_resref"); low-confidence matches are bare substrings and are flagged in the preview.
  • Renamed filenames are normalized to lowercase
  • The Aurora 16-character ResRef limit applies; collisions are auto-suffixed (_2, _3, etc.) with a confirmation prompt

Why You Might Want to Narrow Scope

Sometimes you don't want every reference updated. The classic case is splitting one NPC into two: you create a new .utc for the second NPC, then rename the original — but you want the new NPC to inherit some of the old NPC's dialog or scripts, not have those references updated to point at the rename target. Unchecking specific file types lets you scope the rename precisely.

Risks When Narrowing Scope

  • Forgotten references in unchecked file types will not be updated and may break in-game
  • Multiple developers may have authored references to the same resource at different times; a rename can surface or amplify inconsistencies that nobody knew existed
  • Compiled .ncs and 2DA references are never scanned by Marlinspike — they're always out of scope, regardless of checkbox state. If you have script binaries or 2DA columns referencing the renamed resource, you'll need to recompile or update those manually.

Always run a test session of your module after a rename to verify nothing broke. Pay particular attention to .nss script matches flagged "low confidence" — substring matches in script source can produce false positives.


Using Search in Individual Tools

TOC

Single-File Search

In Parley, Manifest, Quartermaster, Relique, and Fence:

  1. Press Ctrl+F to open the search bar
  2. Type your search text and press Enter
  3. Navigate matches with F3 (next) and Shift+F3 (previous)
  4. Press Ctrl+H to show the replace row
  5. Press Escape to dismiss

The search bar shows a match counter (e.g., "3 of 12 matches"). Matching sections auto-expand and results are highlighted.

Module-Wide Search from Parley

Press Ctrl+Shift+F in Parley to open a module-wide search dialog. This searches across all files in the module (same as Trebuchet's Marlinspike tab). Double-click a result to open the file.


Supported File Types

TOC

Marlinspike searches 17 GFF resource types. Each type has fields organized into searchable categories.

Type Description Key Searchable Fields
DLG Dialog files Text, Speaker, Quest, Comment, Scripts, Sound
UTC Creature blueprints Names, Description, Tag, ResRef, Deity, Scripts, Variables, Equipment, Backpack
BIC Player characters Same as UTC
UTI Item blueprints Name, Descriptions, Tag, ResRef, Comment
UTM Store blueprints Name, Tag, ResRef, Comment, Scripts, Variables
JRL Journal files Category Name/Tag, Entry Text, Comment
UTP Placeable blueprints Name, Description, Tag, ResRef, Comment, Scripts, Variables, Inventory
UTD Door blueprints Name, Description, Tag, ResRef, Comment, LinkedTo, Scripts, Variables
UTE Encounter files All string fields (generic search)
UTT Trigger files All string fields (generic search)
UTW Waypoint files All string fields (generic search)
UTS Sound files All string fields (generic search)
GIT Area instances All string fields across 8 instance lists (creatures, doors, placeables, etc.)
ARE Area properties Name, Tag, ResRef, Comments, Event scripts
IFO Module info Module Name, Description, Tag
FAC Faction files Faction names
ITP Palette files Branch names, category names, blueprint names and ResRefs

Field Categories

TOC

Use the Category filter to narrow searches to specific field types:

Category What It Searches
Content Dialog text, descriptions, names — player-visible text
Identity Speaker tags, item tags, quest references — identifiers
Script Event handler script references (OnHeartbeat, OnDeath, etc.)
Metadata Sound references, script parameters, other non-text data
Variable Local variable names and string values
All Fields Everything above

Keyboard Shortcuts

TOC

Trebuchet

Shortcut Action
Ctrl+4 Switch to Marlinspike tab

All Tools

Shortcut Action
Ctrl+F Find in current file
Ctrl+H Find and Replace in current file
Ctrl+Shift+F Find in module (Parley)
F3 Next match
Shift+F3 Previous match
Escape Dismiss search / cancel search

Tips

TOC

  • Search before replacing — run a search first to review matches, then switch to replace mode
  • Use field categories — searching "All Fields" is thorough but slow on large modules. Narrow by category when you know what you're looking for.
  • Regex for patterns — use .NET regex syntax for complex searches. Example: nw_s0_\w+ finds all standard spell scripts.
  • StrRef search — enable "Search StrRefs" to find text that comes from the talk table rather than being stored directly in the file. This is useful for base game content but adds search time.
  • Module must be unpacked — Marlinspike searches the working directory, not packed .mod files. Unpack your module in Trebuchet first.
  • ITP is search-only — palette files can be searched but not replaced (yet)

Troubleshooting

TOC

No Results Found

  1. Check that a module is loaded and unpacked in Trebuchet
  2. Verify the file type checkboxes include the type you expect
  3. Try disabling Case Sensitive if your search term has mixed case
  4. Check the Category filter isn't excluding the field you need

Search Is Slow

  • Disable "Search StrRefs" if you don't need TLK resolution
  • Narrow file type checkboxes to only the types you need
  • Use a field category filter instead of "All Fields"

Parse Errors in Results

Some files may fail to parse (corrupted or non-standard format). These are listed separately and don't block the rest of the search. The file can still be opened and examined in the appropriate tool.

Backup Location

Replace backups are stored in ~/Radoub/Backups/{ModuleName}/{Timestamp}/. Each backup includes the original files and a manifest with SHA256 hashes.


Home | Index

Page freshness: 2026-05-16


Parley

Getting Started

User Guide

Features

Help


Manifest


Quartermaster


Relique


Reliquary


Fence

  • Fence - Merchant/Store Editor

Trebuchet


Shared Features


Developers

Parley Internals

Manifest Internals

Quartermaster Internals

Relique Internals

Reliquary Internals

Fence Internals

Marlinspike (Search Engine)

Trebuchet Internals

Radoub.UI


Radoub.Formats

Library

Low-Level Formats

High-Level Parsers


Legacy Bioware Docs

Original BioWare Aurora Engine file format specifications.

Core Formats

Object Blueprints

Module/Area Files

Reference


Page freshness: 2026-05-24

Index

Clone this wiki locally