• 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/
  • Weve updated the Tripwire Privacy Notice under our Policies to be clearer about our use of customer information to come in line with the EU General Data Protection Regulation (GDPR) rules that come into force today (25th May 2018). The following are highlights of our changes:


    We've incorporated the relevant concepts from the GDPR including joining the EU and Swiss Privacy Shield framework. We've added explanations for why and how Tripwire processes customer data and the types of data that we process, as well as information about your data protection rights.



    For more information about our privacy practices, please review the new Privacy Policy found here: https://tripwireinteractive.com/#/privacy-notice

Mutator Possibility?

Beskar Mando

Grizzled Veteran
Dec 13, 2014
1,560
59
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: