Пример #1
0
        public static void outputv1History(CK2CountyRegionsInfo ck2Regions)
        {
            Dictionary <string, CK2CountyRegionInfo> counties = ck2Regions.getCountiesMap();
            string outputDir = ImportantPaths.getOutputPath() + "\\history\\titles";

            foreach (var countyPair in counties)
            {
                string countyStr = countyPair.Key;
                int    luckyGuy  = 157600001;
                using (StreamWriter writer = File.CreateText(outputDir + "\\" + countyStr + ".txt")) {
                    writer.WriteLine("767.1.1={");
                    writer.WriteLine("\tholder=" + luckyGuy);
                    writer.WriteLine("}");
                }
            }
        }
Пример #2
0
        public static void output(AttilaRegionsInfo attilaRegions, CK2CountyRegionsInfo ck2Regions, ReligionsInfo religions)
        {
            int count = 0;
            List <AttilaRegionInfo> attilaList = attilaRegions.getList();
            Dictionary <string, CK2CountyRegionInfo> ck2CountiesMap = ck2Regions.getCountiesMap();

            foreach (AttilaRegionInfo attilaRegion in attilaList)
            {
                List <String> attilasCK2regions = attilaRegion.getCK2Regions();
                foreach (String ck2RegionStr in attilasCK2regions)
                {
                    CK2CountyRegionInfo ck2County = ck2CountiesMap[ck2RegionStr];
                    writeProvinceHistory(attilaRegion, ck2County, religions);
                    count++;
                }
            }
            count += 0;
        }
Пример #3
0
        public Form1()
        {
            cultureMaps    = new CultureMaps();
            regionMap      = new RegionMapper();
            ck2RegionsInfo = new CK2CountyRegionsInfo(regionMap);
            religionsInfo  = new ReligionsInfo();
            factionsInfo   = new FactionsInfo();

            InitializeComponent();

            psr = new ProjectSettingsReader();
            string savegameXMLPath = psr.getSavegameXMLLocation();

            importantPaths = new ImportantPaths(savegameXMLPath);


            //Init dating system
            DateConverter dtConverter = new DateConverter(importantPaths);

            //Generate characters located in faction array (these characters are alive)
            CharInfoCreator charInfoCreator = new CharInfoCreator(importantPaths, dtConverter, religionsInfo);

            //Build family tree and generate dead characters
            FamilyTrees famTrees = new FamilyTrees(importantPaths, charInfoCreator, dtConverter);

            //Update faction-specific information with save game data
            factionsInfo.updateImportantPaths(importantPaths);
            factionsInfo.readFactionXMLs();

            //Init region information
            attilaRegionsInfo = new AttilaRegionsInfo(importantPaths, regionMap, factionsInfo);

            //Generate de jure titles
            deJureTitles = new DeJureTitles(attilaRegionsInfo);

            //Update other information regarding factions and regions
            factionsInfo.updateFactionsInfo(attilaRegionsInfo);

            //Process family trees with regards to faction settings. (Dynasty update occurs here)
            factionsInfo.readFamilyTrees(famTrees);


            DirectoryHierarchyCreator.createOutputDirectories();

            MoveFlags.move(factionsInfo);
            MoveCultures.move();

            OutputCommonLandedTitles.output(factionsInfo);
            OutputCommonLandedTitles.outputDeJure(deJureTitles);
            OutputCommonDynasties.output(famTrees);
            //OutputCommonCultures.outputProvinceSpecific(attilaRegionsInfo);

            OutputCharacterHistories.output(factionsInfo);
            OutputProvinceHistories.output(attilaRegionsInfo, ck2RegionsInfo, religionsInfo);
            OutputTitleHistories.outputCountyHistory(factionsInfo);
            OutputTitleHistories.outputFactionTitleHistory(factionsInfo);

            OutputTitleLocalisation.output(factionsInfo);
            OutputTitleLocalisation.outputDeJure(deJureTitles);
            OutputCultureLocalisation.outputCultureGroups(cultureMaps);
            OutputCultureLocalisation.outputCultures(cultureMaps);
        }