Aller au contenu

Photo

Restricting perception distance


  • Veuillez vous connecter pour répondre
13 réponses à ce sujet

#1
m112358

m112358
  • Members
  • 6 messages
 Hey guys.

Im currently working on a 2-4 player zombie-genre module. I'm trying to make some special rules in the game, but im kind of stuck on this thing.

What i want to do is the following:
When the player is walking outside in darkness/fog, he has a very restricted view distance. This means that he can only see zombies withing 15 ft, unless he is carrying a torch or another lightsource. If he has a torch, he can spot enemies at regular distance.

I tried to fiddle about with the perception scripts, but that will only work for the zombies. Perhaps i can change the range of spot/listen checks? I also considered just rendering the zombies invisible, untill the player is within a certain distance, making the zombie have an OnHeartbeat script, checking for nearest player, and then giving the torches a "see invisibility"?

Anyone who has a good idea as to how i go about this? Preferably something where i can change the distances where i want things to be visible scripting wise, so on a moonlit night, you might have better visual than in fog and stuff. Perhaps make it differ from area to area.

Thanks in advance for the help.

/Morten

#2
rjshae

rjshae
  • Members
  • 4 505 messages
Interesting problem. A thought that springs to mind is an area of effect on each of the party members that is triggered whenever a zombie enters the viewing radius (and cancelled when the zombie exits). But you would also need to take the detect undead spell into account.

#3
m112358

m112358
  • Members
  • 6 messages
 Well there wont be any magic.

Let me explain my idea a bit better.

The idea is, that the goal isnt to kill zombies, but to survive. There will be a few "meters" much like the soul-stuff on MoTB. A hungry-meter, an infected-meter and a sleep meter.
When a character hasnt eaten or slept for a certain period of time, the sleep and hungry meter will start to increase. At certain points negative effects will start to apply. Things like hallucinations, speed-penalty and such.
To eat they need to scavenge food or hunt animals. When they sleep they can either choose to post a guard, or hope to be lucky. If they post a guard, there will be a percentage chance that he will fall asleep, depending on the guards sleep-meter. If he falls asleep, it will be as if they didnt post a guard, and the guard will only get a part of the sleep. If they dont post a guard, there will be a chance of a surprise attack.
When they get hit by zombies, theres a chance that they get infected. When infected, they get negative effects. And the infection increases over time. If the meter reached 100% they die and turn into a zombie themselves.

I've dumped the level system of the normal game. Instead they start out as a lvl1 commoner or fighter (dont know if i actually can make the player a level 1 commoner). They get to decide their stats, but its most likely not something they can change. Instead they get access to a list of perks they can choose from. Sometimes they get the perk automaticly, sometimes they get to choose which one. They get them as rewards for completing a certain part in a certain way. Perhaps keeping NPC's alive, or choosing to kill anyone not initially part of their group.
Perks mostly give them bonuses on survival skills. Might give them a small bonus on scavenging, might give them a bonus with the bow, lesson the risk of infection. Perhaps enable the player to cook food, so it will give a greater boost on the food-meter.

The game isnt about killing the zombies. Its about surviving and making choices. Should the group sacrifice a valuable NPC or even a fellow player, to survive? Should the group trust the group of strangers, that just wants a bit of their food, a medkit or a few arrows perhaps. Or should they just kill them and take all their stuff.

The whole thing with the torches for an example. They can either light a torch, and see zombies at normal length, but this will also make them noticeable by zombies. Or they can choose to go in darkness, and not risk detection, but they might walk streight into the arms of a large group of zombies, which they might have been able to shoot from a distance.

Anyway, the whole detect undead wont be an issue. A bit of a long response to that, but i thought you might have some constructive input on my idea :)

/Morten

#4
Lugaid of the Red Stripes

Lugaid of the Red Stripes
  • Members
  • 955 messages
In the area properties, there's a slot for listen and spot check modifiers. I'd have to check to make sure, but putting negative numbers in these fields should make it very difficult for players to spot hidden enemies. Now you have to script your zombies to move around in stealth mode using the switches, with maybe a good boost to their hide/move silently skills. Then you have to script an area-of-effect to attach to your torch that gives a hide/move silently penalty to anything within its radius.

#5
m112358

m112358
  • Members
  • 6 messages
But can I let the zombies walk at normal pace when they are hiding?

#6
Dann-J

Dann-J
  • Members
  • 3 161 messages
Zombies are already restricted to slow movement, due to the 'zombie walk' property on their hides that prevents them running. If having stealth mode active also locks the creature into not being able to run, then it should make no difference to zombies. If, however, it also applies a further movement penalty, then it may well slow them down (although not as much as it would to a creature normaly capable of running).

Modifié par DannJ, 18 septembre 2012 - 10:50 .


#7
Lugaid of the Red Stripes

Lugaid of the Red Stripes
  • Members
  • 955 messages
You could always give them the camouflage feat.

#8
m112358

m112358
  • Members
  • 6 messages
Well, im actually going to give them normal movement speed, instead of the slow zombie walk. I'm going to look into the animation part, to see if i can make them walk like a zombie, just faster, by just increasing movement speed. I dont want my players to just be able to run away from them all the time. They are proberbly going to be a bit slower than the player, but not much.

The camouflage feat is a good idea. Though im still inclined in going for the invisibility thing.

#9
Shaughn78

Shaughn78
  • Members
  • 637 messages
With the stealth zombies and modifying the spot/listen checks for the area you should be able to get the zombies behaving like you want. The ghouls and ghast have some nice running animation. There is also a file on the vault that can dress up your ghouls with spears in their back or cages on their head. Then there is also Ree's vampiric zombie model and I have a bloated zombie model (a drowned with their legs).

For you spotting creating a custom torch with an area of effect when equipped would do the trick. On entering the area of the torch the zombies could be taken out of stealth mode or remove invisibility.

Modifié par Shaughn78, 19 septembre 2012 - 11:43 .


#10
rjshae

rjshae
  • Members
  • 4 505 messages

Shaughn78 wrote...

For you spotting creating a custom torch with an area of effect when equipped would do the trick. On entering the area of the torch the zombies could be taken out of stealth mode or remove invisibility.


Yup, exactly. You could also create a skin with an AoE that has the same effect as the torch at a reduced range.

#11
Dann-J

Dann-J
  • Members
  • 3 161 messages

Shaughn78 wrote...
The ghouls and ghast have some nice running animation.


Zombies use the same set of animations as ghouls and ghasts (the models all use the same skeleton). If you remove the 'zombie walk' property from their equipped hide, they are able to run just like their swifter cousins.

Incidentally, the 'zombie walk' property is misnamed, since it stops any creature with an equipped item bearing the property from breaking into a run. The actual zombie walk animation is specific to the creature animations (ghouls and ghasts would look the same walking instead of running). I've found the zombie-walk property to be useful in other types of blueprints for creatures that aren't supposed to be able to run.

Personally, I'd modify the speed of zombies depending on how 'fresh' they were. Lower-level zombies that haven't been dead for long would move faster, while the higher-level tougher zombies would be slower. That should hopefully balance things out a bit, so you could run from the tougher zombies but occasionally have to fight the weaker ones.

Modifié par DannJ, 19 septembre 2012 - 11:14 .


#12
m112358

m112358
  • Members
  • 6 messages
Hey guys, thanks for the tips.

DannJ -> I like your idea of the slower and faster zombies! Would it be possible to give a percentage of a movement penalty, instead of just restricting to walking? To make a more fluid transition between the two paces?

rjshae -> I dont quite understand what it is you mean with a custom skin?

Sorry for the late reply guys, ive been pretty busy for the past week, so i havent had the time to check up on this. Its really nice to get some good input on the matter!

/Morten

#13
rjshae

rjshae
  • Members
  • 4 505 messages

m112358 wrote...

rjshae -> I dont quite understand what it is you mean with a custom skin?


By that I meant adding a customized item to the Creature hide slot of the party members. It wouldn't show up in the inventory window, but the item's equipped effects should still function. (You would have to be a little careful if something is already in that slot.)

#14
m112358

m112358
  • Members
  • 6 messages
Arh - thats what you meant by skin. I thought you were talking about the skin, as in the way the caracter looks :)...

/Morten