mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
Fixes for handling of oversized map dwellings
- Marked large version of H3 Unicorn's Glade as not usable for random dwelling replacement - Shifted oversized dwellings - that have at most 2x2 as blocked tile, but have non-blocked tile column will now be placed correctly - This fixes incorrect random dwelling replacement of the only oversized H3 dwelling - Portal of Glory - Game will now detect & report invalid dwelling templates from mods - Updated docs to clarify dwellings format
This commit is contained in:
@@ -9,6 +9,11 @@
|
||||
[ "airElemental", "stormElemental" ],
|
||||
[ "waterElemental" ]
|
||||
],
|
||||
|
||||
/// If set to true, this dwelling will not be selected as a replacement for random dwelling on map
|
||||
/// Such dwellings have no restrictions on which tiles are visitable or blocked
|
||||
/// For dwelling to be usable as a replacement, it must follow some additional restrictions (see below)
|
||||
"bannedForRandomDwelling" : true,
|
||||
|
||||
/// List of guards for this dwelling. Can have two possible values:
|
||||
/// Boolean true/false - If set to "true", guards will be generated using H3 formula:
|
||||
@@ -20,3 +25,44 @@
|
||||
]
|
||||
}
|
||||
```
|
||||
|
||||
## Replacement of random dwellings
|
||||
|
||||
Existing maps may contain random dwellings that will be replaced with concrete dwellings on map loading.
|
||||
|
||||
For dwelling to be a valid replacement for such random dwelling it must be:
|
||||
|
||||
- block at most 2x2 tile square
|
||||
- one tile in bottom row must be visitable, and another - blocked
|
||||
|
||||
Visible tiles (`V` in map object template mask) don't have any restrictions and can have any layout
|
||||
|
||||
It is possible to make dwellings that don't fulfill this requirements, however such dwellings should only be used for custom maps or random maps. Mod that adds a new faction need to also provide a set of valid dwellings that can be used for replacement of random dwellings.
|
||||
|
||||
Examples of valid dwellings:
|
||||
|
||||
- minimal - bottom row contains one blocked and one visitable tile, second row fully passable
|
||||
|
||||
```json
|
||||
"mask":[
|
||||
"AB"
|
||||
],
|
||||
```
|
||||
|
||||
- maximal - bottom row contains one blocked and one visitable tile, both tiles on second row are blocked
|
||||
|
||||
```json
|
||||
"mask":[
|
||||
"BB"
|
||||
"BA"
|
||||
],
|
||||
```
|
||||
|
||||
- extended visual - similar to maximal, but right-most column is fully passable. Note that blocked tiles still fit into 2x2 square
|
||||
|
||||
```json
|
||||
"mask":[
|
||||
"BBV"
|
||||
"BAV"
|
||||
],
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user