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

115 Commits

Author SHA1 Message Date
Andrii Danylchenko
6314fc0506 Fix destructor order 2023-02-15 20:37:18 +02:00
Ivan Savenko
35775b90f8 Moved bonus names to translation 2023-01-25 12:36:02 +02:00
Ivan Savenko
e48bd39b9c Moved road & river handlers into a separate file 2023-01-11 15:17:24 +02:00
Ivan Savenko
4f3ea0d1d9 Renamed Terrain.h/cpp -> TerrainHandler.h/cpp 2023-01-10 00:01:35 +02:00
Ivan Savenko
1468f6aded Converted terrainTypeHandler into proper handler class 2023-01-10 00:01:35 +02:00
krs
eecaa20693 Resource extractor "enablers" are now command line options
In VCMI_lib the extractArchives will be passed all the way down the call chain!
2022-11-27 19:35:10 +02:00
Tomasz Zieliński
f386f42166 Merge remote-tracking branch 'origin/develop' into terrain-rewrite
# Conflicts:
#	lib/Terrain.cpp
#	lib/Terrain.h
#	lib/battle/CBattleInfoEssentials.cpp
#	lib/rmg/ObstaclePlacer.cpp
#	lib/rmg/RiverPlacer.cpp
2022-09-27 07:50:17 +02:00
Andrey Filipenkov
ff635edc0b wrap all library code into namespace if VCMI_LIB_NAMESPACE is defined
preparation for having client and server in a single process
2022-09-24 15:55:21 +03:00
Tomasz Zieliński
a5077245a8 Merge remote-tracking branch 'origin/develop' into terrain-rewrite
# Conflicts:
#	lib/Terrain.cpp
#	lib/Terrain.h
2022-09-23 20:01:13 +02:00
Andrey Filipenkov
7e6ed0583c disable all scripting code when configuring without scripting modules 2022-09-21 19:31:42 +03:00
Tomasz Zieliński
c9c4603f75 Firts working version that launches original maps 2022-09-21 13:43:57 +02:00
Tomasz Zieliński
494b0f0226 First version that compiles 2022-09-21 11:34:23 +02:00
Nordsoft91
ad01c7ffce
Vlc obstacles [part 1] (#888)
* obstacles content handler, entity service and VLC integration
2022-09-15 11:06:54 +03:00
Andrii Danylchenko
4b4cc3cf4b battlefields in VLC and custom bonuses for terrain patches 2022-09-11 11:31:27 +03:00
Nordsoft91
aaa07e4d2e New terrain support - part 1 (#755)
Initial support of new terrains
2022-09-11 11:31:26 +03:00
AlexVinS
ecaa9f5d0b Entities redesign and a few ERM features
* Made most Handlers derived from CHandlerBase and moved service API there.
* Declared existing Entity APIs.
* Added basic script context caching
* Started Lua script module
* Started Lua spell effect API
* Started script state persistence
* Started battle info callback binding
* CommitPackage removed
* Extracted spells::Caster to own header; Expanded Spell API.
* implemented !!MC:S, !!FU:E, !!FU:P, !!MA, !!VR:H, !!VR:C
* !!BU:C, !!BU:E, !!BU:G, !!BU:M implemented
* Allow use of "MC:S@varName@" to declare normal variable (technically v-variable with string key)
* Re-enabled VERM macros.
* !?GM0 added
* !?TM implemented
* Added !!MF:N
* Started !?OB, !!BM, !!HE, !!OW, !!UN
* Added basic support of w-variables
* Added support for ERM indirect variables
* Made !?FU regular trigger
* !!re (ERA loop receiver) implemented
* Fixed ERM receivers with zero args.
2021-02-14 19:05:43 +03:00
Dmitry Orlov
854a2e6c39 Feature: Mods system improvement, Part III. Bunusing buildings customization. 2021-01-14 01:02:13 +03:00
Dmitry Orlov
195fb8ff41 Mod system improvement Part I : Fix content losing after deserialization 2020-10-10 00:31:23 +03:00
AlexVinS
0b70baa95e Spells configuration version 2 (effect-based)
* Indirect spell effects loading
* Json serializer improvements
* spell->canBeCastAt do not allow useless cast for any spell
* Added proxy caster class for spell-created obstacles
* Handle damage from spell-created obstacles inside mechanics
* Experimental GameState integration/regression tests
* Ignore mod settings and load only "vcmi" mod when running tests
* fixed https://bugs.vcmi.eu/view.php?id=2765 (with tests)
* Huge improvements of BattleAI regarding spell casts
* AI can cast almost any combat spell except TELEPORT, SACRIFICE and obstacle placement spells.
* Possible fix for https://bugs.vcmi.eu/view.php?id=1811
* CStack factored out to several classes
* [Battle] Allowed RETURN_AFTER_STRIKE effect on server side to be optional
* [Battle] Allowed BattleAction have multiple destinations
* [Spells] Converted limit|immunity to target condition
* [Spells] Use partial configuration reload for backward compatibility handling
* [Tests] Started tests for CUnitState
* Partial fixes of fire shield effect
* [Battle] Do HP calculations in 64 bits
* [BattleAI] Use threading for spell cast evaluation
* [BattleAI] Made AI be able to evaluate modified turn order (on hypothetical battle state)
* Implemented https://bugs.vcmi.eu/view.php?id=2811
* plug rare freeze when hypnotized unit shots vertically
* Correctly apply ONLY_MELEE_FIGHT / ONLY_DISTANCE_FIGHT for unit damage, attack & defense
* [BattleAI] Try to not waste a cast if battle is actually won already
* Extended JsonSerializeFormat API
* fixed https://bugs.vcmi.eu/view.php?id=2847
* Any unit effect can be now chained (not only damage like Chain Lightning)
** only damage effect for now actually uses "chainFactor"
* Possible quick fix for https://bugs.vcmi.eu/view.php?id=2860
2018-02-08 11:37:21 +03:00
Henning Koehler
fbab52eb18 added basic handler for loading secondary skill bonuses 2017-08-26 09:33:08 +12:00
AlexVinS
143ff682bc Logging cleanup 2017-08-10 21:59:55 +03:00
ArseniyShestakov
b52cfe5283 Code style: use parentheses for creating heap-based objects (#344) 2017-07-16 12:58:05 +03:00
Arseniy Shestakov
dbcd79c48a Code cleanup: remove double and unneded semicolons 2017-07-12 22:01:10 +03:00
AlexVinS
3216422307 Fixed a few CWE-457 2016-11-27 22:07:01 +03:00
Vadim Markovtsev
d0beb27197 Add git commit hash into the version string 2016-10-23 15:45:47 +02:00
AlexVinS
cf1d5d0bc9 tweaks 2016-08-30 11:45:05 +03:00
DjWarmonger
2e70d8a084 - VCMI will now read templates from mods
- Added partial schema for RMG template
2015-05-26 18:19:41 +02:00
AlexVinS
685deddac1 Start spell-relatet files reorganisation
* moved existing files to separate directory
-> todo: split mechanics
2015-02-26 08:39:48 +03:00
AlexVinS
aa5e9fc959 get rid of global debug macros. 2015-02-14 22:43:16 +03:00
DjWarmonger
530a3e69bf Option to allow / ban certain types of town in a template. 2014-10-30 10:00:29 +01:00
Ivan Savenko
ab475195ac Banks now use new scheme as well
- Implemented Bank Constructor object.
- Merged Pyramid object into common Bank class. Banks can now grant
spells as part of their reward.
- Move bank config code to config/objects/creatureBanks.json. Note: WoG
banks are not updated yet, should be moved to WoG mod.
- Updated AI code so it can correctly evaluate bank danger (should be
generic enough for use with other objects)
- New files JsonRandom.* that contain routines for loading random
objects from Json (still WiP but should be stable)
2014-06-22 13:39:40 +03:00
Ivan Savenko
0a71e89f58 Created large number of missing objects in configs
Minor bugfixes in code
2014-06-17 14:57:47 +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
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
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
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
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
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
beegee1
1ac328635a - Added handler classes CRmgTemplateStorage and CTerrainViewPatternConfig to LibClasses
- Re-organized CMapGenerator
- Created CZone and CTemplate objects in the heap and used pointers
- Added stub classes CZoneGraphGenerator and CZonePlacer (include warnings of unused variables, please ignore them)
- Fixed CRandomGenerator bug that always the same number was produced
- Better structure of Visual Studio project files with using filters
- Updated project files (VS, CMake)
- Excluded compiler warning mismatched-tags (false positive)
- Fixed a bug when compiling with unit tests enabled
2013-08-17 12:46:48 +00:00
Ivan Savenko
1d9139303a introduced zip support into vcmi
- minizip library is now part of sources, located at lib/minizip
- cmakefiles will compile minizip as dynamic library (Note: only 2 files used by vcmi are included in minizip.so)
- zip files can be loaded similar to other archives via filesystem.json
- mods can use Content.zip instead of Content/ directory. Files in directory will replace files in archive.
2013-07-30 15:02:55 +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
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
b20f8fd3d4 - fixed uninitialized access into modHander
- fixed  #389
2013-04-28 15:06:14 +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
f10ba48c77 - Fully integrated new logging API(ERM, Editor, missing parts) - Removed old logger 2013-04-11 15:58:01 +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
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