Post by kaoz on Jan 8, 2016 13:41:37 GMT 1
Ok, got my old computer back... so, just to summarize:
GetStatisticsValue(1, 0) >>> number of enemy units killed by player
GetStatisticsValue(2, 0) >>> no idea what it does
GetStatisticsValue(3, 0) >>> number of player units lost
GetStatisticsValue(4, 0) >>> no idea what it does
GetStatisticsValue(5, 0) >>> enemy artillery captured by player
GetStatisticsValue(6, 0) > GetStatisticsValue(16, 0) >>> no idea what it does
GetStatisticsValue(17, 0) >>> time elapsed
GetStatisticsValue(18, 0) >>> the amount of missions played ?
Changing the 2nd zero will, of course, make it count for the AI.
So, there's still more than a dozen that I haven't got a clue about, but it would be very interesting to know!
In BH-RT, I found a few more useful examples:
local kills = GetStatisticsValue(2, 2); -- AIprice
local looses = GetStatisticsValue(4, 2); -- AIprice
if ( strMissionName == "scenarios\scenariomissions\ussr\kursk\1") then
EnableChapter("scenarios\\chapters\\ussr\\ukraine\\1");
--Medal Conditions(Suvorov)
if ( (kills/(looses + 1)) >= 4) then
AddMedal("Medals\\USSR\\Suv1\\1", 2);
else
if ( (kills/(looses + 1)) >= 2) then
AddMedal("Medals\\USSR\\Suv2\\1", 2);
else
if ( (kills/(looses + 1)) >= 1) then
AddMedal("Medals\\USSR\\Suv3\\1", 2);
end;
end;
end;
end;
local iStat = GetStatisticsValue(17, 2); -- time elapsed
if ( strMissionName == "scenarios\scenariomissions\ussr\rumania\1") then
EnableChapter("scenarios\\chapters\\ussr\\german\\1");
--Medal conditions(Redstar)
AddMedal("Medals\\USSR\\Redstar\\1", 4);
--Medal Conditions(Kutuzov)
if (( (iStat <= 60) and (iStat >= 40)) and (HasMedal ("Medals\\USSR\\Kut3\\1") == 0) and (HasMedal ("Medals\\USSR\\Kut2\\1") == 0) and (HasMedal ("Medals\\USSR\\Kut1\\1") == 0)) then
AddMedal("Medals\\USSR\\Kut3\\1", 3);
else
if (( (iStat <= 39) and (iStat >= 20)) and (HasMedal ("Medals\\USSR\\Kut1\\1") == 0) and (HasMedal ("Medals\\USSR\\Kut2\\1") == 0)) then
AddMedal("Medals\\USSR\\Kut2\\1", 3);
else
if (( (iStat <= 19) and (iStat >= 0)) and (HasMedal ("Medals\\USSR\\Kut1\\1") == 0)) then
AddMedal("Medals\\USSR\\Kut1\\1", 3);
end;
end;
end;
end;
local standardmissions = 3;
if ((GetStatisticsValue (18, 0) >= (standardmissions + 1)) ) then
AddNewSlot ("M10_Wolverine_USA");
end;
GetStatisticsValue(1, 0) >>> number of enemy units killed by player
GetStatisticsValue(2, 0) >>> no idea what it does
GetStatisticsValue(3, 0) >>> number of player units lost
GetStatisticsValue(4, 0) >>> no idea what it does
GetStatisticsValue(5, 0) >>> enemy artillery captured by player
GetStatisticsValue(6, 0) > GetStatisticsValue(16, 0) >>> no idea what it does
GetStatisticsValue(17, 0) >>> time elapsed
GetStatisticsValue(18, 0) >>> the amount of missions played ?
Changing the 2nd zero will, of course, make it count for the AI.
So, there's still more than a dozen that I haven't got a clue about, but it would be very interesting to know!
In BH-RT, I found a few more useful examples:
local kills = GetStatisticsValue(2, 2); -- AIprice
local looses = GetStatisticsValue(4, 2); -- AIprice
if ( strMissionName == "scenarios\scenariomissions\ussr\kursk\1") then
EnableChapter("scenarios\\chapters\\ussr\\ukraine\\1");
--Medal Conditions(Suvorov)
if ( (kills/(looses + 1)) >= 4) then
AddMedal("Medals\\USSR\\Suv1\\1", 2);
else
if ( (kills/(looses + 1)) >= 2) then
AddMedal("Medals\\USSR\\Suv2\\1", 2);
else
if ( (kills/(looses + 1)) >= 1) then
AddMedal("Medals\\USSR\\Suv3\\1", 2);
end;
end;
end;
end;
local iStat = GetStatisticsValue(17, 2); -- time elapsed
if ( strMissionName == "scenarios\scenariomissions\ussr\rumania\1") then
EnableChapter("scenarios\\chapters\\ussr\\german\\1");
--Medal conditions(Redstar)
AddMedal("Medals\\USSR\\Redstar\\1", 4);
--Medal Conditions(Kutuzov)
if (( (iStat <= 60) and (iStat >= 40)) and (HasMedal ("Medals\\USSR\\Kut3\\1") == 0) and (HasMedal ("Medals\\USSR\\Kut2\\1") == 0) and (HasMedal ("Medals\\USSR\\Kut1\\1") == 0)) then
AddMedal("Medals\\USSR\\Kut3\\1", 3);
else
if (( (iStat <= 39) and (iStat >= 20)) and (HasMedal ("Medals\\USSR\\Kut1\\1") == 0) and (HasMedal ("Medals\\USSR\\Kut2\\1") == 0)) then
AddMedal("Medals\\USSR\\Kut2\\1", 3);
else
if (( (iStat <= 19) and (iStat >= 0)) and (HasMedal ("Medals\\USSR\\Kut1\\1") == 0)) then
AddMedal("Medals\\USSR\\Kut1\\1", 3);
end;
end;
end;
end;
local standardmissions = 3;
if ((GetStatisticsValue (18, 0) >= (standardmissions + 1)) ) then
AddNewSlot ("M10_Wolverine_USA");
end;