1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-22 22:13:35 +02:00
Commit Graph

7502 Commits

Author SHA1 Message Date
Ivan Savenko
e9690c8c54
Merge branch 'develop' into autosave_name 2024-11-06 22:06:12 +02:00
Ivan Savenko
e7bea6c3b8
Merge pull request #4852 from IvanSavenko/remove_vlc_entities_serialization
Remove remaining pointers to VLC entities from serializer
2024-11-06 22:01:11 +02:00
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
Laserlicht
164aac4db2 refresh list 2024-11-01 00:52:19 +01:00
Laserlicht
1f0847660b possibility to delete unsupported saves 2024-10-31 21:57:20 +01:00
Ivan Savenko
e45be3c5e6
Merge pull request #4850 from IvanSavenko/object_descriptions
Implemented optional descriptions for market map objects
2024-10-31 16:58:14 +02: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
0969871835
Merge branch 'develop' into mechanical_bonus 2024-10-31 15:14:51 +02: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
Xilmi
63097968d3 Merge remote-tracking branch 'upstream/develop' into develop 2024-10-31 12:29:37 +01:00
Laserlicht
452762cd78 change datetime format 2024-10-30 23:23:56 +01:00
Ivan Savenko
d39dad6cb4 Fix build 2024-10-30 17:03:48 +00:00
Ivan Savenko
a39469d165 Add save compatibility 2024-10-30 16:57:03 +00:00
Ivan Savenko
c4481f3797 Remove logic for serialization of VLC entities 2024-10-30 16:48:19 +00:00
Ivan Savenko
01d787fb5a Removed remaining cases of serialization of VLC entities 2024-10-30 16:48:18 +00:00
Ivan Savenko
c1e125b186 Remove CStack::type pointer to VLC entity 2024-10-30 16:47:02 +00:00
Ivan Savenko
d3af9f1c67 Removed pointer to VLC entity from CStackBasicDescriptor 2024-10-30 16:47:02 +00:00
Ivan Savenko
c98ac01e7a Replaced public artType member of ArtifactInstance with getter 2024-10-30 16:47:01 +00:00
Ivan Savenko
04ca8aca9f Update tests 2024-10-30 16:22:12 +00:00
Ivan Savenko
08fbcd5239 TerrainTile now uses identifiers instead of pointers to VLC 2024-10-30 16:22:11 +00:00
Ivan Savenko
dd7d190a58 Implemented optional descriptions for market map objects
It is now possible to define description of an object with 'market'
handler that will be shown on right-clicking the object.

Similarly, added description to right-click popup to Hill Fort.
2024-10-30 13:20:21 +00:00
Ivan Savenko
f8b1f40abb
Merge pull request #4348 from MichalZr6/hill_fort_changes
Hill Fort unavailable upgrade and status bar new messages
2024-10-30 14:00:35 +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
f12119f86c
Merge pull request #4812 from SoundSSGood/secSkillPlace
[Hota] SeafaringAcademy. Initial PR
2024-10-30 13:33:39 +02:00
Ivan Savenko
88a9890b56
Merge pull request #4837 from godric3/map-editor-set-hero-patrol-radius
Possibility to set hero patrol radius in map editor
2024-10-30 13:32:25 +02:00
Ivan Savenko
c1c9e2e4f0
Merge pull request #4820 from kdmcser/softDenpendency
add support for soft dependencies
2024-10-30 13:31:46 +02:00
godric3
9e9f118b09 another attempt of using CGHeroInstance::NO_PATROLLING in map editor 2024-10-29 21:41:42 +01:00
godric3
ed087b7a5b Use max ui32 value instead of -1 for NO_PATROLLING 2024-10-29 18:34:02 +01:00
Andrzej Żak
42738e20a4
Update lib/mapObjects/CGHeroInstance.h
Co-authored-by: Andrey Filipenkov <kambaladecapitator@gmail.com>
2024-10-29 08:26:31 +01:00
godric3
da5bae301a try to fix build, use plain -1 in place of CGHeroInstance::NO_PATROLLING 2024-10-28 22:46:48 +01:00
godric3
56efb82b2e try to fix build, separate definition of NO_PATROLLING in CGHeroInstance 2024-10-28 21:49:25 +01:00
godric3
394812c02a try to fix build, use inline constexpr 2024-10-28 20:58:36 +01:00
SoundSSGood
1fcd750774 suggested changes 2024-10-28 21:58:35 +02:00
godric3
a9e04428c8 Possibility to set hero patrol radius in map editor 2024-10-28 18:30:30 +01:00
Xilmi
ffd8758017 Merge remote-tracking branch 'upstream/develop' into develop 2024-10-28 17:49:08 +01: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
a97deea563
Merge pull request #4824 from IvanSavenko/translate_fix
Fixes for issues with translations
2024-10-28 12:56:50 +02:00
Ivan Savenko
db913d95e0
Merge pull request #4808 from Laserlicht/prism_breath
Bonus: prism breath
2024-10-28 12:29:41 +02:00
DjWarmonger
59a15c5ff0
Merge pull request #4790 from kodobi/bugfix/fix-incorrect-battlefield-while-attacking-town-without-fort
Fix battle setup for sieges without forts
2024-10-28 08:38:14 +01:00
Xilmi
cf8888987d Merge remote-tracking branch 'upstream/develop' into develop 2024-10-27 10:03:26 +01:00
Ivan Savenko
ec3acec8cc Implemented JSON5 line ending escapings 2024-10-26 14:21:23 +00:00
Ivan Savenko
72b0062ae3 Better integration of wog commanders translation 2024-10-26 14:21:05 +00:00
Ivan Savenko
d1164ab9a9 Integrated exchange window translation into vcmi 2024-10-26 13:09:09 +00:00
Ivan Savenko
565c02d61c Added 'translate missing' command for convenience 2024-10-26 12:54:35 +00:00
Ivan Savenko
e5739e49da Fix translation of bank names 2024-10-26 11:39:06 +00:00
kdmcser
3b72594743 add support for soft dependencies 2024-10-26 19:15:12 +08:00
Ivan Savenko
638bc174c3 Fix crash on exporting maps for translation 2024-10-25 21:41:24 +00:00
Ivan Savenko
c43844706e Implemented translation support for random map descriptions 2024-10-25 20:41:19 +00:00
Ivan Savenko
7ae5e2b406 Added support for daily income to flaggable objects 2024-10-25 19:01:00 +00:00
Ivan Savenko
ee59bc4e71 Add bonus description generation for map objects 2024-10-25 18:36:02 +00:00
Ivan Savenko
8a5ac73438 Basic support for configurable flaggable objects
Converted CGLighthouse class into FlaggableMapObject

Bonus provided by Lighthouse/Flaggable is now defined in config and is
accessible to mods.
2024-10-25 16:48:10 +00:00
Laserlicht
53b7c5da6f added MECHANICAL bonus 2024-10-24 21:30:51 +02:00
SoundSSGood
83279211e6 CSecSkillPlace done 2024-10-23 15:01:56 +03:00
Xilmi
2b99414793 Using hero's stats instead of level to determine their role.
Since there are custom maps/campaigns in which heroes have pretty high base-stats even at level 1.
2024-10-21 09:37:44 +02:00
Laserlicht
0991f02282 Bonus: prism breath 2024-10-20 22:02:56 +02:00
SoundSSGood
573bb6abc6 CArtPlace now works with artifact ID 2024-10-20 12:56:54 +03:00
Xilmi
5d6877e06d Merge remote-tracking branch 'upstream/develop' into develop 2024-10-20 00:49:17 +02:00
Laserlicht
7a190e4929 fix crash 2024-10-19 15:25:26 +02:00
kodobi
c576438a95 Fix battle setup for sieges without forts
- Update the if statement in BattleProcessor::SetupBattle to allow
  obstacles in battlefields during sieges without forts.
- Ensure towns without forts use the native battlegrounds.
- Refactor variable name from curB to currentBattle for clarity.
2024-10-17 14:54:01 +02:00
Ivan Savenko
c25aef8f48
Merge pull request #4766 from SoundSSGood/fused-artifacts
Fused artifacts
2024-10-16 15:08:20 +03:00
Ivan Savenko
e676e78e28
Merge pull request #4778 from Laserlicht/assert_fix
fix: workaround for assert
2024-10-15 18:01:31 +03:00
SoundSSGood
86d5c05ffa Fused identical artifacts 2024-10-15 16:51:29 +03:00
Laserlicht
6e65eaafbc workaround for assert 2024-10-14 21:01:01 +02:00
Laserlicht
9ed4dbaeb4 Merge remote-tracking branch 'upstream/develop' into adv_search 2024-10-14 19:52:55 +02:00
Laserlicht
129f8e6f34
code review
Co-authored-by: Ivan Savenko <saven.ivan@gmail.com>
2024-10-14 19:30:03 +02: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
cee3521f57
Merge pull request #4770 from IvanSavenko/prison_fix
Fix for loading hero types / identities
2024-10-14 18:16:53 +03:00
Ivan Savenko
678e6b47f8
Merge pull request #4756 from IvanSavenko/sonar_fixes
Fix some of the new warnings from sonarcloud
2024-10-14 18:16:41 +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
ad7f0416a7 Added overloaded version of getObjectHandler to CGHeroInstance 2024-10-13 13:06:31 +00:00
Ivan Savenko
31095248ab Removed typeName and subtypeName properties from CGObjectInstance 2024-10-13 13:05:50 +00:00
Laserlicht
11eaed9fef code review 2024-10-12 23:01:14 +02:00
SoundSSGood
d4d3ddf685 fused artifacts 2024-10-12 16:43:04 +03:00
Xilmi
533806df6d Merge remote-tracking branch 'upstream/develop' into develop 2024-10-11 19:07:56 +02:00
Ivan Savenko
c55a75cc4e Remove copy-pasted code in rewardable town building leading to hero not
registered as visitor
2024-10-11 15:02:48 +00:00
Ivan Savenko
d1e7cb72c2 Fix game gang on random map generation 2024-10-11 15:02:14 +00:00
Ivan Savenko
e221cdccab Fix initialization of hero type in map editor 2024-10-11 15:01:55 +00:00
Ivan Savenko
a8e84c55f6 Fix some of the new warnings from sonarcloud 2024-10-11 10:45:29 +00:00
Ivan Savenko
6bed497f2c Fix mod validation reporting failure for well-formed mods 2024-10-10 21:18:43 +00:00
Xilmi
61fba1fedd Merge remote-tracking branch 'upstream/develop' into develop 2024-10-10 17:23:39 +02:00
Ivan Savenko
15ad0440f7 Fix iOS build 2024-10-10 12:38:32 +00:00
Ivan Savenko
3dd4fa2528 Reduce usage of pointers to VLC entities
Final goal (of multiple PR's) is to remove all remaining pointers from
serializeable game state, and replace them with either identifiers or
with shared/unique pointers.

CGTownInstance::town and CGHeroInstance::type members have been removed.
Now this data is computed dynamically using subID member.

VLC entity of a town can now be accessed via following methods:
- getFactionID() returns ID of a faction
- getFaction() returns pointer to a faction
- getTown() returns pointer to a town

VLC entity of a hero can now be accessed via following methods:
- getHeroTypeID() returns ID of a hero
- getHeroClassID() returns ID of a hero class
- getHeroType() returns pointer to a hero
- getHeroClass() returns pointer to a hero class
2024-10-10 12:28:08 +00:00
Ivan Savenko
81f0222c68
Merge pull request #4741 from IvanSavenko/serialize_local_state
Serialize local state of player interface
2024-10-10 15:03:14 +03:00
Ivan Savenko
5aebf287b9
Merge pull request #4735 from IvanSavenko/private_pos
Reduce usages of ambiguos CGObjectInstance::pos
2024-10-10 15:00:50 +03:00
Ivan Savenko
a22de74323 Fixes for loading 1.5 mods in vcmi 1.6 2024-10-10 09:50:56 +00:00
Ivan Savenko
a8f8c3f4b1 Replaced most of accesses to CGObjectInstance::pos with anchorPoint() 2024-10-09 15:43:46 +00:00
Ivan Savenko
679181c103 Implemented serialization of local player state in json form 2024-10-08 20:04:32 +00:00
Xilmi
9a40577994 Merge remote-tracking branch 'upstream/develop' into develop 2024-10-08 16:15:22 +02:00
Ivan Savenko
c0f5c7c0ea Replace pointer with reference in pack apply functions 2024-10-07 14:59:46 +00:00
Ivan Savenko
786f80871e Replace more usages of pointers to packs with references 2024-10-07 14:59:14 +00:00
Ivan Savenko
c1c552d394 Replaced some of pointers to CPack's with references 2024-10-07 14:59:14 +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
Laserlicht
344e845684
Merge branch 'develop' into adv_search 2024-10-07 12:56:54 +02:00
Laserlicht
a826b88641
Merge branch 'develop' into spell 2024-10-07 12:55:23 +02: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
c77da2e476 Remove no longer used compatibility containers 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
cd52625657
Merge pull request #4710 from kdmcser/display_attack_type
display attack type(melee/ranged) in popup window
2024-10-06 16:04:39 +03:00
Ivan Savenko
a7027e10f4
Merge pull request #4696 from Laserlicht/color_param
color shift parameter to config
2024-10-06 16:03:45 +03:00
Ivan Savenko
f17fe6a48e
Merge pull request #4708 from IvanSavenko/subterra_pathfinder_fix
Fixes pathfinding via subterranean gates located on right edge of map
2024-10-06 16:00:09 +03:00
Ivan Savenko
9850ef5b89
Merge pull request #4718 from IvanSavenko/witch_hut_fix
Fixes randomization of Witch Hut preconfigured in map editor
2024-10-06 15:59:30 +03:00
SoundSSGood
c472b2ce5e BulkEraseArtifacts crash fix 2024-10-04 15:19:57 +03:00
Ivan Savenko
b79897f598
Merge pull request #4714 from IvanSavenko/integer_overflow_fix
Fix potential int32_t overflow when computing total army value
2024-10-03 15:35:47 +03:00
Ivan Savenko
5d64da9b6c Fixes randomization of Witch Hut preconfigured in map editor 2024-10-03 12:35:15 +00:00
Xilmi
ddfeab8748 Merge remote-tracking branch 'upstream/develop' into develop 2024-10-03 13:38:51 +02:00
Ivan Savenko
f5c2772f8d Fix potential int32_t overflow when computing total army value 2024-10-02 19:48:08 +00:00
kdmcser
60177bffab
remove bracket 2024-10-02 19:57:26 +08:00
kdmcser
4896b51a5d display attack type(melee/ranged) in popup window 2024-10-02 19:08:40 +08:00
Ivan Savenko
5aebc83bca Fixes pathfinding via subterranean gates located on right edge of map
In this case, 'pos' is actually outside of map borders, so never visible
to a player
2024-10-02 09:24:53 +00:00
Xilmi
c19d885603 Subterranean Gateway fix
Fixed an issue that caused pathfinding for player and AI not working when a subterranean gate was too close to the edge of the map.

Fixed another issue that played into pathfinding for AI not working when a subterranean gate was too close to the edge of the map.
2024-10-02 00:10:45 +02:00
Laserlicht
e85e938865 use subid 2024-10-01 20:44:08 +02:00
Laserlicht
9c6bd20159 code review 2024-10-01 16:32:28 +02:00
Ivan Savenko
f816c3306b
Merge pull request #4694 from Laserlicht/spell_cast_only_self
cast only on self
2024-10-01 17:20:20 +03:00
Laserlicht
be31041a48
"general" -> "interface" 2024-10-01 16:09:22 +02:00
Xilmi
3d9892f6b3 Merge remote-tracking branch 'upstream/develop' into develop 2024-10-01 16:08:57 +02:00
Ivan Savenko
cef7466c71
Merge pull request #4643 from SoundSSGood/CArtHandler-refactoring
CArtifactSet  tidy up
2024-10-01 16:26:32 +03:00
DjWarmonger
ffed9480e0
Merge pull request #4483 from vcmi/custom_objects_per_zone
Customizable objects in RMG zones
2024-10-01 14:58:35 +02:00
Ivan Savenko
f39d515d54
Merge pull request #4687 from dydzio0614/chain-lightning-magic-immunity
Fix chain lightning wasting effect on creatures immune to magic
2024-10-01 15:27:15 +03:00
Ivan Savenko
a4c3dd622f
Merge pull request #4685 from Laserlicht/turn_timer_load_change
turn timer and simturn change on load
2024-10-01 15:27:04 +03:00
Ivan Savenko
9c91559414
Merge pull request #4677 from IvanSavenko/rewardable_fixes
Unify rewardable map object and town building code
2024-10-01 15:26:50 +03:00
Laserlicht
844b078482 color shift parameter to config 2024-09-30 19:46:53 +02:00
Laserlicht
713fcd6543 research per day & seperate config 2024-09-30 02:40:28 +02:00
Xilmi
58eeccd119 Merge remote-tracking branch 'upstream/develop' into develop 2024-09-29 12:35:44 +02:00
Laserlicht
e6cb87abac cast only on self 2024-09-28 17:32:53 +02:00
Dydzio
63b711758f Fix chain lightning wasting effect on creatures immune to magic 2024-09-28 17:22:26 +02:00
Laserlicht
f94f0a3274 new dialog 2024-09-28 15:51:53 +02:00
Laserlicht
d929bfb9d1 rename; introduce factor 2024-09-28 15:05:13 +02:00
Laserlicht
2052a26031 code review 2024-09-28 14:25:11 +02:00
Laserlicht
1558cbdfa9 turn timer and simturn change on load 2024-09-28 13:45:04 +02:00
Laserlicht
3559f9f923 HMI for spell research 2024-09-28 01:47:32 +02:00
Laserlicht
7707adc44f checks on server 2024-09-28 01:18:10 +02:00
Laserlicht
5b2aa4dc71 swapping spells 2024-09-28 00:34:25 +02:00
Laserlicht
a9327b3fa3 netpacks 2024-09-27 22:47:22 +02:00
Laserlicht
efcac3b933 settings 2024-09-27 20:16:41 +02:00
Ivan Savenko
7f8f09c8fa
Merge pull request #4668 from Laserlicht/scenario_name
Chronicles improvements
2024-09-27 20:01:47 +03:00
Ivan Savenko
19db016473
Merge pull request #4654 from dydzio0614/any-hex-shooting
Allow targeting empty hex by shooters with multi-tile SPELL_LIKE_ABILITY
2024-09-27 19:23:33 +03:00
Laserlicht
0e1bb73994 code review 2024-09-27 18:23:02 +02:00
Ivan Savenko
69d9e34ebf
Merge pull request #4642 from Laserlicht/invincible_improvements
Invincible bonus: only blocking non positive spells; counterstrike
2024-09-27 18:58:00 +03:00
Ivan Savenko
f2c20b54d0 Unify rewardable map object and town building code 2024-09-27 15:41:24 +00:00
Ivan Savenko
072aa8aadd Remove unused method 2024-09-27 15:41:24 +00:00
Xilmi
1d831022e8 Merge remote-tracking branch 'upstream/develop' into develop 2024-09-25 14:08:34 +02:00
MichalZr6
edf43f5702 Get and translate messages on client side 2024-09-24 19:12:05 +02:00