Jump to content

Arcalane

Member
  • Posts

    6
  • Joined

  • Last visited

Arcalane's Achievements

  1. Looks like I finally have a solution for this. The event I needed was OnPostDistributionMerge.
  2. Different kinda deal. That adds special zombies. I'm dealing with basic zombie outfits stuff.
  3. In my adventures to create a mod that adds new zombies to the spawn lists, I've been trying to add configuration options that, well, function as intended. My efforts have been blocked either because the 'core' sandbox options don't apply consistently, and I know they're not applying reliably, because if I put a nice little block of code into my mod to print the variable values to the console, it always returns the default values set in the sandbox-options.txt instead of the values I defined during game setup. I've tried using OnLoad and OnGameStart functions in which case they do work... but only for Singleplayer, and then the functions completely break Multiplayer compatibility -- which is a dealbreaker. All I want to do is make it so players and serveradmins can adjust the spawning frequency of certain types of zombie to suit their tastes. Having sandbox vars be saved, loaded, and applied properly would go a long way, and it's possible this is a problem for other mods using them as well.
  4. Anyone got any ideas for this? I've tried using Finn's Easy Config Chucked but that's having an issue where the config folder isn't being respected, and I can't get Mod Config Menu to work either. All I want is for config on the spawns to work and be compatible with SP+Local MP+Dedicated MP.
  5. Yeah, okay, now it's returning the correct values. I guess shoving everything into an on load function might be required. The problem then is that this mod also uses table.insert to, well, insert entries into the spawn tables, since I didn't want to do a messy overwrite that could cause incompatibilities with other mods. I'm not gonna run into any weird situations where the spawn tables are slowly but surely filled up by extra entries over multiple loads of the save, am I? 🤔 Ed: been doing some experiments with OnLoad - it seems to be working better than before, but not flawlessly. Namely, some spawns are still able to occur even though the multiplier is set to 0, though I am experimenting with a fix for that. (Ed: Looks like that fix works.) It also doesn't seem to apply effects on "first run" - I'm guessing I want OnGameStart for this instead? Ed2: OnGameStart seems to be working... basically exactly the same as OnLoad. Ah well. Ed3: Whilst both modes work fine for singleplayer, neither option is working for locally-hosted games; it doesn't do the table.insert work properly. Console tells me that the function is running, but it's clearly not doing anything since the new zombies don't spawn unless I use the horde manager to spawn that outfit/uniform specifically.
  6. Where's a psyduck emoji when you need one... eugh. I'm not entirely sure that's the case. I've tweaked the print values and am getting them to return the actual info "properly". I say properly with giant airquotes because all of the spawn multipliers are returning 1 regardless of what I set. More oddly, the UI is displaying the values I set during game setup, but when I exit to the main menu and reload the save I always get the default values back from the console. This is what I've set them to; But this is what the console tells me; LOG : General , 1659445277193> SZZD.lua: Extra Zone Spawns: Enabled LOG : General , 1659445277193> SZZD.lua: Loner Spawn Multiplier: 1 x. LOG : General , 1659445277193> SZZD.lua: Bandit Spawn Multiplier: 1 x. LOG : General , 1659445277194> SZZD.lua: Duty Spawn Multiplier: 1 x. LOG : General , 1659445277194> SZZD.lua: Freedom Spawn Multiplier: 1 x. LOG : General , 1659445277194> SZZD.lua: Clear Sky Spawn Multiplier: 1 x. LOG : General , 1659445277194> SZZD.lua: Ecologist Spawn Multiplier: 1 x. LOG : General , 1659445277194> SZZD.lua: Military Spawn Multiplier: 1 x. LOG : General , 1659445277194> SZZD.lua: Monolith Spawn Multiplier: 1 x. LOG : General , 1659445277194> SZZD.lua: Merc Spawn Multiplier: 1 x. This seems fishier than a wet market. My hunch is that they're not being saved properly and are being read from the mod's base sandbox-options.txt each time rather than from the save's data, but that doesn't explain why it observes the toggle to disable Zombified Exoskeletons but then allows them to spawn anyways.
  7. So I made a nice functional little mod which adds a bunch of zombie outfits the spawn pools, based off another mod. That's all working great. But I'm trying to expand the functionality right now and I'm running into a really weird and frustrating issue. The thing is, I want to add spawn chance multipliers and a couple of booleans as sandboxvars that control whether certain behaviours run or not. Now, so far as I can tell all of this code should work but the game is completely ignoring any changes to the settings themselves. Take, for instance, this block; ExosEnabled = 0 if SandboxVars.ArcStalkerOutfits.ExoZombies == true then noise('Exo Zombie Spawns: Enabled') ExosEnabled = 1 end Simple enough, right? ExosEnabled serves as a final multiplier to the chance of all zombies of a specific type. It defaults to x0, and if the sandbox option is true then it prints a message to the console/log that says they're enabled and sets the multiplier to x1. A few lines later, the base spawn chance is multiplied by the faction spawn chance, and then by the ExosEnabled value - and anything multiplied by zero equals zero, so the chance of ever seeing those types of zombies in the wild should be... zero. But here's the kicker; the sandboxvar defaults to true, and even if I uncheck the box so that it's false it still acts like it's true and prints the message to the console/log. The only way it actually stops doing that is if I set the default value of the sandboxvar to false in the sandbox-options.txt. And even then, it still apparently treats ExosEnabled as 1, because I'm still able to find that zombie type in the world by random chance. Worse, it's also treating every other sandboxvar added by the mod as 1, and for some reason if I try to print their value to the console they come back as blank. Everything else works, there's no compile errors in the console, nothing like that. The sandbox options are just being completely ignored for reasons I can't fathom. Are they just busted to the point I should use Mod Options or Easy Config? Is there some trick I'm missing? Have all mod SandboxVars secretly been FUBAR this entire time and somehow nobody's noticed?
×
×
  • Create New...