Commit Graph
374 Commits
Author SHA1 Message Date
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 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
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 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 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 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 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 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
Sevenfm 32482f20f6 New option AI_DECISION_INFO enables extended logging for AI decisions.
Moved zombie AI into separate file ZombieDecideAction.cpp
New zombie AI:
- simplified code
- advancing using cover
- if zombie cannot reach any opponent, he tries to hide
- if zombie cannot reach opponent and cannot hide and he is under fire, he will retreat, seeking cover away from known opponents
- if zombie doesn't know enemy location, he will try to run to closest friend who knows enemy location
- new zombie AI has extended AI logging
More water splash sounds (Data\Sounds\Misc\Splash1.ogg .. SplashN.ogg).
CalcCoverValue: 
- allow moving into shallow water if it provides better position
- special calculations for zombies: zombie is very dangerous at close range
- if soldier has no gun, use different calculation based on distance instead of CTGT
FindBestNearbyCover: zombies only choose spots that provide sight cover.
Added functions for extended AI log.
ClosestReachableDisturbance:
- if soldier is zombie and he cannot climb, skip location
- zombies do not attack vehicles
- improved check to avoid choosing dying opponents
EstimatePathCostToLocation: return 0 if checking for zombie which cannot climb and path needs climbing.
RoamingRange: always max roaming range for zombies.
SightCoverAtSpot, ProneSightCoverAtSpot:
- improved max sight range calculation
- added option for unlimited sight range check
New AI functions:
- AIDirection
- AICheckIsSniper
- AICheckIsMarksman
- AICheckIsMedic
- AICheckIsMortarOperator
- AICheckIsGLOperator
- AICheckIsOfficer
- AICheckIsCommander
- AICheckIsMachinegunner
- AIGunInHandScoped
- AIGunScoped
- AIGunRange
- AIGunClass
- AIGunType
- AIGunDeadliness
- AIGunAmmo
- AIGunAutofireCapable
- FindObstacleNearSpot
- InSmoke
- CorpseWarning
- CorpseEnemyTeam
- CorpseMilitiaTeam
- AICheckUnderground
- AnyCoverAtSpot
- AICheckHasWeaponOfType
- AICheckHasGun
- AICheckShortWeaponRange
GetCorpseAtGridNo: additional check for valid gridno.
More zombie raise sounds (Data\Sounds\Misc\ZombieRaise1.ogg .. ZombieRaiseN.ogg).
GetCorpseRotFactor: improved code to return FLOAT value between 0 and 1.
New debug topic id TOPIC_DECISIONS for logging AI decisions.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8760 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-02-21 23:33:25 +00:00
Sevenfm 4fb6369368 AI pathing: avoid deep water if not in deep water already and not SEEKENEMY (allow max 2 tiles of deep water for other soldiers).
CONSIDERED_NEUTRAL: removed dying check as it may cause problems with AI.
Improved code to avoid moving into gas/deep water/light/artillery danger zone.
ClosestReachableDisturbance: 
- skip dying opponent if found not dying
- when in deep water, skip opponents in deep water
ClosestKnownOpponent: skip dying opponent if found not dying.
RedSmokeDanger: consider deep water as safe from artillery strike.
Allow deep water flanking for soldiers of ENEMY_TEAM with SEEKENEMY orders and CUNNINGSOLO attitude or athletics trait.
CalcBestShot:
- dying, cowering or unconscious soldiers have very low priority
- added safety checks
- if best opponent is dying and new opponent is ok, use new opponent
DecideAction: improved deep water checks.
Red, Black AI: when SEEKENEMY soldier is in deep water, move to closest opponent on the ground.
FindNearestUngassedLand: 
- increased max search distance to 35
- added speed optimization
- removed max AP budget
FindNearbyDarkerSpot:
- increased max search range to 25
- added speed optimization
- removed max AP budget
FindFlankingSpot: added condition to allow deep water flanking


git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8758 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-02-17 19:20:28 +00:00
Sevenfm 019eccb5b9 Restored Flugente's frozen soldiers which were disabled by accident (by Asdow).
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8757 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-02-16 18:45:43 +00:00
Sevenfm 0330e6c1a8 Improved code to avoid dangerous locations.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8756 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-02-16 14:08:47 +00:00
Sevenfm 8e9f9cb8a1 LOBOT code (by Asdow, original code by Bio).
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8755 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-02-15 16:19:35 +00:00
Sevenfm a6271e2e47 ExpAffect: don't spread fire on water.
StructureHit: check water level.
Only normal, stun and flashbang explosives create water explosion.
Increase max force when throwing items into water (to compensate for no bouncing).
Increased splash volume from LOWVOLUME to MIDVOLUME.
InternalIgniteExplosion: no fragments in water.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8752 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-02-13 15:57:10 +00:00
Sevenfm b57e4eba00 Play splash sound when thrown item hits water.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8751 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-02-12 19:11:50 +00:00
Sevenfm f51442d03d Only check for fExplodeOnImpact in OBJECT_DETONATE_ON_IMPACT if item has IC_EXPLOSV class. This fixes situation when random items are thrown incorrectly.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8749 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-02-12 17:40:05 +00:00
Sevenfm af988b958f New option ADD_LIGHT_AFTER_EXPLOSION (TRUE) - create light effect for fire and signal smoke effects.
NewSmokeEffect() now accepts new parameters:
- ubDuration sets custom effect duration
- ubRadius sets custom effect radius
- ubGeneration allows creating smoke effect with defined generation

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8748 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-02-10 14:57:54 +00:00
Sevenfm 90db9fa346 Moved fire.ogg to Data\Ambient
Moved SSA folder to Data\Ambient

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8746 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-02-09 07:26:19 +00:00
Sevenfm 7e0606932f New options to control Sector Steady Ambients:
ENABLE_SSA (default FALSE)
VOLUME_SSA (default 50)
DEBUG_SSA (default FALSE)

Increased number of sound channels to 64.
SoundPlay(): show more information when failed to play sound.
PlayVoiceTaunt(): limit max number of voices to 99.
vfs::String::as_utf16(): show original string if failed to convert.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8745 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-02-08 19:35:10 +00:00
Sevenfm 0048e75c80 Added new options:
- ENABLE_TA enables fire ambient sound
- VOLUME_TA controls fire ambient sound volume

Fire ambient sound is played in a loop when there is active fire effect on screen.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8738 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-01-24 10:06:06 +00:00
Sevenfm 470bae3c20 New option AI_TACTICAL_RETREAT (false by default) controls tactical enemy retreat from battle.
Moved options AI_YELLOW_FLANKING, AI_EXTRA_SUPPRESSION, AI_NEW_MORALE and AI_BETTER_COVER to [Tactical AI Settings]
AI_NEW_MORALE:
- zombies always have high morale
- always low morale when soldier is blinded
- 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
UpdateAniTiles: also check EXPLOSV_CREATUREGAS (from merc05's fixes)

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8721 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2019-12-30 08:45:08 +00:00
Sevenfm 0a6277c6b1 InternalDropBlood: use correct data to determine blood type.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8717 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2019-12-07 00:08:10 +00:00
Flugente 66e5ef73e8 The duration and size of smoke clouds is reduced depending on weather
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8667 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2019-02-16 19:54:39 +00:00
Flugente e54c8498e2 Stun effect explosions briefly remove gas effects from any tile they affect
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8666 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2019-02-15 22:57:44 +00:00
Flugente de8bf8a7d6 Armour and its attachements can now alter the fire damage received by setting a value in the <sFireResistance>-tag. This is affected by item status.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8664 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2019-02-10 20:42:39 +00:00
Flugente e7f098c2f2 If DELAYED_GRENADE_EXPLOSION = TRUE in JA2_Options.ini, toggling fire modes on a grenade launcher toggles whether the grenades explode on impact or with a 1-turn delay.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8653 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2019-01-27 23:53:11 +00:00
Sevenfm 389f40ba3d Fix: flashbang effect in a building without flat roof
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8642 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2018-11-26 15:51:36 +00:00
silversurfer 3aa412ac56 Fix: Incorrect movement cost calculation for jumping over fences with obstacles behind them
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8640 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2018-11-10 14:34:01 +00:00
silversurfer 384572098b - fixed incorrect rounding in several places in the code
- diagonal movement now uses the proper amount of AP and BP

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8634 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2018-11-03 16:11:21 +00:00
Flugente 494dbc6e69 Store the profile type in the profile structure and remove superfluous code
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8620 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2018-09-24 19:36:28 +00:00
Flugente e205697804 Fix: possible underflow in UB code
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8605 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2018-08-28 20:44:16 +00:00
Flugente 372384005b Fix: weather is not properly distributed over the day
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8600 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2018-08-24 22:49:12 +00:00
silversurfer fed9ca298c - new modifiers "MISS_MAX_RADIUS_x" for grenades and mortar to set a max radius where they will land. Chance to hit something with explosives is now based more on skill than on luck.
- fixed infinite loop in function "RandomGridFromRadius" when min and max radius were 1
- fixed incorrect exit condition in function "RandomGridFromRadius" when min radius was 0
- fixed incorrect CtH calculation for mortar

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8598 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2018-08-22 17:54:24 +00:00
Flugente 6058911c34 Fix: riot shield graphic is off if soldier is not on the ground
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8597 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2018-08-18 14:57:13 +00:00
Flugente 887170dda5 New merc (somewhat): Similar to Larry's two personalities, Buns now has an alternate personality as well.
For more info, see http://thepit.ja-galaxy-forum.com/index.php?t=tree&th=23806&goto=354149&#msg_354149

Requires GameDir >= r2430.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8588 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2018-07-25 20:14:33 +00:00
Flugente 1ea69989ed Fix: bad radar/overhead map colours for creature team.
For more info, see http://thepit.ja-galaxy-forum.com/index.php?t=msg&th=22776&goto=353150&#msg_353150

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8553 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2018-04-15 13:35:06 +00:00
Flugente e55b480996 New feature: Getting and using intel allows for more spy-related roleplay.
For more info, see http://thepit.ja-galaxy-forum.com/index.php?t=msg&th=23643&goto=352475&#msg_352475

Requires GameDir >= r2401.

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8522 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2018-02-18 23:17:34 +00:00
Flugente dd3129ac11 New feature: additional dialogue allows modders to play additional dialogue on man occasions, including reactions to other people speaking
For more info, see http://thepit.ja-galaxy-forum.com/index.php?t=tree&goto=351982&#msg_351982 and for a demonstration http://thepit.ja-galaxy-forum.com/index.php?t=tree&goto=351981&#msg_351981

Requires GameDir >= r2400

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8516 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2018-01-10 23:41:52 +00:00
TheBob 209f5f7c1b fixed AI freeze on creatures attacking crows
fixed some broken debug messages

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8508 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2017-11-20 23:43:16 +00:00
Flugente 0410017820 Fix: JA2UB compilation errors
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8506 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2017-11-01 22:51:25 +00:00
Flugente 7b1ba8f7f2 Fix: wrong sound played
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8505 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2017-11-01 16:54:08 +00:00
Flugente 380d858d2c Added VS2017 solution and project files (by DepressivesBrot)
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8490 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2017-10-02 13:00:46 +00:00
Flugente c3592c23f3 Slightly speed up overhead map display
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8488 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2017-10-01 12:30:39 +00:00
Flugente 2d2e789ce0 Fix: display riot shields only if soldier is seen (relevant on non-player controlled soldiers)
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8487 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2017-10-01 12:02:38 +00:00
Flugente 2fe522db4b Fix: compiler warnings
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8471 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2017-09-13 20:01:48 +00:00
Flugente ff8a656040 Smoothen ballistic shield 'movement' by taking soldier position offsets into account
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8467 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2017-08-30 19:33:23 +00:00
Flugente 874a006d06 Gear templates: multiple ammo item choices are possible via wildcards, but if item is a match, use ammo specified there
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8449 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2017-08-15 12:20:27 +00:00
Flugente 54f9238ec0 Fix: weather occured underground
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8445 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2017-08-10 21:44:49 +00:00
Flugente 11729a132e New feature: riot shields protect against damage from some directions.
For more info, see http://thepit.ja-galaxy-forum.com/index.php?t=msg&th=23452&start=0&

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8434 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2017-07-29 21:18:13 +00:00
Flugente 0992a423e7 New feature: mercs with a gun-related trait (New trait system only) can use the 'Focus' skill via the skill menu ([$] in tactical). This skill grants an interrupt modifier bonus in the targeted area, but also a penalty outside of it.
For more info, see http://thepit.ja-galaxy-forum.com/index.php?t=msg&th=20659&goto=350400&#msg_350400

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8432 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2017-07-26 13:49:38 +00:00