1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-08-10 22:31:40 +02:00
Commit Graph

18879 Commits

Author SHA1 Message Date
Ivan Savenko
3479ec9651 Per-hero artifact scoring for NKAI
AI now has better (but not perfect) system for scoring artifacts.

All artifacts now have their base score, based on bonuses provided by
the artifact. For composite artifacts, AI will also consider bonuses
from its components.

When exploring, AI will now weight artifacts as min(base score, price /
5), meaning even artifacts that AI can't score will still have some
priority, if only to sell them or deny them to enemy

AI will now also consider what to equip when trading with heroes or on
the end of AI pass. When considering what to equip, hero will use base
score of an artifact, adjusted by how relevant particular bonus /
artifact for a hero. Some examples:
- Morale-bonusing artifacts have their score reduced based on percentage
of undeads in the army, all the way to 0 for undead-only troops
- Artifacts that give spells (books, hat) will have score reduced based
on how many of these spells are already known by hero
- Land movement artifacts have zero score while on water and vice versa
- Necromancy artifacts will have zero score if hero does not have
necromancy
- Archery artifacts are scaled by amount of ranged troops, and only used
if hero has archery skill

AI may still equip 'bad' artifact, however this should only happen if
hero has no other artifacts to equip into said slot.

TODO's for future PR's (although not sure if / when I will work on
these):
- avoid equipping duplicates of the same artifact. Most notably with
scrolls, but may happen with other misc artifacts or rings.

- consideration for various spell-immunity neclaces

- consideration for birectional artifacts, like Shackles of War, or some
Spheres - since these artifacts need consideration on what our expected
enemy is to correctly estimate whether

- equipping artifacts based on immediate need - for example, equipping
recovery artifacts before end of day, equipping legion pieces only in
town on day 7, preparing for strong / weak enemies (or even preparing
for specific enemy in advance)

- transferring resource-generating artifacts and such to scout heroes,
allowing main hero to focus on combat

- ensure that AI can equip combined artifacts even if non-primary slots
are in use - by considering whether score of combined artifact is higher
than score of all used slots
2025-01-18 13:14:24 +00:00
Ivan Savenko
ce0ddfd580 Merge pull request #5260 from IvanSavenko/version_bump_164
Version bump to 1.6.4
2025-01-12 17:33:34 +02:00
Ivan Savenko
d935a19504 Merge pull request #5250 from IvanSavenko/optimize_ai
BattleAI optimizations
2025-01-12 14:20:30 +02:00
Ivan Savenko
d32090292e Version bump to 1.6.4
Release date TBD
2025-01-12 12:19:27 +00:00
Ivan Savenko
8c3cd666ad Merge pull request #5255 from GeorgeK1ng/czech_update
Czech translation update
2025-01-12 14:14:36 +02:00
Ivan Savenko
5bfc837a8f Fix regressions from battlehex PR (mostly related to towers) 2025-01-12 11:07:50 +00:00
Ivan Savenko
14320fb100 Fix spawned wandering monsters not correctly attached to bonus system 2025-01-12 11:06:45 +00:00
Ivan Savenko
3d1bf03a25 Fix potential concurrent access 2025-01-12 11:06:00 +00:00
George King
58011b8f9c Add files via upload 2025-01-11 12:57:08 +01:00
George King
97ba56f7c5 Add files via upload 2025-01-11 12:49:21 +01:00
George King
1610a1a44a Add files via upload 2025-01-11 12:48:55 +01:00
Ivan Savenko
48473b18f6 move checks for invincible bonus to UnitState & cache 2025-01-10 21:15:37 +00:00
Ivan Savenko
5cff9af236 Reduce BattleAI logging 2025-01-10 19:45:35 +00:00
Ivan Savenko
40bff74195 Use small vector for unit list 2025-01-10 18:58:46 +00:00
Ivan Savenko
797b62fd46 Try to implement lazy evaluation for reachability map 2025-01-10 17:43:45 +00:00
Ivan Savenko
2d5b5d94e7 Optimize computation of reachability map 2025-01-10 15:38:28 +00:00
Ivan Savenko
3b35c679ce Optimize Unit::getHexes method 2025-01-10 15:07:59 +00:00
Ivan Savenko
5375d61d1b Optimize battleAdjacentUnits method 2025-01-10 14:27:12 +00:00
Ivan Savenko
a44bbf4527 Merge pull request #5044 from MichalZr6/battle_hex_array
New container for BattleHexes. Refactors aiming for quick-battle better performance.
2025-01-10 15:32:05 +02:00
Ivan Savenko
f3c88b5bc7 Merge pull request #5208 from godric3/map-editor-improve-inspector
map editor: show edited values in inspector
2025-01-10 15:25:29 +02:00
Ivan Savenko
ca21adc93f Merge pull request #5227 from kambala-decapitator/cmake-improvements
CMake improvements
2025-01-10 15:24:44 +02:00
Ivan Savenko
b2331fb069 Merge pull request #5248 from vcmi/master
Merge master -> beta
2025-01-10 14:53:34 +02:00
Ivan Savenko
ff598b6eec Merge pull request #5242 from IvanSavenko/kirre_fix
Fix not accounting for movement points limit on land bonuses
1.6.3
2025-01-09 21:59:03 +02:00
Ivan Savenko
699709adf0 Fix not accounting for movement points limit on land bonuses 2025-01-09 19:34:24 +00:00
Ivan Savenko
7f706b7749 Merge pull request #5237 from vcmi/beta
Merge beta -> master
2025-01-09 15:30:39 +02:00
Ivan Savenko
8789bea783 Merge pull request #5236 from IvanSavenko/release_163
Preparation for release 1.6.3
2025-01-09 14:57:46 +02:00
Ivan Savenko
99e57b81ef Preparation for 1.6.3 release on december, 10th 2025-01-09 12:19:43 +00:00
Ivan Savenko
3725ca868a Update changelog 2025-01-09 12:19:08 +00:00
Ivan Savenko
4e3dd80e46 Merge pull request #5230 from dydzio0614/vietnamese-translation
Vietnamese translation update by Hunter8x from Discord
2025-01-09 12:59:08 +02:00
Ivan Savenko
ed268159f8 Merge pull request #5231 from dydzio0614/random-hero-info
Replace random hero info in scenario info window with generated hero data
2025-01-09 12:58:55 +02:00
Ivan Savenko
662e0f8541 Merge pull request #5222 from kambala-decapitator/use-sdl_ttf-type
use TTF_Font from SDL_ttf directly
2025-01-09 12:58:34 +02:00
Ivan Savenko
4eeaf22f4d Merge pull request #5228 from MichalZr6/update_polish_translation
Update polish translation in .ts files
2025-01-09 12:58:00 +02:00
Ivan Savenko
3d384b2ec3 Merge pull request #5229 from IvanSavenko/ai_optimize_test
[1.6.3] AI performance-related changes
2025-01-09 12:57:37 +02:00
Dydzio
420bc24430 Vietnamese translation by Hunter8x from Discord 2025-01-09 01:01:55 +01:00
Ivan Savenko
ec9dbfd667 Remove excessive recomputations of tile owners 2025-01-08 20:07:42 +00:00
Ivan Savenko
82e8db3037 Do not compute threats that are too far away to be useful 2025-01-08 20:07:42 +00:00
Ivan Savenko
9f56c00336 Reduce excessive FoW updates 2025-01-08 20:07:42 +00:00
Ivan Savenko
566249a10f Switch NKAI back to non-graph mode 2025-01-08 20:07:42 +00:00
Ivan Savenko
f8312737bb Merge pull request #5224 from IvanSavenko/misc_fixes
Fixes for 1.6.3
2025-01-08 22:06:57 +02:00
Dydzio
eb4b8fdddd Replace random hero info in scenario info window with generated hero data 2025-01-08 21:01:15 +01:00
Ivan Savenko
e27ca391b1 Fix counter-attack counting 2025-01-08 16:06:31 +00:00
Ivan Savenko
9fe8ee9380 Fix size of tiny popup windows, such as terrain right-click 2025-01-08 14:33:30 +00:00
MichalZr6
b95128bea5 Update polish.ts files 2025-01-08 15:25:47 +01:00
Andrey Filipenkov
3839b2cc06 [cmake] improvements 2025-01-08 15:37:20 +03:00
Andrey Filipenkov
ea30496472 [cmake] install() vcmiqt target only when it's shared 2025-01-08 15:37:20 +03:00
Andrey Filipenkov
249c6d4d09 [macOS] ignore ad-hoc codesigning for Intel builds 2025-01-08 15:37:19 +03:00
Andrey Filipenkov
2ec518fdf0 [cmake] link NKAI to TBB 2025-01-08 15:37:17 +03:00
Andrey Filipenkov
db5d77362a [fuzzylite] force C++14 standard
doesn't build under C++17 due to using removed symbols
2025-01-08 15:22:21 +03:00
Andrey Filipenkov
4e4684cedf [cmake] set some policies 2025-01-08 15:22:21 +03:00
Andrey Filipenkov
6323e7b4da [macOS] run hdiutil under sudo only on CI 2025-01-08 15:22:21 +03:00