1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-29 23:07:48 +02:00
Commit Graph

114 Commits

Author SHA1 Message Date
Ivan Savenko
a036482a7d Fix regresssion - crash on transferring hero to next scenario 2025-07-31 21:53:55 +03:00
Laserlicht
bd090059da small refactoring 2025-06-22 00:31:33 +02:00
Ivan Savenko
b48afe0580 Fix sonar 2025-06-18 15:22:59 +03:00
Ivan Savenko
be31a7efea Add logging to debug vcmp campaign parsing failure 2025-06-18 12:31:59 +03:00
Ivan Savenko
f3d8ae81fe Fix parsing of Chronicles campaigns 2025-06-18 12:07:54 +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
ba0188ca7f Bring hero strength for campaigns in line with h3 2025-06-15 17:01:29 +03:00
Ivan Savenko
d2580d502e Remove old code 2025-06-15 17:01:29 +03:00
Ivan Savenko
ae2e6f0357 Add workaround for strange/unknown hota h3m quirk 2025-06-15 17:01:29 +03:00
Ivan Savenko
c279da0798 Minimize hardcoded logic for campaigns. Support for hota h3c's 2025-06-15 17:01:29 +03:00
Ivan Savenko
59dfa4c2d7 Load map and campaign overrides once 2025-06-15 17:01:29 +03:00
Ivan Savenko
a842dfb3c4 Support for defining new campaign regions in mods, for hota h3c 2025-06-15 17:01:29 +03:00
Ivan Savenko
1ea2ce7959 Identifier remapping support for campaigns 2025-06-15 17:01:28 +03:00
Ivan Savenko
2cd29c1893 Rework campaign bonuses storage in type-safe form
Replaced campaign bonuses from using 3 integers to store anything with
type-safe version that uses std::variant that ensures that all bonuses
are in correct state.

Also removed "interesting" solutions like storing primary skills using
bit shifts.

Prerequirement for HotA campaign support
2025-06-15 17:01:14 +03:00
Ivan Savenko
5ccb32aa4e Fix parsing of hota 1.7.3 maps/campaigns 2025-06-09 21:40:11 +03:00
Ivan Savenko
4d4da0454f map objects hierarchy now uses IGameInfoCallback 2025-05-14 18:33:20 +03:00
Ivan Savenko
6f20235d07 Merge CPrivilegedInfoCallback into CGameInfoCallback 2025-05-14 13:42:20 +03:00
Ivan Savenko
716da918f8 Completely remove IGameCallback class
- CClient now inherits directly from CPrivilegedInfoCallback, like
IGameCallback did before. However CClient no longer needs dummy
implementation of IGameEventCallback
- CGObjectInstance hierarchy now uses CPrivilegedInfoCallback for
callback. Actual events can only be emitted in calls that receive
IGameEventCallback pointer, e.g. heroVisit
- CGameHandler now inherits directly from both CPrivilegedInfoCallback
and IGameEventCallback as it did before via IGameCallback
2025-05-14 13:39:41 +03:00
Ivan Savenko
829739da24 Reduce usage of implicit conversions to int 2025-04-27 14:57:31 +03:00
Ivan Savenko
0ada2a5ebd Map objects now use shared_ptr (game) 2025-04-27 14:57:30 +03:00
Ivan Savenko
2ca1748e96 Artifact instances are now owned solely by CMap 2025-04-27 14:57:30 +03:00
Laserlicht
47cfe01141 seperate identifier 2025-04-11 00:49:26 +02:00
Laserlicht
562b3f777d code review (second batch) 2025-04-10 21:41:22 +02:00
Laserlicht
5b74f7f19e code review (first batch) 2025-04-10 21:04:24 +02:00
Laserlicht
28169b051e campaign editor 2025-04-05 22:30:31 +02:00
Ivan Savenko
c73116a010 Reduce boost includes further 2025-03-19 08:03:56 +00:00
Ivan Savenko
eb3b51a6cf Remove save compatibility with 1.5.X 2025-03-18 11:35:15 +00:00
Ivan Savenko
645b95ba02 Renamed LibClasses * VLC to GameLibrary * LIBRARY 2025-02-21 16:54:56 +00:00
Ivan Savenko
2a204ab764 Support for parsing HotA 1.7.0 campaigns 2025-02-13 19:10:29 +00:00
godric3
dea6a02e1c Fix loading vcmp campaign with specific hero used in scenario bonuses 2025-01-18 14:50:34 +01:00
Ivan Savenko
af83a3043e Merge pull request #5148 from Laserlicht/h3c_vcmp_converter
[1.6.x] h3c to vcmp converter
2025-01-04 23:19:25 +02:00
Laserlicht
dc406ae906 remove json campaign override 2025-01-02 21:42:32 +01:00
Laserlicht
c5b8a4fd61 static const for globals 2024-12-30 18:31:33 +01:00
Laserlicht
a345517776 h3c converter implementation 2024-12-25 18:40:40 +01:00
Ivan Savenko
e035cf9e63 Optimized getHeroStrength method
- replaced 4x access to bonus system with single access
- fixed formula for Diplomacy
- fxied formula for hero transfer in campaigns
- removed pointless sqrt(pow()) construct
2024-12-22 14:49:35 +00:00
Xilmi
a70f5de8c6 Merge remote-tracking branch 'upstream/develop' into develop 2024-11-07 14:35:13 +01: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
Xilmi
61fba1fedd Merge remote-tracking branch 'upstream/develop' into develop 2024-10-10 17:23:39 +02: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
Xilmi
58eeccd119 Merge remote-tracking branch 'upstream/develop' into develop 2024-09-29 12:35:44 +02:00
Laserlicht
0e1bb73994 code review 2024-09-27 18:23:02 +02:00
Laserlicht
138cbc6a81 scenario name for campaigns 2024-09-24 11:23:10 +02:00
Xilmi
a1a03d4b74 Merge remote-tracking branch 'upstream/develop' into develop 2024-09-12 14:54:39 +02:00
Xilmi
d4ee899565 Merge remote-tracking branch 'upstream/develop' into develop 2024-09-06 17:04:34 +02:00
Laserlicht
6d9385b8bd outro for RoE 2024-09-05 21:31:17 +02:00
Xilmi
581a142a20 HeroStrengthForCampaign
Make sure to take our magic-specialist to the next campaign-mission even if he's totally out of mana.
2024-09-05 17:38:27 +02:00
Ivan Savenko
a72715ad31 Merge pull request #4563 from SoundSSGood/vcmiScrolls
Improvements to the artifact creation
2024-09-05 17:10:13 +03:00
SoundSSGood
7466d7452d vcmiscrolls 2024-09-05 15:51:45 +03:00
SoundSSGood
b06426ac43 CMap removed from CArtifactSet level 2024-09-04 15:12:40 +03:00
Laserlicht
c7064377da code review 2024-09-01 12:23:10 +02:00