Updated to 1.5.2. Please help me with your feedback
If you liked my work do not hesitate to support me ;)
ONLY IN SCAPE/CORDON, garbage, agroprom, marsh, militaries, pripyat, red_forest and yantar (all partially) LEVELS
One problem I noticed in anomaly is the behavior of the NPCs in the middle of combat. They are very careless when fighting from a distance, and after a few seconds when they haven't seen the player, they come out of their covers and advance without any problem.
This mod is just a test in which I will try to force some combat schemes, to be used by them. These schemes were not created by me, I just applied some conditions in which they will be used.
Main characteristics:
- At large distances, over 70 meters, NPCs will use the "camper" scheme. That means that they will be as covered as possible and will slowly shoot at the player. If you don't see an enemy in an estimated time, the scheme will be deactivated, and the NPC will start looking for the player.
- At distances less than 70 meters, NPC's will use the "cover" scheme. This means they will try to attack and hide.
- At distances of less than 10 meters they will use the AI engine. That means that no scheme will control the NPC
In the moment, it will only work on the Cordon. Because it's a test to check the operation of the schemes.
- [v2.1] Added a "coward" npc: All npcs that go into battle have a one in seven chance of becoming a "coward" npc. This means that he won't come after you, but will stay far away waiting for you to come out, and will use suppression fire at the last place he saw you. After a long time this feature is deactivated and the npc will come looking for you.
INSTALLATION
- It is VERY advisable to make a backup of the "gamedata" folder before installing this mod. If at any time a persistent error is generated, you will be able to restore your old files
- Copy the mod files to your "gamedata" folder at the root of the game. Do not replace any files if you are asked to do so as they may cause errors by other mods. The only file that is 100% necessary for the operation of the addon is xr_conditions.script and mora_schemes.script
Changes log
vBeta1.0.1 Changed the values for the "camper" scheme will be used from 80 meters. Less that, the scheme "cover" will be used. This is because the "camper" scheme is slower to fire.
vBeta1.1 The file xr_combat_camper.script is added. There the action of "action_look_around" was deactivated because it created a delay between the moment the NPC sees the player, and the one that starts shooting.
The distance was also adjusted for the "cover" scheme and the "camper" scheme by reducing it from 80 meters to 70 meters for the activation of the "camper" scheme.
vBeta2.0 Added Garbage, agroprom, marsh and yantar (partially), fixed a error when the "cover" scheme was first activated (it caused static npc's).
v2.1 Added "coward" npc.
v.Beta3.0 Added the main functions of the Addon in a single file (mora_schemes) It will be easier to manipulate it this way. The npc will now not use the schemes to fight each other (will only use it against the player). This created static npc. Now the npcs will use the camper schemes more, even if they are not very far from the player, first they will try to cover and then they will start shooting. (3.0.1) Fixed a syntax error.
v.3.1 Updated to 1.5.1
v.1.0 Updated to 1.5.2 (For test). The script comes out of beta. Completely changed the way NPCs detect danger and combat. I also modified the waiting times of each scheme and eliminated the memory tables (which sometimes created certain bugs in the NPCs). Please, send me any feedback.
NOTE
Not compatible with my other mod: MORA'S COMBAT IGNORE MILITARY
- My knowledge in the manipulation of schemes is limited, so even these NPC behaviors have their limitations.
- I remember you again: It's a test addon. It will only work on
SCAPE/CORDON level.
- I'll use a GitHub repository that I'll add later. So that those who have the knowledge to help me with this, can do so easily.
- I'm still not sure if it will work for all the NPCs on every smart terrain on the level. I've only tried going against the military at the checkpoint near the rookie camp.
- The viewing distances you have set for the stalkers will affect this addon. If the NPCs can't see you because they are too short-sighted (less than 60m), they will never activate the "camper" scheme.
is this compatible with living zone and npc without amnesia addons?
Partially; just don't replace the files when you copy them. Those files that appear to be replaced.
With npc without amnesia yes, it's 100% compatible.
Man, THIS is the mod. Really. AI is so desesperating, putain...So if only a bit of common sense can be put into them, I buy. You have my support XD Can't wait to see the progress.
Yeah, we'll see how it goes on the Cordon/Scape alone. If all goes well it will be implemented in the entire Zone.
what so i only need to install the xr_conditions.script in Anomaly?
what the other files do?
No.
All other files represent a zone within the cordon/scape level. If you have another mod that uses one of those files, it is not a good idea to replace it with this test mod (I will make some compatible files for those mods using smart terrains later)
On the other hand, if you have all those files installed and you don't have xr_conditions.script, they won't work, and the game crashed
AI mods are what the game is desperately needing. If people like you could improve the AI and also the various issues with detection (bush, time to detect and shoot) this would make the game way more realistic and challenging.
Will definitely give this a try ! :)
How strange though that Ai is segmented into map areas! Like: south you can be smart, North you can be a retard...XD
Mora, this is no request AT ALL, as I wouldn't want to add more load onto your shoulders but...I'm myself in the middle of a making of a mod, AND I care very much for my playthrough now so...Straightly put, I am mainly playing North (Zaton and Jupiter). I can't go south as it full of jerks...If it happens to be a matter of changing a couple of values in a small file, consider adding one of the two zones I mentionned and as I play along/test my own mod, I can give you inputs about Ai changes...But again, this is no request ;)
I see your point.
The idea of this mod is to check the AI in a zone. Outside your normal game (because it's a test).
Editing other zones without seeing the behaviour of the AI and without feedback is risky. But I think I can release an even more "dangerous" update where I add the whole zone.
At file level there are many. Each level is segmented into parts. Each part has different NPCs with different behavior, and these schemes cannot be added to all; otherwise you will have immortal traders in the middle of the fights.
Whoa O_o...Even each map is itself divided? XD I told you I'm not at all aware of how this works, but for the AI to be so "radiated", well, it must be because changing it must be a hell of a job...
Anyway, as I see it, you could release that "dangerous" version of yours that it would still be an improvment! :D Any Alpha/pre-alpha stuff that deals with AI is improvment, even if it involves them shooting at everything everywhere (at least they would stop looking at you 10 min straight before pulling the trigger XD).
So, really, I understand all this is for test purpose only but I am willing to test in my playthrough and let you know. At the end of the day, if too broken (again, I doubt it) a simple removal of it should do the trick. And as I see, you don't have much feedback, which is a shame, as AI is really something I'd like to see improved above anything else.
Let me know if your willing to do Zaton or Jupiter (again here what would be the less tedious for you).
See u ;)
Okay.
Sounds good to me. I'll launch one in those two zones soon. So you can try them out. ;)
It will take me some time to do it, I must study all zone and know which are the most elementary npcs (at code level) there and that they don't need these schemes.
Have you tried to start a new game and go to the military camp south of the cordon? how did you feel about...
Nice! But hey, don't knock yourself out! :D
Actually, as I feel ashamed for having asked, I am thinking about travelling south only to pay a visit to those smart people whose brain has been left untouched by the radiations XD (I'm not frightened actually due to my fully modified Nosorog armor lol). But say: is it not save game compat? Even if using the reload system.ini thru debug mode (sorry if that sounds stupid)?
No, you don't need a new game. But to avoid the trip and everything that goes with it, a new game is recommended ;)
Bah...No, I'll go the full rambo way! I may uproot some trees in my wake XD
Thx for the answers, I let you go do ur magic now and I'll try to report as soon as I get the feel of that new unknown behaviour of them: let's see if for the first time in ages I actually die to the AI or not... ;)
Feedback:
Alright, so I played yesterday for a few hours and here is what I did:
_Install your mod
_Start a new game, go down south, farm and middle building (lloris) to have a shoot out in each (long/medium/short range) (Cordon).
_Restarted a new game again and did the same 3 shoot outs.
_Quit, uninstall mod, restart new game, went for the military south twice (another one after reload).
So...Verdict:
Overall AI is crap and will always be. BUT... in their crapiness, the old AI behavior is making for more challenge (sorry :/). I'll explain my feeling:
With your beta, there ARE some changes indeed and it shows: the ennemy stands far from you and engage from afar, true. But they still lack intellingence in that they do not seem to know what a cover is. It would be awesome that they stand still BEHIND that tree or wall but instead they stand still NEAR it in plain sight or even in the middle of the landscape without moving. And that makes for easier targets when in vanilla, even though it is stupid behaviour, the ennemy keeps moving around, hence the challenge being better.
That is the main point. Also, it seems that those changes bug some AI perception -- mostly sight: not sure if it is your doing (I just read in ur descrpn. it could be) but now it happens that a guy right in front of u totally ignore you after having engaged you or even after being shot at (he'll just keep crouching, scanning horizon, doing nothing).
Maybe also they seem less sound perceptive. Not sure how this could be the result of your tweaks, though.
So, the good part is that they are no more doing that windscreen wiper move in your scope (not that often anymore), but keep positions when suddenly attacked, crouch and shoot (some, again, don't and just keep scanning horizon). When next to building/covers, same behaviour. Some try to hide behind a tree (next to it for some...unfit but still enrolled shall we say XD ) or back away, some don't shoot, some you find behind you! XD Some are still moving towards you, etc. Stalker AI in a nutshell...XD
That's all I think. AI is a big problem that I think won't be tackled overnight. I'll keep that beta, though, coz I admit I like the feel of it somehow, and want to test it more, and if you're able to provide for more zones, I guess you'd have more feedback. I'll try and stick around Cordon for a while though ;) Thx for the work Mora :)
Thank you for taking the time to give me this feedback.
Yeah, I've noticed what you say about NPCs not shooting even when they see you. It's a problem with the camper scheme; I think that somehow there is a delay in firing that is purposefully made for long distances (In version 1.0.1 I changed the distances a bit, for that reason, although I think I'll have to modify the scheme to fix this). I will try to remove it in the next version ;) as yes, it is very annoying.
On the other hand you are right about the AI. This mod only makes them use pre-programmed schemes, although I haven't got my hands on those schemes yet. In the next betas I will be correcting things like the ones you explain, to make them more enjoyable.
Thanks again for your comment ;)
missterxpoop I think that the problem of the npc's in "camper" mode that take time to shoot should be solved. (v1.1)
Nice :) Yeah, just read your descrptn. update, so I'll give it a...shoot out (XD) when I can. I added the Illinaru warfare overhaul to have more fights and see a bit more of it.
Say, I think Illinaru's mod modifies some files you use. Just a question: if I override his with yours, do you think it's ok? Nevermind actually, I'll do it & see.
Thanks for ur job anyway; someone had to do it! And this is not the easiest one u picked XD I'll come back when I gave a more in-depth look ;)
Is it possible to tie this behaviour to the rang of NPC's? For example - newbie will charge carelessly while veteran is staying in cover more, and master stays in cover a bit longer and stays alert longer...
Also maybe this behaviour could be tied to NPC's HP or ammo/armor/weapon condition?
Such diversity would be kind of immersive I think...
Yeah...go write all the scripts for that XD Better wait for Stalker 2!
I suppose it could; but already in a more advanced version of the mod.
Ok, so, I tested 1.1, and I must say this is good. I did the same as previously, fighting in Cordon, and I really like the AI and what it did: I saw guys taking cover around the corners of buildings, shooting as they popped out of it and quickly getting back to it, to repeat again. I don't know if it's the placebo effect, but yes, this is nice now. Less of them in the open, more trying to find cover behind trees, walls, etc. Some are still acting weird, but I don't know in what extent this is linked to your modifications (like some being drawn to a particular place and staying put there -- near fixed machine gun for example).
Anyway, that would be reckless to follow my advice to apply it to all the zone; my enthusiasm should be compensated by some more feedback from others (but you should do more zones XD).
I'll keep an eye out for your progress if I can, and let u know about it ;)
Thx again for your work ;)And good luck!
Thank you :)
I guess the "camper" scheme just stands still, not looking for coverage. I'm trying to make it smarter, so it at least looks for cover before it ducks. If I can do that, maybe the next update will be a launch.
About the news maps, I was looking at the one for Zaton, and it's very, very long. A lot of npcs. But I'm still evaluating it, then I'll release an update for that area.
That would be nice, definitely. You know, I went away from Cordon as I was required some places else (XD) then did some stuff here and there, having a lot of gun fights due to my using Illinaru's warfare preset, and when I got back to Cordon, having in the meantime forgotten about your mod still on, I was like: man, that's strange the way they behave. There's something..." and then yes, in a middle of the firefight I remembered about your mod XD. i was like: the change is very obvious.
So keep up the good work; a shame again you don't have other than me to comment about it -- I hope it's coming, and no douches like some of those that comment about my mod...hum hum XD.
And about Zaton, really, if it goes against the way you intended to implement the whole thing, don't bother about me anymore; I got ur mod nicely tested in Cordon, and I'm sticking around these parts these days so...Maybe go for little easy zones like...I guess Rostok or Yantar. Keep Zaton when you are fully ready to launch the big stuff (sorry if it seems I requested the stuff for nothing :/ :D But at least you know what's awaiting you ;))
Ok man! ;) Thx for all!
;) good luck XD
So how's it going? When can i expect full version, cuz it looks good. I can only imagine how hard it would be to turn off brain scorcher with this mod lol
One question, it's possible or it's included that distance range for apply "correct cover" schemes depends on npc rank (the higher the better)? Could be a real nice way for represent any kind of real experience on stalker combat.
The application of the combat schemes depends on the distance or "range". The "camper" scheme is used for distant combat, and "cover" for medium distance combat.
In the "camper" scheme the npc will look for a cover, duck and shoot from there, without moving much.
In the "cover" scheme the npc will vary its cover from time to time, use grenades, and when wounded or charging, seek to hide.
Glad you are still working on it, so this means it's working full all around the zone?
Not yet, only in the places indicated in the beta 2.0 changes. They are still partially applied, which means that npcs will not always use this addon.
I'm intrigued by this. AI script schemes are lacking in many regards. Did I read it correctly that you "only" changed exisiting patterns and did not establish new ones?
I'm thinking of porting this to Dead Air but I'm guessing the smart-terrain bits will give me quite a headache.
Side note: The readme that is included in the file-archive is empty for me?
To understand Stalker's AI you must know that it works in several ways. The first and most basic way is by using the game engine: Just look for some coverage, then shoot, move and if you don't see the player go directly to look for him. It's basic in the way of fighting.
Then there are the "schemes" behaviors programmed in some lines of scripts that can take control in certain moments so that if certain conditions apply, the npc can use them. That's what I did, I used the schemes of the base game. I suppose that when a stable version of Anomaly comes out these schemes will be improved and applied.
In the case of this addon I didn't edit the schemes, but applied some conditions so that they can be used from time to time.
I see. I have noticed that the general behaviour of the AI is governed by only so fewscript-trees.
May I additionally ask what the changes to the smart-terrain logic are about? Since those have a lot more stuff going on in DA I think.
The logics are specific applications of those schemes in certain moments or situations. For example, when hiding from a emission, or when the fanatic is sleeping. What logic does then is to call a specific behavior. In this case I use them to apply the scheme on the smart terrain where the npc is at the time of the fight. I don't know how to make a general logic for all npcs, without interrupting their specific behavior in quests or habits.
Oh man! I cant' wait for the mod to encompass the whole map!
Hmmph....
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: ...ktop/games/anomaly\gamedata\scripts\xr_conditions.script:512: attempt to index global 'mora_schemes' (a nil value)
stack trace:
Make sure the file "mora_schemes.script" is in "gamedata>scripts"
Fixed in 3.0.1
Is this compatible with that: Moddb.com ?
I was using this for a while, but I encountered an issue that was causing fatal error crashes on every new game, I don't have the logs anymore, but mod was looking for a file that wasn't in the scripts folder, this part of your xr_conditions.script ::
function down_to_earth_functor(actor,npc,p)
return dxr_achievements.has_achievement("down_to_earth")
end
function heavy_pockets_functor(actor,npc,p)
return dxr_achievements.has_achievement("heavy_pockets")
end
Deleting that code works to stop crashes, so does pulling a dxr_achievements script from another mod, and another file that it uses, dxr_statistics. This issue may have also caused a crash during regular gameplay, but I didn't check logs for that crash.
Just now though I encountered an issue I can't figure out, that I've isolated to this mod. For some reason I can't press F on beds anymore (yes the correct bed with icon on minimap, none work, haven't tried sleeping bag item). Very unfortunately I can't use the mod for now.
Hope you continue to work on this because honestly it's made the game so much more enjoyable for me. Idk how it works, but I get the illusion that they're actually behaving tactically, like when they're in buildings some stay inside firing out of windows, some stay back, some approach, the mid range peeking they do works excellently, then the default ai within 10 m is perfect, and all of a sudden I'm clearing out a building the way works in most other shooters, but with the stalker intensity. Ofc this does need to be used with other ai/npc reworks I use, but this mod in particular is really great.
Regarding the crash that appears, my addon does not touch anything that has to do with the game's Achievements. It only inserts a few lines to use the schemes.
This addon is not updated for 1.5.1. That would be the first problem generating crashes.
I will upload an update in the next days for 1.5.1, so you can test it completely.
Thank you for encouraging me to keep improving it. The logics of NPCs in combat are very complex and difficult to indidualize in cases of combat with NPCs that should not go to the fight. Anyway I will try to bring it to the end and be able to apply it for all the NPCs in all zones.
Is this addon still being working ?
This Looks And Sounds Very Very ! Decent Brother Mora145
Thx ;) Enjoy it and if you see anything strange, don't forget to report it.
Great addon, thanks for updating. Really felt the big difference without it after updating to 1.5.1.
As I understand it, with WarfareALifeOverhaul or War zona will not work?
Work in all Anomaly NPCs in combat in any mode, but this is for smart zones. Zones in the maps/levels, not all (still)
NPC's in Stalker Anomaly are ******* strange i saw 4 duty soldiers walk into an anomaly field and they didn't trigger anything they just walks away like nothing happened
This is normal behaviour in Anomaly: NPCs are not affected by anomalies (done to avoid companions and important NPCs to die in anomalies).