![]() |
Zombies are attacking Sanctuary! |
What was wrong?
The first implementation used the game's built-in settlement attack quests. These are unfortunately a bit buggy due to the nature of all the code involved. Also, I feel a bit out of control in that I fire it off and sort of hope it works. I've had more than one user report being notified that an attack was happening and then not seeing any zombies. Others have reported setting settlement attacks to 100% and then never having their settlement attacked. Neither of these are acceptable.
A new approach
The settlement attack quests have a lot of logic involved in determining whether an attack should occur and where. In my mod, I just want to add extra attacks against the settlement you are currently at and the how often is a simple percentage checked hourly. Zombies now attack even if you have 0 food, water, and settlers.
To execute the attack, I use a quest alias to get a settlements LocationEdgeMarkers just like the game's built-in settlement attack quests. For the zombie attacks, I randomly choose one side to attack from only as zombies aren't smart enough to coordinate multiple attack vectors. The number of zombies that spawn is now controllable via a holotape option (from 10 to 30). Note that I've chosen to always spawn a minimum of 10 and the default max is 20.
Once spawned, the zombies are given a reference alias to the settlement's workshop (also bound via quest alias) so they path toward it. This workshop alias is a much simpler way to get a reference to the currently location's workshop than what I was doing which I'm not going to go into here.
I have chosen to retain the "Zombies are attacking ..." message to notify you of the attack but no longer have a message indicating the attack is over. This is due to not keeping track of the attacking zombies which the game built-in quest was doing. I didn't think it was necessary anyway.
Another side effect of this new approach is what happens if you run away from the attack. In the games built-in quest your settlement structures can become damaged and possibly settlers killed. In this new approach, the zombies will eventually congregate around the workshop if you have no settlers. Having settlers may result in a long battle that the settlers will eventually win unless you have 'Kill Protected' enabled.
More than just zombies
The old implementation actually disabled settlement attacks from anything other than zombies since I was tying into the game's built-in quests and it was the only way to be sure a zombie attack happened when I wanted it to.
Now that I am executing the attack myself, I was able to restore the game's built-in settlement attack functionality so you can be attacked by raiders/super mutants/etc. again. I guess in theory you could be attacked by raiders and zombies at the same time, though it would probably be pretty rare.
Now that I am executing the attack myself, I was able to restore the game's built-in settlement attack functionality so you can be attacked by raiders/super mutants/etc. again. I guess in theory you could be attacked by raiders and zombies at the same time, though it would probably be pretty rare.
A couple things to note though:
- the settlement attack holotape options only affects zombie attacks (frequency/max size)
- the replacement holotape options may still replace certain settlement attackers
Sanctuary Hills bug
One of the spawn points in Sanctuary was not working properly. It is the one near the main bridge that is actually located up in a tree off the ground (don't ask me why). Whenever this spawn point was chosen either zombies didn't spawn at all or they spawned in the nearby house near the bridge (the one not completely destroyed). To fix this, I moved the spawn point (via script) to the other end of the main Sanctuary bridge where I thought it belonged anyway.
Sanctuary Hills LocationEdgeMarker up in a tree that was moved to the other end of the bridge. |
Future ideas
I'm already thinking about possible future enhancements. One thought revolves around putting a real negative consequence to abandoning your settlement during an attack. Maybe all your settlers die, the zombies stick around, and you lose control of the settlement until you clear the zombies and re-activate the workshop?
Hey Joe. i install the MOD but the attack only happen when sleeping. i tried to set the settlement attack to 100% and it's just not happen. i am running on XBOX1. is there anything i need to check in my setting?
ReplyDeleteI believe this has been fixed. Please let me know if you are still encountering this, especially on a new game.
Deletethere is the update when i turn on the MOD. But the situation is still the same. Do i need to start a new game( is this a must?) or something about the load order?
DeleteIt's features like this that make this a must-have mod in my load order, even if I'm not doing a zombie land style playthrough. Love the death alternative and working on the way settlement attacks work is a HUGE plus. If you could somehow find a way to add consequences to the attacks, like settlers killed, workshop inventory emptied, love the idea of losing control of the settlement - these would all just support this as must have to always use. Good job and thank you for your work!
ReplyDeleteWell, settlers can and do definitely die if you allow zombies to kill protected (via zombie settings on holotape). Other consequences are definitely still on the table though. I like the idea of losing control of the settlement. I just haven't looked into it yet. This mod has been going strong for over a year now and there is still a todo list. :)
Deletewell, you have to be careful with how many get spawned based on how powerful your PC is. Also, the default settings for having AI processed/combat with the player is around 20 i think. The result is you may end up with a lot of zombies standing around waiting their turn for the AI to get processed.
ReplyDeleteAn alternative option to test your defenses is to simply set Settlement Attack chance to 100% which will trigger an attack every in-game hour. This would be more like a relentless assault.
Take a look at the following global variables which you can set with the "setgs" command on the console: iAINumberActorsComplexScene and iNumberActorsInCombatPlayer. Default is 20, but I've played around with setting it as high as 100 each. Try at your own risk of course. :)
ReplyDeleteactually, do you change the spawn points, or are the the same as vanilla?
ReplyDeleteSorry my first post didn't come through for some reason - my initial question in short was would it be possible to make all factions attack through your attack script? So, rather than just zombies, could we be attacked by raiders, mutants, etc. then my follow up was about the spawn points - I wasn't sure if the edge marker is the vanilla spawn points or if that refers to something else. Thanks!
DeleteThe edge markers are the vanilla spawn points for settlement attacks (minus the one sanctuary one I fixed as mentioned in the article. It would be possible to spawn attacks from any faction, yes, but this mod is focused on zombies. I suppose at some point I could rip out parts of what I've done with this and make them their own mod and more generic (eg. settlement attacks, extra spawns, alternate player death, etc.)
DeleteThe data included on a 토토사이트 could make it simple to create the best possible choice.
ReplyDelete