Difference between revisions of "Object instance format"

From VCMI Project Wiki
Jump to: navigation, search
(Hero)
(Hero)
 
(5 intermediate revisions by the same user not shown)
Line 41: Line 41:
  
 
== Quest format ==
 
== Quest format ==
* editor {{wip}}
+
* editor {{done}}
 
* engine {{done}}
 
* engine {{done}}
  
Line 179: Line 179:
 
* also prison and random hero
 
* also prison and random hero
  
* editor {{wip}}
+
* editor {{done}}
 
* engine {{done}}
 
* engine {{done}}
  
Line 220: Line 220:
 
"patrolRadius" : 5,
 
"patrolRadius" : 5,
 
 
//optional hero id
+
//optional, icon index (from "Portraits[Large|Small].json" ) or another hero id, default from "type"
"portrait" : "",
+
"portrait" : "izra",  
 +
 
 +
//TODO: custom portaits
 
 
 
//optional default inherited from configuration
 
//optional default inherited from configuration
Line 470: Line 472:
  
 
== Seer hut ==
 
== Seer hut ==
* editor {{wip}}
+
* editor {{done}}
 
* engine {{done}}
 
* engine {{done}}
  

Latest revision as of 20:26, 24 December 2016

Part of Map format

Base formats

Owner format

  • editor [Done]
  • engine [Done]

All flaggable objects


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

Stack instance format

  • editor [Done]
  • engine [Done]
{
	"amount" : 1, 
	"type" : "skeleton",
	"level": 1, //optional, for random objects
	"upgraded": true  //optional, for random objects
}

Army format

  • editor [Done]
  • engine [Done]
[
  {< Stack instance format>}, 
  {}
  //...
]

Quest format

  • editor [Done]
  • engine [Done]
{
	"artifacts" : [],
	"completedText" : "",
	"creatures" : [], //army format
	"firstVisitText" : "",
	"hero" : "",
	"heroLevel" : -1,
	"killTarget" : "monster_666",
	"missionType" : "KillCreature",//None, Level, PrimaryStat, KillHero, KillCreature, Artifact, Army, Resources, Hero, Player, Custom
	"nextVisitText" : "",
	"player" : "",
	"primarySkills" : {
		"attack" : 10,
		"defence" : 10,
		//"knowledge" : -1,
		//"spellpower" : -1
	},
	"resources" : {
		"crystal" : 0,
		"gems" : 0,
		"gold" : 0,
		"mercury" : 0,
		"mithril" : 0,
		"ore" : 0,
		"sulfur" : 0,
		"wood" : 0
	},
	"timeLimit" : 5,
	"custom_x" :{<Quest format v2>}
}

Quest format 2

Proposed extension

Logical condition based.

  • editor [Todo]
  • engine [Todo]
{
//TODO:
}

Reward format

Proposed extension

  • editor [Done]
  • engine [Todo]
    • seer hut case [Done]

identifier = [scope ":"] type ["." subtype]

Possible types

  • artifact
  • creature
  • resource
  • primarySkill
  • secondarySkill
  • spell
  • luck
  • morale
  • mana
  • movement


{
	"resource.gold" : 1000,
 	"morale" : -1,
 	"wog:creature.supremeArchangel" : 9999
//...
}

OH3 objects

Abandoned mine

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

Artifact

  • editor [Done]
  • engine [Done]
{
	"guardMessage" : "",
	"guards" : []//Army format	
}

Creature generator

See owner format

Garrison

  • editor [Done]
  • engine [Done]
{
	"army" : [], //army format
	"owner" : "",
	"removableUnits" : true
}

Grail

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

Hero

  • also prison and random hero
  • editor [Done]
  • engine [Done]


{
	"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,
	
	//any type for prison, must match object subtype for hero, not used for random hero
	"type" : "galthran",
	"name" : "My hero",

	//optional default - patrol disabled. 0 - stand still, > 0 - patrol radius it tiles
	"patrolRadius" : 5,
			
	//optional, icon index (from "Portraits[Large|Small].json" ) or another hero id, default from "type"
	"portrait" : "izra", 

	//TODO: custom portaits
			
	//optional default inherited from configuration
	"primarySkills" : {
		"attack" : 0,
		"defence" : 2,
		"knowledge" : 0,
		"spellpower" : 3
	},
			
	"secondarySkills" : {
		"leadership" : "basic"//, "advanced", "expert"
		//...
	},

	//optional, default if not set
	"female" : true,//false
	"spellBook" : [
		"fortune"
		//...
	],
	"tightFormation" : false
}

Hero placeholder

[Todo]

Event

  • editor [Done]
  • engine [Done]
{
	"aIActivable" : false,
	"artifacts" : [
		"swordOfHellfire"
	],
	"availableFor" : [
		"red",
		"blue",
		"tan",
		"green",
		"orange",
		"purple",
		"teal",
		"pink"
	],
	"creatures" : [
		{
			"amount" : 1,
			"&type" : "phoenix"
		}
	],
	"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"
	],
	"reward_x" : {}//reward format

}

Lighthouse

See owner format

  • editor [Done]
  • engine [Done]

Mine

  • editor [Done]
  • engine [Done]
{
	"army" : [], //army format
	"owner" : ""
}

Monster

  • editor [Done]
  • engine [Done]
{
	//mandatory
	"character" : "compliant",// friendly, aggressive, hostile, savage

	//default random
	"amount" : 19,
	
	//optional, default false
	"noGrowing" : true

	//optional, default false
	"neverFlees" : 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
	},
	"reward_x" : {}//reward format
}

Sign/Ocean bottle

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

Pandoras box

  • editor [Done]
  • engine [Done]
{
	"artifacts" : [
		"powerOfTheDragonFather"
	],
	"creatures" : [], //army format
	"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" : "basic"//, "advanced", "expert"
	},
	"spells" : [
		"townPortal"
	],
	"reward_x" : {}//reward format

}

Quest guard

  • editor [Done]
  • engine [Done]
{
	"quest" : {} //quest format
}

Random dwelling

  • editor [Done]
  • engine [Done]
{
	"allowedFactions" :{<logical id condition>},
	"maxLevel" : 7,
	"minLevel" : 1,
	"sameAsTown" : "town_42"
}

Resource

  • editor [Done]
  • engine [Done]
{
	"amount" : 99999,
	"guardMessage" : "",
	"guards" : [] //army format
}

Scholar

  • editor [Done]
  • engine [Done]
{
	"rewardPrimSkill" : "",
	"rewardSkill" : "wisdom",
	"rewardSpell" : "",
	"reward_x" : {}//reward format
}

Seer hut

  • editor [Done]
  • engine [Done]
{
	"quest" : {}, //quest format
	"reward" : {}//reward format
}

Shipyard

See owner format

  • editor [Done]
  • engine [Done]

Shrine of magic

  • editor [Done]
  • engine [Done]
{
	//optional, random spell if not set
	"spell" : ""
}

Spell scroll

  • engine [Done]
  • editor [Done]
	"guardMessage" : "",
	"guards" : [], //army format
	"spell" : "magicArrow"
}

Town

  • engine [Done]
  • editor [Done]
  • castle events [Todo]
	"army" : [], //army format
	"tightFormation" : false

	"name" : "", 
	"buildings" : {<Logical Id Condition>}
	"spells" : {<Logical Id Condition>}

	"events" : nil, //TODO

}

Witch hut

  • editor [Done]
  • engine [Done]
{
	"allowedSkills" : {<Logical Id Condition>}
}