![]() |
headless zombie spawning in place of a molerat |
The Issue
I spent a lot of time looking into this and it appears to only be happening for certain ambush type leveled list spawns. I've confirmed this for molerats and radroaches so far but I suspect others like radscorpions are probably also impacted.Leveled actors are special in that they spawn different actor base types based on character level. For example, an instance of LvlMolerat in the world is templated from LCharMolerat which is a leveled list where one of EncMolerat01Template, EncMolerate02, etc. are chosen depending on character level. In this case there are no custom scripts attached and the replacement works fine in game. These represent molerats already spawned above ground.
The molerats that pop out of the ground (most) use a different actor called LvlMoleratAmbush. This actor works the same as the LvlMolerat except that it has a MasterAmbushActorScript attached to it. I've looked at this script and it does things like activate the actor and calls EvalutePackage. According to the Creation Kit wiki, the EvaluatePackage function "Forces this actor's AI to re-evaluate its package stack". Not 100% sure what that means, but I think we can safely assume more scripts will run. Maybe it runs the scripts attached to LvlMoleratAmbush on the Feral Ghoul?
In addition to the above, the ambushes are attached to "furniture". In the case of molerats we use the term furniture loosely as it is really a hole they dig in the ground that magically appears.
There are two types of furniture used for molerats called AmbushMolerate01Long and AmbushMolerate02Short. Each type of furniture that is linked to the ambush spawn has an animation associated with it and it intended for use with a specific actor type.
How to fix it?
Using scripting alone, I'm not sure there is a fix.I did some research on other modders posting about a similar problem. One such case suggested doing a search and replace inside the world view window (click to select and Ctrl-F). I'm currently testing this solution but it seems sound in theory.
The problem though, is that doing this type of replacement is NOT configurable. I'm beginning to understand why other mods offer creature replacements in a separate optional mod now. I'm still wrestling with where I want to go from here before I deploy a "fix":
- separate optional replacement mod (at least for ambush replacements)
- bake ambush replacements into the mod (no option for users to disable)
- continue to dig into the scripting to try to resolve the problem (which may have no solution)
Update: 8/28/16
I have tested an confirmed the search & replace option works well (even at scripted ambushes like Red Rocket). I currently have the ambush replacements in a separate mod.
One interesting thing I noticed when starting a brand new game you run into a zombie in Vault 111 before you get the 10mm pistol. Fortunately, you can maneuver around until he electrocutes himself. In all, there were around 6 or 7 zombies told in the vault and 3 live radroaches (non-ambush spawns). Upon activating the pipboy, you can enable Spawn Replacements which will then replace most non-ambush spawns as well and you may never see a radroach again.
0 comments: