Commit Graph
3265 Commits
Author SHA1 Message Date
Flugente 0544227958 Fix: militia can retreat to impassable sectors in autoresolve
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8836 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-07-04 14:46:19 +00:00
Flugente af04fe4b53 Fix: killing Doreen after having already convinced her to leave peacefully does not fully remove the loyalty gain for the peaceful solution, despite that being intended
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8835 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-07-03 23:18:15 +00:00
Flugente 000de06890 Fix: incorrect travel time calculation outside of pathing
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8834 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-07-03 20:40:22 +00:00
Flugente 00313a526b Minor code improvements
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8833 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-07-02 22:11:11 +00:00
Flugente de24b4df88 Fix: noticable lag on slow machines or while debugging when plotting a path in strategic view
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8832 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-07-02 21:58:45 +00:00
Flugente 9f167f16c6 Fix: if DYNAMIC_IMP_PROFILE_COST is TRUE, the IMP cost is too high(by sun_alf)
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8831 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-06-30 20:23:25 +00:00
Flugente 8119662904 New feature: the refilling of the queen's army resevere now requires her to train recruits, which the player can disrupt to some degree (by sun_alf)
For more info, see http://thepit.ja-galaxy-forum.com/index.php?t=msg&th=20659&goto=360475&#msg_360475 and http://thepit.ja-galaxy-forum.com/index.php?t=msg&th=24433&goto=359872&#msg_359872

Requires GameDir >= r2555

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8830 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-06-29 20:12:53 +00:00
Flugente 308631ee25 - There can now be effectively unlimited battle sounds for NPCs.
- Activated some NPC voices that never played.

For more info, see http://thepit.ja-galaxy-forum.com/index.php?t=msg&th=20659&goto=360457&#msg_360457

GameDir >= r2554 is recommended.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8829 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-06-26 20:44:59 +00:00
Flugente 098dc8e280 Disease update:
- <InfectionChance_WOUND_FIRE> can cause infections when taking fire damage
- <InfectionChance_WOUND_GAS> can cause infections when taking non-fire gas damage
- <fSpecialFlagLimitedUseArms> causes the infected to be unable to use one arm
- <fSpecialFlagLimitedUseLegs> causes the infected to be unable to run, and walk and travel slowly
- JA2_options.ini option DISEASE_SEVERE_LIMITATIONS controls whether <fSpecialFlagContractDisability>, <fSpecialFlagLimitedUseArms> and <fSpecialFlagLimitedUseLegs> are used

For more info, see http://thepit.ja-galaxy-forum.com/index.php?t=msg&th=22099&goto=360451&#msg_360451

- Gas damage split up in fire and non-fire damage.
- Flamethrower projectile damaged is affected by fire resistance.

Requires GameDir >= r2553.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8828 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-06-25 22:42:44 +00:00
Flugente 4e86046d0c Store 32 instead of 31 disabilities
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8827 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-06-20 16:14:46 +00:00
Flugente d33bc9123c Mercs can now have multiple disabilities at the same time.
The new fSpecialFlagContractDisability tag for diseases adds a disability every time we are infected with the disease, it is used for PTSD.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8826 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-06-20 15:47:43 +00:00
Flugente 7899cc1f1e Fix: disabling cover display left coloured remnants outside the screen (by Asdow)
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8825 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-06-18 18:49:37 +00:00
Flugente dd9f2c28e8 Minor code cleanup
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8824 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-06-17 22:27:20 +00:00
Flugente f1bd0f8e8e Fix: crash if player offer area exceeds 255 fields (possible on high resolutions)
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8823 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-06-17 22:24:52 +00:00
Flugente 01d8bbf408 Fix: illegal array access if resolution exceeds monitor resolution
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8822 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-06-17 22:22:26 +00:00
Flugente 3b3abc2bc6 We can play external dialogue lines for NPC merchants via the lua function HandleNPCMerchantQuote(...)
For more info, see http://thepit.ja-galaxy-forum.com/index.php?t=msg&th=20611&goto=360388&#msg_360388

Requires GameDir >= r2550.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8821 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-06-17 20:21:39 +00:00
Flugente f0c6511ca4 Added general modifier to grenade throw AP cost
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8820 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-06-15 23:12:48 +00:00
Flugente 97fa0c8e90 Added interface functions fo lua
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8819 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-06-11 18:33:20 +00:00
Flugente a48bd9a8a0 Fix: previous fix excluded non-RPCs from dialogue replacement
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8818 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-06-02 18:37:18 +00:00
Flugente d5d4db6066 Fix: do not call lua dialogue replacement function for RPCs
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8817 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-06-02 17:27:20 +00:00
Flugente 948ad8caf1 Fix: crash after heli landing in UB (by Asdow)
Fix: unnecessary town initialization in UB (by Asdow)

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8816 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-06-01 20:53:22 +00:00
Flugente f0c8db784a New feature: exploration assignment indicates items on the map
For more info, see http://thepit.ja-galaxy-forum.com/index.php?t=msg&goto=360244&#msg_360244


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8815 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-06-01 20:46:45 +00:00
Flugente b25a4be4e7 Fix: compiler warnings
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8814 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-05-30 14:26:16 +00:00
Flugente e932393eae minor code cleanup (by sun_alf)
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8813 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-05-30 13:34:57 +00:00
Flugente 51e2c6b293 Minor code cleanup (by Asdow and sun_alf)
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8812 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-05-30 13:24:33 +00:00
Flugente c5022fa1e5 New feature: turncoats can be created from enemies and ordered to switch sides
Requires GameDir >= r2535

For more info, see http://thepit.ja-galaxy-forum.com/index.php?t=msg&goto=360191&#msg_360191

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8811 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-05-30 00:13:42 +00:00
Flugente 0f13599775 Fix: jeeps were not accounted for
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8810 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-05-29 17:41:29 +00:00
Flugente b1cfc516af Fix: unnecessary transaction
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8809 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-05-29 17:40:43 +00:00
Flugente 0f3dd1035a Fix: AllowReinforcementsOmerta was not used
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8808 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-05-25 20:31:10 +00:00
Sevenfm fac4927bc6 Bigmaps lockbusting fix: removed incorrect type cast (as suggested by Franimus).
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8807 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-05-24 06:17:18 +00:00
Flugente 0f44c83b71 Fix: bad colours in Militia Overview
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8806 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-05-19 22:35:32 +00:00
Sevenfm 84afe6b160 GetSoldierAboveGuyPositions:
- use max value so that animation and text do not overlap
- lowered Y offset for crouched stance

DrawSelectedUIAboveGuy:
- reduce vertical gap if not showing health bars

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8805 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-05-18 06:04:34 +00:00
Flugente ea1892c788 New feature: factories allows facilities to create items
For more info, see http://thepit.ja-galaxy-forum.com/index.php?t=msg&goto=360075&#msg_360075

Requires GameDir >= r2534

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8804 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-05-17 20:52:27 +00:00
Flugente 4dc40912e4 Fix: Requirements opinionevents OPINIONEVENT_CIVKILLER and OPINIONEVENT_CIV_ATTACKER were different, leading to situations were mercs complained about harming civilians, but not about killling them
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8803 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-05-17 14:20:17 +00:00
Flugente 952408b961 Improvements for BaseTable:
- Separator colour can be set
- Fixed column length calculation
- checkboxes are now possible

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8802 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-05-17 14:13:57 +00:00
Sevenfm 04a66f8b7c New experimental NCTH options: LIMIT_MAX_DEVIATION, LIMIT_GROUND_SHOTS.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8801 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-05-14 15:53:31 +00:00
Sevenfm d9c8a1c398 New tag <shotAnimation> in AmmoTypes.xml allows defining custom shot animation.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8800 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-05-13 06:31:11 +00:00
Sevenfm 42a85e96ba Increased MAXATTACHMENTS to 60000 for Aimnas to work.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8798 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-05-05 21:47:25 +00:00
Sevenfm 03d7fd5266 DrawItemUIBarEx: use GetGunOverheatDisplayPercentage so that OVERHEATING_DISPLAY_JAMPERCENTAGE option can have effect.
Minor code improvements.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8797 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-05-05 16:34:15 +00:00
Sevenfm 7f8fc44a7d Improved code to update scope mode when changing stance.
ChangeScopeMode: use NOWHERE instead of 0 as incorrect target gridno.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8796 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-04-30 00:48:52 +00:00
Sevenfm b729583bcb Switch from alt weapon holding when changing stance in realtime.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8795 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-04-29 06:15:36 +00:00
silversurfer 0e9e13e838 fix: travel time wasn't correctly calculated for survivalist and background speed bonuses
enhancement: new calculations for travel speed bonuses of survivalist and backgrounds

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8794 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-04-27 20:34:51 +00:00
Flugente 22cb49668f Added dialogue event for planting bombs/mines (ADE_BOMB_HAS_BEEN_PLANTED)
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8793 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-04-26 20:02:10 +00:00
Sevenfm bc2a3dd0fc UIHandleNewBadMerc: create soldier at interface level.
RemoveBlood: correctly remove blood on specified level.
UpdateBloodGraphics: update rendering.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8792 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-04-26 05:37:05 +00:00
Sevenfm 9995b70ee9 CalcBestThrow:
- for mortars and grenade launchers, first try to find non smoke grenade/shell
- don't use mortar in building or underground
- don't use grenade launcher underground
- blinded soldier cannot use mortar/grenade launcher
- when calculating safety margin, correctly use BuddyItem defined for single shot RPG
- limit ubSafetyMargin to TACTICAL_RANGE / 2 in case radius set too high in XML
- use flares only at night
- use ValidOpponent() check to determine opponent
- use new knowledge functions
- allow attacking recently seen/heard opponents with mortar/grenade launcher
- improved code to spare grenade, don't spare: non lethal grenades, if some friends killed, when under attack, STATIONART/SNIPER, when on the roof, when there are friends under attack nearby
- increase possible distance from opponent when opponent in a building or when using gas grenade
- improved check for gas/smoke when using gas/smoke grenade
- don't use smoke grenade if there's already smoke nearby (it can spread to this tile later)
- improved code for AP to attack calculation
- when attacking enemy in a building with mortar, allow shooting on the roof above the enemy, hoping that roof will collapse
- limit RPG use, unless can hit several enemies, shooting at tank or opponent is in a room
- soldiers should use RPGs against tanks/jeeps more often
- modify smoke attack value depending on range (less effective if too far from opponent)

Red AI:
- improved code to prepare throw attack
- added code to change stance before throwing if needed

Black AI:
- simplified code to change stance before shooting, always change stance first if needed
- improved code to prepare attack, added code to change stance before throwing if needed

CalcBestShot:
- always change stance first, then turn
- don't allow going prone and turning at the same time

New AI functions:
- NightLight
- DuskLight
- InSmokeNearby
- CountTeamUnderAttack
- SectorCurfew
- TeamPercentKilled
- TeamHighPercentKilled
- ArmyPercentKilled
- ArmyPercentKilledTolerance
- Knowledge
- KnownLocation
- KnownLevel
- UsePersonalKnowledge
- PersonalKnowledge
- KnownPersonalLocation
- KnownPersonalLevel
- PublicKnowledge
- KnownPublicLocation
- KnownPublicLevel

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8791 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-04-23 02:54:36 +00:00
Sevenfm 32b6ffe70f Improved watched location AI code:
- check that we can see enemy if we raise weapon when considering using noise spot as watched location
- prefer hiding first when in dangerous place if hiding is possible

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8790 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-04-20 22:14:45 +00:00
Sevenfm 3fe13b9161 Increment watched location when soldier hears enemy and can possibly see noise location.
Suppression:
- when calculating suppression effectiveness for shotgun, modify damage for pellets.
- set attacker spot as watched location
- alert enemy soldier if he is under fire

Red AI:
- no Main Red AI for civilians
- set watched location to closest position where enemy can appear
- snipers and soldiers with scoped guns should decide watch more often

Improved Red AI watch code:
- crouch if not crouched
- raise weapon if not raised
- turn to watched location
- possibly go prone, if soldier has LOS to watched location

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8789 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-04-20 20:10:30 +00:00
Sevenfm 2147de571e Restored AI decision delay when recruiting new troops.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8788 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-04-20 18:24:56 +00:00
Sevenfm 8051e9b064 ASD: don't change reinforcement pool when unlimited reinforcements enabled.
Interrogate prisoner: don't change reinforcement pool when unlimited reinforcements enabled.
EvaluateQueenSituation:
- allow recruiting when pool size drops below iQueenPoolIncrementPerDifficultyLevel, this should result in more stable strategic AI behavior
- with default values, recruiting can result in up to 8 days of doing nothing, I think that skipping once cycle of decisions should be enough

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8787 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-04-20 16:43:14 +00:00
Sevenfm 2f576684ac VR r2348 fix - loading .jpc.7z with a single image would cause exception as file was not considered open (by anv)
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8786 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-04-20 00:20:37 +00:00