Open stevecotton opened 6 years ago
Affects SXC_Rush too, and probably many others
Although there is a bug causing these warning, all my comments about "big_boss" are wrong - that's set automatically for all AI sides in the normal SXC macros.
Thanks @Jordy-Jordan for the hint that it involves the fake-side's recruit. I think I now understand the bug, but IIUC it's one that affects the balance of all maps that have fake sides, even those that don't trigger the warning. So any fix to it (other than fixing it in a way that preserves the same behaviour) will need the maps to be rebalanced.
Suppose a fake side whose units are moved by AI 8. This side's recruitment is done during the "new turn" event, which doesn't have a side, but during which it seems $side_number
can be 1. Then (again IIUC, I haven't debugged through this):
SXC_ENEMY_FAKE_SIDE_TURN
, belonging to side 8.recruit
event in SXC_ENEMY_UPGRADE
triggers
recruits_$side_number|
, a.k.a. recruits_1
big_boss
on side 1, which leads to the error messageHowever, killing units on the fake side will decrement recruits_8
, increasing the recruit limit for the normal boss of side 8. If the fake side is killed before recruiting 30 units then the warning won't be triggered, but the recruit limit for side 8 will still be increased.
Right, I've even tried to manually add a 10th side to substitute the fake side with this error
Invalid WML found: [unstore_unit]: variable 'creeps' doesn't contain unit data
I also think the only way to fix it is to rebalance the maps
Okay, there's less problems than I thought.
The fake recruit code will set unit.role=fake_recruits
, which means that they don't affect the recruit limits when killed. And this seems to be working, even for recruit events that caused a WML error.
Yeah, that should work
Sorry for forgetting that 10-side support isn't in yet, I've opened #38 for cleaning it up and merging it.
Was there a missing "=" in ) role fake_recruits}
on line 1657 from SXC_unit_macros.cfg ?
No missing "=", it's the three-argument MODIFY_UNIT FILTER VAR VALUE
macro.
thx
During the AI turn, there are lots of warnings about
That seems to be from the code for limiting SXC bosses to a maximum of 30 recruits. While that limit wouldn't be right for Slaughter, the code needs updating. The warning seems to be caused that SXC_Slaughter.cfg doesn't assign the role "big_boss" to any leaders.