- 📊 Google Sheets Integration: Load battle data directly from your Google Sheets
- 🖥️ Large URL Input GUI: User-friendly interface for entering Google Sheets URLs with URL caching
- ⚡ Auto-Play Mode: Automatic battle progression with 2-second intervals
- 🎯 Interactive GUI: Beautiful battle visualization with real-time map updates
- 🔗 Automatic URL Parsing: Supports various Google Sheets URL formats
- 🐛 Debug Mode: Toggle detailed logging for damage calculation and combat mechanics
- 📍 Real-time Battle Visualization: Visual map with unit positions, status effects, and movement paths
- 💀 Advanced Combat System: Support for overkill damage, status effects, and dead unit tracking
- 🛡️ Status Effects: Support for attack reduction (減攻), defense reduction (減防), and vulnerability (易傷)
- 🎯 Smart Targeting: Intelligent movement and targeting system
- 🔄 Movement System: Pathfinding and range calculation with visual feedback
- Windows: Double-click
run_simulator.bat
- Linux/Mac: Run
./run_simulator.sh
orbash run_simulator.sh
- The smart launcher will automatically:
- Check Python installation
- Install missing dependencies
- Launch the simulator
- Run the build script:
python build_exe.py
- This creates
dist/BattleSimulator.exe
- a standalone executable - Share the .exe file - no Python installation needed on target machines!
- This creates
dist/BattleSimulator.exe
- a standalone executable - Share the .exe file - no Python installation needed on target machines!
# Install dependencies
pip install -r requirements.txt
# Run the simulator
python simulator.py
-
When you run the simulator, you'll be prompted to enter your Google Sheets URL
-
Supported URL formats:
https://docs.google.com/spreadsheets/d/SHEET_ID/edit#gid=GID
https://docs.google.com/spreadsheets/d/SHEET_ID/edit?gid=GID
https://docs.google.com/spreadsheets/d/SHEET_ID/edit?usp=sharing&gid=GID#gid=GID
-
Make sure your Google Sheet is publicly accessible:
- Click "Share" in your Google Sheets
- Change permissions to "Anyone with the link can view"
- Copy the sharing URL and paste it into the simulator
https://docs.google.com/spreadsheets/d/1rf1uZHKJhhCQ_10qvzQkoSaD56ExFxE8SOWAxjXlwyo/edit?gid=489835885#gid=489835885
- Start the simulator using any installation option above
- Enhanced URL Input GUI will appear with:
- 📝 Clear instructions and examples
- 📏 Large, scrollable input field for long Google Sheets URLs
- 📚 Step-by-step setup guide for making your sheet accessible
- 💾 Automatic URL caching (remembers your last URL)
- 🗑️ Clear cache option
- ✅ Options to proceed, cancel, or use test mode
- Enter your Google Sheets URL when prompted
- The simulator will parse the URL and load your battle data
- If loading fails, you can choose to use test mode instead
- Enhanced Battle Interface Features:
- 🐛 Debug Toggle: Click "開啟DEBUG"/"關閉DEBUG" to see detailed combat calculations
- ⚡ Auto-Play Mode: Click "自動播放"/"停止自動" for automatic progression (2-second intervals)
- 🎮 Manual Control: Use Continue button or press any key to proceed step-by-step
- 🛑 End Battle: Stop the simulation at any time
- 📊 Real-time Map: Visual representation with unit positions, HP, status effects
- 📍 Movement Paths: See unit movement with highlighted paths
- 💀 Dead Unit Display: Shows "被擊毀" with overkill damage for eliminated units
- Follow the on-screen battle progression and enjoy the tactical combat!
- Python 3.7 or higher
- Windows, macOS, or Linux
- Internet connection (for Google Sheets data)
pandas
- Data manipulationrequests
- HTTP requests for Google Sheetstkinter
- GUI framework (usually included with Python)
- Install Python from https://python.org
- Make sure to check "Add Python to PATH" during installation
- Windows: Reinstall Python with tkinter option checked
- Ubuntu/Debian:
sudo apt-get install python3-tk
- CentOS/RHEL:
sudo yum install tkinter
- macOS:
brew install python-tk
Run: pip install pandas requests
battleSimulator/
├── simulator.py # Main simulator code
├── run_simulator.bat # Windows launcher
├── run_simulator.sh # Linux/Mac launcher
├── build_exe.py # Executable builder
├── requirements.txt # Python dependencies
├── README.md # This file
└── test_*.py # Test scripts
- Right-click on
run_simulator.bat
- Select "Create shortcut"
- Move the shortcut to your desktop
- Rename it to "Battle Simulator"
- Right-click shortcut → Properties → Change Icon (optional)
Share the entire folder with the launcher scripts
- Run
python build_exe.py
to create standalone executable - Share only the
dist/BattleSimulator.exe
file - No Python installation required on target machines
- All test scripts can be run directly:
python test_*.py
- Debug mode available in the GUI
- Google Sheets data is automatically fetched and cached simulator