Code: Select all
function gadget:GetInfo()
return {
name = "AIinfo",
desc = "get the performance of the ai's",
author = "prandipadaro",
date = "6/6/2015",
license = "GPLv2",
layer = -1,
enabled = true -- loaded by default?
}
end
function gadget:GameOver()
print(tostring('AIFEEDBACKSTART-AIFEEDBACKSTART-AIFEEDBACKSTART-AIFEEDBACKSTART-AIFEEDBACKSTART-AIFEEDBACKSTART'))
local allTeams=Spring.GetTeamList()
for i,v in ipairs(allTeams) do
print(tostring(i),tostring(v))
local q,w,e,r,t,y=Spring.GetAIInfo(v)
print(tostring(q),tostring(w),tostring(e),tostring(r),tostring(t),tostring(y))
if q then
local max=Spring.GetTeamStatsHistory(v)
a={}
local a= Spring.GetTeamStatsHistory(v,max,max)
print (tostring(a[1].frame))
print(type(a))
for k,n in pairs(a[1]) do
print(tostring(k),tostring(n))
end
end
end
print(tostring('AIFEEDBACKSTOP-AIFEEDBACKSTOP-AIFEEDBACKSTOP-AIFEEDBACKSTOP-AIFEEDBACKSTOP-AIFEEDBACKSTOP-AIFEEDBACKSTOP'))
end
but i need to have it outside a game, avaible for each games
I tried to put it in /spring/luaui/widgets but does not work
any help?