Exemplo n.º 1
0
        private void getRegionXMLInfo(RegionMapper map, FactionsInfo factions)
        {
            attilaRegionMappings = new List <AttilaRegionInfo>();
            string regionPath = importantPaths.getSavegameXMLPath() + "\\region";

            string[] regionXMLs = Directory.GetFiles(regionPath);
            foreach (string regionXML in regionXMLs)
            {
                AttilaRegionInfo regionInfo = new AttilaRegionInfo(importantPaths, regionXML, map, factions);
                attilaRegionMappings.Add(regionInfo);
            }
        }
Exemplo n.º 2
0
        private static void writeProvinceHistory(AttilaRegionInfo attilaRegion, CK2CountyRegionInfo ck2County, ReligionsInfo religions)
        {
            //Remove ifs if going province specific
            if (attilaRegion.getIsBurned())
            {
                return;
            }
            FactionInfo faction = attilaRegion.getOwningFaction();

            if (faction.getID().Contains("fact_separatist") || faction.getID().Contains("fact_rebel"))
            {
                return;
            }
            string           filename   = ck2County.getFilename();
            string           outputPath = ImportantPaths.getOutputPath() + "\\history\\provinces\\" + filename;
            HashSet <String> baronies   = ck2County.getBaronies();

            using (StreamWriter writer = File.CreateText(outputPath)) {
                writer.WriteLine("# " + filename.Substring(0, filename.Length - 4));
                writer.WriteLine("");
                writer.WriteLine("# County Title");
                writer.WriteLine("title = " + ck2County.getID());
                writer.WriteLine("");
                writer.WriteLine("# Settlements");
                writer.WriteLine("max_settlements = " + ck2County.getMaxSettlements());
                bool wroteBarony = false;
                foreach (String barony in baronies)
                {
                    if (wroteBarony == false)
                    {
                        writer.WriteLine(barony + " = castle");
                        wroteBarony = true;
                    }
                    else
                    {
                        writer.WriteLine("#" + barony + " = castle");
                    }
                }
                writer.WriteLine("");
                writer.WriteLine("# Misc");
                string culture = faction.getOwner().getCulture();
                writer.WriteLine("culture = " + culture);
                //writer.WriteLine("culture = " + attilaRegion.getIDStr());
                writer.WriteLine("religion = " + religions.getCK2Religion(attilaRegion.getMostPowerfulReligion()));
                writer.WriteLine("");
                writer.WriteLine("# History");
            }
        }
Exemplo n.º 3
0
 public DeJureDuchy(string name, AttilaRegionInfo region)
 {
     this.name       = name;
     this.region     = region;
     this.screenName = DeJureTitles.deriveScreenName(name);
 }