A sophisticated build time estimation widget for Beyond All Reason that provides real-time, economy-aware predictions for unit construction times.
- โฑ๏ธ Real-Time Build Time Estimates - Calculates accurate construction times based on available builders
- ๐ฐ Economy-Aware Predictions - Accounts for metal/energy constraints and storage levels
- ๐จ Smart Builder Detection - Automatically detects builders in range and selected units
- ๐๏ธ Nano Turret Support - Includes nano turrets in build power calculations
- ๐๏ธ Spectator Mode - Fully functional in spectator mode for casting and observing
- ๐ข Green - Economy can fully support construction
- ๐ก Yellow - Partial economy support (60-99% efficiency)
- ๐ด Red - Economy bottleneck detected
- ๐ Resource Display - Shows metal/energy consumption rates and storage levels
- Hold
backtick(`) - View only idle builders - Hover over constructions - See completion time for units being built
- Dynamic updates - Refreshes calculations as economy changes
- Download
build_time_estimator_v2.lua - Place in your BAR widgets folder:
- Windows:
C:\Users\[YourName]\AppData\Local\Beyond All Reason\data\LuaUI\Widgets\ - Linux:
~/.local/share/Beyond All Reason/data/LuaUI/Widgets/ - Mac:
~/Library/Application Support/Beyond All Reason/data/LuaUI/Widgets/
- Windows:
cd ~/.local/share/Beyond All Reason/data/LuaUI/Widgets/
git clone https://github.com/pyrem/bar-build-timer.git
cp bar-build-timer/build_time_estimator_v2.lua ./- Launch Beyond All Reason
- Press
F11to open Widget Selector - Find "โฑ๏ธ Build Time Estimator v2" and enable it
- (Optional) Press
Ctrl+F11to adjust widget position
- Select a building to construct - The widget activates when placing buildings
- View time estimate - Shows above your cursor with builder count
- Check economy status - Color coding indicates if you can afford continuous construction
Hold the backtick key (`) to instantly filter and show only idle builders in range. This helps you:
- Identify unused construction capacity
- Optimize builder assignments
- Spot idle nano turrets
Hover over any unit under construction to see:
- Remaining build time
- Current build power applied
- Resource consumption rates
- Storage availability
- Progress percentage
โฑ๏ธ 45s <- Build time estimate
(3 builders, 2 turrets) <- Active builders count
Usage โข 125 M/s โข 450 E/s <- Resource consumption
Storage โข 2.5k M โข 8k E <- Available storage
The widget works out-of-the-box with sensible defaults. Advanced users can modify these constants in the code:
local UPDATE_FREQUENCY = 15 -- Frames between updates (15 = 0.5s)
local HOVER_CHECK_FREQUENCY = 6 -- Hover check rate (6 = 0.2s)
local CACHE_UPDATE_FREQUENCY = 45 -- Cache refresh rate (45 = 1.5s)- Frame-based throttling - Updates only when necessary
- Intelligent caching - Reduces API calls
- Selective rendering - Only draws when active
- Efficient calculations - Uses squared distance for range checks
- CPU: Minimal (< 1% impact)
- Memory: ~100KB
- FPS Impact: Negligible
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
- Clone the repository
- Make your changes
- Test in-game with
/luaui reload - Submit a pull request
- Use local variables for performance
- Comment complex logic
- Follow BAR widget conventions
- Test in both player and spectator modes
- Build time may show
โif no builders are available - Estimates assume continuous resource income
- Does not account for commander assistance bonuses
- Added spectator mode support
- Implemented economy-aware predictions
- Added nano turret detection
- Improved performance with caching
- Added hover information for constructions
- Color-coded economy indicators
- Idle builder filtering with backtick key
- Initial release
- Basic build time calculation
- Builder detection
This project is licensed under the GNU General Public License v2.0 or later - see the LICENSE file for details.
- Beyond All Reason development team
- Spring RTS engine developers
- BAR community for testing and feedback
- Bug Reports: Create an issue
- Discord: Find me on the BAR Discord
- BAR Forums: Beyond All Reason Forums
Check out my other widgets for Beyond All Reason:
- Smart Turrets - Intelligent nano turret automation
- Nano Auto-Build - Automatic construction assistance
- More widgets...
Made with โค๏ธ for the Beyond All Reason community