Jump to content

vbnet3d

Members
  • Posts

    13
  • Joined

  • Last visited

Posts posted by vbnet3d

  1. On 5/7/2024 at 9:15 PM, Jkimb said:

    It was happening in Vanilla POI's. I also have a mod that makes every POI have the max amount of zombies in it, so I wonder if I took off that mod would it stop happening.

     

    It's worth trying. The two mods might potentially conflict if the other mod does things with sleeper volumes

  2. 29 minutes ago, Jkimb said:

    Anyone else experiencing this bug? The bug is that zombies are spawning inside poi's halfway in the floor and are stuck in the floor.

     

    This happens on vanilla, though rarely. Is this on vanilla POIs or custom?

     

    For context, this mod doesn't do anything to the spawn itself - it just triggers the sleepervolume to "wake up." I don't know if triggering the volume from a distance away affects the actual spawn-in position. Could be that they are spawning "crouched" and then are glitching into the block below them.

  3. 9 hours ago, MrSamuelAdams said:

    Is there any update on this mod. I may have to remove it, since I have died a few times due to the hitching/stuttering that happens when you walk by POIs. Is there anyway to tone that down or is that just part of the mod? 

     

    I'd recommend turning down the spawn radius in Config.xml (mod folder). A lot of people have had success with SpawnRadius at 10 and HorizontalSpawnRadius at 5.

     

    The hitch is the actual internal spawn-in logic, which I'm not sufficiently familiar with to try to optimize, but most likely you're seeing that stuttering due to too many zombies being spawned in at one time. Reducing the range will help with this.

  4. 15 minutes ago, Zentropy said:

    Don't use square root for these and problem solved!  Squared magnitude is fine for comparisons and makes the checks incredibly fast instead.

     

    I may end up doing this if needed. I benchmarked with square magnitude and it didn't seem to make a perceptible difference. The real performance hit is the zombies themselves. The actual number of distance checks isn't high, so I felt comfortable sticking with the standard Vector3.distance method for the time being.

  5. Based on conversation with @zztong, I made the following additions and changes:

     

    • Added the option to split proximity checks into horizontal and vertical checks. This means that you can have only one or two floors spawn in at a time in a large multi-story POI if desired
    • Added the option to only spawn zombies if the player is within the bounds of the POI. This reduces spawning of volumes in neighboring POIs. Useful in big cities.
    • If a player is in a vehicle, the vehicle must be within the bounds of the POI to spawn zombies, as above. This reduces the spawns you get while driving through crowded areas.
    • If the spawn radius is 15 units or fewer, the corners of the SleeperVolume are also used for proximity checks, in addition to the center of the volume. While this adds more points to check, it also ensures that larger volumes don't suddenly spawn in when the player is inside them.
  6. 39 minutes ago, zztong said:

    These volume checks, they would be per-player, right

     

    Yes. I don't think there's a clean way around this. You'd have checks, but not additional spawns. Marking the volume as "processed" isn't ideal because if you go back out of range the zombies will despawn.

     

    41 minutes ago, zztong said:

    Then, IIRC, there's a limit to the number of sleepers the game can have at any one time.

     

    Yes there is a limit, although I don't remember it off the top of my head. It is spawns that actually hit performance hard though rather than the checks, so I think the true concern is the number of spawns - which reducing the range mitigates to a degree.

     

    42 minutes ago, zztong said:

    Would it help if, after you determined distance and found a volume to be far away, that you flagged it to "skip" some number of ticks before being evaluated again?

     

    This might be feasible. I'd want to benchmark the cost of the checks vs the cost of tracking ticks per volume. The latter is probably more efficient, but it's hard to say.

  7. 6 minutes ago, zztong said:

    Is it just and handful? Some POIs have 50+ volumes. How often does the game do this check?

     

    My impression, and this is a bit rough, is that it runs all the volumes in the current chunk, during each Tick() cycle. I don't know how many times Tick() is run per second. I have considered optimizing by only running the logic every other Tick(), but it seems to me that the actual spawn logic is actually what hits performance rather than the checks.

     

    For perspective - 50-100 distance checks is still pretty trivial for most systems - but of course in the downtown of a city with multiple T5's, we might have 5-10x that number. I really need to benchmark that. So far I've been benchmarking in regular random-gen downtowns. Probably need to do so in a really dense custom map.

     

    I'll look into the additional calculation options. It's a good idea.

     

     

  8. 6 minutes ago, zztong said:

    It sounds like maybe there's a performance trade-off here. The costs of spawning zombies to stand around or the cost of more math to avoid spawning zombies to stand around.

    ...

    Does that work? I mean, once they spawn does setting it back to passive let them activate or do they just stand there and drool? I'm wondering if the trigger that would have spawned them also gives them their initiative. I probably don't know enough to reasonably speculate possible side effects.

    ...

    I'm glad to hear the other triggers still work. I regret I don't have a suggestion, but will be curious about the work-around.

     

    1. Distance computations in 3D space are considered expensive because they rely on the square root... but if we think we're only calculating for a handful of SleeperVolumes at a time, adding a couple more calculations *shouldn't* be overly expensive. I could take the 4 corners of the bounds, plus the center. 5x more calculations, but also much more flexible.

     

    2. Yes, because it resets them to their normal sleeper state. They'll still wake based on normal sound/movement. If you don't reset the passive flag then they are extra alert, and wake too easily. That being said, I left it as a config option because some people said they preferred it that way.

     

    3. I found the workaround and pushed it in a new version. Essentially the triggers do 3 different things: set the trigger type flag, set the player as having touched the volume, and then call logic that triggers any spawns. The former 2 are responsible for the auto-attack trigger mechanism, best I can tell, so I created an additional option to still allow clear quest trigger spawns, which so far has worked on the 2 POIs I flagged as my test cases. It probably needs more testing and tweaking, but it's progress/

  9. 3 minutes ago, rautamiekka said:

    The title (or the keywords) is missing the game version as well.

     

    Good point. I don't see a way to edit these.

     

    This was built and tested for A21 b324 (stable). If someone can tell me how to edit, I'll get that into the title and keywords

  10. 14 hours ago, zztong said:

     

    I'm curious...

    • Is that both the vertical AND horizontal range? Or, is just the horizontal range?
      • For reference, my understanding is Vanilla is range 4 horizontal and range 0 vertical.
    • Is that the distance to each potential sleeper or the distance to the zombie volume?
      • For reference, my understanding is Vanilla is range to a Volume, at which time the Volume selects the sleepers randomly.
      • If you're doing range to sleepers, how do you determine which sleepers in a Volume to place?
    • What is the modlet doing with Passive Volumes?
    • Does SpawnAggressive == False mean:
      • Attack Volumes are treated like Active Volumes?
    • Does DisableTriggers == True mean:
      • Key Racks won't open doors?
      • Buttons won't open doors?
      • Trigger Volumes won't open doors?
    • Does this in any way affect Generator Quests?

     

    • Right now I'm just using Vector3.distance, which is the radius in 3D space. If you feel it would be beneficial to allow the option to make it only horizontal, I could add that as a configurable choice.
    • Distance to the volume center
    • It flips the volume quickly to active then back to passive to force the spawn
    • SpawnAggressive - sleepers are set to active to spawn, and not reset back to passive. This makes them much more alert and responsive to sounds
    • DisableTriggers only turns off triggers for SleeperVolume, but not other classes. Most triggers still function as intended. Some newer POIs cannot be cleared with this set to true currently because the final spawn is a SleeperVolume trigger. I am working a a work-around for this.
    • Not directly. If the POI would also have a final trigger spawn for a clear quest, the same issue would apply as above. Set DisableTriggers to false for now for these POIs

     

    15 hours ago, MrSamuelAdams said:

     public float SpawnRadius = 10.0f;

     public bool DisableTriggers = true;
     public bool SpawnAggressive = false;

     

    Would this be correct if that's what I'm looking for?

     

    Yes, these are the settings you'd want. Just FYI currently there is an issue with some new POIs where they still require a trigger for the very last spawn, so they can't be cleared with triggers disabled. I'm looking at the code to see if there's a way to work around this.

  11. Source: https://github.com/vbnet3d/SpawnSleepersInRange

     

    Experimental mod for 7 Day to Die (Alpha 21) that forces sleeper volumes to spawn in sleepers within a certain range, even if the trigger is not yet activated. Intended to fix issues with pop-in spawning and clear quests failing to spawn in all zombies.

     

    This is an entirely experimental mod. Use at your own risk. May affect frame rates if it spawns in too many zombies at one time. I would not recommend using on a server unless you've benchmarked it's affects on your FPS in solo.

    Configuration

    Mod options can be changed by editing Config.xml in the mod folder.

    Installation

    Download source to your 7 Days to Die mod folder (usually C:\Program Files (x86)\Steam\steamapps\common\7 Days To Die\Mods).

    This is a Harmony (C#) mod. EAC must be disabled.

×
×
  • Create New...