Difference between revisions of "Object instance format"

From VCMI Project Wiki
Jump to: navigation, search
(Seer hut)
(Event)
Line 137: Line 137:
 
== Event ==
 
== Event ==
 
{{todo}}
 
{{todo}}
 +
 +
"aIActivable" : false,
 +
"artifacts" : [
 +
"swordOfHellfire"
 +
],
 +
"availableFor" : [
 +
"red",
 +
"blue",
 +
"tan",
 +
"green",
 +
"orange",
 +
"purple",
 +
"teal",
 +
"pink"
 +
],
 +
"creatures" : [
 +
{
 +
"creCount" : 1,
 +
"creID" : "phoenix",
 +
"randomCount" : false
 +
}
 +
],
 +
"experience" : 1,
 +
"guardMessage" : "...",
 +
"guards" : [],//army format
 +
"humanActivable" : true,
 +
"luck" : -1,
 +
"mana" : -1,
 +
"morale" : -1,
 +
"primarySkills" : {
 +
"attack" : 1,
 +
"defence" : 1,
 +
"knowledge" : 1,
 +
"spellpower" : 1
 +
},
 +
"removeAfterVisit" : true,
 +
"resources" : {
 +
"crystal" : -1,
 +
"gems" : -1,
 +
"gold" : -1,
 +
"mercury" : -1,
 +
"mithril" : 0,
 +
"ore" : -1,
 +
"sulfur" : -1,
 +
"wood" : -1
 +
},
 +
"secondarySkills" : {
 +
"fireMagic" : 1
 +
},
 +
"spells" : [
 +
"protectFire"
 +
]
  
 
== Lighthouse ==
 
== Lighthouse ==

Revision as of 13:49, 4 July 2015

Base formats

Owner format

All ownable objects

{
	//optional, default neutral
	"owner": "red"
}

Stack instance format

{
	"creCount" : 1,
	"creID" : "skeleton",
}

Army format

[
  {< Stack instance format>}, 
  {}
  //...
]

OH3 objects

Abandoned mine

  • engine [Todo]
  • editor [Done]
{
	"possibleResources" : [
		"crystal",
		"gems",
		"gold",
		"mercury",
		"ore",
		"sulfur"
	]
}

Artifact

[Todo]


{
	"guardMessage" : "",
	"guards" : []//Army format	
}

Creature generator

See owner format

Garrison

[Todo]

Grail

  • editor [Done]
  • engine [Todo]
{
	"radius" : 0
}

Hero

[Todo]


{
			"army" : <Army format>
			,
			"artifacts" : {
				"backpack" : [
				],
				"feet" : "",
				"head" : "",
				"leftHand" : "",
				"leftRing" : "",
				"mach1" : "",
				"mach2" : "",
				"mach3" : "",
				"mach4" : "",
				"misc1" : "",
				"misc2" : "",
				"misc3" : "",
				"misc4" : "",
				"misc5" : "",
				"neck" : "",
				"rightHand" : "",
				"rightRing" : "",
				"shoulders" : "",
				"spellbook" : "",
				"torso" : ""
			},
			"biography" : "",
			"experience" : 0,
			"id" : "galthran",
			"name" : "",

			//optional default -1
			"patrolRadius" : -1,
			
			//optionale hero id
			"portrait" : "",
			
			//optional default -1
			"primarySkills" : {
				"attack" : -1,
				"defence" : -1,
				"knowledge" : -1,
				"spellpower" : -1
			},
			"secondarySkills" : {
				"leadership" : 3
				//...
			},
			//optional, default if not set, female, male
			"sex" : "",
			"spellBook" : [
				"fortune"
				//...
			],
			"tightFormation" : false
}

Event

[Todo]

"aIActivable" : false, "artifacts" : [ "swordOfHellfire" ], "availableFor" : [ "red", "blue", "tan", "green", "orange", "purple", "teal", "pink" ], "creatures" : [ { "creCount" : 1, "creID" : "phoenix", "randomCount" : false } ], "experience" : 1, "guardMessage" : "...", "guards" : [],//army format "humanActivable" : true, "luck" : -1, "mana" : -1, "morale" : -1, "primarySkills" : { "attack" : 1, "defence" : 1, "knowledge" : 1, "spellpower" : 1 }, "removeAfterVisit" : true, "resources" : { "crystal" : -1, "gems" : -1, "gold" : -1, "mercury" : -1, "mithril" : 0, "ore" : -1, "sulfur" : -1, "wood" : -1 }, "secondarySkills" : { "fireMagic" : 1 }, "spells" : [ "protectFire" ]

Lighthouse

See owner format

Mine

See owner format

Monster

  • since 1.0
  • editor support [Done]
  • engine support [Todo]
{
	//mandatory
	"character" : 2,

	//required if randomCount is false
	"count" : 19,
	
	//optional, default false
	"noGrowing" : true

	//optional, default false
	"neverFlees" : false,

	//optional, default false
	"randomCount" : false,

	//optional, artifact id
	"rewardArtifact" : "",

	//optional,
	"rewardMessage" : "",

	//all fields optional
	"rewardResources" : {
	
		"crystal" : 0,
		"gems" : 0,
		"gold" : 0,
		"mercury" : 0,
		"mithril" : 0,
		"ore" : 0,
		"sulfur" : 0,
		"wood" : 0
	}
}

Ocean bottle

  • editor [Done]
  • engine [Todo]
{
	"text": "Hello world!!!1111"
}

Pandoras box

[Todo]

{
{
	"artifacts" : [
		"powerOfTheDragonFather"
	],
	"creatures" : [
		{
		"creCount" : 99,
		"creID" : "angel"
		},
		{
			"creCount" : 1,
			"creID" : "archangel"
		}
	],
	"experience" : 1000000,
	"guardMessage" : "Prepare to fight...",
	"guards" : [], //army format
	"luck" : 2,
	"mana" : 100,
	"morale" : 2,
	"primarySkills" : {
		"attack" : 1,
		"defence" : 1,
		"knowledge" : 1,
		"spellpower" : 1
	},
	"resources" : {
		"crystal" : -1,
		"gems" : -1,
		"gold" : -1,
		"mercury" : -1,
		"mithril" : 0,
		"ore" : -1,
		"sulfur" : -1,
		"wood" : -1
	},
	"secondarySkills" : {
		"logistics" : 1
	},
	"spells" : [
		"townPortal"
	]

}

Quest guard

[Todo]

Random dwelling

[Todo]

Resource

[Todo]


{
	"amount" : 99999,
	"guardMessage" : "",
	"guards" : [] //army format
}

Scholar

[Todo]


{
	"bonusId" : "wisdom",
	"bonusType" : "skill",
}

Seer hut

{
	"quest" : {
		"army" : [
		],
		"artifacts" : [
		],
		"completedText" : "",
		"firstVisitText" : "",
		"heroID" : "",
		"heroLevel" : -1,
		"killTarget" : {
			"l" : 0,
			"x" : 17,
			"y" : 4,
			"subType" : "",
			"type" : "monster"
		},
		"missionType" : "KillCreature",
		"nextVisitText" : "",
		"playerID" : "",
		"primarySkills" : {
			"attack" : -1,
			"defence" : -1,
			"knowledge" : -1,
			"spellpower" : -1
		},
		"resources" : {
			"crystal" : 0,
			"gems" : 0,
			"gold" : 0,
			"mercury" : 0,
			"mithril" : 0,
			"ore" : 0,
			"sulfur" : 0,
			"wood" : 0
		},
		"timeLimit" : -1
	},
	"rewardID" : "",
	"rewardType" : "experience",
	"rewardValue" : 9999
}

Shipyard

See owner format

Shrine of magic

  • since 1.0
  • engine support [Todo]
  • editor support [Done]
{
	//optional, random spell if not set
	"spellId" : ""
}

Spell scroll

[Todo]

	"guardMessage" : "",
	"guards" : [], //army format
	"spellID" : "magicArrow"
}

Town

[Todo]

Witch hut

  • editor [Done]
  • engine [Todo]
{
	"allowedSkills" : [
		"airMagic",
		"archery",
		"armorer",
		"artillery",
		"ballistics",
		"diplomacy",
		"eagleEye",
		"earthMagic"
	]
}