Difference between revisions of "Object Format"
From VCMI Project Wiki
(→Object format) |
(→Object format) |
||
Line 111: | Line 111: | ||
+ | //mandatory | ||
//alternative to H3M actions, passability | //alternative to H3M actions, passability | ||
// 0=not visible, passable | // 0=not visible, passable | ||
Line 130: | Line 131: | ||
"id":"objectType", //object type from object type config. (!) Only string id`s. | "id":"objectType", //object type from object type config. (!) Only string id`s. | ||
+ | //optional; default: all terrains except rock | ||
//allowed terrain types to place object too, can be overridden in editor. Affects also RMG. | //allowed terrain types to place object too, can be overridden in editor. Affects also RMG. | ||
"landscape":["dirt", "sand"], | "landscape":["dirt", "sand"], | ||
+ | //optional; default: all terrains except rock | ||
+ | // tags from object type are always present (???) | ||
// List of tags that can be used to locate object in map editor | // List of tags that can be used to locate object in map editor | ||
"tags":["dirt", "sand", "mine"], | "tags":["dirt", "sand", "mine"], | ||
Line 145: | Line 149: | ||
− | //zindex | + | //zindex; optional; default: 0 |
//NOTE: legacy overlay objects has zindex = -1.000.000 | //NOTE: legacy overlay objects has zindex = -1.000.000 | ||
− | "zIndex": 0 | + | "zIndex": 0 |
} | } |
Revision as of 20:49, 1 February 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,
//Mandatory for new objects,
// human readable name, localized
//default for original objects from "OBJNAMES.TXT"
"name": "My cool object",
//if true, activable tiles are not visitable, but activable from neighbouring tile.
//default false
"blockVisit" : true,
//if true object can be visited from top
//default false
"topVisitable" : false,
//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,
//defaults for objects of this type (see below)
//optional
//Note: objects of same type that have random object, should have identical masks
"instance":
{
"mask":[
"00000000",
"00000000",
"00000000",
"0000VVVV",
"0000VBBB",
"0000VBBA"],
}
}
]
}
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 of animation, relative to SPRITES(def file or json file (*) )
"animation":"DEFNAME",
//mandatory
//alternative to H3M actions, passability
// 0=not visible, passable
// V=visible, passable
// B=blocked, visible
// A=activable, visible, passable depending on blockVisit flag of object type.
//top and left leading zeros are optional and in fact ignored
//bottom, right corner of mask = bottom right corner of animation frame
//animation shall not exceed visible mask space
"mask":[
"00000000",
"00000000",
"00000000",
"0000VVVV",
"0000VBBB",
"0000VBBA"],
//mandatory (?)
"id":"objectType", //object type from object type config. (!) Only string id`s.
//optional; default: all terrains except rock
//allowed terrain types to place object too, can be overridden in editor. Affects also RMG.
"landscape":["dirt", "sand"],
//optional; default: all terrains except rock
// tags from object type are always present (???)
// List of tags that can be used to locate object in map editor
"tags":["dirt", "sand", "mine"],
//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":"",
//zindex; optional; default: 0
//NOTE: legacy overlay objects has zindex = -1.000.000
"zIndex": 0
}
]}
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 |