Attacks fix: 100 AP system for HitRate calculation
EstimatePath fix: ignore person at destination if we are estimating path cost
FindFlankingSpot: use full search range
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8265 3b4a5df2-a311-0410-b5c6-a8a6f20db521
- 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
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
- 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
- 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
- ridiculous amount of tags: attack, hit, miss, kill, head pop, blinded, type of attack, is target a zombie...
- ripostes to merc quotes,
- taunts can now make noise,
- bumped up amount of taunts to respectable 733, mostly thanks to your contributions guys,
- accidently squashed bug with incorrect noise notifications ("hears scream" instead of "hears explosion" etc.)
Ripostes
At the moment enemies can react to quotes "enemy detected", "1st enemy detected", "multiple enemies detected", "bullet flew by", "under heavy fire", as these are most likely to be used in combat. In the first three cases, riposting enemy will be chosen randomly from all enemy witnesses, latter two - last enemy to attack this merc will taunt.
Enemy's riposte will come as soon as merc quote is finished.
Noisy taunts
Taunts can be handled like other noises in game - shots, explosions, etc., meaning:
- they will be displayed only if someone from our team is close enough to hear them,
- they can be heard even if you don't see enemy (with twist of his name changed to "unknown voice". Yay.)
- volume of taunts is configurable in .ini.
see: http://www.ja-galaxy-forum.com/board/ubbthreads.php/topics/327830/4.html
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6628 3b4a5df2-a311-0410-b5c6-a8a6f20db521
- 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
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
- Fix more problems of deducting APs when try to shoot from different stances but need turn to your target.
Details:
- Problems raised after introduction of conditional APs charge in case that you need to rise gun and turn, so charging only higher of this to two value if not prone.
- Another problem is alternative fire mode from hip which is currently allowed only in stand so was missing such condition as well for change scope mode if going down.
- As run into problems from above for our merc, need adopt it to CalcBestShot for AI too.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6414 3b4a5df2-a311-0410-b5c6-a8a6f20db521
- Some APs fixing for throwing knives and backpack, with doing some correction to my previous changes.
Details:
- Do some correction and missing parts to ch58 and ch69.
- Throwing knives will add you bonus for throwing knives to same target as was suppose from v1.12 but never works.
- Fix AI use gun calculation for throwing knives instead for throw.
- Fix incorrect showing and deducting APs when try to shoot from prone with backpack or throw from prone and crouch positions with turning in general.
- Fix cheating when sLastTarget is set just for raise gun in that direction, this was always done after you fire.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6409 3b4a5df2-a311-0410-b5c6-a8a6f20db521
- 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
- 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
- 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
- Ignore firing into dying and breathless targets.
Details:
- AI will ignore attack breathless targets if there are other in better condition.
- AI will not fire into dying targets.
- AI should avoid go into creature gas.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6314 3b4a5df2-a311-0410-b5c6-a8a6f20db521
- 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
- Fix problem AI cannot fire when mercs are on roof, AI calculate chance to hit from all stances.
Details:
- Sometimes AI not fire when target is on roof, happens in situation when previous target was on ground because bLevel was not update.
- Instead to calculate ChanceToHit only from STANDING from now AI calculate chance for all stances, so AI should be more eager to attack.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6311 3b4a5df2-a311-0410-b5c6-a8a6f20db521
- new variables for additional strength, dexterity, agility, wisdom and experience level due to drugs, traits etc.
- new flagmask for soldiers (so no new variables have to be added in the future)
- fix: stat-altering drugs work again and can now have a higher magnitude
- drug-altered stats now show up purple
- fix: option screen help texts were missing
WARING! This will break savegame compatibility
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5325 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2. USE_XML_TILESETS moved from JA2.ini to JA2Options.ini
3. New Feature - Ctrl+Click on an item with an item in hand to auto-attach/merge them. Attach works with stacks. Merge only works on single items, for now at least.
4. New Feature - To accompany Quiet Training, there are now Quiet Repairing and Quiet Doctoring options.
5. Bugfix - inseparable attachments of attachments were getting lost again when using ctrl+f/the map screen button to remove attachments
6. Bugfix - INT8 overflow error causing vehicle repair to actually lower its status
7. GasMask tag in items.xml can now be applied to helmets as well as face items.
8. Bugfix - AI code was referencing hard coded GASMASK item number instead of looking for the tag
9. Bugfix - "break;" was removed in Explosion Control.cpp, thereby causing mustard gas to deal out fire damage. (Not sure if this was deliberate? But the new implementation differs from the JA2 standard, so it should be added to JA2Options.ini at least)
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5320 3b4a5df2-a311-0410-b5c6-a8a6f20db521
o This allows you to toggle between a gun's different scopes via the '.' key. Y
o You get the boni for vison, tunnel vison, sight range, scope magnification etc. only for the scope you use.
o 2 new ja2_options.ini properties: USE_SCOPE_MODES, DISPLAY_SCOPE_MODES: Allows the display of an icon on your gun, to tell what scope is currently in use. If it is a scope, the magnification factor also gets written. Both options can be found under the [Tactical Gameplay Settings] section in the ja2_options.ini
o new tag in items.xml (<attachmentclass>) now enables to specifiy what an attachment can do. At the moment used by grenades/rockets/scopes/sights. Items.xml changed accordingly, modders need to add this tag for those items.
o More infos: First post in: http://www.ja-galaxy-forum.com/board/ubbthreads.php?ubb=showflat&Number=303038&#Post303038
- WARNING: This feature breaks savegame compatibility.
- New Feature: Tripwire-triggered mines (by Flugente)
o This allows creating complex networks of tripwire that can detonate multiple mines attached to them.
o 2 new Items.xml tags: tripwireactivation, tripwire
o More infos: http://www.ja-galaxy-forum.com/board/ubbthreads.php?ubb=showflat&Number=303205&#Post303205
- Overheating addition (by Flugente)
o Severe overheating now temporarily reduces a gun's accuracy. This exact amount is displayed in the UDB.
- Bugfix (by Flugente)
o Removed foregrip as an attachment from the Saiga 12K
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5196 3b4a5df2-a311-0410-b5c6-a8a6f20db521
Notes:
-There may still be bugs!! (In fact, I almost guarantee it -- there's
-Ammo box code added to HR's crate code
-Splitting a crate/box also automatically refills half empty magazines
-new pathing arrows for map screen not included
-code for scouts to know where enemies are going doesn't appear to work... but i'm not sure it was completed.
-lots of gobledy gook (chinese?) comments turned back to english
-also added Bob's popups
-other languages besides english still need to have there language.cpp files updated with array changes
-AI enhancements by Warmsteel (reloading, suppression, roaming, avoiding gas, and other fixes)
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@5181 3b4a5df2-a311-0410-b5c6-a8a6f20db521
** Merged Source Code from Development trunk, for the Spring 2011 Release **
****************************************************************************
o Development Trunk (Revision: 4444): https://81.169.133.124/source/ja2/branches/Wanne/JA2%201.13%20MP
o This trunk (the official 1.13 source trunk) will only be used for fixing bugs. No new features will be added here.
New Features are only included in the Development trunk
o !!! After we have fixed a bug here in this trunk, we should MANUALLY merge the bugfix in the development trunk !!!
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@4446 3b4a5df2-a311-0410-b5c6-a8a6f20db521
Made direction variables more consistent as unsigned chars. Several function prototypes updated for this.
Many memory leaks plugged: External options, video overlays, laptop file lists, tactical message queue, strategic pathing, autobandage, merc hiring, detailed placements, crate in Drassen, tactical placement
New functions and attributes for soldiers in LUA (still for debugging at best): Soldier.APs (current APs), Soldier.changestance (changes stance, uses game heights)
File catalog ignores .SVN directories (game load speedup)
Fix CTD in mouse regions
JA2 window now refuses to move to negative coords
Checks to prevent DirectX-related infinite loops due to minimizing and task switching
Invading enemies should now appear on the borders even when reinforcements disabled in .ini
Suppression should no longer work on mercs in medium water
Infant/Young creatures use restored spit instead of Molotov
Creatures begin with their 'guns' (spit) 'locked and loaded' (cartridge in chamber)
Further fix to AXP and AlaarDB's weapon ready check: Now 'firing' is always counted as 'ready'.
Prevent mercs from falling and flying back through obstacles
Check whether battle group is even set before testing its location for battle setup
Burst spread locations now limited to 6, the limit within the soldier struct
Extra burst spread locations zeroed out so that they aren't used unless necessary
Spread code now only shoots at locations in the spread, and will shoot at all 6
Only mercs in the sector where autobandage happens will be made to stand up after it's done
Throwing a grenade at the tail of the plane in Drassen should not result in a CTD
Reset attack busy count when loading a new sector
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1347 3b4a5df2-a311-0410-b5c6-a8a6f20db521
Camo and other effects are taken into account when aiming at a body part
Max Distance Visible is more consistent in being calculated based on the soldier and direction rather than a fixed number
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@1239 3b4a5df2-a311-0410-b5c6-a8a6f20db521