Skip to content

Generals coAI player

Latest

Choose a tag to compare

@djamic djamic released this 04 Feb 15:15
изображение

 Release v2026.02.04 - Supply Center Expansion

🎯 What's New

AI now automatically expands to gather resources from distant supply sources!

The Co-op AI (

AICoopPlayer) now intelligently manages economic expansion by:

  • Finding unexploited supply warehouses across the map
  • Sending a dedicated dozer to build Supply Centers near them
  • Using real pathfinding to calculate walking distance (not straight-line)
  • Protecting the expansion dozer from being recalled for other tasks

✨ Features

Feature | Description -- | -- 🗺️ Pathfinding Distance | Uses findGroundPath() for accurate distance - hills/water are considered 🛡️ Dozer Protection | Expansion dozer won't be stolen by base building logic 📍 Proximity Priority | Closest sources have 4x higher priority (W_BASE_PROXIMITY=4.0) ⚠️ Safe Path Check | Checks for enemy presence along the route ✅ Completion Detection | Auto-releases dozer after Supply Center is built 🚚 2 Trucks Minimum | Each Supply Center now gets at least 2 supply trucks

📦 Files Changed

  • AICoopPlayer.cpp
     - Main expansion logic (+500 lines)
  • AICoopPlayer.h
     - New member variables and 
    findDozer()
     override
  • AIPlayer.cpp
     - Supply truck minimum count fix
  • AI_HANDOVER.md
     - Complete documentation (Uzbek)
  • README.md
     - Updated features list

🔧 Technical Details

  • Scoring formula: 
    Score = 4.0×baseScore + 1.5×enemyScore + 0.5×resourceScore
  • Parameters: Min $2000, Max 3000 from base, Min 1000 from enemy
  • Check interval: Every 5 seconds (150 frames)

📋 Installation

  1. Download 
    generalszh.exe
     from this release
  2. Copy to your C&C Generals Zero Hour game folder
  3. Launch the game and press 
    INSERT
     to activate AI Assist