PDA

View Full Version : SDX Zombies run in shadows



HAL9000
07-16-2016, 06:04 PM
Hey guys,

UPDATE: SphereII has done a great job extending this mod to include a bunch of changes like walktypes and approach speed so I'd recommend checking that out instead. You can find it over on Github. (https://github.com/7D2DSDX/Mods/tree/master/ZombieTransmogrifier)

Quick mod to re-enable zombies running in dark areas. It's not exactly as it used to be in vanilla. Torches won't slow them down and shade from buildings or the environment don't effect them but it adds another level of danger to going into those deep, dark places.

SP only tested. Not sure how MP will handle it but should be fine as long as the clients have the mod.

For A15+ you'll need the HalHelper mod installed too.

A16 Download Link (http://7d.l9000.co.uk/HalDarkRunA16b138.zip) + HalHelper (http://7d.l9000.co.uk/HalDllUpdatesA16b138.zip)

A15 Download Here (http://7d.l9000.co.uk/SDTD/SDTD.asmx/GetSDXDownload?name=HalDarkRunA15) + HalHelper Mod (http://7d.l9000.co.uk/SDTD/SDTD.asmx/GetSDXDownload?name=HalDllUpdatesA15)
A14 Download Here (http://7d.l9000.co.uk/SDTD/SDTD.asmx/GetSDXDownload?name=HalDarkRun)

Video (https://www.youtube.com/watch?v=_KStkdkAfVI&feature=youtu.be)

I've done some basic tests but let me know if there's any edge cases or weird behaviour and I'll have a look.

Cheers,

Hal

Mortelentus
07-16-2016, 06:28 PM
Nice one :)

n2n1
07-16-2016, 06:32 PM
........ in any case, it's more interesting than without it !

Spider
09-01-2016, 05:05 PM
Hay Hal could I use this same code to swap out other attributes of zombies when they enter the dark? Like Walk Type or Climbing/No Climbing or Entity Hand item?

HAL9000
09-01-2016, 06:17 PM
Hay Hal could I use this same code to swap out other attributes of zombies when they enter the dark? Like Walk Type or Climbing/No Climbing or Entity Hand item?

Yep, the code is instantiated per entity

Spider
09-02-2016, 02:17 PM
One last thing. Does this over write the zombies changing at night time? So if a if a Zombie is changed to run in the shadows will they still run out doors in the open at night?

HAL9000
09-02-2016, 07:15 PM
Yes they will still abide by whatever rule is set by the game

Spider
09-18-2016, 10:07 PM
Hay Hal is this still ok to use in A15 after SDX is updated?

HAL9000
09-19-2016, 08:23 AM
Hey Spider,

Yeah this is a pretty simple mod so I doubt it'll need changing when SDX gets updated but I'll be checking all my mods when it's out. I think I read that MM said running in the dark is coming back to vanilla so hopefully in A16 it won't need this mod.

LuckyStar
11-14-2016, 12:16 AM
Oh this is fantastic.

Just a bit more to worry about while looting.

Perfect!

Spider
12-26-2016, 01:58 AM
Hay Hal I tried loading this up on the new SDX7 and I can get it to load but I get an error whenever the game trys to spawn a Zombie with the modded Light Class. Heres the error


2016-12-25T20:45:03 235.159 ERR Exception in task
2016-12-25T20:45:03 235.172 EXC The given key was not present in the dictionary.
KeyNotFoundException: The given key was not present in the dictionary.
at System.Collections.Generic.Dictionary`2[Vector2i,RWG2.HubCell].get_Item (Vector2i key) [0x00000] in <filename unknown>:0
at RWG2.BaseRWGDataLoader.ZR (Vector2i ) [0x00000] in <filename unknown>:0
at RWG2.BaseRWGDataLoader.LoadHubCell (Vector2i gridPosition) [0x00000] in <filename unknown>:0
at RWG2.RWGCore.GetBiomeCellByGridPos (Vector2i gridPos) [0x00000] in <filename unknown>:0
at RWG2.RWGCore.GetBiomeCellByWorldPos (Single x, Single y) [0x00000] in <filename unknown>:0
at RWG2.RWGTerrainGenerator.GetDistTerrainHeight (Int32 worldX, Int32 worldZ, RWG2.HubCell _hubCell) [0x00000] in <filename unknown>:0
at RWG2.RWGBiomeGenerator.GetPostTrimHeightAt (Single x, Single z, RWG2.HubCell _hubCell) [0x00000] in <filename unknown>:0
at RWG2.RWGBiomeGenerator.GetFinalWorldHeightAt (Single x, Single z) [0x00000] in <filename unknown>:0
at WorldEnvironment.JR (Single , Single , Single ) [0x00000] in <filename unknown>:0
at DistantChunk.CD (Single , Single , Single , Int32 , Single , Single , Single , Single , Single , Single , System.Single[] ) [0x00000] in <filename unknown>:0
at DistantChunk.ActivateObject (Boolean _bHeightAndNormalOnly) [0x00000] in <filename unknown>:0
at DistantTerrain.ThreadExtraWork (.DistantChunk DChunk, .DistantChunkBasicMesh BMesh, Boolean WasReset) [0x00000] in <filename unknown>:0
at ThreadContainer.ThreadExtraWork () [0x00000] in <filename unknown>:0
at ThreadProcessing.AR (.TaskInfo ) [0x00000] in <filename unknown>:0
at ThreadManager.WR (System.Object ) [0x00000] in <filename unknown>:0
UnityEngine.DebugLogHandler:Internal_LogException( Exception, Object)
UnityEngine.DebugLogHandler:LogException(Exception , Object)
UnityEngine.Logger:LogException(Exception, Object)
UnityEngine.Debug:LogException(Exception)
Logger:masterLogException(Exception)
Logger:Exception(Exception)
Log:Exception(Exception)
ThreadManager:WR(Object)

(Filename: Line: -1)

2016-12-25T20:45:20 251.993 INF Time: 1.63m FPS: 59.22 Heap: 558.1MB Max: 946.9MB Chunks: 530 CGO: 332 Ply: 1 Zom: 0 Ent: 5 (5) Items: 0 CO: 1 RSS: 4649.8MB
NullReferenceException: Object reference not set to an instance of an object
at SpawnManagerBiomes.IR (System.String , Boolean , .ChunkAreaBiomeSpawnData ) [0x00000] in <filename unknown>:0
at SpawnManagerBiomes.Update (System.String _spawnerName, Boolean _bSpawnEnemyEntities, System.Object _userData) [0x00000] in <filename unknown>:0
at World.OnUpdateTick (Single _partialTicks, ArraySegment`1 _activeChunks) [0x00000] in <filename unknown>:0
at GameManager.Update () [0x00000] in <filename unknown>:0

(Filename: Line: -1)

HAL9000
12-26-2016, 12:39 PM
Update Time!

A15 compatible version (SDX 0.7) in the OP

Spider, try this version. If it still doesn't work there'll be another mod you'll need to download. I'll upload it later

Spider
12-26-2016, 01:49 PM
Thanks Hal.I'm actually tryin to learn some of this stuff this go and maybe not just use others bits and pieces. What did you change in the files for A15? I looked through each file in the download and to me it looks exactly like the A14 one?

HAL9000
12-26-2016, 05:08 PM
Thanks Hal.I'm actually tryin to learn some of this stuff this go and maybe not just use others bits and pieces. What did you change in the files for A15? I looked through each file in the download and to me it looks exactly like the A14 one?

Not sure, the updates were done a couple of weeks ago while testing the RC versions of SDX. I thought I'd tweaked some settings but maybe not. I've updated the OP with the second mod you'll need to load custom entity classes.

Spider
12-26-2016, 06:25 PM
I think both the links go to the same file. Is that right?

HAL9000
12-26-2016, 06:58 PM
Ha no, that's not right. I blame the boxing day hangover ^^ try again now

Spider
06-19-2017, 11:15 AM
Hay Hal, do you think this should work in A16 or does it need updating?


*Sleepers + Shadow Runners = Sh#@ your pants scary.

HAL9000
06-20-2017, 06:31 AM
Hay Hal, do you think this should work in A16 or does it need updating?


*Sleepers + Shadow Runners = Sh#@ your pants scary.

Hi Spider,

Just had a look and it needs updating. The dark mod is pretty simple, just update "zombie01" to "zombieTemplateMale" in the config XML but the DLL helper also needed rewriting to support A16. I'll be doing a round of updates for my SDX stuff soon

Spider
06-20-2017, 11:13 AM
Cool thanks Hal. This is one of my must have mods. Really adds stress to playing. Thanks

HAL9000
07-15-2017, 04:33 PM
Update Time!

Added: A16 support

HellzDraft
07-29-2017, 02:21 PM
Hello, I like the purpose of your mod ans I have a suggestion for the mod direction. (Based on a mod I made in A15 and I never posted, inspired by the movie "Im a legend").

So, I have a question for you.

Is it possible to make zombies avoiding sun and loosing HP when exposed ?

It's actually to make zombies spawn only at night and only inside buildings during the days ( just need to adjusut the sleeper's spawn of some prefabs) But if we can complete with your mod and add my suggestion, we can obtained a very cool new agressif gameplay for PVE based on the movie "I'm a legend". (For the skins, I used to replaced, all zombie's models by the old feral zombie, but I did not watch if it's still existing).

By the way, If you are interested to do that, I can do the rest, If you'r are not, can you just tell me if it's possible and if it's the case, i wanna do my best to learn how to do it.

HAL9000
07-31-2017, 04:35 PM
Losing HP when in sunlight would be easy enough. Have a look at the class in the mod for the zombies, it does a light level check and that decides if they can run or not. All you'd need is to put a check that if it's over a threshold they get damaged

Altering AI would take a lot of work. Quick and dirty solution would be to look for areas around them with low light levels and move them to it if they were taking damage from sunlight but that wouldn't stop them just wandering around again. Having them know where the limit of the sunshine starts would be the challenge

HellzDraft
08-07-2017, 03:11 PM
Ok Thank you very much for this clear answer. I wanna focus on the sunlight damages to begin, keep in touch about news.