Difference between revisions of "Object Format"

From VCMI Project Wiki
Jump to: navigation, search
(+draft)
 
(standartization)
Line 9: Line 9:
 
   [
 
   [
 
 
{
+
"myCoolObject":{
//string ID, mandatory, camel case, shall be unique
 
//
 
"sid": "myCoolObject",
 
 
 
 
  //numeric ID, mandatory for h3/wog objects, shall be unique is defined
 
  //numeric ID, mandatory for h3/wog objects, shall be unique is defined
 
  //not recommended for VCMI objects, shall be unique is defined, default: engine defined
 
  //not recommended for VCMI objects, shall be unique is defined, default: engine defined
"nid":689,
+
"id":689,
 
   
 
   
 
"blockVisit" : true,
 
"blockVisit" : true,
Line 40: Line 36:
 
   [
 
   [
 
 
{
+
"artifact":{
"sid": "artifact",
+
"id":5,
"nid":5,
 
 
"blockVisit" : true
 
"blockVisit" : true
 
},
 
},
  
{
+
"treasureChest":{
"sid": "treasureChest",
+
"id":101,
"nid":101,
 
 
"subIdMax":0,
 
"subIdMax":0,
 
"blockVisit" : true
 
"blockVisit" : true
 
},
 
},
  
{
+
"treasureChestWoG":{
"sid": "treasureChestWoG",
 
 
"id":101,
 
"id":101,
 
"subIdMin":1,
 
"subIdMin":1,
 
"blockVisit" : true
 
"blockVisit" : true
 
},
 
},
:
+
 
{
+
"pyramid": {
"sid": "pyramid",
+
"id":63,
"nid":63,
 
 
"subIdMax":0 //subtype 0
 
"subIdMax":0 //subtype 0
 
},
 
},
{
+
 
"sid": "wogObject",
+
"wogObject": {
"nid":63,
+
"id":63,
 
"subIdMin":1 //subtype> 0
 
"subIdMin":1 //subtype> 0
 
}
 
}

Revision as of 09:32, 27 January 2013

Object type format

Current draft. WiP.

{
   "objectTypes": 
   [
	
	"myCoolObject":{
 		//numeric ID, mandatory for h3/wog objects, shall be unique is defined
 		//not recommended for VCMI objects, shall be unique is defined, default: engine defined
		"id":689,
 
		"blockVisit" : true,

		//range of numeric sub id`s, mapped to this object type. Optional for h3/wog objects. 
		//not recommended for VCMI objects. 
		"subIdMax":0,
		"subIdMin":1
	}

   ]
}

Example:

{
   "objectTypes": 
   [
	
	"artifact":{
		"id":5,
		"blockVisit" : true
	},

	"treasureChest":{
		"id":101,
		"subIdMax":0,
		"blockVisit" : true
	},

	"treasureChestWoG":{
		"id":101,
		"subIdMin":1,
		"blockVisit" : true
	},

	"pyramid": {
		"id":63,
		"subIdMax":0 //subtype 0
	},

	"wogObject": {
		"id":63,
		"subIdMin":1 //subtype> 0
	}

   ]
}

Object format

Current draft. WiP.

  • Used by editor, RMG, (???) by engine for random new objects.
  • analogue of "ZOBJCTS.TXT", "ZEOBJTS.TXT", "ZAOBJTS.TXT" from WoG.
{"objects":[

	{
		//mandatory
		//resource ID, relative to SPRITES of animation (def file or json file (*) )
		"animation":"DEFNAME",
		
		//mandatory
		//bit mask of passability. (???) use more readable array and|or predefined templates
		"passability":"011111111111111111111111111111111111111111111111",

		//mandatory
		//bit mask of actions (???) use more readable array and|or predefined templates
		"actions": "100000000000000000000000000000000000000000000000",

		//mandatory (?)
		"id":"objectType", //object type from object type config. (!) Only string id`s.

		"landscape":["dirt", "sand"],
		"landEditGroups":["dirt", "sand"],

		//mandatory
		//numeric ((?) needed) or full string object id
		//(?) id not required if subid in full identifier
		"subId":34,//or "objectType.objectName" f.e. "creature.pikeman" 
		
		//
		"group":"", 

		//optional, default false,
		"isOverlay": true, //false, true

	}

]}


Modding related articles

Main articles
Modding changelog Modding guidelines How to create a town mod Mod Handler


Formats
Mod file Format
Town Format Creature Format Hero Classes Format
Artifact Format Animation Format Hero Format
Bonus Format Object Format Spell Format


Work-in-progress formats
Building bonuses Map format
Bonus Type Format Random map template


Outdated pages
Mod system proposal