
To be continued...
Code: Select all
event InitGame(.......
....
if (MonsterSkill > 7) MonsterSkill = 7; //Forced fix of possible wrong settings.
if (MonsterSkill < 1) MonsterSkill = 1; //I hate 0.
if (MonsterSkill == 0 || MonsterSkill == 1) //No need 0 check but nwm anyway
Difficulty = 0;
if (MonsterSkill == 2 || MonsterSkill == 3)
Difficulty = 1;
if (MonsterSkill == 4 || MonsterSkill == 5)
Difficulty = 2;
if (MonsterSkill == 6 || MonsterSkill == 7)
Difficulty = 3;
.....
Code: Select all
function SetPawnDifficulty(....
....
S.Skill = Difficulty; //Lines added. Have fun, ladies !
S.bMoraleBoosted = True;
S.bInitialFear = False;
......
Code: Select all
class GameInfo extends Info
native;
......
var byte Difficulty; // 0=easy, 1=medium, 2=hard, 3=very hard.
.....
function bool IsRelevant( actor Other )
{
local byte bSuperRelevant;
// let the mutators mutate the actor or choose to remove it
if ( BaseMutator.AlwaysKeep(Other) ) //Will be better to call your pawns in BaseMutator or else say Bye-Bye at some of them
return true;
if ( BaseMutator.IsRelevant(Other, bSuperRelevant) )
{
if ( bSuperRelevant == 1 ) // mutator wants to override any logic in here
return true; //here even some pawns cannot be replaced
//put replacement before to call this byte if you want to see some brothers
}
else return false; //Yep, else they are history.
......
if
( (Difficulty==0 && !Other.bDifficulty0 )
|| (Difficulty==1 && !Other.bDifficulty1 )
|| (Difficulty==2 && !Other.bDifficulty2 )
|| (Difficulty==3 && !Other.bDifficulty3 )
|| (!Other.bSinglePlayer && (Level.NetMode==NM_Standalone) )
|| (!Other.bNet && ((Level.NetMode == NM_DedicatedServer) || (Level.NetMode == NM_ListenServer)) )
|| (!Other.bNetSpecial && (Level.NetMode==NM_Client)) )
return False; //Wicks are removed as well ? Better call some difficulty ?
if( bNoMonsters && (Pawn(Other) != None) && !Pawn(Other).bIsPlayer )
return False;
if( FRand() > Other.OddsOfAppearing ) //Awsome, they can miss from games ? Great.
return False; //Stupid ideea ? Maybe not or maybe yes. Ask others...
Code: Select all
function CountHunters()
{
local Bot B;
local TournamentPlayer P;
HuntersTotal = 0;
foreach AllActors(class'TournamentPlayer', P)
{
if (!P.PlayerReplicationInfo.bIsSpectator)
HuntersTotal ++;
}
foreach AllActors(class'Bot', B)
{
if (!B.PlayerReplicationInfo.bIsSpectator)
HuntersTotal ++;
}
MonsterReplicationInfo(GameReplicationInfo).Hunters = HuntersTotal;
}
Code: Select all
function CountHunters()
{
TotalHunters = NumPlayers + NumBots;
MonsterReplicationInfo2(GameReplicationInfo).Hunter = TotalHunters;
}