This is the thread for my contributions to the main trunk.
r8721/2502
New option AI_TACTICAL_RETREAT (false by default) controls tactical enemy retreat from battle (keep this option "false" if you don't like single enemy soldiers fleeing to another sector and then sitting there forever).
Moved options AI_YELLOW_FLANKING, AI_EXTRA_SUPPRESSION, AI_NEW_MORALE and AI_BETTER_COVER to [Tactical AI Settings]
AI_EXTRA_SUPPRESSION and AI_NEW_MORALE are now enabled by default.
AI_NEW_MORALE:
- zombies always have high morale (they are stupid and should always attack)
- always low morale when soldier is blinded (to try to retreat to safe position until the blindness counter ends)
- neutrals always have low morale even if they have guns, so they don't run into the heat of battle
- prevent hopeless morale when not under attack (so if you attack soldier with bad morale, he will retreat for 2 turns and then stop)
UpdateAniTiles: also check EXPLOSV_CREATUREGAS (from merc05's fixes)
To download r8721 for the trunk, follow the Trunk link in the sig.
New option AUTO_HIDE_PB (enabled by default) enables auto hiding of the progress bar when mouse cursor is on the top map row.
Also, AI soldiers will now avoid staying at top map row.
r8725
Lua: initialize return values to prevent returning garbage if soldier is not found.
Improved r8104 fix to allow Fatima quest (civilians and NPCs with profile can go off screen).
Play grenade pin sound (supports custom sound with <sSound> tag in Weapons.xml)
Help AI associate noise with enemy presence:
- melee attack noise type changed to NOISE_BULLET_IMPACT
- HTH attack noise type changed to NOISE_BULLET_IMPACT
- grenade pin noise type changed to NOISE_GRENADE_IMPACT
- launcher attack noise type changed to NOISE_GUNFIRE
New background property: <animal_friend> will refuse to attack animals, unless attacked by that animal.
New background property: <civgroup_loyal> will refuse to attack neutral members of the same civilian group.
New option AI_MOVEMENT_MODE enables AI movement mode tweaks:
- zombies always run if they know enemy location
- when deciding cautious movement, use swatting if soldier is already crouched/prone
- use walking mode if no enemy known
- use swatting when blinded
- use running when in light at night (moving slowly in light at night is dangerous)
- use swatting for seeking at night or when soldier is already crouched (try to sneak)
- use swatting for taking cover when under fire
- use swatting for moving under fire (suppress enemy to slow him down)
- use swatting when in a room and seen enemy recently or under fire (better hide behind windows)
- use swatting for snipers on roof or when under fire (less expose snipers to enemy fire)
- use running for taking cover when not under attack (moving as fast as possible is important in combat)
- use swatting/walking when getting closer with raised weapon (to not lower weapon while moving)
- use walking/swatting when flanking in realtime (sneaking in realtime, save energy when low on breath)
Added more restrictions for AI when using grenades:
- blinded soldier can only attack recently seen/heard opponents (he cannot target enemies someone else sees)
- limit explosives type when attacking zombies (tear gas and flashbang will not work probably)
- limit smoke grenade use (don't smoke opponent if he is cowering, has no gun, has high shock or low marksmanship)
- limit explosives type when attacking robots, vehicles and tanks (stun grenades etc will not work probably)
- don't use grenades against dying enemies (except zombies)
- limit explosives type when attacking collapsed enemies (if opponent is already on the floor and unconscious, there's no reason to use stun or flashbang on him)
- don't use flare if soldier is in light already
- don't use flares against opponents on roof (light doesn't work on roof)
r8737/2510
Fixed bug in experimental AI path tweaks.
Added new option AI_PATH_TWEAKS which controls various experimental path tweaks for AI: avoid gas, deep water, light at night.
Added experimental path tweak: AI tanks prefer moving in straight directions to avoid sliding effect.
Set default value for options AI_EXTRA_SUPPRESSION, AI_NEW_MORALE, AI_BETTER_COVER, AI_MOVEMENT_MODE to TRUE.
AI:
- before deciding anything, stop cowering animation (to avoid possible problems with executing action)
- before deciding anything, stop giving aid animation (to avoid possible problems with executing action)
- before deciding to raise weapon, check if weapon can be raised (to avoid possible AI loop and other problems)
- simplified scope check (IsScoped can be used instead of NCTHIsScoped without additional check)
- removed duplicate code in Red AI (civilian cowering code was duplicated with the only difference in boxing state check which can be removed)
Added missing actions to gzActionStr[] (fix possible out of bounds array access which could return garbage when printing debug messages).
Fixed OKLIFE checks (bLife should be checked for >= OKLIFE).
New options in Taunts_Settings.INI: TAUNT_VOICE (FALSE by default): if true, will play sound file instead of showing text. TAUNT_VOICE_SHOW_INFO (FALSE by default): if true, will show debug info when playing voice taunt.
The game will play sound file instead of showing text message, when TAUNT_VOICE option is enabled in Taunts_Settings.INI
Sound file type is determined by taunt type (see enemy, got hit, under attack etc), regular Data\EnemyTaunts\*.xml files are not used.
Voice taunts can be played for enemy team, militia team and civilians which have civilian group, so the folder structure looks like this:
Data\VoiceTaunts\Army\
Data\VoiceTaunts\Militia\
Data\VoiceTaunts\CivgroupX\, where X is number of civilian group in CivGroupNames.xml, for example Civgroup2 for Kingpin men.
The game uses separate taunts for male and female, so the folder structure looks like this:
Data\VoiceTaunts\Army\Male
Data\VoiceTaunts\Army\Female
There can be up to 100 possible voices for each group/gender, which are assigned to soldier based on his id, so a soldier will always use the same voice in the battle:
Data\VoiceTaunts\Army\Male\01
Data\VoiceTaunts\Army\Male\02
Data\VoiceTaunts\Army\Male\03
...
Note that there can be no gaps between numbers, so if you want 3 variants of army male voices, you need to supply them in order: Army\Male\01, Army\Male\02, Army\Male\03
Also important note: since there is no way to determine if folder exists when using VFS system, the game checks for existence of ALERT.ogg file, so for the game to use voice, it should be in the voice folder (the file can be dummy empty file, but it should exist), for example, the game will recognize all 3 voices for male army soldier, if the following files exist:
Data\VoiceTaunts\Army\Male\01\ALERT.ogg
Data\VoiceTaunts\Army\Male\02\ALERT.ogg
Data\VoiceTaunts\Army\Male\03\ALERT.ogg
You can also make additional variants of taunts by adding number after the main name, for example:
THROW_GRENADE.ogg
THROW_GRENADE 1.ogg
THROW_GRENADE 2.ogg
In this case the game will randomly choose from THROW_GRENADE.ogg, THROW_GRENADE 1.ogg and THROW_GRENADE 2.ogg and play sound.
Note that there can be no gaps between numbers, so if you want 3 additional variants, you need to add THROW_GRENADE 1.ogg, THROW_GRENADE 2.ogg and THROW_GRENADE 3.ogg
Demo video:
Note: this video was recorded with TAUNT_MAKE_NOISE = FALSE and high values for all taunt chances, in regular game with default settings there will be much less voice taunts heard.
You can download voice files used in the demo video from my google drive in Data\VoiceTaunts.7z, there is also Template folder which lists all possible voice file names.
This example uses voices from Vengeance:Reloaded, originally these were voices from Arma mods, later modified by VR team.
"Voice Taunts update: changed civgroup name format, to allow using civgroups with 3 digits numbers."
Has this an effect on used number of digits for existing civgroups? Like in, will civgroup 67 need to be renamed to 067 to be known by game?
Do I have to change existing digits (...098,099) or will this just allow me to use more then 100 civgroups (...,98,99,100,101,...) ?
Quote:
Voice taunts can be played for enemy team, militia team and civilians which have civilian group, so the folder structure looks like this:
Data\VoiceTaunts\Army\
Data\VoiceTaunts\Militia\
Data\VoiceTaunts\CivgroupX
I haven't found the Folder Data\VoiceTaunts in GameDir 2513. So I understand that I either use the download you mentioned (which contains the file-structure),additionaly,
or have to create them myself to make use of this feature. Is this correct, or did I mess up my svn?
Does TAUNT_VOLUME in tauntsettings.ini also effect the volume of voice-taints?
--------------
It most likely is completly unrelated, but I lack the knowledge so I better ask:
(out of overhead.lua and strateticmap.lua)
" -- We have an array of 1000 signed integers that a modder can use to set whatever data he wants.
-- We simply set up some enums here to make it easier for us to remember what is what
ModSpecificFacts = "
I used that a lot and now I'm worrying, if the "array bonds" in the quote might be affect the array
for ModSpecificFacts as well? Kinda doubt it will, but the woorywart in me insists on asking.
------------
Quote:
Added new options:
ENABLE_TA enables fire ambient sound
VOLUME_TA controls fire ambient sound volume
When I've seen this, I couldn't help to ask myself if there is a slim hope that SSA might also be included in trunk?
Do I have to add the fire.ogg into Data\Ambient (like I understand it is in Experimental Project) to make this working or isn't this nescessary
for the trunk-version?
-----------
Thanks a lot for adding your cool stuff to the trunk.
"Voice Taunts update: changed civgroup name format, to allow using civgroups with 3 digits numbers."
Has this an effect on used number of digits for existing civgroups? Like in, will civgroup 67 need to be renamed to 067 to be known by game?
Do I have to change existing digits (...098,099) or will this just allow me to use more then 100 civgroups (...,98,99,100,101,...) ?
Previously it was like 01, 02, .. 99, now it's like 1, 2, .. 255. Also see the example voicepack.
Quote:
Voice taunts can be played for enemy team, militia team and civilians which have civilian group, so the folder structure looks like this:
Data\VoiceTaunts\Army\
Data\VoiceTaunts\Militia\
Data\VoiceTaunts\CivgroupX
I haven't found the Folder Data\VoiceTaunts in GameDir 2513. So I understand that I either use the download you mentioned (which contains the file-structure),additionaly,
or have to create them myself to make use of this feature. Is this correct?
Yes, you need to use test voice pack from google drive or make your own. This feature is mostly for modders who want to make their own voice packs, not for use with stock 1.13 (though it's possible).
Quote:
It most likely is completly unrelated, but I lack the knowledge so I better ask:
(out of overhead.lua and strateticmap.lua)
" -- We have an array of 1000 signed integers that a modder can use to set whatever data he wants.
-- We simply set up some enums here to make it easier for us to remember what is what
ModSpecificFacts = "
I used that a lot and now I'm worrying, if the "array bonds" in the quote might be affect the array
for ModSpecificFacts as well? Kinda doubt it will, but the woorywart in me insists on asking.
It is competely unrelated to that fix.
Quote:
Added new options:
ENABLE_TA enables fire ambient sound
VOLUME_TA controls fire ambient sound volume
When I've seen this, I couldn't help to ask myself if there is a slim hope that SSA might also be included in trunk?
New options to control Sector Steady Ambients: ENABLE_SSA (default FALSE) VOLUME_SSA (default 50) DEBUG_SSA (default FALSE)
New feature: Sector Steady Ambients
To use new sector ambients, enable option ENABLE_SSA.
By default volume VOLUME_SSA is set to 50, you can increase it to 127 if you wish.
Option DEBUG_SSA will show some useful information on screen when starting new ambient, this should help in some situations.
How it works:
SSA is an ambient sound that plays constantly in a loop in the background, mostly consists of nature sounds like wind, birds, insects and such, but also can be used for town/underground ambients, or you can even define a soundtrack for each sector if you wish.
There can be no more than 10 sounds of each type currently (10 for every sector or for every town).
This can be used together with music as it works completely independent.
The system to select current sound is flexible and based on file names, so you don't need any XMLs or other data to make it work.
First, the game will search a file with a specific sector name, for example, A1_DAY_1.ogg .. A1_DAY_10.ogg (only ogg files are supported as wav's are too big).
This means sector A1, day time, and you can provide any number of sounds from 1 to 10, but numbers should be in continuous order, so there should be 1,2,3 for example but not 1, 5, 7.
You need to set a DAY or NIGHT for all sectors above the ground, but not for underground sectors.
For underground sectors, the name will have U2..U4 added to sector name and no DAY/NIGHT keyword, so it will look like:
A1U2_1.ogg, A1U4_1.ogg etc...
U2 is the first undergound level and U4 is the deepest underground level.
So the game will find all sounds for loaded sector, chose a random one from them and play it in a loop as long as you stay in tactical screen.
Random number is not really random but depends on time (current hour) of day, so if you unload sector, wait for next hour and load it again, you will hear different (next number) sound.
Second, if the game was unable to load a sound for specific sector, it will check if current sector is a town (only above the ground), and search for a file with a town name, for example, OMERTA_DAY_1.ogg .. OMERTA_DAY_10.ogg
Finally, if the sound is not found yet, the game will try to make some generic name for a sector type, based on <Here> movement type in MovementCosts.xml, using the following rule:
TOWN: Town
SAND, SAND_ROAD: Desert
FARMLAND, FARMLAND_ROAD: Farmland
PLAINS, PLAINS_ROAD, ROAD: Plains
HILLS, HILLS_ROAD: Hills
SPARSE, SPARSE_ROAD, DENSE, DENSE_ROAD: Forest
TROPICS, TROPICS_ROAD: Tropical
WATER: Water
NS_RIVER, EW_RIVER: River
COASTAL, COASTAL_ROAD: Coastal
So the name will look like: DESERT_DAY_1.ogg .. DESERT_DAY_10.ogg
For towns, generic name will always be TOWN.
For mines, generic name will always be MINE or EMPTYMINE, and day status for mines should not be added.
Note: all file names in Windows are not case sensitive, so you can use names like EmptyMine or emptymine or EMPTYMINE.
Note: put all sector steady ambient sounds into the Data\Ambient\SSA folder.
Demo video:
This video uses demo ambient sounds, you can download them from my google drive, Data\Ambient.7z
... 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. ...
]
Still true. I guess I better find some time for Audacity soon Thank you so much for putting this ability into trunk !
Messages:2433
Registered:October 2005 Location: Australia
Kitty wrote on Sun, 09 February 2020 07:36
Kitty wrote on Sun, 10 March 2019 19:26
... 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. ...
]
Still true. I guess I better find some time for Audacity soon Thank you so much for putting this ability into trunk !
Gimme a shout if you need any sound effects files, I had plenty in the wings for Vengeance, but this feature never made it. I also have a backlog of files collected up over the years, though some might yet make it into 'Tuscany'.
New option ADD_LIGHT_AFTER_EXPLOSION (TRUE) - create light effect for fire and signal smoke effects.
Light effect is created only at night or underground, light duration is limited to smoke duration.
Also improved code to create smoke after explosion (option ADD_SMOKE_AFTER_EXPLOSION).
NewSmokeEffect() now accepts new parameters:
- ubDuration sets custom effect duration
- ubRadius sets custom effect radius
- ubGeneration allows creating smoke effect with defined generation (can be used to limit fire spreading)
NewSmokeEffect() now accepts new parameters:
- ubDuration sets custom effect duration
- ubRadius sets custom effect radius
- ubGeneration allows creating smoke effect with defined generation (can be used to limit fire spreading)
Will this be new tags for xml (explosives.xml?) for creating a custom effect?
Quote:
(can be used to limit fire spreading)
I wasn't aware that spreading fire is allready in trunk, cool.
I play JA2_8741 with AIMNAS. No AI solder moves during real-time, they just stand still. After forcing turn mode they start to move. I have a save but where to download it? Also I cam make a picture, but the forum doesn't allow pictures nowadays.
I play JA2_8741 with AIMNAS. No AI solder moves during real-time, they just stand still. After forcing turn mode they start to move. I have a save but where to download it? Also I cam make a picture, but the forum doesn't allow pictures nowadays.
I will check it, thank you.
Also you can try to update exe to actual version, maybe it will help.
I`ve tried Ja2_r8748.exe nothing has changed. Maybe it is something wrong with my end?
Try earlier builds, you can find them on my google drive in Archive folder, starting from ja2_r8130.exe
If you find last build that works well, it will make fixing easier.
Also, is the enemy alerted or in green mode?
You can upload save to dropbox or google drive, anything you have.
Did not have much time but I`ve noticed while testing Ja2_r8748.exe that at least a few weapons` attachments are gone after loading a save made previously with Ja2_r8741.exe.
For example CAWS no longer has slots for rod&spring, rifle sling and trigger group.