Commit Graph
3243 Commits
Author SHA1 Message Date
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
Sevenfm 8840353c78 Improved code for AI tooltips.
RangeChangeDesire: improved code for better balance.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8785 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-04-11 12:17:53 +00:00
Sevenfm 0578c2a89a New option: SOLDIER_TOOLTIP_DEBUG_AI shows additional AI debug information.
Show tooltips for all persons.


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8784 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-04-11 11:13:53 +00:00
Sevenfm 3eb699c45f Walkman: bonus 20% to morale when in head slot.
Update soldier morale every turn.
Update soldier morale when changing inventory.
Improved code for 'l' hotkey.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8783 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-04-10 21:20:05 +00:00
Sevenfm 4e34605f86 Red, Black AI: try to use sidearm if not enough AP to shoot with main weapon.
Black AI: improved check to avoid friendly fire.
FindAIUsableObjClass: by default search for weapon with longest range, if fSidearm = TRUE search for fastest weapon.
AICalcChanceToHitGun: if AI_EXTRA_SUPPRESSION = TRUE, always return min 1% for AI.
RangeChangeDesire:
- civilians only want to run away
- added small bonus to range change desire if soldier has no gun or short range weapon
CalcBestShot, CheckIfShotPossible: always check if can shoot at target seen by another soldier.
CalcBestShot, CalcBestThrow, CalcBestStab: initialize attack data.
Removed obsolete code.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8782 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-04-08 21:24:56 +00:00
Sevenfm 5350258334 Added "WIP" description to LOBOT ingame option.
Fixed Polish localized string for LOBOT option.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8781 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-04-08 11:10:58 +00:00
Sevenfm 306eca7dfc New option NWSS enables New Weapon Sound System.
Increased SOUND_MAX_CHANNELS to 128 for NWSS to work correctly.
New tag in AmmoStrings.xml: <NWSSCaliber>
New tags in Weapons.xml: <ubNWSSCase>, <ubNWSSLast>, <szNWSSSound>
Fixed some warnings.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8780 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-04-05 23:58:07 +00:00
Sevenfm 5b1ea7e795 Hotkeys for quick transformations:
Shift+T - transform item in hand (improved code)
Shift+O - transform scope
Shift+L - transform flashlight
Shifr+Y - transform laser

Fixed some warnings.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8779 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-04-03 05:14:47 +00:00
Sevenfm 5784135c29 Improved code for alternate mouse commands (option ALTERNATE_MOUSE_COMMANDS).
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8778 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-04-02 20:41:36 +00:00
Sevenfm c0f36bc6c2 Hotkeys:
- use SHIFT key to move in formation
- Ctrl+Alt+G: toggle formation
- G: toggle light effects

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8777 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-04-02 20:05:31 +00:00
Wanne 611b5f4d8c Added files to ignore list
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8776 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-03-28 16:54:05 +00:00
Sevenfm 7810a35a96 [F] key should correctly show CTH for different types of attacks:
- gun
- launcher
- grenade
- thrown knife
- punch
- toss item

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8775 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-03-24 20:32:13 +00:00
Wanne d76d4574c9 Chinese Translation updates
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8773 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-03-17 10:05:52 +00:00
Wanne 12abe8c5bc Bugfix: Fixed INTEL-Button wrong placement x button position, if DISEASE-Button is not displayed
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8772 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-03-17 09:48:16 +00:00
Sevenfm 560219ac36 Fixed delayed mode for grenades.
Changing delayed mode for grenade launcher only possible with DELAYED_GRENADE_EXPLOSION = FALSE.
Minor code improvements and warning fixes.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8771 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-03-14 10:39:18 +00:00
Sevenfm 3e07b01a45 Removed old zombie AI code.
Improved AI path tweaks:
- tanks prefer moving in straight directions to avoid sliding effect
- combat jeeps prefer moving on roads (PAVED_ROAD, DIRT_ROAD)
- armed vehicles avoid moving into buildings (FLAT_FLOOR)
- increased value to avoid light and corpses for enemy soldiers

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8770 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-03-09 23:21:25 +00:00
Sevenfm a30d8c6833 Scale tactical ambients and sector steady ambients with general effects volume.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8769 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-03-09 20:29:50 +00:00
Sevenfm 9e1b5338a6 More AI logging information.
PanicAI: use correct movement and stealth mode when determining AP needed.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8768 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-03-08 22:39:21 +00:00
Sevenfm 5b8f91912f First decay light effects and then decay smoke effects, because fire can create light.
Dynamic creation of light effects for fire and signal smoke (ADD_LIGHT_AFTER_EXPLOSION option).
Fixed/improved code to decay light effects so that ubDuration works correctly.
Note: <ubRadius> tag is not used for light effects as they cannot spread, light is always created with <ubStartRadius> and can only decay later.
Improved code to decay smoke effects.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8767 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-03-03 17:48:43 +00:00
Sevenfm a09c0a8b33 Multiplayer LOBOT fix (by Asdow).
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8766 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-02-27 18:23:38 +00:00
Sevenfm a94a32aa97 Solution for Visual Studio 2019 (by Asdow).
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8765 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-02-27 18:19:27 +00:00
Sevenfm 8b53d273f9 New tags in CivGroupNames.xml: Side, CustomSide allow setting custom side for civilian group.
NewEye: fix possible bug.
InitShopKeeperSubTitledText: correctly initialize data.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8764 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-02-27 10:51:45 +00:00
Sevenfm 9d1ebb6eb9 Render performance fixes (by Asdow)
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8763 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-02-24 19:35:34 +00:00