1
0
mirror of https://github.com/vcmi/vcmi.git synced 2026-04-26 20:02:20 +02:00

213 Commits

Author SHA1 Message Date
Ivan Savenko 73fa2fd557 Fix regression 2026-02-20 14:02:12 +02:00
Ivan Savenko e700f48ab3 Fix crash on starting HotA campaign scenario with invalid header data 2026-02-20 12:57:29 +02:00
Ivan Savenko b1a14436e5 Fix crash on deleting map with combined artifacts 2026-02-09 17:47:06 +02:00
Ivan Savenko db608e43ed Relax mod compatibility strictness when loading saves
It is now possible to load saves made with different configuration of
submods, for example after mod update.

This is mostly to prevent save breakage for like half of our players
when 1.7.2 & hota update with Bulwark is out

Same list of "main" mods is still required, however submods can now be
rearranged if desired. In theory we can relax this requirement further,
but for now it is better to play it safe and see how this version will
work out.

Disabling submod that adds new game entities will break save as before,
and in case of disabling towns/heroes will hide these saves from save
list. Othervice, attempt to load such save will result in error mid-
load. Submods that are graphical-only or balance-only should be possible
to disable.

Enabling submods with new objects should now be possible, but in general
new objects will be considered to be banned since list of (for example)
allowed heroes is generated on map start, so heroes added mid-game will
be considered as banned and won't appear in taverns
2026-01-19 17:06:33 +00:00
Mircea TheHonestCTO 2926c01bfa Merge branch 'refs/heads/beta' into feature/nullkiller2-part2-speed
# Conflicts:
#	AI/Nullkiller2/Engine/PriorityEvaluator.cpp
#	AI/Nullkiller2/Helpers/ExplorationHelper.cpp
#	lib/gameState/GameStatePackVisitor.cpp
2026-01-02 12:37:45 +01:00
Ivan Savenko 7672bea319 Merge pull request #6485 from IvanSavenko/ai_optimize_2
[1.7.2] AI optimizations
2025-12-31 00:14:22 +02:00
Ivan Savenko 1251c8e5bc Merge pull request #6522 from IvanSavenko/hota_mapsupport
[1.7.2] Improvements for HotA h3m support
2025-12-31 00:12:38 +02:00
Ivan Savenko 4f0e383680 Optimized storage for map tiles 2025-12-30 17:50:53 +02:00
Ivan Savenko ab62124b59 More AI performance improvements for G-sized maps
Saveral optimizations for code frequently accessed by AI in mid-game on
large maps
2025-12-30 17:50:52 +02:00
Mircea TheHonestCTO 660109f5bb NK2: Fix CMap assert crash when releasing hero from prison. Should investigate the root cause too 2025-12-28 13:36:14 +01:00
Ivan Savenko c4876cfd16 Fix deserialization of hero pool when mod load order changes 2025-12-27 15:57:27 +02:00
Ivan Savenko 8014b05399 Improvements for HotA h3m support
Mostly based on the mysterious island map test results

Added support for:
- Pandoras or map events can now grant movement points
- Pandoras or map events can now specify map difficulties on which these
objects are present
- Timed events and town events can now specify map difficulties on which
these objects are present
- Creature banks now support selection of difficulty preset (number of
guards/reward) instead of random-selection
- Wandering monsters "joins only for money" flag is now supported
- Wandering monsters presence of upgraded stack can now be configured in
map
- Pyramid can now grant specific spell configured in map
- Treasure Chest, Corpse, Sea Chest, Flotsam, Tree of Knowledge can now
grant specific reward instead of randomly selected one
- Treasure Chest, Corpse, Warrior's Tomb, Shipwreck Survivor and Sea
Chest can now grant specific artifact configured in map
2025-12-23 12:38:29 +02:00
Opuszek b7496d85de move object blit order comparator to library 2025-12-17 10:12:02 +01:00
Laserlicht ecfe09f6b1 multilevel support 2025-08-01 02:21:44 +02:00
Ivan Savenko f58d08e563 Support for banned game entities in random map templates
The following entities can now be banned in a random map template
definition:
- Hero
- Artifact
- Spell
- Secondary skill

The ban follows the same rules as banning via the map settings in the
map editor.

It is also now possible to bypass dependencies and access identifiers
from mods that are not dependencies when defining:
- Banned entities in random map templates
- the chance of a hero class appearing in a tavern of a specific faction
- the chance of a spell appearing in a mage guild of a specific faction
- the chance of a hero class receiving a secondary skill

For this to work, the identifier must be specified in full, e.g.
`modName:objectName`. If the specified mod is not active, the game will
silently ignore this entry.

This behaviour is not affected by mod load order. It is possible to use
this format to access a mod that has not yet been loaded.
2025-07-14 00:18:11 +03:00
Ivan Savenko 2ad186130f Split MapDefines file on .h per class basis 2025-07-07 18:16:42 +03:00
SoundSSGood 76debab846 HasChargesLimiter now works in "bonuses" json section 2025-06-30 18:41:22 +02:00
SoundSSGood 7f9936cf10 getSourcesForSpell 2025-06-30 18:41:20 +02:00
SoundSSGood 6752ab3a75 HAS_CHARGES_LIMITER 2025-06-30 18:39:57 +02:00
Ivan Savenko 7b3d690998 Merge pull request #5731 from IvanSavenko/gamehandler_reduce
Refactoring - simplify classes derived from CGameInfoCallback
2025-05-23 16:04:27 +03:00
Ivan Savenko ff0f5290f7 CClient no longer inherits from CGameInfoCallback 2025-05-23 14:17:43 +03:00
Ivan Savenko af20b39fe6 Reduce non-const access to gamestate on server 2025-05-23 14:17:25 +03:00
Ivan Savenko 62316a6420 Per-instance bonuses for artifacts
It is now possible to give artifacts per-instance bonuses, if needed.

Unlike shared bonuses, per-instance bonuses stack if multiple instances
of same artifacts are equipped on hero.

This to implement resource-producing artifacts in line with H3 -
equipping multiple such artifacts on a single hero will give bonus from
each instance of such artifact.

Also, both existing bonuses and new instanceBonuses fields now use json
object instead of json lists. This allows easier modification of
individual bonuses of artifacts and potentially - custom icons /
descriptions for artifact bonuses.
2025-05-21 19:24:19 +03:00
SoundSSGood f614a8a7f5 Discharging conditions 2025-05-16 23:26:42 +02:00
SoundSSGood 9bbebd62e9 GrowUpArtifact pack 2025-05-16 23:20:09 +02:00
Ivan Savenko 4d4da0454f map objects hierarchy now uses IGameInfoCallback 2025-05-14 18:33:20 +03:00
Ivan Savenko 6f20235d07 Merge CPrivilegedInfoCallback into CGameInfoCallback 2025-05-14 13:42:20 +03:00
Ivan Savenko 716da918f8 Completely remove IGameCallback class
- CClient now inherits directly from CPrivilegedInfoCallback, like
IGameCallback did before. However CClient no longer needs dummy
implementation of IGameEventCallback
- CGObjectInstance hierarchy now uses CPrivilegedInfoCallback for
callback. Actual events can only be emitted in calls that receive
IGameEventCallback pointer, e.g. heroVisit
- CGameHandler now inherits directly from both CPrivilegedInfoCallback
and IGameEventCallback as it did before via IGameCallback
2025-05-14 13:39:41 +03:00
Ivan Savenko 35644da2b7 Reogranize callback-related classes on 1 file = 1 class basis 2025-05-12 22:07:09 +03:00
Ivan Savenko 4b30336d03 Fix issues detected by Sonar 2025-05-11 19:50:57 +03:00
Ivan Savenko 69de14a42f Fix crash on loading map with heroes that have combined art equipped 2025-05-07 18:05:30 +03:00
kdmcser 82870e82c9 initialize uidCounter when loading game 2025-05-05 01:19:29 +08:00
Ivan Savenko f70ad2c15b Reorganized artifact-related classes
- files now generally contain only 1 class (except for tightly coupled
classes)
- files are now located in lib/entities/artifact directory
- removed excessive includes

No changes to functionality
2025-04-29 13:29:08 +03:00
Ivan Savenko 4e8e85e3e4 Fix issues reported by Sonar, review fixes 2025-04-27 14:57:31 +03:00
Ivan Savenko f3a57f754c Fix loading of SoD & later maps 2025-04-27 14:57:31 +03:00
Ivan Savenko 829739da24 Reduce usage of implicit conversions to int 2025-04-27 14:57:31 +03:00
Ivan Savenko 4d57a8ed36 Prefer to pass CGameState as reference instead of pointer 2025-04-27 14:57:31 +03:00
Ivan Savenko a43c3fcb31 Restore save compatibility with 1.6 2025-04-27 14:57:31 +03:00
Ivan Savenko f025a3a932 Review & cleanup hiding / displaying map objects 2025-04-27 14:57:31 +03:00
Ivan Savenko f5f8ed192b Fix random map generation 2025-04-27 14:57:31 +03:00
Ivan Savenko 912c2eae94 Fix regressions 2025-04-27 14:57:31 +03:00
Ivan Savenko d1d2cf4189 Fix crashes on game start, gamestate now derives from GameCallbackHolder 2025-04-27 14:57:31 +03:00
Ivan Savenko d34b47bb20 Remove pointers from artifacts 2025-04-27 14:57:31 +03:00
Ivan Savenko cd7732456a Remove pointer to objects from TerrainTile 2025-04-27 14:57:30 +03:00
Ivan Savenko ab11d2b075 Remove quests from CMap, now solely owned by quest objects 2025-04-27 14:57:30 +03:00
Ivan Savenko bdae7285ae Objects list is now private member of CMap 2025-04-27 14:57:30 +03:00
Ivan Savenko 745040def3 Access to heroes storage in CMap is now done via public methods 2025-04-27 14:57:30 +03:00
Ivan Savenko 1f502c0548 CMap towns and heroes on map fields are now private 2025-04-27 14:57:30 +03:00
Ivan Savenko 0ada2a5ebd Map objects now use shared_ptr (game) 2025-04-27 14:57:30 +03:00
Ivan Savenko 2ca1748e96 Artifact instances are now owned solely by CMap 2025-04-27 14:57:30 +03:00