User Tools

Site Tools


monuments

Monuments

Monuments are complex buildings that let the player assemble different building parts.

The different BUILDING_CONSTRUCTOR allow to create different type of parts, like scalable tower, bridges, etc.

Here is an example of declaring a new monument, allowing a collection of building parts:

monument.lua
-- Register the mithril factory monument
mod:register({
	DataType = "MONUMENT",
	Id = "MITHRIL_FACTORY_MONUMENT",
	Name = "MITHRIL_FACTORY_NAME",
	Description = "MITHRIL_FACTORY_DESC",
	BuildingType = "MONUMENT",
	BuildingPartList = {
		"MITHRIL_FACTORY_CORE_ROOT_PART",
		"MITHRIL_FACTORY_EXTENSION_A_ROOT_PART",
		"MITHRIL_FACTORY_EXTENSION_B_ROOT_PART",
		"MITHRIL_FACTORY_DOOR_A_PART",
		"MITHRIL_FACTORY_DOOR_B_PART",
		"MITHRIL_FACTORY_DECORATION_A_PART",
		"MITHRIL_FACTORY_DECORATION_B_PART"
	},
	RequiredPartList = {
		-- Necessarily a list of 'MONUMENT_REQUIRED_PART_PAIR', no need to specify the DataType of each element of the list
		{ Category = "CORE", Quantity = 1 },
		{ Category = "EXTENSION", Quantity = 2 },
		{ Category = "DOOR", Quantity = 1 }
	}
})

For details on how to create complex building parts, see mod Example 02.

monuments.txt · Last modified: 2019/09/26 17:08 by maxime

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki