FAForever / FAForever/fa

AiX doesn't impact RAS SACUs

Open
#4,966 0 comments 0 reactions 0 assignees View on GitHub
area: AI
Dominant language
Lua
Stars
264
Forks
260
Avg merge
3d 2h
Merged PRs (30d)
21

Description

**Describe the bug**
AiX is meant to provide AI with a boost to mass and energy (e.g. 1.5 AiX should give a 50% boost).
However, this doesn't impact on RAS SACUs, presumably because the AiX buff happens at the same time as the RAS buff/the one overwrites the other.

**To Reproduce**
Start a game with an AiX AI. Either cheat in a RAS SACU, or build one for the AI via a quantum gateway, and check how its mass and energy income don't reflect the AiX AI.

**Additional context**
I suspect there will be much better ways of fixing this, but as an example of one approach, the OnCreate logic could be hooked, a 1 tick delay added, and then the buffs rewritten, e.g. see FixUnitResourceCheatModifiers function of M28UnitInfo.lua
https://github.com/maudlin27/M28AI/blob/e4b295e62fd3498ca359e6a93db7b376d96987e7/lua/AI/M28UnitInfo.lua#L1823

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.