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
migration [2022/10/19 12:51] maximemigration [2023/09/05 11:21] (current) – Migrate to 1.9.6 mathieu
Line 1: Line 1:
 ====== Migration Notes ====== ====== Migration Notes ======
 +
 +===== Foundation 1.9.6 =====
 +
 +==== Trading Village ====
 +
 +In 1.9.6, we simplified ''TRADING_VILLAGE'''s list of resources by simply requiring a list of assets.
 +
 +<file lua>
 +-- OLD WAY
 +-- Register an addition neighbour to trade with. 
 +saltTrader:registerAsset({
 + DataType = "TRADING_VILLAGE",
 + Id = SaltPrefix .. "_VILLAGE_NANTES",
 +        Heraldry = "ICON_" .. CommonResourceSalt,
 +        Description = SaltPrefix .. "_VILLAGE_NANTES_DESC",
 + VillageName = "Nantes",
 + --RESOURCE QUANTITY PAIR
 + UnlockCost = { 
 + { Resource = "GOLD", Quantity = 300 }
 + },
 + ResourceTradingReplenishDelay = 300.0,
 +
 + --BUYING RESOURCE TRADING INFO
 + BuyingResourceList = { 
 + {
 + ResourceMaxAmount = { Resource = "HONEY", Quantity = 30 },
 +                        ReplenishingAmount = 10,
 + },
 + {
 + ResourceMaxAmount = { Resource = "HERBS", Quantity = 30 },
 +                        ReplenishingAmount = 10,
 + }
 + },
 +
 + --SELLING RESOURCE TRADING INFO
 + SellingResourceList = {
 + {
 + ResourceMaxAmount = { Resource = CommonResourceSalt, Quantity = 50 },
 +                        ReplenishingAmount = 20,
 + }
 + },
 + Allegeance = "CLERGY",
 +      ResourceNeededToUpgrade = "BERRIES",
 +      TradeRouteUpgradeNarrativePanelTemplate = "NARRATIVE_PANEL_TEMPLATE_TRADE_ROUTE_UPGRADE",
 +      WorldGuiIcon = "ICON_" .. CommonResourceSalt,
 +      UpgradeEventEnvoyProfile = "PROFILE_ENVOY_ROYAL",
 +})
 +
 +-- NEW WAY
 +-- Register an addition neighbour to trade with. 
 +saltTrader:registerAsset({
 + DataType = "TRADING_VILLAGE",
 + Id = SaltPrefix .. "_VILLAGE_NANTES",
 +        Heraldry = "ICON_" .. CommonResourceSalt,
 +        Description = SaltPrefix .. "_VILLAGE_NANTES_DESC",
 + VillageName = "Nantes",
 + --RESOURCE QUANTITY PAIR
 + UnlockCost = { 
 + { Resource = "GOLD", Quantity = 300 }
 + },
 + ResourceTradingReplenishDelay = 300.0,
 +
 + --BUYING RESOURCE TRADING INFO
 + BuyingResourceList = { 
 + "HONEY",
 + "HERBS"
 + },
 +
 + --SELLING RESOURCE TRADING INFO
 + SellingResourceList = {
 + CommonResourceSalt
 + },
 + Allegeance = "CLERGY",
 +      ResourceNeededToUpgrade = "BERRIES",
 +      TradeRouteUpgradeNarrativePanelTemplate = "NARRATIVE_PANEL_TEMPLATE_TRADE_ROUTE_UPGRADE",
 +      WorldGuiIcon = "ICON_" .. CommonResourceSalt,
 +      UpgradeEventEnvoyProfile = "PROFILE_ENVOY_ROYAL",
 +})
 +</file>
 +
 +===== Foundation 1.9.3 =====
 +
 +  * [[changelog:1.9.3.1.0417|Changelog]]
 +
 +==== Gendered fields ====
 +
 +In 1.9.3, we merged the Nun and Monk profiles and statuses together to avoid duplication. This brought in the notion of "gendered fields". Those fields are arrays based on ''GENDER_USAGE''. Fields that needed to be different depending on gender became "gendered fields".
 +
 +**Note: ''AGENT_PROFILE'' and ''VILLAGER_STATUS'' linked to Nun have been removed. Nuns will have their profile and status converted to the Monk equivalent.**
 +
 +==== Text fields ====
 +
 +  * If empty in gender, will take ''GENERIC''
 +  * If we want the ''GENERIC'' version:
 +    * If empty, will LOG and ERROR and take the ''MASCULINE'' version
 +  * To convert:
 +<file lua>
 +-- OLD WAY
 +AgentProfile = {
 +    DataType = "AGENT_PROFILE",
 +    ProfileName = "MONK"
 +}
 +
 +-- NEW WAY
 +AgentProfile = {
 +    DataType = "AGENT_PROFILE",
 +    ProfileNameGendered = {
 +        -- MASCULINE
 +        "MONK",
 +        -- FEMININE
 +        "NUN",
 +        -- GENERIC
 +        "MONASTIC"
 +    }
 +}
 +</file>
 +
 +==== Character Setup ====
 +
 +  * ''[[api:CHARACTER_SETUP_DATA|CHARACTER_SETUP_DATA]]'' per gender
 +    * Animations: If NONE in gender, will take the one from ''ALL''
 +    * Left/Right Hand: If ''nil'' in gender, will take the one from ''ALL''
 +    * Clothing: If ''nil'' in gender, will take the one from ''ALL''
 +    * Lists:
 +      * What is in ''ALL'' will be used by every gender
 +      * No more need to duplicate stuff in both genders
 +    * To convert:
 +<file lua>
 +-- OLD WAY
 +CharacterSetup = {
 +    DataType = "CHARACTER_SETUP",
 +    WalkAnimation = "WALKING",
 +    IdleAnimation = "GATHER",
 +    FemaleHatList = {
 +        "PREFAB_HAT_BERRYPICKER1",
 +    }, 
 +    MaleHatList = {
 +        "PREFAB_HAT_BERRYPICKER2",
 +    }
 +}
 +
 +-- NEW WAY
 +CharacterSetup = {
 +    DataType = "CHARACTER_SETUP",
 +    CharacterSetupDataGendered = {
 +        -- MALE
 +        {
 +            DataType = "CHARACTER_SETUP_DATA",
 +            HatList = {
 +                "PREFAB_HAT_BERRYPICKER2"
 +            }
 +        },
 +        -- FEMALE
 +        {
 +            DataType = "CHARACTER_SETUP_DATA",
 +            HatList = {
 +                "PREFAB_HAT_BERRYPICKER1"
 +            }
 +        },
 +        -- ALL
 +        {
 +            DataType = "CHARACTER_SETUP_DATA",
 +            WalkAnimation = "WALKING",
 +            IdleAnimation = "GATHER"
 +            -- Things put in lists here will be used by all genders
 +        }
 +    }
 +}
 +</file>
 +
 +==== Assets ====
 +''[[api:agent_profile|AGENT_PROFILE]]''
 +  * Gendered Fields:
 +    * ''[[api:agent_profile#CharacterSetup|CharacterSetup]]''
 +      * Need to do conversion manually
 +    * ''[[api:agent_profile#ProfileFunctionGendered|ProfileFunctionGendered]]''
 +      * Will automatically bring the value in ''ProfileFunction'' to the ''ALL'' value
 +      * You can set it up manually if you want
 +    * ''[[api:agent_profile#ProfileNameGendered|ProfileNameGendered]]''
 +      * Will automatically bring the value in ''ProfileName'' to the ''ALL'' value
 +      * You can set it up manually if you want
 +    * ''[[api:agent_profile#ProfileNamePluralGendered|ProfileNamePluralGendered]]''
 +      * Will automatically bring the value in ''ProfileNamePlural'' to the ''ALL'' value
 +      * You can set it up manually if you want
 +
 +''[[api:VILLAGER_STATUS|VILLAGER_STATUS]]''
 +  * Gendered Fields:
 +    * ''[[api:VILLAGER_STATUS#CharacterSetup|CharacterSetup]]''
 +      * Need to do conversion manually
 +    * ''[[api:VILLAGER_STATUS#StatusNameGendered|StatusNameGendered]]''
 +      * Will automatically bring the value in ''StatusName'' to the ''ALL'' value
 +      * You can set it up manually if you want
 +    * ''[[api:VILLAGER_STATUS#StatusDescriptionGendered|StatusDescriptionGendered]]''
 +      * Will automatically bring the value in ''StatusDescription'' to the ''ALL'' value
 +      * You can set it up manually if you want
 +    * ''[[api:VILLAGER_STATUS#TitleGendered|TitleGendered]]''
 +      * Will automatically bring the value in ''Title'' to the ''ALL'' value
 +      * You can set it up manually if you want
 +
 +==== Data ====
 +''[[api:agent_profile_function|AGENT_PROFILE_FUNCTION]]''
 +  * Gendered Fields:
 +    * ''[[api:agent_profile_function#AssetStatusQuotaGendered|AssetStatusQuotaGendered]]''
 +      * If ''nil'' in gender, will use quota in ''ALL''.
 +      * Can use same quota for each gender, it will only evaluate villagers of that gender for the quota.
 +      * If quota from ''ALL'', will evaluate all villagers
  
 ===== Foundation 1.9.0.7 ===== ===== Foundation 1.9.0.7 =====
Line 7: Line 213:
 ==== Sub-buildings and building functions ==== ==== Sub-buildings and building functions ====
  
-Buildings can now have sub-buildings, each sub-building having one or multiple building parts. To achieve this, each building can have a list of sub-buildings(''[[api:building#SubAssetBuildingList|BUILDING.SubAssetBuildingList]]''). Each sub-building can also have a building function used for all its parts (''[[api:building#AssetBuildingFunction|BUILDING.AssetBuildingFunction]]'').+Buildings can now have sub-buildings, each sub-building having one or multiple building parts. To achieve this, each building can have a list of sub-buildings (''[[api:building#SubAssetBuildingList|BUILDING.SubAssetBuildingList]]''). Each sub-building can also have a building function used for all its parts (''[[api:building#AssetBuildingFunction|BUILDING.AssetBuildingFunction]]'').
  
 Sub-buildings are available as soon as their parent building is available by feeding the list above. But like building parts, they can be unlocked later on using the game action ''[[api:GAME_ACTION_UNLOCK_BUILDING_LIST|GAME_ACTION_UNLOCK_BUILDING_LIST]]'' in unlockables, and feeding the field ''[[api:BUILDING_PROGRESS#AdditionalBuildingUnlockList|BUILDING_PROGRESS.AdditionalBuildingUnlockList]]''. Sub-buildings are available as soon as their parent building is available by feeding the list above. But like building parts, they can be unlocked later on using the game action ''[[api:GAME_ACTION_UNLOCK_BUILDING_LIST|GAME_ACTION_UNLOCK_BUILDING_LIST]]'' in unlockables, and feeding the field ''[[api:BUILDING_PROGRESS#AdditionalBuildingUnlockList|BUILDING_PROGRESS.AdditionalBuildingUnlockList]]''.
migration.1666198294.txt.gz · Last modified: 2022/10/19 12:51 by maxime

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki