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.
Standalone ripoff of Diphenhydramine-HCl's ZCP loot module. ZLM features additionnal customisation settings for loot spawning on NPCs and in stashes.
Disclaimer : This mod was created by extracting and using the loot module from ZCP - Zone Customisation Project as a base and expanding its feature. All credits of the original functionnalities go to its original creator, Diphenhydramine-HCI. You can find the full original mod here :
Zone Customization Project
Hello Stalker! Do you like loot? Do you like ZCP but some features generate conflicts with your other mods? Well if you answered yes to both those questions, I can say "This mod is for you!"
Because of the reasons above. As a WarDogs (MilSim armory and Warfare overhaul modpack for GAMMA by Mo3, available on GAMMA's Discord #mods-posting) and ZCP enjoyer, unfortunately, those two are somewhat incompatible. So I had to take matters in hands.
Depending on your settings, ZLM will try to spawn items on NPCs that just died and in stashes the player opens. (even non-marked ones)
Each item category can be toggled on or off, and can have its spawn chance and item tiers thresholds changed. If multiple categories are toggled on, an item of each said categories may spawn on one roll.
This mod doesn't take control of the spawn, it just spawn items on top of all other things that makes loot spawns in the game, including other mods.
Detailed How does it work available below.
Debug logging will bloat your debuglog for sure.
Here are the current features in version 4.1 :
Features a FOMOD installer. Use Mod Organiser to install it and follow the simple steps. Some indications are in the MCM (in-game mod manager) to know which settings can be toggled on or off during the game.
Requires DLTX, DXML 3.0 and MCM.
DLTX and DXML 3.0 are included in the modded exes that you can find here :
Modded exes
Requires higher prio over : MCM, WarDogs.
I suggest to disable ZCP's loot settings, notably "Find extra items on NPCs" in the MCM menu. It's not necessary but will obviously prevent overspawning of items. It is not needed to disable ZCP entirely.
Exactly like the loot module of ZCP. I just added new ways of customising the loot settings.
Here is how is works :
1. ZLM checks for those the main option first, if ZLM (main) is enabled or not. If yes, new functions will triggers. If not, nothing happens.
2. When the player starts a game, according to your settings, the mod will hook new functions to spawn loot on two major conditions : when a NPC dies or when the player opens a stash for the first time. Those functions hooks only if "Find extra items on NPCs (main)" or "Find extra items in stashes (main)" are enabled respectively.
3. When one of those two functions is called, ZLM checks the chances to try spawning loot for the called object, either "NPC item spawn chance" or "Stash item spawn chance". A random number between 1 and 100 is generated and compared to the required threshold. If the number is inferior to the threshold, we can advance further into the spawning. If not, it stops there.
4. As the same manner for the NPC and stash function, ZLM will checks if spawning a item from a certain category is enabled. If yes, it will do the same check for each category for each call of the NPC of stash function.
5. For each category, there is 4 tiers of loot : tier 1 is the most common, tier 4 is the rarest. After passing the chances threshold, a new number is generated to choose a droptable for the rarity of the item spawned in this manner : each tier has a threshold, which cannot exceed its superior's. The number is first compared with the rarest threshold : if the number is superior to the threshold, then the spawning can continue. Else, it will check the next tier threshold, etc... Until it passes or reach tier 1, the lowest.
6. Once the droptable has been chosen, a random item is chose from the list and is spawned where it was told to be spawned, either on a NPC that just died or in the stash the player just opened.
And yes, it does mean that if all categories are checked and chances are at 100 for each, an item of each category will spawn. Then all depends on tier settings for what it will be exactly.
Here is a short list of what I plan adding for this mod :
If you have any suggestions for a feature, let me know!
Most of the code is filled with comments for indications of what does what.
The main files are :
[01/04] [4.0 > 4.1]
[26/03] [3.1 > 4.0]
[18/03] [3.0 > 3.1]
[12/03] [2.1 > 3.0]
[10/03] [2.0 > 2.1]
[10/03] [1.1 > 2.0]
[10/03] [1.0 > 1.1]
If you have any problems with my mod, leave a comment below, and if you can, keep a copy of your crashlog in case I'd need it to debug and fix the problem.
Also the most common crash you could encounter with ZLM is this one :
To help me with debugging, I included a debug line that always works even with debug logging off. It is located before the spawn function mentionned above that can cause crashes. If you happen to have this crash, check your crashlog located at anomaly/appdata/logs/xray_<something>.log and open it with a text editor software. At the end of this log should be the error itself. If you scroll up above it, you'll normally find a line of debug that will say "# ZLM create_item_random_uses <item_name>". This is where you can see what the last item that tried to spawn and which surely caused the crash.
This is due to the fact the spawn function received an incorrect object name from the droptables and couldn't spawn said item. This is mainly due to having modded items in droptables from mods you don't have installed. Check in ZLM/gamedata/configs/scripts/ for any droptables patch for mods you don't have. If you do, delete those you don't need to avoid crashes. Installing the required mod works too obviously.
If you want to talk about my mod, feel free to leave a comment below or join the GAMMA's Discord, and find my post in # |mods-posting
Good luck and enjoy the loot.
Average
9.628 votes submitted.
Nice mod!
thx bro, default zcp sliders still spawn **** tons of items even at a 5%
Hi!
I nearly didn't edit how the items are spawned so you may get the same results with the same settings. You may be extra lucky idk.
Nope, default zcp still spawns a **** ton of items. Tried this and the spawns were reduced to almost 0 (as I like), so you probably fixed it somehow lmao
I guessss?
Good for you then! Enjoy.
I'm rating 10/10 for the great presentation. Good job. The mod seems to be good as well.
Thanks!
mod is flagged as virus.
Weird.
There is no malicious files in there : 3 .jpg, 1 .png, 2 fomod configs files, and a bunch of .script, .ltx. and .xml.
I'm currently testing and running the mod so idk.
Do you have any more detail on the flag?
unfortunately not, my antivirus is just repeatedly disabling the download as "virus detected"
tried all 3 (available) mirrors, same result for all of them. shame too cause this mod seems really cool but i can't use it :')
okay it seems that the 2.0 version works fine now
Alright? I have no idea what happened. Good for you!
Enjoy!
My Windows Defender still marks it as trojan XD
ZLM just updated!
Version 2.0 now splits settings of NPCs and stashes for independent configuration!
Enjoy.
Sweet, thank you!
FATAL ERROR
[error]Expression : <no expression>
[error]Function : CScriptEngine::lua_pcall_failed
[error]File : ..\xrServerEntities\script_engine.cpp
[error]Line : 204
[error]Description : fatal error
[error]Arguments : LUA error: ...ly/anomaly-1.5.2/bin/..\gamedata\scripts\zml_loot.script:177: attempt to index global 'zml_loot_mcm' (a nil value)
stack trace:
Crashes after killing an NPC, i have the standard ZCP installed could that be an issue? also the .7z doesn't contain any zml_loot_mcm file
Ahhh yes. I forgot to do all the ammo and mags stuff with my new update that split stash and npc. I forgot to disable the whole functions altogether until I rework them.
I'll upload a temporary fixed version to work as intended in like 10 minutes.
Also the standard ZCP should not interfere if installed. If enabled for loot however, there may be some conflicts of some sorts that I haven't discovered yet. Though if you use ZCP for the rest of it, it should be fine.
ZLM 2.1 uploaded.
This include a fix to be able to use ammo spawning functions with 2.0 features. I forgot about them while I split the settings of stashes and NPCs.
Sorry, my bad!
EDIT : Changes SOMEHOW didn't apply when zipped.
EDIT 2 : ZLM 2.1 fixes now uploaded and everythings work on my side. Sorry again!
Cheers
Can you make a separate mode that distributes items to stashes once at the start of a new game? To prevent the player from cheating by saving in front of the stash and then reloading this save over and over again until a useful item appears in the stash.
Well it's a singleplayer game. The only limit is the player's greed.
Nobody is forced to do this trick and none would do it if they don't want to. Unless you include the case of a player dying/crashing/closing the game in anyway and not getting the same loot as before.
Unfortunately, I can't patch human behaviour.
Apparently I'm a greedy player hehehe...
There are no rules.
Do what you want.
Nothing can judge you except the Zone itself.
As long as you are entertained in your gameplay.
FATAL ERROR
[error]Expression : <no expression>
[error]Function : CScriptEngine::lua_pcall_failed
[error]File : ..\xrServerEntities\script_engine.cpp
[error]Line : 206
[error]Description : fatal error
[error]Arguments : LUA error: c:/games/anomaly/bin/..\gamedata\scripts\zml_loot.script:146: attempt to index local 'se_item' (a nil value)
Looks like another mistake of mine in the droptables. Do you have a full log you could send me perhaps?
I just tested with all items in the droptables, droptables patch included, and all are good.
Have you perhaps installed a droptable patch while you don't have the required mod active?
Also lootboxes spawn can be toggled in settings even if the mod is not installed, so beware, as ZLM will try to spawn lootboxes and crash will ensue with the same error as yours.
I do have lootboxes installed, and yes support for it is toggled on. It's the only patch I installed in fact. However, despite selecting only lootbox support in fomod installer, it still copied files "\gamedata\configs\scripts\mod_zml_droptables_denro.ltx" and "\gamedata\configs\scripts\mod_zml_droptables_experience.ltx" for mods I didn't select. Not sure if that matters though, but maybe fomod installer bugged? Also, although minor and cosmetic, fomod reports it as 2.0 and not 2.1 such as it is.
It's the first time I used Fomod so I may have configured something wrong.
Also forgot to edit version name with all fixes I did yesterday.
New update soon, like 10 minutes or so. I'll fix Fomod at the same time.
* Game fatal_ctd_save_0.scop is successfully saved to file 'd:/games/s.t.a.l.k.e.r. anomaly\appdata\savedgames\fatal_ctd_save_0.scop'
FATAL ERROR
[error]Expression : <no expression>
[error]Function : CScriptEngine::lua_pcall_failed
[error]File : ..\xrServerEntities\script_engine.cpp
[error]Line : 206
[error]Description : fatal error
[error]Arguments : LUA error: .../s.t.a.l.k.e.r. anomaly\gamedata\scripts\zml_loot.script:148: attempt to index local 'se_item' (a nil value)
stack trace:
Still getting the error myself. Applied the appropriate patches. Just picked up some biscuits and a second later it crashed.
Hello!
Sorry for the delay of my response!
So, unless you can send me a full crash log, I invite you to check the 'Troubleshooting' section at the bottom of my post.
Cheers.
ZLM just updated!
Version 3.0 now with settings to influence items spawn depending on NPCs ranks! It's time to aim high in the leaderboad to get that juicy loot!
Enjoy.
Hello, dear author!
I installed your mod on STALKER REALITY 1.5 - there were no crashes, but I haven't checked the performance of your mod in the game yet. I think everything will be fine!
I offer you a translation into Russian of the mod settings, free of charge. If necessary, I can throw off screenshots of the settings in Russian.
Здравствуйте, уважаемый автор!
Установил ваш мод на STALKER REALITY 1.5 - вылетов не было, но пока в игре не проверял работоспособность вашего мода. Думаю, что все будет хорошо!
Предлагаю вам перевод на русский язык настроек мода, безвозмездно. Если нужно, то могу скинуть скриншоты настроек на русском языке.
Drive.google.com
Hello, dear russian-speaking player!
That's very nice of you, thanks a lot!
Unfortunately, I don't speak russian so I have no idea if you translation is correct or not. However, I do trust the modding community.
If you want to keep translating my mod as it updates, feel free to do so. If you keep sending me the translation, I'll be sure to include it!
Cheers.
Also another reply for your other statements :
-performances should be fine. The only performance problems you would encounter is if there is a lot of items in the game, but that's the just the game engine, nothing I can fix ;
-I did not know the existence of Stalker Reality before you mentionned it. So I don't know what features it adds and such. Crashes for items that do not exist in your modded version of the game may happen.
crashing sometimes when shooting a sdalgr;
! [LUA] ... freedom 4.0/if4/bin/..\gamedata\scripts\zml_loot.script:177: attempt to index global 'zml_loot_mcm' (a nil value)
! [LUA] 0 : [C ] __index
! [LUA] 1 : [Lua] ... freedom 4.0/if4/bin/..\gamedata\scripts\zml_loot.script(177) : try_spawn_ammo
! [LUA] 2 : [Lua] ... freedom 4.0/if4/bin/..\gamedata\scripts\zml_loot.script(433) : try_spawn
! [LUA] 3 : [Lua] ... freedom 4.0/if4/bin/..\gamedata\scripts\zml_loot.script(541) : func_or_userdata
! [LUA] 4 : [Lua] ... freedom 4.0/if4/bin/..\gamedata\scripts\axr_main.script(271) : make_callback
! [LUA] 5 : [Lua] ...llegal freedom 4.0/if4/bin/..\gamedata\scripts\_g.script(119) : SendScriptCallback
! [LUA] 6 : [Lua] ...edom 4.0/if4/bin/..\gamedata\scripts\xr_motivator.script(396) :
! [SCRIPT ERROR]: ... freedom 4.0/if4/bin/..\gamedata\scripts\zml_loot.script:177: attempt to index global 'zml_loot_mcm' (a nil value)
Time continual is:247796
# SAVING: NPC items | number of saved npcs: 0
# SAVING: Water deprivation | last_drink: 0
# SAVING: level_weather | cycle: foggy - preset: w_foggy2 - is_underground: false - weather_storage size: 0
# SAVING: Sleep deprivation | last_sleep: 0
* Saving spawns...
* Saving objects...
* 19819 objects are successfully saved
* Game fatal_ctd_save_0.scop is successfully saved to file 'e:/stalker/illegal freedom 4.0/if4/bin/..\appdata\savedgames\fatal_ctd_save_0.scop'
FATAL ERROR
[error]Expression : <no expression>
[error]Function : CScriptEngine::lua_pcall_failed
[error]File : ..\xrServerEntities\script_engine.cpp
[error]Line : 206
[error]Description : fatal error
[error]Arguments : LUA error: ... freedom 4.0/if4/bin/..\gamedata\scripts\zml_loot.script:177: attempt to index global 'zml_loot_mcm' (a nil value)
stack trace:
it's entirely possible that i have fucky settings so i apologise if that is indeed the case, but not sure as of current as i'm recreating my modpack from scratch so there's a *lot* of **** that needs tweaking, made and installed. :D
Also had same crash error
! [SCRIPT ERROR]: c:/anomaly/bin/..\gamedata\scripts\zml_loot.script:148: attempt to index local 'se_item' (a nil value)
# SAVING: NPC items | number of saved npcs: 0
# SAVING: Bounty Squad | [last_spawn_time]: table: 0x53edc7f8
# SAVING: Bounty Squad | [active_squads]: table: 0x548df5c0
# SAVING: Bounty Squad | [chance_multiplier]: table: 0x534b3040
# SAVING: Sleep deprivation | last_sleep: 2306
# SAVING: level_weather | cycle: partly - preset: w_cloudy2 - is_underground: true - weather_storage size: 4
* Saving spawns...
* Saving objects...
* 35465 objects are successfully saved
* Game fatal_ctd_save_5.scop is successfully saved to file 'c:/anomaly/bin/..\appdata\savedgames\fatal_ctd_save_5.scop'
FATAL ERROR
[error]Expression : <no expression>
[error]Function : CScriptEngine::lua_pcall_failed
[error]File : ..\xrServerEntities\script_engine.cpp
[error]Line : 206
[error]Description : fatal error
[error]Arguments : LUA error: c:/anomaly/bin/..\gamedata\scripts\zml_loot.script:148: attempt to index local 'se_item' (a nil value)
Happened when I shot a monolith insie CNPP
Hello!
I have responded to your message on GAMMA's Discord.
This is not the same error. And as long as I can't get your full crash log, I won't be able to help.
Still, you can follow the instructions in the bottom of my post, Troubleshooting and check by yourself in your settings if you have installed or set up something wrongly.
Cheers.
What is a sdalgr?
Also looks like you are using an older version of ZLM before 2.0 as this file no longer exists. Also seems to be the ammo function I think. Did you have ammo spawn enabled using a version prior to ZLM 2.1?
I split loot settings of NPCs and stashes in their own file. zml_loot_mcm was the only one handling the ZLM's MCM menu settings before but has been replaced by zml_npcloot_mcm and zml_stashloot_mcm.
So I invite you to download the latest version!
Cheers!
ZLM updated to 3.1.
Now, the mod is made for base Anomaly and I separated GAMMA's integration into a patch.
I also added leevithan's russian translation.
Cheers.
could you maybe fix lab x8 not spawning enemies with zcp installed ?
that would be awesome :)
Hello!
What do you mean by that?
Like there is no enemies spawning in lab x8 with ZCP?
If so, please do know I did not make ZCP and I do not maintain it. I'm in no position to fix any bugs for it.
ZLM is just a ripoff or its loot module, that's all I take care of.
Cheers
Can you add a total chance for all item categories?
And to be more precise: So that when opening the cache, at least one item from any category always spawns. Just make a cyclic check, like: you opened the stash, if during the first pass none of the chances from all categories worked, then the second pass is made and so on until the item spawns in one or more categories. I just don’t want to open completely empty stashes, and setting the chances of all categories to 100% is also not interesting. I suggest making this optional.
So an option "Guarantee at least one item". Good suggestion.
I have no idea how to do that exactly for now, but I can try coding something that does nearly that.
I'll try to do it with the next update I'll work on.
ZLM updated to 4.0.
Now with presets for quickly setting up the mod!
Now with amount settings for each category, because we never have enough of our favorite items!
Also added a bunch of new patches for :
-Little Bits Food pack
-Hot Drink Hoopla
-Western Goods
-HeatVision
-Mo3's WarDogs MilSim Armory & Warfare overhaul for GAMMA
Cheers.
Hello. My game crashes whenever I start the game using this latest mod with an error per below.
FATAL ERROR
[error]Expression : <no expression>
[error]Function : CScriptEngine::lua_pcall_failed
[error]File : ..\xrServerEntities\script_engine.cpp
[error]Line : 206
[error]Description : fatal error
[error]Arguments : LUA error: ...alker anomaly\gamedata\scripts\modxml_zml_presets.script:9: attempt to call method 'insertFromXMLFile' (a nil value)
For some reason, this error only occurs when the MCM is turned on. Otherwise, it is fine when turned off on which it shouldn't be the case.
I am using:
1. 1.5.2
2. MO2
3. MCM, 08/09/22 version
4. ZLM 4.0 (this mod)
Hello!
Another user reported this error on Discord. It seems the XML fucntions I use in one of my script requires DXML 3.0. This means the latest modded exes for Anomaly.
You can find more information here :
Moddb.com
I have tested it with new version of DXML 3.0 (03.25.23) and it is now working.
Thank you for your assistance.
Keep up the great work!
FATAL ERROR
[error]Expression : <no expression>
[error]Function : CScriptEngine::lua_pcall_failed
[error]File : ..\xrServerEntities\script_engine.cpp
[error]Line : 206
[error]Description : fatal error
[error]Arguments : LUA error: c:/games/anomaly/bin/..\gamedata\scripts\zml_loot.script:128: attempt to index local 'se_item' (a nil value)
Hello!
May you send me your entire crashlog please?
I've got several people having this issue lately and I can't really pinpoint the problem sometimes.
In some cases, the following manipulations can fix the problem :
-disable faction spawn ;
-check in your axr_options.ltx (in gamedata/configs) if any 'zombied_tier1' entry for ZLM slipped in. If yes, delete it ;
-check if you have a droptables for ZLM (ZLM/gamedata/configs/scripts) that you should not have (for mods you don't have)
Cheers.
I am only using Lootboxes plugin. But.. I just checked your ltx file for it and it references items not even listed in any ltx files for latest lootboxes version available here on moddb (https://www.moddb.com/mods/stalker-anomaly/addons/anomaly-lootboxes). Which leads me to think that you maybe basing your file on some other outside version of anomaly lootboxes? EFP's version perhaps?
I do have a 'not-official' of Lootboxes. I'll check that asap.
To give you an example:
snapgun
lootbox_72
lootbox_toolbox
lootbox_toolbox2
lootbox_food
lootbox_ammocase
lootbox_ammocase2
etc...
None of these exist in official lootboxes mod published here.
Hum. Alright I'll def fix that.
Thanks for your help.
Aight I got that. It will be fixed officially for the next update.
For now, I suggest removing ZLM's lootbox droptables.
Thanks again for pointing this out.
Awesome, thanks man :)
4.1 should have all your problems fixed!
Thanks again for your help. Cheers!