Home » MODDING HQ 1.13 » v1.13 Coding Talk » Experimental Project 7
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 is currently offline 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]

Report message to a moderator

Civilian
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
Deleted.

 
Messages:2663
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]




Left this community.

Report message to a moderator

Lieutenant

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 is currently offline 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]

Report message to a moderator

Civilian
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
Deleted.

 
Messages:2663
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.



Left this community.

Report message to a moderator

Lieutenant

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 is currently offline crackwise

 
Messages:113
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!

Report message to a moderator

Sergeant
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
Deleted.

 
Messages:2663
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]




Left this community.

Report message to a moderator

Lieutenant

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 is currently offline crackwise

 
Messages:113
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!

Report message to a moderator

Sergeant
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
Deleted.

 
Messages:2663
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.



Left this community.

Report message to a moderator

Lieutenant

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:2793
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

Report message to a moderator

Lieutenant
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
Deleted.

 
Messages:2663
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.



Left this community.

Report message to a moderator

Lieutenant

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:384
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]

Report message to a moderator

Master Sergeant
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
Deleted.

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


https://youtu.be/kexHd1JodxQ

Small video showing r10xx AI and sounds.



Left this community.

Report message to a moderator

Lieutenant

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 is currently offline crackwise

 
Messages:113
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]

Report message to a moderator

Sergeant
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
Deleted.

 
Messages:2663
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]




Left this community.

Report message to a moderator

Lieutenant

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 is currently offline crackwise

 
Messages:113
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]

Report message to a moderator

Sergeant
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
Deleted.

 
Messages:2663
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.



Left this community.

Report message to a moderator

Lieutenant

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 is currently offline crackwise

 
Messages:113
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

Report message to a moderator

Sergeant
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
Deleted.

 
Messages:2663
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.



Left this community.

Report message to a moderator

Lieutenant

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
Deleted.

 
Messages:2663
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).



Left this community.

Report message to a moderator

Lieutenant

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
Deleted.

 
Messages:2663
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).



Left this community.

Report message to a moderator

Lieutenant

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

 
Messages:113
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!

Report message to a moderator

Sergeant
Re: Experimental Project 7[message #357425 is a reply to message #357422] Sun, 26 May 2019 18:15 Go to previous messageGo to next message
Deleted.

 
Messages:2663
Registered:December 2012
Location: Russian Federation
crackwise wrote on Sun, 26 May 2019 16:33
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!
Should be fixed in r1050.

[Updated on: Mon, 27 May 2019 00:46]




Left this community.

Report message to a moderator

Lieutenant

Re: Experimental Project 7[message #357429 is a reply to message #357425] Mon, 27 May 2019 01:12 Go to previous messageGo to next message
crackwise is currently offline crackwise

 
Messages:113
Registered:April 2013
Again using AR+SDO+AI, I have noticed that anti materiel ammo (e.g. 12.7mm ammo of OSV-96) does not destroy objects as it used to do in standard 1.13.

Since this feature was included pre 7609 version, it should theoretically work with those mods, right? Or is it switched off in SDO or the AI mod for some reason? If so, is there a way to switch it back on?

Report message to a moderator

Sergeant
Re: Experimental Project 7[message #357430 is a reply to message #357429] Mon, 27 May 2019 01:23 Go to previous messageGo to next message
Deleted.

 
Messages:2663
Registered:December 2012
Location: Russian Federation
crackwise wrote on Mon, 27 May 2019 03:12
Again using AR+SDO+AI, I have noticed that anti materiel ammo (e.g. 12.7mm ammo of OSV-96) does not destroy objects as it used to do in standard 1.13.

Since this feature was included pre 7609 version, it should theoretically work with those mods, right? Or is it switched off in SDO or the AI mod for some reason? If so, is there a way to switch it back on?
This is common misunderstanding.
Anti materiel ammo was added to the main trunk in r7069.
Stable branch was created in r6749:
Created new branch for the official 2014 release
- Based on development trunk rev. 6748
  https://ja2svn.no-ip.org/source/ja2/trunk/GameSource/ja2_v1.13
- This branch should only contain bugfixes
After that, no new features were added, only bugfixes from the main trunk until r7435, when it was officially released and later updated at r7609 with more bugfixes.



Left this community.

Report message to a moderator

Lieutenant

Re: Experimental Project 7[message #357444 is a reply to message #357430] Tue, 28 May 2019 23:38 Go to previous messageGo to next message
crackwise is currently offline crackwise

 
Messages:113
Registered:April 2013
Hi Sevenfm, a question regarding militia AI:

I generally position my militia manually by "hold position" command before the start of battle if the enemy is attacking (for example to my SAM sector).

It seems that in the recent AI releases (perhaps from r1000 onward) militia seems to shoot much less, return less suppression fire, and stay overall more passive during the battle if they were ordered to "hold position", and also kept like that during the combat.

Instead, if I order them to attack during the battle, they seem to act more properly, take better cover, shoot more often etc. There did not seem to exist a difference in the past AI versions, and since I would prefer them to hold position behind their cover, I don't like to order them to attack. Is this intentional and to be expected in the newer versions?

Report message to a moderator

Sergeant
Re: Experimental Project 7[message #357445 is a reply to message #357444] Tue, 28 May 2019 23:51 Go to previous messageGo to next message
Deleted.

 
Messages:2663
Registered:December 2012
Location: Russian Federation
crackwise wrote on Wed, 29 May 2019 01:38
Hi Sevenfm, a question regarding militia AI:

I generally position my militia manually by "hold position" command before the start of battle if the enemy is attacking (for example to my SAM sector).

It seems that in the recent AI releases (perhaps from r1000 onward) militia seems to shoot much less, return less suppression fire, and stay overall more passive during the battle if they were ordered to "hold position", and also kept like that during the combat.

Instead, if I order them to attack during the battle, they seem to act more properly, take better cover, shoot more often etc. There did not seem to exist a difference in the past AI versions, and since I would prefer them to hold position behind their cover, I don't like to order them to attack. Is this intentional and to be expected in the newer versions?
The only thing that "HOLD" command does is changes it to STATIONARY/DEFENSIVE and makes current position their original position so they don't move away.
SOLDIER_MILITIA_ORDER flag prevents militia from auto switching to SEEKENEMY like all militia does when alert is raised.
if ( (pTMilitiaSoldier->bActive) && (pTMilitiaSoldier->bInSector) && (pTMilitiaSoldier->stats.bLife >= OKLIFE) )
{
	//Hold Position !!!
	//ScreenMsg( FONT_WHITE, MSG_INTERFACE, L"Hold Position" );
	pTMilitiaSoldier->aiData.bOrders = STATIONARY;
	pTMilitiaSoldier->aiData.bAttitude = DEFENSIVE;
	// sevenfm: set this spot as original point
	pTMilitiaSoldier->aiData.sPatrolGrid[0] = pTMilitiaSoldier->sGridNo;

	pTMilitiaSoldier->usSoldierFlagMask |= SOLDIER_MILITIA_ORDER;
}
There are no other changes to militia AI apart from that.
In general, "HOLD" command should be used when militia soldier is in a good cover (inside building, for example), so he should stay there and hide as much as possible. In this mode, soldier's movement is limited to 5 tiles from his original point.
If they are ordered to attack, they will have much more freedom in movement so they will find a place with cover more easily.
As for suppression fire, chance to shoot depends on weapon range and range to enemy, so if your militia soldiers are far away from enemy and armed with short range SMGs, they will shoot for suppression less than when they run to enemy.
If any soldier is in BLACK state (he sees enemy), there's no difference between his orders/attitude, he will always try to shoot.



Left this community.

Report message to a moderator

Lieutenant

Re: Experimental Project 7[message #357473 is a reply to message #357445] Sat, 01 June 2019 00:37 Go to previous messageGo to next message
crackwise is currently offline crackwise

 
Messages:113
Registered:April 2013
Hi Sevenfm, I have noticed that my mercs in some instances cannot throw grenades through the windows (window glass is broken). Here is a savefile (AR+SDO+AI r1050):

https://send.firefox.com/download/ed280a433c8dbc25/#g3C7AYjlfPuYfVXkdvo0hw

Apart from that, I have the feeling that the enemy seems to return much less blind suppression fire in the recent AI versions. Is it intentional? Or does it have to do with enemy being outnumbered, staying on the defensive etc.? I don't think it has to do with weapon range, since it is 100% game progress and almost all of them have at least assault rifles.

[Updated on: Sat, 01 June 2019 00:52]

Report message to a moderator

Sergeant
Re: Experimental Project 7[message #357474 is a reply to message #357473] Sat, 01 June 2019 02:31 Go to previous messageGo to next message
Deleted.

 
Messages:2663
Registered:December 2012
Location: Russian Federation
crackwise wrote on Sat, 01 June 2019 02:37
Apart from that, I have the feeling that the enemy seems to return much less blind suppression fire in the recent AI versions. Is it intentional? Or does it have to do with enemy being outnumbered, staying on the defensive etc.? I don't think it has to do with weapon range, since it is 100% game progress and almost all of them have at least assault rifles.
What do you have in AI_SUPPRESS_MIN_MAG_SIZE, AI_SUPPRESS_MIN_AMMO_REMAINING settings?
Looking at more or less recent changes to AI:
- chance for suppression fire is 50% if soldier has no cover at current spot, previously AI soldiers could spend too much AP in Red state shooting instead of advancing to enemy or hiding.
- AI soldiers will try to avoid shooting if chance for friendly fire > 10
- AI will only shoot at the start of the turn (to limit CPU time)

I made some tweaks to suppression in r1058 that should help AI to shoot more often.



Left this community.

Report message to a moderator

Lieutenant

Re: Experimental Project 7[message #357475 is a reply to message #357473] Sat, 01 June 2019 02:48 Go to previous messageGo to next message
Deleted.

 
Messages:2663
Registered:December 2012
Location: Russian Federation
crackwise wrote on Sat, 01 June 2019 02:37
Hi Sevenfm, I have noticed that my mercs in some instances cannot throw grenades through the windows (window glass is broken). Here is a savefile (AR+SDO+AI r1050):
https://send.firefox.com/download/ed280a433c8dbc25/#g3C7AYjlfPuYfVXkdvo0hw
Looks like some AR jsd-related bug, some windows block grenade throwing while others not.
Since the bug can be reproduced in stock 1.13 7609 exe, it's not Ja2+AI related.

[Updated on: Sat, 01 June 2019 02:48]




Left this community.

Report message to a moderator

Lieutenant

Re: Experimental Project 7[message #357491 is a reply to message #357475] Mon, 03 June 2019 23:58 Go to previous messageGo to next message
crackwise is currently offline crackwise

 
Messages:113
Registered:April 2013
Thanks Sevenfm for the clarification!

I would like to bring up another issue, which I find rather annoying: enemy ambushes and how they occur! It don't know if it could be improved by the AI mod, but would like to point it out regardless:

Currently, when enemy ambushes occur our mercs are huddled together like cattle and enemy is very close, generally within pistol or at most within SMG range, totally surrounding the mercs. I find this quite unrealistic and it makes enemy ambushes very hard to survive without casualties, making having a scout in the team a complete necessity.

I would suggest the following remedies to have more gameplay variety and make ambushes actually a fun and challenging tactical situation:

- Mercs are not bunched together and have several (e.g. 4-5) tiles between each other.
- Enemy still starts having surrounded our mercs. However, their distance equals to vision range x some multiplier. The multiplier could depend for instance on the map type: urban 1.5, desert 1.7, jungle: 1.2 etc. to simulate a realistic ambush case.

[Updated on: Mon, 03 June 2019 23:58]

Report message to a moderator

Sergeant
Re: Experimental Project 7[message #357492 is a reply to message #357491] Tue, 04 June 2019 00:04 Go to previous messageGo to next message
Deleted.

 
Messages:2663
Registered:December 2012
Location: Russian Federation
@crackwise
I think improved ambushes feature from the trunk can solve most of the mentioned problems, and it was even implemented in Ja2+AI, unfortunately it causes bugs with bloodcat ambushes, so I had to disable it.

[Updated on: Tue, 04 June 2019 00:04]




Left this community.

Report message to a moderator

Lieutenant

Re: Experimental Project 7[message #357493 is a reply to message #357492] Tue, 04 June 2019 00:37 Go to previous messageGo to next message
crackwise is currently offline crackwise

 
Messages:113
Registered:April 2013
Wow, that is actually really cool! Sad to hear that it causes issues. However, would it be possible to disable bloodcat ambushes instead but keep the improved ambush feature? Bloodcat ambushes are much less fun and are quite tedious anyway. The improved enemy ambush, on the other hand, brings a new level of dimension to the game. Especially with the improved AI+ mod, it would be very interesting for sure.

It would actually be really neat to be able to choose that option in the ini file, i.e. to choose betwen default ambush or improved ambush (bloodcat ambush disabled) happy

Report message to a moderator

Sergeant
Re: Experimental Project 7[message #357494 is a reply to message #357493] Tue, 04 June 2019 04:05 Go to previous messageGo to next message
Deleted.

 
Messages:2663
Registered:December 2012
Location: Russian Federation
@crackwise
I tried to enable improved ambush code in r1067 for enemy team only, hope it works well.
This is simplified version of what is described in Flugente's thread - no ini options, no tactical placement etc.
Enemy soldiers are placed at distance between VISION_RANGE and VISION_RANGE * 1.5 from central spot, this should be more or less safe during day, and dangerous at night.
Mercs are distributed at distance no more than DAY_VISION_RANGE / 4 from central spot.



Left this community.

Report message to a moderator

Lieutenant

Re: Experimental Project 7[message #357498 is a reply to message #357494] Tue, 04 June 2019 17:10 Go to previous messageGo to next message
Deleted.

 
Messages:2663
Registered:December 2012
Location: Russian Federation
Ja2+AI demo r1068


https://youtu.be/xfkMaWKluEk

See how after first soldiers die, enemy hides in a building until some friends end their flanking and score successful hits, after that they all run out and rush attack.
NWSS: room, case falling, echo effects.
Reworked code for advancing/retreating when taking cover.
See new enemy names and their adjusted placement.

[Updated on: Tue, 04 June 2019 17:12]




Left this community.

Report message to a moderator

Lieutenant

Re: Experimental Project 7[message #357499 is a reply to message #357498] Wed, 05 June 2019 00:07 Go to previous messageGo to next message
crackwise is currently offline crackwise

 
Messages:113
Registered:April 2013
@Sevenfm: Thanks for the improved ambush feature, I will let you know once I test it.

Besides, really cool demonstration of the AI features! I really liked how they capitalized on the situation, was very impressive.

Regarding enemy trying to shoot through the wall, I find it quite good. The only thing is I notice in my games so far that the militia occasionally goes prone below a window and empties quite a portion of the magazine on the wall. Is this also related with the possibility of bullets going through? It would be ok if that was a wall type which could be penetrated by the calibre, but unfortunately most of the time it is not. Perhaps the soldier could check first whether his caliber can pierce the type of wall he is facing.

Report message to a moderator

Sergeant
Re: Experimental Project 7[message #357500 is a reply to message #357499] Wed, 05 June 2019 00:18 Go to previous messageGo to next message
Deleted.

 
Messages:2663
Registered:December 2012
Location: Russian Federation
crackwise wrote on Wed, 05 June 2019 02:07
Regarding enemy trying to shoot through the wall, I find it quite good. The only thing is I notice in my games so far that the militia occasionally goes prone below a window and empties quite a portion of the magazine on the wall. Is this also related with the possibility of bullets going through? It would be ok if that was a wall type which could be penetrated by the calibre, but unfortunately most of the time it is not. Perhaps the soldier could check first whether his caliber can pierce the type of wall he is facing.
Cannot say exactly what happens without a save before the shooting happens, it may be some AI bug or maybe they really think it's better to shoot through wall.
AI always checks CTGT (chance to get through) when deciding target and shooting stance, so it has direct influence on shooting decision. This may be reasonable when shooting for suppression through wooden wall with machinegun, but not when shooting through concrete wall with SMG.
I think I can add some modifiers for AI to prefer shooting with clear sight if possible in next versions.

Update: starting from r1070, CTGT is calculated separately for each stance, this should prevent prone shooting through concrete walls.

[Updated on: Wed, 05 June 2019 03:45]




Left this community.

Report message to a moderator

Lieutenant

Re: Experimental Project 7[message #357535 is a reply to message #357500] Thu, 13 June 2019 22:26 Go to previous messageGo to next message
crackwise is currently offline crackwise

 
Messages:113
Registered:April 2013
Hi Sevenfm, I have just updated my AI mod version (with AR+SDO) from r1076 to r1080. As of r1080 , I see that I need to double click to move my mercs.

Single click changes the movement cursor to red, and then I need an additional click at the same spot, in order my merc to move to that spot. Is this intentional or a bug? (I don't see anything like it described in the log.)

If it is a feature, I hope there will be an option to revert to default, since it is rather tedious.

Report message to a moderator

Sergeant
Re: Experimental Project 7[message #357536 is a reply to message #357535] Thu, 13 June 2019 22:36 Go to previous messageGo to next message
Deleted.

 
Messages:2663
Registered:December 2012
Location: Russian Federation
crackwise wrote on Fri, 14 June 2019 00:26
Hi Sevenfm, I have just updated my AI mod version (with AR+SDO) from r1076 to r1080. As of r1080 , I see that I need to double click to move my mercs.

Single click changes the movement cursor to red, and then I need an additional click at the same spot, in order my merc to move to that spot. Is this intentional or a bug? (I don't see anything like it described in the log.)

If it is a feature, I hope there will be an option to revert to default, since it is rather tedious.
It looks like you turned on "realtime movement confirmation" option.
I just checked realtime movement in the game, and it works the same way in Ja2+AI, Ja2.exe r7609 and vanilla 1.12



Left this community.

Report message to a moderator

Lieutenant

Re: Experimental Project 7[message #357537 is a reply to message #357536] Thu, 13 June 2019 23:14 Go to previous messageGo to next message
crackwise is currently offline crackwise

 
Messages:113
Registered:April 2013
@Sevenfm, thanks for the info! Pardon my noobish mistake.

Again AR + SDO + AI r1080: I have just noticed a strange bug. When targeting at head, instead of head, legs appear on the reticule. See screenshot below. This happens only when targeting the soldier on the left-hand-side.
https://imgur.com/a/sItF0zA

Here is the save file:
https://send.firefox.com/download/cb334fed0029516d/#kOYxEDniQVAuUr2KXhGnBA

Report message to a moderator

Sergeant
Re: Experimental Project 7[message #357538 is a reply to message #357537] Thu, 13 June 2019 23:22 Go to previous messageGo to previous message
crackwise is currently offline crackwise

 
Messages:113
Registered:April 2013
Another bug/source of AI deadlock: soldiers/militia healing themselves. You can see it if you progress the savegame I have posted above one round, some militia try to heal themselves, which then results in AI deadlock.

This has problem been around for some time now (maybe since r900s), but I just had the chance to capture it on a save file.

Report message to a moderator

Sergeant
Previous Topic: Trunk AI and improvements
Next Topic: New Attachment System Beta
Goto Forum:
  


Current Time: Fri Mar 29 07:00:04 GMT+2 2024

Total time taken to generate the page: 0.04824 seconds