1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-14 10:12:59 +02:00
Commit Graph

117 Commits

Author SHA1 Message Date
Ivan Savenko
a2c2b28dfe
Merge pull request #4859 from IvanSavenko/map_encoding_fix
Fix selection of encoding from maps
2024-11-06 22:00:59 +02:00
Ivan Savenko
ee88cfa150 Fix selection of encoding from maps
Fixes typo from previous PR
2024-11-01 13:40:29 +00:00
Ivan Savenko
6056d385ed Always load json configs from mod that references it
This should fix rather common problem with mods, where two unrelated mods
accidentally use same file name for a config file, leading to very unclear
conflict since this result in a file override.

Now all config files referenced in mod.json are loaded specifically from
filesystem of mod that referenced it. In other words, it is no longer
possible for one mod to override config from another mod.

As a side effect, this allows mods to use shorter directory layout, e.g.
`config/modName/xxx.json` can now be safely replaced with `config/
xxx.json` without fear of broken mod if there is another mod with same
path to config. Similarly, now all mods can use `config/translation/
language.json` scheme for translation files

Since this is no longer a problem, I've also simplified directory layout
of our built-in 'vcmi' mod, by moving all files from `config/vcmi`
directory directly to `config` directory.

- Overrides for miscellaneous configs like mainmenu.json should works as
before
- Images / animations (png's or def's) work as before (and may still
result in confict)
- Rebalance mods work as before and can modify another mod via standard
`modName:objectName` syntax
2024-10-31 14:49:11 +00:00
Ivan Savenko
e714a02063
Merge pull request #4849 from IvanSavenko/map_encoding
Better handling of encoding detection for maps and campaigns
2024-10-31 15:07:36 +02:00
Ivan Savenko
22f517686d Better handling of encoding detection for maps and campaigns
Now VCMI will use either preferred language or install language to load
maps and campaigns that are part of "core" mod, or, in other words -
placed in Maps directory of H3 data (like most of manually downloaded
maps and campaigns are)

If game data is in English, then game can safely use encoding of player-
selected language (such as Chinese) to load maps. After all, both GBK
and all Win-125X encoding are superset of ASCII, so English map will
always load up correctly.

Maps that are part of a mod still use mod language as before - it is up
to mod maker to correctly set up mod language.
2024-10-30 11:54:35 +00:00
Ivan Savenko
c1c9e2e4f0
Merge pull request #4820 from kdmcser/softDenpendency
add support for soft dependencies
2024-10-30 13:31:46 +02:00
kdmcser
5c5bac12eb
Update lib/modding/CModHandler.cpp
Co-authored-by: Ivan Savenko <saven.ivan@gmail.com>
2024-10-29 00:35:32 +08:00
kdmcser
123f3923d3
Update lib/modding/ContentTypeHandler.cpp
Co-authored-by: Ivan Savenko <saven.ivan@gmail.com>
2024-10-29 00:35:03 +08:00
Ivan Savenko
565c02d61c Added 'translate missing' command for convenience 2024-10-26 12:54:35 +00:00
kdmcser
3b72594743 add support for soft dependencies 2024-10-26 19:15:12 +08:00
Ivan Savenko
604e3b5c67
Merge pull request #4763 from IvanSavenko/herohandler_split
Split CHeroHandler.cpp/.h into 1 file per class
2024-10-14 19:05:48 +03: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
a8e84c55f6 Fix some of the new warnings from sonarcloud 2024-10-11 10:45:29 +00:00
Ivan Savenko
2399a5a765
Merge pull request #4712 from IvanSavenko/detect_conflict
Detection of potential conflicts between mods
2024-10-07 17:57:52 +03:00
Ivan Savenko
8e4152bc81 It is now possible to define objects directly in mod.json instead of
using path to file with object definition
2024-10-06 19:42:15 +00:00
Ivan Savenko
1488629628 Add simple support for translation of strings that were changed by
another mod
2024-10-06 19:42:15 +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
Ivan Savenko
66fdad145c Added an option to configure validation level in launcher 2024-10-06 19:21:33 +00:00
Ivan Savenko
3e3f842fbe Respect dependencies when checking for filesystem conflicts 2024-10-06 17:20:58 +00:00
Ivan Savenko
d849e53499 Implement detection of mod compatibility patches 2024-10-06 16:11:32 +00:00
Ivan Savenko
d0aba56a5e Analyze json object modifications to detect mod conflicts 2024-10-06 13:58:41 +00:00
Ivan Savenko
2439d176a0 Analyze filesystem of mods to detect potential mod conflicts 2024-10-06 13:58:41 +00: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
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
4aa73b40c9 Split CTownHandler into smaller chunks 2024-07-21 18:21:48 +00:00
Ivan Savenko
1aa391fdf8 Split CGeneralTextHandler file into 1 file per class form
All text processing code is now located in lib/texts.
No changes other than code being moved around and adjustment of includes

Moved without changes:
Languages.h           -> texts/Languages.h
MetaString.*          -> texts/MetaString.*
TextOperations.*      -> texts/TextOperations.*

Split into parts:
CGeneralTextHandler.* -> texts/CGeneralTextHandler.*
                      -> texts/CLegacyConfigParser.*
                      -> texts/TextLocalizationContainer.*
                      -> texts/TextIdentifier.h
2024-07-20 12:55:17 +00:00
Alexander Wilms
02e429e973 Fix typos using https://github.com/crate-ci/typos
Changes were reviewed manually
2024-06-24 03:47:19 +02:00
Ivan Savenko
3bea383b59 Merge branch 'vcmi/beta' into 'vcmi/develop' 2024-06-21 12:58:36 +00:00
Ivan Savenko
4e9feca8d4 Validate mod.json as json5 instead of strict json since Android launcher
no longer exists
2024-06-19 19:59:06 +00:00
Ivan Savenko
b4c6906471 Merge branch 'vcmi/beta' into 'vcmi/develop' 2024-06-11 19:22:23 +00:00
Ivan Savenko
9de6023224 Removed no longer needed pseudo-languages 2024-06-08 15:31:40 +00:00
Ivan Savenko
df83fa33a1 Merge branch 'vcmi/master' into 'vcmi/develop' 2024-05-31 09:34:21 +00:00
Ivan Savenko
5d6470e527
Merge pull request #4025 from IvanSavenko/shared_ptr_lib
[1.6] Use shared_ptr for library entities
2024-05-30 19:14:06 +03:00
Ivan Savenko
7461df161c lib now uses shared_ptr for entities. Removed manual memory management. 2024-05-17 15:04:05 +00:00
Ivan Savenko
65f63e862c Tweaks to modding docs & error reporting based on discovered issues 2024-05-16 15:14:36 +00:00
Ivan Savenko
30e0a16ee9 Fix some 'new' issues reported by Sonar Cloud 2024-05-06 15:33:30 +00:00
Ivan Savenko
151075f088 Fix save compatibility with 1.4 that was broken by artifact costumes 2024-04-28 20:54:33 +03:00
Andrii Danylchenko
39e19f79f4 Fix #3754, #2316 2024-04-27 13:57:50 +03:00
Ivan Savenko
3e23a55c66 Fix build 2024-04-23 17:15:59 +03:00
Ivan Savenko
1840666327 Implemented join room dialog 2024-04-23 17:15:59 +03:00
Ivan Savenko
e5f8cefa7f Store and send mod list and game version for game rooms 2024-04-23 17:15:59 +03:00
Ivan Savenko
6ba6e0d55b Moved serialization of ModCompatibilityInfo from MapFormat 2024-04-23 17:15:59 +03:00
Ivan Savenko
6af2609e0f Do not write mods that do not affect gameplay to saved games 2024-04-18 19:13:02 +03:00
Ivan Savenko
ecc88fabc1 Disable translation validation due to too many false positives 2024-04-18 19:12:39 +03:00
Ivan Savenko
ea48976fba Disable failing assertion 2024-04-16 18:54:25 +03:00
Tomasz Zieliński
3e3959d360 Move all OH3 objects and obstacle sets to a mod 2024-04-08 12:50:41 +02:00
Evgeny Malygin
25125f96da
Fix: licenses, pragma guards, StdInc 2024-03-29 07:48:52 +02:00
godric3
acceca0139 map editor: Allow to customize hero spells 2024-03-24 10:01:20 +01:00
Ivan Savenko
29860848a5 Cleanup 2024-02-26 12:55:49 +02:00
Ivan Savenko
922966dcf8 Renamed JsonNode::meta to more logical modScope. Member is now private 2024-02-26 12:55:49 +02:00