Jump to content
Sign in to follow this  
Ludovico Technique

Monsters, zombies and so on

Recommended Posts

I have written an unstick-script, that checks once per minute if an undead got stuck in a house and if so teleports it to the edge of the house bounding box.

That way, custom islands with custom house addons can be infected as well without some undead stuck in houses:

pantherainfection1.jpg

Only remaining problems is the AI pathfinding in the mountainous regions, but visitor and island making is very prone to be buggy unfortunately. So it is nearly impossible to avoid that entirely.

Share this post


Link to post
Share on other sites
I have written an unstick-script, that checks once per minute if an undead got stuck in a house and if so teleports it to the edge of the house bounding box.

That way, custom islands can be infected as well:

pantherainfection1.jpg

Only remaining problems is the AI pathfinding in the mountainous regions, but visitor and island making is very prone to be buggy unfortunately. So it is nearly impossible to avoid that entirely.

Which Island is that?

Share this post


Link to post
Share on other sites

Charon Productions: yeah, we even have to put down civilians in editor, module doesn't spawn them because Panthera features open houses but BIS spawns civilians in their "closed" ones. Vehicles work with little of scripting, though.

Its great news to heard that infected are now able to roam around :) in any case you can skip the infection phase and fast-forward with zombie units already placed :)

Edited by IceBreakr

Share this post


Link to post
Share on other sites

I have just been able to port my Arma1-UrbanPack into Arma2.

It was actually never released (like many things that i endlessly worked on hehe) because i wanted to add more buildings.

I will release this very soon, so lunatics who are up for making an urban US-city style map can go ahead and create something nice for the zeds to go hunt in.

urbanpack1.jpg

urbanpack2.jpg

urbanpack3.jpg

Edited by Charon Productions

Share this post


Link to post
Share on other sites

This is looking mega! I thought initially that it would be more of a small scale, but it's looking like a whole island can be infected. The possibilities seem endless....

Thanks for all your hard work Charon, DA

Share this post


Link to post
Share on other sites

Charon, can you clarify if this is how the infection script will work:

If I find a safe area and lock it down, but don't move from there, the infected will still be going on about as per script, right?

Example: I find a helo in the western end of the map, pack in any rescued NPCs I've managed to get together and fly to an un-infected part of the map. I then find a safe house, lock it down and set up defence.

I then leave ArmAII running, while I go get a cup of tea and do some other stuff. After, say, six hours I come back to the computer to see how things are going. I jump into the helo and fly west to notice that the entire western part of the map is overrun and zombies are migrating to new parts. I fly back to my base, leave Arma running over the night and go get some sleep.

Around 4.00 AM I'm woken up, because I forgot to turn off the speakers and the NPCs in my base are yelling on about "zombie, 12 o´clock! Near!" :D

Share this post


Link to post
Share on other sites
Charon, can you clarify if this is how the infection script will work:

If I find a safe area and lock it down, but don't move from there, the infected will still be going on about as per script, right?

Example: I find a helo in the western end of the map, pack in any rescued NPCs I've managed to get together and fly to an un-infected part of the map. I then find a safe house, lock it down and set up defence.

I then leave ArmAII running, while I go get a cup of tea and do some other stuff. After, say, six hours I come back to the computer to see how things are going. I jump into the helo and fly west to notice that the entire western part of the map is overrun and zombies are migrating to new parts. I fly back to my base, leave Arma running over the night and go get some sleep.

Around 4.00 AM I'm woken up, because I forgot to turn off the speakers and the NPCs in my base are yelling on about "zombie, 12 o´clock! Near!" :D

Roughly spoken that´s how it works with a few limitations.

In the current version the zombies will only go to Capitals,Cities and Villages.

There is folks who ask "Why would they not come to the little hut in the countryside where i am hiding in?"

Well, the answer is "How should the zeds know that you are in that hut?"

Patrolling Chernarus on foot effectively would need approximately 800-1000 zombies without using the guideline of Capital,City,Village.

The decision for waypoint destinations is location-based.

I plan to include player-assigned locations into the decision too.

But right now i have a very hard time implementing it, so that not all zeds stay in one city, but send out so-called "Envoys" to other towns to infect them. To manage all of that is of a very high AI complexity.

All because of special cases, like what happens if the zed envoys get attacked. They must interrupt their route and attack the attackers and then go back to their waypoint route etc.

EDIT: I have to add that the safezone-triggers work now, if they surround the protected house with a 2-3 m distance. So NOTHING gets through, but that 2-3 meters are important as a script lag buffer.

Anything related to gates and doors is messy, a limitation of the engine. Doors can`t really be locked.

Myworkaround is to spam the doors with animate commands, to keep them shut, but civilian AI can open them enough to walk through, so they have to be movement-disabled while in the safe-zone.

No NPC will yell "Zombies" though, because this cannot be implemented reasonably by the radio system.

Edited by Charon Productions

Share this post


Link to post
Share on other sites

So did I get this straight:

I place myself in editor, and place module, and it will automatically spawn zombie units around CITIES and TOWNS?

Share this post


Link to post
Share on other sites

Charon it sounds like to you took a difficult route with the zombie paths. Mind you I am impressed, but I probably would have went down the move in a random path for a bit (or keep near a road), if "human" in I don't know 100 meters go there. Then have it so if there are zombies near the zombie that was moving, he would follow (not knowing just pack mentality).

But, in my method, the zombies wouldn't spread as fast. So, I can see why you picked that route.

Anyway, the buildings look good. I am assuming you can't enter them right?

Share this post


Link to post
Share on other sites

If you could enter that skyscapper you would need a day with your squad buddies to clear it =)

Share this post


Link to post
Share on other sites
if "human" in I don't know 100 meters go there. Then have it so if there are zombies near the zombie that was moving, he would follow (not knowing just pack mentality).

I don`t quite understand your description.

It works like this:

If a zombie group knowsabout a human (>0), it will hunt him.

If the zombie group spots another human that is closer, it will hunt that one.

When the zombie group has no current target, it will randomly patrol the location area determined by the location size as long as there is human in that location.

A few newly infected zombies will be sent out to other towns as envoys while others join the closest zombie group.

When all humans are killed, the zombie group will move to the closest location that has humans and start over.

Anything other than that is ineffective, as i described.

The zeds would stupidly wander around on a field trying to find a human.

In all significant zombie movies you have the zombies gather in towns rather than just hang out on fields.

If it was possible to place 1000 zombies without lag on a map then a location-independent approach might work.

To make enterable skyscrapers would kill the engine geometry-wise.

It also takes considerable more time to model those, i just wanted to have some

nice urban objects.

I intend to inspire modellers to make urban objects themselves, so we can have

a diversified city soon.

Share this post


Link to post
Share on other sites

hows that Zombie dog working out? that will be a bad ass addon its self :D

Share this post


Link to post
Share on other sites
hows that Zombie dog working out? that will be a bad ass addon its self :D

It`s implemented and working as intended.

It`s more of a gimmick, but it`s up to the mission maker to find way to put it in.

Share this post


Link to post
Share on other sites

Charon, it is interesting how you are implementing the zombies in an actual infection sense. As in, you place the one zombie and then have them infect a person. Then have the disease spread "naturally."

I am curious though on the actual mechanics... like are you placing 300 actual AI bots down on the entire map and having them get turned via the scripting? If that is how you are doing it, then it would make sense that is why it is laggy.

But after a few runs of that you should understand how it would spread (time and people infected) and you should just model the spread of the infection mathematically. So, the map is like ~230 km sq and you modeled it to be fully infected in like 4 hours... which turns out that the infection spreads at roughly 1 km sq a min.

To make this easy, you would basically script a circle from where the infection started that grew 1 km sq every min. If the player was outside the circle the script would spawn humans towns, if they were near the edge of the circle they would see humans being attacked by zombie... like in all your awesome videos, and if they were in the circle only zombies would be spawned.

The percentage and density (number) of zombies could even be controlled if you add in some other factors, like town size. You could even do a total population for an island, once all the zombies are gone (full population was turned) there would be no more.

The reason I present this as an option is because the player isn't going to see people being turned into zombies on the other side of the map, and having the units on the map may lead to the lag issue you were referring to.

Oh, please don't misunderstand this either. I am really just trying to help, I do have a degree in computer science with a math minor and know some game design tricks. It is your mod and you are free to do what you want with it! :D Just trying to help. :o

Share this post


Link to post
Share on other sites

That is the anti-Arma, console scripting way to do it. (sorry, the 'c' word slipped out. no offence intended ;) ) With that method, you have no control over the spread of the infection. At least in the beginning, there is the hope, and failing containment, the horror of watching it unravel in front of you.

Imagine seeing one of your guys get bit and infected, only to change later after you've forgotten and everything is quiet. Or to hear one of your guys at an outpost town fighting off a horde. And you rush across miles and miles to assist.

That needs to happen discreetly, as individuals. Not simulated in a general manner.

Edited by Scrub

Share this post


Link to post
Share on other sites

i do have a question

if you placed the Ambient Civilians module (or whatever its called) wouldn't it just spawn Civilians in the infected area over and over and in a sense the Zeds would keep infection them creating a unholy amount of zombies in the process. maybe there should be a script that cancels out the module in one of the towns after a certain number of infected have attacked the area (Chernogosk for example would be 500 while small towns like novy sobor would be 50 - 100) would the script be possible?

Edited by That guy Over there

Share this post


Link to post
Share on other sites
i do have a question

if you placed the Ambient Civilians module (or whatever its called) wouldn't it just spawn Civilians in the infected area over and over and in a sense the Zeds would keep infection them creating a unholy amount of zombies in the process. maybe there should be a script that cancels out the module in one of the towns after a certain number of infected have attacked the area (Chernogosk for example would be 500 while small towns like novy sobor would be 50 - 100) would the script be possible?

I personally don`t use the ACM in my missions, exactly because of that it spawns just too many civilians. It does however allow parameters to be passed to it to change its behaviour.

Its usage is however considered in that the zeds will not hunt humans that sit in their "door vehicle",

which they pretty much always do by default (can be changed i know).

While Chernogorsk might seem empty with the ACM, using TroopMon2 you can see that there is about 100 civilians after a while just sitting in their door vehicles.

500 zeds that you mentioned is way too much. The mission maker must limit the zeds to about 200-250 for the whole map depending on the specs of the machine.

It is the script-controlled nature of the zeds that puts a limit here, after all Arma2 is a military simulation and not L4D, so to realize this at all, very heavy tweaking of Arma2´s features had to be done.

If anyone has a problem with that, he is better off playing L4D and smile.

I am not going to write any more scripts for this, it is the mission maker´s duty and challenge to control the number of units on his map.

The mathematic infection approach mentioned earlier is not gonna help the lag, if the player encounters all the hungry (at first simulated) 1000+ zeds at once in Chernogorsk, which is where they will eventually find their way to when the small villages are empty.

That approach could solely spread the infection virtually, but it would be as expensive as in a natural way to simulate the dynamics of the infection when it gets contained in an area of the map. Also the player would have no chance to actually stop the spread inbetween towns because it would just magically go from town to town.

And besides alpha development is practically over now, it is hard enough to get this to run already as it is.

The most CPU expensive part is when the player engages many zeds in Chernogorsk. That requires hunting scripts and attack scripts. BI introduced the script lag, so that the graphics run smoothly, however IMHO that script management system isn`t working too well.

The actual movement of the zeds inbetween towns is entirely waypoint-based and therefore not script-intensive.

Edited by Charon Productions

Share this post


Link to post
Share on other sites

@Charon: Again, I was just trying to help, just offering a suggestion based on my limited knowledge of the mod so far.

@Scrub: I only offered a very basic (keyword very) formula to spread the infection across the map as an example. You could add a million variables to it and make it very complex, if you wanted that. And I think you'd be surprised on how the game actually works under the hood... it's not quite as dynamic as people believe it to be.

The only reason I suggested the math formula is in the case of the player encountering a 1000+ zombies in one area. I would expect any machine to lag with that many AI bots. So, you control the flow of the zombies to a manageable level say 150 live ones at a time, if one dies spawn another until the zombie cap is reached.

Share this post


Link to post
Share on other sites

well if only 250 should be place, would it screw the scripts up (Animation, Infection Ect) to make the default spawned (I.E. manually place on the map), Invincible or Put a respawn script on them? sorry foe mulitple questions hope its not a bother

Share this post


Link to post
Share on other sites
well if only 250 should be place, would it screw the scripts up (Animation, Infection Ect) to make the default spawned (I.E. manually place on the map), Invincible or Put a respawn script on them? sorry foe mulitple questions hope its not a bother

You can only screw the scripts up if you write to the variables the module uses in a senseless way.

No-one can keep you from setting a zed to invincible (if that should make sense to you at all) or put a respawn script on it.

I can only write the module, what the mission maker makes with it is his business.

I suggest just counting the number of zeds in your scripts and if for some reason they all died make em respawn at a cleverly selected respawn point, if that should be desired at all.

I might offer a global variable for that something like CHN_UNDEAD_ZEDCNT as the scripts have to constantly go through them anyway, so the mission maker doesn`t need to do that again.

Share this post


Link to post
Share on other sites

in the films the zombies smell the humans at very far distances i think.

maybe the zeds should know about everyone on the map. then they would hunt the closest target. so you wouldnt be save in a hut away from anything else anymore.

Share this post


Link to post
Share on other sites

My question about

:

Can the script be activated/deactivated by a trigger?

For example:

Condition: Count thislist >= 35

On Act: Gate lock false

Thirty five zombies press up against the door, and it will not hold any longer. Provides incentive to be quick about dispatching the incoming undead.

Will that work?

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×