diff --git a/BetterGeoscape/Assets/Localization/PR_BG_Localization.csv b/BetterGeoscape/Assets/Localization/PR_BG_Localization.csv new file mode 100644 index 0000000..29f649d --- /dev/null +++ b/BetterGeoscape/Assets/Localization/PR_BG_Localization.csv @@ -0,0 +1,155 @@ +Key,Type,Desc,English +PROG_LE1_WIN_CHOICE_2_OUTCOME_GENERAL,Text,,"MESSAGE +From:Colonel Jack Harlson (New Jericho) +To: Phoenix Point + +The Pandorans grow ever more cunning and deliberate in their attacks. We need more and better weapons. West is right: whatever the wishful thinkers may be dreaming, any feasible solution to this menace requires force and the willingness to use it." +PROG_LE1_WIN_CHOICE_2_TEXT,Text,,"The Pandorans did it, all of it!" +PROG_LE1_WIN_CHOICE_1_OUTCOME_GENERAL,Text,,"MESSAGE +From: Colonel Jack Harlson (New Jericho) +To: Phoenix Point + +I wanted to thank you personally for delivering this information. It is crucial that all of us understand the peril we are facing. Over the years we have gathered a lot of evidence showing how the Anu cultists are collaborating with the enemy. In due time, they will pay for their crimes against humanity." +PROG_LE1_WIN_CHOICE_1_TEXT,Text,,Provide New Jericho with intelligence proving that Anu instigated the Pandoran attack +PROG_LE1_WIN_CHOICE_0_OUTCOME_GENERAL,Text,,"MESSAGE +From: Colonel Jack Harlson (New Jericho) +To: Phoenix Point + +It has been reported that your organization is in the possession of an armored vehicle stolen from a New Jericho facility that came under heavy attack by Pandorans and unknown human or pseudo-human assailants. + +I'll be looking into this matter personally. + +West is showing great leniency to your organization in the expectation of the role it will play in the delivery of our species. For my part, sometimes I'm not so sure that we need you at all." +PROG_LE1_WIN_CHOICE_0_TEXT,Text,,Keep the Armadillo +PROG_LE1_WIN_TEXT_GENERAL_0,Text,,We succeeded in our mission despite the unexpected appearance of Pandorans on the scene. Now we have to decide on our response to New Jericho. +PROG_LE1_WIN_TITLE,Text,,Playing the Blame Game +PROG_LE1_MISS_CHOICE_0_TEXT,Text,,START MISSION +PROG_LE1_MISS_CHOICE_1_TEXT,Text,,CANCEL +PROG_LE1_MISS_TEXT_GENERAL_0,Text,,"MISSION BRIEFING + +We have come up with a simple plan to obtain the NG+ Weapon Systems research without prejudicing our relations with New Jericho or drawing their attention to the value of the data in their possession. + +Your team will be inserted outside the operational perimeter and proceed to the objective on foot. After obtaining a copy of the data, they will steal an armored vehicle from the garrison and make their getaway in it. They will subsequently abandon and destroy the vehicle. We will present the facts to New Jericho as a raid by an unknown third party. As long as we can maintain plausible deniability, our relations with NJ should not be affected." +PROG_LE1_MISS_TITLE,Text,,Grand Theft Auto +PROG_LE1_TEXT_GENERAL_0,Text,,"Impossible Weapons + +Vanadium Co had an R & D division, Next Generation+ Weapon Systems, focused on designing armaments that required as of yet undiscovered technologies, energy sources or materials with impossible tensile strengths or conductivity. + +Though at the time it was deemed little more than a publicity stunt and part of Vanadium's talent retention strategy, we speculate that these weapons could be indeed developed using the materials harnessed by the Ancients. + +We have located a New Jericho archive facility harboring the NG+ Weapon Systems research." +PROG_LE1_TITLE,Text,,Impossible Weapons +PX_CRYSTALCROSSBOW_RESEARCHDEF_COMPLETE,Text,,"At a first glance it seemed to us that Kristian Luft came up with a design for a very high air powered bow; a long shot from the marvels of the other projects of the NG+ Vanadium division. This until we realized that Prof. Luft did away with the glaring deficiency of all crossbows: that they require bolts. The Crystal Crossbow does not shoot bolts at all, but rather air particles accelerated to incredible speeds!" +PX_CRYSTALCROSSBOW_RESEARCHDEF_NAME,Text,,Crystal Crossbow +PX_CRYSTALCROSSBOW_RESEARCHDEF_UNLOCK,Text,,"A design for what appears to be a high powered pneumatic crossbow by Kristian Luft, acclaimed particle physicist and medieval history buff." +PX_MATTOCKOFTHEANCIENTS_RESEARCHDEF_COMPLETE,Text,,"The Mattock appears to have been designed by Valygar Prazac to address in hand to hand combat a variety of diverse hypothetical adversaries such as Golems, Gargoyles and (interestingly enough) intelligent crustaceans from outer space." +PX_MATTOCKOFTHEANCIENTS_RESEARCHDEF_NAME,Text,,Mattock of the Ancients +PX_MATTOCKOFTHEANCIENTS_RESEARCHDEF_UNLOCK,Text,,"An impossible melee weapon dreamt up by Valygar Prazac of the NG+ Weapon Systems at Vanadium Co., and former professor in the experimental physics department of the Taras Shevchenko University of Kyiv." +PX_REBUKE_RESEARCHDEF_COMPLETE,Text,,"Mr. Stridrahen was an imminently practical man and this practicality paradoxically shows throughout the impracticable (before the Antediluvian materials) Rebuke. It is somewhat of a misnomer to describe this weapon as a grenade launcher, and what happens when it is activated as an explosion, but it will have to do until we are ready to update our physics models to account for the Antediluvian materials." +PX_REBUKE_RESEARCHDEF_NAME,Text,,Rebuke +PX_REBUKE_RESEARCHDEF_UNLOCK,Text,,"Hristos Stridrahen, the mind behind the Rebuke, rose from Vanadium Mining and Rare Earths division to NG+ Weapon Systems through his passion for high explosives." +PX_SCORPION_RESEARCHDEF_COMPLETE,Text,,"The ultimate purpose of the Scorpion is to make all forms of armor obsolete. Surprisingly, it seems like Mr. Antonasov’s work has provided a foundational basis for a lot of technologies with practical applications developed first by Vanadium and later New Jericho." +PX_SCORPION_RESEARCHDEF_NAME,Text,,Scorpion +PX_SCORPION_RESEARCHDEF_UNLOCK,Text,,This blueprint by renowned rocket engineer John Antonasov is for some sort of long rifle with incredible penetration and damage capacity. +PX_SCYTHER_RESEARCHDEF_COMPLETE,Text,,"According to the notes accompanying the recovered data, Jules Godfry designed the Scyther after his disappointing performance in some sort of corporate ludic e-competition called ""Chaos Reborn 2022 Annual Tournament”. In psychological terms it is the expression of unfathomable anger directed at all things, living and inanimate, though its practical military applications in the real world were doubtful until the appearance of the Pandoran monstrosities." +PX_SCYTHER_RESEARCHDEF_NAME,Text,,Scyther +PX_SCYTHER_RESEARCHDEF_UNLOCK,Text,,"A curious design by Jules Godfry, head of NG+ Weapon Systems at Vanadium, that looks like an electro blade powered by a miniaturized fusion reactor." +PX_SHARDGUN_RESEARCHDEF_COMPLETE,Text,,"The Shard Gun is perhaps the less theoretically impressive of the NG+ Weapon Systems designs. But what it lacks in mathematical panache, it compensates in sheer effectiveness; in the words of its promoter, Emmanuel ""SG"" Erickson, ""it will be a bad*** shotgun that will **** you up, you trespassing ***********"" (Mr. Erickson's streams were notable for their profanity. They tragically ended at the beginning of the First Mist, when a Triton invaded Emmanuel's Malibu beachfront, ironically vindicating the streamer's plea for a next generation home defense weapon)." +PX_SHARDGUN_RESEARCHDEF_NAME,Text,,Shard Gun +PX_SHARDGUN_RESEARCHDEF_UNLOCK,Text,,"Emmanuel ""Shotgun"" Erickson, publicist, streaming celebrity and the face of NG+ Weapon Systems, advertised the work of his team as ""the next generation home defense weapons against next generation home invaders""." +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, +,Text,, \ No newline at end of file diff --git a/BetterGeoscape/Assets/Localization/PR_CH_Story_Localization.csv b/BetterGeoscape/Assets/Localization/PR_CH_Story_Localization.csv index a16e144..5aaf38a 100644 --- a/BetterGeoscape/Assets/Localization/PR_CH_Story_Localization.csv +++ b/BetterGeoscape/Assets/Localization/PR_CH_Story_Localization.csv @@ -72,18 +72,18 @@ While all medical facilities have been equipped with the necessary equipment, th In addition, our experiments have revealed that the Specimen 2, under the right stimulation, is capable of producing other biochemical compounds that may be of use in the battlefield. We recommend allocating additional resources to this research.",,,,,,,, PX_ORIGINAL_ACHERON_RESEARCHDEF_NAME,Text,,Specimen 2,,,,,,,, PX_ORIGINAL_ACHERON_RESEARCHDEF_UNLOCK,Text,,"We have captured Specimen 2, the Acheron infected with the RDNA virus that holds the key to creating a treatment for the Oneiric Delirium.",,,,,,,, -KEY_STATUS_CORRUPTED_NAME,Text,,Delirium,,,,,,,, +DLC4 Hypnos/KEY_STATUS_CORRUPTED_NAME,Text,,Delirium,,,,,,,, KEY_STATUS_CORRUPTED_DESCRIPTION,Text,,"For now, Will Power is reduced by the current level of Delirium. Additionally, damage done increases by 2% for every 1 point of delirium. But it can be so much more! Better Pandoravirus now!",,,,,,,, KEY_CO_CORRUPTION_NAME,Text,,Co-Delirium,,,,,,,, KEY_CO_CORRUPTION_DESCRIPTION,Text,,All Pandorans in battle deal Delirium damage,,,,,,,, KEY_CONTACT_CORRUPTION_NAME,Text,,CONTACT DELIRIUM,,,,,,,, KEY_CONTACT_CORRUPTION_DESCRIPTION,Text,,Increases Delirium of attacker when suffering Melee or Bash attacks.,,,,,,,, -KEY_DAMAGE_TYPE_CORRUPTION,Text,not working?,DELIRIUM,,,,,,,, +DLC4 Hypnos/KEY_DAMAGE_TYPE_CORRUPTION,Text,,DELIRIUM,,,,,,,, KEY_DAMAGE_TYPE_CORRUPTION_DESC,Text,,Applies Delirium to the target.,,,,,,,, KEY_CORRUPTION_IMMUNITY_NAME,Text,,DELIRIUM IMMUNITY,,,,,,,, KEY_CORRUPTION_IMMUNITY_DESCRIPTION,Text,,Immune to Delirium.,,,,,,,, -KEY_BRIEFING_INFECTED_AREA,Text,,DELIRIUM AREA,,,,,,,, -KEY_CORRUPTION_STATUS,Text,not working,DELIRIUM STATUS,,,,,,,, +DLC4 Hypnos/KEY_BRIEFING_INFECTED_AREA,Text,,DELIRIUM AREA,,,,,,,, +DLC4 Hypnos/KEY_CORRUPTION_STATUS,Text,,DELIRIUM STATUS,,,,,,,, KEY_CORRUPTION_TICK_NOTIFICATION,Text,,The level of corruption has increased among the sick.,,,,,,,, KEY_CORRUPTIVE_ATTACK_DESCRIPTION,Text,,Successful attacks spread delirium to organic units.,,,,,,,, KEY_CORRUPTIVE_ATTACK_NAME,Text,,DELIRIUM ATTACK,,,,,,,, diff --git a/BetterGeoscape/BetterGeoscape.csproj b/BetterGeoscape/BetterGeoscape.csproj index 74161d3..9fb9e74 100644 --- a/BetterGeoscape/BetterGeoscape.csproj +++ b/BetterGeoscape/BetterGeoscape.csproj @@ -93,8 +93,10 @@ + + \ No newline at end of file diff --git a/BetterGeoscape/BetterGeoscapeMain.cs b/BetterGeoscape/BetterGeoscapeMain.cs index 0bbe4de..07d83dc 100644 --- a/BetterGeoscape/BetterGeoscapeMain.cs +++ b/BetterGeoscape/BetterGeoscapeMain.cs @@ -14,11 +14,9 @@ public class BetterGeoscapeMain internal static string LogPath; internal static string ModDirectory; - internal static string ManagedDirectory; internal static string LocalizationDirectory; internal static readonly DefRepository Repo = GameUtl.GameComponent(); - internal static bool doNotLocalize = true; - + public static void HomeMod(Func api) { InitBetterGeoscape(api); @@ -42,7 +40,6 @@ public static void HomeMod(Func api) CHReworkMain.Apply_Changes(); } - } public static void GeoscapeOnHide() { @@ -61,6 +58,7 @@ public static void InitBetterGeoscape(Func api) ModDirectory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); // Path to localization CSVs LocalizationDirectory = Path.Combine(ModDirectory, "Assets", "Localization"); + // Initialize Logger LogPath = Path.Combine(ModDirectory, "BetterGeoscape.log"); Logger.Initialize(LogPath, Config.Debug, ModDirectory, nameof(BetterGeoscapeMain)); diff --git a/BetterGeoscape/CHReworkMain.cs b/BetterGeoscape/CHReworkMain.cs index a293719..bbd5b36 100644 --- a/BetterGeoscape/CHReworkMain.cs +++ b/BetterGeoscape/CHReworkMain.cs @@ -120,9 +120,6 @@ public static void Apply_Changes() // Remove final cinematic GeoscapeEventDef winCH2 = Repo.GetAllDefs().FirstOrDefault(ged => ged.name.Equals("PROG_CH2_WIN_GeoscapeEventDef")); winCH2.GeoscapeEventData.Choices[0].Outcome.Cinematic = CH_Event_NeedLair.GeoscapeEventData.Choices[0].Outcome.Cinematic; - - - } catch (Exception e) diff --git a/BetterGeoscape/Helper.cs b/BetterGeoscape/Helper.cs index ec3ad86..fe98f23 100644 --- a/BetterGeoscape/Helper.cs +++ b/BetterGeoscape/Helper.cs @@ -11,6 +11,8 @@ using System.Reflection; using UnityEngine; + + namespace PhoenixRising.BetterGeoscape { internal class Helper @@ -20,32 +22,26 @@ internal class Helper private static readonly DefRepository Repo = BetterGeoscapeMain.Repo; internal static string ModDirectory; internal static string LocalizationDirectory; - internal static string ManagedDirectory; + public static readonly string GeoscapeLocalizationFileName = "PR_BG_Localization.csv"; public static readonly string CHStoryLocalizationFileName = "PR_CH_Story_Localization.csv"; - - // Desearialize dictionary from Json to map non localized texts to ViewDefs - public static readonly string TextMapFileName = "NotLocalizedTextMap.json"; - public static Dictionary> NotLocalizedTextMap; - - + public static void Initialize() { try { ModDirectory = BetterGeoscapeMain.ModDirectory; - ManagedDirectory = BetterGeoscapeMain.ManagedDirectory; LocalizationDirectory = BetterGeoscapeMain.LocalizationDirectory; if (File.Exists(Path.Combine(LocalizationDirectory, GeoscapeLocalizationFileName))) { AddLocalizationFromCSV(GeoscapeLocalizationFileName, null); } - if (File.Exists(Path.Combine(LocalizationDirectory, CHStoryLocalizationFileName))) + if (File.Exists(Path.Combine(LocalizationDirectory, CHStoryLocalizationFileName))&& BetterGeoscapeMain.Config.ActivateCHRework) { AddLocalizationFromCSV(CHStoryLocalizationFileName, null); } - NotLocalizedTextMap = ReadJson>>(TextMapFileName); + } catch (Exception e) { @@ -156,86 +152,6 @@ public static T CreateDefFromClone(T source, string guid, string name) where return null; } } - - - - // Read embedded or external json file - public static T ReadJson(string fileName) - { - try - { - string json = null; - Assembly assembly = Assembly.GetExecutingAssembly(); - string source = assembly.GetManifestResourceNames().Single(str => str.EndsWith(fileName)); - string filePath = Path.Combine(ManagedDirectory, fileName); - DateTime fileLastChanged = File.GetLastWriteTime(filePath); - DateTime assemblyLastChanged = File.GetLastWriteTime(assembly.Location); - if (source != null && source != "" && fileLastChanged < assemblyLastChanged) - { - Logger.Always("----------------------------------------------------------------------------------------------------", false); - Logger.Always("Read JSON from assembly: " + source); - Logger.Always("----------------------------------------------------------------------------------------------------", false); - using (Stream stream = assembly.GetManifestResourceStream(source)) - using (StreamReader reader = new StreamReader(stream)) - { - json = reader.ReadToEnd(); - } - } - if (json == null || json == "") - { - Logger.Always("----------------------------------------------------------------------------------------------------", false); - Logger.Always("Read JSON from file: " + filePath); - Logger.Always("----------------------------------------------------------------------------------------------------", false); - json = File.Exists(filePath) ? File.ReadAllText(filePath) : throw new FileNotFoundException(filePath); - } - return JsonConvert.DeserializeObject(json); - } - catch (Exception e) - { - Logger.Error(e); - return default; - } - } - - // Write to external json file - public static void WriteJson(string fileName, object obj, bool toFile = true) - { - try - { - string jsonString = JsonConvert.SerializeObject(obj, Formatting.Indented); - if (toFile) - { - //string ModDirectory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); - string filePath = Path.Combine(ManagedDirectory, fileName); - if (File.Exists(filePath)) - { - File.WriteAllText(Path.Combine(ManagedDirectory, fileName), jsonString); - Logger.Always("----------------------------------------------------------------------------------------------------", false); - Logger.Always("Write JSON to file: " + filePath); - Logger.Always("----------------------------------------------------------------------------------------------------", false); - } - else - { - throw new FileNotFoundException(filePath); - } - } - // Writing in running assembly -- TODO: if really needed -> figure out to make it possible - //Assembly assembly = Assembly.GetExecutingAssembly(); - //string source = assembly.GetManifestResourceNames().Single(str => str.EndsWith(fileName)); - //if (source != null || source != "") - //{ - // using (Stream stream = assembly.GetManifestResourceStream(source)) - // using (StreamWriter writer = new StreamWriter(stream)) - // { - // writer.Write(jsonString); - // } - //} - } - catch (Exception e) - { - Logger.Error(e); - } - } } } diff --git a/BetterGeoscape/VolandsPlayground.cs b/BetterGeoscape/VolandsPlayground.cs index a0b5a56..8f36779 100644 --- a/BetterGeoscape/VolandsPlayground.cs +++ b/BetterGeoscape/VolandsPlayground.cs @@ -2,6 +2,7 @@ using Base.Defs; using Base.Eventus; using Base.Eventus.Filters; +using Base.UI; using PhoenixPoint.Common.Core; using PhoenixPoint.Geoscape.Entities.Research; using PhoenixPoint.Geoscape.Entities.Research.Requirement; @@ -10,7 +11,9 @@ using PhoenixPoint.Geoscape.Events.Conditions; using PhoenixPoint.Geoscape.Events.Eventus; using PhoenixPoint.Geoscape.Events.Eventus.Filters; +using PhoenixPoint.Geoscape.Levels; using PhoenixPoint.Geoscape.Levels.Factions; +using PhoenixPoint.Tactical.Entities; using System; using System.Collections.Generic; using System.Linq; @@ -82,8 +85,6 @@ public static void Apply_Changes() veryhard.LairLimitations.HoursBuildTime = 150; veryhard.CitadelLimitations.HoursBuildTime = 240; - - // KE Story rework - remove missions + Maker TheMarketplaceSettingsDef theMarketplaceSettings = Repo.GetAllDefs().FirstOrDefault(ged => ged.name.Equals("TheMarketplaceSettingsDef")); theMarketplaceSettings.TheMarketplaceItemOfferAmounts[0].MaxNumberOfOffers = theMarketplaceSettings.TheMarketplaceItemOfferAmounts[4].MaxNumberOfOffers; @@ -104,11 +105,11 @@ public static void Apply_Changes() LE1Win.GeoscapeEventData.Choices[0].Outcome.SetEvents = geoEventFS9.GeoscapeEventData.Choices[0].Outcome.SetEvents; LE1Win.GeoscapeEventData.Choices[0].Outcome.TrackEncounters = geoEventFS9.GeoscapeEventData.Choices[0].Outcome.TrackEncounters; //Unlock all ancient weapons research and add hidden variable to unlock final cinematic - GeoscapeEventDef LE2Win = Repo.GetAllDefs().FirstOrDefault(ged => ged.name.Equals("PROG_LE1_WIN_GeoscapeEventDef")); - GeoscapeEventDef LE3Win = Repo.GetAllDefs().FirstOrDefault(ged => ged.name.Equals("PROG_LE1_WIN_GeoscapeEventDef")); - GeoscapeEventDef LE4Win = Repo.GetAllDefs().FirstOrDefault(ged => ged.name.Equals("PROG_LE1_WIN_GeoscapeEventDef")); - GeoscapeEventDef LE5Win = Repo.GetAllDefs().FirstOrDefault(ged => ged.name.Equals("PROG_LE1_WIN_GeoscapeEventDef")); - GeoscapeEventDef LE6Win = Repo.GetAllDefs().FirstOrDefault(ged => ged.name.Equals("PROG_LE1_WIN_GeoscapeEventDef")); + GeoscapeEventDef LE2Win = Repo.GetAllDefs().FirstOrDefault(ged => ged.name.Equals("PROG_LE2_WIN_GeoscapeEventDef")); + GeoscapeEventDef LE3Win = Repo.GetAllDefs().FirstOrDefault(ged => ged.name.Equals("PROG_LE3_WIN_GeoscapeEventDef")); + GeoscapeEventDef LE4Win = Repo.GetAllDefs().FirstOrDefault(ged => ged.name.Equals("PROG_LE4_WIN_GeoscapeEventDef")); + GeoscapeEventDef LE5Win = Repo.GetAllDefs().FirstOrDefault(ged => ged.name.Equals("PROG_LE5_WIN_GeoscapeEventDef")); + GeoscapeEventDef LE6Win = Repo.GetAllDefs().FirstOrDefault(ged => ged.name.Equals("PROG_LE6_WIN_GeoscapeEventDef")); OutcomeVariableChange Schemata2Res = LE2Win.GeoscapeEventData.Choices[0].Outcome.VariablesChange[0]; OutcomeVariableChange Schemata3Res = LE3Win.GeoscapeEventData.Choices[0].Outcome.VariablesChange[0]; OutcomeVariableChange Schemata4Res = LE4Win.GeoscapeEventData.Choices[0].Outcome.VariablesChange[0]; @@ -121,6 +122,86 @@ public static void Apply_Changes() LE1Win.GeoscapeEventData.Choices[0].Outcome.VariablesChange.Add(Schemata5Res); LE1Win.GeoscapeEventData.Choices[0].Outcome.VariablesChange.Add(Schemata6Res); LE1Win.GeoscapeEventData.Choices[0].Outcome.VariablesChange.Add(var6LE); + //Remove 50 SP + LE1Win.GeoscapeEventData.Choices[0].Outcome.FactionSkillPoints = 0; + LE1Win.GeoscapeEventData.Leader = "Jack_Harlson01"; + //Require capturing ancient site for LOTA Schemata missions + //GeoscapeEventDef LE1Event = Repo.GetAllDefs().FirstOrDefault(ged => ged.name.Equals("PROG_LE1_GeoscapeEventDef")); + //GeoscapeEventDef LEFinalEvent = Repo.GetAllDefs().FirstOrDefault(ged => ged.name.Equals("PROG_LE_FINAL_GeoscapeEventDef")); + //GeoLevelConditionDef sourceCondition = Repo.GetAllDefs().FirstOrDefault(ged => ged.name.Equals("[PROG_LE_FINAL] Condition 1")); + //GeoLevelConditionDef newCondition = Helper.CreateDefFromClone(sourceCondition, "0358D502-421D-4D9A-9505-491FC80F1C56", "[PROG_LE_1] Condition 2"); + //newCondition.VariableCompareToNumber = 1; + //LE1Event.GeoscapeEventData.Conditions.Add(newCondition); + //Add choices for LE1Win + + GeoFactionDef PhoenixPoint=Repo.GetAllDefs().FirstOrDefault(ged => ged.name.Equals("Phoenix_GeoPhoenixFactionDef")); + GeoFactionDef NewJericho = Repo.GetAllDefs().FirstOrDefault(ged => ged.name.Equals("NewJericho_GeoFactionDef")); + GeoFactionDef Anu = Repo.GetAllDefs().FirstOrDefault(ged => ged.name.Equals("Anu_GeoFactionDef")); + + LE1Win.GeoscapeEventData.Choices.Add(new GeoEventChoice() + { + Text = new LocalizedTextBind("PROG_LE1_WIN_CHOICE_1_TEXT"), + Outcome = new GeoEventChoiceOutcome() + { + UntrackEncounters = LE1Win.GeoscapeEventData.Choices[0].Outcome.UntrackEncounters, + VariablesChange = LE1Win.GeoscapeEventData.Choices[0].Outcome.VariablesChange, + OutcomeText = new EventTextVariation() + { + General = new LocalizedTextBind("PROG_LE1_WIN_CHOICE_1_OUTCOME_GENERAL") + }, + SetEvents = geoEventFS9.GeoscapeEventData.Choices[0].Outcome.SetEvents, + TrackEncounters = geoEventFS9.GeoscapeEventData.Choices[0].Outcome.TrackEncounters, + FactionSkillPoints = 0 + } + }); + LE1Win.GeoscapeEventData.Choices.Add(new GeoEventChoice() + { + Text = new LocalizedTextBind("PROG_LE1_WIN_CHOICE_2_TEXT"), + Outcome = new GeoEventChoiceOutcome() + { + UntrackEncounters = LE1Win.GeoscapeEventData.Choices[0].Outcome.UntrackEncounters, + VariablesChange = LE1Win.GeoscapeEventData.Choices[0].Outcome.VariablesChange, + OutcomeText = new EventTextVariation() + { + General = new LocalizedTextBind("PROG_LE1_WIN_CHOICE_2_OUTCOME_GENERAL") + }, + SetEvents = geoEventFS9.GeoscapeEventData.Choices[0].Outcome.SetEvents, + TrackEncounters = geoEventFS9.GeoscapeEventData.Choices[0].Outcome.TrackEncounters, + FactionSkillPoints = 0 + } + }); + LE1Win.GeoscapeEventData.Choices[0].Outcome.OutcomeText.General.LocalizationKey = "PROG_LE1_WIN_CHOICE_0_OUTCOME_GENERAL"; + TacCharacterDef armadillo = Repo.GetAllDefs().FirstOrDefault(ged => ged.name.Equals("NJ_Armadillo_CharacterTemplateDef")); + LE1Win.GeoscapeEventData.Choices[0].Outcome.Units.Add(armadillo); + LE1Win.GeoscapeEventData.Choices[0].Outcome.Diplomacy.Add(new OutcomeDiplomacyChange() + { + PartyFaction = NewJericho, + TargetFaction = PhoenixPoint, + PartyType = (OutcomeDiplomacyChange.ChangeTarget)1, + Value = -8 + + }); + LE1Win.GeoscapeEventData.Choices[1].Outcome.Diplomacy.Add(new OutcomeDiplomacyChange() + { + PartyFaction = NewJericho, + TargetFaction = PhoenixPoint, + PartyType = (OutcomeDiplomacyChange.ChangeTarget)1, + Value = +8 + }); + LE1Win.GeoscapeEventData.Choices[1].Outcome.Diplomacy.Add(new OutcomeDiplomacyChange() + { + PartyFaction = Anu, + TargetFaction = PhoenixPoint, + PartyType = (OutcomeDiplomacyChange.ChangeTarget)1, + Value = -8 + }); + LE1Win.GeoscapeEventData.Choices[1].Outcome.Diplomacy.Add(new OutcomeDiplomacyChange() + { + PartyFaction = NewJericho, + TargetFaction = Anu, + PartyType = (OutcomeDiplomacyChange.ChangeTarget)1, + Value = -16 + }); } catch (Exception e)