Return

Thoughts about modding Stalker Anomaly

Note: when I say "modding", I mean "MAKING mods for".

Stalker Anomaly is a free fan-made project that combines content from the 3 Stalker videogames and various related mods into a single huge sandbox game. It is perhaps better known through Stalker GAMMA, which is just Anomaly with a lot of extra addons on top.

I love Anomaly, but I probably hate it even more. Every time I play it I start hating it for it's flaws, then I try to fix those flaws by creating my own mods, and then I get burned out because the codebase is a nightmarish mess of spaghetti that keeps getting worse and worse the deeper you go. Despite the frustration, there's something extremely immersive about Anomaly that makes me keep coming back.

The more I try to fix it, the more there's a part of me that wants to fork the entire Anomaly project and just clean up all the code and data files. It's a miracle that there's so many mods and addons for the Stalker games and for Anomaly, but I wonder how much more there would be if the code was more understandable and pleasant to work with. After all, I would be making tons of addons for it myself if I didn't get bogged down trying to untangle the web of confusion.

Unfortunately I don't have the time to do it. I've spent multiple weekends just trying to understand how something works, only to run into a brick wall of overwhelming complexity or "this must be called from within the engine" or otherwise not making any useful progress.


What's wrong with Anomaly

The biggest flaw of Anomaly (in terms of game design) is bad progression. Anomaly is treated too much like a sandbox game: you can play as the member of any faction, each one starts at a different part of the map, and the difficulty/enemies/items/loot of the world have to work for all faction playthroughs. As a result none of the difficulty/enemies/etc really change even if you travel across the whole world, you'll just end up at the starting area of a different faction. The map ends up feeling extremely flat, and it's made worse by the fact that you can walk right through several maps without running into any enemies. It feels barren compared to the origial Stalker trilogy.

Another way to illustrate the problem is that you can grind procedurally generated quests in the beginner town until you have endgame equipment. It's made even worse by the fact that your reputation won't transfer to all parts of the map, so the starting town ends up having endgame gear for sale but many other places don't. There's no real incentive to explore which makes exploring feel meaningless.

Weapons are very realistic, which in part contributes to the satisfying immersion of bullet-in-the-face being deadly even from a pistol, but it also means that there's very few enemies that can survive a shotgun shot to the head. That further flattens the feeling of progression because it's very easy to get a shotgun and nothing feels like a big upgrade over that until you get a weapon with a good scope. When you do get a weapon with a scope, nothing feels like an upgrade anymore.

On the note of weapon progression, every shop has like 7 different pistols, but there's no reason to use any of them because every other type of weapon is far superior, they're just kind of useless after the first 20 minutes of gameplay (assuming you didn't already pick a second weapon on the starting loadout). Even within pistols the sense of progression is bad: there's one particular pistol that has very large magazine and automatic fire mode, it's pretty easy to obtain and it's hard to argue for using any other pistol in the game over that one.

I don't think we need all these.

Both armor and weapons variety feels very flat, it's often hard to tell what item is better than another because they're so similar, sometimes it feels like someone hit the randomize button on all the stats on all the items. I don't mind small variations of the same item, but even completely different items look very similar in terms of stats.

How to fix it

In an ideal world, I would try to do 3 main things:

  1. A complete overhaul of all the items in the game, prioritizing interesting gameplay and progression over realism, removing clutter that doesn't add anything to the game (or at least distributing them in different parts of the map in a more interesting way and giving them little differences), making each item more disinct from other items. Same with equipment upgrades, they should have more meaningful effects, I really don't care about getting +5% ergonomics on my gun.
  2. More "linear" progression so you have to actually explore the different maps and gradually progress into better and better equipment.
  3. Authored quests just like in the official Stalker games, except instead of a central questline, there would be different quests in different places. Anomaly has a few quests like this I think, but there's so few I can't even recall what/where they were.

I have done a lot of re-designing on consumable items, trying to make them more interesting and varied and less confusing. There's a lot of consumables in Anomaly but they seem to have a ton of seemingly random properties, for example eating some piece of food giving -4% thirst and -1% energy, or drinking water reducing 40 kcal of hunger, or food A reducing 431 kcal from hunger and food B reducing 273 kcal. The only argument I can think of is that those kinds of stats feel more "realistic" or "immersive", but to me they just make the game a lot more confusing without making it more interesting.

Making consumables interesting can go beyond just stat differences though. Here's some things that I've experimented with:

Cigarettes are way too overpowered for healing radiation (the fact that they're almost weightless means you can always carry around a number of them without any cost), I've considered many options for nerfing them. One of them was that rain prevents you from lighting a cigarette, but it ended up just being a minor nuisance without actually fixing the problem since there's always a cover somewhat nearby.

There's way too many food items in the game, I figured that they need some radical differences to be interesting. The 2 main ideas I had was that canned foods must be opened with a tool first, and that cooked meals (and opened cans) will spill out in your backpack if you move around too fast or get attacked. You'd have to bring cooking tools with you and cook on-the-go, eat immediately when you buy food from a trader, or bring a type of food that won't spill. The trick is that most foods that don't spill are rare/expensive or have penalties like increasing thirst, and while canned foods are economical and don't spill when closed, they are kind of heavy and require a tool to open.

There's other less interesting differences, for example bags of nuts/raisins reduce hunger very little but have many uses, chocolate and protein bars give energy/stamina related benefits but are rare, and the 3 kinds of military rations are the best food items (each with different characteristics) but also by far the most expensive. I also turned tier 1 cooked meals from a bowl into roasted meat, it's cheap and won't spill but gives you radiation and is also an inefficient waste of meat. There's 3 tiers of cooked meals, all of them bowls by default. I'd like to further expand the cooking system, but I need to delve into the cooking system script in order to do it properly. That was one of the scripts that caused me to get burned out from Anomaly modding at some point.

I find it very fun to balance things like this and make all the clutter feel like it has a reason to exist. I'm really anxious to do it for all the armors and weapons, I have a lot of ideas for how to do that, and balancing the progression and where the items are found is part of it.

What's stopping me

As excited as I am to go further, everything falls apart when it comes to balancing equipment. Let's say I want to re-balance a piece of armor. What should I set the "electric protection" value to? In order to know that, I would need to know how much electric damage different anomalies/enemies do and how electric damage/absorption is calculated. How strong are electric anomalies in the beginning of the map vs at the end of the map? What does 5% protection do? How about 80% protection? All I know is that the stats don't do what they sound like: it won't reduce electric damage by 5% and 80%.

Even if I knew how they work, I don't know how to balance hazards themselves. I need to make stronger anomalies and stronger enemies spawn up north, and weak ones in the south where you start. I don't even know how/where they are defined in the game's data files.

I have a similar problem with weapons, I tried tweaking the numbers but I couldn't make any sense about what their effect is. Even in the official Stalker games, stats are shown as horizontal bars, not as numbers, so you can only compare relative differences between 2 weapons without knowing what the difference actually means in practice.

The actual numbers on the weapons are way more complicated than this, even if the bars were numbers the game would still do a pretty poor job at explaining what the weapon's behavior is. As far as I remember, some of the stat bars on the window don't actually describe any real properties on the weapon (it's be possible to create a "bug" where the window says X but the actual values are Y).

It's even more important when it comes to bullet protection because bullets have a piercing value. Armor has X% ballistic protection, and bullets say something like "class IIIA piercing".

How the hell am I supposed to balance something like this? I could set up some kind of editor mode and just change the numbers while shooting at target dummies, but there's like 100 different weapons and 100 different armors and 100 different ammo types. I can't just blindly change numbers, I need to understand what kind of calculations are involved with the numbers. But guess what, most of the data on the items isn't used anywhere in the game scripts, they're fed directly into the game engine which I can't see into.

Now let's look at some of said data. The data for those bullets looks like this (yes, all the formatting in these files is all fucked up, and yes I selected all the text so you can see the random mixture of spaces and tabs being used, I did not edit this and all the files I've seen have been similar):

This file is 5233 lines long by the way.

The values relevant for damage are at the bottom, prefixed with k_*. Not shown are k_bullet_speed and k_cam_dispersion. What do all these values do? Your guess is just as good as mine. You can draw some assumptions by comparing bullet types (I included 7.62x39 because the item description of 5.45 says that it has more accuracy and less recoil):

I can make guesses about what these values do, I could probably balance a handful of ammo types with just this information, but there's about 40 different types of ammo in the game not including the broken ones. And we're just talking about ammo, we haven't even gotten to weapon stats or how armor protection relates against them.

I just get overwhelmed by a feeling of hopelessness when I try to sort this stuff out, it would be easier to make my own game so I start drifting towards projects like Scavgame.


Potential changes

If redesigning equipment is too complicated, I could potentially work on the other goals. One of them is more linear progression. My general desire is that you start from Cordon as usual, and then you have to squiggle through the map, gradually making your way north and unlocking new map transitions through quests or purchases.

The image above is my brainstorming about what the progression could look like and what kind of items you could expect to find around that point in the map. The map transition points are color coded according to a rough idea of how hard it should be to unlock it. Blue = automatically available, green = easy, yellow = hard, orange = very hard, red = you'll probably be 2 layers north (the map is rotated, north is to the right) before you unlock this. Pink = special or path that I'm not familiar with.

The game would still be open ended and let you go where you want, but it would be much harder to take the obvious path forward, and it would be much easier to unlock paths from north to south than the other way round. I imagine the game starting with you trying to make your way either west to the Great Swamps to do some quests and get loot, or go east around Darkscape and Dark Valley into Garbage. The path north from the swamps could be unlocked by doing enough quests in the swamps, or for free from Agroprom's side.

It's also important that the loot is very restricted so you can't get powerful items too early, especially powerful tools like artifact detectors and night vision goggles and weapon scopes. Using flashlights in the dark is super cool in my opinion, but even tier 1 night vision just makes them completely obsolete, and when you get T2 night vision you'll spend half of your time with it turned on.

Tier-1 night vision already has the correct shader effects: it has noise, it exaggerates light, and it has an annoying oscillating blur. I just need to tweak it a bit to make the blur stop oscillating (so it always remains in the blurry state and never becomes clear) and to increase the light exaggeration, but I can't figure out how those effects can be modified because the file for it is in binary format. In other words, instead of editing text like "Sigh=lol", you need to edit hex digits like "53 69 67 68 3D 6C 6F 6C" and there's no documentation for them.

Tier-1 at night. Tier-2 at night. Tier-1 at day. Tier-2 at day.

Fixing some of the balancing of the tools and devices is doable, but it's harder to actually restrict what the player can obtain. I would need to know how to manipulate stash loot, quest rewards, and NPC equipment and/or pathing (high tier NPCs shouldn't be able to spawn in the south nor travel from north to south). I tried to figure out how this stuff works but I was met with another tangled web of confusion. It seems more doable than balancing equipment though, I found various loot tables and stuff in the data files, although there's a chance that some of it is fed to the engine again and I can't get as much control as I'd want to have. Investigation pending, I guess.

As a side note, the density of enemies needs to be increased, otherwise the world feels too barren and you might just walk right through a map without encountering anything.

Quests

There's another Stalker mod called DoctorX Call of the Zone which is in many ways better than Anomaly, especially when it comes to it's quests and some of the world events (the world feels more varied and alive, Anomaly tends to feel barren and generic by comparison). The way I would compare it to Anomaly would be that it feels "outdated but better designed".

I haven't tried to make a quest yet, but I've explored the concept a little and saved some other Anomaly addons that might be useful for reference. Proper quest creation would require knowledge about a lot of different ways to manipulate the world, like spawning items and enemies and map markers and controlling NPC behaviors and dialogue. It would be a long journey so I haven't found the time and motivation to go too deep into it.

I would want both specific single-time questlines that are always the same, and procedurally generated/repeatable quests. DoctorX has pretty good procedurally generated quests, Anomaly has quests too but they all suck in comparison. The biggest flaw of DoctorX questlines is that it constantly makes you fight against groups of Monolith soldiers that can 1-shot you, I have a huge collection of medkits because I just die from the first shot so I don't get a chance to use them. Maybe I just picked a difficulty that it's not designed to be played with.

Both games have annoying problems with quest locations. Firstly sometimes the quest is just too far away in a place you'd rather not go to and you can't know that until you accept the quest. Secondly you have to return to the quest giver in order to complete the quest, which is just very annoying. Needing to return to the quest giver makes me feel like I can't take quests while traveling around the map naturally.

The same capabilities that can create quests, can also make the world passively more lively. For example I would like to make Agroprom more dangerous by spawning military dudes here and there and making them patrol around the map. Rostok should always be surrounded by at least a couple mutants. Rostok should be occasionally attacked by a group of Freedom guys, and Army Warehouses by Duty guys. Garbage should be often attacked by bandits. Mercenaries camp around in Wild Territory. Items should slowly re-appear on tables and stashes after you've picked them up. NPCs should randomly start fights or do weird things that you can choose to participate in. And so on.

Other stuff

There's lots of other issues with Anomaly, here's some that come to mind:


Other people's addons

Here's some notable addons that I use. They aren't necessarily related to what I'm talking about on this page though.