MantisBT - VCMI
View Issue Details
0003133VCMIRandom Map Generatorpublic2020-06-17 20:012020-06-18 03:24
misiokles 
 
nonecrashalways
newopen 
PCWindows
0.99 
 
0003133: "allowedTerrains" command crashes custom mines.
For example HotA made new mines graphics belong to sand terrain.
Code for adding such mines to vcmi is easy.

{
"core:mine" : {
    "types" : {
        "hotaCrystalCavern" : {
        "templates": {
            "avmcrdn0" : { "animation" : "avmcrdn0", //hota sand
                    "mask" : ["VVVV","VBBB","VBAB"],
                    "allowedTerrains":["sand"]
                    },
                }
            },

Without "allowedTerrains":["sand"] command, such crystal mine is generated in every type of terrain. But with "allowedTerrains":["sand"] - game crash during map generation.
n/a
n/a
No tags attached.
png hj.png (1,142,552) 2020-06-17 20:03
https://bugs.vcmi.eu/file_download.php?file_id=3084&type=bug
Issue History
2020-06-17 20:01misioklesNew Issue
2020-06-17 20:03misioklesFile Added: hj.png
2020-06-17 21:44AndruidsNote Added: 0007908
2020-06-18 03:23AndruidsNote Edited: 0007908bug_revision_view_page.php?bugnote_id=7908#r3600
2020-06-18 03:24AndruidsNote Edited: 0007908bug_revision_view_page.php?bugnote_id=7908#r3601

Notes
(0007908)
Andruids   
2020-06-17 21:44   
(edited on: 2020-06-18 03:24)
Let me correct this. Defining new type within mines won't do anything, of course.

misiokles meant this code:

{
"core:mine" : {
    "types" : {
    "crystalCavern" : {
        "templates": {
        "avmcrdn0" : {
        "animation" : "avmcrdn0", //hota sand
        "visitableFrom" : [ "---", "+++", "+++" ],
        "mask" : ["VVVV","VBBB","VBAB"]
                    }
                }
            },

And including:

"allowedTerrains":["sand"]

causes a different type of bug - game will start and RMG will run, but it will generate an empty map. Without borders and with only 2 zones iirc.