This is an old revision of the document!
Table of Contents
Migration Notes
Foundation 1.3.1.0802
Building part sets
In order to categorize the different parts of a building in the construction window, buildings and monuments now have building part sets.
For assets from type ASSET_BUILDING
, the attribute BuildingPartList
is now replaced with BuildingPartSetList
(a list of BUILDING_PART_SET
).
Migration example for the Example 02 mod:
- monument.lua
mod:register({ DataType = "MONUMENT", ... -- Old -- 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" -- }, -- New BuildingPartSetList = { { Name = "PRODUCTION_CORE", BuildingPartList = { "MITHRIL_FACTORY_CORE_ROOT_PART" } }, { Name = "PRODUCTION_EXTENSION", BuildingPartList = { "MITHRIL_FACTORY_EXTENSION_A_ROOT_PART", "MITHRIL_FACTORY_EXTENSION_B_ROOT_PART" } }, { Name = "ENTRANCE", BuildingPartList = { "MITHRIL_FACTORY_DOOR_A_PART", "MITHRIL_FACTORY_DOOR_B_PART" } }, { Name = "DECORATION", BuildingPartList = { "MITHRIL_FACTORY_DECORATION_A_PART", "MITHRIL_FACTORY_DECORATION_B_PART" } } }, ... })
Event choices
The event assets have been reworked to give the possiblity to have multiple actions triggered when a choice is made. The class EVENT
now has a new attribute ChoiceList
(a list of EVENT_CHOICE
), replacing the attribute ActionList
.
Migration example for the Example 01 mod, where the action to give a quest has been replaced by a choice that gives two quests:
- events.lua
myMod:register({ DataType = "EVENT", ... -- Old -- ActionList = { -- { -- DataType = "EVENT_ACTION_GIVE_QUEST", -- ShortName = "SUPER_EVENT_ACCEPT_QUEST", -- Quest = "SUPER_QUEST" -- }, -- { -- DataType = "EVENT_ACTION_IGNORE", -- ShortName = "KINGDOM_DECLINE", -- } -- }, -- New ChoiceList = { { ShortName = "EVENT_CHOICE_GIVE_TWO_QUESTS", EventActionList = { { DataType = "EVENT_ACTION_GIVE_QUEST", Quest = "SUPER_QUEST" }, { DataType = "EVENT_ACTION_GIVE_QUEST", Quest = "GREAT_QUEST" } } }, { ShortName = "KINGDOM_DECLINE", EventActionList = { { DataType = "EVENT_ACTION_IGNORE" } } }, }, ... })
Foundation 1.2.2.3105
New mod.json
In order to only load mods when enabled, Foundation will now need a new description file for each mod. It will declare all the things Foundation would need to know about the mod without parsing the lua file.
- mod.json
{ "Name": "Simple Example Mod", "Author": "Leo", "Description": "A very simple mod example", "Version": "2.0.0", "AdditionalLanguageList": [ { "Name": "Klingon", "Code": "tlh" } ] }
createMod() function is simplified
Since the new mod.json
file already contains all basic information about the mod, the foundation.createMod()
function does not take any parameter anymore.
- mod.lua
local myMod = foundation.createMod()
GENERAL_DATA asset type has been removed
GENERAL_DATA
asset type has been removed and all its properties has been moved to BALANCING
.
However, modders can now partially override Foundation main balancing (DEFAULT_BALANCING
), instead of being forced to replace all balancing properties. see Asset override for more information.