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

85 Commits

Author SHA1 Message Date
Ivan Savenko
06d17f709d fixed compatibility code for resource-granting buildings 2014-06-23 20:47:09 +03:00
Ivan Savenko
09d595e385 - Implemented "mapObject" entry for hero classes
- Updated schemas
- Some bugfixing
2014-06-16 19:27:26 +03:00
Ivan Savenko
89b89ff85d Bugfixing. Game seems to be working without major bugs. 2014-06-15 23:25:10 +03:00
Ivan Savenko
836c466f81 - Implementation of overrides for towns
- Converted dwellings.json into new format
- Implemented "mapObject" entry in town format
- Removed capital/fort/village fields from town in favor of overrides
2014-06-15 19:43:01 +03:00
Ivan Savenko
44742814cd More cleanup:
- moved SoundBase.h to lib since it contains shared data
- added RMG info to object format. Note that data is not yet imported in
configs
- slightly updated API of object handlers
2014-06-05 23:51:24 +03:00
Ivan Savenko
0afdfa529c Moved all object-related files to lib/mapObjects directory.
Renamed some classes to more readable names
2014-06-05 14:19:47 +03:00
Ivan Savenko
7e057b6df8 Bugfixing, game can finally load to main menu without crash 2014-06-04 11:25:13 +03:00
Ivan Savenko
32b6568b65 Merged changes from upstream and fixed compilation caused by API changes 2014-06-03 22:45:18 +03:00
Ivan Savenko
7f276185bd Moving files:
- new config for objects (config/objects/generic.json)
- renamed lib/CDefObjectHandler to lib/CObjectClassesHandler
2014-05-24 02:07:54 +03:00
DjWarmonger
4ea9810831 First version that works:
- Covered RMG with exceptions
- Fixes for object randomization & placement
2014-05-23 17:12:31 +02:00
Ivan Savenko
b5160acbac Finalization of object type handler interface
- updated code to use new interface
- removed old DefObjHandler (todo - rename file)

Summary:
- most code but loading is now in place
- type names may deserve improvements (some of them are too similar)
- still barely compiles and not tested
2014-05-16 23:50:02 +03:00
Macron1Robot
7c1d3d17fc Update CTownHandler.cpp
Corrected hadling of null "produce" section for legacy mod to make it more readable
2014-04-28 10:48:00 +04:00
Macron1Robot
907caedb13 Added "produce" section in "building" structure. Changed dailyIncome. 2014-04-26 18:23:35 +04:00
Macron1Robot
b7b890acff Added "tavernVideo","guildBackground" to "faction" JSON config and schema. If "primaryResource" is set to "gold", silo will generate 500 gold per day 2014-04-24 23:36:18 +04: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
29f4a12814 - fixed some evil memory leaks
- fixed recursive dependency of castles
2013-12-19 19:43:16 +00:00
Ivan Savenko
7d7e65a316 changes in hero class format:
- new property: affinity (might/magic) since in mods it is impossible to
rely on odd/even numeric indexes
- property commander is now part of hero class
2013-12-13 18:27:54 +00:00
Ivan Savenko
5de70ba235 Minor fixes:
- properly re-enable necessary mods during update
- do not crash if building border is fully-colored
2013-12-08 10:07:06 +00:00
beegee1
30b3081ac4 - Fixed castle.json (building structures) 2013-12-07 12:23:43 +00:00
Ivan Savenko
122db9963b More string ID's for buildings:
- town hall slots now use string ID's
- converted building requirements to new format
- "upgrades" property from buildings now uses string ID's
- several fixes for improved support of alternative creatures
- removed no longer needed "id" property from structures

Old mods should still work but will produce error messages during
validation
2013-12-04 10:36: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
27a30b5ff9 - compile fix
- fixed crash if json defines only one creature horde
2013-11-24 11:36:51 +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
76c77d58f6 const-ified CTown. May fix #1444 2013-09-06 21:57:16 +00:00
Ivan Savenko
b57b14b752 - fixed several bugs with siege graphics, including #1389
- removed "shooterHeight" property - seems to be same in all towns.
2013-07-31 22:24:44 +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
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
Michał W. Urbańczyk
c920f29c45 More missing serialization items. 2013-05-20 17:25:19 +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
3285f1910b - finally, solution for imageIndex fields. All image lists will be generated in runtime
- iconIndex fields from json are no longer used
- simple check for missing icons on startup
2013-04-22 19:51:22 +00:00
Ivan Savenko
4db13ba845 - proper destructors for handlers and lib objects 2013-04-21 16:38:31 +00:00
Ivan Savenko
2ea1051395 - fixed uninitialized pointer 2013-04-21 14:08:46 +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
Ivan Savenko
0cf969d508 - console logger by default uses same format as previously (no extra data)
- a lot of changes in configs;
- - update to creature format - abilities are now json structure
- - multiple bugfixes revealed by validation
- made schemas a bit more strict
- creatures data can be replaced via mods
- it is possible to validate vcmi configs using schemas (disabled)
2013-04-11 19:24:14 +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
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
alexvins
ceea466f54 [refactor] spell handling
* more config options for spells
  + mind immunity handled by config
  + direct damage immunity handled by config
  + immunity icon configurable
- removed mind_spell flag 
* more use of new spell identifacation
2013-02-13 19:35:43 +00:00
mateuszb
9c1a117c1c * refactoring 2013-02-12 22:24:48 +00:00
mateuszb
8a8eecd063 * refactoring 2013-02-11 19:11:34 +00:00
mateuszb
86dc9386d6 * refactoring, including a generic solution for IDs 2013-02-10 23:24:57 +00:00
mateuszb
9dd60b6dbe * refactoring
* moat damage went to config file
2013-02-08 21:17:39 +00:00
mateuszb
f1c78e3260 * creature ID refactoring
* double week creatures are configurable now
2013-02-07 17:34:50 +00:00
mateuszb
8769f67c5d * JsonReader can convert to enums
* refactoring
2013-02-03 21:05:44 +00:00
mateuszb
ba3075317f * proper bool serialization
* refactoring towards more enums/typedefs
2013-02-02 19:28:39 +00:00
Ivan Savenko
5deb499e7e Last breaking change into mod system (will explain on forum)
- paths in "filesystem" node are now relative to mod directory
- "filesystem" entry in mod.json is now optional
- made "register object" log messages visible only in log
- minor fixes, including #1173
2013-01-16 14:28:49 +00:00
Ivan Savenko
8824f5e2d5 - H3 creatures use subset of mod creature format (todo - unify code)
- creatures configs moved into confg/creatures files, similar to factions.
 - creatures ID's use same camelCase format as the rest of the game
2012-12-22 16:47:12 +00:00
DjWarmonger
0e06ac15ad - Commanders are now a part of faction config
- Support for external dwellings for new towns
2012-12-19 16:35:58 +00:00
Ivan Savenko
94c55e2632 - string ID's for spells (not configurable due to hardcode)
- spell chances in new towns guilds can be specified in config
2012-12-18 10:32:11 +00:00
Ivan Savenko
ff146a80fe - fixed empty tavern in new towns
- by default new heroes\new towns will be enabled on maps (no effect without mods)
2012-12-17 12:55:29 +00:00