Author Topic: Dead and Infected (including files)  (Read 2644 times)

Dead and Infected



Description
DAI is a zombie mod aiming to be similar to L4D2. I've been working on it once in a while but haven't really done much on it recently. I thought it'd be an useful resource for developers and thought some people might even want to continue doing their own work on it, so I released this "working version". Some of the code may be written in a hurry to quickly test features and such, though.

Progress
This version features actual playing, a "navigation mesh" system that represents walkable space, wanderer spawning (not even close to final), mob spawning (as before), special spawning, boss spawning, incapacitation, really cheap "helping incapacitated up", hunter, tank, a director system for controlling dynamic pacing (may get in the way at the moment), zombie spawning and distributed zombie AI and a ton of other stuff.

Test Setup
To actually use it, all you need to do is start a server running the game-mode. However, for zombies to spawn, you'll need to define areas where they can spawn. To create an area, use this:

directorSO.registerArea( position, width, height[, start] );

There's also a helper for quickly placing an area on top of a brick, however it doesn't support rotation and awkwardly (read: flipped) dimensioned bricks:

brickObject.toArea( [start] );

Disregard start for the moment, it really won't do anything yet, seeing as the flow distance system doesn't work right now.
You'll probably notice really few zombies spawning - this is because the "wanderer spawning" currently is really bad, and mobs are set to spawn every 90 to 120(?) seconds. Mob spawns are also restricted based on the director pacing. You can force a mob to spawn with this:

directorSO.setTempo( $AID_TEMPO_PEAK_MAKE ); directorSO.spawnMob();

Also, currently zombie spawning does not do FOV checks (it will), so don't come saying they're spawning in your face.

How complex is it?
Just to give a hint, here's the server.cs:

Code: [Select]
if ( $GameModeArg !$= "Add-Ons/GameMode_Dead_and_Infected/gamemode.txt" )
{
error( "Error: GameMode_Dead_and_Infected cannot be used in custom games" );
// return;
}

function execDAI()
{
exec( "Add-Ons/GameMode_Dead_and_Infected/server.cs" );
}

exec( "./scripts/config.cs" );
exec( "./scripts/support.cs" );

exec( "./scripts/datablocks.cs" );
exec( "./scripts/package.cs" );

exec( "./scripts/damage.cs" );
exec( "./scripts/state.cs" );
exec( "./scripts/sound.cs" );
exec( "./scripts/misc.cs" );

exec( "./scripts/director/main.cs" );
exec( "./scripts/director/tick.cs" );
exec( "./scripts/director/misc.cs" );
exec( "./scripts/director/debug.cs" );

exec( "./scripts/director/tasks.cs" );
exec( "./scripts/director/spawn.cs" );
exec( "./scripts/director/tempo.cs" );

exec( "./scripts/director/boss.cs" );
exec( "./scripts/director/mobs.cs" );
exec( "./scripts/director/special.cs" );
exec( "./scripts/director/wanderer.cs" );

exec( "./scripts/director/areas/creation.cs" );
exec( "./scripts/director/areas/helper.cs" );
exec( "./scripts/director/areas/active.cs" );
exec( "./scripts/director/areas/visual.cs" );
exec( "./scripts/director/areas/flow.cs" );

exec( "./scripts/survivor/action.cs" );
exec( "./scripts/survivor/values.cs" );
exec( "./scripts/survivor/intensity.cs" );
exec( "./scripts/survivor/datablocks.cs" );
exec( "./scripts/survivor/incapacitation.cs" );

exec( "./scripts/infected/action.cs" );
exec( "./scripts/infected/target.cs" );
exec( "./scripts/infected/trigger.cs" );

exec( "./scripts/infected/common/datablock.cs" );
exec( "./scripts/infected/common/appearance.cs" );
exec( "./scripts/infected/common/behavior.cs" );

exec( "./scripts/infected/hunter/datablock.cs" );
exec( "./scripts/infected/hunter/appearance.cs" );
exec( "./scripts/infected/hunter/behavior.cs" );
exec( "./scripts/infected/hunter/actions.cs" );

exec( "./scripts/infected/alonso/datablock.cs" );
exec( "./scripts/infected/alonso/appearance.cs" );
exec( "./scripts/infected/alonso/behavior.cs" );
exec( "./scripts/infected/alonso/actions.cs" );

exec( "./scripts/infected/tank/datablock.cs" );
exec( "./scripts/infected/tank/appearance.cs" );
exec( "./scripts/infected/tank/behavior.cs" );
exec( "./scripts/infected/tank/actions.cs" );

"Alonso" is just some random weird special infected that won't be there in future versions, only included to test multiple types of special infected for the SI spawner.

Download
Note: This is only for developers. If you're an end-user and you find this, don't come complaining that you can't get it to work or something else.

https://lh.rs/5DDqceecIDFW
« Last Edit: November 01, 2012, 03:36:24 AM by Port »

Forgot to mention: To help with setting up areas, use directorSO.setVisibleAreas( true ); to make areas appear as flat colored plates (color depends on whether they're active) in the world.

I came up with the name for this :D

This is great work, good going Port.

And most of you said port does not release anything. :P


Please tell me you removed that one thing were accidentally shooting someone would kick you.

Please tell me you removed that one thing were accidentally shooting someone would kick you.

That was completely temporary. It wasn't a part of the add-on.

Just because it uses a lot of files doesn't mean it's complex.

If I remember correctly, this was the gamemode where the zombies had bloody claws right? If so, I wasn't really impressed, but hopefully you've updated it since then.

Just because it uses a lot of files doesn't mean it's complex.

If I remember correctly, this was the gamemode where the zombies had bloody claws right? If so, I wasn't really impressed, but hopefully you've updated it since then.
elm, i would like you to try to make something equal.
OT:
Good job port, i was gonna ask you for it anyway though.

Why hasn't anyone made something with this yet?

Hmmm....nice work. You think your gonna finish this?

about loving time we get a new zombie mod

how will FOV checks work; raycasting based? or rendering based?

Lol, I remember seeing this. I'll probably do a bit of editing, maybe add some features, then post it here to be finished, or finish it myself. Idk, lol.

Nice. I hope it works on dedicated servers.