Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames

KFStoryGame.KFLevelRules_Story


00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091
00092
00093
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00107
00108
00109
00110
00111
00112
00113
00114
00115
00116
00117
00118
00119
00120
00121
00122
00123
00124
00125
00126
00127
00128
00129
00130
00131
00132
00133
00134
00135
00136
00137
00138
00139
00140
00141
00142
00143
00144
00145
00146
/*
	--------------------------------------------------------------
	KFLevelRules_Story
	--------------------------------------------------------------

	Extended LevelRules info for use in 'Story' style missions .
	Can modify player starting equipment, health, cash , etc.
	Also stores a list of Objectives the player must complete to
	be victorious.

	Author :  Alex Quick

	--------------------------------------------------------------
*/

class KFLevelRules_Story extends KFLevelRules
hidecategories(Sound,Events)
dependson(KFStoryGameInfo) ;

#exec OBJ LOAD FILE=KFStoryGame_Tex.utx

/* should the first objective in the StoryObjectives array activate as soon as the match begins ? */
var(Rules_Objectives)       bool                         bAutoStartObjectives;

/* Amount of dosh to start players out with in story mode */
var(Rules_Cash)			    int							 StartingCashSum;

/* A modifier for the amount of cash players receive from killing zombies.  ie. at 0.f they will not receive anything */
var(Rules_Cash)			    float						 CashReward_ZEDKills_Modifier;

/* A modifier for the amount of cash players lose when they die */
var(Rules_Cash)			    float						 CashPenalty_Death_Modifier;

/* absolute maximum number of zombies we can have in this story map at one time */
var(Rules_Monsters)			int						     MaxEnemiesAtOnce;

/* should the game kill off ZEDs which haven't been seen by players for a while?  */
var(Rules_Monsters)         bool                         bAutoKillStragglers;

/* Auto Kill threshold if bAutoKilLStragglers is true */
var(Rules_Monsters)         int                          MaxStragglers;

/* Struct for controlling attributes which affect enemy spawning base on game difficulty and player count */
struct SMonsterSpawnScaling
{
    var () KFStoryGameInfo.SDifficultyWrapper            EnemySpawnRate;

    var () KFStoryGameInfo.SDifficultyWrapper            NumberOfEnemies;
};

var(Rules_Monsters)         SMonsterSpawnScaling         Spawn_Difficulty_Scaling;

/* should bots be allowed to spawn ? */
var(Rules_Bots)				bool						 bAllowBots;

/* Textures to display on the HUD when the match is over */
var(Rules_HUD) 				Material 					 VictoryMaterial,DefeatMaterial;

/* If a team is restarted after dying during a story mission these are the actor types we need to reset*/
var(Rules_CheckPoints)	    array<class>		         CheckpointResetClasses ;

/* If true the weapon / item pickups in the map will be randomly spawned based on difficulty - like in a normal KF match */
var(Rules_Equipment)        bool                         bRandomizeWeaponPickups;

// Amount of starting HP for all players
var(Rules_Equipment)        int                          PlayerStartHealth;

// Amount of starting armor for all players.
var(Rules_Equipment)        int                          PlayerStartArmor;

// Defines starting equipment for players
var(Rules_Equipment)        array< Class<Inventory> >    RequiredPlayerEquipment;

/* if true, allow high level players to spawn with their 'default' gear */
var(Rules_Equipment)		bool						 bAllowPerkStartingWeaps;

// Enable / Disable Cash display on HUD .
var(Rules_HUD)              bool                         bShowCash;

var(Rules_HUD)              name                         HUDStyle;


function ModifyPlayer( Pawn Other )
{
	if( PlayerStartHealth>0 )
		Other.Health = PlayerStartHealth;
	if( PlayerStartArmor>0 )
		Other.ShieldStrength = PlayerStartArmor;
}

function AddGameInv( Pawn Other )
{
	local int i;
	local Inventory Inv;

	For( i=0; i<RequiredPlayerEquipment.Length; i++ )
	{
		if( RequiredPlayerEquipment[i]==None )
			Continue;
		if( Other.FindInventoryType(RequiredPlayerEquipment[i])==None )
		{
			Inv = Spawn(RequiredPlayerEquipment[i]);
			if( Inv != None )
			{
				Inv.GiveTo(Other);
				if ( Inv != None )
					Inv.PickupFunction(Other);
			}
		}
	}
}

defaultproperties
{
     bAutoStartObjectives=True
     StartingCashSum=250
     CashReward_ZEDKills_Modifier=1.000000
     CashPenalty_Death_Modifier=1.000000
     MaxEnemiesAtOnce=32
     bAutoKillStragglers=True
     MaxStragglers=5
     Spawn_Difficulty_Scaling=(EnemySpawnRate=(Scale_GameDifficulty=(Scale_Beginner=1.000000,Scale_Hard=1.170000,Scale_Suicidal=1.170000,Scale_HellOnEarth=1.170000),Scale_PlayerCount=(Scale_1P=1.000000,Scale_2P=1.000000,Scale_3P=1.000000,Scale_4P=1.170000,Scale_5P=1.530000,Scale_6P=3.300000)),NumberOfEnemies=(Scale_GameDifficulty=(Scale_Beginner=0.700000,Scale_Hard=1.300000,Scale_Suicidal=1.500000,Scale_HellOnEarth=1.700000),Scale_PlayerCount=(Scale_1P=1.000000,Scale_2P=2.000000,Scale_3P=2.750000,Scale_4P=3.500000,Scale_5P=4.000000,Scale_6P=4.500000)))
     VictoryMaterial=Combiner'KFMapEndTextures.VictoryCombiner'
     DefeatMaterial=Combiner'KFMapEndTextures.DefeatCombiner'
     CheckpointResetClasses(0)=Class'KFMod.ZombieVolume'
     CheckpointResetClasses(1)=Class'Gameplay.ScriptedSequence'
     CheckpointResetClasses(2)=Class'Engine.Pickup'
     CheckpointResetClasses(3)=Class'Engine.Pawn'
     CheckpointResetClasses(4)=Class'Engine.Triggers'
     CheckpointResetClasses(5)=Class'Gameplay.TriggerLight'
     CheckpointResetClasses(6)=Class'Engine.BlockingVolume'
     CheckpointResetClasses(7)=Class'Engine.Decoration'
     CheckpointResetClasses(8)=Class'KFStoryGame.KF_StoryWaveDesigner'
     CheckpointResetClasses(9)=Class'KFStoryGame.StaticMeshActor_Hideable'
     CheckpointResetClasses(10)=Class'KFStoryGame.KF_StoryWaveDesigner'
     bRandomizeWeaponPickups=True
     RequiredPlayerEquipment(0)=Class'KFMod.Single'
     RequiredPlayerEquipment(1)=Class'KFMod.Syringe'
     RequiredPlayerEquipment(2)=Class'KFMod.Welder'
     RequiredPlayerEquipment(3)=Class'KFMod.Frag'
     RequiredPlayerEquipment(4)=Class'KFMod.knife'
     bAllowPerkStartingWeaps=True
     bShowCash=True
     Texture=Texture'KFStoryGame_Tex.Editor.KFRules_Ico'
}

Overview Package Class Source Class tree Glossary
previous class      next class frames      no frames
Class file time: Fri 13-10-2023 03:17:28.000 - Creation time: Fri 13-10-2023 03:19:03.615 - Created with UnCodeX