Avorion
War Zone / Hazard Zone Tweaks
68 comentarios
LouieNJ 24 AGO a las 12:01 
I stumbled on a Reddit thread that gave directions on how to stop the Hazard Zone mechanic by editing the warzonecheck file. It is a sub-optimal solution, but pirates tend to attack the zone I am in every 6-10 minutes and re-trigger the Hazard Zone. I disabled the mod for the time being since it didn't appear to be doing anything to re-balance the mechanic. Thanks all for reading my nerd rage post.
YellowApple  [autor] 14 AGO a las 16:53 
Yeah, that sounds like this mod ain't running, since this mod should ignore pirates, ignore anything defenders destroy, and have a much shorter cooldown.

If it's installed, can you provide the logs from around when the hazard zone fires?
LouieNJ 9 AGO a las 15:45 
I am new to the game and the Hazard Zone mechanic is really annoying me. I am not sure if this mod is working or not for me. I installed it on a single player save I was already playing so maybe that is causing the issue.

I have a sector with some stations that is CONSTANTLY under pirate attack. Even with the mod, destroying 3 pirate ships sets the Hazard timer to 85 min. I can't play with this stupid mechanic. 85 min of a limited economy because of 3 small pirate ships? It makes no sense.
YellowApple  [autor] 25 JUL a las 15:31 
🍾
Vertu 25 JUL a las 13:39 
It seems its fixed! Fighter related logs are being spat out and no hazard zone triggered in the rift.
YellowApple  [autor] 24 JUL a las 22:48 
@Vertu: Just pushed version 0.3.1. This should detect if the entity has a mothership (i.e. because it's a fighter) and, if so, re-run the entity checks. Xsotan carriers themselves do have the is_xsotan value set, so this should hopefully fix the issue.

If not, then plan B will have to be to check against the entity's faction - which is easy enough in the Xsotan case, but for other factions (pirates, persecutors, bosses, etc.) things get trickier.

@maniac1168: the version on GitHub is still 0.2, so you can unsubscribe from the Workshop version and manually install the GitHub version (and then uninstall the GitHub version and re-subscribe to the Workshop version if/when that server updates to 0.3.x). Download: https://github.com/YellowApple/WarZoneTweaks/archive/refs/heads/master.zip
Vertu 23 JUL a las 13:07 
Successfully ignores xsotan "Victim is Xsotan" for ships.
Logs successfully ignore large xsotan breeder. Victim is Xsotan.
Torpedoes ignored.
Fighters do not appear in the log. When the hazard zone is propped, there is no mention to what caused it and no signs of fighters involved.
When selecting a xsotan fighter, its indicated just like any normal fighter except its of the xsotan faction. I would not be surprised if it lacks the "is_xsotan" flag.
Also, weren't Xsotan carriers only introduced ever since the Into The Rift update? If so, then I would be willing to bet the fighters lack the "is_xsotan" flag,
I can provide a quick video of the logs while in the rift until the hazard zone is declared if you wish.
maniac1168 23 JUL a las 11:47 
a server I'm trying to join is using .2

is there a way to roll the mod back to a previous version?
Vertu 22 JUL a las 21:28 
Ah shoot I forgot to check for that. Will get to it when I can.
YellowApple  [autor] 22 JUL a las 21:20 
Yep, 0.3 is the correct/updated version.

Can you post the logs from when those hazard zones popped? There should be a bunch of log entries like "WarZoneCheck: blah blah blah" whenever a ship or station is destroyed or boarded.
Vertu 22 JUL a las 16:20 
Went into my testing save. The mod version was 0.3 and in my experience, updating mods has not been the easiest of tasks with avorion so let me know if this is the incorrect version number.
Shot a few fighters (from small breeders) than destroyed I believe the 3rd large breeder and hazard zone popped. This was seemingly due to the large breeder dying but it could of had fighters out which died upon its destruction and it was them that popped the hazard zone.

Also did a test with just enemy fighters spawned by small breeders, still made it a hazard zone.

Into the rift has evidence of questionable coding practices as though it was not made by the original devs but an off-higher team. It would not surprise me if they did some strange coding with how rift sectors work, making this mod's life very difficult. Though again thankfully, no faction ships spawned due to the hazard zone in any of these tests, which was the main issue with the mod as the spawned faction ships would clean house.
Echo 22 JUL a las 11:52 
We are a few days away from our first rift missions, but as soon as we get there I'll send what I can find.
YellowApple  [autor] 22 JUL a las 3:42 
@Vertu / @Echo: go ahead and try out the version I just published. It should address the rift sector issue (albeit heavy-handedly, by simply ignoring rift sectors entirely). The mod's also currently setup to output a lot of stuff into the server logs; if y'all can send over log/console output from around the same time that y'all do things like blow up ships/stations, that'd be much appreciated.
Vertu 19 JUL a las 14:08 
Can confirm. I went into a swarm mission and a cultivator got stuck. Perfect for testing. It sent fighters and after enough of them were shot down. Hazard zone triggered. Though this time, faction ships did not enter the rift.
I also found out that destroying large xsotan breeders does not count, unlike my previous conclusion unless destroying 3 is not enough on its own. Fighters spawned by them will cause a hazard zone when enough are destroyed though. Again though, no faction ships spawned unlike in the past so maybe regardless, faction ships appearing in the rift is patched?
No idea if the special xsotan breeders ("unusual xsotan breeder" collect xsotan samples secondary rift objective) would count and I am not gonna test that with the assumption that in the past, whenever those breeders were destroyed, their fighter spawns being deleted due to parent ship loss is what caused the immediate hazard zone after.
YellowApple  [autor] 18 JUL a las 20:21 
Giving my Avorion mods some long-overdue TLC this weekend. Hopefully that'll include some rift sector fixes, though at a first glance I'm at a loss as to what would be causing the warzone score to increase, given that the DLC code appears to be spawning ordinary Xsotan ships (with the "is_xsotan" flag set) that both vanilla and this mod should be properly detecting and skipping.

@Vertu to confirm, destroying Xsotan breeders / fighters in rift sectors without this mod installed does not cause a hazard zone to trigger, right?
Echo 18 JUL a las 5:19 
Did you ever manage to get that fixed?

We'll be starting a new playthrough soon and I'd like this mod for our eventual station sector so it can actually make some money despite constant attacks.
YellowApple  [autor] 26 MAR a las 13:07 
Thanks for the heads up @Vertu. I'll see if I can detect Rift missions and disable hazard zones for those entirely. Destroying Xsotan ships *shouldn't* increase the hazard zone score with this mod, but it's possible Xsotan ships have funky data in Into The Rift or otherwise ain't getting caught in the scoring logic.
Vertu 14 MAR a las 15:20 
Note: This mod causes hazard zones to trigger in Rift missions via the Into The Rift DLC. Specifically when destroying Xsotan breeders / fighters.
endeyfire 1 DIC 2024 a las 23:15 
ahh ok thank you.
YellowApple  [autor] 1 DIC 2024 a las 14:04 
"if i load this mod into a running save, the bug in question that could occur, means a hazard zone will stay a hazard zone permanetly?"

Nope. What that bug/oversight means is that if you uninstall this mod, any sector visited while this mod was active will permanently have modded decay/threshold values instead of vanilla - so for example, existing sectors' warzone scores will start decaying after 5 minutes instead of the vanilla 60, even though the mod is fully uninstalled, because "noDecayTime" is baked into the sector data itself.

Loading this mod into a running save should never be an issue (because this mod includes the necessary code to override the baked-into-the-sector data). It's only uninstalling that'd be an issue.
endeyfire 25 NOV 2024 a las 1:08 
im of the sleepy, but just to be clear, if i load this mod into a running save, the bug in question that could occur, means a hazard zone will stay a hazard zone permanetly?
YellowApple  [autor] 15 OCT 2024 a las 15:42 
@ENVY This mod should already do that automatically. If it doesn't, then that's a bug and should be reported (preferably with a Pastebin of the logs).
ENVY 12 OCT 2024 a las 19:43 
@YellowApple is there a way to manually override/clean values of already generated sectors for this mod to also work there? :doubt:
YellowApple  [autor] 2 OCT 2024 a las 13:59 
Should still work (incl. in multiplayer) as long as Boxelware hasn't touched anything with Avorion's vanilla hazard zone mechanics. If it doesn't, a bug report (with logs) would be much appreciated :)
Trinium 24 SEP 2024 a las 8:25 
does this still work and does it work on multiplayer
YellowApple  [autor] 6 SEP 2024 a las 9:27 
I'll get right on that lol
Paizuri-Chan 5 SEP 2024 a las 13:57 
This mod needs an update including Tom Araya singing "WAR ZONE" when the event occurs.
YellowApple  [autor] 29 MAY 2024 a las 1:06 
Should still work on 2.4.3 (I haven't seen anything in any changelogs mentioning hazard zones). If that ain't the case, let me know.
Katsuya76 13 MAY 2024 a las 10:51 
a update would be great
YellowApple  [autor] 13 FEB 2023 a las 22:30 
Eh, close enough; it's the 14th somewhere lol
Thundercraft 13 FEB 2023 a las 21:06 
Nice!

BTW: I noticed this update is just 1 day short of being exactly 3 years since you first published the mod.
YellowApple  [autor] 13 FEB 2023 a las 20:49 
Turns out I hadn't actually uploaded the code that was chilling on my PC for the last few months, so... yeah. Marked as compatible with all 2.x versions, and apparently I had already added a nil check so that issue should be fixed now, too. Also added the AI boss to the list of ships whose destruction war zone calculations should ignore.
YellowApple  [autor] 13 FEB 2023 a las 18:56 
Sorry for the lack of responses! Just did a quick test on the latest beta and it still seems to work, but I'll try to put up a patch for that identified nil value issue just in case.

For those having issues: if y'all press the apostrophe key ( ' ), that should show Avorion's in-game debug logs, including any errors and debug messages from WarZoneTweaks; if you're having issues, providing the output from that would be a huge help.
Pree 25 ENE 2023 a las 11:28 
Hi Yellow, thanks for your work. Do you plan to update the mod in the future?
Thundercraft 21 ENE 2023 a las 14:27 
Update... maybe?
Zandy man 6 DIC 2022 a las 17:25 
Does not work with 2.3
YellowApple  [autor] 5 DIC 2022 a las 21:31 
Weird. I'll take a look tonight. I'm guessing that Entity(destroyerId) is returning a nil result, which seems like something that should never happen (you'd think that only things which are valid entities would be capable of destroying other entities, right?). Should be easy enough to add some nil-checking around that.
Alex 4 DIC 2022 a las 4:28 
sorry for the spam, this will be my last comment until you answer:

i added a few print statements to your mod just to see what actually gets modified. i logged the current
self.data.noDecayTime
and
self.data.noDecayTimer

it seems to work for sectors you newly discover, but the ones created before adding the mod dont seem to be listed.

i have 0 experience with the avorion API so i cant fix it myself, but are you sure you are adding your script to existing sectors ?
Alex 4 DIC 2022 a las 4:02 
in addition : my sector still has a hazard zone cooldown of 35 minutes, something doesnt seem to be working right there either.

the sector was created before adding the mod to the save, but your documentation says it should still be working right ?
Alex 4 DIC 2022 a las 3:52 
hey dude your mod is throwing errors.
"could not execute 'warzonecheck.ondestroyed' "
Error: attempt to index a nil value (Line 68)

any chance you can fix this? my sector isnt producing currently and i suspect its got something to do with that.
YellowApple  [autor] 10 NOV 2022 a las 15:07 
lol all good
Askesis 10 NOV 2022 a las 1:50 
@YellowApple

No, I'm just a complete idiot and forgot to override the mods on my save :-D Sorry!
YellowApple  [autor] 9 NOV 2022 a las 14:51 
@Askesis They should already be excluded:

elseif victim:getValue("is_xsotan") then delta = 0

Or are you asking for them to be *in*cluded, i.e. contributing to war score like in vanilla?
Askesis 7 NOV 2022 a las 8:22 
I don't suppose you could add an exclusion for Xsotan ships contributing to the war score?
YellowApple  [autor] 14 OCT 2022 a las 17:13 
@Endo: Warzone behavior hasn't changed since pre-1.0, and I've tested and confirmed it still works as expected up to version 2.2.2 (latest as of right now).
R3act 14 OCT 2022 a las 12:59 
its updated?
gerokzule 7 JUL 2022 a las 14:36 
i think its on my servers side. i cant get any mods to download or start on the server i followed all the instructions from the avorion wikki and from my server host wikki but it will not work. sorry for posting here about your mod.
YellowApple  [autor] 6 JUL 2022 a las 22:13 
@gerokzule Not sure what would cause that. 0.2 is the current mod version; I would make sure that both the client and server have that version (check the mod's modinfo.lua on both the client and server to make sure).
gerokzule 5 JUL 2022 a las 12:59 
is this still working i cant get it runnign on my server. when i try to join ti says error while enabling mods workshop item 1997069970 has the wrong version required 0.0.*,installed 0.2
JOHN 14 OCT 2021 a las 13:09 
Thank you!, Genius mod!