The stand-alone mod S.T.A.L.K.E.R. Anomaly aims to be the most stable and customizable experience for fans of the S.T.A.L.K.E.R. games. It's powered by the Monolith 64-bit engine, a custom fork of the X-Ray engine.
Modding STALKER has this annoying tendency to result in conflicts when two different mods overwrite the same file, but not the same variables and sections within that file. DLTX aims to mitigate this by allowing a mod author to only override the values that they actually wish to change in a separate file, which should greatly reduce the amount of needless mod conflicts and the need to manually merge mods.
I no longer am maintaining this mod, mrdemonized will take care of support and future updates on this new page: Moddb.com
How do I install it?
Back up the contents of your "bin" folder and replace it with the one supplied. The contents of "tools" and "example_mod" include optional resources to make mods for DLTX or to convert existing ones. If you are using Mod Organizer 2 do NOT use it to install DLTX (you can still use it for other mods), you need to paste the files into your real "bin" folder.
How do I use it as a player?
Nothing should change from how you normally install mods, except hopefully alot more of them should work without issues once people decide to use this format. However you could try to convert mods yourself if you're having alot of mod conflicts.
How do I use it as a modder?
In order to make a differential change to the LTX records, you have to follow these steps:
1. Find out which root LTX file is loading the variable you are trying to modify. You can either search the files manually and trace back the chain of #includes, or you can use LTXDiff for this purpose.
LTXDiff findroot [Base Folder] [Mod Folder] [Relative Path to File]
2. Once you have found the root file, create a new one in the same directory with the name "mod_[name of the root file]_[name of your choosing].ltx".
3. Make an entry for the section and variable that you want to modify. The section that you want to override has to be prefixed with "!", e.g. ![medkit]. You do not need to include the sections parents again (i.e. do ![medkit], NOT ![medkit]:booster_multi), since they already are in the base definition. Now simply list your variables that you want changed as you usually would.
You can add parents by declaring them like you normally would, or remove them by prefixing them with "!", e.g. "![vodka2]:!vodka, medkit" makes vodka2 behave like a medkit instead of its original parent.
If you want to delete a variable, simply add a line "!variable_name". You can delete sections too, by prefixing them with "!!", however they will only be deleted if all variables they own are deleted too, otherwise the flag won't come into effect.
You can only override sections that already have a base definition. Both loading an override without a base section, or loading multiple base sections will cause crashes. Multiple overrides can be applied to the same section. If multiple mods override the same value, the one that is loaded last will win the conflict over that particular variable. I haven't verified what actually affects the load order, but I'm going to guess it's probably based on the alphabetic order of the file names.
Converting already existing mods
LTXDiff is capable of automatically converting conventional mods into a DLTX-ready format.
LTXDiff dltxify [Base Folder] [Mod Folder] [Mod Suffix]
Mod suffix in this case is the name that gets appended to the mod files, like in step 2 of the previous section.
Building the modified executables yourself
If you want to build the binaries by yourself, or just take a look at the code, or are the Anomaly dev team and want to include this code in your next release, I've supplied a diff patch in "other_stuff". To apply it you need a git client and Anomaly's XRay Engine at version 1.5.1 . Run the following commands once you have git installed:
git clone https://bitbucket.org/anomalymod/xray-monolith.git
cd xray-monolith
git apply "/your/path/to/other_stuff/differential-ltx-loading.diff"
Once the patch is applied, add "mezz_stringbuffer.cpp" to the project "XrCore" in visual studio, now you should be able to compile Anomaly as you normally would.
Current known Issues:
- Attempting to override weathers is going to cause a crash. The game loads any loose files in environment/weathers/ as root files, which inadvertently loads any mod files as a rootfile, without any base definitions.
Credits:
Feel_Fried - FDDA animation bug fix, loose file particle loading
Changes
v7:
- Added loose file particle loading. Files in the "particles" folder with the extensions *.pg and *.pe will override their counter parts from particles.xr (contributed by Feel_Fried)
- Binaries for this release were compiled by Feel_Fried, so hopefully russian keyboard layouts should work again.
v6.1:
- Fixed a bug where inherited sections would be applied in reverse
v6:
- Fixed deletions not working correctly at all
- Incorporated FDDA animation bug fix
v5:
- The order in which sections are listed in a file is largely irrelevant now. Sections can inherit from other sections that appear later in the file, and overrides no longer need to come strictly after a base section, as long as one exists at all. Order still matters for override conflict resolution, i.e. if two overrides change the same value, the one that comes later in the file wins the conflict.
- Removed "mod__[...]" files, due to order independent loading making them purpose free.
- Fixed a bug where certain rootfiles would inadvertently apply the wrong mod file to themselves due to ambiguous naming. If a mod file name could be applied to multiple root files, only the one with the longest fitting name will be picked.
v4:
- Added the ability to properly modify section parents. Parents can be added, by declaring them normally on an override section header, and removed by prefixing an added parent with "!"
- Added another automatic include for files named "mod__[rootfilename]_[suffix].ltx" (two underscores after "mod"), that get loaded before the root file does, which can be used to define base sections that can then later be used to be injected as parents, since they get loaded before everything else.
v3:
- Fixed a crash related to stack allocated string buffers not being cleaned up properly and causing corruption when very long LTX entries would be loaded.
v2:
- Fixed a bug where the last line of a root file would sometimes be swallowed, which would make overriding cause the game to fail loading
- Overrides now apply retroactively, which means that any sections that have a parent with overrides, are now affected by those too
- Added the ability to delete variables and sections. Variables are deleted by prefixing them with "!", sections with "!!". Sections are only deleted if they are fully empty, otherwise the delete flag has no effect.
LTXDiff
Github.com
Old versions:
Drive.google.com
Hope y'all find this useful
mezz
Average
10135 votes submitted.
I have no idea why it took so long for a mod like this to appear. This will save countless of headache when trying to create a modpack in Mod Organizer. Speaking of Mod Organizer, does it detect the conflicts properly if a section/setting is being overridden by different files?
Mod organizer can only detect if the same file is overwritten, but it can't tell if the same section or variables are overwritten, that's something you'd either have to pay attention to yourself or create a specialized tool for.
This isn't going to completely get rid of mod conflicts, but it should cover a large chunk.
Mod Organizer is giving the mod a flag saying it doesn't contain "valid game data". Is this just because it doesn't modify anything in gamedata, where MO would expect mods to edit files?
I would recommend directly replacing the binary files (after backing them up of course), rather than installing them via MO2. I don't think adding it as a MO2 mod is gonna work properly, because the virtual file system won't be loaded when you initially launch the game.
Wow, that's poggers. Have you tried to do merge request? That's a thing we needed for so long... It will also encourage modders to do everything in their own files. Perfect. Cool
You're the best.
so, does this mean that i can finally use this mods without complications?
Moddb.com
Moddb.com
The mod authors would need to put their mods into DLTX format first. I've had a brief look at both mods, if they both were converted, they probably would be completely compatible with one another.
Hey could you do me a favor and try and see if this works really quick?
Drive.google.com
You should be able to remove the previous LTX files of the mods, this should replace those fully. Please do let me know if it does indeed actually work properly.
I have at least verified the SMG pistol slot mod to work, I'm not sure about the FullUpgrade one, I struggle to understand what it even is supposed to do.
fullupgrade works well, but smg pistol slot weapons are cause CTD when upgrade in equip slots, but in inventory no problemo, thx for your work
That particular merge was made with a now outdated version of my merging tool, it has gone through a couple of improvements since. You could try using LTXDiff yourself to make a new version of this merge, that hopefully is more accurate and doesn't cause crashes.
Edit:
Just to make sure I've run the merge myself and haven't actually been able to reproduce the crash. It could possibly be some other installed mod at fault here.
Sweet Jesus Christ, dude. Where have you been all this time? You're most welcome!
I believe I already saw similar addons concepts in other modding communities where people also built completely new games based on other games of great prestige with large followings. I think Fallout New Vegas and that California standalone, something like that. Or maybe Skyrim, I really don't recall.
But I always thought that Stalker was the largest coherent modding community, at least that I know of. Mods like CoC, AREA, Misery, Dead Air, Anomaly itself, and so on, and I don't recall seeing something like this before.
This is exceptionally welcome, since most addons are simple .ltx pages, and not scripts of code built from scratch. Most modders that I know of aren't programmers that know how to code nicely, they are just regular dudes with some TI knowledge, and use the easy .ltx pages to do the modifications they want, and share with the community.
Again, you're most welcome.
I'm a little confused by the naming conventions. Does it not matter what you name the file as long as it starts with "mod_" and is in the same directory as what you want to change?
Every ltx file is part of a tree that gets loaded, the root file is at the top of that tree. The filename needs to start with "mod_[name of the rootfile]_", after which you can add your own suffix.
E.g. if you were to modify something that gets included by "system.ltx", you could call your mod "mod_system_mymod.ltx"
Finding out which file you need to attach your modifications to is mostly accomplished by reverse searching for includes in the file that you are trying to edit.
I do love that thumbnail
Really hope this becomes standard.
Good news, you don't have to wait for modders to adopt it anymore, if you want you can convert already existing mods to DLTX on your own. Instructions are in the description.
instructions are unclear to me, can i get a dumbed down version? when i open up the thing in the tools folder it just closes itself.
The download comes with a tool called "LTXDiff". You have to use it in the commandline (cmd.exe), and call the specified command and fill in the appropriate paths.
The Base folder is a folder containing the gamedata of the vanilla game. You can aquire it by running "db_unpacker", it will generate a folder "_unpacked". Inside that folder, you have to create a gamedata folder, and put the other stuff inside it (i.e. it should go like this: _unpacked -> gamedata -> configs and all the other stuff).
After you set that up you could call LTXDiff in the commandline like this:
"LTXDiff dltxify 'C:\videogames\Anomaly\tools\_unpacked' 'C:\Downloads\SomeMod' 'SomeMod'"
It will create a folder "SomeMod_DLTX" in 'C:\Downloads'
Hi there, i'm getting this crash after running this, with and without addons..
did i ****** up something while installing?
FATAL ERROR
[error]Expression :
[error]Function : invalid_parameter_handler
[error]File : xrDebugNew.cpp
[error]Line : 1040
[error]Description : invalid parameter
Try disabling debug mode. If that doesn't fix it, I would have to see the rest of the log to really figure out what's going on.
ok, i'm back
The game is still not running.. i tried disabling the debug mode, also removed all the addons that touches the debug settings, and tried again with no addons nor debug mode.. but nothing new, the same crash again.
i'm really starting to think i ****** something up.. however the game runs without problems with the vanilla bin...
this is the full log i deleted some text for privacy reasons but you can get a general idea
=====================================================================
* Detected CPU: Intel(R) Celeron(R) CPU N2805 @ 1.46GHz [GenuineIntel], F6/M7/S3, 1467.00 mhz, 35-clk 'rdtsc'
* CPU features: RDTSC, MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1, SSE4.2
* CPU cores/threads: 2/2
Found commandline file!
Initializing File System...
using fs-ltx fsgame.ltx
File System Ready...
FS: 54471 files cached 66 archives, 13676Kb memory used.
Init FileSystem 10.539616 sec
'xrCore' build 8179, Jun 29 2021
-----loading c:/users/[REDACTED]/onedrive/desktop/[REDACTED]/stalker anomaly/anomaly-1.5.1\gamedata\configs\system.ltx [2]
Initializing Engine...
Starting INPUT device...
Available render modes[1]:
[renderer_r1]
command line "c:\users\[REDACTED]\onedrive\escritorio\[REDACTED]\stalker anomaly\anomaly-1.5.1\bin\anomalydx8.exe" -smap1536
Executing config-script "user.ltx"...
[c:/users/[REDACTED]/onedrive/escritorio/[REDACTED]/stalker anomaly/anomaly-1.5.1\appdata\user.ltx] successfully loaded.
Loading DLL: xrRender_R1.dll
Loading DLL: xrGame.dll
* [x-ray]: Full Memory Stats
* [win32]: free[137434507232 K], reserved[4281640 K], committed[164536 K]
* [ D3D ]: textures[0 K]
* [x-ray]: process heap[49293 K]
* [x-ray]: economy: strings[38539 K], smem[0 K]
SOUND: OpenAL: enumerate devices...
SOUND: OpenAL: EnumerationExtension Present
FATAL ERROR
[error]Expression :
[error]Function : invalid_parameter_handler
[error]File : xrDebugNew.cpp
[error]Line : 1040
[error]Description : invalid parameter
stack trace:
It seems like it's an issue with the DX8 and DX10 versions of the executables. I'll try to figure out what's wrong with them and upload a fix, in the meantime all you can do is try to use either DX9 or DX11. I'll let ya know when I sorted it out.
Thanks it works on DX9, i'll be waiting for the next patch... again thank you for the trouble
I released an update that should fix your problem.
Thanks dude it is running good, i'll rework my gamedata based on this, thanks for making everyone's life easier.
wow just in right time 1000000000000/10
its seems to be the holy grail xD noice work
mezz_stringbuffer.cpp is contained in diff but isn't declared into solution =(
Does that actually cause issues? You should be able to just add it manually to the XrCore project.
yes, but it's better to mention it in desc =) some tupid ppls like me will run all engine versions compile and only after 3h will see the error xD
That's a good point, I'll amend it.
i dont understand how to use this with my addons can anyone please explain how
Which specific part of the instructions in the descriptions are you struggling to follow? I may be able to help if you tell me.
Would it be possible to merge in the engine fix from Food, Drug, and Drink Animations with this mod? Moddb.com
They have a change that:
"patch that fix "[error]Arguments : Can't find variable item_visual in" CTD and wrong items animations ( when instead of beer for example actor tries to drink syringe xD)"
According to the author, it's a bug that can affect vanilla Anomaly animations also, so the fix should be included in any custom builds of the engine.
They offered a version that had DLTX included, but it's based on v4, and who knows when that will be updated for any new versions here.
Fried just added an uptodate merged version on his modpage. In future releases I will probably incorporate the fix directly aswell, so that installing a separate merge won't be necessary.
I, I have been trying to create a DLTX mod from this Moddb.com , but I get the errors:
Unhandled exception. System.Exception: Exception of type 'System.Exception' was thrown.
at LTXDiff.LTXDB.LTXDataFromFile(String Filename, Boolean bIgnoreIncludes, String BaseDir, String ModDir)+MoveNext()
at LTXDiff.LTXDB..ctor(String RootFilePath, String BaseDir, String ModDir)
at LTXDiff.Routines.MakeDiffFromMod(String BaseDir, String ModDir, String RootFileName)
at LTXDiff.Routines.DLTXify(String BaseDir, String ModDir, String ModName)
at LTXDiff.Program.Main(String[] args)
Does LTXDiff work with mods that contain scripts?
Howdy,
LTXDiff will ignore any files that arent .ltx during processing, so a mod containing scripts poses no issue (you can even make LTXDiff copy them to the new mod unchanged with the -c flag).
The file "/gamedata/configs/items/settings/fetch_list.ltx" contains what looks like a botched comment at line 22. LTXDiff doesn't know how to parse that line and terminates itself. I'll keep this in mind and patch in an exception for this (aswell as a more helpful error message), in the mean time you can just comment that line out yourself, both in the mod and in the _unpacked folder and it should work.
Thanks a lot! It worked! And thanks for your mod :-)
np, you are welcome.
Hi, I've tried running the LTXDified main mod on a clean install (except the bin files), but I'm getting this:
FATAL ERROR
[error]Expression : <no expression>
[error]Function : CScriptEngine::lua_error
[error]File : ..\xrServerEntities\script_engine.cpp
[error]Line : 191
[error]Description : fatal error
[error]Arguments : LUA error: ...sktop/anomaly test\gamedata\scripts\death_manager.script:67: attempt to perform arithmetic on a nil value
This crash is caused by a bug related to a mod deleting variables, that I am already aware of but haven't resolved yet. I don't see an easy work around for this unfortunately, so you will have to wait until I have fixed that bug. I'll let you know when I have.
In the mean time you could probably just run the un-dltx'd version of the mod. If you dltxify everything else in your load order, you should be fine and not run into conflicts.
OK, thanks a lot. I did not make the first version of Less Items, but I have patched and maintained the mod for a while, and for me the matter is mostly that of making it available in a DLTX version.
The mod is about having fewer kinds of items in the game, and some items were commented out in the spawn lists, while others were deleted outright (in some cases I simply was sloppy, in others I noticed that they wouldn't disappear just by commenting them; now I wonder if I was using the wrong comment format).
Would adding back the deleted items and commenting them instead avoid triggering the bug?
I mean in theory it would, and for other mods this is a viable workaround, but I imagine since the point of the mod is to remove items from the game and trader files, you would break its main purpose by reverting these deletions. In my judgement it isn't worth attempting to make it DLTX compatible at the current time, it would be a wasted effort. I'd rather you wait until I properly fixed this bug to avoid a whole lot of headaches.
OK, got it. I was hoping that commenting out instead of deleting could circumvent the issue, but yea, the best thing is to wait. Thank you for your work!
I pushed an update that should fix the bug that prevents your mod from working, do let me know if it resolves your issue.
after install v6, my Nosorog can wear backpack and helmet now, my pda disappear too, so... any fix ( just install bin folder, that's all)
You can reinstall v5, after that it works again with the old save files. Saves done with v6 are broken.
btw: For the people which deleted the old version: is it possible to load an older version of a mod?
All old versions of DLTX are available in a link in the description, I have already found the bug and am in the process of compiling and releasing a hotfix.
edit: hotfix is out
the pda disappears from the inventory.
Are you sure you are on the latest version? I have pushed a quick update today that should fix the broken PDA issue among other things.