Difference between revisions of "Object instance format"
From VCMI Project Wiki
(→Event) |
(→Pandoras box) |
||
Line 314: | Line 314: | ||
== Pandoras box == | == Pandoras box == | ||
− | {{todo}} | + | * editor {{done}} |
+ | * engine {{todo}} | ||
<syntaxhighlight lang="javascript"> | <syntaxhighlight lang="javascript"> |
Revision as of 10:26, 13 July 2015
Contents
- 1 Base formats
- 2 OH3 objects
- 2.1 Abandoned mine
- 2.2 Artifact
- 2.3 Creature generator
- 2.4 Garrison
- 2.5 Grail
- 2.6 Hero
- 2.7 Hero placeholder
- 2.8 Event
- 2.9 Lighthouse
- 2.10 Mine
- 2.11 Monster
- 2.12 Ocean bottle
- 2.13 Pandoras box
- 2.14 Quest guard
- 2.15 Random dwelling
- 2.16 Resource
- 2.17 Scholar
- 2.18 Seer hut
- 2.19 Shipyard
- 2.20 Shrine of magic
- 2.21 Spell scroll
- 2.22 Town
- 2.23 Witch hut
Base formats
Owner format
All ownable objects
{
//optional, default neutral
"owner": "red"
}
Stack instance format
{
"amount" : 1,
"type" : "skeleton",
}
Army format
[
{< Stack instance format>},
{}
//...
]
Quest format
{
"army" : [
],
"artifacts" : [
],
"completedText" : "",
"firstVisitText" : "",
"hero" : "",
"heroLevel" : -1,
"killTarget" : {
"l" : 0,
"x" : 17,
"y" : 4,
"subType" : "",
"type" : "monster"
},
"missionType" : "KillCreature",
"nextVisitText" : "",
"player" : "",
"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
}
OH3 objects
Abandoned mine
- engine [Todo]
- editor [Done]
{
"possibleResources" : [
"crystal",
"gems",
"gold",
"mercury",
"ore",
"sulfur"
]
}
Artifact
- engine [Todo]
- editor [Done]
{
"guardMessage" : "",
"guards" : []//Army format
}
Creature generator
See owner format
Garrison
- engine [Todo]
- editor [Done]
{
"army" : [], //army format
"owner" : "",
"removableUnits" : true
}
Grail
- editor [Done]
- engine [Todo]
{
"radius" : 0
}
Hero
- also prison and random 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,
//any type for prison, must match object subtype for hero, not used for random hero
"type" : "galthran",
"name" : "",
//optional default none
"patrolRadius" : 5,
//optional hero id
"portrait" : "",
//optional default inherited from configuration
"primarySkills" : {
"attack" : 0,
"defence" : 2,
"knowledge" : 0,
"spellpower" : 3
},
"secondarySkills" : {
"leadership" : 3
//...
},
//optional, default if not set, female, male
"sex" : "",
"spellBook" : [
"fortune"
//...
],
"tightFormation" : false
}
Hero placeholder
[Todo]
Event
- editor [Done]
- engine [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
[Todo] editor army support
Monster
- 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, 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
- editor [Done]
- engine [Todo]
{
"artifacts" : [
"powerOfTheDragonFather"
],
"creatures" : [
{
"amount" : 99,
"type" : "angel"
},
{
"amount" : 1,
"type" : "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]
{
"quest" : {} //quest format
}
Random dwelling
- editor [Done]
- engine [Todo]
{
"allowedFactions" : [
"castle",
"conflux",
"dungeon",
"fortress",
"inferno",
"necropolis",
"neutral",
"rampart",
"stronghold",
"tower"
],
"linked" : true,
"maxLevel" : 6,
"minLevel" : 0,
"sameAsTown" : {
"l" : 1,
"x" : 43,
"y" : 14,
"subType" : "",
"type" : "town"
}
}
Resource
- engine [Todo]
- editor [Done]
{
"amount" : 99999,
"guardMessage" : "",
"guards" : [] //army format
}
Scholar
- editor [Done]
- engine [Todo]
{
"rewardPrimSkill" : "",
"rewardSkill" : "wisdom",
"rewardSpell" : "",
}
Seer hut
- editor [Todo]
- engine [Todo]
{
"quest" : {}, //quest format
"reward" : "",
"rewardType" : "experience",
"rewardValue" : 9999
}
Shipyard
See owner format
Shrine of magic
- engine support [Todo]
- editor support [Done]
{
//optional, random spell if not set
"spell" : ""
}
Spell scroll
- engine [Todo]
- editor [Done]
"guardMessage" : "",
"guards" : [], //army format
"spell" : "magicArrow"
}
Town
[Todo]
Witch hut
- editor [Done]
- engine [Todo]
{
"allowedSkills" : [
"airMagic",
"archery",
"armorer",
"artillery",
"ballistics",
"diplomacy",
"eagleEye",
"earthMagic"
]
}