Asdow
03edc532e1
Clean up Strategic/*:cpp includes
2025-12-09 00:35:18 +02:00
Asdow
82aca548f5
Merge branch 'master' into ExtraMercs
2025-09-24 16:14:10 +03:00
Marco Antonio J. Costa and majcosta
7d9cd87da8
fully externalize bQueenLosingControlOfSector
2025-09-02 20:01:47 -03:00
BeatAroundTheBuscher and GitHub
ed00830202
Fixes Upper/Lower Casing for include paths ( #487 )
...
* Fixing upper/lower case for includes
types.h, zconf.h and zlib.h were renamed so that global includes like Types.h
are not used.
2025-08-16 22:01:12 -03:00
Asdow
c62d767622
Update to Master
2025-08-08 18:00:31 +03:00
Asdow and GitHub
7bb7c54317
Guard against integer underflow ( #462 )
2025-07-20 17:30:22 -07:00
Asdow
8dcb431ef2
Use (0,0) sector coordinates as unused cache
...
Makes the comment in Mod_Settings.ini valid advice
2025-04-17 23:51:44 +03:00
Asdow
de56f653ec
Use SoldierID
2024-11-30 23:47:00 +02:00
Asdow
0089e0a640
Change strategic enemy amounts to UINT16
2024-11-10 22:02:46 +02:00
Asdow
4b1de56b01
Remove #ifdefs for USE_VFS
2023-10-08 16:45:06 +03:00
rftrdev and GitHub
fb03cba2fa
New feature: transport groups ( #172 )
...
https://thepit.ja-galaxy-forum.com/index.php?t=msg&goto=365395
2023-07-04 20:58:56 -07:00
majcosta and GitHub
24425a82b1
More unused stuff removal ( #49 )
...
* More unused stuff removal
delete:
- giant 'metaheaders' (JA2 All.h, Laptop All.h, etc), preferring to add #includes directly where needed
- unused ExceptionHandling and DbMan translation units
- unused WizShare.h, Bitmap.h, trle.h, video_private.h headers
* remove mentions from vc proj files too
* remove preprocessor conditionals for unused definitions
find . -iname '*.h' -o -iname '*.cpp' -exec unifdef.exe -m -UPRECOMPILED_HEADERS -UJA2_PRECOMPILED_HEADERS -UWIZ8_PRECOMPILED_HEADERS -UPRECOMPILEDHEADERS {} ';'
then manually fixed a couple files the tool errored out on
* yes, the comments too
as title
2023-01-03 15:51:48 +02:00
rftrdev
7c6f7d6d09
Revert "Undo unrelated Chinese text changes"
...
This reverts commit 75332ea219 .
2022-11-04 22:42:09 -07:00
rftrdev
75332ea219
Undo unrelated Chinese text changes
2022-11-04 22:39:33 -07:00
rftrdev
7b0830c060
Initial commit - SVN checkpoint to git branch
2022-10-11 00:17:12 -07:00
rftr
4689369f83
adjusted AI SAM site repairs:
...
- SAM sites are no longer repaired instantly when AI takes control of a sector
- repairs begin 24 hours after the AI takes control, and repeat every 24 hours until the SAM is back at 100%
- repairs can be interrupted by the player regaining control of the SAM site
- time to repair a fully-destroyed SAM site depends on difficulty: novice takes 5 repair cycles, experienced takes 4, expert 3, and insane 2
- moved RepairSamSite() from ASD.h (where it was unused) into strategicmap.h
- this sets up the existing but previously unused strategic event hook EVENT_SAMSITE_REPAIRED
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9349 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2022-03-26 21:44:43 +00:00
Shadooow
3919a648d0
Fix for PercentEliteBonus from DifficultySettings.xml not applying onto enemy armies with both admins and regular troops correctly.
...
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9333 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2022-03-19 21:51:42 +00:00
Shadooow
31b17d99d0
Fixed bug in ASD code causing enemy patrols to have 0 elites no matter if ASD was enabled or not. I also changed the ASD feature, for patrols only, to assign tanks and jeeps in place of elites. So if the patrol spawned without any elite it can't have tank and jeep. Robots are still placed instead of regular troops, which however means that patrol full of elites will never have any robots.
...
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9287 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2022-02-02 03:41:34 +00:00
Sevenfm
8d8f912e1a
Fix: ASD deploys tanks if there are any in reserve, instead of prioritizing jeeps (by rftr).
...
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@9190 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-10-19 07:22:32 +00:00
Sevenfm
02d2c92f66
ASD deployment fix (by rftr):
...
- fix: robots, jeeps, and tanks now appear in garrison reinforcement and patrol groups (if the ASD and these units are enabled)
- fix: ASD continues to purchase jeeps if tanks are disabled
- removed some magic numbers in Strategic AI.cpp
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8982 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-04-27 04:00:07 +00:00
Sevenfm
78d73cc221
Removed unused options: ARMY_USES_TANKS_IN_ATTACKS, ARMY_USES_TANKS_IN_PATROLS, ARMY_USES_JEEPS_IN_ATTACKS, ARMY_USES_JEEPS_IN_PATROLS, ARMY_USES_ROBOTS_IN_ATTACKS, ARMY_USES_ROBOTS_IN_PATROLS (by rftr).
...
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8980 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-04-26 05:41:23 +00:00
Sevenfm
addff41022
Build 21.04.04
...
Fixed savegame compatibility (by rftr).
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8957 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-04-04 17:40:11 +00:00
Sevenfm
b6f15b2347
Add robots to enemy groups (by rftr).
...
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8956 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2021-04-03 03:32:40 +00:00
Flugente
1e101b2065
Use macro where appropriate for easier maintenance
...
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8847 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2020-07-07 19:47:52 +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
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
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
silversurfer
d341f290f6
fixed incorrect handling of army compositions
...
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8617 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2018-09-23 15:46:39 +00:00
silversurfer
2aab4aff5d
- added new parameters for NCTH in DifficultySettings.xml that allow the modification of CTH for militia and player mercs (requires GameDir 2445)
...
- re-enabled the extra elites for counter attacks
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8615 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2018-09-20 17:42:34 +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
silversurfer
dbec9c6ca0
- Added external parameter CounterAttackGroupSize to DifficultySettings.xml for counter attack strength. This replaces the old hard coded value. Requires GameDir >= 2363!
...
- Changed counter attack elite soldier distribution to replace regulars just like the rest of the code handles elites.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8396 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2017-03-14 17:21:40 +00:00
Flugente
258e9c24a0
New feature: SAM site cover can now overlap, and SAM sites can be hacked to lower their radius. For more info, see http://thepit.ja-galaxy-forum.com/index.php?t=msg&th=23211&goto=347188&#msg_347188
...
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8309 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2016-10-05 22:22:50 +00:00
Sevenfm
d2c1579786
HandleSnitchExposition: assignment instead of value check
...
HourlySnitchUpdate: NUM_PROFILES limit
Strategic AI.cpp: MAP_WORLD_X * MAP_WORLD_Y limit
RemoveMPButtonsForMapScreen: MAX_MP_BUTTONS limit
WrapString: '/0' char instead of '\0'
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8257 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2016-06-25 09:04:58 +00:00
Flugente
3a0d52e882
Built in safety check so that global offensives cannot be called more than once.
...
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8123 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2016-03-25 14:30:04 +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
Flugente
fe545b9eb3
Difficulty setting AlwaysUpGradeAdminsToTroopsProgress forces admin upgrade to troops once enough player progress is reached.
...
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8051 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2016-02-06 00:05:51 +00:00
Flugente
a9778435dd
Fix: GROUP pointer can be NULL after MoveSAIGroupToSector is called
...
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8033 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2016-01-24 20:40:46 +00:00
Flugente
3af6748b03
- Fix: compiler warning
...
- If possible, use the intended macrso to determine sector coordinates
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8018 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2016-01-10 18:06:55 +00:00
Flugente
7664342746
- New Feature: Arulco special division controls other features to fight the player. For more info, see http://thepit.ja-galaxy-forum.com/index.php?t=tree&goto=343706&#msg_343706
...
- New Feature: Enemy helicopters allow the AI to rapidly deploy troops aross the map. For more info, see http://thepit.ja-galaxy-forum.com/index.php?t=tree&goto=343707&#msg_343707 . GameDir <= r2279 is required.
- Fix: income of mine 0 was not correctly calculated
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8015 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2016-01-09 19:45:30 +00:00
silversurfer
50c764ee04
Fix: - additional defenses around Meduna and additional elites where used incorrectly from DifficultySettings.xml
...
- corrected some typos for parameters from DifficultySettings.xml
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@8013 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2016-01-09 16:27:56 +00:00
inshy
e251139d99
Do not use a "Tab" instead "Space" in the text messages. We don't have symbol for button "Tab" in the fonts, so when we use it in the text the game show "A"
...
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7975 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2015-08-15 18:31:58 +00:00
Flugente
86e21d43a8
If the player retreats from an enemy attack that was targetted at this sector, the enemy group pursuits instead of being given new orders.
...
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7901 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2015-07-05 12:44:12 +00:00
Flugente
ceea35b0e9
Fix: if an enemy group is reassigned and ordered to retreat to its sector of creation, have it travel there instead of simply removing it
...
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7895 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2015-06-20 16:25:53 +00:00
Flugente
32a8b75748
- Fix: wrong final destination displayed for travelling militia
...
- Fix: when ordering militia movement, data of another group's path can be erased
- Fix: a militia groups's path isn't always destroyed if the group is deleted
- Fix: unsafe pointer handling can result in a gamecrash when loading strategic AI data from a savegame
- Fix: traveltime calculations do not correctly handle waypoints, resulting in possible crashes
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7876 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2015-05-24 14:09:48 +00:00
Flugente
1547effbf7
Change: Strategic AI: during each strategic evaluation, the queen can send out 1 new group as reinforcements/patrol. Which one is selected somewhat randomly. If, however, closer inspection reveals that the group shouldn't be created, evaluation ends.
...
This has now been changed. If a group cannot be sent, the queen will try to send the next possible group and stop evaluation once successful.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7823 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2015-04-19 09:48:02 +00:00
Flugente
1bed3bcfad
Fix: during strategic AI evaluation, player strength isn't properly evaluated and possibly given bogus values. As a result, the AI is stopped from attacking sectors it should normally attack.
...
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7822 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2015-04-19 09:33:34 +00:00
Flugente
045d171bb6
- Fix: counterattack groups did not spawn from sectors that had no enemy troops, even if there were other forces present, thereby unnecessarily prolonging their movement time
...
- Fix: higher difficulty level indizes made tank apearances in counterattacks more likely
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7744 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2015-02-21 14:55:28 +00:00
Flugente
c9bcf90966
Expanded feature: Militia Strategic Movement is turned on with ALLOW_MILITIA_STRATEGIC_COMMAND set to TRUE and allows plotting paths for the militia just like for merc squads.
...
GameDir >= r2204 is recommended.
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7727 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2015-02-08 22:11:16 +00:00
Flugente
cc572651c0
Replaced
...
UINT8 CountAllMilitiaInSector(INT16 sMapX, INT16 sMapY);
with
UINT8 NumNonPlayerTeamMembersInSector( INT16 sSectorX, INT16 sSectorY, UINT8 ubTeam );
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7708 3b4a5df2-a311-0410-b5c6-a8a6f20db521
2015-01-06 01:22:07 +00:00