KFWaveOutput

From Tripwire Interactive Wiki
Jump to navigation Jump to search
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.

This is my wave info generator. --Benjamin (talk) 11:52, 16 November 2012 (EST) Result is stored here.

Result is stored here.

:
class Mut extends Mutator;

function PostBeginPlay() { local int x, y, z; local int NumMon; local string MonID; local string OutStr; local KFGameType KF;

KF = KFGameType(Level.Game);

// ====================================== // Output debug info //=======================================

// Squads Log(""); Log("SQUADS"); for (x = 0; x < KF.StandardMonsterSquads.Length; x++) { OutStr = "#" $ x $ ": "; for (y = 0; y < Len(KF.StandardMonsterSquads[x]); y += 2) { NumMon = int(Mid(KF.StandardMonsterSquads[x], y)); MonID = Mid(KF.StandardMonsterSquads[x], y + 1);

for (z = 0; z < NumMon; z++) { if (z > 0 || y > 0) Outstr $= ", "; OutStr $= GetSpecimenName(KF.StandardMonsterClasses[Asc(MonID) - Asc("A")].MClassName); } } Log(OutStr); } Log("");

// Special squads (short) Log("SPECIAL SQUADS (SHORT)"); for (x = 0; x < KF.ShortSpecialSquads.Length; x++) { OutStr = "Wave #" $ x $ ": "; for (y = 0; y < KF.ShortSpecialSquads[x].ZedClass.Length; y++) { if (y > 0) OutStr $= ", "; OutStr $= KF.ShortSpecialSquads[x].ZedClass[y] @ "(x" $ KF.ShortSpecialSquads[x].NumZeds[y] $ ")"; } Log(OutStr); } Log("");

// Special squads (normal) Log("SPECIAL SQUADS (NORMAl)"); for (x = 0; x < KF.NormalSpecialSquads.Length; x++) { OutStr = "Wave #" $ x $ ": "; for (y = 0; y < KF.NormalSpecialSquads[x].ZedClass.Length; y++) { if (y > 0) OutStr $= ", "; OutStr $= KF.NormalSpecialSquads[x].ZedClass[y] @ "(x" $ KF.NormalSpecialSquads[x].NumZeds[y] $ ")"; } Log(OutStr); } Log("");

// Special squads (long) Log("SPECIAL SQUADS (LONG)"); for (x = 0; x < KF.LongSpecialSquads.Length; x++) { OutStr = "Wave #" $ x $ ": "; for (y = 0; y < KF.LongSpecialSquads[x].ZedClass.Length; y++) { if (y > 0) OutStr $= ", "; OutStr $= KF.LongSpecialSquads[x].ZedClass[y] @ "(x" $ KF.LongSpecialSquads[x].NumZeds[y] $ ")"; } Log(OutStr); } Log("");

// Waves (short) Log("Short"); for (x = 0; x < 4; x++) { OutStr = "Wave #" $ x $ ": " $ GetSetBitString(KF.ShortWaves[x].WaveMask); Log(OutStr); } Log("");

// Waves (normal) Log("Normal"); for (x = 0; x < 7; x++) { OutStr = "Wave #" $ x $ ": " $ GetSetBitString(KF.NormalWaves[x].WaveMask); Log(OutStr); } Log("");

// Waves (long) Log("Long"); for (x = 0; x < 10; x++) { OutStr = "Wave #" $ x $ ": " $ GetSetBitString(KF.LongWaves[x].WaveMask); Log(OutStr); } Log(""); }

function string GetSetBitString(int Bits) { local string OutStr; local int x;

for (x = 0; x < 32; x++) { if (bool(Bits & (1 << x))) { if (x > 0) OutStr $= ", "; OutStr $= x; } }

return OutStr; }

function string GetSpecimenName(string FullName) { local string OutName;

OutName = GetItemName(FullName); if (Left(OutName, 6) == "Zombie") OutName = Right(OutName, Len(OutName) - 6); return OutName; }

defaultproperties { GroupName="KF-KFWaveOutputMut" FriendlyName="KFWaveOutput" Description="..." }