1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-12 10:03:53 +02:00
Commit Graph

872 Commits

Author SHA1 Message Date
DjWarmonger
917f846a3a
Merge pull request #2562 from vcmi/fix_artifact_replacement
Fix regression with replacing quest artifact
2023-08-12 09:14:21 +02:00
Tomasz Zieliński
4741bd546f Fix regression 2023-08-11 20:13:25 +02:00
Tomasz Zieliński
8f450cf253 Fix for monsters spawning at left side of the map 2023-08-11 18:43:22 +02:00
Tomasz Zieliński
0252d0f986 Fix hota offset + 2 possible crashes 2023-08-11 07:45:24 +02:00
Tomasz Zieliński
c089e55893 Fix placing road inside underground rock 2023-08-06 21:14:16 +02:00
Ivan Savenko
537f9fa048 Merged master into develop 2023-08-03 23:38:32 +03:00
Tomasz Zieliński
44fae4945d Update distances in all zones adjacent to object 2023-08-02 20:41:29 +02:00
Tomasz Zieliński
69abfda981 stash 2023-08-01 08:23:09 +02:00
Ivan Savenko
62fddca21e Split massive CModHandler class/file into multiple parts:
- IdentifierStorage is now a separate handler in VLC
- Renamed ModHandler::Incompatibility exception to ModIncompatibility
- Extracted ModScope namespace from ModHandler
- Extracted ModUtilities namespace from ModHandler
- Split CModHandler.cpp on per-class basis
- Replaced some direct members with unique_ptr to reduce header includes
2023-07-30 22:17:47 +03:00
Ivan Savenko
593b82d178 Removed all references to boost::interprocess library 2023-07-30 20:14:57 +03:00
DjWarmonger
71fe5c556f
Merge pull request #2203 from vcmi/remove_seed_info
Remove random seed from map description
2023-07-25 10:36:32 +02:00
Tomasz Zieliński
6522cec969 Just the notes 2023-07-24 08:44:37 +02:00
DjWarmonger
bf7b77600a
Merge pull request #2375 from vcmi/fix_roads
Fix RMG failing to place roads sometimes
2023-07-22 15:56:25 +02:00
DjWarmonger
0be3d6911c
Merge pull request #2236 from vcmi/limit_seer_huts
Create only a single seer hut for every artifact we have
2023-07-22 08:17:03 +02:00
Tomasz Zieliński
1762df2b77 Formatting 2023-07-21 14:55:49 +02:00
Tomasz Zieliński
8bfa34e97b Allow routing road behind objects not visitable from top if that's absolutely neccessary. 2023-07-21 14:55:34 +02:00
Tomasz Zieliński
ad5081f9fe Merge remote-tracking branch 'origin/develop' into ban_stuff_on_water_maps 2023-07-19 12:05:30 +02:00
Tomasz Zieliński
e2940d2b0c Fix Subterranean Gates incorrectly placed outside the map
(cherry picked from commit acf455a1c3b02c0f8d5085c23fe2230779b7560b)
2023-07-18 19:28:36 +02:00
Tomasz Zieliński
545f047cae Fix HoTA guard once again
(cherry picked from commit 138a7c8024573f46962ad0f6e8e03ba53fa56076)
2023-07-18 19:28:20 +02:00
Tomasz Zieliński
025b0814c8 + Handled banning spells and artifacts
+ Rename allowedSpell => allowedSpells
2023-07-17 17:21:28 +02:00
Tomasz Zieliński
fbd1d728ec Water heroes will now be correctly banned on random maps. 2023-07-17 16:23:34 +02:00
Tomasz Zieliński
bda126a1fd Merge remote-tracking branch 'origin/develop' into ban_stuff_on_water_maps 2023-07-16 18:54:50 +02:00
Tomasz Zieliński
a200e87640 Merge remote-tracking branch 'origin/develop' into ban_stuff_on_water_maps 2023-07-15 14:36:32 +02:00
Tomasz Zieliński
a968903c51 Fix HoTA guard offset in RMG 2023-07-14 16:45:13 +02:00
Ivan Savenko
9acab48bc3
Merge pull request #2268 from SoundSSGood/CArtifactInstance-rework
CArtifact CArtifactInstance refactoring
2023-07-11 14:36:08 +03:00
Tomasz Zieliński
700d8459ac Checking flags and conditions 2023-07-09 11:16:36 +02:00
Tomasz Zieliński
b4fcf20b19 Fix 2023-07-08 10:26:10 +02:00
Tomasz Zieliński
fabad20aa1 Compile fixes, cleanup 2023-07-08 10:21:36 +02:00
Tomasz Zieliński
3711ce846e Check road settings for connections 2023-07-08 09:11:20 +02:00
Tomasz Zieliński
730b36612c Respect GUI settings for roads. By default, all road types are enabled. 2023-07-08 08:44:10 +02:00
Tomasz Zieliński
27c4882237 Compile fix 2023-07-07 21:40:55 +02:00
Tomasz Zieliński
7e07ed65c8 - Check road connection for Shipyards 2023-07-07 21:27:24 +02:00
Tomasz Zieliński
1cad64c470 Move road flag to placeObject() method 2023-07-07 20:17:20 +02:00
Tomasz Zieliński
3889193a48 Reorganize namespaces 2023-07-07 16:32:17 +02:00
Tomasz Zieliński
0d3ac4a502 - Add new option for connection
- Store info about objects and roads in RequiredObjectInfo
2023-07-06 22:15:00 +02:00
Tomasz Zieliński
a592f5604b Add "bannedTerrains", "bannedMonsters" options for templates. 2023-07-06 17:30:23 +02:00
Tomasz Zieliński
9f2bfbc1d8 Improve serialization of IDs from mods, so they are resolved correctly after all mods are loaded. 2023-07-05 20:53:00 +02:00
SoundSSGood
fd9c7352a0 suggested changes 2023-07-03 22:54:03 +03:00
Tomasz Zieliński
73b78dd75e Handle "bannedTowns" (alredy used on Jebus). 2023-07-02 11:41:47 +02:00
Tomasz Zieliński
cb4d818241 Inherit terrain types only after all terrain Ids are resolved. 2023-07-02 09:28:51 +02:00
Tomasz Zieliński
04e2cf728e Allow all terrains from mods by default (including Wasteland). 2023-07-02 08:13:06 +02:00
Tomasz Zieliński
dc3dda7676 Fix new factions not appearing in random maps 2023-07-01 15:25:20 +02:00
SoundSSGood
060aecc61c CArtifact refactoring 2023-06-30 19:41:26 +03:00
DjWarmonger
a560eaea51
Merge pull request #2237 from vcmi/fictive_connections
Wide, fictive, repulsive connections
2023-06-25 19:57:08 +02:00
Tomasz Zieliński
43d666a2ff Refactor duplicated code 2023-06-25 18:31:54 +02:00
Tomasz Zieliński
a5ddc225ac Place objects away from connection even if it's empty (not guarded) 2023-06-23 21:43:49 +02:00
Tomasz Zieliński
64e8b9b2b9 Smarter scaling for forces between zones. 2023-06-23 21:43:12 +02:00
Ivan Savenko
6f743916db Moved CGCreature to a new file 2023-06-20 19:37:27 +03:00
Tomasz Zieliński
25707b6d5e Place zones in order given by template. Yields better results in a number of cases. 2023-06-18 20:23:25 +02:00
Tomasz Zieliński
8510af487e Place objects away from wide connection 2023-06-18 19:20:12 +02:00
Tomasz Zieliński
47726625c2 Do not generate passable connections for virtual connections. 2023-06-18 12:03:41 +02:00
Tomasz Zieliński
acc141d626 Fix unused variable 2023-06-17 19:31:16 +02:00
Tomasz Zieliński
65d10cf9f2 + Handle Wide Connections
+ Possibly hide fictive and repulsive connections, needs testing
2023-06-17 19:09:38 +02:00
DjWarmonger
02ea798c97
Merge pull request #2229 from vcmi/zone_placement_improvements
Zone placement improvements
2023-06-17 08:53:08 +02:00
Tomasz Zieliński
30f81297c3 Create only a single seer hut for every artifact we have. 2023-06-17 08:45:10 +02:00
Ivan Savenko
58661fc8ec Moved DwellingInstanceConstructor to a new file 2023-06-16 17:59:50 +03:00
Ivan Savenko
77b58bc66d Cleaned up object constructors to reduce duplicated code 2023-06-16 17:59:50 +03:00
DjWarmonger
c52b5d3bd0
Merge pull request #2216 from vcmi/water_prison_tavern
Water Prison & Tavern
2023-06-16 16:30:05 +02:00
Tomasz Zieliński
f1356dd5bf Merge remote-tracking branch 'origin/develop' into water_prison_tavern 2023-06-14 20:58:02 +02:00
Tomasz Zieliński
ce25ed4de2 Fix crash which coudl occur if we can't add any Seer Hut to RMG pool (Fear template). 2023-06-14 20:50:14 +02:00
Tomasz Zieliński
14d46cbed8 Keep the distance between zone guards and other objects, while trying to place them closer to zone centers at the same time. 2023-06-14 14:12:42 +02:00
Tomasz Zieliński
2603e11f48 Simplify and correct ZonePlacer main loop, make sure to save optimal solution at every step. 2023-06-14 14:07:31 +02:00
Tomasz Zieliński
e1f8ae94ac + Do not limit treasures to make space for more treasures if there are none ;eft
+ Make sure RMG won't get stuck in infinite loop for weird treasure values (eg. 0).
2023-06-12 22:15:59 +02:00
Tomasz Zieliński
3d3c97bf93 Fix potential infinite loop 2023-06-12 20:32:58 +02:00
Tomasz Zieliński
983633d73b Do not decrease the density of obstacles in zones of medium treasure value. For high values, decrease them more rapidly. 2023-06-10 18:02:26 +02:00
Tomasz Zieliński
65a8478b74 Fix override 2023-06-10 15:07:03 +02:00
Tomasz Zieliński
8ef25155df Remove dependencies of surface and underground zones 2023-06-10 14:58:12 +02:00
Tomasz Zieliński
b65870f31e A bunch of magic formulas to assure nice balance of blocked areas and obstacles on every template 2023-06-10 14:57:25 +02:00
Tomasz Zieliński
1bb2b5b571 + Maintain clear perimeter of a treasure pile.
+ Make sure that separate blocked areas remain unconnected so it's possible to pass between them.
2023-06-10 14:56:03 +02:00
Tomasz Zieliński
d5b799278e Allow center Town touch the blocked area, it's no longer a problem with correct pathfinder. 2023-06-09 21:22:44 +02:00
Tomasz Zieliński
682e9ae297 Unused variable 2023-06-08 20:05:51 +02:00
Tomasz Zieliński
52d33fc7a6 Generate all treasures of certain value beforehand and try to place them all, don't interrupt at first failure. 2023-06-08 19:51:21 +02:00
Tomasz Zieliński
66b6fba51f Use all tiles covered by treasure pile to determine distance to other treasures. 2023-06-08 19:31:38 +02:00
Tomasz Zieliński
d92ac6bcbe Do not exceed rolled treasure value - matches OH3. 2023-06-08 19:23:23 +02:00
Tomasz Zieliński
3e9e6aab2b Fix prison distribution 2023-06-07 15:08:50 +02:00
Tomasz Zieliński
7922d8be16 Prison from HoTA will be placed on water. 2023-06-07 13:00:24 +02:00
DjWarmonger
e98a50b45a
Merge pull request #2123 from Warzyw647/rmg-split-enum-monster-strength
Refactor enums and add zone monster strength "none" in rmg
2023-06-06 20:40:35 +02:00
Ivan Savenko
1e9eea30e1 Merge remote-tracking branch 'soundsgood/CArtHandler-rework' into develop 2023-06-05 18:53:17 +03:00
Tomasz Zieliński
cbe1c4a07d Remove random seed from map description. 2023-06-03 08:53:00 +02:00
Ivan Savenko
d6a357fd17 Split some map object files into smaller files. Reduced includes usage. 2023-06-02 21:47:37 +03:00
Ivan Savenko
acac42291e Remove excessive CMap.h includes 2023-05-31 23:18:38 +03:00
Ivan Savenko
62595cb039 Split massive CMap.h a bit 2023-05-31 23:01:57 +03:00
Warzyw647
bc4755a89a Merge branch 'develop' into rmg-split-enum-monster-strength 2023-05-31 19:53:19 +02:00
Warzyw647
4c513e8bb0 Water zones get monster strength ZONE_NONE during their creation instead of a hardcoded check for zone type WATER at guard creation time.
Also preliminary preparations for water zone customization in the template json.
2023-05-31 00:24:52 +02:00
Tomasz Zieliński
cd9bd491e0 Add option for single-thread generation. Still doesn't guarantee excactly identical maps :? 2023-05-24 18:02:11 +02:00
Warzyw647
af3c6abb5e Added zone guard strength "none" 2023-05-21 00:13:45 +02:00
Warzyw647
7afcc3b350 Merge branch 'rmg-split-enum-monster-strength' into rmg-no-monster-zone 2023-05-20 17:29:07 +02:00
Warzyw647
149ae9986c Merge branch 'rmg-refactor-enums' into rmg-no-monster-zone 2023-05-20 17:28:25 +02:00
Tomasz Zieliński
f3c795462f Remove comment which break the build 2023-05-20 17:08:44 +02:00
Tomasz Zieliński
4e927f644d Missing precompiled header 2023-05-20 15:41:03 +02:00
Tomasz Zieliński
b2b2798214 Use boost::thread instead of std::thread 2023-05-20 14:43:05 +02:00
Tomasz Zieliński
aa16f57b8a Remove unused variables 2023-05-20 14:28:18 +02:00
Tomasz Zieliński
a8b882e5bb Remove another pragma 2023-05-20 14:16:18 +02:00
Tomasz Zieliński
e25448e7cd Fix build on macos 2023-05-20 14:00:03 +02:00
Warzyw647
5363fd5db3 Changing other enums to enum classes and adding comments with reasons for why some enums stay as enum-in-namespace. 2023-05-20 13:29:55 +02:00
Tomasz Zieliński
91baa65c8c Remove no longer needed synchronization that also fails to compile. 2023-05-20 13:15:46 +02:00
Tomasz Zieliński
219e897db0 Added missing files. 2023-05-20 12:02:30 +02:00
Tomasz Zieliński
67c0fbc240 Merge remote-tracking branch 'origin/develop' into parellel_rmg
# Conflicts:
#	lib/rmg/modificators/WaterProxy.cpp
2023-05-20 11:59:39 +02:00
Tomasz Zieliński
15b254fded Give every Zone its own RNG 2023-05-20 11:46:32 +02:00
Tomasz Zieliński
5da8c96214 Fix include paths 2023-05-20 11:45:08 +02:00
Tomasz Zieliński
cf0515dcd3 Moved Modificators to separate folder 2023-05-20 10:17:37 +02:00
Tomasz Zieliński
5f99facd8f Optimization - don't add multiple copies of Modificators which only need one instance. 2023-05-20 09:58:08 +02:00
Tomasz Zieliński
71f882d5ba Refactored Functions.cpp, removed unused function. 2023-05-20 07:55:28 +02:00
Tomasz Zieliński
c27b8383e7 Cleanup 2023-05-20 07:23:00 +02:00
Tomasz Zieliński
02586214a1 Synchronize ConnectionPlacers 2023-05-20 07:06:27 +02:00
Tomasz Zieliński
72f8facc82 Fixed deadlock in WaterAdopter 2023-05-19 20:49:01 +02:00
Tomasz Zieliński
73d9f5bd0a Parallel RMG works fine for maps without water. 2023-05-19 20:30:15 +02:00
SoundSSGood
021f94a579 artifact utils 2023-05-17 17:00:31 +03:00
Ivan Savenko
cb8201876b
Merge pull request #1822 from rilian-la-te/spell-mechanics-v3
Bonus refactoring, part3 (save-incompatible)
2023-05-09 13:10:04 +03:00
Konstantin P
057a33c508 SpellSchool: use identifier instead of int
Needs redifinition of MAGIC_SCHOOL_SKILL in all mods
2023-05-07 20:37:32 +03:00
Tomasz Zieliński
19010dd834 Not needed 2023-05-07 09:15:20 +02:00
Tomasz Zieliński
966a24d27e Protect public access to Modificators with another mutex. 2023-05-07 08:24:08 +02:00
Tomasz Zieliński
a58094aefe Thread pool kinda works. 2023-05-07 07:48:12 +02:00
nordsoft
58aed364bf Don't place non-sailing boats in RMG 2023-05-07 03:24:52 +04:00
Tomasz Zieliński
3d25c2c6dc Fix thread pool closing 2023-05-06 19:47:28 +02:00
Tomasz Zieliński
a8545935c3 ThreadPool implementation. It runs, but dies from race conditions. 2023-05-06 18:54:19 +02:00
Tomasz Zieliński
a952a9e279 Remove unused code 2023-05-06 12:22:01 +02:00
Warzyw647
d74fdad432 Renamed enum EMonsterStrength to EGlobalMonsterStrength. Enum EZoneMonsterStrength unchanged. 2023-05-06 12:18:53 +02:00
Tomasz Zieliński
d22ec0ee0c Move Modificator to separate file. 2023-05-06 10:49:18 +02:00
Tomasz Zieliński
eb50ae3aa7 - Pre-distribute max number of Prisons
- Minor refactor for artifact and hero pool management
2023-05-05 10:30:36 +02:00
Tomasz Zieliński
d137f7157c Merge remote-tracking branch 'origin/develop' into parellel_rmg
# Conflicts:
#	lib/rmg/CZonePlacer.h
#	lib/rmg/TreasurePlacer.h
2023-05-05 09:00:44 +02:00
Tomasz Zieliński
35ec720555 Forget objects that were already replaced iwth an artifact. 2023-05-05 07:16:38 +02:00
Warzyw647
7f180b6e81 Split enum EMonsterStrength into EMonsterStrength and EZoneMonsterStrength.
Removed obsolete ZONE_ and GLOBAL_ from enum item names.
Simplified serialization of zone monster strength in preparation for adding zone monster strength: none.
2023-05-04 21:43:31 +02:00
Warzyw647
05e72e2e7f Don't remove zone guards in a zone with monsters: none, remove extra parentheses and add comments 2023-05-04 18:40:04 +02:00
Warzyw647
8ebaa3fd6b Adding zoneMonserStrength: none 2023-05-03 12:07:00 +02:00
Konstantin
86f5d6de69 vcmi: modernize headers 2023-04-30 13:35:54 +03:00
Tomasz Zieliński
d325051213 Some working version, needs corrections still. 2023-04-29 11:46:03 +02:00
Tomasz Zieliński
3c9599657b Use new artifact interface 2023-04-25 16:20:36 +02:00
Tomasz Zieliński
208adf1dd6 Don't use boost::format 2023-04-25 16:14:09 +02:00
Tomasz Zieliński
a9a3c456f1 Add new files 2023-04-23 10:12:53 +02:00
Tomasz Zieliński
bc4d6bb7ee Remove unused code. 2023-04-23 10:08:30 +02:00
Tomasz Zieliński
80b5c53815 Place quest artifacts after all the treasures are already created. 2023-04-23 10:08:16 +02:00
Tomasz Zieliński
88c436691d Simplify logs 2023-04-20 16:26:06 +02:00
Tomasz Zieliński
09b493681b More iterations, higher gravity constant for better results. 2023-04-20 16:13:30 +02:00
Tomasz Zieliński
55d7d7b9b5 Fix coefficients to make dead code actually be used sometimes. 2023-04-20 12:44:32 +02:00
Tomasz Zieliński
00d7901e59 Add another placement technique - swap two misplaced zones. Don't move same zones in consecutive iterations. 2023-04-20 12:24:57 +02:00
Tomasz Zieliński
c34b1cd713 Fix warning-as-errors. 2023-04-19 08:45:23 +02:00
Tomasz Zieliński
d841655c1d Scale fuzzy edges with map size. 2023-04-18 22:34:26 +02:00
Tomasz Zieliński
15592c3aff Change metric to create more interesting zone shapes. 2023-04-18 22:01:51 +02:00
Tomasz Zieliński
39154737a5 Use std::optional instead of boost::optional. 2023-04-18 19:34:54 +02:00
Tomasz Zieliński
6551585f96 Start with low stifness to let zones pass through each other - typical temperature fall.
(cherry picked from commit 435b9f7881)
2023-04-18 19:21:33 +02:00
Tomasz Zieliński
8d5cd6d072 Randomize starting positions a bit so zones don't fall exactly on the grid.
(cherry picked from commit 33eb28b570)
2023-04-18 19:21:28 +02:00
Tomasz Zieliński
fc91152da7 Fixed zones getting actually randomized after construction. Tweaks to algorithm, now it's considerably better.
(cherry picked from commit c13019059f)
2023-04-18 19:21:19 +02:00
Tomasz Zieliński
2d7a819939 Parameters which work well for Jebus - accessible desert and Blue placed away from Red
(cherry picked from commit 42c6127c79)
2023-04-18 19:21:13 +02:00
Tomasz Zieliński
494f4eaa3f Simple solution that works - by ChatGPT :)
(cherry picked from commit 7c6e4bc2fe)
2023-04-18 19:21:06 +02:00
Tomasz Zieliński
a1f094776f Use fixed starting positions for now.
(cherry picked from commit 43c51805f5)
2023-04-18 19:20:57 +02:00
Tomasz Zieliński
7d2745fda6 Simplified target function comparison.
(cherry picked from commit 809f6344ff)
2023-04-18 19:20:50 +02:00
Tomasz Zieliński
48c11f661b Fix zone attraction
(cherry picked from commit 164ecaea60)
2023-04-18 19:20:40 +02:00
Tomasz Zieliński
3f83eaafc4 Fix distance check
(cherry picked from commit 319f289dc4)
2023-04-18 19:20:32 +02:00
Tomasz Zieliński
64adc9983d - Fixes for corectness
- Space apart starting zones of players

(cherry picked from commit 80be12ac68)
2023-04-18 19:20:23 +02:00
Tomasz Zieliński
09d50a5e9f First draft that kinda works.
(cherry picked from commit 7dd5a9c15d)
2023-04-18 19:20:12 +02:00
Konstantin
7a5775a9f9 vcmi: use std::optional 2023-04-17 00:43:13 +03:00
Ivan Savenko
b354f99cc3
Merge pull request #1936 from IvanSavenko/cpp_17_upgrade
Upgrade c++ standard to c++17
2023-04-14 19:21:17 +03:00
Ivan Savenko
44b83b2e11 Merge master -> develop 2023-04-14 16:51:35 +03:00
Tomasz Zieliński
74d028d951 Use product instead of distance sum for Subterranean Gate placement. 2023-04-12 09:31:09 +02:00
Tomasz Zieliński
e6eafca2d0 Place Mines after Monoliths. 2023-04-12 07:48:44 +02:00
Ivan Savenko
644f0f4b32 Removed ARRAY_COUNT in favor of std::size 2023-04-12 01:04:26 +03:00
Ivan Savenko
63b197b78a Converted attributes to use c++17 functionality 2023-04-12 01:03:14 +03:00
Ivan Savenko
dfa2e2a349 Merge beta into develop 2023-04-11 19:37:35 +03:00
DjWarmonger
d9a2621231
Merge pull request #1939 from vcmi/fix_top_of_map_objects
Merging after positive review.
2023-04-11 10:40:18 +02:00
Tomasz Zieliński
3c87b3934d Do not place object visible tiles over the top of the map. 2023-04-10 19:26:53 +02:00
Konstantin
fedf7d377c vcmi: remove TFaction
This is a huge change and will break save compatibility
2023-04-10 19:28:16 +03:00
Tomasz Zieliński
cf1f9c456b Removed unrelated comment 2023-04-07 21:40:47 +02:00
Tomasz Zieliński
37f1bf9d78 Merge remote-tracking branch 'origin/beta' into fix_pandora_amounts 2023-04-07 21:26:36 +02:00
Tomasz Zieliński
f1c52f501d Fix Pandora Box creature amounts to match OH3 exactly. 2023-04-07 21:23:34 +02:00
Ivan Savenko
1590c710dd
Merge pull request #1886 from rilian-la-te/fix-rmg-levels
vcmi: fix rmg header levels
2023-04-07 12:43:34 +03:00
Konstantin
a04d8b34f3 vcmi: fix rmg header levels
It was printed as char, not as int.
2023-04-06 12:48:53 +03:00
Konstantin
11b237a23c vcmi: massive refactoring v1 2023-04-05 22:33:12 +03:00
Tomasz Zieliński
aca227b5e4 Manually adjust the position of town - noticeable on S maps. 2023-04-01 17:07:43 +02:00
Tomasz Zieliński
46a24043e8 Add back Mines. 2023-03-29 17:06:17 +02:00
Tomasz Zieliński
401f2342c0 Place Mines after Towns and Monoliths. 2023-03-29 16:54:22 +02:00
Tomasz Zieliński
5ed3c2d518 Place towns and monoliths first - preferably at the zone border. 2023-03-29 16:25:13 +02:00
Tomasz Zieliński
045942fd68 Fixed warning-as-error 2023-03-28 18:25:56 +02:00
Tomasz Zieliński
b184e80b72 Use the most suitable template for object 2023-03-28 17:53:08 +02:00
Tomasz Zieliński
49c029ea6c Minor refactor 2023-03-28 17:13:24 +02:00
Tomasz Zieliński
b3a457c71a Skip objects with value too low to be placed in the zone. 2023-03-27 17:29:46 +02:00
Tomasz Zieliński
511a42f9b9 Oops missed that part. 2023-03-27 09:35:52 +02:00
Tomasz Zieliński
18a87d1ec0 Distribute limited objects evenly in zones with matching terrain 2023-03-27 09:09:58 +02:00
Tomasz Zieliński
a88e1dc1f6 Add only one template per object 2023-03-27 08:44:49 +02:00
Andrii Danylchenko
a0de223901
Merge pull request #1772 from vcmi/fix_invalid_native_terrain
Fix the case of invalid native town type
2023-03-26 13:19:01 +03:00
Tomasz Zieliński
00a77e3c5f Probably found the root cause of terrain problems. 2023-03-25 18:52:18 +01:00
DjWarmonger
2c4cde060a
Merge pull request #1694 from vcmi/extra_rmg_monoliths
This could be controversial solution, but since there were no objections, I'll give it a shot.
2023-03-25 18:38:06 +01:00
DjWarmonger
114e7d196b
Merge pull request #1698 from vcmi/object_placement_tweaks
No objections, works fine for me as well.
2023-03-25 18:13:15 +01:00
Tomasz Zieliński
68a2bb78a5 Fix the case of invalid native town type :? 2023-03-25 18:08:46 +01:00
Andrii Danylchenko
23fa7c4a9b
Merge pull request #1720 from vcmi/fix_small_lakes_clean
Don't place shipyard or boats at very small lakes
2023-03-19 19:52:22 +02:00
Andrii Danylchenko
aede3da74e
Merge pull request #1721 from vcmi/fix_rmg_infinite_loop
Fix rmg infinite loop
2023-03-19 19:46:28 +02:00
Tomasz Zieliński
9e206dbbc7 Forgot this one 2023-03-19 09:51:37 +01:00
Tomasz Zieliński
f52c465322 Allow zones to inherit properties recursively, in any order. 2023-03-19 09:27:05 +01:00
Tomasz Zieliński
dd3803b111 Don't place shipyard or boats at very small lakes
(cherry picked from commit 1d2913bea0)
2023-03-18 22:05:25 +01:00
Tomasz Zieliński
e1ced317a1 Few tweaks for boat placement to keep distance between it and other objects, especially guards. 2023-03-18 21:59:23 +01:00
Tomasz Zieliński
1dc96d6844 Fix shipyard border calculation for RMG 2023-03-18 20:12:36 +01:00
Tomasz Zieliński
23a5a32756 Add fallback for empty terrain types. Still it's a workaround and does not solve the root cause. 2023-03-18 17:00:50 +01:00
Tomasz Zieliński
f57c275603 Merge remote-tracking branch 'origin/develop' into object_placement_tweaks 2023-03-17 21:47:16 +01:00
Tomasz Zieliński
f2dc9cb48e - Place Subterranean Gates as far from other objects as possible
- Added minimum distance between zone guards
2023-03-16 18:42:28 +01:00
Ivan Savenko
383387ef29 Integrated defaultMods into mod system 2023-03-16 17:55:09 +02:00
Tomasz Zieliński
62490683ce Place objects away from zone guard in both zones, not only the where it is placed. 2023-03-16 16:20:11 +01:00
Tomasz Zieliński
5b267f9cbd - Duplicate Monolith templates to ensure at least 100 are available to RMG
- Do not use Monoliths which can't be placed at any land
2023-03-16 06:58:25 +01:00
Konstantin
5366f9190e vcmi: reduce boost::lexical_cast usage 2023-03-09 16:36:46 +03:00
Ivan Savenko
4260726e4b Provide encoding information to maps & campaigns loaders 2023-03-05 17:39:27 +02:00
Konstantin
7bfb37df4d vcmi: modernize lib/rmg 2023-02-14 02:50:39 +03:00
Konstantin
0627e1ecaa vcmi: remove unused variables from lib/rmg 2023-02-12 19:11:24 +03:00
Konstantin
cf56f7ccce vcmi: remove unused-but-set-variables 2023-01-26 23:49:00 +03:00
Ivan Savenko
47c1803c42 Finalization of refactoring:
- Entity interface now has getNameTranslated & getNameTextID methods
- Entity interface no longer has getName method
- removed (most) usages of normalizeIndentifier workaround method
- all moddable objects have identifier in form of mod:name
- all moddable object register strings in form of mod.type.name
2023-01-20 15:18:36 +02:00
Ivan Savenko
05a1d7c6e3 All text for factions/towns/building are passed through translator 2023-01-20 15:18:36 +02:00
Ivan Savenko
388ed88b5d All artifact strings now pass through translator 2023-01-20 15:18:36 +02:00
Ivan Savenko
707de75ac0 Cleared up formatting 2023-01-17 22:58:22 +02:00
Ivan Savenko
e48bd39b9c Moved road & river handlers into a separate file 2023-01-11 15:17:24 +02:00
Ivan Savenko
1e37e66e6c Replaced Terrain::BORDER and WRONG with NONE 2023-01-10 20:09:09 +02:00
Ivan Savenko
8c2b1d74be Removed unused code 2023-01-10 20:07:22 +02:00
Ivan Savenko
4f3ea0d1d9 Renamed Terrain.h/cpp -> TerrainHandler.h/cpp 2023-01-10 00:01:35 +02:00
Ivan Savenko
f51b3bca57 use JsonKey or NameTranslated instead of ambiguos Name 2023-01-10 00:01:35 +02:00
Ivan Savenko
7c7ae26e67 Map/Road/River identifiers are now private members 2023-01-10 00:01:35 +02:00
Ivan Savenko
64885bdf6b Better names for terrain parameters. Support for new movement sounds. 2023-01-10 00:01:35 +02:00
Ivan Savenko
2de3178158 Fixed game startup 2023-01-10 00:01:35 +02:00
Ivan Savenko
e1799379dd Terrain/Road/River handler are now in compileable state 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
Ivan Savenko
7a35bcc812
Merge pull request #1221 from IvanSavenko/warnings_fix
Fix remaining compiler warnings
2022-12-29 21:51:55 +02:00
Nordsoft91
785787e454
Merge branch 'develop' into interface-builder 2022-12-24 21:56:29 +04:00
Ivan Savenko
eb20a4b208 Merge remote-tracking branch 'vcmi/develop' into warnings_fix 2022-12-23 14:40:45 +02:00
nordsoft
b1f2c7aed4 Team alignments implemented 2022-12-17 08:19:16 +04:00
nordsoft
d93e844609 Use roads names instead of their filenames 2022-12-17 04:54:01 +04:00
nordsoft
f27a40dd34 Support roads and teams customization in engine 2022-12-17 03:52:40 +04:00
nordsoft
fc7f1dbc5a Fix template selection 2022-12-14 05:23:21 +04:00
nordsoft
53b2f68560 Serialize template 2022-12-14 04:37:11 +04:00
Ivan Savenko
db2a40600d Fixed some of the warnings detected by CI run 2022-12-08 23:20:42 +02:00
Ivan Savenko
fb6b3c31e8 Renamed UNUSED -> MAYBE_UNUSED macro to match c++17 attribute name 2022-12-07 18:06:47 +02:00
Ivan Savenko
3219e322ae Fixed all non-silenced gcc/clang warnings 2022-12-07 18:05:47 +02:00
Andrii Danylchenko
89f0cc66e8
Merge pull request #1213 from IvanSavenko/clone_fix
Fix crash on casting clone on modded creature
2022-12-07 17:34:52 +02:00
Ivan Savenko
2cbe6bcb47 Added common method to get names of hardcoded mod scopes 2022-12-07 15:18:19 +02:00
nordsoft
5d1b5b6c9c Throw an exception if empty zone is generated 2022-12-06 15:07:16 +04:00
nordsoft
625c18a889 Fix #3234 2022-11-18 04:05:35 +04:00
nordsoft
d5403d3eb9 Merge remote-tracking branch 'upstream/develop' into cpp-map-editor 2022-10-17 01:39:11 +04:00
nordsoft
4cb31ea912 Merge remote-tracking branch 'upstream/develop' into cpp-map-editor 2022-10-08 23:24:57 +04:00
Tomasz Zieliński
8c481dff46 Fix incorrect templates for mines in HoTA 2022-10-08 12:42:10 +03:00
Andrey Filipenkov
aa217236b3 check amount of artifacts on hero when checking requirements of a quest that requires artifact(s)
fixes case when 2 or more identical artifacts are required
2022-10-01 09:28:32 +03:00
Tomasz Zieliński
127d7ec40b Fixed asserts (only for debug build) 2022-09-29 21:10:44 +02:00
Tomasz Zieliński
20c102e648 Remove T prefix from new typedefs 2022-09-29 11:44:46 +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
Tomasz Zieliński
f804f8a326 Store RiverType by value, handle by reference 2022-09-26 09:51:36 +02:00
Tomasz Zieliński
2bd30556a3 Store TerrainType by havlue and handle by reference 2022-09-26 09:17:55 +02:00
Tomasz Zieliński
4ea57ea7fc A variety of suggested style tweaks 2022-09-25 09:33:56 +02:00
nordsoft
d32898b39b Merge remote-tracking branch 'upstream/develop' into cpp-map-editor
# Conflicts:
#	CMakeLists.txt
2022-09-25 00:58:43 +04: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
0b56778e00 Fix for compatibility in rewrite 2022-09-23 20:01:54 +02: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
Tomasz Zieliński
ebe45d512d Moved roads and rivers to TerrainTypeHandler, by analogy to TerrainType. 2022-09-23 16:24:01 +02:00
Tomasz Zieliński
6aaf77812b Changed logic for zone placement.
Now every zone can be surface, underground, or both. This is separate from water <-> land distinction.

Iand type is now a combination of flags and can take multiple values: "type": ["LAND", "WATER", "SURFACE", "SUB", "ROCK"]. In nothing is specified, terrains get LAND | SURFACE flags by default.

Non-surface zones will default to DIRT, and non-underground zones will default to SUBTERRA.
2022-09-22 18:23:31 +02:00
nordsoft
89d0de53da Merge remote-tracking branch 'upstream/develop' into features/cpp-map-editor
# Conflicts:
#	.github/workflows/github.yml
#	launcher/modManager/cmodlist.cpp
#	lib/CModHandler.cpp
#	lib/CModHandler.h
2022-09-22 17:09:47 +04:00
Andrii Danylchenko
b4d3445559
Merge pull request #971 from kambala-decapitator/fix-warnings
Fix most project warnings
2022-09-22 16:05:32 +03:00
Andrii Danylchenko
3d3c513603
Merge pull request #929 from Nordsoft91/branch-merge-versioning
Mods versioning [part 3]
2022-09-22 14:56:20 +03:00