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

48 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
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
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
Michał Zaremba
be736eb1b2 fix for insert@/modify@ in JsonUtils::merge; minor typo fixes 2025-08-22 15:53:00 +02: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
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
0fa83c0478 Implemented mod-friendly loading of town building icons for campaigns 2025-06-15 17:01: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
Ivan Savenko
5e02d2a3be Improve selection of bonus when bonus grouping is active 2025-05-22 18:28:22 +03:00
Ivan Savenko
c0fb1d1b3b Replace some raw pointers with unique's or optional 2025-04-29 12:11:10 +03:00
Ivan Savenko
a061ed04de Remove usage of ConstTransitivePtr from CTown 2025-03-08 14:04:51 +00:00
Ivan Savenko
645b95ba02 Renamed LibClasses * VLC to GameLibrary * LIBRARY 2025-02-21 16:54:56 +00:00
Ivan Savenko
2362c6da21 Fixes for multiple new issues from Sonar 2025-02-21 15:57:39 +00:00
Ivan Savenko
085409bea9 Stables in Castle will now check for and give same bonuses as map stable 2025-02-18 14:35:52 +00:00
Ivan Savenko
bc624ab654 Do not add non-existing buildings to H3 towns
Such as Mages Guild 4-5 to Fortress, or all 4 special buildings to towns
without them
2025-01-02 13:46:49 +00:00
Ivan Savenko
10ad0fc760 Split CHeroHandler.cpp/.h into 1 file per class
All parts of CHeroHandler.cpp are now in lib/entities/hero
Adjusted includes to use new paths
No functionality changes
2024-10-13 14:01:09 +00:00
Ivan Savenko
a22de74323 Fixes for loading 1.5 mods in vcmi 1.6 2024-10-10 09:50:56 +00:00
Ivan Savenko
b85ccccb37 Minor refactoring of translations:
- removed unsuccessful and broken validation of translations
- pass JsonNode when registering strings to provide information on mod
source
2024-10-06 19:42:15 +00:00
Laserlicht
629da99679 fix error with description 2024-09-20 18:21:52 +02:00
Ivan Savenko
8225eb454e Added GameSettings to gamestate, potentially allowing to define game
settings per map (or in random map template)
2024-09-05 15:16:27 +00:00
Ivan Savenko
327ff01471 Implemented explicitly visitable town buildings, e.g. hota mana vortex
Added flag `manualHeroVisit` flag to town building. If this flag is set,
then building will only be activated on click and will not give its
effect on hero recrutiment, hero visit, or new day.

This allows implementing changes to Mana Vortex from HotA
2024-09-03 16:31:07 +00:00
Ivan Savenko
36c1ed670f Support for configurable town fortifications
Removed most of hardcoded checks for fort level or for presence of fort/
citadel/castle buildings.

It is now possible to define which parts of town fortifications are
provided by town buildings

Configuration for H3-like fortifications is provided in
buildingsLibrary.json and will be used automatically by mods as long as
mods have buidings named "fort", "citadel" and "castle".

Alternatively, mods can separately define:
- hitpoints of walls (shared value for all sections)
- hitpoints of central, upper and lower towers (separate values)
- presence of moat
- shooters for each tower (separate values)
2024-08-28 19:42:14 +00:00
Ivan Savenko
8ef8ffa5c4 Implemented configurable blacksmith. Deprecated ballistaYard type 2024-08-28 13:49:42 +00:00
SoundSSGood
0c5022cae8 Loading market modes from json 2024-08-24 11:51:57 +03:00
Ivan Savenko
22a126cf2d Restored replacement of town building bonuses via building upgrade 2024-08-19 11:47:13 +00:00
Ivan Savenko
abfb467f68 Cleanup old code, add compatibility for 1.5 mods 2024-08-19 11:47:13 +00:00
Ivan Savenko
01a9509ccb Remove unused code, reduce includes 2024-08-19 11:47:13 +00:00
Ivan Savenko
f1e63792f0 Greatly simplify town buildings logic 2024-08-19 11:47:13 +00:00
Ivan Savenko
57430c101f Extracted common properties of buildings into a shared file 2024-08-19 11:47:13 +00:00
Ivan Savenko
2151a7fc88 Moved configuration of rewardable town building to 'configuration' entry 2024-08-14 17:04:43 +00:00
Ivan Savenko
abdb23f78f Removed getMappedValue methods in favor of existing vstd method 2024-08-14 17:03:25 +00:00
Ivan Savenko
97f1a310df Fix miscellaneous issues discovered by Sonar 2024-08-12 18:26:30 +00:00
Ivan Savenko
4aa73b40c9 Split CTownHandler into smaller chunks 2024-07-21 18:21:48 +00:00