KembaliArsip / superapp-games / travian
superapp-games
travian
2897 file ยท 30.3 MB
Preview langsung dinonaktifkan untuk static export. Buka repo di GitHub untuk melihat halaman HTML asli.
README
๐๏ธ Travian Server - Complete Local Setup
A production-ready, fully-featured Travian game server running locally on your machine with Docker. Includes automation, monitoring, backup systems, and all game features.
๐ฎ Features
Core Game Features
- โ 5 Tribes: Romans, Teutons, Gauls, Egyptians, Huns
- โ Resource System: Wood, Clay, Iron, Crop with realistic production
- โ Building System: All buildings with upgrade queues
- โ Troop Training: All units with training queues
- โ Combat System: Attacks, defenses, reinforcements, raids
- โ Market System: Resource trading between players
- โ Alliance System: Create/join alliances with forums
- โ Hero System: Adventures, equipment, experience gain
- โ Artifacts: Special powers and bonuses
- โ Wonder of World: End-game WW race with Natars
- โ Medals: Weekly rankings and rewards
- โ Quest System: Tutorial and daily tasks
Infrastructure Features
- ๐ณ Docker Containerization: Full isolated container stack
- ๐ Game Automation: Cron jobs for all game mechanics
- ๐พ Automated Backups: Every 6 hours with 7-day retention
- ๐ Monitoring Dashboard: Real-time web-based monitoring
- ๐ Mail Server: Built-in MailHog for email testing
- โก Redis Caching: Performance optimization
- ๐๏ธ Database Admin: phpMyAdmin included
- ๐ก๏ธ Security: Hardened configuration
- ๐ฑ Cross-Platform: Works on macOS, Linux, Windows
๐ Quick Start
Prerequisites
- Docker Desktop 4.0+
- Git (optional, for updates)
macOS / Linux
cd travian
./setup.sh
Windows
cd travian
.\travian.ps1 start
# or
travian.bat start
Access Your Server
| Service | URL |
|---|---|
| ๐ฎ Game | http://localhost:8090 |
| โ๏ธ Admin | http://localhost:8090/Admin |
| ๐๏ธ Database | http://localhost:8081 |
| ๐ง Mail | http://localhost:8091 |
| ๐ Monitor | http://localhost:8092 |
Default Login: admin / admin123
๐ Management Commands
Universal (Shell/Bash)
./travian.sh start # Start server
./travian.sh stop # Stop server
./travian.sh restart # Restart server
./travian.sh status # Check status
./travian.sh logs # View logs
./travian.sh backup # Create backup
./travian.sh restore # Restore backup
./travian.sh shell # Open container shell
./travian.sh update # Update to latest
Using Makefile
make start # Start server
make stop # Stop server
make restart # Restart server
make status # Check status
make backup # Create backup
make monitor # Open monitoring
make help # Show all commands
Windows PowerShell
.\travian.ps1 start
.\travian.ps1 stop
.\travian.ps1 status
๐๏ธ Architecture
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ Travian Server Stack โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโค
โ โ
โ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโ โ
โ โ travian โ โ travian โ โ travian โ โ
โ โ -web โ โ -cron โ โ -mail โ โ
โ โ (PHP+Apache)โ โ (Automation) โ โ (MailHog) โ โ
โ โโโโโโโโฌโโโโโโโโ โโโโโโโโฌโโโโโโโโ โโโโโโโโฌโโโโโโโโ โ
โ โ โ โ โ
โ โโโโโโโโโโฌโโโโโโโโโดโโโโโโโโโฌโโโโโโโโโ โ
โ โ โ โ
โ โโโโโโโโโโผโโโโโโโโโ โโโโโโโโผโโโโโโโโโ โ
โ โ travian-redis โ โ travian-db โ โ
โ โ (Cache) โ โ (MariaDB) โ โ
โ โโโโโโโโโโโโโโโโโโโ โโโโโโโโโโโโโโโโโ โ
โ โ
โ Ports: 8090 (Game), 8081 (DB), 8091 (Mail), 8092 (Monitor) โ
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
โ๏ธ Automation System
The server runs automated tasks every minute:
| Script | Frequency | Description |
|---|---|---|
resources.sh | Every minute | Resource production |
buildings.sh | Every 30s | Building completion |
training.sh | Every 15s | Troop training |
movements.sh | Every 10s | Attack/reinforcement processing |
market.sh | Every minute | Trade delivery |
artifacts.sh | Every 5 min | Artifact management |
natars.sh | Every 10 min | NPC activity |
medals.sh | Daily | Weekly awards |
statistics.sh | Hourly | Rankings update |
backup.sh | Every 6 hours | Auto-backup |
cleanup.sh | Hourly | Database optimization |
๐พ Backup & Restore
Automatic Backups
Backups are created every 6 hours:
backups/
โโโ travian_db_20260101_120000.sql.gz
โโโ travian_files_20260101_120000.tar.gz
โโโ backup_20260101_120000.manifest
Manual Backup
./travian.sh backup
# or
make backup
Restore
./travian.sh restore
# Then select backup file
๐ Default Credentials
| Service | Username | Password |
|---|---|---|
| Game Admin | admin | admin123 |
| Database | travian | travian123 |
| Database Root | root | travianroot123 |
| MultiHunter | Multihunter | multihunter123 |
| Support | Support | support123 |
โ ๏ธ Change these after first login!
๐ Monitoring
Visit http://localhost:8092 for real-time monitoring:
- Server status
- Player statistics
- Resource usage
- Activity logs
- Quick links
๐ง Configuration
Game Settings
Edit GameEngine/config.php:
define("SPEED", "1"); // Game speed (1, 3, 5)
define("WORLD_MAX", "200"); // Map size (100-400)
define("TRADERCAP", "1"); // Merchant capacity
Docker Settings
Edit .env file to change:
- Port numbers
- Database passwords
- Backup retention
๐ Troubleshooting
Server won't start
# Check logs
./travian.sh logs
# Restart with rebuild
./travian.sh stop
docker-compose build --no-cache
./travian.sh start
Database issues
# Reset database
./travian.sh reset
# or manually
docker-compose down -v
./travian.sh start
Performance issues
- Check Redis:
docker-compose ps - Monitor resources: http://localhost:8092
- Clean logs:
make clean
๐ Directory Structure
travian/
โโโ docker-compose.yml # Docker configuration
โโโ Dockerfile # Web server image
โโโ Dockerfile.cron # Cron job image
โโโ .env # Environment variables
โโโ travian.sh # Linux/Mac management script
โโโ travian.ps1 # Windows PowerShell script
โโโ travian.bat # Windows batch script
โโโ setup.sh # One-click setup
โโโ Makefile # Make commands
โโโ README.md # This file
โโโ README-ADVANCED.md # Detailed documentation
โโโ GameEngine/ # Core game files
โโโ Admin/ # Admin panel
โโโ install/ # Installation files
โโโ scripts/ # Automation scripts
โ โโโ resources.sh
โ โโโ buildings.sh
โ โโโ training.sh
โ โโโ movements.sh
โ โโโ market.sh
โ โโโ backup.sh
โ โโโ ...
โโโ docker/ # Docker configs
โ โโโ cron/
โโโ monitor/ # Monitoring dashboard
โโโ backups/ # Backup storage
โโโ logs/ # Log files
โโโ sql/ # SQL initialization
๐ฏ Game Mechanics
Resource Production
- Fields generate resources every minute
- Production rate based on field level
- Storage limited by warehouse/granary
- Crop consumption by troops
Building Queue
- 1 building at a time (2 with Plus)
- Construction time based on level
- Master builder for queueing
Combat System
- Attack: Troops fight and return
- Raid: Plunder resources
- Reinforcement: Troops stay in target village
- Return: Surviving troops return home
Troop Training
- Queue system in barracks/stable/workshop
- Training time varies by unit
- Resources consumed on start
๐ Advanced Features
Redis Caching
- Session storage
- Game state cache
- Performance boost
Mail Server
- Test emails at http://localhost:8091
- All game emails captured
- No real emails sent
Security
- Isolated containers
- Non-root execution
- Secure defaults
๐ค Support
For issues:
- Check logs:
./travian.sh logs - Read README-ADVANCED.md
- Check Docker status:
docker-compose ps - Review setup info:
cat setup_info.txt
๐ License
TravianZ - Open Source Travian Clone Based on original TravianX project
๐ Credits
- TravianZ Team: Original developers
- TravianX Project: Base code
- Docker Community: Containerization
- You: For playing! ๐ฎ
Enjoy your Travian server! โ๏ธ๐ฐ
File Utama
- .gitattributes
- .gitignore
- .htaccess
- AC_OETags.js
- CODE_OF_CONDUCT.md
- CONTRIBUTING.md
- Dockerfile
- Dockerfile.cron