Avorion

Avorion

War Zone / Hazard Zone Tweaks
65 Comments
YellowApple  [author] 25 Jul @ 3:31pm 
🍾
Vertu 25 Jul @ 1:39pm 
It seems its fixed! Fighter related logs are being spat out and no hazard zone triggered in the rift.
YellowApple  [author] 24 Jul @ 10:48pm 
@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 @ 1:07pm 
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 @ 11:47am 
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 @ 9:28pm 
Ah shoot I forgot to check for that. Will get to it when I can.
YellowApple  [author] 22 Jul @ 9:20pm 
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 @ 4:20pm 
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 @ 11:52am 
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  [author] 22 Jul @ 3:42am 
@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 @ 2:08pm 
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  [author] 18 Jul @ 8:21pm 
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 @ 5:19am 
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  [author] 26 Mar @ 1:07pm 
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 @ 3:20pm 
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 Dec, 2024 @ 11:15pm 
ahh ok thank you.
YellowApple  [author] 1 Dec, 2024 @ 2:04pm 
"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 @ 1:08am 
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  [author] 15 Oct, 2024 @ 3:42pm 
@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 @ 7:43pm 
@YellowApple is there a way to manually override/clean values of already generated sectors for this mod to also work there? :doubt:
YellowApple  [author] 2 Oct, 2024 @ 1:59pm 
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 @ 8:25am 
does this still work and does it work on multiplayer
YellowApple  [author] 6 Sep, 2024 @ 9:27am 
I'll get right on that lol
Paizuri-Chan 5 Sep, 2024 @ 1:57pm 
This mod needs an update including Tom Araya singing "WAR ZONE" when the event occurs.
YellowApple  [author] 29 May, 2024 @ 1:06am 
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 @ 10:51am 
a update would be great
YellowApple  [author] 13 Feb, 2023 @ 10:30pm 
Eh, close enough; it's the 14th somewhere lol
Thundercraft 13 Feb, 2023 @ 9:06pm 
Nice!

BTW: I noticed this update is just 1 day short of being exactly 3 years since you first published the mod.
YellowApple  [author] 13 Feb, 2023 @ 8:49pm 
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  [author] 13 Feb, 2023 @ 6:56pm 
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 Jan, 2023 @ 11:28am 
Hi Yellow, thanks for your work. Do you plan to update the mod in the future?
Thundercraft 21 Jan, 2023 @ 2:27pm 
Update... maybe?
Zandy man 6 Dec, 2022 @ 5:25pm 
Does not work with 2.3
YellowApple  [author] 5 Dec, 2022 @ 9:31pm 
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 Dec, 2022 @ 4:28am 
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 Dec, 2022 @ 4:02am 
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 Dec, 2022 @ 3:52am 
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  [author] 10 Nov, 2022 @ 3:07pm 
lol all good
Askesis 10 Nov, 2022 @ 1:50am 
@YellowApple

No, I'm just a complete idiot and forgot to override the mods on my save :-D Sorry!
YellowApple  [author] 9 Nov, 2022 @ 2:51pm 
@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 @ 8:22am 
I don't suppose you could add an exclusion for Xsotan ships contributing to the war score?
YellowApple  [author] 14 Oct, 2022 @ 5:13pm 
@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 @ 12:59pm 
its updated?
gerokzule 7 Jul, 2022 @ 2:36pm 
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  [author] 6 Jul, 2022 @ 10:13pm 
@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 @ 12:59pm 
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 @ 1:09pm 
Thank you!, Genius mod!
YellowApple  [author] 2 Aug, 2021 @ 3:23pm 
Updated for the 2.0 beta. Seems to be working fine in my initial testing.
YellowApple  [author] 24 Nov, 2020 @ 5:29pm 
Updated. Hasn't been tested much beyond whether or not it crashes the server, but it seems to run okay.
YellowApple  [author] 24 Nov, 2020 @ 2:01pm 
Sorry for the delay re: an update; I'll try to get one up as soon as I've got a sec.