User Tools

Site Tools


preview

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Next revisionBoth sides next revision
preview [2019/10/02 15:53] – [Migration Notes] polymorphgamespreview [2019/12/18 18:35] – [How to Access 1.5 Preview ?] polymorphgames
Line 1: Line 1:
-====== Preview Modding Documentation for Foundation 1.======+====== Preview Modding Documentation for Foundation 1.======
  
-:!: Please do not upload mods for Foundation 1.to mod.io before the official release of those modding features, since it would make your mod visible to all players, and they won't be able to play it :!:+:!: Please do not upload mods for Foundation 1.to mod.io before the official release of those modding features, since it would make your mod visible to all players, and they won't be able to play it :!:
  
-===== How to Access 1.Preview ? ===== +===== How to Access 1.Preview ? ===== 
-Contact developer on our [[https://discord.gg/foundation|discord server]].+Switch to the Steam or GOG "preview" beta branch.
  
 ===== Generated Documentation ===== ===== Generated Documentation =====
   * [[preview:api|API]]   * [[preview:api|API]]
   * [[preview:assets|Assets]]   * [[preview:assets|Assets]]
-  * [[api:mod-functions|Mod Functions]] 
  
-===== New Features ===== +===== New Features and pages ===== 
-  * TODO... +  * [[preview:components|Custom components]] 
-===== Migration Notes ===== +  * [[preview:data-type|Data Types]]
-==== Building part function ====+
  
-For assets from type ''BUILDING_PART'', the attribute ''BuildingFunction'' is now replaced with ''AssetBuildingFunction''. Thus, the building function must now be declared as an asset of type ''BUILDING_FUNCTION''+===== Changelog ===== 
- +See in [[changelog#Foundation 1.5.0.1218|Changelog]].
-Migration example for the //Example 02// mod: +
-<file lua building_parts.lua> +
-mod:register({ +
-    DataType "BUILDING_PART", +
-    ... +
- +
---  OLD +
---  BuildingFunction {  +
---      DataType "BUILDING_FUNCTION_WORKPLACE", +
---      WorkerCapacity 4, +
---      RelatedJob { Job "MITHRIL_MINER", Behavior "WORK_BEHAVIOR" }, +
---      ResourceProduced +
---          { Resource "MITHRIL_ORE", Quantity 5 } +
---      } +
---  }, +
- +
---  NEW +
-    BuildingFunction = "MITHRIL_MINE_FUNCTION", +
- +
-    ... +
-}) +
- +
--- ALSO NEW +
-mod:register({ +
-    DataType = "BUILDING_FUNCTION_WORKPLACE", +
-    Id = "MITHRIL_MINE_FUNCTION", +
-    WorkerCapacity = 4, +
-    RelatedJob = { Job = "MITHRIL_MINER", Behavior = "WORK_BEHAVIOR" }, +
-    ResourceProduced = { +
-        { Resource = "MITHRIL_ORE", Quantity = +
-    } +
-}) +
-</file> +
- +
-==== Resource type list ==== +
-The enumeration ''RESOURCE_TYPE'' has been removed, and has been replaced by plain stringsThis change means that modders can now define their own new types to work with their custom systemsThe list of resource types has been moved to another page. +
- +
-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 ''"ResourceType"'' from ''"RESOURCE"'' has been renamed to ''"ResourceTypeList"''+
- +
-For example, before this change, the wine was a resource of type ''"LUXURY_FOOD"'''. Now, it has the types ''"GRANARY"'' and ''"TAVERN"''. The granary is configured to only store resources of type ''"GRANARY"'', and the tavern can only sell resources of type ''"TAVERN"''. Thus, wine will only be stored in granaries, and sold in taverns. The luxury stall, with its types ''"LUXURY"'' and ''"LUXURY_FOOD"'', will not be able to sell wine anymore. +
- +
-Migration example: +
-<file lua> +
-mod:register({ +
-    DataType = "RESOURCE", +
-    ... +
- +
---  OLD +
---  ResourceType = "LUXURY_FOOD", +
- +
---  NEW +
-    ResourceTypeList = { +
-      "GRANARY", +
-      "TAVERN" +
-    } +
- +
-    ... +
-}) +
-</file>+

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki