After two buggy games (both on Tropical if that matters) where my metalmaker AI wasn't responding to received energy from allies I did a lot of poking at my code trying to figure out why and eventually gave up after finding nothing that would cause it to ignore all energy received. I then got sent a replay by another player where the same thing happens so being determined to fix it I started outputting every variable I was tracking to find out which was reporting the wrong value...
It turned out the value being returned by GetTeamResources for received energy was always 0 despite him receiving energy from his allies, here's the replay:
http://pw3n.net/070211-VallesMarineris_v4-0.74b3.sdf
The player you want to watch is Ohmegaherz (Black), his received energy is never anything but 0 despite his allies hitting their share limits many times and his drain exceeding his output while full energy...
(you can spy on his received energy with a simple lua script)
GetTeamResources "received" value buggy?
Moderator: Moderators
- TheFatController
- Balanced Annihilation Developer
- Posts: 1177
- Joined: 10 Dec 2006, 18:46
- TheFatController
- Balanced Annihilation Developer
- Posts: 1177
- Joined: 10 Dec 2006, 18:46
Okay I have this bug identified now :)
Here's a widget that demonstrates the bug: http://pw3n.net/rec_spy.lua
It watches received energy and spams the value received if it's greater than zero, to highlight what's going wrong all you have to do is spectate any game or replay (I've tested four or five now) and watch the player on any team with the highest number by their name on the info list.
Their reported energy received is always 0 so the widget will be silent (as opposed to occasionally spammy with other players)
My guess is theres a loop or counter or something in the spring code thats too short and missing the last teammate.
Here's a widget that demonstrates the bug: http://pw3n.net/rec_spy.lua
It watches received energy and spams the value received if it's greater than zero, to highlight what's going wrong all you have to do is spectate any game or replay (I've tested four or five now) and watch the player on any team with the highest number by their name on the info list.
Their reported energy received is always 0 so the widget will be silent (as opposed to occasionally spammy with other players)
My guess is theres a loop or counter or something in the spring code thats too short and missing the last teammate.