Skip to content

Commit

Permalink
Projektdateien hinzufügen.
Browse files Browse the repository at this point in the history
  • Loading branch information
Voland163 committed Mar 22, 2022
1 parent db71917 commit 293af5c
Show file tree
Hide file tree
Showing 7 changed files with 257 additions and 108 deletions.
155 changes: 155 additions & 0 deletions BetterGeoscape/Assets/Localization/PR_BG_Localization.csv
Original file line number Diff line number Diff line change
@@ -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 <i>proving</i> 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,,
Original file line number Diff line number Diff line change
Expand Up @@ -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,,,,,,,,
Expand Down
2 changes: 2 additions & 0 deletions BetterGeoscape/BetterGeoscape.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -93,8 +93,10 @@
<EmbeddedResource Include="mod_info.js" />
</ItemGroup>
<ItemGroup>
<None Include="Assets\Localization\PR_BG_Localization.csv" />
<None Include="Assets\Localization\PR_CH_Story_Localization.csv" />
<None Include="packages.config" />
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
</Project>
6 changes: 2 additions & 4 deletions BetterGeoscape/BetterGeoscapeMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<DefRepository>();
internal static bool doNotLocalize = true;


public static void HomeMod(Func<string, object, object> api)
{
InitBetterGeoscape(api);
Expand All @@ -42,7 +40,6 @@ public static void HomeMod(Func<string, object, object> api)
CHReworkMain.Apply_Changes();
}


}
public static void GeoscapeOnHide()
{
Expand All @@ -61,6 +58,7 @@ public static void InitBetterGeoscape(Func<string, object, object> 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));
Expand Down
3 changes: 0 additions & 3 deletions BetterGeoscape/CHReworkMain.cs
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,6 @@ public static void Apply_Changes()
// Remove final cinematic
GeoscapeEventDef winCH2 = Repo.GetAllDefs<GeoscapeEventDef>().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)
Expand Down
96 changes: 6 additions & 90 deletions BetterGeoscape/Helper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
using System.Reflection;
using UnityEngine;



namespace PhoenixRising.BetterGeoscape
{
internal class Helper
Expand All @@ -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<string, Dictionary<string, string>> 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<Dictionary<string, Dictionary<string, string>>>(TextMapFileName);

}
catch (Exception e)
{
Expand Down Expand Up @@ -156,86 +152,6 @@ public static T CreateDefFromClone<T>(T source, string guid, string name) where
return null;
}
}



// Read embedded or external json file
public static T ReadJson<T>(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<T>(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);
}
}
}
}

Loading

0 comments on commit 293af5c

Please sign in to comment.