User Tools

Site Tools


migration

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
migration [2020/05/22 12:12] maximemigration [2021/06/10 10:57] polymorphgames
Line 1: Line 1:
 ====== Migration Notes ====== ====== Migration Notes ======
  
-===== Foundation 1.6.0.0522 =====+===== Foundation Preview 1.7.1.0610 ===== 
 + 
 +  * [[changelog:1.7|Full Preview Changelog]] 
 +  * [[preview:api|Preview Scripting API]] 
 +  * [[preview:assets|Preview Assets]] 
 + 
 +==== Texture loading ==== 
 + 
 +Some ''[[api:texture|TEXTURE]]'' properties have been changed, depending on their use, to a new type: ''[[preview:api:atlas_cell|ATLAS_CELL]]''
 + 
 +Therefore, we added a way to explicitly choose the type of an asset to load, when calling ''[[mod-management-functions#registerassetid|registerAssetId]]''. Specifying the type is optional, ''TEXTURE'' will be inferred for texture assets if absent. 
 + 
 +This third parameter is currently only used for image assets. 
 + 
 +<file lua> 
 +mod:registerAssetId("test_img1.png", "TEST_IMAGE_1") -- without type specified, loads as a TEXTURE asset 
 +mod:registerAssetId("test_img2.png", "TEST_IMAGE_2", "TEXTURE") -- loads as a TEXTURE asset 
 +mod:registerAssetId("test_img3.png", "TEST_IMAGE_3", "ATLAS_CELL") -- loads as an ATLAS_CELL asset 
 +</file> 
 + 
 +**Technical Info:**  Atlas Cells are images packed in a large unique texture (commonly called atlas). This is especially useful for the GUI engine, allowing to draw most of the interface without having to switch the active binded texture. 
 + 
 +===== Foundation Preview 1.6.0.0522 =====
  
 ==== BUILDING and MONUMENT asset types ==== ==== BUILDING and MONUMENT asset types ====
Line 44: Line 66:
  
 if (foundation.getGameVersion == nil or version.cmp(foundation.getGameVersion(), "1.6") < 0) then if (foundation.getGameVersion == nil or version.cmp(foundation.getGameVersion(), "1.6") < 0) then
-    myMonument.DataType = "BUILDING",+    myMonument.DataType = "BUILDING"
     myMonument.BuildingPartSetList = {     myMonument.BuildingPartSetList = {
     {     {
Line 51: Line 73:
     }     }
 else else
-    myMonument.DataType = "BUILDING", +    myMonument.DataType = "BUILDING" 
-    myMonument.AssetCoreBuildingPart = "CORE_BUILDING_PART",+    myMonument.AssetCoreBuildingPart = "CORE_BUILDING_PART"
     myMonument.BuildingPartSetList = {     myMonument.BuildingPartSetList = {
     {     {
Line 86: Line 108:
  
 To improve the number of basement spawned, scalable building parts (with constructor ''[[api:building_constructor_scaler|BUILDING_CONSTRUCTOR_SCALER]]'' or ''[[api:building_constructor_basement|BUILDING_CONSTRUCTOR_BASEMENT]]'') now need a non-empty building zone that fits the size of your basement filler. If no building zone is set, basements will not be placed. To improve the number of basement spawned, scalable building parts (with constructor ''[[api:building_constructor_scaler|BUILDING_CONSTRUCTOR_SCALER]]'' or ''[[api:building_constructor_basement|BUILDING_CONSTRUCTOR_BASEMENT]]'') now need a non-empty building zone that fits the size of your basement filler. If no building zone is set, basements will not be placed.
 +
 +The [[api:building_zone|BUILDING_ZONE]] type has also been reworked to allow zone polygons per building part.
  
 ===== Foundation 1.4.5.1009 ===== ===== Foundation 1.4.5.1009 =====
migration.txt · Last modified: 2023/09/05 11:21 by mathieu

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki