* Removes the need to constantly check for fCivilian, ARMED_VEHICLE, ENEMY_ROBOT etc inside DecideAction
* Move AI decision checks into their own functions, such as DecideActionRadioRedAlert
* Add new entry to ActionType. AI_ACTION_INVALID signals that no valid action was found when a function returns, or no valid action is possible
* Do a weighted random selection for choosing target under DecideActionBlackSoldier
now that CI is using cmake, we can be clean up the tree quite a bit
btw, cmake can still configure for the msbuild generator for those so inclined:
create the folder, cmd to it, run `cmake [project_root_dir] -G"Visual Studio 17 2022" -A Win32 -DLanguages=ENGLISH -DApplications=JA2` once, then open the solution file using Visual Studio 2022
Tried to stay as close as possible to ja2_2019.sln
On Visual Studio 2022 just Project -> CMake Settings for Ja2, add
the x86 configurations you want and press F7.
Below shows how the -DLanguages -DApplications switches work, If you don't
set them, the CMakeCache.txt of them will be set to ENGLISH and JA2,
respectively:
cmake [...] // nothing set, configure just JA2_ENGLISH.exe by default
cmake [...] -DApplications="JA2UB" // configures just Unfinished Business
cmake [...] build -DApplications="JA2UB;JA2UBMAPEDITOR" // Unfinished Business and UB Map Editor
cmake [...] build -DApplications="JA2UB;JA2MAPEDITOR;ALL" // ALL is in the list, configures every application
cmake [...] build -DApplications="JA2MAPEDITOR;DeathStranding" // fatal error: DeathStranding not an application
cmake [...] -DLanguages="GERMAN" // configures just German targets
cmake [...] build -DLanguages="GERMAN;ENGLISH" // German and English
cmake [...] build -DLanguages="GERMAN;ENGLISH;ALL" // ALL is in the list, configures every language
cmake [...] build -DLanguages="ENGLISH;ESPERANTO" // fatal error: ESPERANTO not supported
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
- Fix: missing buildfile entries for ModularizedTacticalAI when building a Release exe with debugInfo in VS2010
- Fix: incorrect size of an array led to variable corruption
Fix: error in Disease calculation
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@7440 3b4a5df2-a311-0410-b5c6-a8a6f20db521
- You can also open them with VS 2012
- I just changed the toolset for all projects to V100 (VS 2010) instead of V120 (VS 2013), because I don't have VS 2013 installed. If anyone can't compile with VS 2013, we simply switch back to V120 toolset
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6639 3b4a5df2-a311-0410-b5c6-a8a6f20db521
- Renamed the VS 2008 project file "ModularizedTacticalAI" to "ModularizedTacticalAI_VS2008"
- Added new project to vsprops file and changed output folder to keep it the same like the other project folders
- INFO: VS 2010 project files will be updated later by Flugente/DepressivesBrot
git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6001 3b4a5df2-a311-0410-b5c6-a8a6f20db521