Commit Graph
111 Commits
Author SHA1 Message Date
Sevenfm 1455409057 AI:
- before deciding anything, stop cowering animation
- before deciding anything, stop giving aid animation
- before deciding to raise weapon, check if weapon can be raised
- simplified scope check
- removed duplicate code in Red AI

Added missing actions to gzActionStr[].
Fixed OKLIFE checks.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8740 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-01-25 19:02:53 +00:00
Flugente 80674249cc New feature: bloodcat/zombie/bandit raids on player-controlled sectors
For more info, see http://thepit.ja-galaxy-forum.com/index.php?t=msg&th=23711&goto=353154&#msg_353154

Requires GameDir >= r2420

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8554 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2018-04-15 14:42:01 +00:00
Flugente f8e1fd1e74 Fix: zombies do not move due to low morale
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8552 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2018-04-14 18:34:49 +00:00
Sevenfm e9a1f4b352 New feature: delayed grenade explosions:
- use transformation menu to change explosion mode
- only Normal/Stun/Flashbang type grenades can be delayed
- AI soldiers will avoid staying close to armed grenades\explosives
- use option DELAYED_GRENADE_EXPLOSION to make all hand\GL grenades work as delayed
- new value AP_GRENADE_MODE = 4 in APBPConstants.ini
- new item flag DELAYED_GRENADE_EXPLOSION

Other changes:
- fixed call to sqrt in DrawExplosionWarning() that prevented compiling in VS2010
- correctly update interface after transformations
- PATHAI: AI soldiers will skip gassed tiles if not in gas already
- InGas check: AI soldiers will avoid mustard gas even when wearing gas mask
- Yellow AI: added check to avoid gas/water/bomb using FindNearestUngassedLand
- gas/flare grenades will always explode instantly even when in bad state
- LegalNPCDestination: locations near armed bombs are not legal
- FindBestNearbyCover: avoid locations near armed bombs

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8324 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2016-10-18 12:39:06 +00:00
silversurfer 196a1eb84d AI and tactics improvements (by Sevenfm):
New options:
 AI_YELLOW_FLANKING - yellow flanking is disabled by default
 IMPROVED_TACTICAL_UI - use name color to show soldier's status (disguised, drunk)

Removed obsolete options:
 SHOW_COVER_INDICATOR
 SHOW_ENEMY_RANK_ICON
 SHOW_ENEMY_AWARENESS

Fixes and improvements:
 - collapsed enemies should not taunt
 - if soldier is unconscious, he can't see anything or anybody
 - ClosestReachableDisturbance - performance improvement
 - allow InternalGoAsFarAsPossibleTowards to jump over fences

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8226 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2016-05-20 18:25:33 +00:00
Flugente 284910e2d5 Changes to covert operations feature (by sevenfm): If the new skill setting COVERT_STRIPIFUNCOVERED is FALSE,
- we can only disguise successfully if we haven't been seen recently (last 3 turns)
- disabled automatic clothes stripping when uncovered
- redisguise automatically if spy haven't been seen by enemy recently and wears correct clothes

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8210 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2016-05-12 22:27:54 +00:00
Flugente 7bf2943849 If a tank just took a heavy hit, but cannot see an enemy to fire upon, it can detonate a smoke grenade on itself to hide.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8127 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2016-03-26 23:16:41 +00:00
Flugente 33ab9c5e82 There are now separate functions for armed vehicles.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8126 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2016-03-26 21:52:49 +00:00
Flugente dba9e3eb88 AI update (by sevenfm):
- removed AI_EXTRA_FLANKING option
- LocationToLocationLineOfSightTest allows to check sight with specified height
- IsActionAffordable allows to specify action to check without faking it
- ClosestReachableDisturbance: correctly calculate path to each disturbance, added safety checks, update for noise checks
- CalcMoraleNew: update
- CalcBestShot: allow shooting at empty vehicles, but they have low priority
- allow AI to fire at dying opponents to avoid AI decision problems
- CheckIfShotPossible: allow any soldier with long range weapon to shoot in RED state (if he can hit)
- Flanking update
- WATCH decision update
- removed distance check for HELP decision to allow vanilla behavior, don't help if seen enemy recently or under fire
- suppression fire update
- pick up item decision: check that location is safe

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8125 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2016-03-26 13:41:54 +00:00
Flugente 9e97538d89 New feature: enemy combat jeeps fill the role between infantry and tanks. For more info, see http://thepit.ja-galaxy-forum.com/index.php?t=msg&goto=344628&#msg_344628
This is savegame compatible. GameDir >= r2305 required.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8114 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2016-03-20 18:45:51 +00:00
Wanne 23d4051473 Fixed problems with enemy rooftop climbing (by sevenfm)
- Also updated "Water", "DeepWater" and "WaterTooDeepForAttacks" methods: Added bLevel parameter (by sevenfm)
- see: http://thepit.ja-galaxy-forum.com/index.php?t=msg&th=22966&start=0&

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8110 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2016-03-15 12:40:54 +00:00
Flugente d1e1759aa2 Removed ENABLE_ZOMBIES-define
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8047 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2016-01-31 17:54:51 +00:00
silversurfer dcf8b3abaf AI improvements (by Sevenfm):
Bugfixes:
- Fix: Watched Locations system (never worked in 1.13)
- Fix: LineOfSight test with NO_DISTANCE_LIMIT (stopped on trees previously)

AI/tactical improvements:
- EstimateThrowDamage additionally calculates damage from fragments (important for AI to use frag grenades with low main damage and many fragments)
- EstimateThrowDamage correctly adds IndoorModifier
- Additional checks for RED suppression (check that the soldier will not shoot his friends, check that he has extra clip to reload weapon, check that target is not cowering, don't suppress when flanking)
- ClosestReachableDisturbance will use general noise only if cannot find any enemy
- Allow RED seeking in prone stance if we haven't seen enemy for several turns

Flanking improvements:
- allow YELLOW flanking for CLOSEPATROL at night
- better YELLOW/RED flanking start/stop conditions
- better RED AI behavior when finished flanking (try to reach flanking spot)
- allow RED flanking for CLOSEPATROL soldiers when at night, overcrowded or no other flanking soldiers yet

Optional AI improvements:
AI_EXTRA_SUPPRESSION
- AI will use suppression fire more often in RED state (set minimum AI CTH to 1)

AI_NEW_MORALE
- Better dynamic morale calculation depending on tactical situation.
- Additional min/max limits for AI morale
- Disabled HOPELESS morale for soldiers without guns (they can pick up weapon or attack with hands sometimes)

AI_BETTER_COVER
- Additional checks for line of sight, fresh corpses and overcrowded locations

AI_EXTRA_FLANKING
- Allow flanking for BRAVEAID/BRAVESOLO

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8006 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2015-12-19 14:22:47 +00:00
silversurfer 1e54f492ff AI flanking improvement by Sevenfm:
Improved AI RED/YELLOW flanking:
 - better direction calculation (use direction arrays)
 - increased search range 4->8
 - removed incorrectly calculated AP limit (use CalcActionPoints instead)
 - additional direction for flank spot searching
 - prefer desired direction
 - penalize tiles with no cover from noise location
 - penalize tiles too far from noise location
 - don't go into deep water for flanking
 - skip water tiles (can flank over water tiles only if can cross them in one turn)
 - min/max flanking range depends on time of day and base sight range
 - skip buildings when searching for flank spot if not in building already, because soldiers often run into buildings and stop flanking
 - use RUNNING movement mode for flanking instead of default SWATTING
 - only CUNNINGSOLO and CUNNINGAID soldiers flank
 - don't start flanking when no friends between soldier and noise gridno (in 3 directions)
 - stop flanking when no friends between soldier and noise gridno (in 3 directions)
 - stop flanking and reset flank counter in BLACK state
 - avoid map edges when flanking
 - disable flanking for soldiers with limited roaming range (STATIONARY/ONGUARD/CLOSEPATROL/SNIPER)

 In general, AI flanking is much more effective now (it never fully worked previously, especially in turnbased).

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8003 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2015-11-17 19:19:22 +00:00
Flugente 7dbff83e24 - Fix: VS2010 debug build issue with reading in StructureConstruct.xml
- replaced a few hardcoded values with enums
- use TANK(...) macro instead of checking for bodytype by hand

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7959 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2015-08-05 19:01:11 +00:00
Flugente b2217eaab9 Deleted Feature: The poison feature has been made obsolete by the disease feature and has been removed.
GameDir >= r2245 is recommended.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7870 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2015-05-20 20:39:51 +00:00
Flugente 36e9d15edc New feature: Diseaes affect your mercenaries. They can be contracted in varíous ways and have varying effects.
For more info, see http://www.ja-galaxy-forum.com/ubbthreads.php/topics/334918#Post334918

Requires GameDir >= r2099.

Does not break savegame compatibility.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7384 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2014-08-10 13:45:11 +00:00
Wanne 981c81b4b4 Moving Tanks Feature (by anv)
- feature: tanks can move around in tactical. Set with Tactical Gameplay Settings > ENEMY_TANKS_CAN_MOVE.
- feature: tanks can ignore chance to get through and destroy enemy cover even if it probably won't hit anyone behind it. Set with Tactical Gameplay Settings > ENEMY_TANKS_BLOW_OBSTACLES_UP.
- feature: tanks can use cannon even against single mercs and in perfect health. Set with Tactical Gameplay Settings > ENEMY_TANKS_DONT_SPARE_SHELLS.
- feature: tanks can noticed as soon as any part of it is visible. Set with Tactical Gameplay Settings > ENEMY_TANKS_ANY_PART_VISIBLE.
- feature: depending on game difficulty enemy patrols at game start can be randomly reinforced with tank. Set with Strategic Gameplay Settings > ARMY_USES_TANKS_IN_PATROLS.
- feature: depending on game difficulty enemy groups created during offensives can include tanks. Set with trategic Gameplay Settings > ARMY_USES_TANKS_IN_ATTACKS.
- feature: mercs in vehicles automatically rest their guns,
- fix: guns can be rested on vehicles,
- rewritten code to allow putting enemies inside vehicles,
- added missing descriptions for all vehicle options to INIEditorJA2Options.xml.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7277 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2014-06-18 18:10:07 +00:00
Wanne fa29d9be26 Merged from revision: 7258
- Translated russian source code comments (by Sevenfm)

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7259 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2014-06-03 18:13:23 +00:00
Flugente 8abbd3c053 Fix: boxer never got out of boxing ring, leading to an endless clock
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7222 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2014-05-19 21:14:58 +00:00
Flugente 6edf7dd079 - New Feature: Enemy Generals are unique enemies whose location randomized and unknwon to the player. As long as they are alive, the enemy gets signifiant strategic boni. The player must learn of their location and take take them out, preferrably without alerting them prior.
- Covert Ops: Bleeding is deemed suspicious only if COVERT_DETECTEDIFBLEEDING is set to TRUE.
- renamed special prisoners to officers. 
- lowered the priority of enemy troops becoming medics
- prisoners in player-controlled prisons now use the prioner-colour scheme used by Shank and Dynamo


Requires GameDir >= r2028.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7179 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2014-05-01 13:28:33 +00:00
Flugente 30060f0595 Merged revision(s) 7166-7177 from branches/ja2_source_official_2014:
- Flagmasks are unsigned, and should be called and treated as such
- Fix: experience gain from interrogation was too high
- Fix: chance of a prisoner becoming militia was calculated wrong
- default weight maximum for MOVE ITEM assignment increased from 30 to 40 kg
- Fix: snitches report the same event multiple times
- Fix: snitches treat vehicles as persons
- Fix: selection of launchables is inefficient, an does not take into account wether items are depending on day/night cycle
- new key combination: in strategic, pressing [CTRL] + [E] wile both a merc's inventory and the sector inventory are open will fill the merc's inventory with sector items
- trivial code cleanup
- if prisoners are taken in a sector that houses a prison, that prison can also be selected to house them
- Fix: distributing newly taken prisoners in a prison sector no longer redistributes all prisoners, only the new ones
- GetClosestFlaggedSoldierID can also be called without evaluation of sight
- Fix: Covert Ops: throwing/lobbing items or shooting rockets is deemed suspicious behaviour
- Fix: boxing was broken by loading a savegame
- Fix: campaign history rarely recorded kills in autoresolve
- There is no reason why the IDs that boxers are reset to before they are reinitialised would ever need to be altered by a modder. Required script change in stable GameDir r2024.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7178 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2014-04-30 21:36:18 +00:00
Flugente e1b581e466 Enemy roles improvement:
- lowered ENEMYROLES_TURNSTOUNCOVER
- increased ENEMY_MEDICS_SEARCHRADIUS
- new option: ENEMY_MEDICS_WOUND_MINAMOUNT controls how serious a wound must be before a medic considers it worthy of attention
- new option: ENEMY_MEDICS_HEAL_SELF: medics can heal themselves
- new option: ENEMY_OFFICERS_SURRENDERSTRENGTHBONUS adds a team surrender strength bonus for officers
- tanks cannot become medics, and can't be treated by them either
- Menubutton for Role symbol toggle is red if off and green if on
- wounded soldiers seek medics, max range is ENEMY_MEDICS_SEARCHRADIUS / 2
- direct sight line between medic and target is no longer required

- if hostile civilians allied to the army are in sector, their surrender strength is added to the enemy team

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7080 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2014-03-17 21:27:19 +00:00
Flugente 2e773a029d - New Feature: enemies roles allows the AI to use medics and officers, and the player can now identify high-value targets among the enemy.
Requires GameDir >= r1987.

- If an enemy is spawned with a radio set, he is more likely to become a radio operator.
- It is now possible to mount a gun on prone allies if you are facing them on the right angle.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7072 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2014-03-16 18:24:40 +00:00
Flugente 12d45fcfa2 Merged revision(s) 7024 from branches/ja2_source_official_2014:
- If a merc repairs up to a threshold below 100, display a slightly different message
- Due to radio operator jamming, AI red alert can fail (intentional part of the trait). In that case, forbid the soldier from using radio again this turn, as this would be a fruitless waste of APs.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7025 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2014-03-04 22:20:32 +00:00
Flugente a7522989ab deleted unnecessary code duplication: several NCTH-related functions have been unified an now take scope modes into account
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6692 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-12-17 20:18:44 +00:00
silversurfer 5878355d61 This revision requires GameDir 1873 to work because of a new icon in ItemInfoAdvancedIcons.sti!!!
- Weapons.xml tags <bRecoilX> and <bRecoilY> are now FLOAT type values. This allows to differentiate weapons by smaller steps.
- Items.xml tags <RecoilModifierX> and <RecoilModifierY> are now FLOAT types as well.
- Items.xml tag <PercentRecoilModifier> will now be displayed in UDB advanced tab.
- Item_Settings.ini has new modifiers for gun type specific <bRecoilX> and <bRecoilY>. This allows modders to quickly adjust recoil values for any gun type.
- fixed UDB description for <RecoilModifierX> and <RecoilModifierY>
- All recoil calculations now use FLOAT values for more precision.


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6613 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-11-16 16:55:32 +00:00
Flugente f17829fac9 New feature: radio operator trait allows calling in artillery, requesting reinforcements, scanning for enemies and a few other skills.
Also includes mechansim for easy implementation of new skills.

For more info see http://www.bears-pit.com/board/ubbthreads.php/topics/327348.html#Post327348

Requires GameDir >= r1848.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6547 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-10-30 23:05:37 +00:00
silversurfer 3346fddf09 - New behaviour for gas grenades:
Gas grenades now don't cause direct damage on hit anymore. They will cause damage on start of turn or if you move inside a gas cloud. Of course gas mask still helps (except for creature gas and fire).
Every tile moved inside a gas cloud deals a percentage of the normal damage (default 10%). This is set in Item_Settings.ini (DAMAGE_HEALTH_MOVE_EXPLOSIVE_MODIFIER, DAMAGE_BREATH_MOVE_EXPLOSIVE_MODIFIER).
Tiles can now have multiple gas effects on them. Unfortunately this is not visualized (yet).
Smoke doesn't make a character immune to other gas types anymore.
The 25% chance of taking damage while moving through a gas cloud has been removed. Damage is now applied 100% of the time.

- New modifiers for explosive damage in Item_Settings.ini (DAMAGE_HEALTH_EXPLOSIVE_MODIFIER, DAMAGE_BREATH_EXPLOSIVE_MODIFIER). These could fully replace EXPLOSIVES_DAMAGE_MODIFIER in Ja2_Options.ini but I left that general modifier untouched for now.

- Some compiler warning fixes.


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6517 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-10-21 07:13:15 +00:00
Wanne 73be285e09 Fixes (by Moa)
-SGP debugging now works again (corrected some typos and one missing include).
-Memmory debugging works again (wrong types corrected)
-Laptop screen heigth macro and all references is now usable. (was 'C: y + A' 'D: B - C' which translates to 'D: B - y + A' instead of 'D: B - y - A')
-Laptop screens do not need to rerender as often then before as the laptop screen width/heigth macros works now and invalidating screen will do the trick -> almost no render calls neccessary.
-MercProfile.ubMiscFlag was used instead of .ubMiscFlag2 -> enter sector action schedule for soldiers which dont need to be insertered is now canceled as intended

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6509 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-10-19 12:47:53 +00:00
Kriplo 569eba300a - small change to ch58 for change facing, so now will first try to turn to last target if exist then to closest enemy.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6404 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-09-15 18:45:45 +00:00
Kriplo d24b54cb5a Brief: //dnl ch69
- Add alternative fix for CalcBestShot which should remove existing APs problems maybe even create AI deadlier then ever ;-)
Details:
- Existing CalcBestShot simply became inadequate and buggier for so many add ons to game, so compiling with dnlCALCBESTSHOT is alternative option which calculate all turning, stance and raising gun cost for different stances and all available scopes, and after all hoping fix incorrect APs calculation as well, hitrate formula is adapt to 100AP system, also try to optimize a bit to get less AICalcChanceToHitGun calls and to use with different stance decisions.
- From ch58 aiming for burst and autofire was disabled as was causing invalid action handle due to incorrect APs calculation so from now aiming AI also use aiming before bursting.


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6403 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-09-15 15:59:51 +00:00
Kriplo f68f6131b9 Brief: //dnl ch64
- Fixing Tank bursting shells problem, and some other tank related bugs.
Details:
- There are several problem with Tank handling, main was forcing to use gun although already decide to use machinegun which lead to bursting shells.
- Another one was related to machinegun usage as current autofire handling is not supported by TANK BURST animation which had limit to 6 rounds, so decision to fire anything different then 6 lead to complete wrong APs deduction.
- Fix some invalid animation decision as current tank cannot raise gun or move or check for cover.
- Fix problem with wrong return (INT8) although after introduction of 100AP system APs variables are INT16 which create bad APs calculation for tank.
- Fix general problem with burst and autofire when soldier decide to when swap weapons.


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6340 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-08-31 10:22:25 +00:00
Kriplo 571a2940e6 Brief: //dnl ch63
- Fixing AI problems when they use launchers.
Details:
- Seems from implementation of 100AP system and new attachment system and new kind of GL launchers, AI use them improperly or not used at all. Bugs was:
- Bursting grenades from non burst launcher.
- Not use GL if grenade is already in it
- Not firing from rocket launcher if couldn't find hand grenade.
- Refusing to launch grenade from attached GL if couldn't find grenade in other pockets.
- Never fire from single rocket launchers like LAW.
- Incorrect chance to throw calculation for GLs which lead into no decision to throw.
- Whole cylinder of grenades was permanently remove from pocket after reloading launcher.


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6321 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-08-25 20:30:46 +00:00
Kriplo f06df7741f Brief: //dnl ch61
- Basic support for reducing AI friendly fire.
Details:
- Friendly fire grids are defined during best shot calculation then AI decide depending of soldier character to fire or take other action. Still in autofire accidentally friendly hits could be higher depending of bullets spreading.


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6313 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-08-25 07:36:03 +00:00
Kriplo 1adc9c542c Brief: //dnl ch58
- Fix several problems which lead into bad or no AI decisions, add optional decision of short autofire.

Details:
- Avoid use of last two locations per turn 
- Fix problems with improper APs calculations for burst and autofire which lead into AI to forcably cancel and end turn for those actions.
- Add option for decide to use short autofire instead of one long to enchance chance to hit.
- After taking cover change facing toward closest enemy to avoid going in status red and rather take proper black decisions.
- Fix bad public noise processing after AI investigate closest disturbance and find nothing, also erase all same noise points in team members if one of them already investigated.


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6310 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-08-23 16:27:36 +00:00
Flugente 2852b33ac9 Fix: AI does not ask for surrender if creatures are around, thereby not offering zombies surrender
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6290 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-08-18 16:45:31 +00:00
Flugente cfe8ea5ea5 - Feature improvement: enemy soldiers can now free captured comrades
- Fix: when jumping through windows, AI soldiers no longer need to end their turn to avoid a deadlock

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6248 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-07-26 21:50:08 +00:00
feynman 26383d83a8 Further refinement of new ModularizedTacticalAI architecture; added plans for Crows
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6017 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-04-18 20:02:54 +00:00
Flugente 1c84a131c1 Fix: AI deadlocks in black state were caused by the AI falsely deciding to climb rooftops
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5886 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2013-03-01 20:20:48 +00:00
Flugente e193f05865 - New Feature: enemy assassins disguise as militia and can ambush player mercs
- Fix: invalid GridNo for mounting weapons

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5753 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2012-12-30 19:20:36 +00:00
Flugente 3e859f91a8 - removed compile warnings
- Fix: sometimes, capturing the last enemy did not end combat as it should
- code change: POW are no longer considered visible opponents. This avoids the error of incorrect sight counters (a bit similar to dying enemies)

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5752 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2012-12-29 17:24:16 +00:00
Wanne c3ac6a5d1f - Added an ini option (ALL_NAMED_NPCS_DECIDE_ACTION) which enables proper realtime decision making for any named NPC (i.e. NPCs tied to a profile). As a result such NPCs are not required to be in CIV_TEAM anymore. (by Realist)
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5720 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2012-12-08 22:05:20 +00:00
Flugente 3bb14a870b - Prisoner system can now be correctly turned off.
- improved handcuffing checks

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5712 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2012-12-04 00:57:19 +00:00
Flugente cb9c217bb1 - New Feature: The rosine system now allows to capture enemy soldeirs via using handcuffs on them. They can e transferred to a prison the player controls, and be interrogated there.
- GameDir revision 1568 is required for this feature.
- Savegame compatibility is maintained.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5709 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2012-12-03 00:50:48 +00:00
Flugente 004728d2e4 - AI controlled soldiers can now jump through windows
- new ini option allows to jump through closed windows, smashing them while doing so

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5682 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2012-11-11 05:31:41 +00:00
Wanne 7e3b802ab6 - Fixed compilation error (in DecideAction.cpp), when ENABLE_ZOMBIES was enabled in builddefines.h
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5487 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2012-08-21 09:04:07 +00:00
Wanne 21dd880240 Sandro's feature pack (by Sandro)
- Dual Burst/Autofire Enabled
- Alternative Weapon Holding (firing from hip + pistol with one hand)
- Energy Cost on Weapon Manipulation (holding it shouldered, firing)
- Suppression Effectiveness Modified by Caliber and Gun Loudness
- No Enemy Auto-ready Weapon Option
- Fancy Big Merc Rifle Holding Animations
- More Random Idle Animations
- Kick in HtH Implemented
- Jumping Implemented
- (Included Fix for IIS with Martial Arts Bonus)
- further infos: http://www.ja-galaxy-forum.com/board/ubbthreads.php/topics/308884/A_Small_Compilation_of_New_Fea.html#Post308884
- you also need the latest GameDir files!


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5471 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2012-08-14 12:19:57 +00:00
Flugente 3077e27d9f New feature (by DepressivesBrot): Molle Items
- individual LBE gear can be created via MOLLE items. For each LBE item, there's a definition which pockets may be changed and how much space the new pockets may take up in total.
- If there's a free pocket slot and enough space -> attach item and enable pocket.
- for further description, see Doc/Design Document- MOLLE.txt

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5441 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2012-08-02 22:30:15 +00:00
Wanne f40e7fb118 - Made the "Zombie MOD" optional, so we can decide if we like to build an executable with/without the appearance of zombies
o See: builddefines.h: #define ENABLE_ZOMBIES (then you can turn on/off Zombies in the ingame option screen)
o Poison system is still in the code and not combined with the option "Zombie MOD"
o Gamers reported on the Bears Pit, that an executable compiled WITH the Zombies mod enabled makes the game unplayable slow in tactical screen after a few minutes in turn based/realtime



git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5356 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2012-07-04 10:30:13 +00:00