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

8405 Commits

Author SHA1 Message Date
Ivan Savenko
aeddeb2612 Fix loading of subtypes for HAS_ANOTHER_BONUS limiter 2025-07-14 21:04:46 +03:00
Ivan Savenko
c4cb794760 Add workaround for mods that use "true" (string) instead of real bool 2025-07-14 21:04:26 +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
Ivan Savenko
a0a99d7311 Fix build, fix sonar 2025-07-13 23:03:45 +03:00
Ivan Savenko
246010c13e Update docs, fix inconsistencies between config & code 2025-07-11 19:20:53 +03:00
Ivan Savenko
b1aff17e82 Remove hardcoded checks for town portal from AI code 2025-07-11 18:03:18 +03:00
Ivan Savenko
f51c7c5c28 Removed hardcoded AI logic for Water Walk and Fly spell 2025-07-11 17:38:03 +03:00
Ivan Savenko
b0c511149d Removed hardcoded checks for Summon Boat spell 2025-07-11 17:11:01 +03:00
Ivan Savenko
7a1ede1e38 Adventure spell API refactoring to ease use by AI 2025-07-11 16:47:37 +03:00
Ivan Savenko
55bd4bc8bf Support for custom cursors for adventure map spells 2025-07-11 16:06:21 +03:00
Ivan Savenko
5ada2d19e1 UI now shows spell range from config 2025-07-11 12:06:01 +03:00
Opuszek
709f456ef5 Fixes mirror spell reflecting berserk 2025-07-10 18:02:39 +02:00
Ivan Savenko
79f3126c63 (somewhat) configurable adventure map spells
- All adventure map spells have most of their parameters in json.
- Parameters of adventure map spells can now be defined separately per
each mastery level.
- It is now possible to add a new spell that will have effect similar to
H3 adventure map spell
2025-07-10 15:55:41 +03:00
Ivan Savenko
d3263a9a26 Merge pull request #5905 from IvanSavenko/sonar
Fix some sonar warnings and convert formatting from spaces to tabs
2025-07-10 15:54:40 +03:00
Laserlicht
eaf1e11045 add banned objects to mapeditor 2025-07-09 22:18:55 +02:00
Ivan Savenko
e12765dca0 Fix sonar warnings, convert spaces -> tabs 2025-07-09 17:52:51 +03:00
Ivan Savenko
ac06f3d557 Merge pull request #5897 from Opuszek/fix_magic_mirror_spell
Fix magic_mirror spell
2025-07-09 12:37:33 +03:00
Ivan Savenko
5caf43a63c Merge pull request #5900 from IvanSavenko/bonus_limiters
Bonus limiters refactoring
2025-07-09 11:12:11 +03:00
Ivan Savenko
09ac0f1806 Merge pull request #5851 from Laserlicht/max_range_spell
max range for spell cast
2025-07-09 11:05:37 +03:00
Ivan Savenko
e3be6cc513 Merge pull request #5892 from Laserlicht/spell_school
custom spell schools in spell book
2025-07-09 11:04:27 +03:00
Laserlicht
3b63b837cc fix 2025-07-08 21:47:03 +02:00
Opuszek
7135005d89 fix problems 2025-07-08 16:20:09 +02:00
Ivan Savenko
4af7949571 Bonus limiters refactoring
- Split massive `parseLimiter` method in smaller chunks
- Added alternative format for limiters with named parameters instead of
unclear `parameters` entry that often leads to bugs in mods. Old format
is still available.
- Added detailed validation for limiter format
- Converted vcmi json's to use new format
- Removed parameter-less `CREATURE_FACTION` and `SAME_FACTION` limiter.
They are unused in mods and have unclear use-case that can be replaced
by other limiters
- Expanded documentation on limiter types

All mods that were supported before should still be supported
2025-07-08 13:01:08 +03:00
Laserlicht
cf32f00472 hide bonus 2025-07-08 11:59:16 +02:00
Laserlicht
ca8cfaf0ad Merge branch 'develop' into max_range_spell 2025-07-08 11:36:23 +02:00
Laserlicht
b6e8731329 code review 2025-07-08 10:34:11 +02:00
Opuszek
00d5c3bca1 Update lib/spells/BattleSpellMechanics.cpp
Co-authored-by: Ivan Savenko <saven.ivan@gmail.com>
2025-07-08 10:04:36 +02:00
Opuszek
c78e8aa69f Update lib/spells/BattleSpellMechanics.cpp
Co-authored-by: Ivan Savenko <saven.ivan@gmail.com>
2025-07-08 10:04:23 +02:00
Opuszek
1393ac0420 Update lib/spells/BattleSpellMechanics.cpp
Co-authored-by: Ivan Savenko <saven.ivan@gmail.com>
2025-07-08 10:02:48 +02:00
Opuszek
7fc25319ee Update lib/spells/BattleSpellMechanics.cpp
Co-authored-by: Ivan Savenko <saven.ivan@gmail.com>
2025-07-08 10:02:37 +02:00
Opuszek
4eaa337eb3 Update lib/spells/BattleSpellMechanics.cpp
Co-authored-by: Ivan Savenko <saven.ivan@gmail.com>
2025-07-08 10:00:27 +02: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
fb8535d1cf Merge pull request #5882 from Laserlicht/save_stat
Statistics in highscore screen
2025-07-08 10:21:02 +03:00
Ivan Savenko
40f7de1342 Merge pull request #5889 from IvanSavenko/bonus_fixes
Fixes for bonus system
2025-07-08 10:05:38 +03:00
Laserlicht
9c101af161 object selector 2025-07-07 21:17:04 +02:00
Opuszek
94ad9d536b Update lib/spells/BattleSpellMechanics.cpp
Fixes a lambda's captured values in BattleSpellMechanics.

Co-authored-by: Ivan Savenko <saven.ivan@gmail.com>
2025-07-07 21:11:57 +02:00
Opuszek
f7bd9de59f fixes formatting 2025-07-07 21:00:42 +02:00
Ivan Savenko
4c2d67eb45 Fix build 2025-07-07 20:58:53 +03:00
Ivan Savenko
33431adb27 Apply formatting on changed files 2025-07-07 19:19:17 +03:00
Ivan Savenko
8721bdd728 Split CCreatureSet file on .h/.cpp per class basis 2025-07-07 19:12:31 +03:00
Opuszek
c472427d8c Fix magic_mirror spell 2025-07-07 18:09:23 +02:00
Ivan Savenko
2ad186130f Split MapDefines file on .h per class basis 2025-07-07 18:16:42 +03:00
Ivan Savenko
ddff11184a Split AdventureSpellMechanics file on .h+.cpp per class basis 2025-07-07 17:28:16 +03:00
Ivan Savenko
4fc63427b9 Fix events on .vmap's not activating on hero visit 2025-07-07 12:41:45 +03:00
Laserlicht
23301b99dd fix 2025-07-07 03:47:29 +02:00
Laserlicht
3e6162a37a custom spell schools in spell book 2025-07-07 03:29:27 +02:00
Ivan Savenko
200850f56f Add COMBAT_MANA_BONUS for Skyship 2025-07-06 15:36:51 +03:00
Ivan Savenko
9070db4a96 Garrisoned hero is now attached to townAndVis node, not to town itself 2025-07-06 14:39:57 +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