Home » MODDING HQ 1.13 » v1.13 Coding Talk » Experimental Project 7
Re: Experimental Project 7[message #356883 is a reply to message #356882] Tue, 05 March 2019 20:30 Go to previous messageGo to next message
sevenfm

 
Messages:2201
Registered:December 2012
Location: Russian Federation
paragonid wrote on Tue, 05 March 2019 22:12
I'm using last version and recommended NTCH settings, enemy administrators/soldiers seems to hit 5-6 times a turn from 6-7 tiles away with start game pistols, while my merks (Igor) with ~70 marksman do it twice as bad. Am I missing something or everything is in order as expected?

In my tests, the game is balanced well, and even starting mercs have a high CTH at close distance.
6-7 tiles is a close distance with high CTH, but there are many things in the game that have effect on CTH, like shock, wounds, used sight etc.
For Igor, it's better to use shotgun as he has bonus from hunter trait to shotguns and rifles.
Also, for NCTH I would recommend using SDO instead of stock 1.13 as it has much better NCTH settings.



7609+AI (r1527) | Unofficial modpack | Win8+ fix | Experimental project | Youtube | Trunk (r8801) | 1.13 Starter Docs

Поживешь подольше - увидишь побольше.


Re: Experimental Project 7[message #356885 is a reply to message #356883] Wed, 06 March 2019 01:32 Go to previous messageGo to next message
paragonid

 
Messages:5
Registered:March 2019
Thanks for comments and suggestions.

I need help with enemy information tooltip enabled by SOLDIER_TOOLTIP_DETAIL_LEVEL=2 , I think button to display it in 113 was holding ALT, but I can't seem to see it with 7609+AI

I guess it takes a new game to play with SDO? Rip...
And I probably can not switch to OCTH without new game as well?

[Updated on: Wed, 06 March 2019 03:29]

Re: Experimental Project 7[message #356887 is a reply to message #356885] Wed, 06 March 2019 03:15 Go to previous messageGo to next message
paragonid

 
Messages:5
Registered:March 2019
Is tripwire roll added in your code or is it 113 related?
When I apply multitool to tripwire roll (which I created by combining 2 tripwires) I get unlimited amount of tripwire in inventory
Re: Experimental Project 7[message #356889 is a reply to message #356885] Wed, 06 March 2019 09:16 Go to previous messageGo to next message
sevenfm

 
Messages:2201
Registered:December 2012
Location: Russian Federation
paragonid wrote on Wed, 06 March 2019 04:32
I need help with enemy information tooltip enabled by SOLDIER_TOOLTIP_DETAIL_LEVEL=2 , I think button to display it in 113 was holding ALT, but I can't seem to see it with 7609+AI

Tooltips are switched with shift+d or ingame option.

Quote:
I guess it takes a new game to play with SDO?

Yes like any other mod, but it definitely worth it.

Quote:
And I probably can not switch to OCTH without new game as well?

Not possible.

Quote:
Is tripwire roll added in your code or is it 113 related?

It was added by Flugente to the main trunk years ago.

Quote:
When I apply multitool to tripwire roll (which I created by combining 2 tripwires) I get unlimited amount of tripwire in inventory

The status of tripwire roll should be lowered with each merge until it reaches 0 when the item should be destroyed. If it doesn't work, it's a bug.

[Updated on: Wed, 06 March 2019 09:17]




7609+AI (r1527) | Unofficial modpack | Win8+ fix | Experimental project | Youtube | Trunk (r8801) | 1.13 Starter Docs

Поживешь подольше - увидишь побольше.


Re: Experimental Project 7[message #356915 is a reply to message #356889] Fri, 08 March 2019 02:04 Go to previous messageGo to next message
paragonid

 
Messages:5
Registered:March 2019
Thanks for all the answers again!

Q: My militia is stealing all weapons laying on the ground ): Is there any workaround?

A: unload it, militia don't take them if no ammo

[Updated on: Fri, 08 March 2019 04:31]

Re: Experimental Project 7[message #356919 is a reply to message #356915] Fri, 08 March 2019 10:49 Go to previous messageGo to next message
sevenfm

 
Messages:2201
Registered:December 2012
Location: Russian Federation
paragonid wrote on Fri, 08 March 2019 05:04
Thanks for all the answers again!

Q: My militia is stealing all weapons laying on the ground ): Is there any workaround?

A: unload it, militia don't take them if no ammo

They take better weapons in combat (or when alert is raised), in peace time they should not pick them up.
You can move all items to the place where militia cannot take it (press shift+m if I remember correctly).



7609+AI (r1527) | Unofficial modpack | Win8+ fix | Experimental project | Youtube | Trunk (r8801) | 1.13 Starter Docs

Поживешь подольше - увидишь побольше.


Re: Experimental Project 7[message #356938 is a reply to message #356806] Sun, 10 March 2019 19:26 Go to previous messageGo to next message
Kitty

 
Messages:154
Registered:October 2017
Location: Germany
What I like about the Ambient Sounds is the added atmosphere. The music of JA2 is sure cool, but after thirty years, I often tend to turn it off. And while sneak attacking at night, a little background is more to my liking then just hearing steps and doors. When trying out your examples, I realy had to laugh, when I heard the lone dog barking while sneaking into position in a city.

I searched for an easy to handle and free audio-editor and choosed "audacity", there sure are others arround as well. I loaded your examples to see how you have done it and it didn't seem all to complicated to me. Searching copyright-free sounds first was a little annnoying, but then I looked into museums and, for birds, ornithologigical instituts suprised I found lots of sounds, but it was a little effort on my side. One can find thousands of burps and farts, but to find e.g. the sound of a falling tree, one has to dig deeper. For me, this was fun, like a treasure hunt. For others, this might just be a boring task. But then, you allready had some cool examples for those who didn't want to do their own sounds, don't know.

I appriciate everything that adds depth to the "feeling", so ambient sound sure found my liking. Being at the coastline and hearing waves come in, a more lively sounding San Mona, a swamp that sounds eerie, a forest with wildlife and nature sounds - having the oportunity to create all of these sure is a very cool thing. So I might be the lone fan of this feature, but, as you may allready read between the lines, I'm a huge fan thumbs up

Just found out, that I can't upload ogg-files, hmm. If I find a way, I may can provide my examples. Sure no masterpieces, but may of interest for someone else.

Edit: Got me a Dropbox, first try, see if it is working. Link to few of my soundfiles: https://www.dropbox.com/sh/zabiqaoz1z6b7jk/AACVouAD_WrXVAxJoBU8E0yma?dl=0

[Updated on: Sat, 23 March 2019 20:35]




I need more details.

(Didi Hallervorden)
Re: Experimental Project 7[message #356952 is a reply to message #332214] Thu, 14 March 2019 09:58 Go to previous messageGo to next message
paragonid

 
Messages:5
Registered:March 2019
After some experience I'm sure enemy has higher CTH than average decent shooting merk somehow. Is there a way to enable debug mod or something to display how CTH is calculated per shot?
Re: Experimental Project 7[message #356953 is a reply to message #356952] Thu, 14 March 2019 10:59 Go to previous messageGo to next message
sevenfm

 
Messages:2201
Registered:December 2012
Location: Russian Federation
paragonid wrote on Thu, 14 March 2019 12:58
After some experience I'm sure enemy has higher CTH than average decent shooting merk somehow. Is there a way to enable debug mod or something to display how CTH is calculated per shot?
The game uses the same CTH code for your mercs and AI soldiers.
CTH for AI depends on difficulty level and soldier type, at insane level elite soldiers can possibly have marksmanship > 90 and can be equipped with good scopes, so it's no surprise they hit often.
Also if your soldiers are under suppression shock or wounded or exhausted or have low morale, their CTH gets penalty.



7609+AI (r1527) | Unofficial modpack | Win8+ fix | Experimental project | Youtube | Trunk (r8801) | 1.13 Starter Docs

Поживешь подольше - увидишь побольше.


Re: Experimental Project 7[message #357228 is a reply to message #356953] Tue, 16 April 2019 00:07 Go to previous messageGo to next message
crackwise

 
Messages:108
Registered:April 2013
Hi Sevenfm, a couple of questions:

1) I have recently seen a video on Youtube, showing AIMNAS mod with your your AI+ mod [url=&ab_channel=Mozayka][/url] The AIMNAS showed in the video is but a version compatible with 7609, right? Is there such a ready-to-play version of AIMNAS AI+ somewhere on a google drive, similar to your modpack? If not, any tips on how to assemble that?

2) I have recently updated my AI+ version (used to have r946) and started playing with the latest release (r956). As suppression indicators, I now see white numbers instead of the preious white asterisks. How can I change them back to white asterisks? (Damage indicators are unchanged and remain as red asterisks. All is good there.)

3) Again, in the recent AI+ (r956), my militia now somehow seem to use their RPGs (and other launchables) much more often, which I actually find really nice! However, they seem to fire those things very carelessly. They often destroy our own fortifications by accident, and in one occasion, even killed my own mercs by accident lol. Can I improve this behaviour by tweaking the ini settings?

Thanks a lot again for the awesome stuff!
Re: Experimental Project 7[message #357229 is a reply to message #357228] Tue, 16 April 2019 00:46 Go to previous messageGo to next message
sevenfm

 
Messages:2201
Registered:December 2012
Location: Russian Federation
Hi crackwise!
1. It is possible to combine old Aimnas item mod (Easter 2016 release if I remember correctly) and actual Aimnas bigmaps. There could be only a problem with AI soldiers thinking that they are jeeps (though I have added a fix to prevent it).
The link to ready to play Aimnas-7609 modpack is here in my Russian modpacks:
http://yadi.sk/d/Fj_B0WEKNjRQJ
Download 7609ru+Aimnas-Bigmaps.7z, extract, add missing SLF files and play. Unfortunately, I have no English version of this modpack.
2. This feature was simplified so only damage is shown as asterisks now. Unfortunately, the code was too complex to maintain and I had plans to add more text messages to floating hit indicators, so I have seriously reworked it.
r919:
- removed options: SHOW_SUPPRESSION_USE_ASTERISK, SHOW_SUPPRESSION_SCALE_ASTERISK
- options ENEMY_HIT_COUNT = 1, PLAYER_HIT_COUNT = 1 show red '*' instead of white '?'
Sorry, this cannot be changed in options.
3. There's no option to tweak this behavior, you can try to remove RPGs from militia equipment by changing XMLs or using manual militia equipment.
I can think of adding more restrictions for militia team when using RPGs to the code.



7609+AI (r1527) | Unofficial modpack | Win8+ fix | Experimental project | Youtube | Trunk (r8801) | 1.13 Starter Docs

Поживешь подольше - увидишь побольше.


Re: Experimental Project 7[message #357245 is a reply to message #357229] Tue, 16 April 2019 23:25 Go to previous messageGo to next message
crackwise

 
Messages:108
Registered:April 2013
Thanks a lot for the info Sevenfm! So I have installed the AIMNAS Easter 2016 edition. To have the newer maps, is it enough if I just copy the Data-Bigmaps from the newest version and overwrite the existing one? Or should I copy paste specific folders and files? And if so, which ones are those?

Sorry for bothering you, but I am a bit newbie in this regard...
Re: Experimental Project 7[message #357246 is a reply to message #357245] Wed, 17 April 2019 00:13 Go to previous messageGo to next message
sevenfm

 
Messages:2201
Registered:December 2012
Location: Russian Federation
@crackwise
Sorry I don't remember exactly how to make a working Aimnas for 7609, cannot help you.
Actual Data-Bigmaps should work, I also did some XML tweaks to items mod, for example for sandbags to work.



7609+AI (r1527) | Unofficial modpack | Win8+ fix | Experimental project | Youtube | Trunk (r8801) | 1.13 Starter Docs

Поживешь подольше - увидишь побольше.


Re: Experimental Project 7[message #357322 is a reply to message #357246] Mon, 29 April 2019 16:53 Go to previous messageGo to next message
Randok

 
Messages:301
Registered:March 2004
Could you do a new exe to Vengeance ( last was 23.02.19 )?
Thank you in advance



Many thanks to all those who make new features for Jagged Alliance 2.

New mod + new map (JA2 map with Drassen, Omerta, Cambria etc, edited or not-it has been repeatedly ) with large sectors + two additional levels + a lot of new tileset + moving vehicles = fun for months, years. Fun with creation, fun playing this mod.
Re: Experimental Project 7[message #357323 is a reply to message #357322] Mon, 29 April 2019 19:38 Go to previous messageGo to next message
sevenfm

 
Messages:2201
Registered:December 2012
Location: Russian Federation
Randok wrote on Mon, 29 April 2019 18:53
Could you do a new exe to Vengeance ( last was 23.02.19 )?
Thank you in advance
Uploaded 19.04.27 in the usual place.
BTW, this is not VR thread.



7609+AI (r1527) | Unofficial modpack | Win8+ fix | Experimental project | Youtube | Trunk (r8801) | 1.13 Starter Docs

Поживешь подольше - увидишь побольше.


Re: Experimental Project 7[message #357324 is a reply to message #357323] Mon, 29 April 2019 22:08 Go to previous messageGo to next message
crackwise

 
Messages:108
Registered:April 2013
Dear Sevenfm, thanks a lot for the updated versions and the updated log file!

I did not have a chance to test the newest exe yet, but I see that in r983 it says "removed option NCTH_SCOPE_MOVEMENT_PENALTY". Does that mean movement penalty for scopes is completely removed, or only the option to adjust it? I really am for the penalty since it makes sense from a realistic point of view, and besides, sniper rifles are otherwise extremely overpowered. I really liked that I could adjust the penalty to my liking. Is there a way that the penalty setting can remain there, but by default is equal to zero (for those who are not used to it)?

Apart from that, I recently had an idea about whether it is possible to make RPGs go through barbed wire and concertinas. I think in real life they probably would just pierce through the wire mesh. This would also allow for interesting gameplay, for sure happy Would it be possible?
Re: Experimental Project 7[message #357325 is a reply to message #357324] Mon, 29 April 2019 22:33 Go to previous messageGo to next message
sevenfm

 
Messages:2201
Registered:December 2012
Location: Russian Federation
crackwise wrote on Tue, 30 April 2019 00:08
Dear Sevenfm, thanks a lot for the updated versions and the updated log file!

I did not have a chance to test the newest exe yet, but I see that in r983 it says "removed option NCTH_SCOPE_MOVEMENT_PENALTY". Does that mean movement penalty for scopes is completely removed, or only the option to adjust it? I really am for the penalty since it makes sense from a realistic point of view, and besides, sniper rifles are otherwise extremely overpowered. I really liked that I could adjust the penalty to my liking. Is there a way that the penalty setting can remain there, but by default is equal to zero (for those who are not used to it)?
NCTH_SCOPE_MOVEMENT_PENALTY option is removed, but additional penalty for scopes stays. I don't like adding new options so I try to remove as much as possible when I see that existing code works well. I think that without this penalty the scopes, especially high powers scopes, will be overpowered, allowing easy shots on appearing enemies without a chance for AI to take cover or attack. Now high power scopes should be good for shooting at stationary targets far away, while for shooting at moving targets you would prefer something like 2x scope or reflex. Vision bonus from scopes is another huge problem for AI and game balance, and I plan to rework it completely in the future.

Quote:
Apart from that, I recently had an idea about whether it is possible to make RPGs go through barbed wire and concertinas. I think in real life they probably would just pierce through the wire mesh. This would also allow for interesting gameplay, for sure happy Would it be possible?
As far as I know, RPG in flight has some folding wings like here:
https://i.imgur.com/mYsolLR.jpg
So I don't think it will fly through the wire easily.

Also, I must say that r986 is experimental version, I had no time to test it properly yet, though every single added feature is usually tested in the game.

Some notable changes apart from AI tweaks are: throwing grenades on roofs should work much better now, also covert spies should be less imbalanced, especially in combat or when some enemies are killed. And garotte now works as it should (allowing instakill on unalerted enemy if he is attacked at head from the back).

And we also now have additional "stability" scope penalty for OCTH, which is max for standing stance , less when crouched and zero for prone or when weapon is mounted, and can be as high as 50% for 10x scope at max range.
For NCTH this can be easily achieved using XML so I decided against adding hardcoded NCTH penalty for stability.

I also watch now Wildfire+SDO+AI playthrough by Mozayka (it's in Russian but you shouldn't have problem with understanding what happens on screen happy ) which I find interesting and giving me new ideas for AI improvement and game balance tweaks.
I can recommend it for anyone interested in how AI and NCTH work and how to play on insane level.

[Updated on: Mon, 29 April 2019 22:47]




7609+AI (r1527) | Unofficial modpack | Win8+ fix | Experimental project | Youtube | Trunk (r8801) | 1.13 Starter Docs

Поживешь подольше - увидишь побольше.


Re: Experimental Project 7[message #357327 is a reply to message #357325] Wed, 01 May 2019 05:06 Go to previous messageGo to next message
curiouslurker
Messages:3
Registered:May 2019
Sevenfm

Hi! This is my first post in this forum. I am a long time fan of JA2 and the 1.13 mod. I noticed you have improved the AI in an AMAZING way. This is FAR FAR better than any other strategy game I have seen and it's a lot of fun to play the game with your mod.

Do you happen to have any sort of blog where we could follow your development? I really want to understand what you are doing and how are you able to do it. I know the basics of programming but I don't know how to apply it to something like this.

Many thanks for your time and effort towards making JA2 even greater.
Re: Experimental Project 7[message #357330 is a reply to message #357327] Wed, 01 May 2019 23:24 Go to previous messageGo to next message
sevenfm

 
Messages:2201
Registered:December 2012
Location: Russian Federation
curiouslurker wrote on Wed, 01 May 2019 07:06
Sevenfm

Hi! This is my first post in this forum. I am a long time fan of JA2 and the 1.13 mod. I noticed you have improved the AI in an AMAZING way. This is FAR FAR better than any other strategy game I have seen and it's a lot of fun to play the game with your mod.

Do you happen to have any sort of blog where we could follow your development? I really want to understand what you are doing and how are you able to do it. I know the basics of programming but I don't know how to apply it to something like this.

Many thanks for your time and effort towards making JA2 even greater.
Hi curiouslurker!

All information on this project can be found in this thread, also on my youtube channel and some info is available on google drive in Docs folder.
There's also svn with logs and code, which you can examine if you are really interested in details (though I'm afraid it would be hard to understand what happens there because the way the code is organized in 1.13 is... far from perfect).
Unfortunately, I have no development blog, not sure if I really need it? There are not many people really interested in those details, most people just want to play better game, also I'm not English speaker so it would require some effort from my side, not mentioning all that time that I could spend on AI development instead.
And I'm not a professional coder, and there are many good AI blogs on the internet, for example about Xenonauts (which is very similar tactical game) AI:
https://codepoke.net/2012/08/18/xenonauts-a-i-starting-blocks/
Quite interesting reading, though it has absolutely no relation to how AI in Ja2 1.13 works.

Interesting that my project is not the only one that tries to improve Ja2 AI, there was Ja2: Civil War mod which improved AI long before I even started, and there's excellent Ja2 NightOps mod developed by Russian team which also has many interesting features, like enemy sight/light at night avoiding or calculating LOS for all soldiers in a separate background thread.

If you want to learn coding and making AI, I think the best thing you can do is take the code and start experimenting, looking how your changes affect AI behavior and effectiveness in various situations. It may be not obvious at all, and for me it took probably months of testing various AI tweaks and looking at the results before I could see some real improvement.
Are there any specific areas of AI/1.13 code you are interested in?

If I want to start some kind of 1.13 AI blog some day, where do you recommend to post it? This forum doesn't look like a good place in my view, as not many people visit it these days and most of them are not interested in coding/AI design details.

p.s. @admin for some reason I cannot access this forum from my PC anymore (cannot find the host or something), I can only visit it from my phone (using Opera mini) or from PC when using Opera with VPN mode enabled. Is there a way to solve it somehow?



7609+AI (r1527) | Unofficial modpack | Win8+ fix | Experimental project | Youtube | Trunk (r8801) | 1.13 Starter Docs

Поживешь подольше - увидишь побольше.


Re: Experimental Project 7[message #357332 is a reply to message #357330] Fri, 03 May 2019 03:31 Go to previous messageGo to next message
curiouslurker
Messages:3
Registered:May 2019
Quote:
Are there any specific areas of AI/1.13 code you are interested in?
Mostly everything related to enemy decision making. Like, when and how does an enemy decide to shoot instead of running towards a mercenary? How do they control how far do they stand from each other? How does morale affect their decisions? Is there an "opponent" player controlling all enemies like the player would do or each enemy has his own "thinking" (Information is not shared between them unless they can see or communicate)?

Quote:
If I want to start some kind of 1.13 AI blog some day, where do you recommend to post it? This forum doesn't look like a good place in my view, as not many people visit it these days and most of them are not interested in coding/AI design details.
You should definitely try out some subreddits. You could host your development on github and then crosspost in many subreddits related to gaming/coding/ai to your github showcasing your explanations or progress. It doesn't have to be extremely detailed or complex. Something like..."Today I show you what happens when you change this value. Before we have this behaviour [video] and afterwards when we change it to *value* we can see the soldiers now avoid light at night [video]"

How do I start poking at the JA2 code? Is there any guide or place where I can read to understand how to make changes?

Thanks for your answers.

[Updated on: Fri, 03 May 2019 03:33]

Re: Experimental Project 7[message #357333 is a reply to message #357332] Fri, 03 May 2019 10:03 Go to previous messageGo to next message
sevenfm

 
Messages:2201
Registered:December 2012
Location: Russian Federation
curiouslurker wrote on Fri, 03 May 2019 05:31
Mostly everything related to enemy decision making. Like, when and how does an enemy decide to shoot instead of running towards a mercenary?
It's mostly random, like if soldier has 90% CTH he will shoot 90% of the time and 10% of the time try to change position. In fact most of the AI decisions in 1.13 are randomized in some way, so sometimes it may look as they are acting smart but it's completely random effect.

Quote:
How do they control how far do they stand from each other?
Actually, they don't control it at all. There are some simple modifiers in take cover function that add penalty to adjacent positions, there is restriction to avoid moving to adjacent position when searching for cover movement spot, and there are some limits when moving to help friends.

Quote:
How does morale affect their decisions?
It two ways - making them more passive or aggressive (like changing tendency to run to enemy or hide somewhere), so if you shoot at enemy for several turns suppressing him, his morale will drop and he will be more likely to hide at distance from you, after several turns he will recover and may start to close in to you again.
Also AI morale affects main choosing between RED AI decisions - seek/help/hide/watch. With high morale, soldier will likely chose seek, with low morale hide/watch.

Quote:
Is there an "opponent" player controlling all enemies like the player would do or each enemy has his own "thinking"
The AI is individual, there is no group AI, no commanders/officers taking group decisions etc. Each soldier makes his own decisions, though there are some modifiers. You can think of it as a group of insects like ants, they don't have a "super mind", but they can act together sometimes. In 1.13 it works in a similar way - if soldier knows his friend nearby is successful in attack, he will try to attack too, if he knows his friend is in "dangerous" zone but he is not under attack and can see enemy or even has successful attack, this soldier will also ignore stop orders and move into "dangerous" zone to simulate kind of group attack, but there is no super AI that decides that.

Quote:
(Information is not shared between them unless they can see or communicate)?
There are two kinds of knowledge in 1.13 - personal knowledge and public knowledge. Each AI remembers all his recently seen/heard opponents for 3 turns, after that he forgets them forever, though in Ja2+AI there is a tweak to allow soldiers to keep last known position of enemy as "heard 3 turns ago" which can also be forgotten in some special situation.
And there is public knowledge which works similar, but personal knowledge usually has higher priority than public. Personal knowledge doesn't automatically become public, AI soldier should "radio" about it, only then others will know new information about known opponents. So, for example, if you sneak and see opponent and he sees you, you get interrupt and kill him silently in one turn, no enemy soldier will know that. But if you let him have his turn, he will probably immediately radio about you. Or if you make some loud noise, others will hear you and report by radio.

Quote:
You should definitely try out some subreddits. You could host your development on github and then crosspost in many subreddits related to gaming/coding/ai to your github showcasing your explanations or progress. It doesn't have to be extremely detailed or complex. Something like..."Today I show you what happens when you change this value. Before we have this behaviour [video] and afterwards when we change it to *value* we can see the soldiers now avoid light at night [video]"
Thank you for advice, any particular subreddit is recommended, or can I make my personal blog there?

Quote:
How do I start poking at the JA2 code? Is there any guide or place where I can read to understand how to make changes?
You need to install Visual Studio of some recent version (I use vs2013, but anything from vs2008 to vs2013 for stable and to vs2017 for the main trunk should work).
You need to download sources (I use TortoiseSVN but any svn client should work).
for stable 7609:
https://ja2svn.mooo.com/source/ja2/branches/ja2_source_official_2014
for the main trunk:
https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13

Then open for example ja2_VS2013.sln with your visual studio and compile (don't forget to change project from debug to release first as debug is extremely slow).
The AI code is in TacticalAI folder/project, main decisions are in DecideAction.cpp, service AI utils are in AIUtils.cpp, attack decision code is in Attacks.cpp etc.
The code is mostly c with some rare cpp parts included.

[Updated on: Fri, 03 May 2019 12:34]




7609+AI (r1527) | Unofficial modpack | Win8+ fix | Experimental project | Youtube | Trunk (r8801) | 1.13 Starter Docs

Поживешь подольше - увидишь побольше.


Re: Experimental Project 7[message #357335 is a reply to message #357333] Fri, 03 May 2019 22:27 Go to previous messageGo to next message
curiouslurker
Messages:3
Registered:May 2019
Quote:
Thank you for advice, any particular subreddit is recommended, or can I make my personal blog there?
Well, I thought about github because you can embed stuff into your posts and have an easier time tracking things (Can also serve as a repository so there is that). You could make your own reddit posts in one subreddit and then crosspost them into others but as far as I am aware you can't embed stuff, only text.

Coding, gaming, programming and tbs could be good subs to start off.

As soon as I have free time from university courses I will start modifying stuff and seeing what can be done.

Quote:
The code is mostly c with some rare cpp parts included.
Great!

Thank you very much.

EDIT: Oh I almost also forgot. (I don't know if this goes against rules so if It does please erase it) You should also try to show this mod off to people over at RPG CODEX forums. They are quite demanding about quality and good AI so I guess you might find a handful of followers there.

[Updated on: Fri, 03 May 2019 22:29]

Re: Experimental Project 7[message #357383 is a reply to message #357335] Mon, 20 May 2019 12:47 Go to previous messageGo to next message
sevenfm

 
Messages:2201
Registered:December 2012
Location: Russian Federation
NWSS demo

New Weapon Sound System:
- caliber + weapon type based system (no individual sound for particular weapon)
- play auto sounds from single loop.ogg sound
- custom single sounds for selected caliber and weapon type (optionally without added echo)
- various echo types depending on sector (also special echo for underground sectors and when shooting in a building)
- special sound effect when shooting in a room
- special sound effect when shooting underground
- special sound effect for last shot (Garand ping, mechanical sound)
- special sound effect for case falling (only when on a flat surface like in a building or on a roof)
- 4 different sounds of each echo type supported
- 2 different sounds of case falling supported for each caliber
- 2 different loop sounds for each caliber/weapon type supported, selected randomly



You can download unofficial 7609 modpack (7609en+Modpack.7z on google drive) and try these sounds in the game.
Since this system is caliber based, currently only SDO mod supported, for other mods you need to check AmmoStrings.xml and create missing folders with weapon sound files in Data-User\AltSounds\Caliber folder.



7609+AI (r1527) | Unofficial modpack | Win8+ fix | Experimental project | Youtube | Trunk (r8801) | 1.13 Starter Docs

Поживешь подольше - увидишь побольше.


Re: Experimental Project 7[message #357385 is a reply to message #357383] Tue, 21 May 2019 00:16 Go to previous messageGo to next message
crackwise

 
Messages:108
Registered:April 2013
Awesome work Sevenfm, this brings the game to next level! I have a quick question:

I have an ongoing game at a default version (i.e. not your modpack version) of 7609 + SDO + AR with your AI+ mod. I would like to get the ambient sounds and the new calibre-based weapon sound system in this ongoing version.

So I have downloaded the unstable_modpack.7z from your drive. Is it possible to get these features from your modpack? If yes, which folders, files, settings etc. should I copy from your modpack into my version?

Thanks a lot in advance!
Re: Experimental Project 7[message #357386 is a reply to message #357385] Tue, 21 May 2019 00:31 Go to previous messageGo to next message
sevenfm

 
Messages:2201
Registered:December 2012
Location: Russian Federation
crackwise wrote on Tue, 21 May 2019 02:16
I have an ongoing game at a default version (i.e. not your modpack version) of 7609 + SDO + AR with your AI+ mod. I would like to get the ambient sounds and the new calibre-based weapon sound system in this ongoing version.
Is it possible to get these features from your modpack? If yes, which folders, files, settings etc. should
I copy from your modpack into my version?
For NWSS to work, you need:
- SDO mod of English version (or use English AmmoStrings.xml file instead of localized version)
- AltSounds folder from google drive\Data, unpack it into Data-SDO or similar folder (should be Data\AltSounds)
- set NWSS = TRUE in Ja2_Options.ini, section [Extended Options]
- actual Ja2+AI version (r1031+)

Any constructive feedback is appreciated.

Quote:
So I have downloaded the unstable_modpack.7z from your drive.
Unstable modpack has no relation to my AI project, it's just actual exe from the main trunk and mods that work with unstable. Why do you even bother downloading it if you are using stable 7609 version?

[Updated on: Tue, 21 May 2019 00:53]




7609+AI (r1527) | Unofficial modpack | Win8+ fix | Experimental project | Youtube | Trunk (r8801) | 1.13 Starter Docs

Поживешь подольше - увидишь побольше.


Re: Experimental Project 7[message #357387 is a reply to message #357386] Tue, 21 May 2019 00:36 Go to previous messageGo to next message
crackwise

 
Messages:108
Registered:April 2013
Thanks for the quick reply, I will do as you recommend.

Regarding unstable_modpack. I actually confused the unstable_modpack link under your profile with 7609en+Modpack.7z, sorry.

The thing is I can't somehow find 7609en+Modpack.7z in your google drive. Could you share the link to it? Thanks a lot!
Re: Experimental Project 7[message #357388 is a reply to message #357387] Tue, 21 May 2019 00:42 Go to previous messageGo to next message
sevenfm

 
Messages:2201
Registered:December 2012
Location: Russian Federation
crackwise wrote on Tue, 21 May 2019 02:36
The thing is I can't somehow find 7609en+Modpack.7z in your google drive. Could you share the link to it? Thanks a lot!
For some reason google drive client failed to upload the file, I restarted it, should appear in usual place after some time.



7609+AI (r1527) | Unofficial modpack | Win8+ fix | Experimental project | Youtube | Trunk (r8801) | 1.13 Starter Docs

Поживешь подольше - увидишь побольше.


Re: Experimental Project 7[message #357389 is a reply to message #357388] Tue, 21 May 2019 01:11 Go to previous messageGo to next message
silversurfer

 
Messages:2676
Registered:May 2009
Nice addition! One slight thing that should be fixed is the sound of casings hitting the ground. It's much too loud in my opinion.
Is this feature going to make it into the general trunk?



Wildfire Maps Mod 6.07 on SVN: https://ja2svn.mooo.com/source/ja2/branches/Wanne/JA2%201.13%20Wildfire%206.06%20-%20Maps%20MOD

Re: Experimental Project 7[message #357390 is a reply to message #357389] Tue, 21 May 2019 01:27 Go to previous messageGo to next message
sevenfm

 
Messages:2201
Registered:December 2012
Location: Russian Federation
silversurfer wrote on Tue, 21 May 2019 03:11
Nice addition! One slight thing that should be fixed is the sound of casings hitting the ground. It's much too loud in my opinion.
I already changed the volume of case falling from HIGHVOLUME to LOWVOLUME 2/3 of the time and MIDVOLUME 1/3 of the time, it sounds much better now.
I think of also making it random so the sound will be played with like 30% chance, but I'm not sure yet.
Also the room effect doesn't always sound well with some weapon sounds like shotguns, there's still something to think of.

Quote:
Is this feature going to make it into the general trunk?
I wanted to have some feedback first and maybe do some tweaks and improvements, but in general this feature is very simple (it's just one small function that checks for some filenames, no new XMLs or anything), it shouldn't be a problem to add it to the main trunk.
There's a problem with mods compatibility as currently everything is based on names of calibers, and localization doesn't work at all (you have to use English names of calibers for it to work).
I don't want to add new XML for my project, but for using it with the main trunk something should be done like adding id or name of sounds folder to the AmmoStrings.xml, like:
<AMMO>
	<uiIndex>1</uiIndex>
	<AmmoCaliber>.38 Spc</AmmoCaliber>
	<BRCaliber>.38 Spc</BRCaliber>
	<NWSS>.38 Spc</NWSS>
</AMMO>
This will allow easy reusing of the same sounds for different mods without making too much similar folders and also probably solve localization problem.
And there are some smaller problems like deciding which guns should play case falling, currently all manual reloading guns and easy unjam guns don't play case sound but it's not the best solution. I should probably add some new flag to items.xml to indicate guns that don't extract case after shooting.

If you are interested in code details you can look in Ja2+AI svn for NWSS keyword.



7609+AI (r1527) | Unofficial modpack | Win8+ fix | Experimental project | Youtube | Trunk (r8801) | 1.13 Starter Docs

Поживешь подольше - увидишь побольше.


Re: Experimental Project 7[message #357391 is a reply to message #357390] Tue, 21 May 2019 08:51 Go to previous messageGo to next message
townltu

 
Messages:386
Registered:December 2017
Location: here
While i did not play with nwss myself,
the sound of ejected cases appeared indeed to loud in some JA2 LP videos where i assume that nwss is used.

You could probably lower the volume by reducing the sounds amplitude in audacity etc,
(that is, unless the program automatically stretches the dynamic of audio to maximum)
drop a bunch of the files into its window, hit ctrl+A and select "effect" -> "amplify" to set a negative amount of dB,
so you get a new peak amplitude of ~ -20, then select "files" -> "export multiple".
My 13 year old high end biz notebook can handle ~ 100 of such short files in audacity without much lag,
assuming that most other people use faster machines, it should not take that much effort or time.

If you want to finetune the amplitude reduction with in game feedback,
progressively reduce a couple of different early gun case ejection sounds in steps of e.g. -4dB to find your perfect value.

[Updated on: Tue, 21 May 2019 08:52]

Re: Experimental Project 7[message #357392 is a reply to message #357390] Tue, 21 May 2019 14:59 Go to previous messageGo to next message
sevenfm

 
Messages:2201
Registered:December 2012
Location: Russian Federation
Playing with AI+NWSS+SSA. Omerta landing.


https://youtu.be/kexHd1JodxQ

Small video showing r10xx AI and sounds.



7609+AI (r1527) | Unofficial modpack | Win8+ fix | Experimental project | Youtube | Trunk (r8801) | 1.13 Starter Docs

Поживешь подольше - увидишь побольше.


Re: Experimental Project 7[message #357396 is a reply to message #357392] Wed, 22 May 2019 21:52 Go to previous messageGo to next message
crackwise

 
Messages:108
Registered:April 2013
I really like in the recent versions AI has become more effective at taking cover intelligently if there is some cover around it, really cool! Thanks a lot!

@Sevenfm: A particular issue which I observe since many revisions and could perhaps be improved: Calling artillery strike on enemy causes the enemy AI to enter deadlocks much more frequently. I see that the AI is programmed to run and get out of the artillery area as quickly as possible. This probably makes sense for the default artillery bombardment radius, which is very small. However, I have greatly increased the artillery radius manually. Could it be that this messes up with the AI algorithm?

Apart from that I am very happy with how I set up mortars and artillery strike in my game and I could recommend it to everyone, or even as default settings at the AI+ version (if it is possible of course): In addition to increasing the radius of artillery strike, I have strongly decreased the direct damage of mortars but increased the stun damage greatly. This makes them a lot more similar to how they are used in reality: Inaccurate area suppression and area denial - not homing missiles like in default JA2 happy

With these settings, it makes more sense for AI to stay put and don't run around and expose themselves. So their behaviour could be tweaked accordingly in the case of above mentioned artillery settings becoming default in future versions.



[Updated on: Wed, 22 May 2019 21:56]

Re: Experimental Project 7[message #357397 is a reply to message #357396] Wed, 22 May 2019 22:06 Go to previous messageGo to next message
sevenfm

 
Messages:2201
Registered:December 2012
Location: Russian Federation
crackwise wrote on Wed, 22 May 2019 23:52
@Sevenfm: A particular issue which I observe since many revisions and could perhaps be improved: Calling artillery strike on enemy causes the enemy AI to enter deadlocks much more frequently. I see that the AI is programmed to run and get out of the artillery area as quickly as possible. This probably makes sense for the default artillery bombardment radius, which is very small. However, I have greatly increased the artillery radius manually. Could it be that this messes up with the AI algorithm?
It is possible, can you provide a save before the AI lock occurs, and also your changed settings?

Quote:
Apart from that I am very happy with how I set up mortars and artillery strike in my game and I could recommend it to everyone, or even as default settings at the AI+ version (if it is possible of course): In addition to increasing the radius of artillery strike, I have strongly decreased the direct damage of mortars but increased the stun damage greatly. This makes them a lot more similar to how they are used in reality: Inaccurate area suppression and area denial - not homing missiles like in default JA2 happy

With these settings, it makes more sense for AI to stay put and don't run around and expose themselves. So their behaviour could be tweaked accordingly in the case of above mentioned artillery settings becoming default in future versions.
I usually play with low mortar damage + many fragments, so it works like suppressive weapon and also cannot be used to fight tanks effectively.
What are your settings for artillery strike and mortar/shells?

Update: added some improvements to red smoke avoidance code in r1041, please test.

[Updated on: Wed, 22 May 2019 23:35]




7609+AI (r1527) | Unofficial modpack | Win8+ fix | Experimental project | Youtube | Trunk (r8801) | 1.13 Starter Docs

Поживешь подольше - увидишь побольше.


Re: Experimental Project 7[message #357399 is a reply to message #357397] Wed, 22 May 2019 23:50 Go to previous messageGo to next message
crackwise

 
Messages:108
Registered:April 2013
1) Hi Sevenfm, I have uploaded an old save file here: https://send.firefox.com/download/fe48227ec522bf2e/#EQU_xuXj1CyvdGyL1BrRGw This is though from a considerably older version, but it is what I had available at the moment. In this save, I had militia with me and called artillery on enemy position and it had been going for a while. (I think there is one round of artillery left in the save) The militia however would during all of the artillery turns enter 90% in deadlock.

I think in this case, it has to do with them not advancing in the vicinity of artillery. It is quite funny actually, you will see that they form a crescent around the artillery radius probably multiplied with some factor, maybe something like 1.5.

2) Maybe I should also mention the related settings in my Options.ini to give an idea about the effect:

- EXPLOSIVE_SUPPRESSION = 350%
- SUPPRESSION_EFFECTIVENESS = 150%,
- SUPPRESSION_SHOCK_INTENSITY = 187%

My settings for mortar and artillery are as follows:

Mortar rounds:
- Damage: 30
- StunDamage: 70
- NumFragments: 200
- Fragdamage: 10
- FragRange: 100

Artillery settings in Skills_Settings.ini:
- RADIO_OPERATOR_ARTILLERY_DISTRIBUTED_OVER_TURNS = TRUE
- RADIO_OPERATOR_MORTAR_COUNT_DIVISOR = 5
- RADIO_OPERATOR_MORTAR_POINTS_ADMIN = 10
- RADIO_OPERATOR_MORTAR_POINTS_TROOP = 15
- RADIO_OPERATOR_MORTAR_POINTS_ELITE = 20
- RADIO_OPERATOR_MORTAR_RADIUS = 18 *This is the most important change.
- RADIO_OPERATOR_MORTAR_SIGNAL_SHELL_RADIUS = 2

[Updated on: Wed, 22 May 2019 23:51]

Re: Experimental Project 7[message #357400 is a reply to message #357399] Thu, 23 May 2019 00:12 Go to previous messageGo to next message
sevenfm

 
Messages:2201
Registered:December 2012
Location: Russian Federation
crackwise wrote on Thu, 23 May 2019 01:50
1) Hi Sevenfm, I have uploaded an old save file here: https://send.firefox.com/download/fe48227ec522bf2e/#EQU_xuXj1CyvdGyL1BrRGw This is though from a considerably older version, but it is what I had available at the moment. In this save, I had militia with me and called artillery on enemy position and it had been going for a while. (I think there is one round of artillery left in the save) The militia however would during all of the artillery turns enter 90% in deadlock.
Thank you. It would be great to also mention your mod if you post a save, otherwise it's useless.

Quote:
I think in this case, it has to do with them not advancing in the vicinity of artillery. It is quite funny actually, you will see that they form a crescent around the artillery radius probably multiplied with some factor, maybe something like 1.5.
Yes they simply search closest spot that's outside RADIO_OPERATOR_MORTAR_RADIUS + small bonus, as a result, they will form some circle-like formation.
Also they should hide in buildings as spot with a roof above is considered safe from artillery fire.



7609+AI (r1527) | Unofficial modpack | Win8+ fix | Experimental project | Youtube | Trunk (r8801) | 1.13 Starter Docs

Поживешь подольше - увидишь побольше.


Re: Experimental Project 7[message #357401 is a reply to message #357400] Thu, 23 May 2019 00:46 Go to previous messageGo to next message
crackwise

 
Messages:108
Registered:April 2013
1) Oh sorry, you are right. The mods I use are Arulco Revisited + SDO + AI. I unfortunately don't remember The AI.exe version in that particular save file, and don't know how to extract from the save game itself...

2) The thing is, in the case of militia, I would prefer to have them actually charge the enemy positions that are being bombarded. Yes, they may also get occasionally hit but the enemy will likely be in a much worse situation, having endured several rounds of bombardment. So it is a good opportunity for the militia to at least have the option to charge, without being artificially held back.

If I don't want them to charge into the bombardment, I can give them the order ALL: hold position, anyway, so they just stop happy
Re: Experimental Project 7[message #357402 is a reply to message #357401] Thu, 23 May 2019 00:53 Go to previous messageGo to next message
sevenfm

 
Messages:2201
Registered:December 2012
Location: Russian Federation
crackwise wrote on Thu, 23 May 2019 02:46
2) The thing is, in the case of militia, I would prefer to have them actually charge the enemy positions that are being bombarded. Yes, they may also get occasionally hit but the enemy will likely be in a much worse situation, having endured several rounds of bombardment. So it is a good opportunity for the militia to at least have the option to charge, without being artificially held back.
My opinion is that AI should have some instinct of self-preservation, they are not robots so you cannot just throw them into suicidal attacks.
There could be opportunities when charge is more preferable and less dangerous then waiting, but such militia command is not implemented yet.



7609+AI (r1527) | Unofficial modpack | Win8+ fix | Experimental project | Youtube | Trunk (r8801) | 1.13 Starter Docs

Поживешь подольше - увидишь побольше.


Re: Experimental Project 7[message #357413 is a reply to message #357402] Fri, 24 May 2019 21:39 Go to previous messageGo to next message
sevenfm

 
Messages:2201
Registered:December 2012
Location: Russian Federation
Using new tags in merges.xml, using attached explosives.


https://youtu.be/7jzD3USHsno

Utility knife (item 299) cuts off 5% of duct tape, creating new duct tape item with 5% status.
Duct tape can be attached to any grenade of normal type.
If duct tape is attached to grenade, any explosive item of normal type can be attached, or any grenade with volatility > 0 can also be attached.
Attached duct tape, explosives and other items add to total weight of grenade, reducing throwing distance.
Marbles add fragments to explosion.

XML code for utility knife + duct tape merge, using USE_ITEM_NEW merge (13):
Merges.xml
<firstItemIndex>299</firstItemIndex>
 <secondItemIndex>304</secondItemIndex>
 <firstResultingItemIndex>304</firstResultingItemIndex>
 <secondResultingItemIndex>0</secondResultingItemIndex>
 <PointsAdded>5</PointsAdded>
 <PointsUsed>5</PointsUsed>
 <mergeType>13</mergeType>
<APCost>20</APCost>

Mod used: Wildfire 6.07 + SDO (modified version).



7609+AI (r1527) | Unofficial modpack | Win8+ fix | Experimental project | Youtube | Trunk (r8801) | 1.13 Starter Docs

Поживешь подольше - увидишь побольше.


Re: Experimental Project 7[message #357414 is a reply to message #357413] Sat, 25 May 2019 08:57 Go to previous messageGo to next message
sevenfm

 
Messages:2201
Registered:December 2012
Location: Russian Federation
Repair gun by cannibalizing another gun with the same ID.


https://youtu.be/A01iT7twdXk

When merging, for each 10 points used 1 point is added to the repaired gun.
This merge needs Toolkit (item 203) in inventory, for each merge 5% of toolkit status is used, also it performes easy mechanical check so you will need at least some basic skills in mechanics.
This merge may be useful when you play with MERCS_CAN_DO_ADVANCED_REPAIRS = FALSE to repair guns above max repair level, also may be used for quick repair on the field.

XML code for COMBINE_POINTS merge (1):
Merges.xml
<firstItemIndex>347</firstItemIndex>
<secondItemIndex>347</secondItemIndex>
<firstResultingItemIndex>347</firstResultingItemIndex>
<secondResultingItemIndex>0</secondResultingItemIndex>
<PointsUsed>100</PointsUsed>
<PointsAdded>10</PointsAdded>
<ExtraItem>203</ExtraItem>
<ExtraItemPointsUsed>5</ExtraItemPointsUsed>
<SkillCheck>1</SkillCheck>
<mergeType>1</mergeType>
<APCost>80</APCost>

Mod used: Wildfire 6.07 + SDO (modified version).



7609+AI (r1527) | Unofficial modpack | Win8+ fix | Experimental project | Youtube | Trunk (r8801) | 1.13 Starter Docs

Поживешь подольше - увидишь побольше.


Re: Experimental Project 7[message #357422 is a reply to message #357414] Sun, 26 May 2019 14:33 Go to previous messageGo to previous message
crackwise

 
Messages:108
Registered:April 2013
Hi Sevenfm, I am playing the AI r1045 with AR+SDO and keep seeing a bug with the soldier health/suppression/shock indicator appearing far away from the soldier in strange places.

Here is a screenshot:
https://imgur.com/a/7Ld0nFl

You can find the save file here: https://send.firefox.com/download/1d49bcd6aa71314e/#kNqSBBsHTzPidLqkJ_4IZA

Thanks a lot!
Previous Topic: Trunk AI and improvements
Next Topic: New Attachment System Beta
Goto Forum:
  


Current Time: Fri May 29 14:07:34 EEST 2020

Total time taken to generate the page: 0.03326 seconds