diff --git a/src/data/abilities/abilities.xml b/src/data/abilities/abilities.xml
index c7f5f6f..c53414a 100644
--- a/src/data/abilities/abilities.xml
+++ b/src/data/abilities/abilities.xml
@@ -1,6 +1,7 @@
附加到决定版 Data/Abilities/abilities.xml中
+
AOE3 NativeED mod Abilities Starts
@@ -166,3 +167,4 @@
AOE3 NativeED mod Abilities Ends
+
\ No newline at end of file
diff --git a/src/data/abilities/powers.xml b/src/data/abilities/powers.xml
index 15b5ee2..1252a0f 100644
--- a/src/data/abilities/powers.xml
+++ b/src/data/abilities/powers.xml
@@ -1,5 +1,6 @@
+
附加到决定版 Data/Abilities/powers.xml中
AOE3 NativeED mod Powers Starts
@@ -227,4 +228,6 @@
1
- AOE3 NativeED mod Powers Ends
\ No newline at end of file
+ AOE3 NativeED mod Powers Ends
+
+
diff --git a/src/data/stringTable/stringtabley-cn.xml b/src/data/stringTable/stringtabley-cn.xml
index 25dbe34..9a7fb2e 100644
--- a/src/data/stringTable/stringtabley-cn.xml
+++ b/src/data/stringTable/stringtabley-cn.xml
@@ -1,6 +1,7 @@
-
- 附加到决定版 Data/strings/SimplifiedChinese/stringtabley.xml中
-
+
+
+
+ 附加到决定版 Data/strings/SimplifiedChinese/stringtabley.xml中
西方军事议会
WCB 西方军事议会
@@ -244,4 +245,6 @@
聚合条约
签订聚合条约,取得组织的帮助
签订聚合条约,取得组织的帮助
-
\ No newline at end of file
+
+
+
diff --git a/src/data/stringTable/stringtabley-en.xml b/src/data/stringTable/stringtabley-en.xml
index cbf7e1c..e0d4f31 100644
--- a/src/data/stringTable/stringtabley-en.xml
+++ b/src/data/stringTable/stringtabley-en.xml
@@ -1,5 +1,7 @@
-
- 附加到决定版 Data/strings/SimplifiedChinese/stringtabley.xml中
+
+
+
+ 附加到决定版 Data/strings/SimplifiedChinese/stringtabley.xml中
Western Military Council
@@ -244,4 +246,5 @@
Ju He contract
签订聚合条约,取得组织的帮助
签订聚合条约,取得组织的帮助
-
\ No newline at end of file
+
+
\ No newline at end of file
diff --git a/src/data/techtreey.xml b/src/data/techtreey.xml
index 0d76829..c8345a0 100644
--- a/src/data/techtreey.xml
+++ b/src/data/techtreey.xml
@@ -4,11 +4,11 @@
- NativeED mod enabler EU Starts
+
WCTxfjsyhTech
WCTamyjtTech
WCTjhtTech
- NativeED mod enabler EU Ends
+
@@ -23,6 +23,10 @@
- Age0SPCAct2
- Age0SPCAct1
- Age0SPCAct3
+ - Age0SPCBandits
+ - Age0XPSPCFalcon
+
+ - DEAge0Swedish
@@ -44,11 +48,11 @@
- NativeED mod enabler NA Starts
-WCTamyjtTech
-WCTxfjsyhTech
-WCTjhtTech
- NativeED mod enabler NA Ends
+
+ WCTamyjtTech
+ WCTxfjsyhTech
+ WCTjhtTech
+
@@ -58,6 +62,8 @@
- Age0XPSPC
- XPSPCAct1Age0
- XPSPCAct2Age0
+ - Age0XPSPCLakota
+ - DEAge0Inca
@@ -80,11 +86,11 @@
- NativeED mod enabler AS Starts
-WCTjhtTech
-WCTxfjsyhTech
-WCTamyjtTech
- NativeED mod enabler AS Ends
+
+ WCTjhtTech
+ WCTxfjsyhTech
+ WCTamyjtTech
+
@@ -115,6 +121,15 @@
+
+
+
+ - DEAge0BarbarySPC
+ - DEAge0AmericansSPC
+ - DEAge0TatarsSPC
+ - DEAge0EthiopiansSPC
+
+
diff --git a/tools/xml-inject/.vscode/launch.json b/tools/xml-inject/.vscode/launch.json
new file mode 100644
index 0000000..e77818e
--- /dev/null
+++ b/tools/xml-inject/.vscode/launch.json
@@ -0,0 +1,27 @@
+{
+ // Use IntelliSense to find out which attributes exist for C# debugging
+ // Use hover for the description of the existing attributes
+ // For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
+ "version": "0.2.0",
+ "configurations": [
+ {
+ "name": ".NET Core Launch (console)",
+ "type": "coreclr",
+ "request": "launch",
+ "preLaunchTask": "build",
+ // If you have changed target frameworks, make sure to update the program path.
+ "program": "${workspaceFolder}/App/bin/Debug/net5.0/XMLInject.dll",
+ "args": [],
+ "cwd": "${workspaceFolder}/App",
+ // For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
+ "console": "internalConsole",
+ "stopAtEntry": false
+ },
+ {
+ "name": ".NET Core Attach",
+ "type": "coreclr",
+ "request": "attach",
+ "processId": "${command:pickProcess}"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/tools/xml-inject/.vscode/tasks.json b/tools/xml-inject/.vscode/tasks.json
new file mode 100644
index 0000000..3373d7c
--- /dev/null
+++ b/tools/xml-inject/.vscode/tasks.json
@@ -0,0 +1,42 @@
+{
+ "version": "2.0.0",
+ "tasks": [
+ {
+ "label": "build",
+ "command": "dotnet",
+ "type": "process",
+ "args": [
+ "build",
+ "${workspaceFolder}/App/App.csproj",
+ "/property:GenerateFullPaths=true",
+ "/consoleloggerparameters:NoSummary"
+ ],
+ "problemMatcher": "$msCompile"
+ },
+ {
+ "label": "publish",
+ "command": "dotnet",
+ "type": "process",
+ "args": [
+ "publish",
+ "${workspaceFolder}/App/App.csproj",
+ "/property:GenerateFullPaths=true",
+ "/consoleloggerparameters:NoSummary"
+ ],
+ "problemMatcher": "$msCompile"
+ },
+ {
+ "label": "watch",
+ "command": "dotnet",
+ "type": "process",
+ "args": [
+ "watch",
+ "run",
+ "${workspaceFolder}/App/App.csproj",
+ "/property:GenerateFullPaths=true",
+ "/consoleloggerparameters:NoSummary"
+ ],
+ "problemMatcher": "$msCompile"
+ }
+ ]
+}
\ No newline at end of file
diff --git a/tools/xml-inject/App/App.csproj b/tools/xml-inject/App/App.csproj
new file mode 100644
index 0000000..54e393f
--- /dev/null
+++ b/tools/xml-inject/App/App.csproj
@@ -0,0 +1,9 @@
+
+
+
+ Exe
+ net5.0
+ XMLInject
+
+
+
diff --git a/tools/xml-inject/App/Program.cs b/tools/xml-inject/App/Program.cs
new file mode 100644
index 0000000..9c98e78
--- /dev/null
+++ b/tools/xml-inject/App/Program.cs
@@ -0,0 +1,176 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Xml;
+
+namespace App
+{
+ class Program
+ {
+ static void Main(string[] args)
+ {
+ var i = new Injection();
+
+ }
+
+
+ }
+
+ class InjectXMLParams {
+ public string SourceFilePath { get; set; }
+ public string SourceParentTagName { get; set; }
+ public string TargetFilePath { get; set; }
+ public string TargetParentTagName { get; set; }
+ public string OutputFolder { get; set; }
+ public string OutputFileName { get; set; }
+
+ }
+
+
+ class Injection {
+
+ public void InjectXMLToBottom(InjectXMLParams settings) {
+
+ var xmlSettings = new XmlReaderSettings();
+ xmlSettings.IgnoreComments = true;
+
+
+ XmlReader sourceReader = XmlReader.Create(settings.SourceFilePath, xmlSettings);
+ var source = new XmlDocument();
+ source.Load(sourceReader);
+
+ XmlReader targetReader = XmlReader.Create(settings.TargetFilePath, xmlSettings);
+ var target = new XmlDocument();
+ target.Load(targetReader);
+
+ XmlNode parentNode = target.SelectSingleNode(settings.TargetParentTagName);
+
+ foreach(var node in source.SelectSingleNode(settings.SourceParentTagName).ChildNodes) {
+ XmlNode importedNode = parentNode.OwnerDocument.ImportNode(node as XmlNode, true);
+ }
+
+ Directory.CreateDirectory(settings.OutputFolder);
+
+ string outputPath = Path.GetFullPath(Path.Combine(settings.OutputFolder, settings.OutputFileName));
+
+ File.WriteAllText(outputPath, target.OuterXml);
+
+ sourceReader.Dispose();
+ targetReader.Dispose();
+
+ }
+
+ string basePath = AppDomain.CurrentDomain.BaseDirectory;
+
+ public void InjectAbilities() {
+
+ InjectXMLToBottom(new InjectXMLParams() {
+ SourceFilePath = Path.GetFullPath(Path.Combine(".", "workbench", "src", "abilities", "abilities.xml"), basePath),
+ SourceParentTagName = "NEDAbilities",
+ TargetFilePath = Path.GetFullPath(Path.Combine(".", "workbench", "in", "abilities", "abilities.xml"), basePath),
+ TargetParentTagName = "abilities",
+ OutputFolder = Path.GetFullPath(Path.Combine(".", "workbench", "out", "abilities"), basePath),
+ OutputFileName = "abilities.xml"
+ });
+
+ }
+
+ public void InjectPowers() {
+
+ InjectXMLToBottom(new InjectXMLParams() {
+ SourceFilePath = Path.GetFullPath(Path.Combine(".", "workbench", "src", "abilities", "powers.xml"), basePath),
+ SourceParentTagName = "NEDPowers",
+ TargetFilePath = Path.GetFullPath(Path.Combine(".", "workbench", "in", "abilities", "powers.xml"), basePath),
+ TargetParentTagName = "powers",
+ OutputFolder = Path.GetFullPath(Path.Combine(".", "workbench", "out", "abilities"), basePath),
+ OutputFileName = "powers.xml"
+ });
+
+ }
+
+ public void InjectI18nStrings() {
+
+ var i18nTable = new Dictionary>() {
+ // format:
+ // (lang), List [
+ // (srcFilePath),
+ // (targetFilePath),
+ // (outputFilePath)
+ // ]
+ {
+ "en", new List() {
+ Path.GetFullPath(Path.Combine(".", "workbench", "src", "stringTable", "stringtabley-en.xml"), basePath),
+ Path.GetFullPath(Path.Combine(".", "workbench", "in", "strings", "English", "stringtabley.xml"), basePath),
+ Path.GetFullPath(Path.Combine(".", "workbench", "out", "strings", "English"), basePath),
+ }
+ },
+ {
+ "cn", new List() {
+ Path.GetFullPath(Path.Combine(".", "workbench", "src", "stringTable", "stringtabley-cn.xml"), basePath),
+ Path.GetFullPath(Path.Combine(".", "workbench", "in", "strings", "SimplifiedChinese", "stringtabley.xml"), basePath),
+ Path.GetFullPath(Path.Combine(".", "workbench", "out", "strings", "SimplifiedChinese"), basePath),
+ }
+ }
+ };
+
+
+ foreach(var lang in i18nTable) {
+
+ InjectXMLToBottom(new InjectXMLParams() {
+ SourceFilePath = lang.Value[0],
+ SourceParentTagName = "nedStrings",
+ TargetFilePath = lang.Value[1],
+ TargetParentTagName = "/stringtable/language",
+ OutputFolder = lang.Value[2],
+ OutputFileName = "stringtabley.xml"
+ });
+
+ }
+
+ }
+
+
+ // Inject protoy.xml (Add new content + Edit exixting node)
+
+ // Inject techtreey.xml (Add new content + Edit exixting node)
+
+ public Injection()
+ {
+ // Inject abilities/abilities.xml (Just add new content to bottom)
+
+ try
+ {
+ InjectAbilities();
+ }
+ catch (System.Exception e)
+ {
+ Console.WriteLine($"Error!: {e}");
+ }
+
+
+ // Inject abilities/powers.xml (Just add new content to bottom)
+
+ try
+ {
+ InjectPowers();
+ }
+ catch (System.Exception e)
+ {
+ Console.WriteLine($"Error!: {e}");
+ }
+
+ // Inject strings/English/stringtabley.xml (Just add new content to bottom)
+ // Inject strings/SimplifiedChinese/stringtabley.xml (Just add new content to bottom)
+ try
+ {
+ InjectI18nStrings();
+ }
+ catch (System.Exception e)
+ {
+ Console.WriteLine($"Error!: {e}");
+ }
+
+ }
+
+ }
+}
diff --git a/tools/xml-inject/XMLInject.sln b/tools/xml-inject/XMLInject.sln
new file mode 100644
index 0000000..421c523
--- /dev/null
+++ b/tools/xml-inject/XMLInject.sln
@@ -0,0 +1,34 @@
+
+Microsoft Visual Studio Solution File, Format Version 12.00
+# Visual Studio 15
+VisualStudioVersion = 15.0.26124.0
+MinimumVisualStudioVersion = 15.0.26124.0
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "App", "App\App.csproj", "{5CAACFFE-E93C-4A4A-A1FD-457E8A90FFCD}"
+EndProject
+Global
+ GlobalSection(SolutionConfigurationPlatforms) = preSolution
+ Debug|Any CPU = Debug|Any CPU
+ Debug|x64 = Debug|x64
+ Debug|x86 = Debug|x86
+ Release|Any CPU = Release|Any CPU
+ Release|x64 = Release|x64
+ Release|x86 = Release|x86
+ EndGlobalSection
+ GlobalSection(SolutionProperties) = preSolution
+ HideSolutionNode = FALSE
+ EndGlobalSection
+ GlobalSection(ProjectConfigurationPlatforms) = postSolution
+ {5CAACFFE-E93C-4A4A-A1FD-457E8A90FFCD}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
+ {5CAACFFE-E93C-4A4A-A1FD-457E8A90FFCD}.Debug|Any CPU.Build.0 = Debug|Any CPU
+ {5CAACFFE-E93C-4A4A-A1FD-457E8A90FFCD}.Debug|x64.ActiveCfg = Debug|Any CPU
+ {5CAACFFE-E93C-4A4A-A1FD-457E8A90FFCD}.Debug|x64.Build.0 = Debug|Any CPU
+ {5CAACFFE-E93C-4A4A-A1FD-457E8A90FFCD}.Debug|x86.ActiveCfg = Debug|Any CPU
+ {5CAACFFE-E93C-4A4A-A1FD-457E8A90FFCD}.Debug|x86.Build.0 = Debug|Any CPU
+ {5CAACFFE-E93C-4A4A-A1FD-457E8A90FFCD}.Release|Any CPU.ActiveCfg = Release|Any CPU
+ {5CAACFFE-E93C-4A4A-A1FD-457E8A90FFCD}.Release|Any CPU.Build.0 = Release|Any CPU
+ {5CAACFFE-E93C-4A4A-A1FD-457E8A90FFCD}.Release|x64.ActiveCfg = Release|Any CPU
+ {5CAACFFE-E93C-4A4A-A1FD-457E8A90FFCD}.Release|x64.Build.0 = Release|Any CPU
+ {5CAACFFE-E93C-4A4A-A1FD-457E8A90FFCD}.Release|x86.ActiveCfg = Release|Any CPU
+ {5CAACFFE-E93C-4A4A-A1FD-457E8A90FFCD}.Release|x86.Build.0 = Release|Any CPU
+ EndGlobalSection
+EndGlobal