Skip to content

bethington/d2-ds1-edit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

2 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

DS1Edit - Diablo II Level Editor

A powerful level editor for Diablo II that allows creation and modification of game maps (.ds1 files) with comprehensive tileset support and systematic validation tools.

πŸš€ Quick Start

# Clone or download the project
cd DS1Edit

# Build the project
build.bat debug

# Run DS1Edit
bin\win_ds1edit_debug.exe

πŸ“‹ Table of Contents

✨ Features

Core Functionality

  • DS1 File Editing: Create and modify Diablo II level files
  • Multi-Act Support: Full support for Acts 1-5 including Expansion content
  • Tileset Management: Comprehensive tileset validation and organization
  • Visual Editor: Graphical interface for map editing
  • Asset Management: Organized handling of game assets and resources

Advanced Tools

  • Systematic Testing: Individual DS1 file validation with error reporting
  • Automated INI Generation: Python scripts for configuration file creation
  • Batch Processing: Scripts for bulk operations and testing
  • Debug Mode: Enhanced logging and error checking capabilities

Supported Content

  • Act 1: Cave, Catacombs, Monastery areas
  • Act 2: Desert, Tomb, Maggot Lair areas
  • Act 3: Jungle, Kurast, Spider, Temple, Mephisto areas
  • Act 4: Mesa, Lava, Fortress, Diablo areas
  • Act 5: Siege, Barricade, Ice Cave areas

πŸ”§ Installation

Prerequisites

  • Operating System: Windows 10/11
  • Compiler: Microsoft Visual Studio 2019+ or MSVC Build Tools
  • Dependencies: Allegro 4.4.3.1 (included)
  • Optional: Python 3.x for utility scripts

Build Instructions

  1. Clone the Repository

    git clone [repository-url]
    cd DS1Edit
  2. Build the Project

    # Debug build (recommended for development)
    build.bat debug
    
    # Release build (optimized)
    build.bat release
  3. Verify Installation

    # Check if build was successful
    bin\win_ds1edit_debug.exe --version

πŸ“– Usage

Basic Operations

  1. Launch DS1Edit

    bin\win_ds1edit_debug.exe [mapfile.ds1] [tileset] [def_value]
  2. Load a Map

    • Use File β†’ Open to load existing .ds1 files
    • Navigate to assets/tiles/ for example maps
  3. Edit Maps

    • Use the tile palette to place tiles
    • Modify layers (floor, wall, shadow, etc.)
    • Save changes with File β†’ Save

Testing and Validation

  1. Test Individual Areas

    # Test Act 3 clearing areas
    scripts\batch\test_clearing_lines.bat
    
    # Test Act 4 mesa areas
    scripts\batch\test_mesa_lines.bat
  2. Generate Configuration Files

    python scripts\python\generate_level_inis.py

Configuration Management

  • Main Config: config/Ds1edit.ini - Primary DS1Edit settings
  • Area Configs: assets/*.ini - DS1 file lists for each game area
  • Tilesets: Organized by Act in assets/tiles/

πŸ“ Project Structure

DS1Edit/
β”œβ”€β”€ πŸ“ assets/              # Game assets and DS1 configuration files
β”‚   β”œβ”€β”€ excel/             # Game data (LvlPrest.txt)
β”‚   β”œβ”€β”€ tiles/             # DS1 files organized by Act
β”‚   └── *.ini              # Area configuration files
β”œβ”€β”€ πŸ“ bin/                 # Compiled executables
β”œβ”€β”€ πŸ“ build/               # Build artifacts
β”œβ”€β”€ πŸ“ config/              # Configuration files
β”œβ”€β”€ πŸ“ docs/                # Comprehensive documentation
β”œβ”€β”€ πŸ“ logs/                # Debug output and error logs
β”œβ”€β”€ πŸ“ media/               # Screenshots and graphics
β”œβ”€β”€ πŸ“ scripts/             # Development and utility scripts
β”œβ”€β”€ πŸ“ Sources/             # C/C++ source code
└── πŸ“ third_party/         # External libraries (Allegro)

πŸ› οΈ Development

Building from Source

  1. Setup Development Environment

    • Install Visual Studio 2019+ with C++ support
    • Ensure Windows SDK is available
    • Python 3.x for utility scripts (optional)
  2. Build Configuration

    # Debug build with full logging
    build.bat debug
    
    # Release build optimized
    build.bat release
    
    # Clean all build artifacts  
    scripts\batch\clean.bat
  3. Testing Framework

    # Test all areas systematically
    scripts\batch\test_*_lines.bat
    
    # Generate test reports
    python scripts\python\test_ini.py

Code Organization

  • Core Editor: Sources/ - Main DS1Edit application code
  • MPQ Support: Sources/mpq/ - Archive file handling
  • Build System: scripts/batch/ - Build and test scripts
  • Utilities: scripts/python/ - File generation and management

Development Workflow

  1. Make Changes: Edit source files in Sources/
  2. Build: Run build.bat debug
  3. Test: Use test scripts to validate changes
  4. Debug: Check logs/ for error output
  5. Commit: Use organized git structure

πŸ“š Documentation

Available Documentation

Quick Links

🎯 Key Features in Detail

Systematic DS1 Validation

  • Individual file testing with error classification
  • Exit code analysis (0=success, 1/3=various errors)
  • Automated generation of working file lists
  • Comprehensive error reporting

Multi-Act Tileset Support

  • Act 1: Tileset 2 (Cave), 4 (Catacombs), 5 (Monastery)
  • Act 2: Tileset 18 (Maggot), 10 (Desert), 12 (Tomb)
  • Act 3: Tileset 21 (Jungle), 20 (Town), 22 (Temple), 23 (Spider)
  • Act 4: Tileset 27 (Mesa), 28 (Lava), 29 (Diablo)
  • Act 5: Tileset 30 (Siege), 31 (Barricade), 35 (Ice)

Area Coverage Statistics

  • Act 2 Maggot: 2/40 files compatible (act number issues)
  • Act 3 Clearing: 90/90 files working (100% success)
  • Act 3 Kurast: 85 files covering urban areas
  • Act 3 Mephisto: 55 files for boss encounters
  • Act 4 Mesa: 42/145 files working (core areas functional)
  • Act 4 Lava: 43/45 files working (95.6% success)
  • Act 5 Siege: 15/55 files working (core strips functional)

🀝 Contributing

  1. Fork the Repository
  2. Create Feature Branch: git checkout -b feature/new-feature
  3. Make Changes: Follow existing code style
  4. Test Changes: Run test scripts to validate
  5. Update Documentation: Add/update relevant docs
  6. Submit Pull Request: Include description of changes

Development Guidelines

  • Use descriptive commit messages
  • Test all changes with validation scripts
  • Update documentation for new features
  • Follow existing project organization

πŸ“„ License

This project is open source. Please refer to the LICENSE file for details.

πŸ™ Acknowledgments

  • Built using Allegro 4.4.3.1 game development library
  • Based on Diablo II file format specifications
  • Community contributions for tileset validation and testing

DS1Edit - Professional Diablo II Level Editor with Comprehensive Validation and Multi-Act Support

About

A powerful level editor for Diablo II that allows creation and modification of game maps (.ds1 files) with comprehensive tileset support and systematic validation tools.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors