I was wondering if it was possible to create a Mutator that could modify Objective settings, add or remove roles, and modify reinforcement values, or am I just dreaming, as I know these are all defined in the map's world info.
function int GetBotCapableRoles()
{
local ROMapInfo ROMI;
local int NumBotRoles, NewSquadIndex, NewFireTeamIndex, NewRoleIndex;
NumBotRoles = 0;
if ( WorldInfo.GetMapInfo() != none && ROMapInfo(WorldInfo.GetMapInfo()) != none )
{
ROMI = ROMapInfo(WorldInfo.GetMapInfo());
for ( NewSquadIndex = 0; NewSquadIndex < ROMI.AlliesSquads.Length; NewSquadIndex++ )
{
if( DesiredPlayerCount < ROMI.AlliesSquads[NewSquadIndex].MinimumPlayers )
continue;
if( ROMI.AlliesSquads[NewSquadIndex].SquadLeader.RoleInfo != none && ROMI.AlliesSquads[NewSquadIndex].SquadLeader.RoleInfo.bBotSelectable )
{
NumBotRoles++;
}
...
LastTeamReinforcementsLeft[`AXIS_TEAM_INDEX] = TeamReinforcementsLeft[`AXIS_TEAM_INDEX];
reliable server function ServerZeroReinforcements(byte TeamIndex)
{
`ifndef(ShippingPC)
ROTeamInfo(Teams[TeamIndex]).ReinforcementsRemaining = 0;
`endif
}
Code:reliable server function ServerZeroReinforcements(byte TeamIndex) { `ifndef(ShippingPC) ROTeamInfo(Teams[TeamIndex]).ReinforcementsRemaining = 0; `endif }
Boom, there you go. That should let you control reinforcements mid-game.