1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-26 08:41:13 +02:00
Commit Graph

255 Commits

Author SHA1 Message Date
Michał W. Urbańczyk
f95e6c233b It is possible to set on visit query that object is to be removed after visit is over.
Fixes #1263.
2013-05-14 13:42:52 +00:00
DjWarmonger
a7ed3ee3d0 Fixed #987 2013-04-27 08:11:20 +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
DjWarmonger
a9cfb4bddb Refactoring, fixed #1255 2013-04-22 13:23:53 +00:00
Ivan Savenko
4db13ba845 - proper destructors for handlers and lib objects 2013-04-21 16:38:31 +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
Michał W. Urbańczyk
d1d67caa0b Get rid of some old serialization workaround code that is not needed because serializer was improved in the meantime.
Fixing #1254.
Fixed possible race causing corruption of the server savegame.
2013-04-20 18:44:55 +00:00
Michał W. Urbańczyk
e8354908c3 Big change: Introduced new mechanism to handle queries. It should not cause any visible changes ATM apart from fixing several long-standing bugs realted to handling post-visit/battle/levelup callback, including infamous creature bank issues: #955, #1053, #1063, #1191. Needs testing.
Minor changes:
* default log level set to trace
* LOG_TRACE raii guardian lifetime will last till the end of block
* compile fixes
* minor refactorings
2013-04-20 11:34:01 +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
DjWarmonger
c8bb363a45 Fixed Death Stare of Commanders, additional tweaks. 2013-03-30 20:09:50 +00:00
Ivan Savenko
a9fe9e9e8b - fixed #1229 and #1245 2013-03-29 19:15:52 +00:00
Ivan Savenko
c4c592b773 - bugfixing: #1243, #1227, #1241, #1236, #1233 2013-03-14 20:44:00 +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
mateuszb
dbec99ffc7 * PlayerColor and TeamID refactoring 2013-03-03 17:06:03 +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
Michał W. Urbańczyk
d45a554fec Significant changes to saving system. Now both client and server store their lib part.
Desync detection upon loading. Fixed many desyncs. (more remain)
Monsters won't have creature count 0 even if that is set as creature properties.
2013-02-18 22:37:22 +00:00
mateuszb
560315bc48 * SlotID refactoring 2013-02-16 14:03:47 +00:00
Michał W. Urbańczyk
12e627ec49 Fixed #1206. 2013-02-14 13:19:03 +00:00
mateuszb
9e00090c42 * refactoring, a few intriguing problems remain 2013-02-13 23:55:42 +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
bda766b697 * refactoring 2013-02-12 19:49:40 +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
Michał W. Urbańczyk
13b3d23b26 Finally working hero crossover in campaigns.
Uncovered new secrets of h3m.
2013-02-09 18:18:55 +00:00
mateuszb
d03dbf64a6 * refactoring 2013-02-09 12:56:35 +00:00
mateuszb
0003d30991 * refactoring 2013-02-08 22:42:46 +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
af5287c193 * fixed opening custom campaign selection window
* artifact positions refactored
* vstd::advance allows moving between enum values
2013-02-06 23:24:43 +00:00
mateuszb
3958364884 * a bit more work on campaigns; hero crossover still buggy 2013-02-06 10:16:44 +00:00
mateuszb
25663ce7af * fixed vector<bool> serialization
* refactoring
2013-02-04 19:43:16 +00:00
DjWarmonger
5b00d74e1a Fixed commanders starting with 2^32 experience. 2013-02-04 19:22:19 +00:00
DjWarmonger
e63747d2d2 Fixed #860 and #1169
Imprisoned heroes as well as their commanders will get full level ups, with updated specialty, mana and movement.
2013-02-04 12:32:53 +00:00
mateuszb
ba3075317f * proper bool serialization
* refactoring towards more enums/typedefs
2013-02-02 19:28:39 +00:00
alexvins
b376ac8568 refactor map loading, few small tweaks 2013-02-02 17:20:31 +00:00
DjWarmonger
beb1ca1bf8 - getDate function now uses enum for different modes
- Fixed Black Market (#1195)
- Fixed one-week bonuses removed eveyr day (#976)
2013-02-02 08:29:57 +00:00
mateuszb
c4e03ef0de * enum serialization/deserialization (si32 as basetype ought to be enough for anybody)
* some fields in classes refactored to use appropriate enums (not yet finished)
2013-02-01 22:04:25 +00:00
mateuszb
a1da195b85 * minor refactoring 2013-01-31 20:11:25 +00:00
DjWarmonger
5194569053 - Fixed #1190
- Fixed incorrect shield effect
2013-01-29 06:47:20 +00:00
DjWarmonger
f6acc8c77b Added dummy message for artifacts that don't have pick-up texts. 2013-01-22 21:50:43 +00:00
Michał W. Urbańczyk
6232a1b369 Fixed #1181. Do not change that setProperty to setPropertyDer, it has to be as it is.
Sketchy fix for BattleAIs colliding ith their callbacks.
2013-01-21 21:34:30 +00:00
Ivan Savenko
46eb0b3daf - wrokaround/fix for #1177
- removed assert in Fonts.cpp (can be triggered a lot by old pregame\battles code)
- fixed battle console text positioning
- fixed some new compiler warnings
2013-01-20 22:49:34 +00:00
DjWarmonger
fff7909958 - Fix for hero specialties (creature type limiters)
- Improved handling of new heroes / arts, check forum for fresh mod packages :)
2013-01-20 16:31:18 +00:00
Michał W. Urbańczyk
0e826915ed Fixed #1176. 2013-01-20 12:06:18 +00:00
DjWarmonger
1e90de3c9f Some more fixes for limiters and specialties. 2013-01-19 18:52:13 +00:00
DjWarmonger
79062eb15c - Parsing hero specialty is working (though complicated)
- Some obvious fixed for limiters, more work needed
2013-01-19 17:38:37 +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
alexvins
264ce77ec9 [refactor] a few more cleanups 2013-01-13 12:40:24 +00:00
alexvins
f4ee750d64 [refactor] a few more cleanups 2013-01-12 13:53:02 +00:00
alexvins
daf2c285e9 [refactor] reduce some code duplication, get rid of few magic nombers.
*fix deletion of empty pandora box
2013-01-12 10:32:03 +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
beegee1
0311e5e6f5 - Added basic mock/test generation - Added stub for terrain editing 2013-01-06 19:30:12 +00:00
alexvins
4bc2fd5519 [c::b] renamed map subfolder to workaround dependency tracking bug 2013-01-03 12:19:20 +00:00
DjWarmonger
743a0fc3f4 Added string identifiers to artifacts.
Some of them have lost some abilities, needs more work.
2012-12-25 17:23:26 +00:00
alexvins
616cedb2f2 get rid of few more magic numbers (obj types)
+stub for wog objects
2012-12-24 15:07:30 +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
alexvins
66d9edf76e small refactor secskill limit check. 2012-12-18 11:24:13 +00:00
Ivan Savenko
e36bc50504 - support for new heroes and hero classes
- moved hero-specific data from text handler to CHero
- moved hero classes-specific data into heroClasses.json
2012-12-16 13:47:53 +00:00
Ivan Savenko
ffe8b99369 - reorganized hero classes
- artifact iconIndex should work
- new file with hardcoded string constants: lib/StringConstants.h

Note: some minor bugs, will fix soon:
- slow to open hero window
- hero adventure map images serialization is broken\incorrect
2012-12-14 15:32:53 +00:00
DjWarmonger
cff758cfba Moved artifact-related text to CArtifact class. 2012-12-06 19:03:47 +00:00
Ivan Savenko
85a23e298c - generic string ID -> numeric ID resolution system
- - hero army and creature upgrade names are resolved using new system
- - faction names and creatures in towns are resolved using new system
- (linux) replaced build_data.sh with hopefully better vcmibuilder script
- minor fixes
2012-12-03 16:00:17 +00:00
Ivan Savenko
c9dd80ea6d - moved json-related functions (e.g. ParseBonus) into JsonUtils namespace
- replaced JsonNode::toStdVector with more universal convertTo
- some renaming in StartInfo
2012-12-02 12:21:44 +00:00
beegee1
105083dd70 * Code convention updates * Default values for CMap types * Updated BinaryReader c-tor * Converted "bool" int types to bool in CMap classes * Removed map event operators in favor of member methods 2012-11-06 16:39:29 +00:00
beegee1
a878f5f79a * Separated map loading from the map object * Moved map classes to lib/Map * Renamed map.h/cpp to CMap.h/cpp * Profiling of map loading is now optional * Updated CMemoryStream 2012-11-03 13:30:47 +00:00
beegee1
720deba838 * Added comments to map.h * Refactoring(renamed attributes, some steps towards coding guidelines, ..) 2012-10-26 17:51:05 +00:00
Ivan Savenko
306d64b0c4 - it is possible to read json file with vector
- town configuration:
- - all town-related texts are now in TownHandler
- - alignments are now part of faction
- - removed CTown::bonus field
2012-10-05 13:11:26 +00:00
DjWarmonger
4bacd97497 Quests now handled by pointers again, this time without bugs.
Fixed some issues with quests and AI.
2012-10-03 14:49:29 +00:00
Ivan Savenko
07f9cb16c5 - spellbook fix (#1110)
- possible fix for kingdom overview (#1109)
- tweaks for recruit window (part of #1113)
2012-09-30 10:35:17 +00:00
mateuszb
657ed41088 * fixed bug in campaigns
* turned off artifacts.json creation
* minor changes
2012-09-29 17:36:48 +00:00
Michał W. Urbańczyk
8bb4abb75a * VCAI: fixed possible endless loop of realizing GATHERRESOURCE goal
* an assertion failing when quest object cannot find its targeted monster ("crash early" policy), related to #1076
2012-09-28 16:20:18 +00:00
Michał W. Urbańczyk
1fce4770fb Fixed crash when starting a game with new creatures on map using „Creature N” placeholders in armies. 2012-09-28 10:17:07 +00:00
Ivan Savenko
15a7f43e11 - fixed #1075, #1080, #1081
- fixed some warnings from cppcheck
2012-09-26 13:13:39 +00:00
mateuszb
f3f4a7633d * fixed 1085
* fixed starting hero is granted in normal scenarios
* introduced TArtifactInstanceID
2012-09-25 14:40:39 +00:00
mateuszb
59fcc15254 * last revision reverted, mysterious bug 2012-09-24 18:52:30 +00:00
mateuszb
55f1c47c16 * more TPlayerColor/TResource 2012-09-24 17:00:18 +00:00
mateuszb
18bd898cb1 * fixed bug when starting certain maps in campaigns
* introduced TPlayerColor typedef
2012-09-24 16:14:53 +00:00
mateuszb
6a81c8b1af * campaign against magic numbers
* ArtifactID was misleading and wrongly used in one place -- renamed and fixed
* minor changes
2012-09-23 18:01:04 +00:00
Michał W. Urbańczyk
62e63d45b1 Work in progress on BattleAI. Related changes:
* battle AIs receive ptr to CBattleCallback (not sure why it was CPlayerBattleCallback, likely mistake)
* reworked some battle callback methods to be more generic and able to handle some hypothetic scenarios
* for testing purposes in duel mode the first AI will be taken fro mconfig and the second will remain stupid ai
* minor changes
2012-09-20 16:55:21 +00:00
DjWarmonger
554a98dbd7 Quests will now be handled as object member instead of inheritance. Enabled quest objects for AI. 2012-09-16 13:34:01 +00:00
alexvins
369f0ae9c6 [PLATFORM] MinGW support added
* disabled features unsupported by MinGW
* fixed issues with DLL_LINKAGE
! BOOST_THREAD_VERSION in now 3 workaround for existing code added, consider refactoring.
* some small tweaks ("-fpedantic" warnings)
2012-09-15 19:16:16 +00:00
Ivan Savenko
a138db7c9e - removed lib headers from PCH
- fixed #1062
- correct terrain penalty check
2012-09-06 10:39:48 +00:00
Ivan Savenko
0ca9f64573 Next part of town configuration:
- town screen is mostly implemented, has some minor issues
- factions are now separate from towns, neutrals have faction with id=9
- more constants to GameConstants: town-specific buildings, strings for terrains and resources
- replaced most access to builtBuildings with isBuilt() method
- replaced id's with enums for town subtype and buildings id's
2012-09-05 12:49:23 +00:00
Ivan Savenko
44cc848edc first part of town configuration:
- moved almost all loading to TownHandler
- CBuildings and CStructures are now part of CTown
- merged hall.json into buildings.json

Should not cause any crashes or glitches
2012-09-02 10:33:41 +00:00
Michał W. Urbańczyk
3e346e737a Fixed type enum mismatch between Component and CComponent causing a crash when displaying w window with player flag.
Campaign against magic numbers.
2012-08-31 17:39:11 +00:00
DjWarmonger
31f82cade0 - Removed integer parameters from CCreature, all stats are now handled by Bonus System Only
- Parsing for creature format http://wiki.vcmi.eu/index.php?title=Creature_Format
Needs rearrangement of some info to work
2012-08-30 14:57:24 +00:00
Ivan Savenko
cf15ca1cf0 - replaced loadToIt with better H3 parser.
- moved hero class to heroes.json
2012-08-25 08:44:51 +00:00
DjWarmonger
39d433c1c7 Moved game Modules to config file. 2012-08-24 09:37:52 +00:00
DjWarmonger
edbc7f1223 - Some hardcoded settings will now be read from config/defaultMods.json
- Fixed AI crash when it was placed in closed and safe area
2012-08-11 09:06:23 +00:00
DjWarmonger
55f321f3f3 - Fixed AI crash at "gather resource" quest
- AI will now understand threat of Abandoned Mine. For sure.
- Fixed incorrect creeps quantities info
2012-08-08 08:27:52 +00:00
Ivan Savenko
9cbc1f1058 - merged basicCreatures and upgradedCreatures into single array
- missing fix for savegames
2012-08-07 21:46:24 +00:00
Ivan Savenko
e67f8afdd9 - removed multiple unused files
- config folder with all json files is used via new FS API
- fixed campaigns loading. Replaced "detect h3m starts" heuristics with CCompessedStream::getNextBlock()
2012-08-02 11:03:26 +00:00
Ivan Savenko
b3c17d2788 large filesystem update. Filesysytem is now fully functional, everything should work.
- completely replaced CLodHandler, removed bitmaph and spriteh
- replaced CLodStream in favour of CCompressedStream (2 new files)
- renamed CResourceLoaderFactory and ResourceIndetifier to shorter names
NOTES:
- campaign loading is currently broken. Will fix.
- I am going to remove several unused files in several days (e.g. LodHandler)
2012-08-01 12:02:54 +00:00
DjWarmonger
17a513c01b various fixes for #828 2012-07-30 09:27:19 +00:00
DjWarmonger
0665850d9d Fixed #1024 2012-07-21 09:58:42 +00:00