1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-24 08:32:34 +02:00
Commit Graph

86 Commits

Author SHA1 Message Date
Macron1Robot
13ea6e39f0 Update CModHandler.cpp
Removed checking of defaultMods.json values
2014-04-28 23:15:36 +04:00
Macron1Robot
2355f3abe1 Update CModHandler.cpp
Corrected errors
2014-04-28 11:07:44 +04:00
Macron1Robot
13cd400d27 Update CModHandler.cpp
Corrected error handling in CModHandler::loadConfigFromFile
2014-04-28 11:03:54 +04:00
Macron1Robot
8ec7a9b919 Moved "max heroes on map per player", "max heroes available for player" to "defaultMods.json" 2014-04-27 10:43:46 +04:00
Ivan Savenko
333a51a48a Launcher now supports submods. See forum thread for details. 2014-03-20 17:06:25 +00:00
Ivan Savenko
7f6f125b4c First part of submods support.
- VCMI will load mods from Mods directory recursively. Submods must be
placed into additional Mods directory, e.g.
<data dir>/Mods/<mod name>/Mods/<submod name>

- submods will be loaded only if their parent mod was enabled
- submods namespace for objects will be "<parent mod ID>.<submod ID>"

- TODO: Launcher is not aware of submods yet (seems to be working but
may behave incorrectly)
2014-03-15 10:57:34 +00:00
Ivan Savenko
d2ae847ecf - files in local directories (saves & configs) now always have higher
priority than mods. Fixes #1685 and #1733
- fixed possible crash on exit in dispose() function
- (vcmibuilder) fixes problem with partial mp3 -> ogg conversion
2014-03-08 16:05:23 +00:00
alexvins
4203d69525 Part 2 of new spell configuration
1) spell handler refactored to support modding in general way
2) imunnity icons moved to WoG as they depends on wog`s graphics
3) introduced new class template for handlers (todo: use this in other handlers)
4) save format changed
5) introduced "absolute immunity" - unaffected by "the Orb" etc. (todo: use it in config)
6) new format documented on wiki, added json schema.

* more split of registertypes - fixes 32 mingw build
2014-03-07 13:21:09 +00:00
Ivan Savenko
94a6e02107 - found yet another missing victory condition, fixes 1684 2014-02-02 11:05:05 +00:00
Ivan Savenko
27be6a8f13 - new mods (not mentioned in modSettings.json) will be enabled by
default
2014-01-30 14:51:15 +00:00
Ivan Savenko
bc1e726be4 - fixed crash on loading modsettings.json from 0.94 2014-01-09 20:15:32 +00:00
Ivan Savenko
2c4c964a45 Large rewrite of adventure map objects:
- replaced CDefObjInfo with ObjectTemplate class
- ObjectTempate is a direct member of objects instead of pointer with
shared ownership across CMap, handler and game objects
- simplified handling of objects that can change appearance (e.g. towns)
- all object queries regarding object appearance/blockmaps use h3m pos
instead of relative positions
- removed need of modhandler::reload
- cleanup of some old code
2014-01-02 23:48:38 +00:00
Ivan Savenko
7e02f6b670 Support for overriding victory/defeat conditions from h3m map or
campaign:
- new file MapFormatJson that implements small subset of Json map
format, as described on wiki
- vcmi will read overrides from file config/mapOverrides.json (currently
empty)
- Json writer for logical expressions

TODO: write data for map overrides
2013-12-30 23:09:58 +00:00
Ivan Savenko
0c5be52a42 Win/loss conditions based on logical expressions, yet another large
changeset:
- victory/defeat will be detected using triggered events
- vcmi will convert h3 conditions into set of triggered events
- it is possible to either change number of days without towns or even
remove this loss condition completely
- possibility of custom win/loss text and icons in pregame (no longer
connected to win/loss conditions)

Still missing:
- No interface to pass custom events/victory conditions into the game 
- AI would benefit from improvemets (handle all victory conditions,
select best one to fulfill)
- You have X days till defeat message still hardcoded to 7 days
2013-12-29 11:27:38 +00:00
Ivan Savenko
c7899fc14a - improved detection of missing files
Now vcmi will detect situations when file is present in another mod
which is not marked as dependency
2013-12-13 08:53:44 +00:00
Ivan Savenko
ed329c5a1f - minor refactoring for filesystem, moved checksum calculation to
loading stage from initialization
- fixes for launcher
2013-12-11 17:12:39 +00:00
Ivan Savenko
ee1b0459e6 Extended building dependencies:
- buiding/structure lists must use object format. This may break some
outdated mods.
- generic support for logical expressions that consist from and/or/not
operators.
- string ID's for buidings are now actually used.
2013-12-02 11:58:02 +00:00
Ivan Savenko
2b3405fa50 - minor optimizations
- fixed incorrect error reporting in launcher
- set WoG version to "0.0.0" so full version will be installed from repo
in future
- updated debian required packages list
- launcher will be enabled by default
2013-11-14 13:21:09 +00:00
Ivan Savenko
29d655c621 Trying to organize mod handler a bit better.
- vcmi will now generate checksum for base game (H3 data)
- only text files in Data in config directories affect checksum
2013-11-11 20:11:51 +00:00
Ivan Savenko
f691061d94 A bit improved error reporting for checksum calculation. 2013-11-10 13:43:55 +00:00
Ivan Savenko
29e98b2d51 - modhandler will only validate new, changed or mods that failed
validation last time.
- fixed several issues with modSettings.json file
- some refactoring of modhandler, still needs some work.
2013-11-09 19:10:16 +00:00
Ivan Savenko
dd73573c5c - vcmi can now calculate crc32 checksum of a file
- reorganized internal filesystem structure - all files from one mod are
now grouped in same FS node
- modhandler will now calculate crc32 checksum for each mod
- modhandler now knows validation status of each mod

todo - use checksum to determine mods that have not changed since last
start and disable validation for them.
2013-11-08 20:36:26 +00:00
Ivan Savenko
71d6b0fea9 - Fixed some warnings from cppcheck
- Minor improvements to JSON validation
- Cleanup in SDL_Extensions.cpp
- Implemented new propery for creature format: idle animation duration
- Disabled idle animation of some of conflux creatures (was clearly
broken)
2013-11-06 13:42:58 +00:00
Ivan Savenko
c4716d0a9a - reordered files in cmake so files with long compile times will be
compiled first.
- changed format of modSettings.json, VCMI should properly update file
on the first run.
- implemented property "defaultTavern" that acts as default value for
"tavern" entry in hero class and town formats.
2013-11-03 12:07:23 +00:00
Ivan Savenko
208df34fc2 bigfixing & new file: launcher/jsonutils.cpp
- launcher uses json parser from vcmi lib instead of one from Qt #1469
- fixed abilities overrides for some creatures #1476
- fixed hero portraits in seer huts #1402
- ttf fonts will render text in utf-8 mode. Not really useful at this point
- new settings entry, available in launcher: encoding. Unused for now.
2013-09-21 18:29:26 +00:00
Ivan Savenko
5654fef901 - ZipArchive namespace for operations with zip archives, located in CZipLoader.h/cpp.
- new fields in mod format, for use with mod manager (check config/shemas/mod.json for details)
- removed some 0.92 compatibility from mods loading
- several compile fixes
2013-08-19 11:50:53 +00:00
Ivan Savenko
b87897096c Filesystem handling is now more flexible
- removed CResourceLoader class in favor of one that implements resource loader interface
- removed global pool of files, in favour of more dynamic approach
- renamed some files to match current situation
All these changes are needed mostly for future mod manager + .zip support
2013-07-28 14:49:50 +00:00
Michał W. Urbańczyk
0eb496fb57 Fixed #1338 and #1341. Introduced post-load step to ease initialization of bonus source ids. 2013-07-21 14:19:29 +00:00
Ivan Savenko
f82122d9be second part of c++11 update. gcc 4.5 and VS 2010 are no longer supported
- BOOST_FOREACH -> for
- replaced several boost classes with std (e.g. unordered)
- removed gcc-4.5 workarounds
- ran clang c++11 migration tool to detect some cases:
- - pointer initialized with "0" to nullptr
- - replace for with iterators with range-based for
- - use auto in some situations (type name specified twice, avoid long iterators type names)
2013-06-29 13:05:48 +00:00
Ivan Savenko
2b45e13c5c c++03 -> c++11 switch:
- use std versions of function, bind and ref
- OVERRIDE -> override
- NULL -> nullptr
- use std versions of random distributions

NOTE: this may be last revision that supports gcc-4.5
2013-06-26 11:18:27 +00:00
Michał W. Urbańczyk
1e8e932323 Logging around #1237. Typos. 2013-05-30 12:14:39 +00:00
Ivan Savenko
dca8e9fa6f - removed access to one wog file
- removed way to avoid dependency checking in identifiers resolution
- minor fixes
2013-05-21 22:11:44 +00:00
Ivan Savenko
b20f8fd3d4 - fixed uninitialized access into modHander
- fixed  #389
2013-04-28 15:06:14 +00:00
Ivan Savenko
ecb644fce4 - fix to last commit 2013-04-26 07:40:46 +00:00
Ivan Savenko
8297102350 - some groundwork for wog optionality
- moved wog artifacts to wog mod
2013-04-25 21:50:55 +00:00
Ivan Savenko
8273f323b1 - it is possible to edit data of another mod or H3 data via mods
- mods can access only ID's from dependenies, virtual "core" mod and itself (optional for some mods compatibility)
- metadata field for JsonNode, used to track source mod
- moved wog creatures into wog mod
- (linux) convertMP3 option for vcmibuilder for systems where SDL_Mixer can't play mp3's
2013-04-25 14:03:35 +00:00
Ivan Savenko
c6cc6e6301 Large changeset, first part of editing H3 objects via mods feature. Changes:
- loading of all objects (including H3 objects) will be directed by mod handlers
- common base for all handlers accessible from mod system (IHanderBase)
- json format changes: use struct with string ID's instead of vector

- fixed some gcc/clang errors and warnings
- fixed several cases of memory leaks and invalid memory access (mostly related to usage of bonus system and/or identifiers resolution)

Note that right now loading is much slower than before due to excessive json validation (or not fast enough validator)
2013-04-21 12:49:26 +00:00
beegee1
c7c2686379 - Integrated the logging API into the client and the lib - Remove some more comments and switched to /// style - Fixed recursive locks - Added Global.h to CMakeLists(now visible in qt-creator) - Removed usage of shared_mutex - Added unique_ptr to CLogger targets 2013-04-09 14:31:36 +00:00
beegee1
ee51c5beb5 - Renamed /lib subfolders to lowercase 2013-04-07 10:48:07 +00:00
Ivan Savenko
0307639c32 properly initialize settings when configuration was not found 2013-04-02 21:39:32 +00:00
Ivan Savenko
c927913f5f - Improved json validation. Now it support most of features from latest json schema draft
- Set of schemas in config/schemas directory that are used to validate input from mods.
2013-04-02 17:06:43 +00:00
Ivan Savenko
b413d80ccc - better logging of some config files errors
- restored lvl 10 for some dragons
2013-03-09 13:16:35 +00:00
alexvins
2eb8263e51 Basic Configuration for bonus types
* introduced new handler BonusTypeHandler
* config\bonusnames.json converted to common format and splitted info main and localizable parts
* hanlders initialization refactored
2013-03-06 18:49:56 +00:00
Ivan Savenko
f306d7bb70 some changes towards editing H3 objects via mods. Should be stable, report if not.
- removed duplicated json loading code in handlers
- simpler and mod-friendly handling of combined artifacts
- reorganized CCreature to avoid huge number of fields in one structure
2013-03-02 16:55:51 +00:00
DjWarmonger
5f4fb22f53 Several fixes to combined artifacts added via mods. 2013-03-02 09:11:52 +00:00
mateuszb
10fbe7b11e primary skill identifiers for bonuses 2013-02-25 09:48:26 +00:00
DjWarmonger
ce15eb37c2 - Fixed serialization of limiters
- Hero can now can have several separate specialty nodes
- Fixed typo (speciality->specialty)
- Fixed several crashes related to commanders
- Improvements to specialty handling, bugfixes and temporary solutions for upcoming hero specialties in mods
2013-01-17 18:15:00 +00:00
alexvins
68e91ada1c [refactor]
* spells are now more configurable (unused yet, WiP)
* a few more cleanups
2013-01-15 14:20:48 +00:00
Ivan Savenko
7e7d12095b - basic support for dependencies\conflicts for mods
- adventure map objects transparency should be more similar to h3
2013-01-10 18:53:49 +00:00
alexvins
4bc2fd5519 [c::b] renamed map subfolder to workaround dependency tracking bug 2013-01-03 12:19:20 +00:00