Attempt at making Warfare ALife Overhaul and New Levels compatible with each other in warfare mode.
Warfare ALife Overhaul + New Levels Compatibility Patch
Hi!
This is an attempt at making the following addons compatible with each other. Hopefully it'll help somebody. It works for me so far.
Warfare ALife Overhaul 1.42 -
New Levels 0.52
It has NOT been extensively tested. I play-tested for a few hours, with 2 different factions in warfare mode. I don't guarantee there's not another fun bug i can't fix later down the line, don't blame me :)
It fixes a particular LUA script exception in "global_position.script" (vanilla script in line 75'ish i think). Basically this file is critical to Warfare's mechanics, but contains a hard-coded table of levels. So I added New Levels's... levels... to that table. And so far, it seems to fix the crash I would usually get between 20m and 2h into the game (when a squad tries to venture into those levels).
(t's an edit to a vanilla file, but maybe a pro at scripting can make that as a patch instead, idk.)
I tested it for 4 hours or so (2 factions, different settings) in Warfare mode.
Possibly relevant:
- I also had the ReDone map spawn/locations addons installed
- I'm using Anomaly 1.52 (latest modded exe) + a very large mix of mods
Install
Use MO2 (because randomly unzipping files into your game folder will crash your game).
Probably use the modded exe. It's also for 1.5.2.
Load order
- Warfare Overhaul
- New Levels
- My Patch (make sure it's not overwritten by anything in MO2.)
Update 1
Added workaround for remaining crash. Something makes call for levels ID way out of the table sometimes (121 for me), in those cases I write something in the log (look for Wrong ID Found). and then return a position value without adding an offset instead of causing an exception. So it doesn't fix the underlying problem, it's more like putting a band-aid on it.
[for possible future changelog]
please help:
Expression : <no expression>
Function : CScriptEngine::lua_pcall_failed
File : D:\a\xray-monolith\xray-monolith\src\xrServerEntities\script_engine.cpp
Line : 262
Description : fatal error
Arguments :
1 : [Lua] ...c/anomaly/bin/..\gamedata\scripts\global_position.script(81) : from
LUA error: ...c/anomaly/bin/..\gamedata\scripts\global_position.script:81: attempt to index local 'offset' (a nil value)
Check log for details
stack trace:
That's weird, that's the line it should have fixed... I'll have a look and continue experimenting. Maybe I forgot something.
edit: I have an idea, I'll patch something up in a few hours.
playing renegades aren't you?
I updated the file. It shouldn't crash there anymore. But, I don't know if it's causing other issues elsewhere or not.
Wow, could you tell me how u got your sky this pretty?
Sure, it's the Atmospherics weather mod (+ Screen Space Shaders, Green Grass HD, High Quality Glass overlay, and GTR textures)