|
|
(35 intermediate revisions by 3 users not shown) |
Line 1: |
Line 1: |
− | == Object type format ==
| + | {{Template:MovedToWebpage|https://vcmi.eu/modders/Map_Object_Format/}} |
− | | |
− | ''Current draft. WiP.''
| |
− | | |
− | <syntaxhighlight lang="javascript">
| |
− | | |
− | {
| |
− | "objectTypes":
| |
− | [
| |
− |
| |
− | {
| |
− | //string ID, mandatory, camel case, shall be unique
| |
− | //
| |
− | "sid": "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
| |
− | "nid":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
| |
− | }
| |
− | | |
− | ]
| |
− | }
| |
− | | |
− | | |
− | </syntaxhighlight>
| |
− | | |
− | '''Example:'''
| |
− | | |
− | <syntaxhighlight lang="javascript">
| |
− | | |
− | {
| |
− | "objectTypes":
| |
− | [
| |
− |
| |
− | {
| |
− | "sid": "artifact",
| |
− | "nid":5,
| |
− | "blockVisit" : true
| |
− | },
| |
− | | |
− | {
| |
− | "sid": "treasureChest",
| |
− | "nid":101,
| |
− | "subIdMax":0,
| |
− | "blockVisit" : true
| |
− | },
| |
− | | |
− | {
| |
− | "sid": "treasureChestWoG",
| |
− | "id":101,
| |
− | "subIdMin":1,
| |
− | "blockVisit" : true
| |
− | },
| |
− | :
| |
− | {
| |
− | "sid": "pyramid",
| |
− | "nid":63,
| |
− | "subIdMax":0 //subtype 0
| |
− | },
| |
− | {
| |
− | "sid": "wogObject",
| |
− | "nid":63,
| |
− | "subIdMin":1 //subtype> 0
| |
− | }
| |
− | | |
− | ]
| |
− | }
| |
− | | |
− | </syntaxhighlight>
| |
− | | |
− | == 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.
| |
− | | |
− | <syntaxhighlight lang="javascript">
| |
− | | |
− | {"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
| |
− | | |
− | }
| |
− | | |
− | ]}
| |
− | | |
− | </syntaxhighlight>
| |
− | | |
− | | |
− | {{Modding}}
| |