Mutator Possibility?

  • Please make sure you are familiar with the forum rules. You can find them here: https://forums.tripwireinteractive.com/index.php?threads/forum-rules.2334636/

Beskar Mando

Grizzled Veteran
Dec 13, 2014
1,575
63
48
Baltimore, Maryland
steamcommunity.com
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.
 
Sep 28, 2014
756
21
18
USA
Of course you can access and modify roles. Here's an example from ROGameInfo:

Code:
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++;
			}

			...


Reinforcements:

Code:
LastTeamReinforcementsLeft[`AXIS_TEAM_INDEX] = TeamReinforcementsLeft[`AXIS_TEAM_INDEX];
 
Last edited:
Sep 28, 2014
756
21
18
USA
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.
 
Last edited: