Difference between revisions of "Talk:Town Format"

From VCMI Project Wiki
Jump to: navigation, search
Line 20: Line 20:
 
   }
 
   }
 
  }
 
  }
 +
 +
It's topic for my writings about special town buildings format
 +
"tavern":
 +
{
 +
"bonuses":
 +
{
 +
"type":"TAVERN", // string related with BuildingID::TAVERN. from it VCMI will decide how to act when clicked
 +
 +
{
 +
"type":"MORALE", //can be "LUCK", maybe "BLOCK_LUCK","BLOCK_MORALE"
 +
"val":1 //gives morale during siege
 +
}
 +
 +
 +
}
 +
 +
}
 +
 +
"grail":
 +
{
 +
"bonuses":
 +
{
 +
"type":"GRAIL_CASTLE", // string related with BuildingID::GRAIL for castle giving morale and movement. from it VCMI will decide how to act when clicked
 +
 +
{
 +
"type":"MORALE", //can be "LUCK", maybe "BLOCK_LUCK","BLOCK_MORALE"
 +
"val":1 //gives morale during siege
 +
}
 +
 +
 +
}
 +
 +
}
 +
 +
 +
I plan to change hardcoded buildings identifiers in code to types of buildings bonuses. Now it will be that if town has 2 buildings with same type of buildings, first found will function (if first building is not built and second built, than second bonus will be used).

Revision as of 13:17, 27 April 2014

"mytown" :   {
//mod ship will appear when bought in town of this faction, or when hero of faction buys ship in shipyard.
//if not defined, will be taken by alignment like previously it was
//if ship has bonus FLYING, it will appear near town on free cell, shipyard building will also be available always (there is no need to have water near)
//If hero boards FLYING ship, he will exit it when player chooses to visit map object or attack creatures/enemy heroes (if FREE_SHIP_BOARDING is not set in bonuses,
//it will cost remaining movement point)
"boat":
 {
    "animation":"mytown-boat/AB22.def",                                                                                
    "bonuses":
       [
           {
                "type": "<hero bonus name>",         //there are bonuses for hero. Boat can be treated as artefact in game. Mostly there are bonuses like
                                                      //SEA_MOVEMENT, FLYING (for zeppelins, planes etc), WHIRLPOOL_PROTECTION, FREE_SHIP_BOARDING etc
                ....
                
           }
         ]
 }
}

It's topic for my writings about special town buildings format "tavern": { "bonuses": { "type":"TAVERN", // string related with BuildingID::TAVERN. from it VCMI will decide how to act when clicked

{ "type":"MORALE", //can be "LUCK", maybe "BLOCK_LUCK","BLOCK_MORALE" "val":1 //gives morale during siege }


}

}

"grail": { "bonuses": { "type":"GRAIL_CASTLE", // string related with BuildingID::GRAIL for castle giving morale and movement. from it VCMI will decide how to act when clicked

{ "type":"MORALE", //can be "LUCK", maybe "BLOCK_LUCK","BLOCK_MORALE" "val":1 //gives morale during siege }


}

}


I plan to change hardcoded buildings identifiers in code to types of buildings bonuses. Now it will be that if town has 2 buildings with same type of buildings, first found will function (if first building is not built and second built, than second bonus will be used).