1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00
Commit Graph

206 Commits

Author SHA1 Message Date
Ivan Savenko
da9ba62110 Merge pull request #6209 from Laserlicht/kingdomoverview_res
Kingdomoverview additional mines
2025-10-07 11:47:44 +03:00
Ivan Savenko
19ff1a224c Merge pull request #6193 from MichalZr6/mod_incompability_errors
Rework handling some errors and uncought exceptions
2025-10-05 12:15:17 +03:00
Laserlicht
46619f35fe load mine image in kingdom overview 2025-10-04 17:14:24 +02:00
Michał Zaremba
ea261ae48f Rework handling some errors and uncought exceptions 2025-10-01 11:00:56 +02:00
Laserlicht
21bc568e59 moddable amount for mines 2025-09-29 02:00:04 +02:00
Laserlicht
c9d866aed8 texts for mine 2025-09-29 01:39:50 +02:00
Laserlicht
5ae4db60e3 add mines support 2025-09-28 22:47:41 +02:00
Ivan Savenko
c469c6c31e Merge pull request #6136 from Laserlicht/resource
Configurable resources
2025-09-28 21:51:10 +03:00
Laserlicht
5da8a7a4dc use resolveidentifier 2025-09-28 19:17:39 +02:00
Laserlicht
d808bd6412 introduce toResourceType 2025-09-15 00:08:18 +02:00
Laserlicht
40062d7755 resource translation 2025-09-14 16:17:55 +02:00
Laserlicht
a3a234f8e0 kingdom overview dwellings for mods 2025-09-02 02:58:55 +02:00
Ivan Savenko
78b39688c5 Improvements for json validation for mods
- Implemented validation for `targetCondition` in spells
- Implemented validation for `mapObject` in towns/heroes
- Fixed validation of zone connections in RMG
- Added workarounds to prevent assertions triggering on invalid mods
- Erase 'base' entries from json before validation (but after applying
them to derived keys)

Should have no effect on mod behavior/support, but may cause new
detections for mods that were broken in either 1.6 or 1.7
2025-08-05 19:40:18 +03:00
Ivan Savenko
283230eb4e Add description for University using H3 string 2025-07-26 21:09:16 +03:00
Ivan Savenko
b3167a44ee Move MarketInstanceConstructor class to a separate file 2025-07-21 19:38:24 +03: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
46072a1d60 Merge pull request #5896 from IvanSavenko/code_reorganize
Split large source files into smaller files per 1 class
2025-07-08 10:47:13 +03:00
Ivan Savenko
8721bdd728 Split CCreatureSet file on .h/.cpp per class basis 2025-07-07 19:12:31 +03:00
Ivan Savenko
2ad186130f Split MapDefines file on .h per class basis 2025-07-07 18:16:42 +03:00
Ivan Savenko
ee72338c4d Add check for invalid map objects edits (e.g. dwellings) in mods 2025-07-05 19:49:16 +03:00
Ivan Savenko
e35ac0b1e5 Merge pull request #5733 from MichalZr6/mapeditor_fixes
Mapeditor fixes for various crashes
2025-06-16 17:15:29 +03:00
Ivan Savenko
463c404a83 Use bonus only as shared_ptr to avoid memory corruption 2025-06-16 16:22:21 +03:00
Michał Zaremba
ebe746d0cf Integrate EditorCallback into mapeditor
EditorCallback being set up with std::unique_ptr stored in MapController.
2025-06-15 23:47:08 +02:00
Ivan Savenko
a842dfb3c4 Support for defining new campaign regions in mods, for hota h3c 2025-06-15 17:01:29 +03:00
Ivan Savenko
54a46b77a9 Extract library entity randomization logic to separate class 2025-05-19 18:51:42 +03: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
a13ab8f013 Merge pull request #5707 from IvanSavenko/dwelling_fix
Fixes for handling of oversized map dwellings
2025-05-14 11:52:40 +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
cb70cc48d6 Fixes for handling of oversized map dwellings
- Marked large version of H3 Unicorn's Glade as not usable for random
dwelling replacement
- Shifted oversized dwellings - that have at most 2x2 as blocked tile,
but have non-blocked tile column will now be placed correctly
- This fixes incorrect random dwelling replacement of the only oversized
H3 dwelling - Portal of Glory
- Game will now detect & report invalid dwelling templates from mods
- Updated docs to clarify dwellings format
2025-05-12 18:01:46 +03:00
Ivan Savenko
6b6199d3a4 Implemented giving bonuses to commanders 2025-05-07 22:49:22 +03:00
Ivan Savenko
62e774c91e Add new rewards for configurable objects 2025-05-06 17:28:11 +03:00
Ivan Savenko
283adc37d7 Unit stack rebalancing rework
- CStackInstance::count is now private with accessor methods
- CStackInstance::experience renamed to totalExperience and now stores
total stack experience (multiplied by stack size) to reduce rounding
errors
- CStackInstance::totalExperience is now private with accessors methods
- stack experience is now automatically reallocated on stack management
- Removed buggy BulkSmartRebalanceStacks pack, that mostly duplicates
BulkRebalanceStacks
- Renamed BulkSmartSplitStack to BulkSplitAndRebalanceStack to drop
unclear "smart" in name
- Reworked split-and-rebalance logic to correctly reallocate stack
experience
2025-05-01 18:18:30 +03:00
Ivan Savenko
dca5a099d5 Remove compat code for old banks, fixes crash on loading old mods 2025-04-29 12:15:04 +03:00
Ivan Savenko
63d00b080e Removed pointer to army from StackInstance 2025-04-27 14:57:30 +03:00
Ivan Savenko
c02a8a84fd Stacks of armed instance are now unique_ptr 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
2b286378e8 Remove logic for banks in 1.5 format 2025-03-19 08:02:39 +00:00
Ivan Savenko
8f074490a7 Merge branch 'master' into 'develop' 2025-02-27 21:15:42 +00:00
Ivan Savenko
f04cac4101 Fix format string 2025-02-27 10:15:23 +00:00
Ivan Savenko
b372cc84e9 Avoid crash if object has same name as on provided in compatiblity
identifiers field
2025-02-25 15:26:16 +00:00
Ivan Savenko
645b95ba02 Renamed LibClasses * VLC to GameLibrary * LIBRARY 2025-02-21 16:54:56 +00:00
Ivan Savenko
09db3e4bef Reworked resource piles loading to fix wog maps with mithril 2025-01-25 11:40:21 +00:00
Ivan Savenko
ca4227ba9d Add debug information for crash on object randomization 2025-01-07 15:06:49 +00:00
Ivan Savenko
494d70cbf0 Reduce excessive logging 2024-11-26 13:55:46 +00:00
Ivan Savenko
6544f6d6a6 Merge pull request #4944 from IvanSavenko/market_fix
Fixes for configurable markets support
2024-11-25 13:39:20 +02:00
Ivan Savenko
f59834afe1 Fixes for configurable markets support
- string "speech" can now be translated
- removed "title" string, VCMI will now use object name instead
- moved configuration of all "markets" into a separate json file
- added schema for validation of market objects
- removed serialization of translated strings from University
2024-11-20 15:45:13 +00:00
MichalZr6
f823b8addf Following review 2024-11-19 10:57:20 +01:00
MichalZr6
7e2cad158a HillFort fix 2024-11-19 10:53:16 +01:00