Difference between revisions of "Object instance format"

From VCMI Project Wiki
Jump to: navigation, search
(Resource)
(Ocean bottle)
Line 165: Line 165:
  
 
== Ocean bottle ==
 
== Ocean bottle ==
{{todo}}
+
 
 +
* editor {{done}}
 +
* engine {{todo}}
 +
 
 +
<syntaxhighlight lang="javascript">
 +
{
 +
"text": "Hello world!!!1111"
 +
}
 +
</syntaxhighlight>
  
 
== Pandoras box ==
 
== Pandoras box ==

Revision as of 13:28, 4 July 2015

Base formats

Owner format

All ownable objects

{
	//mandatory
	"owner": "red"
}

Stack instance format

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

Army format

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

OH3 objects

Abandoned mine

[Todo]

Artifact

[Todo]


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

Creature generator

[Todo]

Garrison

[Todo]

Grail

[Todo]

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]

Mine

[Todo]

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]

Quest guard

[Todo]

Random dwelling

[Todo]

Resource

[Todo]


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

Scholar

[Todo]


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

Seer hut

[Todo]

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]

Town

[Todo]

Witch hut

[Todo]