• 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/

[idea] Write custom sandbox mutator. together with GIThub or Google Code

Hi,
I have idea to write MonsterConfig mutator, but want try to make it together with community, sharing the code with other collaborators, so they will commit code too.

firstly, need to build some logic and imagine how it must work:
I suggest next concept:

First In PerObjectConfig config_Monsters.ini we declare each monster and its params like:
Code:
// define monster and its parameters
[Monster_Clot_125_25 MonsterInfo]
MClass=KFChar.ZombieClot
Health = 125
HeadHealth = 25
PerPlayerAdd=(Health=10, HeadHealth=2)
Resist=(DamType="KFMod.DamTypeKnife", coeff=0.9)
Resist=(DamType="KFMod.DamTypeChainsaw", coeff=0.9)

// define killer Fleshpound monster
[Monster_FleshpoundKiller MonsterInfo]
MClass=KFChar.ZombieFleshPound
Health = 10000
HeadHealth = 3000

// define Squad with 4 clots
[Squad_Clots125 SquadInfo]
Monster=Monster_Clot_125_25
Monster=Monster_Clot_125_25
Monster=Monster_Clot_125_25
Monster=Monster_Clot_125_25

// define Squad with 2 Fleshpound killers
[Squad_SPECIAL_2xFPKiller SquadInfo]
Monster=MonsterFleshPoundKiller
Monster=MonsterFleshPoundKiller

// Wave_1 mask
[Wave_1 WaveInfo]
Squad=Squad_Clots125_80
Squad=Squad_Clots125_80
Squad=Squad_Clots125_80
Squad=Squad_Clots125_80
Squad=Squad_Clots125_80
Squad=Squad_Clots125_80
SpecialSquad=Squad_SPECIAL_2xFPKiller

Also some maps are boring, so need to add Map-specific coefficients.
for example
Code:
[kf-HeresyBeta3 MapInfo]
MaxMonstersOnce=120
DelayBetweenSquadsCoeff=0.1
MonsterHPCoeff=0.9
MonsterSpeedCoeff=1.6

[default MapInfo]
MaxMonstersOnce=80
DelayBetweenSquadsCoeff=1.0
MonsterHPCoeff=1.0
MonsterSpeedCoeff=1.0

and add GUI interface to allow admins ingame modify all this settings.
even with this functionality it will be a really good balancing mutator. so good and musthave like Marco's Serverperks

any additional suggestions to functionality?

and the main question: who interested in collaborating for making this mutator? much work need todo with it

Marco, Benjamin, Flux, poosh, Hemi, Gartley ?
 
Last edited:
hmmmm...

hmmmm...

I really like this idea, especially if it supports adding custom zeds to the defined wave mask. For example, having normal zeds, halloween 2011 zeds, doom 3 monsters, RE Lite zeds, and Infected Soldiers on the field all at the same time. Currently, I have been unable to do this in a non-sandbox server.

Would also be cool if we could define "Boss" monsters. I would personally make the Jason zed a boss because it kinda irks me when I see 2-3 Jasons running around at the same time. Maybe also include some form of Pat replacement? or maybe a "mini-Boss" fight right before the Pat?

If this and the weapon config got integrated into serverperks/SCRnBalance that would be most awesome.

I see so many possibilities here with server customization and balance that my head spins. Interesting to see what direction you are going to take with this. As always, me and my team (LAN crew) are ready and willing to help test anything out when it gets to that point. Until then, I got ideas and suggestions on functionality.
 
Upvote 0
I really like this idea, especially if it supports adding custom zeds to the defined wave mask. For example, having normal zeds, halloween 2011 zeds, doom 3 monsters, RE Lite zeds, and Infected Soldiers on the field all at the same time. Currently, I have been unable to do this in a non-sandbox server.

Would also be cool if we could define "Boss" monsters. I would personally make the Jason zed a boss because it kinda irks me when I see 2-3 Jasons running around at the same time. Maybe also include some form of Pat replacement? or maybe a "mini-Boss" fight right before the Pat?

If this and the weapon config got integrated into serverperks/SCRnBalance that would be most awesome.

I see so many possibilities here with server customization and balance that my head spins. Interesting to see what direction you are going to take with this. As always, me and my team (LAN crew) are ready and willing to help test anything out when it gets to that point. Until then, I got ideas and suggestions on functionality.

thank you for your promotion.
and I got another idea... to make some kind of miniboss WAVES. for example the 5 wave will contain only Fleshpounds and Jasons squads, so need allow to edit In each wave mask the delay between squads..

so if wave is usual
Code:
// Wave_1 mask
[Wave_1 WaveInfo]
DelayBetweenSquads=1 // Delay is 1 second
Squad=Squad_Clots125_80
Squad=Squad_Clots125_80
Squad=Squad_Clots125_80
Squad=Squad_Clots125_80
Squad=Squad_Clots125_80
Squad=Squad_Clots125_80
SpecialSquad=Squad_SPECIAL_2xFPKiller

if 5th wave is maked as miniboss wave so
Code:
[Wave_5 WaveInfo]
DelayBetweenSquads=30 // Delay between squads is 30 seconds
Squad=Squad_SPECIAL_2xFPKiller
Squad=Squad_SPECIAL_2xFPKiller
Squad=Squad_SPECIAL_2xFPKiller
Squad=Squad_SPECIAL_2xFPKiller
Squad=Squad_SPECIAL_2xFPKiller
Squad=Squad_SPECIAL_2xFPKiller

and another idea... allow to specify in wavemask the TotalMaxMonsters of the wave and perplayer coefficient... for example if 6 players on server, wave must be with 500 + (0.1*500)*6 monsters
 
Last edited:
Upvote 0
so the task number one.

SOLVED by Marco :)


cause Zeds Are spawned in ZombieVolume.SpawnInHere function, and we need to change monster HP and other settings. need to redefine SpawnInHere function so it wil receive ZombieName from config, and change it Healths and other after spawn.

so first need to replace standart ZombieVolumes on OurZombieVolume with redefined SpawnInHere function.

im replacing it with:
simulated function ReplaceZVs()
{
local ZombieVolume ZV;
local UMZombieVolume UZV;
local KFGametype GT;
local int i;

GT = KFGametype(Level.Game);
if (GT==none)
{
log("cant find KFGameType");
return;
}
for (i=0; i<GT.ZedSpawnList.Length; i++)
{
if (UMZombieVolume(GT.ZedSpawnList)!=none)
continue;
//ReplaceWith(aZVol,"UnitedMut_v57.UMZombieVolume");
log("Spawn UMZombieVolume");
UZV = Spawn(class'UMZombieVolume', Level);
ZV = GT.ZedSpawnList;
UZV.SetLocation(ZV.Location);
UZV.SetRotation(ZV.Rotation);
/*UZV.OctreeBox = ZV.OctreeBox;
UZV.OctreeBoxCenter = ZV.OctreeBoxCenter;
UZV.OctreeBoxRadii = ZV.OctreeBoxRadii;*/
UZV.bDebugZombieSpawning = true;
UZV.bDebugZoneSelection = true;
UZV.bDebugSpawnSelection = true;
GT.ZedSpawnList.Destroy();
GT.ZedSpawnList = UZV;
}
}

When ZombieVolume spawns it calls InitSpawnPoints(). And my zombievolumes logs that
Code:
ScriptLog: No Spawn points found for kf-DIE.UMZombieVolume!!!!!!!!!!!!!

so i dont know why in myzombievolumes function cant calc any spawnpoints.

If somewho can help, I can share the mutator im experimenting
 
Last edited:
Upvote 0
uhhhh....

uhhhh....

wait a second. It appears that you are trying to overwrite the ZombieVolume itself with a custom ZombieVolume. Would it not be a better idea to just make an Extension on the SpawnInHere function of the ZombieVolume record instead of trying to replace it?

I myself am not sure on this, and could be wrong though. Also, I think that the Doom 3 (SCRnBalance module) has a function that actually adjusted the Zed HP's based on player number and wave counter. Might want to take a look or ask Poosh how he got it to work. There was a bit of code that also altered Pat's HP as a variable as well.

Just food for thought. Once the zeds start spawning properly, getting the rest in place should be easier I think.
 
Upvote 0
Sanguivore
thanks for you suggestion and attention. We making mutator now with Dr.Killjoy. Sharing the code with GITHub.. tryed to write code with TeamViewer and voice communication.

wait a second. It appears that you are trying to overwrite the ZombieVolume itself with a custom ZombieVolume. Would it not be a better idea to just make an Extension on the SpawnInHere function of the ZombieVolume record instead of trying to replace it?
yes, we thinked about it.. Replace the call to ZombieVolume.SpawnInHere with our spawn routine. But I think, that the code will be more ugly.
Thanks to Marco. Now we spawn our ZombieVolume with redefined SpawnInHere function, so we can do all we need with spawned monster right after he is spawned.

I myself am not sure on this, and could be wrong though. Also, I think that the Doom 3 (SCRnBalance module) has a function that actually adjusted the Zed HP's based on player number and wave counter. Might want to take a look or ask Poosh how he got it to work. There was a bit of code that also altered Pat's HP as a variable as well.
yes, they use CheckReplacement function. But InCheckRepacement all you can see is Class of Zombie... for example check Clot it or not Clot. In our mechanics, we can spawn Different Clots, defined in MonsterInfo config-objects - we can spawn clot_125hp or clot_50_with_resist_to_damagetype_knife so it impossible to know in checkreplacement what kind of clot we want to spawn.
Our redefined ZombieVolume.SpawnInHere will receive array of MonsterInfo records, instead of just MonsterClasses, so we will be able to apply all this MonsterInfo parameters to monster.

Just food for thought. Once the zeds start spawning properly, getting the rest in place should be easier I think.
well,yes zombies already spawns in our redefined ZombieVolume. I checked it. Today We finished the code wich load settings from Config file. After 10 hours we will start to learn how to modify GameType to replace whole standart spawn mechanism with our one.

our test-config file now looks like
Code:
[MonsterConfig.MonsterConfig]
GameTypeClass=class'MonsterConfig.MCGameType'

[Clot_125 MCMonsterInfo]
MonsterClass=class'KFChar.ZombieCLot_XMas'
Health=125
HeadHealth=25
HealthMax=3000
HeadHealthMax=300
PerPlayer=(Health=100,HeadHealth=25)
Resist=(DamType=class'KFMod.DamTypeChainsaw',Coeff=0.5)
Resist=(DamType=class'KFMod.DamTypeKnife',Coeff=0.5)

[Clot_5000 MCMonsterInfo]
MonsterClass=class'KFChar.ZombieClot_XMas'
Health=5000
HeadHealth=100
HealthMax=3000
HeadHealthMax=300
PerPlayer=(Health=100,HeadHealth=25)
Resist=(DamType=class'KFMod.DamTypeChainsaw',Coeff=0.5)
Resist=(DamType=class'KFMod.DamTypeKnife',Coeff=0.5)

[Squad_Clots125 MCSquadInfo]
Monster=(MonsterName="Clot_125",Num=4)

[SquadMonsterClot MCSquadInfo]
Freq=80
FreqRand=5
InitialCounter=16
Monster=(MonsterName="Clot_5000",Num=3)

[Wave_1 MCWaveInfo]
DelayBetweenSquads=0.5
MonstersTotal=600
MonstersMaxAtOnce=80
PerPlayer=(MonstersTotal=70,MonstersMaxAtOnce=5)
Squad=Squad_Clots125
Squad=Squad_Clots125
SpecialSquad=SquadMonsterClot

[Wave_lol MCWaveInfo]
DelayBetweenSquads=0.5
MonstersTotal=600
MonstersMaxAtOnce=80
PerPlayer=(MonstersTotal=70,MonstersMaxAtOnce=5)
Squad=Squad_Clots125
Squad=Squad_Clots125
SpecialSquad=SquadMonsterClot

[Wave_lol2 MCWaveInfo]
bMapSpecific=true
DelayBetweenSquads=0.5
MonstersTotal=600
MonstersMaxAtOnce=80
PerPlayer=(MonstersTotal=70,MonstersMaxAtOnce=5)
Squad=Squad_Clots125
Squad=Squad_Clots125
SpecialSquad=SquadMonsterClot

[KF-Die MCMapInfo]
Waves=Wave_Lol
Waves=Wave_Lol2
Waves=Wave_Lol3
DelayBetweenSquadsCoeff=0.8
MonstersTotalCoeff=1.2
MonstersMaxAtOnceCoeff=1.0

[default MCMapInfo]
Waves=
DelayBetweenSquadsCoeff=1.0
MonstersTotalCoeff=1.0
MonstersMaxAtOnceCoeff=1.0

news are:
1.
Map-Specific settings - you will be allowed to make some extra waves on some maps. For example on big maps like Gladiator maybe specify wave with 1 squad - 1 big boss-monster etc. So each WaveInfo have bMapSpecific. if it true wave will be loaded only with MapInfo section, corresponds to current map.

2.
you allowed to specify your gametype. we think it will work this way:
user will extend our gametype and make own. and specify it in config. So the code will check if user defined gametype is ChildOf our gametype. If it is not, then it will load our gametype. It maked because main part of code will be in gametype, so if user did not extend his GameType from our one, then mutator will be useless.

3. MonsterInfo section have HealthMax and HeadHealthMax. It will allow you to specify max healths. So you dont worry about PerPlayer Health setting will add too many HP to monster. so you dont worry that 25 players online you will get 5000hp clot.. with this proberty clot will have not more than HealthMax.

I think the main time-eater will be GUI writing, cause it need GUI building, and replication solving.
 
Last edited:
Upvote 0
news:
for each monster you can specify MonsterName.. so if you have Clot with 125 HP and Clot with 5000 clot, You can specify their names like this

[Clot_125 MCMonsterInfo]
MonsterName=Normal Clot_125
MonsterClass=class'KFChar.ZombieCLot_XMas'
Health=125
HeadHealth=25
HealthMax=3000
HeadHealthMax=300
PerPlayer=(Health=100,HeadHealth=25)
Resist=(DamType=class'KFMod.DamTypeChainsaw',Coeff=0.5)
Resist=(DamType=class'KFMod.DamTypeDualies',Coeff=0.5)

[Clot_1000 MCMonsterInfo]
MonsterName=Boss Clot 1000HP
MonsterClass=class'KFChar.ZombieClot_XMas'
Health=1000
HeadHealth=100
HealthMax=1000
HeadHealthMax=300
PerPlayer=(Health=100,HeadHealth=25)
Resist=(DamType=class'KFMod.DamTypeChainsaw',Coeff=0.5)
Resist=(DamType=class'KFMod.DamTypeKnife',Coeff=0.5)

so in KillMessages players will see this names instead of "ZombieCLot_XMas" for all clots.
//-------------
todo
FinalWave (Boss) code
configure all settings with GUI - much time need so maybe after first release

Mesh linking. The idea is first to repair TWI's Event madness with Mesh=none for standart zombies and SECOND - to allow some surprises
So you can make some 'surprise' monsters, they will have random Mesh. For example Clot that looks like FleshPound :D

[ClotSurprise MCMonsterInfo]
Mesh='Clot'
Mesh='Fleshpound'
Mesh=Scrake
Mesh=ZombieBoss
----

And the main idea why I write this post is to Allow edit MONEY part of the game. Yesterday I played some Classic and found that if you have small amount of moneys it is more interest to play.. On me server you can buy everythink you want on 1st wave...

so Im thinking and asking you too, how to make this part.

first Idea is:
Specify in MonsterInfo KILLSCORE field. So when player kill Monster it will have specified in config killscore.

another idea is add KillScore not to player immediately, but add it to some BANK. and in the end of wave DIVIDE this BANK between ALIVE players using some Player score.

for example
if Sharpshooter kill FleshPound (it is his work) - he got 100% score.
if Berserker kill FleshPound (it is not his work) - he and BANK got only 20% of score
and other things like this

- Money is main part of balance too, so need to include it in our mutator
- Perk-based-Monster-kill-score-coefficient will add positive role in teamplaying
 
Upvote 0
3. MonsterInfo section have HealthMax and HeadHealthMax. It will allow you to specify max healths. So you dont worry about PerPlayer Health setting will add too many HP to monster. so you dont worry that 25 players online you will get 5000hp clot.. with this proberty clot will have not more than HealthMax.

even worse each Turret/SentryBot/etc count as a player. For instance: in a worst case scenario if we have turrets+sentrys for each player the health is scalled by 75 (instead of 25). :)
(see NumPlayersHealthModifer() in KFMonster, in my server I have overwritten all monsters just to change that behavior)

you have already put the code in github so we can fork/submit patches?
 
Last edited:
Upvote 0
even worse each Turret/SentryBot/etc count as a player. For instance: in a worst case scenario if we have turrets+sentrys for each player the health is scalled by 75 (instead of 25). :)
(see NumPlayersHealthModifer() in KFMonster, in my server I have overwritten all monsters just to change that behavior)

you have already put the code in github so we can fork/submit patches?
Well forks is bad idea. We write it with Dr.Killjoy now. and if we have some differend positions, we export some boolean flag to config.

for example we haved different positions about money FUND system.

Mine position was: specify per player FUND for each wave, so for example if you specify Wave1 PerPlayerFund 1000, and 10players online, so all wave fund will be 10000. And after wave end it will be dividen betweeen alived players using their "WaveScore", WaveScore is Dealed Damage and some other scoring techniques.
I think it will allow to Balance GUNS PRICE more EASIER. because you will know Wave1 - each player will have 1000 dollars, so they will be allowed to buy these weapons... and so.

Dr.Killjoy position is to leave all things original, just specify for each monster RewardScore, so you can specify MONSTER_CLOT_BOSS and specify RewardScore 999999 dollars.

so to not make forks, and make mutator more universal, we trying to use config.
----
FINISHED features:
- different money fund system (mine or Dr.Killjoy)
- LinkMesh fix wit bonus - in MonsterInfo section you can specify Mesh you want, or for random mesh, specify more than one.
- Skins - because TWI deleted not only mesh but skins too, in our config you allowed to specify own skins for each monster... for example

[Clot_1000 MCMonsterInfo]
Skins=Shader'KF_Specimens_Trip_T.stalker_invisible' - it will make clot looks like stalker))) invisible
Mesh=Mesh'CLOT_Freak'
MonsterName=Boss Clot 1000HP
MonsterClass=class'KFChar.ZombieClot'
Health=1000
HeadHealth=100
HealthMax=1000
HeadHealthMax=300
PerPlayer=(Health=100,HeadHealth=25)
Resist=(DamType=class'KFMod.DamTypeChainsaw',Coeff=0.5)
Resist=(DamType=class'KFMod.DamTypeKnife',Coeff=0.5)
RewardScore=5000
RewardScoreCoeff=2.0
MonsterSize=1.3


TODOList for now is
- Final Boss Wave routines
- Allow to specify more than 1 boss - using SQUAD section, and MonstersAtOnce values. For example specify usual squad with 3 patriarch and Wave-MaxMonsterAtOnce is 1 so players need to kill 3 partiarch one by one
- Specify AfterBoss squad. So it will be funny to spawn after Boss killed some SUPER_MEGA_CLOT with very slow speed 400 000 HP and 9999999 damage, so players will shoot shoot shoot shoot it will be funny i think for them to kill that bastard)))

- For special squads, allow to specifty not only Frequency (now if frequency 60, then special squad will spawn each 60 monsters spawned), BUT allow to specify some POSITIOn.. so if POSITION is 0.1 - then special squad will spawn in start of wave, if position is 0.9 - then will spawn at end of wave.

I think It will be interest if at the end of wave when all usual squads killed, will be spawned some mini boss-like squads.. for example 3x SCRAKES


and at last - make GUI
---
I uploaded latest version to GITHUB to not make forks can we somehow communicate? maybe skype-chat?
 
Last edited:
Upvote 0