Tool - Civ4 BTS Map Validator

onkelm

Warlord
Joined
Aug 13, 2010
Messages
108
New Tool: Civ4 BTS Map Validator – Thoroughly Check Your WorldBuilder Maps!

Dear Civ4 Community,

While developing my new Map Editor V3, I needed a tool to verify the full functionality of modified maps/scenarios. To do this quickly, I required a few tools to check the maps' functionality.

I’m excited to introduce the Civ4 BTS Map Validator, a powerful tool I developed in 2025 to thoroughly validate WorldBuilder save files (.CivBeyondSwordWBSave) for Civilization IV: Beyond the Sword.

Whether you’re creating custom maps, developing mods, or testing scenarios, this program helps you identify errors in your maps and ensures they function perfectly in-game. Here’s an overview of the tool, its features, and how to use it.


What is the Civ4 BTS Map Validator?​

The Civ4 BTS Map Validator is a program written in PureBasic that checks .CivBeyondSwordWBSave files for structural integrity and game compatibility. It was inspired by Dale’s detailed analysis of the WBS file structure and the support of the CivFanatics community. With a user-friendly interface and comprehensive checks, the tool ensures your maps meet the game’s requirements.

  • Version: 1.6-Release (2025)
  • Developer: OnkelM
  • Platform: Windows (with tooltips for easy operation)

Key Features​

The Validator performs five detailed checks to ensure your maps are both syntactically and functionally correct:

  1. Check A: Minimum Requirements
    • Verifies that at least 18 teams and 18 players are defined (standard for Civ4 BTS).
    • Ensures map size (grid width/height ≥ 10) and at least 100 plots are present.
    • Validates TeamIDs, team contact relationships, and player-team assignments.
  2. Check B: Loop and Data Validation
    • Checks the correct structure of blocks (Begin/End for Game, Team, Player, Map).
    • Ensures no empty values (after “=”) except in specific fields like descriptions.
    • Verifies proper block nesting.
  3. Check C: Map Block Logic
    • Validates map parameters such as grid size (1–500), latitude (-90 to 90), and wrap settings (0 or 1).
    • Ensures world size, climate, and sea level have valid values.
  4. Check D: Plot Information
    • Validates the structure of Plot, Unit, and City blocks.
    • Checks unique plot coordinates and counts resources, improvements, routes, units, and cities.
    • Detects errors like duplicate coordinates, missing coordinates, or multiple cities per plot.
  5. Check E: Plot Consistency
    • Confirms that the counted number of plots matches the declared grid size (width × height) and the “num plots written” value.

User Interface and Operation​

The program offers an intuitive interface with the following elements:

  • File Selection: Choose your .CivBeyondSwordWBSave file via the “Load” button.
  • Check Options: Enable desired checks (A–E) via checkboxes – each with tooltips.
  • Detailed Logging: Optional mode for plot-specific logs (slow but highly detailed).
  • Progress Display: Shows real-time progress during validation.
  • Results and Status: Results are displayed in a separate window with color-coded status messages (Green: All OK, Yellow: Missing data, Red: Map errors).
  • Help: A comprehensive manual (via the “Info” button) explains all checks, minimum requirements, and common errors.

Minimum Requirements for a Valid Map​

A minimally functional map requires according Dale`s - In depth look at the WBS file by Dale:

  • Version declaration (Version=11).
  • A Game block (can be empty).
  • 18 Team blocks and 18 Player blocks (standard for Civ4 BTS).
  • A Map block with valid parameters (e.g., grid width, world size).
  • At least one Plot block with coordinates and terrain type.

Tested with Various Mods​

The tool has been tested with mods such as AND, GEM, 1941, 1939, BASE, RFC, and more.


Attached Images​

4 Pictures and the exe zipped.


I’m looking forward to your feedback, bug reports, changes to newer maps, as well as constructive criticism or praise! :-)

Wishing you success and fun with it,

OnkelM
 

Attachments

  • Map Checker.png
    Map Checker.png
    123.1 KB · Views: 42
  • Map Checker-missing Data.png
    Map Checker-missing Data.png
    131.8 KB · Views: 46
  • Map Checker-wrong Data.png
    Map Checker-wrong Data.png
    89.6 KB · Views: 45
  • Map-Checker new v1.6-release.zip
    Map-Checker new v1.6-release.zip
    345 KB · Views: 46
  • Map-Checker-Error.png
    Map-Checker-Error.png
    124.7 KB · Views: 48
Back
Top Bottom