Пример #1
0
        static void Postfix(ref BuildingType ____buildingCastleTrainingFields, ref BuildingType ____buildingSettlementTradingFields)
        {
            int multiplier = int.Parse(Settings.LoadSetting("TrainingFieldMultiplier"));

            ____buildingCastleTrainingFields.Initialize(new TextObject("{=BkTiRPT4}Training Fields", null), new TextObject("{=otWlERkc}A field for military drills that increase the daily experience gain of all garrisoned units.", null), new int[]
            {
                39,
                52,
                65
            }, BuildingLocation.Castle, new Dictionary <BuildingEffect, IReadOnlyList <int> >
            {
                {
                    DefaultBuildingEffects.Experience,
                    new List <int>
                    {
                        1 * multiplier,
                        2 * multiplier,
                        3 * multiplier
                    }
                }
            }, 0);

            ____buildingSettlementTradingFields.Initialize(new TextObject("{=BkTiRPT4}Training Fields", null), new TextObject("{=otWlERkc}A field for military drills that increase the daily experience gain of all garrisoned units.", null), new int[]
            {
                390,
                520,
                650
            }, BuildingLocation.Settlement, new Dictionary <BuildingEffect, IReadOnlyList <int> >
            {
                {
                    DefaultBuildingEffects.Experience,
                    new List <int>
                    {
                        1 * multiplier,
                        2 * multiplier,
                        4 * multiplier
                    }
                }
            }, 0);
        }
 static void Postfix(BuildingType ____buildingCastleTrainingFields, BuildingType ____buildingCastleGranary, BuildingType ____buildingCastleGardens, BuildingType ____buildingCastleMilitiaBarracks)
 {
     #region Training Fields
     if (Settings.Instance.CastleTrainingFieldsBonusEnabled)
     {
         ____buildingCastleTrainingFields.Initialize(new TextObject("{=BkTiRPT4}Training Fields"),
                                                     new TextObject("{=otWlERkc}A field for military drills that increase the daily experience gain of all garrisoned units."),
                                                     new int[3]
         {
             39,
             52,
             65
         },
                                                     BuildingLocation.Castle, new Dictionary <BuildingEffect, IReadOnlyList <int> >
         {
             {
                 DefaultBuildingEffects.Experience,
                 new List <int>
                 {
                     Settings.Instance.CastleTrainingFieldsXpAmountLevel1,
                     Settings.Instance.CastleTrainingFieldsXpAmountLevel2,
                     Settings.Instance.CastleTrainingFieldsXpAmountLevel3
                 }
             }
         });
     }
     #endregion
     #region Granary
     if (Settings.Instance.CastleGranaryBonusEnabled)
     {
         ____buildingCastleGranary.Initialize(new TextObject("{=PstO2f5I}Granary"), new TextObject("{=iazij7fO}Keeps stockpiles of food so that the settlement has more food supply. Increases the local food supply."), new int[3]
         {
             39,
             65,
             91
         },
                                              BuildingLocation.Castle, new Dictionary <BuildingEffect, IReadOnlyList <int> >
         {
             {
                 DefaultBuildingEffects.FoodStock,
                 new List <int>
                 {
                     Settings.Instance.CastleGranaryStorageAmountLevel1,
                     Settings.Instance.CastleGranaryStorageAmountLevel2,
                     Settings.Instance.CastleGranaryStorageAmountLevel3
                 }
             }
         });
     }
     #endregion
     #region Gardens
     if (Settings.Instance.CastleGardensBonusEnabled)
     {
         ____buildingCastleGardens.Initialize(new TextObject("{=yT6XN4Mr}Gardens"),
                                              new TextObject("{=ZCLVOXgM}Castles contained fruit trees, bakeries, chicken coups to be used in emergencies. While it is not enough for a full contingency of troops any small amount of fresh foods are a big help while in the sieges."),
                                              new int[3]
         {
             25,
             39,
             52
         }, BuildingLocation.Castle, new Dictionary <BuildingEffect, IReadOnlyList <int> >
         {
             {
                 DefaultBuildingEffects.FoodProduction,
                 new List <int>
                 {
                     Settings.Instance.CastleGardensFoodProductionAmountLevel1,
                     Settings.Instance.CastleGardensFoodProductionAmountLevel2,
                     Settings.Instance.CastleGardensFoodProductionAmountLevel3
                 }
             }
         });
     }
     #endregion
     #region Militia Barracks
     if (Settings.Instance.CastleMilitiaBarracksBonusEnabled)
     {
         ____buildingCastleMilitiaBarracks.Initialize(new TextObject("{=l91xAgmU}Militia Barracks"),
                                                      new TextObject("{=YRrx8bAK}Provides battle training for citizens and recruit them into militia, each level increases daily militia recruitment."),
                                                      new int[3]
         {
             46,
             59,
             72
         }, BuildingLocation.Castle, new Dictionary <BuildingEffect, IReadOnlyList <int> >
         {
             {
                 DefaultBuildingEffects.Militia,
                 new List <int>
                 {
                     Settings.Instance.CastleMilitiaBarracksAmountLevel1,
                     Settings.Instance.CastleMilitiaBarracksAmountLevel2,
                     Settings.Instance.CastleMilitiaBarracksAmountLevel3
                 }
             }
         });
     }
     #endregion
 }
Пример #3
0
        public static void Postfix(
            ref BuildingType ____buildingFortifications,
            ref BuildingType ____buildingSettlementGarrisonBarracks,
            ref BuildingType ____buildingSettlementTrainingFields,
            ref BuildingType ____buildingSettlementLimeKilns,
            ref BuildingType ____buildingSettlementSiegeWorkshop,
            ref BuildingType ____buildingSettlementMilitiaBarracks,
            ref BuildingType ____buildingSettlementGranary,
            ref BuildingType ____buildingSettlementAquaducts,
            ref BuildingType ____buildingSettlementForum,
            ref BuildingType ____buildingSettlementMarketplace,
            ref BuildingType ____buildingSettlementFairgrounds,
            ref BuildingType ____buildingSettlementOrchard,
            ref BuildingType ____buildingCastleLimeKilns,
            ref BuildingType ____buildingCastleMilitiaBarracks,
            ref BuildingType ____buildingCastleSiegeWorkshop,
            ref BuildingType ____buildingCastleFairgrounds,
            ref BuildingType ____buildingCastleWorkshop,
            ref BuildingType ____buildingCastleCastallansOffice,
            ref BuildingType ____buildingCastleGardens,
            ref BuildingType ____buildingCastleGranary,
            ref BuildingType ____buildingCastleTrainingFields,
            ref BuildingType ____buildingCastleBarracks,
            ref BuildingType ____buildingWall,
            ref BuildingType ____buildingDailyBuildHouse,
            ref BuildingType ____buildingDailyTrainMilitia,
            ref BuildingType ____buildingDailyFestivalsAndGames,
            ref BuildingType ____buildingDailyIrrigation)
        {
            DefaultSettlementFoodModel.FoodStocksUpperLimit = 700;
            // FileLog.Log("Rebalance buildings.");
            // City
            ____buildingFortifications
            .Initialize(new TextObject("{=CVdK1ax1}Fortifications"),
                        new TextObject("{=dIM6xa2O}Better fortifications and higher walls around town, also increases the max garrison limit since it provides more space for the resident troops."),
                        new int[] { 10000, 20000, 40000 },
                        BuildingLocation.Settlement,
                        new Tuple <BuildingEffectEnum, float, float, float>[] {
                new Tuple <BuildingEffectEnum, float, float, float
                           >(BuildingEffectEnum.GarrisonCapacity, 50, 100, 200)
            },
                        0);

            ____buildingSettlementGarrisonBarracks
            .Initialize(new TextObject("{=54vkRuHo}Garrison Barracks"),
                        new TextObject("{=DHm1MBsj}Logding for the garrisoned troops. Each level increases garrison capacity of the stronghold."),
                        new int[] { 5000, 10000, 20000 },
                        BuildingLocation.Settlement,
                        new Tuple <BuildingEffectEnum, float, float, float>[] {
                new Tuple <BuildingEffectEnum, float, float, float
                           >(BuildingEffectEnum.GarrisonCapacity, 50, 100, 200)
            },
                        0);

            ____buildingSettlementTrainingFields
            .Initialize(new TextObject("{=BkTiRPT4}Training Fields", null),
                        new TextObject("{=otWlERkc}A field for military drills that increase the daily experience gain of all garrisoned units."),
                        new int[] { 5000, 10000, 20000 },
                        BuildingLocation.Settlement,
                        new Tuple <BuildingEffectEnum, float, float, float>[] {
                new Tuple <BuildingEffectEnum, float, float, float
                           >(BuildingEffectEnum.Experience, 10, 20, 40)
            },
                        0);

            ____buildingSettlementFairgrounds
            .Initialize(new TextObject("{=ixHqTrX5}Fairgrounds", null),
                        new TextObject("{=0B91pZ2R}A permanent space that hosts fairs. Citizens can gather, drink dance and socialize,  increasing the daily morale of the settlement."),
                        new int[] { 5000, 10000, 20000 },
                        BuildingLocation.Settlement,
                        new Tuple <BuildingEffectEnum, float, float, float>[] {
                new Tuple <BuildingEffectEnum, float, float, float
                           >(BuildingEffectEnum.Loyalty, 1, 2, 4)
            },
                        0);

            ____buildingSettlementMarketplace
            .Initialize(new TextObject("{=zLdXCpne}Marketplace", null),
                        new TextObject("{=Z9LWA6A3}Scheduled market days lure folks from surrounding villages to the settlement. Goods are sold for lumpful coins and of course the local ruler takes a handsome cut. Increases wealth and tax yield of the settlement."),
                        new int[] { 5000, 10000, 20000 },
                        BuildingLocation.Settlement,
                        new Tuple <BuildingEffectEnum, float, float, float>[] {
                new Tuple <BuildingEffectEnum, float, float, float
                           >(BuildingEffectEnum.Tax, 25, 50, 100)
            },
                        0);

            ____buildingSettlementAquaducts
            .Initialize(new TextObject("{=f5jHMbOq}Aquaducts", null),
                        new TextObject("{=UojHRjdG}Access to clean water provides room for growth with healthy citizens and a clean infrastructure. Increases daily Prosperity change."),
                        new int[] { 5000, 10000, 20000 },
                        BuildingLocation.Settlement,
                        new Tuple <BuildingEffectEnum, float, float, float>[] {
                new Tuple <BuildingEffectEnum, float, float, float
                           >(BuildingEffectEnum.Prosperity, 1, 2, 3),
                new Tuple <BuildingEffectEnum, float, float, float
                           >(BuildingEffectEnum.FoodProduction, 5, 10, 15)
            },
                        0);

            ____buildingSettlementForum
            .Initialize(new TextObject("{=paelEWj1}Forum", null),
                        new TextObject("{=wTBtu1t5}An open square in the settlement where people can meet, spend time, and share their ideas. Increases influence of the settlement owner.",
                                       null),
                        new int[] { 5000, 10000, 20000 },
                        BuildingLocation.Settlement,
                        new Tuple <BuildingEffectEnum, float, float, float>[] {
                new Tuple <BuildingEffectEnum, float, float, float
                           >(BuildingEffectEnum.Influence, 1, 2, 3)
            },
                        0);

            ____buildingSettlementGranary
            .Initialize(new TextObject("{=PstO2f5I}Granary", null),
                        new TextObject("{=aK23T43P}Keeps stockpiles of food so that the settlement has more food supply. Each level increases the local food supply.",
                                       null),
                        new int[] { 5000, 10000, 20000 },
                        BuildingLocation.Settlement,
                        new Tuple <BuildingEffectEnum, float, float, float>[] {
                new Tuple <BuildingEffectEnum, float, float, float
                           >(BuildingEffectEnum.Foodstock, 250, 600, 1050)
            },
                        0);

            ____buildingSettlementMilitiaBarracks
            .Initialize(new TextObject("{=l91xAgmU}Militia Barracks", null),
                        new TextObject("{=RliyRJKl}Provides battle training for citizens and recruit them into militia. Increases daily militia recruitment.",
                                       null),
                        new int[] { 5000, 10000, 20000 },
                        BuildingLocation.Settlement,
                        new Tuple <BuildingEffectEnum, float, float, float>[] {
                new Tuple <BuildingEffectEnum, float, float, float
                           >(BuildingEffectEnum.Militia, 2, 4, 6)
            },
                        0);

            ____buildingSettlementSiegeWorkshop
            .Initialize(new TextObject("{=9Bnwttn6}Siege Workshop", null),
                        new TextObject("{=MharAceZ}A workshop dedicated to sieges. Contains tools and materials to repair walls, build and repair siege engines.",
                                       null),
                        new int[] { 5000, 10000, 20000 },
                        BuildingLocation.Settlement,
                        new Tuple <BuildingEffectEnum, float, float, float>[] {
                new Tuple <BuildingEffectEnum, float, float, float>(BuildingEffectEnum.WallRepairSpeed, 12, 25, 50),
                new Tuple <BuildingEffectEnum, float, float, float>(BuildingEffectEnum.SiegeEngineSpeed, 0, 25, 50)
            },
                        0);

            ____buildingSettlementLimeKilns
            .Initialize(new TextObject("{=VawDQKLl}Lime Kilns", null),
                        new TextObject("{=ac8PkfhG}Lime kilns are kilns to burn lime to produce the form of lime called quicklime which is used to enrich the soil. Increases farm production output",
                                       null),
                        new int[] { 5000, 10000, 20000 },
                        BuildingLocation.Settlement,
                        new Tuple <BuildingEffectEnum, float, float, float>[] {
                new Tuple <BuildingEffectEnum, float, float, float>(BuildingEffectEnum.FoodProduction, 5, 10, 20),
                new Tuple <BuildingEffectEnum, float, float, float>(BuildingEffectEnum.VillageDevelopmentDaily, 20, 40, 70),
            },
                        0);

            ____buildingSettlementOrchard
            .Initialize(new TextObject("{=AkbiPIij}Orchards", null),
                        new TextObject("{=ZCLVOXgM}Fruit trees and vegetable gardens outside the walls provide food as long as there is no siege.",
                                       null),
                        new int[] { 5000, 10000, 20000 },
                        BuildingLocation.Settlement,
                        new Tuple <BuildingEffectEnum, float, float, float>[] {
                new Tuple <BuildingEffectEnum, float, float, float>(BuildingEffectEnum.FoodProduction, 10, 20, 30),
            },
                        0);

            // Castle

            ____buildingWall
            .Initialize(new TextObject("{=6pNrNj93}Wall", null),
                        new TextObject("{=dIM6xa2O}Better fortifications and higher walls around town, also increases the max garrison limit since it provides more space for the resident troops.",
                                       null),
                        new int[] { 5000, 10000, 20000 },
                        BuildingLocation.Castle,
                        new Tuple <BuildingEffectEnum, float, float, float>[] {
                new Tuple <BuildingEffectEnum, float, float, float
                           >(BuildingEffectEnum.GarrisonCapacity, 25, 50, 100)
            },
                        1);


            ____buildingCastleBarracks
            .Initialize(new TextObject("{=x2B0OjhI}Barracks", null),
                        new TextObject("{=HJ1is924}Logdings for the garrisoned troops. Increases garrison capacity of the stronghold.",
                                       null),
                        new int[] { 5000, 10000, 20000 },
                        BuildingLocation.Castle,
                        new Tuple <BuildingEffectEnum, float, float, float>[] {
                new Tuple <BuildingEffectEnum, float, float, float
                           >(BuildingEffectEnum.GarrisonCapacity, 50, 75, 100)
            },
                        0);

            ____buildingCastleTrainingFields
            .Initialize(new TextObject("{=BkTiRPT4}Training Fields", null),
                        new TextObject("{=otWlERkc}A field for military drills that increase the daily experience gain of all garrisoned units.",
                                       null),
                        new int[] { 5000, 10000, 20000 },
                        BuildingLocation.Castle,
                        new Tuple <BuildingEffectEnum, float, float, float>[] {
                new Tuple <BuildingEffectEnum, float, float, float
                           >(BuildingEffectEnum.Experience, 10, 20, 40)
            },
                        0);

            ____buildingCastleGranary
            .Initialize(new TextObject("{=PstO2f5I}Granary", null),
                        new TextObject("{=iazij7fO}Keeps stockpiles of food so that the settlement has more food supply. Increases the local food supply.",
                                       null),
                        new int[] { 5000, 10000, 20000 },
                        BuildingLocation.Castle,
                        new Tuple <BuildingEffectEnum, float, float, float>[] {
                new Tuple <BuildingEffectEnum, float, float, float
                           >(BuildingEffectEnum.Foodstock, 250, 600, 1050)
            },
                        0);

            ____buildingCastleGardens
            .Initialize(new TextObject("{=yT6XN4Mr}Gardens", null),
                        new TextObject("{=ZCLVOXgM}Castles contained fruit trees, bakeries, chicken coups to be used in emergencies. While it is not enough for a full contingency of troops any small amount of fresh foods are a big help while in the sieges.",
                                       null),
                        new int[] { 5000, 10000, 20000 },
                        BuildingLocation.Castle,
                        new Tuple <BuildingEffectEnum, float, float, float>[] {
                new Tuple <BuildingEffectEnum, float, float, float
                           >(BuildingEffectEnum.FoodProduction, 5, 10, 20)
            },
                        0);

            ____buildingCastleCastallansOffice
            .Initialize(new TextObject("{=kLNnFMR9}Castallan's Office",
                                       null),
                        new TextObject("{=5RMWpLJA}Provides a warden to the castle who maintains discipline and law so rebellions find it harder to form, a castellan to the castle who is effectively the captain of the militia, a steward to the castle who supervised the castle inhibitants.",
                                       null),
                        new int[] { 5000, 10000, 20000 },
                        BuildingLocation.Castle,
                        new Tuple <BuildingEffectEnum, float, float, float>[] {
                new Tuple <BuildingEffectEnum, float, float, float
                           >(BuildingEffectEnum.ReduceMilitia, 50, 50, 50),
                new Tuple <BuildingEffectEnum, float, float, float
                           >(BuildingEffectEnum.Militia, 1, 1, 2)
            },
                        0);

            ____buildingCastleWorkshop
            .Initialize(new TextObject("{=NbgeKwVr}Workshops", null),
                        new TextObject("{=qR9bEE6g}A building which provides the means required for the manufacture or repair of buildings. Improves project development speed. Also stonemasons reinforce the walls.",
                                       null),
                        new int[] { 5000, 10000, 20000 },
                        BuildingLocation.Castle,
                        new Tuple <BuildingEffectEnum, float, float, float>[] {
                new Tuple <BuildingEffectEnum, float, float, float
                           >(BuildingEffectEnum.Construction, 1, 2, 3)
            },
                        0);

            ____buildingCastleFairgrounds
            .Initialize(new TextObject("{=ixHqTrX5}Fairgrounds", null),
                        new TextObject("{=QHZeCDJy}A permanent space that hosts fairs. Citizens can gather, drink dance and socialize, increasing the daily morale of the settlement.",
                                       null),
                        new int[] { 5000, 10000, 20000 },
                        BuildingLocation.Castle,
                        new Tuple <BuildingEffectEnum, float, float, float>[] {
                new Tuple <BuildingEffectEnum, float, float, float
                           >(BuildingEffectEnum.Loyalty, 1, 2, 4)
            },
                        0);

            ____buildingCastleSiegeWorkshop
            .Initialize(new TextObject("{=9Bnwttn6}Siege Workshop", null),
                        new TextObject("{=MharAceZ}A workshop dedicated to sieges. Contains tools and materials to repair walls, build and repair siege engines.",
                                       null),
                        new int[] { 5000, 10000, 20000 },
                        BuildingLocation.Castle,
                        new Tuple <BuildingEffectEnum, float, float, float>[] {
                new Tuple <BuildingEffectEnum, float, float, float
                           >(BuildingEffectEnum.WallRepairSpeed, 50, 50, 50),
                new Tuple <BuildingEffectEnum, float, float, float
                           >(BuildingEffectEnum.SiegeEngineSpeed, 0, 25, 50)
            },
                        0);

            ____buildingCastleMilitiaBarracks
            .Initialize(new TextObject("{=l91xAgmU}Militia Barracks", null),
                        new TextObject("{=YRrx8bAK}Provides battle training for citizens and recruit them into militia, each level increases daily militia recruitment.",
                                       null),
                        new int[] { 5000, 10000, 20000 },
                        BuildingLocation.Castle,
                        new Tuple <BuildingEffectEnum, float, float, float>[] {
                new Tuple <BuildingEffectEnum, float, float, float
                           >(BuildingEffectEnum.Militia, 2, 4, 6)
            },
                        0);

            ____buildingCastleLimeKilns
            .Initialize(new TextObject("{=VawDQKLl}Lime Kilns", null),
                        new TextObject("{=ac8PkfhG}Lime kilns are kilns to burn lime to produce the form of lime called quicklime which is used to enrich the soil. Increases farm production output",
                                       null),
                        new int[] { 5000, 10000, 20000 },
                        BuildingLocation.Castle,
                        new Tuple <BuildingEffectEnum, float, float, float>[] {
                new Tuple <BuildingEffectEnum, float, float, float>(BuildingEffectEnum.VillageDevelopmentDaily, 5, 10, 15),
                new Tuple <BuildingEffectEnum, float, float, float>(BuildingEffectEnum.FoodProduction, 5, 10, 15)
            },
                        0);

            // Daily

            ____buildingDailyIrrigation
            .Initialize(new TextObject("{=VawDQKLl}Lime Kilns", null),
                        new TextObject("{=ac8PkfhG}Lime kilns are kilns to burn lime to produce the form of lime called quicklime which is used to enrich the soil. Increases farm production output",
                                       null),
                        new int[3],
                        BuildingLocation.Daily,
                        new Tuple <BuildingEffectEnum, float, float, float>[] {
                new Tuple <BuildingEffectEnum, float, float, float>(BuildingEffectEnum.VillageDevelopmentDaily, 20, 40, 70),
                new Tuple <BuildingEffectEnum, float, float, float>(BuildingEffectEnum.FoodProduction, 10, 20, 30)
            },
                        0);
        }
        static void Postfix(BuildingType ____buildingCastleTrainingFields, BuildingType ____buildingCastleGranary, BuildingType ____buildingCastleGardens,
                            BuildingType ____buildingCastleMilitiaBarracks, BuildingType ____buildingSettlementTrainingFields, BuildingType ____buildingSettlementGranary,
                            BuildingType ____buildingSettlementOrchard, BuildingType ____buildingSettlementMilitiaBarracks)
        {
            //Castle
            #region Training Fields
            if (Settings.Instance.CastleTrainingFieldsBonusEnabled)
            {
                ____buildingCastleTrainingFields?.Initialize(new TextObject("{=BkTiRPT4}Training Fields"),
                                                             new TextObject("{=otWlERkc}A field for military drills that increase the daily experience gain of all garrisoned units."),
                                                             new int[3] {
                    39, 52, 65
                }, BuildingLocation.Castle,
                                                             new Tuple <BuildingEffectEnum, float, float, float>[]
                {
                    new Tuple <BuildingEffectEnum, float, float, float>(
                        BuildingEffectEnum.Experience,
                        Settings.Instance.CastleTrainingFieldsXpAmountLevel1,
                        Settings.Instance.CastleTrainingFieldsXpAmountLevel2,
                        Settings.Instance.CastleTrainingFieldsXpAmountLevel3
                        )
                });
            }
            #endregion
            #region Granary
            if (Settings.Instance.CastleGranaryBonusEnabled)
            {
                ____buildingCastleGranary?.Initialize(new TextObject("{=PstO2f5I}Granary"),
                                                      new TextObject("{=iazij7fO}Keeps stockpiles of food so that the settlement has more food supply. Increases the local food supply."),
                                                      new int[3] {
                    39, 65, 91
                }, BuildingLocation.Castle,
                                                      new Tuple <BuildingEffectEnum, float, float, float>[]
                {
                    new Tuple <BuildingEffectEnum, float, float, float>(
                        BuildingEffectEnum.Foodstock,
                        Settings.Instance.CastleGranaryStorageAmountLevel1,
                        Settings.Instance.CastleGranaryStorageAmountLevel2,
                        Settings.Instance.CastleGranaryStorageAmountLevel3
                        )
                });
            }
            #endregion
            #region Gardens
            if (Settings.Instance.CastleGardensBonusEnabled)
            {
                ____buildingCastleGardens?.Initialize(new TextObject("{=yT6XN4Mr}Gardens"),
                                                      new TextObject("{=ZCLVOXgM}Castles contained fruit trees, bakeries, chicken coups to be used in emergencies. While it is not enough for a full contingency of troops any small amount of fresh foods are a big help while in the sieges."),
                                                      new int[3] {
                    25, 39, 52
                }, BuildingLocation.Castle,
                                                      new Tuple <BuildingEffectEnum, float, float, float>[] {
                    new Tuple <BuildingEffectEnum, float, float, float>(
                        BuildingEffectEnum.FoodProduction,
                        Settings.Instance.CastleGardensFoodProductionAmountLevel1,
                        Settings.Instance.CastleGardensFoodProductionAmountLevel2,
                        Settings.Instance.CastleGardensFoodProductionAmountLevel3
                        )
                });
            }
            #endregion
            #region Militia Barracks
            if (Settings.Instance.CastleMilitiaBarracksBonusEnabled)
            {
                ____buildingCastleMilitiaBarracks?.Initialize(new TextObject("{=l91xAgmU}Militia Barracks"),
                                                              new TextObject("{=YRrx8bAK}Provides battle training for citizens and recruit them into militia, each level increases daily militia recruitment."),
                                                              new int[3] {
                    46, 59, 72
                }, BuildingLocation.Castle,
                                                              new Tuple <BuildingEffectEnum, float, float, float>[] {
                    new Tuple <BuildingEffectEnum, float, float, float>(
                        BuildingEffectEnum.Militia,
                        Settings.Instance.CastleMilitiaBarracksAmountLevel1,
                        Settings.Instance.CastleMilitiaBarracksAmountLevel2,
                        Settings.Instance.CastleMilitiaBarracksAmountLevel3
                        )
                });
            }
            #endregion

            //Town
            #region Training Fields
            if (Settings.Instance.TownTrainingFieldsBonusEnabled)
            {
                ____buildingSettlementTrainingFields?.Initialize(new TextObject("{=BkTiRPT4}Training Fields"),
                                                                 new TextObject("{=otWlERkc}A field for military drills that increase the daily experience gain of all garrisoned units."),
                                                                 new int[3] {
                    600, 800, 1000
                }, BuildingLocation.Settlement,
                                                                 new Tuple <BuildingEffectEnum, float, float, float>[]
                {
                    new Tuple <BuildingEffectEnum, float, float, float>(
                        BuildingEffectEnum.Experience,
                        Settings.Instance.TownTrainingFieldsXpAmountLevel1,
                        Settings.Instance.TownTrainingFieldsXpAmountLevel2,
                        Settings.Instance.TownTrainingFieldsXpAmountLevel3)
                });
            }
            #endregion
            #region Granary
            if (Settings.Instance.TownGranaryBonusEnabled)
            {
                ____buildingSettlementGranary?.Initialize(new TextObject("{=PstO2f5I}Granary"),
                                                          new TextObject("{=aK23T43P}Keeps stockpiles of food so that the settlement has more food supply. Each level increases the local food supply."),
                                                          new int[3] {
                    500, 700, 1000
                }, BuildingLocation.Settlement,
                                                          new Tuple <BuildingEffectEnum, float, float, float>[]
                {
                    new Tuple <BuildingEffectEnum, float, float, float>(
                        BuildingEffectEnum.Foodstock,
                        Settings.Instance.TownGranaryStorageAmountLevel1,
                        Settings.Instance.TownGranaryStorageAmountLevel2,
                        Settings.Instance.TownGranaryStorageAmountLevel3)
                });
            }
            #endregion
            #region Orchards
            if (Settings.Instance.TownOrchardsBonusEnabled)
            {
                ____buildingSettlementOrchard?.Initialize(new TextObject("{=AkbiPIij}Orchards"),
                                                          new TextObject("{=ZCLVOXgM}Fruit trees and vegetable gardens outside the walls provide food as long as there is no siege."),
                                                          new int[3] {
                    800, 1300, 1800
                }, BuildingLocation.Settlement,
                                                          new Tuple <BuildingEffectEnum, float, float, float>[]
                {
                    new Tuple <BuildingEffectEnum, float, float, float>(
                        BuildingEffectEnum.FoodProduction,
                        Settings.Instance.TownOrchardsFoodProductionAmountLevel1,
                        Settings.Instance.TownOrchardsFoodProductionAmountLevel2,
                        Settings.Instance.TownOrchardsFoodProductionAmountLevel3)
                });
            }
            #endregion
            #region Militia Barracks
            if (Settings.Instance.TownMilitiaBarracksBonusEnabled)
            {
                ____buildingSettlementMilitiaBarracks?.Initialize(new TextObject("{=l91xAgmU}Militia Barracks"),
                                                                  new TextObject("{=RliyRJKl}Provides battle training for citizens and recruit them into militia. Increases daily militia recruitment."),
                                                                  new int[3] {
                    600, 800, 1500
                }, BuildingLocation.Settlement,
                                                                  new Tuple <BuildingEffectEnum, float, float, float>[]
                {
                    new Tuple <BuildingEffectEnum, float, float, float>(
                        BuildingEffectEnum.Militia,
                        Settings.Instance.TownMilitiaBarracksAmountLevel1,
                        Settings.Instance.TownMilitiaBarracksAmountLevel2,
                        Settings.Instance.TownMilitiaBarracksAmountLevel3)
                });
            }
            #endregion
        }
Пример #5
0
        static void Postfix(BuildingType ____buildingCastleTrainingFields, BuildingType ____buildingCastleGranary, BuildingType ____buildingCastleGardens,
                            BuildingType ____buildingCastleMilitiaBarracks, BuildingType ____buildingSettlementTrainingFields, BuildingType ____buildingSettlementGranary,
                            BuildingType ____buildingSettlementOrchard, BuildingType ____buildingSettlementMilitiaBarracks)
        {
            if (BannerlordTweaksSettings.Instance is null)
            {
                return;
            }
            //Castle
            #region Training Fields
            if (BannerlordTweaksSettings.Instance.CastleTrainingFieldsBonusEnabled)
            {
                ____buildingCastleTrainingFields?.Initialize(new TextObject("{=BkTiRPT4}Training Fields"),
                                                             new TextObject("{=otWlERkc}A field for military drills that increase the daily experience gain of all garrisoned units."),
                                                             new int[3] {
                    500, 1000, 1500
                }, BuildingLocation.Castle,
                                                             new Tuple <BuildingEffectEnum, float, float, float>[]
                {
                    new Tuple <BuildingEffectEnum, float, float, float>(
                        BuildingEffectEnum.Experience,
                        BannerlordTweaksSettings.Instance.CastleTrainingFieldsXpAmountLevel1,
                        BannerlordTweaksSettings.Instance.CastleTrainingFieldsXpAmountLevel2,
                        BannerlordTweaksSettings.Instance.CastleTrainingFieldsXpAmountLevel3
                        )
                });
            }
            #endregion
            #region Granary
            if (BannerlordTweaksSettings.Instance.CastleGranaryBonusEnabled)
            {
                ____buildingCastleGranary?.Initialize(new TextObject("{=PstO2f5I}Granary"),
                                                      new TextObject("{=iazij7fO}Keeps stockpiles of food so that the settlement has more food supply. Each level increases the local food supply."),
                                                      new int[3] {
                    1000, 1500, 2000
                }, BuildingLocation.Castle,
                                                      new Tuple <BuildingEffectEnum, float, float, float>[]
                {
                    new Tuple <BuildingEffectEnum, float, float, float>(
                        BuildingEffectEnum.Foodstock,
                        BannerlordTweaksSettings.Instance.CastleGranaryStorageAmountLevel1,
                        BannerlordTweaksSettings.Instance.CastleGranaryStorageAmountLevel2,
                        BannerlordTweaksSettings.Instance.CastleGranaryStorageAmountLevel3
                        )
                });
            }
            #endregion
            #region Gardens
            if (BannerlordTweaksSettings.Instance.CastleGardensBonusEnabled)
            {
                ____buildingCastleGardens?.Initialize(new TextObject("{=yT6XN4Mr}Gardens"),
                                                      new TextObject("{=ZCLVOXgM}Fruit trees and vegetable gardens outside the walls provide food as long as there is no siege.", null),
                                                      new int[] { 500, 750, 1000 }, BuildingLocation.Castle,
                                                      new Tuple <BuildingEffectEnum, float, float, float>[]
                {
                    new Tuple <BuildingEffectEnum, float, float, float>(
                        BuildingEffectEnum.FoodProduction,
                        BannerlordTweaksSettings.Instance.CastleGardensFoodProductionAmountLevel1,
                        BannerlordTweaksSettings.Instance.CastleGardensFoodProductionAmountLevel2,
                        BannerlordTweaksSettings.Instance.CastleGardensFoodProductionAmountLevel3
                        )
                });
            }
            #endregion
            #region Militia Barracks
            if (BannerlordTweaksSettings.Instance.CastleMilitiaBarracksBonusEnabled)
            {
                ____buildingCastleMilitiaBarracks?.Initialize(new TextObject("{=l91xAgmU}Militia Grounds"),
                                                              new TextObject("{=YRrx8bAK}Provides battle training for citizens and recruit them into militia, each level increases daily militia recruitment."),
                                                              new int[3] {
                    500, 750, 1000
                }, BuildingLocation.Castle,
                                                              new Tuple <BuildingEffectEnum, float, float, float>[]
                {
                    new Tuple <BuildingEffectEnum, float, float, float>(
                        BuildingEffectEnum.Militia,
                        BannerlordTweaksSettings.Instance.CastleMilitiaBarracksAmountLevel1,
                        BannerlordTweaksSettings.Instance.CastleMilitiaBarracksAmountLevel2,
                        BannerlordTweaksSettings.Instance.CastleMilitiaBarracksAmountLevel3
                        )
                });
            }
            #endregion

            //Town
            #region Training Fields
            if (BannerlordTweaksSettings.Instance.TownTrainingFieldsBonusEnabled)
            {
                ____buildingSettlementTrainingFields?.Initialize(new TextObject("{=BkTiRPT4}Training Fields"),
                                                                 new TextObject("{=otWlERkc}A field for military drills that increase the daily experience gain of all garrisoned units."),
                                                                 new int[3] {
                    2000, 3000, 4000
                }, BuildingLocation.Settlement,
                                                                 new Tuple <BuildingEffectEnum, float, float, float>[]
                {
                    new Tuple <BuildingEffectEnum, float, float, float>(
                        BuildingEffectEnum.Experience,
                        BannerlordTweaksSettings.Instance.TownTrainingFieldsXpAmountLevel1,
                        BannerlordTweaksSettings.Instance.TownTrainingFieldsXpAmountLevel2,
                        BannerlordTweaksSettings.Instance.TownTrainingFieldsXpAmountLevel3)
                });
            }
            #endregion
            #region Granary
            if (BannerlordTweaksSettings.Instance.TownGranaryBonusEnabled)
            {
                ____buildingSettlementGranary?.Initialize(new TextObject("{=PstO2f5I}Granary"),
                                                          new TextObject("{=aK23T43P}Keeps stockpiles of food so that the settlement has more food supply. Each level increases the local food supply."),
                                                          new int[3] {
                    1000, 1500, 2000
                }, BuildingLocation.Settlement,
                                                          new Tuple <BuildingEffectEnum, float, float, float>[]
                {
                    new Tuple <BuildingEffectEnum, float, float, float>(
                        BuildingEffectEnum.Foodstock,
                        BannerlordTweaksSettings.Instance.TownGranaryStorageAmountLevel1,
                        BannerlordTweaksSettings.Instance.TownGranaryStorageAmountLevel2,
                        BannerlordTweaksSettings.Instance.TownGranaryStorageAmountLevel3)
                });
            }
            #endregion
            #region Orchards
            if (BannerlordTweaksSettings.Instance.TownOrchardsBonusEnabled)
            {
                ____buildingSettlementOrchard?.Initialize(new TextObject("{=AkbiPIij}Orchards"),
                                                          new TextObject("{=ZCLVOXgM}Fruit trees and vegetable gardens outside the walls provide food as long as there is no siege."),
                                                          new int[3] {
                    2000, 3000, 4000
                }, BuildingLocation.Settlement,
                                                          new Tuple <BuildingEffectEnum, float, float, float>[]
                {
                    new Tuple <BuildingEffectEnum, float, float, float>(
                        BuildingEffectEnum.FoodProduction,
                        BannerlordTweaksSettings.Instance.TownOrchardsFoodProductionAmountLevel1,
                        BannerlordTweaksSettings.Instance.TownOrchardsFoodProductionAmountLevel2,
                        BannerlordTweaksSettings.Instance.TownOrchardsFoodProductionAmountLevel3)
                });
            }
            #endregion
            #region Militia Barracks
            if (BannerlordTweaksSettings.Instance.TownMilitiaBarracksBonusEnabled)
            {
                ____buildingSettlementMilitiaBarracks?.Initialize(new TextObject("{=l91xAgmU}Militia Grounds"),
                                                                  new TextObject("{=RliyRJKl}Provides battle training for citizens and recruit them into militia. Increases daily militia recruitment."),
                                                                  new int[3] {
                    2000, 3000, 4000
                }, BuildingLocation.Settlement,
                                                                  new Tuple <BuildingEffectEnum, float, float, float>[]
                {
                    new Tuple <BuildingEffectEnum, float, float, float>(
                        BuildingEffectEnum.Militia,
                        BannerlordTweaksSettings.Instance.TownMilitiaBarracksAmountLevel1,
                        BannerlordTweaksSettings.Instance.TownMilitiaBarracksAmountLevel2,
                        BannerlordTweaksSettings.Instance.TownMilitiaBarracksAmountLevel3)
                });
            }
            #endregion
        }