An enhancement DLL for Zoo Tycoon (2001) written in Rust. OpenZT enables more mods, bug fixes, and feature enhancements through function detouring and memory manipulation, all without modifying any original game assets.
- Lua Scripting Console - Runtime Lua execution via TCP socket (port 8080)
- Resource Manager - Custom file loading and modification system
- String Registry - Inject custom text strings into the game
- Settings System - Enhanced INI configuration loading
- Expansion Pack Support - Add custom expansions with proper UI integration
- Entity Management - Query and manipulate game entities
- Habitat/Exhibit Control - Interact with exhibits and tanks
- UI Hooks - Access and modify UI elements
- Game State - Read and modify zoo statistics (cash, guests, animals, etc.)
- World Manager - Query world state and map information
- Fixed crash when maintenance workers fix fences near map edge
- Fixed crash when deleting zoo walls near map edge
- Various vanilla game stability improvements
- Integration Tests - Automated testing in live game environment
- Configurable Logging - File and console logging with adjustable levels
- Lua Macro System - Simplified Lua function registration from Rust
- Zoo Tycoon (2001) installed
- 32-bit Windows Rust environment (i686-pc-windows-msvc)
# Clone repository
git clone https://github.com/openztcc/openzt.git
cd openzt
# Build and run
./openzt.bat run --releaseThe DLL will be copied to your Zoo Tycoon directory and the game will launch automatically.
./openzt.bat consoleOnce OpenZT is running, connect with the console:
-- Get game information
get_date() -- Current in-game date
zoostats() -- Display zoo statistics
add_cash(10000) -- Add $10,000 to budget
-- Entity management
get_selected_entity() -- Get details about selected entity
sel_type() -- Get selected entity type info
list_entities() -- List all entities in world
list_exhibits() -- List all habitats/exhibits
-- Settings
get_setting("AI", "cKeeperMaxTiredness")
set_setting("AI", "cKeeperMaxTiredness", "100")
list_settings() -- List all settings
-- UI interaction
continue() -- Click continue button
ui("click_continue") -- Alternative UI call
-- Help
help() -- List all available functions
help("cash") -- Search for cash-related functionsOpenZT reads configuration from openzt.toml in your Zoo Tycoon directory:
[logging]
level = "info" # trace, debug, info, warn, error
log_to_file = true # Write to openzt.logAlways use openzt.bat for cargo actions to ensure correct toolchain and target:
# Build only
./openzt.bat build --release
# Build and run
./openzt.bat run --release
# Wait for game to exit
./openzt.bat run --release --wait
# Code quality
./openzt.bat check
./openzt.bat clippy
./openzt.bat testOpenZT includes integration tests that run in a live game environment:
# Run integration tests (game launches and exits automatically)
./openzt.bat run --release -- --features integration-tests
# Run tests and wait for completion
./openzt.bat run --release --wait -- --features integration-tests
# View test results
cat "C:\Program Files (x86)\Microsoft Games\Zoo Tycoon\openzt_integration_tests.log"openzt/
├── openzt/ # Main DLL crate
│ └── src/
│ ├── lib.rs # Entry point and initialization
│ ├── scripting.rs # Lua scripting system
│ ├── resource_manager/ # Mod loading and resource handling
│ ├── settings/ # Game settings integration
│ └── integration_tests/ # Live game tests
├── openzt-loader/ # DLL injection executable
├── openzt-console/ # TCP-based Lua console
├── openzt-configparser/ # INI parser crate
└── openzt.bat # Unified build script
experimental- Experimental features (default: enabled)ini- INI settings system (default: enabled)command-console- Legacy command console (nightly only)integration-tests- Enable integration test frameworkcapture_ztlog- Capture and re-log vanilla game logs
We welcome contributions! See CONTRIBUTING.md for guidelines.
Important: Never commit Zoo Tycoon assets, code, configs, or decompiled content. OpenZT is a clean-room reimplementation.
This project is licensed under the MIT License - see the LICENSE file for details.