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

107 Commits

Author SHA1 Message Date
Laserlicht
6fa342321c fix resource silo warning 2025-09-29 20:28:43 +02:00
Ivan Savenko
c469c6c31e Merge pull request #6136 from Laserlicht/resource
Configurable resources
2025-09-28 21:51:10 +03:00
Laserlicht
e6def84135 revert handlers 2025-09-28 20:34:48 +02:00
Laserlicht
5da8a7a4dc use resolveidentifier 2025-09-28 19:17:39 +02:00
Laserlicht
6c6350ad8b code review 2025-09-21 22:07:57 +02:00
Michał Zaremba
c3e6448c78 Log error when upgrade is same building ID 2025-09-18 17:46:33 +02:00
Laserlicht
5a8f75f11d convert to vector 2025-09-16 22:58:05 +02:00
Laserlicht
230144dd04 fix 2025-09-16 02:28:37 +02:00
Laserlicht
7d1e661e6f mithril removal 2025-09-16 02:07:25 +02:00
Laserlicht
3ec731ef6e json validation & mithril remove 2025-09-16 01:52:47 +02:00
Laserlicht
2bf9454b77 multiple fixes 2025-09-16 01:29:54 +02:00
Laserlicht
257803a69b text identifiers from game files 2025-09-15 00:44:11 +02:00
Laserlicht
d808bd6412 introduce toResourceType 2025-09-15 00:08:18 +02:00
Laserlicht
81c64ce54f fix icon index 2025-09-14 18:10:05 +02:00
Laserlicht
f250e6103c image support 2025-09-14 17:05:48 +02:00
Laserlicht
ded1a70dd7 fix prices 2025-09-14 15:04:02 +02:00
Laserlicht
62ca532291 resource identifier 2025-09-14 14:36:02 +02:00
Michał Zaremba
be736eb1b2 fix for insert@/modify@ in JsonUtils::merge; minor typo fixes 2025-08-22 15:53:00 +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
f773b87cd5 Add debug logging for mods with invalid town building config 2025-07-31 21:58:27 +03:00
kdmcser
0bdf99ef12 display lack id building 2025-07-27 13:40:21 +08:00
Ivan Savenko
81d09aee14 Add workaround & logging for mods that use incorrect building ID's 2025-07-20 16:21:53 +03:00
Ivan Savenko
abd43e77cf Merge pull request #5922 from IvanSavenko/simple_building_config
Simplify town buildings configuration
2025-07-17 16:12:29 +03:00
Ivan Savenko
ae284e9c16 Simplify town buildings configuration
Goal is to minimize amount of copy-pasted parts of town building
configuration and to reduce chance of modders accidentally breaking it.

For example, Grail in any town produces 5k gold and requires artifact to
be built. No need to copy-paste this in any town. And if modder wants to
more unique Grail, he provide custom parameters that will override
default properties.

As a bonus, since all building ID's are now in config, modders can use
it for reference instead of searching for examples

Changes:

- All H3 buildings now have entry in buildingsLibrary.json.
- Moved all common parameters of town buildings to buildingsLibrary.json
- Added all new building ID's to buildingsLibrary.json - level 8
dwelling, additional upgrades of dwellings & hordes
- Removed hardcoded mapping of strings to building ID's from code.

Should not break any existing mods, or cause them to fail validation
2025-07-14 15:31:01 +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
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
bd88ae18aa Merge pull request #5844 from IvanSavenko/bonus_fixes
Fixes to bonus system functionality
2025-06-30 11:58:42 +03:00
Ivan Savenko
e31f4367a4 Merge pull request #5814 from Laserlicht/mage_guild
Mage guild configurable
2025-06-30 11:56:46 +03:00
Ivan Savenko
6ac57a7cfc Improvements to bonus system node types / propagators
- Node type is now set on construction and never changes
- Added army propagator that also checks for TOWN and HERO
- Renamed existing propagators to be in sync with enumeration
2025-06-25 17:34:20 +03:00
Laserlicht
14f0b82f17 configurable window position 2025-06-19 19:48:02 +02:00
Laserlicht
fac8fb5952 allow to position spells in mage guild 2025-06-19 15:59:09 +02:00
Laserlicht
21db022547 seperate image for each mage guild level possible 2025-06-19 15:03:34 +02:00
Ivan Savenko
463c404a83 Use bonus only as shared_ptr to avoid memory corruption 2025-06-16 16:22:21 +03:00
Ivan Savenko
0fa83c0478 Implemented mod-friendly loading of town building icons for campaigns 2025-06-15 17:01:29 +03:00
Ivan Savenko
2bf951a4cf Support for objects from mods as campaign scenario bonuses 2025-06-15 17:01:15 +03:00
Ivan Savenko
022b0f731c Fix configs, update docs, resolve discovered regressions 2025-06-15 14:36:29 +03:00
Ivan Savenko
8d20c1d733 It is now possible to configure power of generic skill & creature
specialties
2025-06-15 14:36:29 +03:00
Ivan Savenko
ab0f6ed8cd Simplified hero creature specialties logic 2025-06-15 14:36:29 +03:00
Ivan Savenko
e0de65d56c Reworked & fixed DARKNESS bonuses and lookout tower / skyship logic 2025-06-15 14:36:29 +03:00
Ivan Savenko
f71db8af07 Configurable Conflux University 2025-06-15 14:36:29 +03:00
George King
bc40845340 9 Commanders artifacts 2025-06-14 07:32:13 +02:00
Ivan Savenko
eb9a5bb71b Implement shortcut for hero skill specialties
Should make changes to secondary skill bonuses less mod-breaking, and
reduce chances of incorrectly defined specialties in mods
2025-06-04 20:02:47 +03:00
Ivan Savenko
0945654672 Give custom descriptions to unclear H3 abilities and artifacts 2025-05-25 11:56:54 +03:00
Ivan Savenko
a8fdcf7823 Merge pull request #5735 from IvanSavenko/artifact_bonuses
Per-instance bonuses for artifacts
2025-05-23 16:03:59 +03:00
Ivan Savenko
5e02d2a3be Improve selection of bonus when bonus grouping is active 2025-05-22 18:28:22 +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
Ivan Savenko
25655184d3 Add support for custom icons & descriptions for bonuses 2025-05-21 14:57:10 +03:00
Ivan Savenko
07662a070f Merge pull request #5724 from IvanSavenko/randomization
Better randomization logic
2025-05-21 13:50:28 +03:00