mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-06 00:24:11 +02:00
879aaba980
Looks like website only recognizes javascript & json, and is not aware of jsonc or json5. Will result in small regression on Github web view - comments will show up as red (since comments are not part of json format), but syntax highlight would work both on website and on Github. Alternative is using javascript for syntax highlight, however syntax highlighter for json looks better on both website and Github (since it uses separate highlighting for json keys, separate from strings in values)
1.1 KiB
1.1 KiB
Flaggable objects
Flaggable object are those that can be captured by a visiting hero. H3 examples are mines, dwellings, or lighthouse.
Currently, it is possible to make flaggable objects that provide player with:
- Any Bonus supported by bonus system
- Daily resources income (wood, ore, gold, etc)
Format description
{
"baseObjectName" : {
"name" : "Object name",
"handler" : "flaggable",
"types" : {
"objectName" : {
// Text for message that player will get on capturing this object with a hero
// Alternatively, it is possible to reuse existing string from H3 using form '@core.advevent.69'
"onVisit" : "{Object Name}\r\n\r\nText of messages that player will see on visit.",
// List of bonuses that will be granted to player that owns this object
"bonuses" : {
"firstBonus" : { BONUS FORMAT },
"secondBonus" : { BONUS FORMAT },
},
// Resources that will be given to owner on every day
"dailyIncome" : {
"wood" : 2,
"ore" : 2,
"gold" : 1000
}
}
}
}
}