Browse Source

Updated documentation

Ivan Savenko 1 year ago
parent
commit
93096dc63c
2 changed files with 27 additions and 1 deletions
  1. 1 1
      docs/modders/Map_Object_Format.md
  2. 26 0
      docs/modders/Map_Objects/Flaggable.md

+ 1 - 1
docs/modders/Map_Object_Format.md

@@ -49,6 +49,7 @@ These are object types that are available for modding and have configurable prop
 - `dwelling` - see [Dwelling](Map_Objects/Dwelling.md). Object that allows recruitments of units outside of towns
 - `market` - see [Market](Map_Objects/Market.md). Trading resources, artifacts, creatures and such
 - `boat` - see [Boat](Map_Objects/Boat.md). Object to move across different terrains, such as water
+- `flaggable` - see [Flaggable](Map_Objects/Flaggable.md). Object that can be flagged by a player to provide [Bonus](Bonus_Format.md) or resources
 - `hillFort` - TODO: documentation. See config files in vcmi installation for reference
 - `shipyard` - TODO: documentation. See config files in vcmi installation for reference
 - `terrain` - Defines terrain overlays such as magic grounds. TODO: documentation. See config files in vcmi installation for reference
@@ -60,7 +61,6 @@ These are types that don't have configurable properties, however it is possible
 - `generic` - Defines empty object type that provides no functionality. Note that unlike `static`, objects of this type are never used by RMG
 - `borderGate`
 - `borderGuard`
-- `lighthouse`
 - `magi`
 - `mine`
 - `obelisk`

+ 26 - 0
docs/modders/Map_Objects/Flaggable.md

@@ -0,0 +1,26 @@
+# Flaggable objects
+
+Flaggable object are those that can be captured by a visiting hero. H3 examples are mines, dwellings, or lighthouse.
+
+```jsonc
+{
+  "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 },
+        }
+      }
+    }
+  }
+}
+```