migration
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision | ||
migration [2019/08/02 13:07] – maxime | migration [2020/05/22 12:13] – maxime | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== Migration Notes ====== | ====== Migration Notes ====== | ||
- | ===== Foundation | + | ===== Foundation |
+ | |||
+ | ==== BUILDING and MONUMENT asset types ==== | ||
+ | |||
+ | Monuments have been reworked, and the '' | ||
+ | |||
+ | === Buildings === | ||
+ | |||
+ | A building' | ||
+ | |||
+ | <file lua> | ||
+ | local myBuilding = | ||
+ | { | ||
+ | DataType = " | ||
+ | ... | ||
+ | } | ||
+ | |||
+ | if (foundation.getGameVersion == nil or version.cmp(foundation.getGameVersion(), | ||
+ | myBuilding.BuildingPartSetList = { | ||
+ | { | ||
+ | Name = " | ||
+ | BuildingPartList = { " | ||
+ | } | ||
+ | } | ||
+ | else | ||
+ | myBuilding.AssetCoreBuildingPart = " | ||
+ | end | ||
+ | |||
+ | mod: | ||
+ | </ | ||
+ | |||
+ | === Monuments === | ||
+ | |||
+ | Monuments are now created around a single building part, placed before all the others. This part is the one selected just after selecting the monument in the building selection menu. This part has to be specified in the property '' | ||
+ | |||
+ | The core building part, if removed, will remove the whole monument. Like for the market, the core building part can be used for preview only, and be invisible once built by setting '' | ||
+ | |||
+ | <file lua> | ||
+ | local myMonument = { | ||
+ | ... | ||
+ | } | ||
+ | |||
+ | if (foundation.getGameVersion == nil or version.cmp(foundation.getGameVersion(), | ||
+ | myMonument.DataType = " | ||
+ | myMonument.BuildingPartSetList = { | ||
+ | { | ||
+ | Name = " | ||
+ | BuildingPartList = { " | ||
+ | } | ||
+ | else | ||
+ | myMonument.DataType = " | ||
+ | myMonument.AssetCoreBuildingPart = " | ||
+ | myMonument.BuildingPartSetList = { | ||
+ | { | ||
+ | Name = " | ||
+ | BuildingPartList = { " | ||
+ | } | ||
+ | end | ||
+ | |||
+ | mod: | ||
+ | </ | ||
+ | |||
+ | ==== Bridge mover ==== | ||
+ | |||
+ | The way bridges are placed has been modified, and requires a small mover change. A bridge mover ('' | ||
+ | |||
+ | Now, to have a functional bridge, you need instead to place a bridge mover on the start part and end part, and remove the mover of the core part. | ||
+ | |||
+ | Before: | ||
+ | * CorePart - '' | ||
+ | * StartPart - '' | ||
+ | * EndPart - '' | ||
+ | |||
+ | Now: | ||
+ | * CorePart - '' | ||
+ | * StartPart - '' | ||
+ | * EndPart - '' | ||
+ | |||
+ | ==== Slope constructor ==== | ||
+ | |||
+ | Improvements have been made to the bridge, and you now have to setup bridge end parts ('' | ||
+ | |||
+ | ==== Building zone and basement ==== | ||
+ | |||
+ | To improve the number of basement spawned, scalable building parts (with constructor '' | ||
+ | |||
+ | ===== Foundation 1.4.5.1009 ===== | ||
+ | |||
+ | ==== Building Part Function ==== | ||
+ | |||
+ | For assets from type '' | ||
+ | |||
+ | Migration example for the //Example 02// mod: | ||
+ | <file lua building_parts.lua> | ||
+ | mod: | ||
+ | DataType = " | ||
+ | ... | ||
+ | |||
+ | -- OLD | ||
+ | -- BuildingFunction = { | ||
+ | -- DataType = " | ||
+ | -- WorkerCapacity = 4, | ||
+ | -- RelatedJob = { Job = " | ||
+ | -- ResourceProduced = { | ||
+ | -- { Resource = " | ||
+ | -- } | ||
+ | -- }, | ||
+ | |||
+ | -- NEW | ||
+ | BuildingFunction = " | ||
+ | |||
+ | ... | ||
+ | }) | ||
+ | |||
+ | -- ALSO NEW | ||
+ | mod: | ||
+ | DataType = " | ||
+ | Id = " | ||
+ | WorkerCapacity = 4, | ||
+ | RelatedJob = { Job = " | ||
+ | ResourceProduced = { | ||
+ | { Resource = " | ||
+ | } | ||
+ | }) | ||
+ | </ | ||
+ | |||
+ | ==== Resource Type List ==== | ||
+ | The enumeration '' | ||
+ | |||
+ | Another change is that resource, markets, granaries and warehouses can now have multiple resource types. This, combined with new customizable resource types, will be useful to customize where resources can be stocked and sold. This means that the property '' | ||
+ | |||
+ | For example, before this change, the wine was a resource of type '' | ||
+ | |||
+ | The complete list of core resource types can be found: [[api: | ||
+ | |||
+ | Migration example: | ||
+ | <file lua> | ||
+ | mod: | ||
+ | DataType = " | ||
+ | ... | ||
+ | |||
+ | -- OLD | ||
+ | -- ResourceType = " | ||
+ | |||
+ | -- NEW | ||
+ | ResourceTypeList = { | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | |||
+ | ... | ||
+ | }) | ||
+ | </ | ||
+ | |||
+ | ===== Foundation 1.3.1.0802 ===== | ||
+ | |||
+ | ==== Building Part Sets ==== | ||
- | ==== 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. | In order to categorize the different parts of a building in the construction window, buildings and monuments now have building part sets. | ||
Line 61: | Line 216: | ||
</ | </ | ||
- | ==== Event choices | + | ==== Event Choices |
The event assets have been reworked to give the possiblity to have multiple actions triggered when a choice is made. The class '' | The event assets have been reworked to give the possiblity to have multiple actions triggered when a choice is made. The class '' | ||
Line 110: | Line 266: | ||
==== New mod.json ==== | ==== 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. | 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. | ||
Line 129: | Line 286: | ||
==== createMod() function is simplified ==== | ==== createMod() function is simplified ==== | ||
+ | |||
Since the new '' | Since the new '' | ||
Line 136: | Line 294: | ||
==== GENERAL_DATA asset type has been removed ==== | ==== GENERAL_DATA asset type has been removed ==== | ||
+ | |||
'' | '' | ||
However, modders can now partially override Foundation main balancing ('' | However, modders can now partially override Foundation main balancing ('' |
migration.txt · Last modified: 2023/09/05 11:21 by mathieu