diff --git a/AlienBML b/AlienBML index db257eb..7369624 160000 --- a/AlienBML +++ b/AlienBML @@ -1 +1 @@ -Subproject commit db257eb5d9258a4108bde88d26d52ddd69d42ba9 +Subproject commit 73696246f6f2a5ad358f7aed408f53fd20639b92 diff --git a/CathodeLib/CathodeLib.csproj b/CathodeLib/CathodeLib.csproj index dafc6ef..a9d2119 100644 --- a/CathodeLib/CathodeLib.csproj +++ b/CathodeLib/CathodeLib.csproj @@ -9,11 +9,11 @@ CathodeLib Matt Filer Provides support for parsing and writing common Alien: Isolation formats from the Cathode engine. - Matt Filer 2022 - 0.2.0 + Matt Filer 2023 + 0.3.0 Library - 0.2.0.0 - 0.2.0.0 + 0.3.0.0 + 0.3.0.0 False @@ -39,9 +39,7 @@ - - - + @@ -73,8 +71,4 @@ - - - - diff --git a/CathodeLib/Resources/NodeDBs/cathode_enum_lut.bin b/CathodeLib/Resources/NodeDBs/cathode_enum_lut.bin index 0cebee1..06a6a42 100644 Binary files a/CathodeLib/Resources/NodeDBs/cathode_enum_lut.bin and b/CathodeLib/Resources/NodeDBs/cathode_enum_lut.bin differ diff --git a/CathodeLib/Scripts/AlienLevel.cs b/CathodeLib/Scripts/AlienLevel.cs deleted file mode 100644 index 247572d..0000000 --- a/CathodeLib/Scripts/AlienLevel.cs +++ /dev/null @@ -1,108 +0,0 @@ -using System.IO; - -/* -namespace CathodeLib -{ - public class AlienLevel - { - public static alien_level Load(string LEVEL_NAME, string ENV_PATH) - { - alien_level Result = new alien_level(); - string levelPath = ENV_PATH + "/PRODUCTION/" + LEVEL_NAME; - - /*** WORLD ***/ - -/* - Result.ModelsMVR = new CATHODE.Models.CathodeMovers(levelPath + "/WORLD/MODELS.MVR"); - Result.CommandsPAK = new CATHODE.Commands.CommandsPAK(levelPath + "/WORLD/COMMANDS.PAK"); - - Result.RenderableREDS = new CATHODE.Misc.CathodeRenderableElements(levelPath + "/WORLD/REDS.BIN"); - Result.ResourcesBIN = new CATHODE.Misc.CathodeResources(levelPath + "/WORLD/RESOURCES.BIN"); - Result.PhysicsMap = new CATHODE.Misc.CathodePhysicsMap(levelPath + "/WORLD/PHYSICS.MAP"); - Result.EnvironmentMap = new CATHODE.Misc.CathodeEnvironmentMap(levelPath + "/WORLD/ENVIRONMENTMAP.BIN"); - Result.CollisionMap = new CATHODE.Misc.CathodeCollisionMap(levelPath + "/WORLD/COLLISION.MAP"); - - Result.EnvironmentAnimation = CATHODE.Misc.CathodeEnvironmentAnimation.Load(levelPath + "/WORLD/ENVIRONMENT_ANIMATION.DAT"); - - //ALPHALIGHT_LEVEL.BIN - //BEHAVIOR_TREE.DB - //CHARACTERACCESSORYSETS.BIN - //COLLISION.BIN - //COLLISION.HKX - //COLLISION.HKX64 - //CUTSCENE_DIRECTOR_DATA.BIN - //EXCLUSIVE_MASTER_RESOURCE_INDICES - //LEVEL.STR - //LIGHTS.BIN - //MATERIAL_MAPPINGS.PAK - //MORPH_TARGET_DB.BIN - //OCCLUDER_TRIANGLE_BVH.BIN - //PATH_BARRIER_RESOURCES - //PHYSICS.HKX - //PHYSICS.HKX64 - //RADIOSITY_COLLISION_MAPPING.BIN - //SNDNODENETWORK.DAT - //SOUNDBANKDATA.DAT - //SOUNDDIALOGUELOOKUPS.DAT - //SOUNDENVIRONMENTDATA.DAT - //SOUNDEVENTDATA.DAT - //SOUNDFLASHMODELS.DAT - //SOUNDLOADZONES.DAT - //STATE_x/ASSAULT_POSITIONS - //STATE_x/COVER - //STATE_x/CRAWL_SPACE_SPOTTING_POSITIONS - //STATE_x/NAV_MESH - //STATE_x/SPOTTING_POSITIONS - //STATE_x/TRAVERSAL - - /*** RENDERABLE ***/ - -/* -Result.ModelsCST = File.ReadAllBytes(levelPath + "/RENDERABLE/LEVEL_MODELS.CST"); - Result.ModelsMTL = CATHODE.Models.CathodeMaterials.Load(levelPath + "/RENDERABLE/LEVEL_MODELS.MTL"); - Result.ModelsPAK = CATHODE.Models.ModelPAK.Load(levelPath + "/RENDERABLE/LEVEL_MODELS.PAK"); - Result.ModelsBIN = CATHODE.Models.ModelBIN.Load(levelPath + "/RENDERABLE/MODELS_LEVEL.BIN"); - - Result.ShadersPAK = CATHODE.Shaders.ShadersPAK.Load(levelPath + "/RENDERABLE/LEVEL_SHADERS_DX11.PAK"); - //Result.ShadersBIN = CATHODE.Shaders.ShadersBIN.Load(levelPath + "/RENDERABLE/LEVEL_SHADERS_DX11_BIN.PAK"); - Result.ShadersIDXRemap = CATHODE.Shaders.IDXRemap.Load(levelPath + "/RENDERABLE/LEVEL_SHADERS_DX11_IDX_REMAP.PAK"); - - Result.LevelTextures = CATHODE.Textures.CathodeTextures.Load(levelPath + "/RENDERABLE/LEVEL_TEXTURES.ALL.PAK", levelPath + "/RENDERABLE/LEVEL_TEXTURE_HEADERS.ALL.BIN"); - - //LEVEL_TEXTURES.DX11.PAK - //RADIOSITY_INSTANCE_MAP.TXT - //RADIOSITY_RUNTIME.BIN - //DAMAGE/DAMAGE_MAPPING_INFO.BIN - //GALAXY/GALAXY.DEFINITION_BIN - //GALAXY/GALAXY.ITEMS_BIN - - return Result; - } - } -} - -public class alien_level -{ - public CATHODE.Models.CathodeMovers ModelsMVR; - public CATHODE.Commands.CommandsPAK CommandsPAK; - - public CATHODE.Misc.CathodeRenderableElements RenderableREDS; - public CATHODE.Misc.CathodeResources ResourcesBIN; - public CATHODE.Misc.CathodePhysicsMap PhysicsMap; - public CATHODE.Misc.CathodeEnvironmentMap EnvironmentMap; - public CATHODE.Misc.CathodeCollisionMap CollisionMap; - - public alien_animation_dat EnvironmentAnimation; - - public byte[] ModelsCST; - public alien_mtl ModelsMTL; - public alien_pak_model ModelsPAK; - public alien_model_bin ModelsBIN; - - public alien_textures LevelTextures; - - public alien_shader_pak ShadersPAK; - public alien_shader_bin_pak ShadersBIN; - public alien_shader_idx_remap ShadersIDXRemap; -}; -*/ \ No newline at end of file diff --git a/CathodeLib/Scripts/AssetPAKs/AssetPAK.cs b/CathodeLib/Scripts/AssetPAKs/AssetPAK.cs index d8bc1bc..d4a14c4 100644 --- a/CathodeLib/Scripts/AssetPAKs/AssetPAK.cs +++ b/CathodeLib/Scripts/AssetPAKs/AssetPAK.cs @@ -6,8 +6,8 @@ namespace CATHODE.Assets { public class AssetPAK { - protected string FilePathPAK = ""; - protected string FilePathBIN = ""; + protected string _filePathPAK = ""; + protected string _filePathBIN = ""; virtual public PAKReturnType Load() { return PAKReturnType.FAIL_FEATURE_IS_COMING_SOON; } virtual public List GetFileNames() { return null; } @@ -42,4 +42,17 @@ public enum PAKReturnType SUCCESS, SUCCESS_WITH_WARNINGS }; + + public enum FileIdentifiers + { + ASSET_FILE = 14, + + SHADER_DATA = 3, + MODEL_DATA = 19, + TEXTURE_DATA = 45, + + //From ABOUT.TXT (unsure where used) + STRING_FILE_VERSION = 6, + ENTITY_FILE_VERSION = 171, + } } diff --git a/CathodeLib/Scripts/AssetPAKs/Handlers/MaterialMapping.cs b/CathodeLib/Scripts/AssetPAKs/Handlers/MaterialMapping.cs index 5ac41f7..9f8e6ba 100644 --- a/CathodeLib/Scripts/AssetPAKs/Handlers/MaterialMapping.cs +++ b/CathodeLib/Scripts/AssetPAKs/Handlers/MaterialMapping.cs @@ -17,19 +17,19 @@ namespace CATHODE.Assets */ public class MaterialMapping : AssetPAK { - List MaterialMappingEntries = new List(); - byte[] FileHeaderJunk = new byte[8]; + List _entries = new List(); + byte[] _headerJunk = new byte[8]; /* Initialise the MaterialMapPAK class with the intended location (existing or not) */ public MaterialMapping(string PathToPAK) { - FilePathPAK = PathToPAK; + _filePathPAK = PathToPAK; } /* Load the contents of an existing MaterialMapPAK */ public override PAKReturnType Load() { - if (!File.Exists(FilePathPAK)) + if (!File.Exists(_filePathPAK)) { return PAKReturnType.FAIL_TRIED_TO_LOAD_VIRTUAL_ARCHIVE; } @@ -37,45 +37,45 @@ public override PAKReturnType Load() try { //Open PAK - BinaryReader ArchiveFile = new BinaryReader(File.OpenRead(FilePathPAK)); + BinaryReader pak = new BinaryReader(File.OpenRead(_filePathPAK)); //Parse header - FileHeaderJunk = ArchiveFile.ReadBytes(8); //TODO: Work out what this contains - int NumberOfFiles = ArchiveFile.ReadInt32(); + _headerJunk = pak.ReadBytes(8); //TODO: Work out what this contains + int entryCount = pak.ReadInt32(); //Parse entries (XML is broken in the build files - doesn't get shipped) - for (int x = 0; x < NumberOfFiles; x++) + for (int x = 0; x < entryCount; x++) { //This entry - EntryMaterialMappingsPAK NewMatEntry = new EntryMaterialMappingsPAK(); - NewMatEntry.MapHeader = ArchiveFile.ReadBytes(4); //TODO: Work out the significance of this value, to be able to construct new PAKs from scratch. - NewMatEntry.MapEntryCoupleCount = ArchiveFile.ReadInt32(); - NewMatEntry.MapJunk = ArchiveFile.ReadBytes(4); //TODO: Work out if this is always null. - for (int p = 0; p < (NewMatEntry.MapEntryCoupleCount * 2) + 1; p++) + EntryMaterialMappingsPAK entry = new EntryMaterialMappingsPAK(); + entry.MapHeader = pak.ReadBytes(4); //TODO: Work out the significance of this value, to be able to construct new PAKs from scratch. + entry.MapEntryCoupleCount = pak.ReadInt32(); + entry.MapJunk = pak.ReadBytes(4); //TODO: Work out if this is always null. + for (int p = 0; p < (entry.MapEntryCoupleCount * 2) + 1; p++) { //String - int NewMatStringLength = ArchiveFile.ReadInt32(); - string NewMatString = ""; - for (int i = 0; i < NewMatStringLength; i++) + int length = pak.ReadInt32(); + string materialString = ""; + for (int i = 0; i < length; i++) { - NewMatString += ArchiveFile.ReadChar(); + materialString += pak.ReadChar(); } //First string is filename, others are materials if (p == 0) { - NewMatEntry.MapFilename = NewMatString; + entry.MapFilename = materialString; } else { - NewMatEntry.MapMatEntries.Add(NewMatString); + entry.MapMatEntries.Add(materialString); } } - MaterialMappingEntries.Add(NewMatEntry); + _entries.Add(entry); } //Done! - ArchiveFile.Close(); + pak.Close(); return PAKReturnType.SUCCESS; } catch (IOException) { return PAKReturnType.FAIL_COULD_NOT_ACCESS_FILE; } @@ -86,7 +86,7 @@ public override PAKReturnType Load() public override List GetFileNames() { List FileNameList = new List(); - foreach (EntryMaterialMappingsPAK MapEntry in MaterialMappingEntries) + foreach (EntryMaterialMappingsPAK MapEntry in _entries) { FileNameList.Add(MapEntry.MapFilename); } @@ -97,7 +97,7 @@ public override List GetFileNames() public override int GetFilesize(string FileName) { int size = 0; - foreach (string MatMap in MaterialMappingEntries[GetFileIndex(FileName)].MapMatEntries) + foreach (string MatMap in _entries[GetFileIndex(FileName)].MapMatEntries) { size += MatMap.Length; } @@ -107,9 +107,9 @@ public override int GetFilesize(string FileName) /* Find the entry object by name */ public override int GetFileIndex(string FileName) { - for (int i = 0; i < MaterialMappingEntries.Count; i++) + for (int i = 0; i < _entries.Count; i++) { - if (MaterialMappingEntries[i].MapFilename == FileName || MaterialMappingEntries[i].MapFilename == FileName.Replace('/', '\\')) + if (_entries[i].MapFilename == FileName || _entries[i].MapFilename == FileName.Replace('/', '\\')) { return i; } @@ -124,7 +124,7 @@ public override PAKReturnType ReplaceFile(string PathToNewFile, string FileName) { //Pull the new mapping info from the import XML XDocument InputFile = XDocument.Load(PathToNewFile); - EntryMaterialMappingsPAK MaterialMapping = MaterialMappingEntries[GetFileIndex(FileName)]; + EntryMaterialMappingsPAK MaterialMapping = _entries[GetFileIndex(FileName)]; List NewOverrides = new List(); foreach (XElement ThisMap in InputFile.Element("material_mappings").Elements()) { @@ -155,7 +155,7 @@ public override PAKReturnType ExportFile(string PathToExport, string FileName) XElement MaterialPair = XElement.Parse(""); int ThisEntryNum = 0; - EntryMaterialMappingsPAK ThisEntry = MaterialMappingEntries[GetFileIndex(FileName)]; + EntryMaterialMappingsPAK ThisEntry = _entries[GetFileIndex(FileName)]; for (int i = 0; i < ThisEntry.MapEntryCoupleCount; i++) { for (int x = 0; x < 2; x++) @@ -191,24 +191,24 @@ public override PAKReturnType Save() try { //Re-write out to the PAK - BinaryWriter ArchiveWriter = new BinaryWriter(File.OpenWrite(FilePathPAK)); - ArchiveWriter.BaseStream.SetLength(0); - ArchiveWriter.Write(FileHeaderJunk); - ArchiveWriter.Write(MaterialMappingEntries.Count); - foreach (EntryMaterialMappingsPAK ThisMatRemap in MaterialMappingEntries) + BinaryWriter pak = new BinaryWriter(File.OpenWrite(_filePathPAK)); + pak.BaseStream.SetLength(0); + pak.Write(_headerJunk); + pak.Write(_entries.Count); + foreach (EntryMaterialMappingsPAK entry in _entries) { - ArchiveWriter.Write(ThisMatRemap.MapHeader); - ArchiveWriter.Write(ThisMatRemap.MapEntryCoupleCount); - ArchiveWriter.Write(ThisMatRemap.MapJunk); - ArchiveWriter.Write(ThisMatRemap.MapFilename.Length); - ExtraBinaryUtils.WriteString(ThisMatRemap.MapFilename, ArchiveWriter); - foreach (string MaterialName in ThisMatRemap.MapMatEntries) + pak.Write(entry.MapHeader); + pak.Write(entry.MapEntryCoupleCount); + pak.Write(entry.MapJunk); + pak.Write(entry.MapFilename.Length); + ExtraBinaryUtils.WriteString(entry.MapFilename, pak); + foreach (string name in entry.MapMatEntries) { - ArchiveWriter.Write(MaterialName.Length); - ExtraBinaryUtils.WriteString(MaterialName, ArchiveWriter); + pak.Write(name.Length); + ExtraBinaryUtils.WriteString(name, pak); } } - ArchiveWriter.Close(); + pak.Close(); return PAKReturnType.SUCCESS; } diff --git a/CathodeLib/Scripts/AssetPAKs/Handlers/Models.cs b/CathodeLib/Scripts/AssetPAKs/Handlers/Models.cs index 354c282..140a843 100644 --- a/CathodeLib/Scripts/AssetPAKs/Handlers/Models.cs +++ b/CathodeLib/Scripts/AssetPAKs/Handlers/Models.cs @@ -1,6 +1,9 @@ using System; +using System.Buffers.Binary; using System.Collections.Generic; using System.IO; +using System.Linq; +using System.Runtime.InteropServices; using CathodeLib; namespace CATHODE.Assets @@ -14,139 +17,120 @@ namespace CATHODE.Assets */ public class Models : AssetPAK { - List ModelEntries = new List(); - int TableCountPt1 = -1; - int TableCountPt2 = -1; - int FilenameListEnd = -1; - int HeaderListEnd = -1; - public int _hle { get { return HeaderListEnd; } } //Exposing this for testing purposes + List _metadata = new List(); + List _vertexFormats = new List(); + + public List _filePaths; + public List _partNames; /* Initialise the ModelPAK class with the intended location (existing or not) */ public Models(string PathToPAK) { - FilePathPAK = PathToPAK; - FilePathBIN = FilePathPAK.Substring(0, FilePathPAK.Length - Path.GetFileName(FilePathPAK).Length) + "MODELS_" + Path.GetFileName(FilePathPAK).Substring(0, Path.GetFileName(FilePathPAK).Length - 11) + ".BIN"; + _filePathPAK = PathToPAK; + _filePathBIN = _filePathPAK.Substring(0, _filePathPAK.Length - Path.GetFileName(_filePathPAK).Length) + "MODELS_" + Path.GetFileName(_filePathPAK).Substring(0, Path.GetFileName(_filePathPAK).Length - 11) + ".BIN"; } /* Load the contents of an existing ModelPAK */ public override PAKReturnType Load() { - if (!File.Exists(FilePathPAK)) + if (!File.Exists(_filePathPAK)) { return PAKReturnType.FAIL_TRIED_TO_LOAD_VIRTUAL_ARCHIVE; } - /* TODO: Verify the PAK loading is a ModelPAK by BIN version number */ - try - { - //First, parse the MTL file to find material info - string PathToMTL = FilePathPAK.Substring(0, FilePathPAK.Length - 3) + "MTL"; - BinaryReader ArchiveFileMtl = new BinaryReader(File.OpenRead(PathToMTL)); - - //Header - ArchiveFileMtl.BaseStream.Position += 40; //There are some knowns here, just not required for us yet - int MaterialEntryCount = ArchiveFileMtl.ReadInt16(); - ArchiveFileMtl.BaseStream.Position += 2; //Skip unknown - - //Strings - more work will be done on materials eventually, - //but taking their names for now is good enough for model export - List MaterialEntries = new List(); - string ThisMaterialString = ""; - for (int i = 0; i < MaterialEntryCount; i++) - { - while (true) - { - byte ThisByte = ArchiveFileMtl.ReadByte(); - if (ThisByte == 0x00) - { - MaterialEntries.Add(ThisMaterialString); - ThisMaterialString = ""; - break; - } - ThisMaterialString += (char)ThisByte; - } - } - ArchiveFileMtl.Close(); - - //Read the header info from BIN - BinaryReader ArchiveFileBin = new BinaryReader(File.OpenRead(FilePathBIN)); - ArchiveFileBin.BaseStream.Position += 4; //Skip magic - TableCountPt2 = ArchiveFileBin.ReadInt32(); - ArchiveFileBin.BaseStream.Position += 4; //Skip unknown - TableCountPt1 = ArchiveFileBin.ReadInt32(); - - //Skip past table 1 - for (int i = 0; i < TableCountPt1; i++) - { - byte ThisByte = 0x00; - while (ThisByte != 0xFF) - { - ThisByte = ArchiveFileBin.ReadByte(); - } + { + #region MODEL_BIN + //Read the header info from BIN + BinaryReader bin = new BinaryReader(File.OpenRead(_filePathBIN)); + bin.BaseStream.Position += 4; //Magic + int modelCount = bin.ReadInt32(); + bin.BaseStream.Position += 4; //Unknown + int vbfCount = bin.ReadInt32(); + + //Read all vertex buffer formats + _vertexFormats = new List(vbfCount); + for (int EntryIndex = 0; EntryIndex < vbfCount; ++EntryIndex) + { + long startPos = bin.BaseStream.Position; + int count = 1; + while (bin.ReadByte() != 0xFF) + { + bin.BaseStream.Position += Marshal.SizeOf(typeof(AlienVBFE)) - 1; + count++; + } + bin.BaseStream.Position = startPos; + + AlienVBF VertexInput = new AlienVBF(); + VertexInput.ElementCount = count; + VertexInput.Elements = CathodeLib.Utilities.ConsumeArray(bin, VertexInput.ElementCount).ToList(); + _vertexFormats.Add(VertexInput); } - ArchiveFileBin.BaseStream.Position += 23; - - //Read file list info - FilenameListEnd = ArchiveFileBin.ReadInt32(); - int FilenameListStart = (int)ArchiveFileBin.BaseStream.Position; - - //Read all file names (bytes) - byte[] filename_bytes = ArchiveFileBin.ReadBytes(FilenameListEnd); - - //Read table 2 (skipping all unknowns for now) - for (int i = 0; i < TableCountPt2; i++) - { - CS2 new_entry = new CS2(); - new_entry.FilenameOffset = ArchiveFileBin.ReadInt32(); - new_entry.Filename = ExtraBinaryUtils.GetStringFromByteArray(filename_bytes, new_entry.FilenameOffset); - ArchiveFileBin.BaseStream.Position += 4; - new_entry.ModelPartNameOffset = ArchiveFileBin.ReadInt32(); - new_entry.ModelPartName = ExtraBinaryUtils.GetStringFromByteArray(filename_bytes, new_entry.ModelPartNameOffset); - ArchiveFileBin.BaseStream.Position += 44; - new_entry.MaterialLibaryIndex = ArchiveFileBin.ReadInt32(); - new_entry.MaterialName = MaterialEntries[new_entry.MaterialLibaryIndex]; - ArchiveFileBin.BaseStream.Position += 8; - new_entry.BlockSize = ArchiveFileBin.ReadInt32(); - ArchiveFileBin.BaseStream.Position += 14; - new_entry.ScaleFactor = ArchiveFileBin.ReadInt16(); //Maybe? - ArchiveFileBin.BaseStream.Position += 2; - new_entry.VertCount = ArchiveFileBin.ReadInt16(); - new_entry.FaceCount = ArchiveFileBin.ReadInt16(); - new_entry.BoneCount = ArchiveFileBin.ReadInt16(); - ModelEntries.Add(new_entry); - } - ArchiveFileBin.Close(); - - //Get extra info from each header in the PAK - BinaryReader ArchiveFile = new BinaryReader(File.OpenRead(FilePathPAK)); - ArchiveFile.BaseStream.Position += 32; //Skip header - for (int i = 0; i < TableCountPt2; i++) - { - ArchiveFile.BaseStream.Position += 8; //Skip unknowns - int ThisPakSize = BigEndianUtils.ReadInt32(ArchiveFile); - if (ThisPakSize != BigEndianUtils.ReadInt32(ArchiveFile)) - { - //Dud entry... handle this somehow? - } - int ThisPakOffset = BigEndianUtils.ReadInt32(ArchiveFile); - ArchiveFile.BaseStream.Position += 14; - int ThisIndex = BigEndianUtils.ReadInt16(ArchiveFile); - ArchiveFile.BaseStream.Position += 12; - - if (ThisIndex == -1) - { - continue; //Again, dud entry. Need to look into this! - } - //Push it into the correct entry - ModelEntries[ThisIndex].PakSize = ThisPakSize; - ModelEntries[ThisIndex].PakOffset = ThisPakOffset; + //Read filename chunk + byte[] filenames = bin.ReadBytes(bin.ReadInt32()); + + //Read all model metadata + _metadata = CathodeLib.Utilities.ConsumeArray(bin, modelCount).ToList(); + + //Fetch filenames from chunk + _filePaths = new List(); + _partNames = new List(); + for (int i = 0; i < _metadata.Count; ++i) + { + _filePaths.Add(CathodeLib.Utilities.ReadString(filenames, _metadata[i].FileNameOffset).Replace('\\', '/')); + _partNames.Add(CathodeLib.Utilities.ReadString(filenames, _metadata[i].ModelPartNameOffset).Replace('\\', '/')); + } + + //Read bone chunk + byte[] BoneBuffer = bin.ReadBytes(bin.ReadInt32()); + //TODO: Parse bone chunk! + + bin.Close(); + #endregion + + #region MODEL_PAK + BinaryReader pak = new BinaryReader(File.OpenRead(_filePathPAK)); + + //Read & check the header info from the PAK + pak.BaseStream.Position += 4; //Skip unused + if ((FileIdentifiers)BigEndianUtils.ReadInt32(pak) != FileIdentifiers.ASSET_FILE) + return PAKReturnType.FAIL_ARCHIVE_IS_NOT_EXCPETED_TYPE; + if ((FileIdentifiers)BigEndianUtils.ReadInt32(pak) != FileIdentifiers.MODEL_DATA) + return PAKReturnType.FAIL_ARCHIVE_IS_NOT_EXCPETED_TYPE; + int EntryCount = BinaryPrimitives.ReverseEndianness(pak.ReadInt32()); + if (BigEndianUtils.ReadInt32(pak) != EntryCount) + return PAKReturnType.FAIL_GENERAL_LOGIC_ERROR; + pak.BaseStream.Position += 12; //Skip unused + + //Get PAK entry information + List lengths = new List(); + for (int i = 0; i < EntryCount; i++) + { + pak.BaseStream.Position += 8; + int Length = BinaryPrimitives.ReverseEndianness(pak.ReadInt32()); + int DataLength = BinaryPrimitives.ReverseEndianness(pak.ReadInt32()); //TODO: Seems to be the aligned version of Length, aligned to 16 bytes. + int Offset = BinaryPrimitives.ReverseEndianness(pak.ReadInt32()); + pak.BaseStream.Position += 12; + int UnknownIndex = BinaryPrimitives.ReverseEndianness(pak.ReadInt16()); + int BINIndex = BinaryPrimitives.ReverseEndianness(pak.ReadInt16()); + pak.BaseStream.Position += 12; + + lengths.Add(DataLength); + } + + //Pull all content from PAK + List content = new List(); + foreach (int length in lengths) + { + if (length == -1) + content.Add(new byte[] { }); + else + content.Add(pak.ReadBytes(length)); } - HeaderListEnd = (int)ArchiveFile.BaseStream.Position; + pak.Close(); + #endregion - //Done! - ArchiveFile.Close(); return PAKReturnType.SUCCESS; } catch (IOException) { return PAKReturnType.FAIL_COULD_NOT_ACCESS_FILE; } @@ -156,55 +140,71 @@ public override PAKReturnType Load() /* Return a list of filenames for files in the ModelPAK archive */ public override List GetFileNames() { - List FileNameList = new List(); - foreach (CS2 ModelEntry in ModelEntries) - { - if (!FileNameList.Contains(ModelEntry.Filename)) - { - FileNameList.Add(ModelEntry.Filename); - } + List combinedFilenames = new List(); + for (int i = 0; i < _filePaths.Count; i++) + { + if (combinedFilenames.Contains(_filePaths[i])) continue; + combinedFilenames.Add(_filePaths[i]); } - return FileNameList; + return combinedFilenames; } /* Get all CS2s (added for cross-ref support in OpenCAGE with CommandsPAK) */ - public List GetCS2s() - { - return ModelEntries; - } + //public List GetCS2s() + //{ + // return _metadata; + //} - /* Get entry by index (added for cross-ref support in OpenCAGE with CommandsPAK) */ + /* TEMP TEMP TEMP!!! */ public CS2 GetModelByIndex(int index) { - if (index < 0 || index >= ModelEntries.Count) return null; - return ModelEntries[index]; + if (index < 0 || index >= _metadata.Count) return new CS2(); + return _metadata[index]; + } + public string GetModelNameByIndex(int index) + { + if (index < 0 || index >= _metadata.Count) return ""; + return _filePaths[index]; + } + public string GetModelSubmeshNameByIndex(int index) + { + if (index < 0 || index >= _metadata.Count) return ""; + return _partNames[index]; } /* Get the selected model's submeshes and add up their sizes */ public override int GetFilesize(string FileName) - { - int TotalSize = 0; - foreach (CS2 ThisModel in ModelEntries) - { - if (ThisModel.Filename == FileName.Replace("/", "\\")) - { - TotalSize += ThisModel.PakSize; - } - } - return TotalSize; + { + //TODO: Need to look up by filepath and part name! + + //int TotalSize = 0; + //foreach (CS2 ThisModel in _metadata) + //{ + // if (ThisModel.Filename == FileName.Replace("/", "\\")) + // { + // TotalSize += ThisModel.PakSize; + // } + //} + //return TotalSize; + + return -1; } /* Find the model entry object by name */ public override int GetFileIndex(string FileName) { - for (int i = 0; i < ModelEntries.Count; i++) - { - if (ModelEntries[i].Filename == FileName || ModelEntries[i].Filename == FileName.Replace('/', '\\')) - { - return i; - } - } - throw new Exception("Could not find the requested file in ModelPAK!"); + //TODO: Need to look up by filepath and part name! + + //for (int i = 0; i < _metadata.Count; i++) + //{ + // if (_metadata[i].Filename == FileName || _metadata[i].Filename == FileName.Replace('/', '\\')) + // { + // return i; + // } + //} + //throw new Exception("Could not find the requested file in ModelPAK!"); + + return -1; } /* Export an existing file from the ModelPAK archive */ @@ -214,9 +214,10 @@ public override PAKReturnType ExportFile(string PathToExport, string FileName) try { + /* //Get the selected model's submeshes List ModelSubmeshes = new List(); - foreach (CS2 ThisModel in ModelEntries) + foreach (CS2 ThisModel in _metadata) { if (ThisModel.Filename == FileName.Replace("/", "\\")) { @@ -226,7 +227,7 @@ public override PAKReturnType ExportFile(string PathToExport, string FileName) //Extract each submesh into a CS2 folder by material and submesh name Directory.CreateDirectory(PathToExport); - BinaryReader ArchiveFile = new BinaryReader(File.OpenRead(FilePathPAK)); + BinaryReader ArchiveFile = new BinaryReader(File.OpenRead(_filePathPAK)); foreach (CS2 Submesh in ModelSubmeshes) { ArchiveFile.BaseStream.Position = HeaderListEnd + Submesh.PakOffset; @@ -240,7 +241,7 @@ public override PAKReturnType ExportFile(string PathToExport, string FileName) File.WriteAllBytes(ThisExportPath + "/" + Submesh.MaterialName, ArchiveFile.ReadBytes(Submesh.PakSize)); } ArchiveFile.Close(); - + */ //Done! return PAKReturnType.SUCCESS; } diff --git a/CathodeLib/Scripts/AssetPAKs/Handlers/PAK2.cs b/CathodeLib/Scripts/AssetPAKs/Handlers/PAK2.cs index 5320a79..a516018 100644 --- a/CathodeLib/Scripts/AssetPAKs/Handlers/PAK2.cs +++ b/CathodeLib/Scripts/AssetPAKs/Handlers/PAK2.cs @@ -13,20 +13,18 @@ namespace CATHODE.Assets */ public class PAK2 : AssetPAK { - private List Pak2Files = new List(); - private int OffsetListBegin = -1; - private int NumberOfEntries = -1; + private List _entries = new List(); /* Initialise the PAK2 class with the intended PAK2 location (existing or not) */ public PAK2(string PathToPAK) { - FilePathPAK = PathToPAK; + _filePathPAK = PathToPAK; } /* Load the contents of an existing PAK2 */ public override PAKReturnType Load() { - if (!File.Exists(FilePathPAK)) + if (!File.Exists(_filePathPAK)) { return PAKReturnType.FAIL_TRIED_TO_LOAD_VIRTUAL_ARCHIVE; } @@ -34,18 +32,18 @@ public override PAKReturnType Load() try { //Open PAK - BinaryReader ArchiveFile = new BinaryReader(File.OpenRead(FilePathPAK)); + BinaryReader ArchiveFile = new BinaryReader(File.OpenRead(_filePathPAK)); //Read the header info string MagicValidation = ""; for (int i = 0; i < 4; i++) { MagicValidation += ArchiveFile.ReadChar(); } if (MagicValidation != "PAK2") { ArchiveFile.Close(); return PAKReturnType.FAIL_ARCHIVE_IS_NOT_EXCPETED_TYPE; } - OffsetListBegin = ArchiveFile.ReadInt32() + 16; - NumberOfEntries = ArchiveFile.ReadInt32(); + int offsetListBegin = ArchiveFile.ReadInt32() + 16; + int entryCount = ArchiveFile.ReadInt32(); ArchiveFile.BaseStream.Position += 4; //Skip "4" //Read all file names and create entries - for (int i = 0; i < NumberOfEntries; i++) + for (int i = 0; i < entryCount; i++) { string ThisFileName = ""; for (byte b; (b = ArchiveFile.ReadByte()) != 0x00;) @@ -55,24 +53,24 @@ public override PAKReturnType Load() EntryPAK2 NewPakFile = new EntryPAK2(); NewPakFile.Filename = ThisFileName; - Pak2Files.Add(NewPakFile); + _entries.Add(NewPakFile); } //Read all file offsets - ArchiveFile.BaseStream.Position = OffsetListBegin; + ArchiveFile.BaseStream.Position = offsetListBegin; List FileOffsets = new List(); - FileOffsets.Add(OffsetListBegin + (NumberOfEntries * 4)); - for (int i = 0; i < NumberOfEntries; i++) + FileOffsets.Add(offsetListBegin + (entryCount * 4)); + for (int i = 0; i < entryCount; i++) { FileOffsets.Add(ArchiveFile.ReadInt32()); - Pak2Files[i].Offset = FileOffsets[i]; + _entries[i].Offset = FileOffsets[i]; } //Read in the files to entries - for (int i = 0; i < NumberOfEntries; i++) + for (int i = 0; i < entryCount; i++) { //Must pass to RemoveLeadingNulls as each file starts with 0-3 null bytes to align files to a 4-byte block reader - Pak2Files[i].Content = ExtraBinaryUtils.RemoveLeadingNulls(ArchiveFile.ReadBytes(FileOffsets[i + 1] - FileOffsets[i])); + _entries[i].Content = ExtraBinaryUtils.RemoveLeadingNulls(ArchiveFile.ReadBytes(FileOffsets[i + 1] - FileOffsets[i])); } //Close PAK @@ -87,7 +85,7 @@ public override PAKReturnType Load() public override List GetFileNames() { List FileNameList = new List(); - foreach (EntryPAK2 ArchiveFile in Pak2Files) + foreach (EntryPAK2 ArchiveFile in _entries) { FileNameList.Add(ArchiveFile.Filename); } @@ -97,15 +95,15 @@ public override List GetFileNames() /* Get the file size of an archive entry */ public override int GetFilesize(string FileName) { - return Pak2Files[GetFileIndex(FileName)].Content.Length; + return _entries[GetFileIndex(FileName)].Content.Length; } /* Find the a file entry object by name */ public override int GetFileIndex(string FileName) { - for (int i = 0; i < Pak2Files.Count; i++) + for (int i = 0; i < _entries.Count; i++) { - if (Pak2Files[i].Filename == FileName || Pak2Files[i].Filename == FileName.Replace('/', '\\')) + if (_entries[i].Filename == FileName || _entries[i].Filename == FileName.Replace('/', '\\')) { return i; } @@ -122,7 +120,7 @@ public override PAKReturnType AddFile(string PathToNewFile, int TrimFromPath = 0 if (TrimFromPath == 0) { NewFile.Filename = Path.GetFileName(PathToNewFile).ToUpper(); } //Virtual directory support here would be nice too else { NewFile.Filename = PathToNewFile.Substring(TrimFromPath).ToUpper(); } //Easy to fail here, so be careful on function usage! NewFile.Content = File.ReadAllBytes(PathToNewFile); - Pak2Files.Add(NewFile); + _entries.Add(NewFile); return PAKReturnType.SUCCESS; } catch (IOException) { return PAKReturnType.FAIL_COULD_NOT_ACCESS_FILE; } @@ -134,7 +132,7 @@ public override PAKReturnType DeleteFile(string FileName) { try { - Pak2Files.RemoveAt(GetFileIndex(FileName)); + _entries.RemoveAt(GetFileIndex(FileName)); return PAKReturnType.SUCCESS; } catch @@ -148,7 +146,7 @@ public override PAKReturnType ReplaceFile(string PathToNewFile, string FileName) { try { - Pak2Files[GetFileIndex(FileName)].Content = File.ReadAllBytes(PathToNewFile); + _entries[GetFileIndex(FileName)].Content = File.ReadAllBytes(PathToNewFile); return PAKReturnType.SUCCESS; } catch (IOException) { return PAKReturnType.FAIL_COULD_NOT_ACCESS_FILE; } @@ -160,7 +158,7 @@ public override PAKReturnType ExportFile(string PathToExport, string FileName) { try { - File.WriteAllBytes(PathToExport, Pak2Files[GetFileIndex(FileName)].Content); + File.WriteAllBytes(PathToExport, _entries[GetFileIndex(FileName)].Content); return PAKReturnType.SUCCESS; } catch (IOException) { return PAKReturnType.FAIL_COULD_NOT_ACCESS_FILE; } @@ -174,57 +172,57 @@ public override PAKReturnType Save() { //Open/create PAK2 for writing BinaryWriter ArchiveFileWrite; - if (File.Exists(FilePathPAK)) + if (File.Exists(_filePathPAK)) { - ArchiveFileWrite = new BinaryWriter(File.OpenWrite(FilePathPAK)); + ArchiveFileWrite = new BinaryWriter(File.OpenWrite(_filePathPAK)); ArchiveFileWrite.BaseStream.SetLength(0); } else { - ArchiveFileWrite = new BinaryWriter(File.Create(FilePathPAK)); + ArchiveFileWrite = new BinaryWriter(File.Create(_filePathPAK)); } //Write header ExtraBinaryUtils.WriteString("PAK2", ArchiveFileWrite); int OffsetListBegin_New = 0; - for (int i = 0; i < Pak2Files.Count; i++) + for (int i = 0; i < _entries.Count; i++) { - OffsetListBegin_New += Pak2Files[i].Filename.Length + 1; + OffsetListBegin_New += _entries[i].Filename.Length + 1; } ArchiveFileWrite.Write(OffsetListBegin_New); - ArchiveFileWrite.Write(Pak2Files.Count); + ArchiveFileWrite.Write(_entries.Count); ArchiveFileWrite.Write(4); //Write filenames - for (int i = 0; i < Pak2Files.Count; i++) + for (int i = 0; i < _entries.Count; i++) { - ExtraBinaryUtils.WriteString(Pak2Files[i].Filename.Replace("\\", "/"), ArchiveFileWrite); + ExtraBinaryUtils.WriteString(_entries[i].Filename.Replace("\\", "/"), ArchiveFileWrite); ArchiveFileWrite.Write((byte)0x00); } //Write placeholder offsets for now, we'll correct them after writing the content - OffsetListBegin = (int)ArchiveFileWrite.BaseStream.Position; - for (int i = 0; i < Pak2Files.Count; i++) + int offsetListBegin = (int)ArchiveFileWrite.BaseStream.Position; + for (int i = 0; i < _entries.Count; i++) { ArchiveFileWrite.Write(0); } //Write files - for (int i = 0; i < Pak2Files.Count; i++) + for (int i = 0; i < _entries.Count; i++) { while (ArchiveFileWrite.BaseStream.Position % 4 != 0) { ArchiveFileWrite.Write((byte)0x00); } - ArchiveFileWrite.Write(Pak2Files[i].Content); - Pak2Files[i].Offset = (int)ArchiveFileWrite.BaseStream.Position; + ArchiveFileWrite.Write(_entries[i].Content); + _entries[i].Offset = (int)ArchiveFileWrite.BaseStream.Position; } //Re-write offsets with correct values - ArchiveFileWrite.BaseStream.Position = OffsetListBegin; - for (int i = 0; i < Pak2Files.Count; i++) + ArchiveFileWrite.BaseStream.Position = offsetListBegin; + for (int i = 0; i < _entries.Count; i++) { - ArchiveFileWrite.Write(Pak2Files[i].Offset); + ArchiveFileWrite.Write(_entries[i].Offset); } ArchiveFileWrite.Close(); diff --git a/CathodeLib/Scripts/AssetPAKs/Handlers/Shaders.cs b/CathodeLib/Scripts/AssetPAKs/Handlers/Shaders.cs index b7e9399..403a810 100644 --- a/CathodeLib/Scripts/AssetPAKs/Handlers/Shaders.cs +++ b/CathodeLib/Scripts/AssetPAKs/Handlers/Shaders.cs @@ -1,4 +1,5 @@ -using System; +using CathodeLib; +using System; using System.Collections.Generic; using System.IO; @@ -14,19 +15,22 @@ namespace CATHODE.Assets */ public class Shaders : AssetPAK { - List HeaderDump = new List(); + List _header = new List(); + private string _filePathIdxRemap = ""; /* Initialise the ShaderPAK class with the intended location (existing or not) */ public Shaders(string PathToPAK) { - FilePathPAK = PathToPAK; - FilePathBIN = PathToPAK.Substring(0, PathToPAK.Length - Path.GetFileName(PathToPAK).Length) + Path.GetFileNameWithoutExtension(FilePathPAK) + "_BIN.PAK"; + _filePathPAK = PathToPAK; + string trimmed = PathToPAK.Substring(0, PathToPAK.Length - Path.GetFileName(PathToPAK).Length) + Path.GetFileNameWithoutExtension(_filePathPAK); + _filePathBIN = trimmed + "_BIN.PAK"; + _filePathIdxRemap = trimmed + "_IDX_REMAP.PAK"; } /* Load the contents of an existing ShaderPAK set (massive WIP) */ public override PAKReturnType Load() { - if (!File.Exists(FilePathPAK)) + if (!File.Exists(_filePathPAK)) { return PAKReturnType.FAIL_COULD_NOT_ACCESS_FILE; } @@ -34,19 +38,35 @@ public override PAKReturnType Load() try { //The main PAK is unhandled for now, as I can't work out how the main (initial) PAK relates to the _BIN.PAK. Entry counts are different, and no noticeable indexes! - /* //Open PAK - BinaryReader ArchiveFile = new BinaryReader(File.OpenRead(FilePathPAK)); - ExtraBinaryUtils BinaryUtils = new ExtraBinaryUtils(); - - //Read shader headers + BinaryReader pak = new BinaryReader(File.OpenRead(_filePathPAK)); + + //Read & check the header info from the PAK + pak.BaseStream.Position += 4; //Skip unused + if ((FileIdentifiers)pak.ReadInt32() != FileIdentifiers.ASSET_FILE) + return PAKReturnType.FAIL_ARCHIVE_IS_NOT_EXCPETED_TYPE; + if ((FileIdentifiers)pak.ReadInt32() != FileIdentifiers.SHADER_DATA) + return PAKReturnType.FAIL_ARCHIVE_IS_NOT_EXCPETED_TYPE; + int pakEntryCount = pak.ReadInt32(); + if (BigEndianUtils.ReadInt32(pak) != pakEntryCount) + return PAKReturnType.FAIL_GENERAL_LOGIC_ERROR; + + //TODO: look at the ios dump, there seems to be a way of working out which is compute/pixel/etc + + /* + //TODO: usually we skip 12 bytes here as this bit is unused, but in shader PAKs it seems 8 bytes are used + + pak.BaseStream.Position += 12; //Skip unused + + + //Read shader headers for (int i = 0; i < NumOfStringPairs; i++) { CathodeShaderHeader newHeaderEntry = new CathodeShaderHeader(); //Get the name (or type) of this header - ArchiveFile.BaseStream.Position += 32; - byte[] entryNameOrType = ArchiveFile.ReadBytes(40); + pak.BaseStream.Position += 32; + byte[] entryNameOrType = pak.ReadBytes(40); for (int x = 0; x < entryNameOrType.Length; x++) { if (entryNameOrType[x] != 0x00) @@ -60,9 +80,9 @@ public override PAKReturnType Load() //Skip over the rest for now just so I can scrape all the names (this needs parsing obvs) for (int x = 0; x < 999999; x++) { - if (ArchiveFile.ReadBytes(4).SequenceEqual(new byte[] { 0xA4, 0xBB, 0x25, 0x77 })) + if (pak.ReadBytes(4).SequenceEqual(new byte[] { 0xA4, 0xBB, 0x25, 0x77 })) { - ArchiveFile.BaseStream.Position -= 4; + pak.BaseStream.Position -= 4; break; } } @@ -71,59 +91,62 @@ public override PAKReturnType Load() } //Done! - ArchiveFile.Close(); */ + pak.Close(); - BinaryReader ArchiveFileBin = new BinaryReader(File.OpenRead(FilePathBIN)); + BinaryReader bin = new BinaryReader(File.OpenRead(_filePathBIN)); - //Validate our header magic (look at _IDX_REMAP as I think this should also be supported) - ArchiveFileBin.BaseStream.Position = 4; - if (!(ArchiveFileBin.ReadInt32() == 14 && ArchiveFileBin.ReadInt32() == 3)) + bin.BaseStream.Position = 4; //skip magic + if ((FileIdentifiers)pak.ReadInt32() != FileIdentifiers.ASSET_FILE) + return PAKReturnType.FAIL_ARCHIVE_IS_NOT_EXCPETED_TYPE; + if ((FileIdentifiers)pak.ReadInt32() != FileIdentifiers.SHADER_DATA) return PAKReturnType.FAIL_ARCHIVE_IS_NOT_EXCPETED_TYPE; //Read entry count from header - ArchiveFileBin.BaseStream.Position = 12; - int EntryCount = ArchiveFileBin.ReadInt32(); - int EndOfHeaders = 0; + int binEntryCount = bin.ReadInt32(); + if (BigEndianUtils.ReadInt32(pak) != binEntryCount) + return PAKReturnType.FAIL_GENERAL_LOGIC_ERROR; + + //TODO: the other info here seems to mirror the extra data used in the other shader PAK which is usually unused //Skip rest of the main header - ArchiveFileBin.BaseStream.Position = 32; + bin.BaseStream.Position = 32; //Pull each entry's individual header - for (int i = 0; i < EntryCount; i++) + for (int i = 0; i < binEntryCount; i++) { CathodeShaderHeader newStringEntry = new CathodeShaderHeader(); - ArchiveFileBin.BaseStream.Position += 8; //skip blanks + bin.BaseStream.Position += 8; //skip blanks - newStringEntry.FileLength = ArchiveFileBin.ReadInt32(); - newStringEntry.FileLengthWithPadding = ArchiveFileBin.ReadInt32(); - newStringEntry.FileOffset = ArchiveFileBin.ReadInt32(); + newStringEntry.FileLength = bin.ReadInt32(); + newStringEntry.FileLengthWithPadding = bin.ReadInt32(); + newStringEntry.FileOffset = bin.ReadInt32(); - ArchiveFileBin.BaseStream.Position += 8; //skip blanks + bin.BaseStream.Position += 8; //skip blanks - newStringEntry.StringPart1 = ArchiveFileBin.ReadBytes(4); - newStringEntry.FileIndex = ArchiveFileBin.ReadInt32(); //potentially actually int8 or int16 not 32 + newStringEntry.StringPart1 = bin.ReadBytes(4); + newStringEntry.FileIndex = bin.ReadInt32(); //potentially actually int8 or int16 not 32 - ArchiveFileBin.BaseStream.Position += 8; //skip blanks + bin.BaseStream.Position += 8; //skip blanks - newStringEntry.StringPart2 = ArchiveFileBin.ReadBytes(4); + newStringEntry.StringPart2 = bin.ReadBytes(4); //TEMP: For now I'm just setting the filename to be the index... need to work out how the _BIN relates to the initial .PAK to get names, etc newStringEntry.FileName = newStringEntry.FileIndex + ".DXBC"; //END OF TEMP - HeaderDump.Add(newStringEntry); + _header.Add(newStringEntry); } - EndOfHeaders = (int)ArchiveFileBin.BaseStream.Position; + int endOfHeaders = (int)bin.BaseStream.Position; //Pull each entry's file content - foreach (CathodeShaderHeader shaderEntry in HeaderDump) + foreach (CathodeShaderHeader shaderEntry in _header) { - ArchiveFileBin.BaseStream.Position = shaderEntry.FileOffset + EndOfHeaders; - shaderEntry.FileContent = ArchiveFileBin.ReadBytes(shaderEntry.FileLength); + bin.BaseStream.Position = shaderEntry.FileOffset + endOfHeaders; + shaderEntry.FileContent = bin.ReadBytes(shaderEntry.FileLength); } - ArchiveFileBin.Close(); + bin.Close(); return PAKReturnType.SUCCESS; } catch (IOException) { return PAKReturnType.FAIL_COULD_NOT_ACCESS_FILE; } @@ -134,7 +157,7 @@ public override PAKReturnType Load() public override List GetFileNames() { List FileNameList = new List(); - foreach (CathodeShaderHeader shaderEntry in HeaderDump) + foreach (CathodeShaderHeader shaderEntry in _header) { FileNameList.Add(shaderEntry.FileName); } @@ -144,15 +167,15 @@ public override List GetFileNames() /* Get the size of the requested shader (not yet implemented) */ public override int GetFilesize(string FileName) { - return HeaderDump[GetFileIndex(FileName)].FileLength; + return _header[GetFileIndex(FileName)].FileLength; } /* Find the shader entry object by name (not yet implemented) */ public override int GetFileIndex(string FileName) { - for (int i = 0; i < HeaderDump.Count; i++) + for (int i = 0; i < _header.Count; i++) { - if (HeaderDump[i].FileName == FileName) + if (_header[i].FileName == FileName) { return i; } @@ -165,7 +188,7 @@ public override PAKReturnType ExportFile(string PathToExport, string FileName) { try { - File.WriteAllBytes(PathToExport, HeaderDump[GetFileIndex(FileName)].FileContent); + File.WriteAllBytes(PathToExport, _header[GetFileIndex(FileName)].FileContent); return PAKReturnType.SUCCESS; } catch (IOException) { return PAKReturnType.FAIL_COULD_NOT_ACCESS_FILE; } diff --git a/CathodeLib/Scripts/AssetPAKs/Handlers/Textures.cs b/CathodeLib/Scripts/AssetPAKs/Handlers/Textures.cs index ee0ae4d..3874285 100644 --- a/CathodeLib/Scripts/AssetPAKs/Handlers/Textures.cs +++ b/CathodeLib/Scripts/AssetPAKs/Handlers/Textures.cs @@ -1,7 +1,7 @@ -using System; +using CathodeLib; +using System; using System.Collections.Generic; using System.IO; -using CathodeLib; namespace CATHODE.Assets { @@ -14,141 +14,158 @@ namespace CATHODE.Assets */ public class Textures : AssetPAK { - private List TextureEntries = new List(); + private List _entries = new List(); private int HeaderListBeginBIN = -1; - private int HeaderListEndPAK = -1; private int NumberOfEntriesPAK = -1; private int NumberOfEntriesBIN = -1; - private int VersionNumber_BIN = 45; - private int VersionNumber_PAK = 14; /* Initialise the TexturePAK class with the intended location (existing or not) */ public Textures(string PathToPAK) { - FilePathPAK = PathToPAK; + _filePathPAK = PathToPAK; - if (Path.GetFileName(FilePathPAK).Substring(0, 5).ToUpper() == "LEVEL") + if (Path.GetFileName(_filePathPAK).Substring(0, 5).ToUpper() == "LEVEL") { - FilePathBIN = FilePathPAK.Substring(0, FilePathPAK.Length - Path.GetFileName(FilePathPAK).Length) + "LEVEL_TEXTURE_HEADERS.ALL.BIN"; + _filePathBIN = _filePathPAK.Substring(0, _filePathPAK.Length - Path.GetFileName(_filePathPAK).Length) + "LEVEL_TEXTURE_HEADERS.ALL.BIN"; } else { - FilePathBIN = FilePathPAK.Substring(0, FilePathPAK.Length - Path.GetFileName(FilePathPAK).Length) + "GLOBAL_TEXTURES_HEADERS.ALL.BIN"; + _filePathBIN = _filePathPAK.Substring(0, _filePathPAK.Length - Path.GetFileName(_filePathPAK).Length) + "GLOBAL_TEXTURES_HEADERS.ALL.BIN"; } } /* Load the contents of an existing TexturePAK */ public override PAKReturnType Load() { - if (!File.Exists(FilePathPAK)) + if (!File.Exists(_filePathPAK)) { return PAKReturnType.FAIL_TRIED_TO_LOAD_VIRTUAL_ARCHIVE; } try - { - /* First, parse the BIN and pull ALL info from it */ - BinaryReader ArchiveFileBin = new BinaryReader(File.OpenRead(FilePathBIN)); + { + #region TEXTURE_BIN + /* First, parse the BIN and pull ALL info from it */ + BinaryReader bin = new BinaryReader(File.OpenRead(_filePathBIN)); //Read the header info from the BIN - VersionNumber_BIN = ArchiveFileBin.ReadInt32(); - if (VersionNumber_BIN != 45) { return PAKReturnType.FAIL_ARCHIVE_IS_NOT_EXCPETED_TYPE; } //BIN version number is 45 for textures - NumberOfEntriesBIN = ArchiveFileBin.ReadInt32(); - HeaderListBeginBIN = ArchiveFileBin.ReadInt32(); + if ((FileIdentifiers)bin.ReadInt32() != FileIdentifiers.TEXTURE_DATA) + return PAKReturnType.FAIL_ARCHIVE_IS_NOT_EXCPETED_TYPE; + NumberOfEntriesBIN = bin.ReadInt32(); + HeaderListBeginBIN = bin.ReadInt32(); - //Read all file names from BIN - string ThisFileName = ""; + //Read all file names from BIN and create texture entry for (int i = 0; i < NumberOfEntriesBIN; i++) { - ThisFileName = ""; - for (byte b; (b = ArchiveFileBin.ReadByte()) != 0x00;) - { - ThisFileName += (char)b; - } - if (Path.GetExtension(ThisFileName).ToUpper() != ".DDS") - { - ThisFileName += ".dds"; - } - //Create texture entry and add filename TEX4 TextureEntry = new TEX4(); - TextureEntry.FileName = ThisFileName; - TextureEntries.Add(TextureEntry); + TextureEntry.FileName = CathodeLib.Utilities.ReadString(bin); + //TODO: maybe we should stop doing this & just do in AlienPAK instead + if (Path.GetExtension(TextureEntry.FileName).ToUpper() != ".DDS") + TextureEntry.FileName += ".dds"; + _entries.Add(TextureEntry); } //Read the texture headers from the BIN - ArchiveFileBin.BaseStream.Position = HeaderListBeginBIN + 12; + bin.BaseStream.Position = HeaderListBeginBIN + 12; for (int i = 0; i < NumberOfEntriesBIN; i++) { - TextureEntries[i].HeaderPos = (int)ArchiveFileBin.BaseStream.Position; - for (int x = 0; x < 4; x++) { TextureEntries[i].Magic += ArchiveFileBin.ReadChar(); } - TextureEntries[i].Format = (TextureFormat)ArchiveFileBin.ReadInt32(); - TextureEntries[i].Length_V2 = ArchiveFileBin.ReadInt32(); - TextureEntries[i].Length_V1 = ArchiveFileBin.ReadInt32(); - TextureEntries[i].Texture_V1.Width = ArchiveFileBin.ReadInt16(); - TextureEntries[i].Texture_V1.Height = ArchiveFileBin.ReadInt16(); - TextureEntries[i].Unk_V1 = ArchiveFileBin.ReadInt16(); - TextureEntries[i].Texture_V2.Width = ArchiveFileBin.ReadInt16(); - TextureEntries[i].Texture_V2.Height = ArchiveFileBin.ReadInt16(); - TextureEntries[i].Unk_V2 = ArchiveFileBin.ReadInt16(); - TextureEntries[i].UnknownHeaderBytes = ArchiveFileBin.ReadBytes(20); + bin.BaseStream.Position += 4; //TEX4 magic + _entries[i].Format = (TextureFormat)bin.ReadInt32(); + _entries[i].tex_HighRes.Length = bin.ReadInt32(); + _entries[i].tex_LowRes.Length = bin.ReadInt32(); + _entries[i].tex_LowRes.Width = bin.ReadInt16(); + _entries[i].tex_LowRes.Height = bin.ReadInt16(); + _entries[i].tex_HighRes.Depth = bin.ReadInt16(); + _entries[i].tex_HighRes.Width = bin.ReadInt16(); + _entries[i].tex_HighRes.Height = bin.ReadInt16(); + _entries[i].tex_HighRes.Depth = bin.ReadInt16(); + _entries[i].tex_LowRes.MipLevels = bin.ReadInt16(); + _entries[i].tex_HighRes.MipLevels = bin.ReadInt16(); + _entries[i].Type = bin.ReadInt32(); + _entries[i].UnknownTexThing = (AlienUnknownTextureThing)bin.ReadInt16(); + bin.BaseStream.Position += 2; //Always 2048 + bin.BaseStream.Position += 4; //Skip filename offset value + bin.BaseStream.Position += 4; //Skip unused } - + bin.Close(); + #endregion + + #region TEXTURE_PAK /* Second, parse the PAK and pull ONLY header info from it - we'll pull textures when requested (to save memory) */ - ArchiveFileBin.Close(); - BinaryReader ArchiveFile = new BinaryReader(File.OpenRead(FilePathPAK)); - - //Read the header info from the PAK - ArchiveFile.BaseStream.Position += 4; //Skip nulls - VersionNumber_PAK = BigEndianUtils.ReadInt32(ArchiveFile); - if (BigEndianUtils.ReadInt32(ArchiveFile) != VersionNumber_BIN) { throw new Exception("Archive version mismatch!"); } - NumberOfEntriesPAK = BigEndianUtils.ReadInt32(ArchiveFile); - if (BigEndianUtils.ReadInt32(ArchiveFile) != NumberOfEntriesPAK) { throw new Exception("PAK entry count mismatch!"); } - ArchiveFile.BaseStream.Position += 12; //Skip unknowns (1,1,1) - + BinaryReader pak = new BinaryReader(File.OpenRead(_filePathPAK)); + + //Read & check the header info from the PAK + pak.BaseStream.Position += 4; //Skip unused + if ((FileIdentifiers)BigEndianUtils.ReadInt32(pak) != FileIdentifiers.ASSET_FILE) + return PAKReturnType.FAIL_ARCHIVE_IS_NOT_EXCPETED_TYPE; + if ((FileIdentifiers)BigEndianUtils.ReadInt32(pak) != FileIdentifiers.TEXTURE_DATA) + return PAKReturnType.FAIL_ARCHIVE_IS_NOT_EXCPETED_TYPE; + NumberOfEntriesPAK = BigEndianUtils.ReadInt32(pak); + if (BigEndianUtils.ReadInt32(pak) != NumberOfEntriesPAK) + return PAKReturnType.FAIL_GENERAL_LOGIC_ERROR; + pak.BaseStream.Position += 12; //Skip unused + //Read the texture headers from the PAK - int OffsetTracker = (NumberOfEntriesPAK * 48) + 32; for (int i = 0; i < NumberOfEntriesPAK; i++) { - //Header indexes are out of order, so optimise replacements by saving position - int HeaderPosition = (int)ArchiveFile.BaseStream.Position; - - //Pull the entry info - byte[] UnknownHeaderLead = ArchiveFile.ReadBytes(8); - int PartLength = BigEndianUtils.ReadInt32(ArchiveFile); - if (PartLength != BigEndianUtils.ReadInt32(ArchiveFile)) { continue; } - byte[] UnknownHeaderTrail_1 = ArchiveFile.ReadBytes(18); - - //Find the entry - TEX4 TextureEntry = TextureEntries[BigEndianUtils.ReadInt16(ArchiveFile)]; - TEX4_Part TexturePart = (!TextureEntry.Texture_V1.Saved) ? TextureEntry.Texture_V1 : TextureEntry.Texture_V2; - + pak.BaseStream.Position += 8; //Skip unused + + int length = BigEndianUtils.ReadInt32(pak); + if (length != BigEndianUtils.ReadInt32(pak)) { return PAKReturnType.FAIL_GENERAL_LOGIC_ERROR; } + + int offset = BigEndianUtils.ReadInt32(pak); + + pak.BaseStream.Position += 2; //Skip unused + + int isHighRes = BigEndianUtils.ReadInt16(pak); + + pak.BaseStream.Position += 2; //Skip unused + + int val256 = BigEndianUtils.ReadInt16(pak); //always 256 + if (val256 != 256) { return PAKReturnType.FAIL_GENERAL_LOGIC_ERROR; } + + UInt32 unk1 = BigEndianUtils.ReadUInt32(pak); + UInt16 unk2 = BigEndianUtils.ReadUInt16(pak); + + int index = BigEndianUtils.ReadInt16(pak); + + pak.BaseStream.Position += 4; //Skip unused + + UInt32 unk3 = BigEndianUtils.ReadUInt32(pak); + UInt32 unk4 = BigEndianUtils.ReadUInt32(pak); + + //Find the entry + TEX4_Part texFullRes = (isHighRes == 1) ? _entries[index].tex_HighRes : _entries[index].tex_LowRes; + if (length != texFullRes.Length) { return PAKReturnType.FAIL_GENERAL_LOGIC_ERROR; } + //Write out the info - TexturePart.HeaderPos = HeaderPosition; - TexturePart.StartPos = OffsetTracker; - TexturePart.UnknownHeaderLead = UnknownHeaderLead; - TexturePart.Length = PartLength; - TexturePart.Saved = true; - TexturePart.UnknownHeaderTrail_1 = UnknownHeaderTrail_1; - TexturePart.UnknownHeaderTrail_2 = ArchiveFile.ReadBytes(12); - - //Keep file offset updated - OffsetTracker += TexturePart.Length; + texFullRes.Offset = offset; + texFullRes.unk1 = unk1; + texFullRes.unk2 = unk2; + texFullRes.unk3 = unk3; + texFullRes.unk4 = unk4; } - HeaderListEndPAK = (int)ArchiveFile.BaseStream.Position; //Close PAK - ArchiveFile.Close(); + pak.Close(); + #endregion + return PAKReturnType.SUCCESS; } - catch (IOException) { return PAKReturnType.FAIL_COULD_NOT_ACCESS_FILE; } - catch (Exception) { return PAKReturnType.FAIL_UNKNOWN; } + catch (IOException) { + return PAKReturnType.FAIL_COULD_NOT_ACCESS_FILE; + } + catch (Exception e) { + Console.WriteLine(e.ToString()); + return PAKReturnType.FAIL_UNKNOWN; + } } /* Return a list of filenames for files in the TexturePAK archive */ public override List GetFileNames() { List FileNameList = new List(); - foreach (TEX4 ArchiveFile in TextureEntries) + foreach (TEX4 ArchiveFile in _entries) { FileNameList.Add(ArchiveFile.FileName); } @@ -160,24 +177,20 @@ public override int GetFilesize(string FileName) { int FileIndex = GetFileIndex(FileName); if (FileIndex == -1) return -1; //CHANGED FOR OPENCAGE - if (TextureEntries[FileIndex].Texture_V2.Saved) - { - return TextureEntries[FileIndex].Texture_V2.Length + 148; - } - //Fallback to V1 if this texture has no V2 - else if (TextureEntries[FileIndex].Texture_V1.Saved) + if (_entries[FileIndex].tex_HighRes.Length != -1) { - return TextureEntries[FileIndex].Texture_V1.Length + 148; + return _entries[FileIndex].tex_HighRes.Length + 148; } + return _entries[FileIndex].tex_LowRes.Length + 148; throw new Exception("Texture has no size! Fatal logic error."); } /* Find a file entry object by name */ public override int GetFileIndex(string FileName) { - for (int i = 0; i < TextureEntries.Count; i++) + for (int i = 0; i < _entries.Count; i++) { - if (TextureEntries[i].FileName == FileName || TextureEntries[i].FileName == FileName.Replace('/', '\\')) + if (_entries[i].FileName == FileName || _entries[i].FileName == FileName.Replace('/', '\\')) { return i; } @@ -186,95 +199,99 @@ public override int GetFileIndex(string FileName) } /* Replace an existing file in the TexturePAK archive */ + //TODO: THIS FUNCTION DOES NOT CURRENTLY WORK! + // I NEED TO IMPLEMENT PULLING ALL PAK TEXTURE CONTENT, UPDATING WITH NEW, THEN SAVING IT BACK OUT + // CURRENTLY IT ONLY UPDATES HEADERS! public override PAKReturnType ReplaceFile(string PathToNewFile, string FileName) { try { - //Get the texture entry & parse new DDS - int EntryIndex = GetFileIndex(FileName); - if (EntryIndex == -1) return PAKReturnType.FAIL_GENERAL_LOGIC_ERROR; //CHANGED FOR OPENCAGE - TEX4 TextureEntry = TextureEntries[EntryIndex]; - DDSReader NewTexture = new DDSReader(PathToNewFile); - - //Currently we only apply the new texture to the "biggest", some have lower mips that we don't edit (TODO) - TEX4_Part BiggestPart = TextureEntry.Texture_V2; - if (BiggestPart.HeaderPos == -1 || !BiggestPart.Saved) - { - BiggestPart = TextureEntry.Texture_V1; + int index = GetFileIndex(FileName); + if (index == -1) return PAKReturnType.FAIL_GENERAL_LOGIC_ERROR; + + //Update our internal knowledge of the textures + //TODO: update low and high res - take lowest mip of high? + DDSReader newTexture = new DDSReader(PathToNewFile); + TEX4_Part texFullRes = _entries[index].tex_HighRes; + if (texFullRes.Length == 0) + texFullRes = _entries[index].tex_LowRes; + if (texFullRes.Length == 0) + return PAKReturnType.FAIL_GENERAL_LOGIC_ERROR; + texFullRes.Length = (int)newTexture.DataBlock.Length; + texFullRes.Width = (Int16)newTexture.Width; + texFullRes.Height = (Int16)newTexture.Height; + _entries[index].Format = newTexture.Format; + + //Write BIN file + BinaryWriter bin = new BinaryWriter(File.OpenWrite(_filePathBIN)); + bin.BaseStream.SetLength(0); + bin.Write(new byte[] { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }); + for (int i = 0; i < _entries.Count; i++) + { + CathodeLib.Utilities.Write(bin, _entries[i].FileName); //TODO: does this need converting to char array? + bin.Write((byte)0x00); } - if (BiggestPart.HeaderPos == -1 || !BiggestPart.Saved) - { - return PAKReturnType.FAIL_REQUEST_IS_UNSUPPORTED; //Shouldn't reach this. + int binHeaderStart = (int)bin.BaseStream.Position - 12; + int binEntryCount = 0; + for (int i = 0; i < _entries.Count; i++) + { + ExtraBinaryUtils.WriteString("tex4", bin); + bin.Write(BitConverter.GetBytes((int)_entries[i].Format)); + bin.Write(_entries[i].tex_HighRes.Length); + bin.Write(_entries[i].tex_LowRes.Length); + bin.Write(_entries[i].tex_LowRes.Width); + bin.Write(_entries[i].tex_LowRes.Height); + bin.Write(_entries[i].tex_LowRes.Depth); + bin.Write(_entries[i].tex_HighRes.Width); + bin.Write(_entries[i].tex_HighRes.Height); + bin.Write(_entries[i].tex_HighRes.Depth); + bin.Write(_entries[i].Type); + bin.Write((Int16)_entries[i].UnknownTexThing); + bin.Write((Int16)2048); //TODO: derive this from the actual texture + bin.Write(0); //TODO: this is filename offset, gen this from how we write! + bin.Write(new byte[] { 0x00, 0x00, 0x00, 0x00 }); + binEntryCount++; } - - //CATHODE seems to ignore texture header information regarding size, so as default, resize any imported textures to the original size. - //An option is provided in the toolkit to write size information to the header (done above) however, so don't resize if that's the case. - //More work needs to be done to figure out why CATHODE doesn't honour the header's size value. - int OriginalLength = BiggestPart.Length; - Array.Resize(ref NewTexture.DataBlock, OriginalLength); - - //Update our internal knowledge of the textures - BiggestPart.Length = (int)NewTexture.DataBlock.Length; - BiggestPart.Width = (Int16)NewTexture.Width; - BiggestPart.Height = (Int16)NewTexture.Height; - TextureEntry.Format = NewTexture.Format; - //TODO: Update smallest here too if it exists! - //Will need to be written into the PAK at "Pull PAK sections before/after V2" too - headers are handled already. - - //Load the BIN and write out updated BIN texture header - BinaryWriter ArchiveFileBinWriter = new BinaryWriter(File.OpenWrite(FilePathBIN)); - ArchiveFileBinWriter.BaseStream.Position = TextureEntry.HeaderPos; - ExtraBinaryUtils.WriteString(TextureEntry.Magic, ArchiveFileBinWriter); - ArchiveFileBinWriter.Write(BitConverter.GetBytes((int)TextureEntry.Format)); - ArchiveFileBinWriter.Write((TextureEntry.Texture_V2.Length == -1) ? 0 : TextureEntry.Texture_V2.Length); - ArchiveFileBinWriter.Write(TextureEntry.Texture_V1.Length); - ArchiveFileBinWriter.Write(TextureEntry.Texture_V1.Width); - ArchiveFileBinWriter.Write(TextureEntry.Texture_V1.Height); - ArchiveFileBinWriter.Write(TextureEntry.Unk_V1); - ArchiveFileBinWriter.Write(TextureEntry.Texture_V2.Width); - ArchiveFileBinWriter.Write(TextureEntry.Texture_V2.Height); - ArchiveFileBinWriter.Write(TextureEntry.Unk_V2); - ArchiveFileBinWriter.Write(TextureEntry.UnknownHeaderBytes); - ArchiveFileBinWriter.Close(); - - //Update headers for V1+2 in PAK if they exist - BinaryWriter ArchiveFileWriter = new BinaryWriter(File.OpenWrite(FilePathPAK)); - if (TextureEntry.Texture_V1.HeaderPos != -1) - { - ArchiveFileWriter.BaseStream.Position = TextureEntry.Texture_V1.HeaderPos; - ArchiveFileWriter.Write(TextureEntry.Texture_V1.UnknownHeaderLead); - ArchiveFileWriter.Write(BigEndianUtils.FlipEndian(BitConverter.GetBytes(TextureEntry.Texture_V1.Length))); - ArchiveFileWriter.Write(BigEndianUtils.FlipEndian(BitConverter.GetBytes(TextureEntry.Texture_V1.Length))); - ArchiveFileWriter.Write(TextureEntry.Texture_V1.UnknownHeaderTrail_1); - ArchiveFileWriter.Write(BigEndianUtils.FlipEndian(BitConverter.GetBytes((Int16)EntryIndex))); - ArchiveFileWriter.Write(TextureEntry.Texture_V1.UnknownHeaderTrail_2); - } - if (TextureEntry.Texture_V2.HeaderPos != -1) - { - ArchiveFileWriter.BaseStream.Position = TextureEntry.Texture_V2.HeaderPos; - ArchiveFileWriter.Write(TextureEntry.Texture_V2.UnknownHeaderLead); - ArchiveFileWriter.Write(BigEndianUtils.FlipEndian(BitConverter.GetBytes(TextureEntry.Texture_V2.Length))); - ArchiveFileWriter.Write(BigEndianUtils.FlipEndian(BitConverter.GetBytes(TextureEntry.Texture_V2.Length))); - ArchiveFileWriter.Write(TextureEntry.Texture_V2.UnknownHeaderTrail_1); - ArchiveFileWriter.Write(BigEndianUtils.FlipEndian(BitConverter.GetBytes((Int16)EntryIndex))); - ArchiveFileWriter.Write(TextureEntry.Texture_V2.UnknownHeaderTrail_2); + bin.BaseStream.Position = 0; + bin.Write((int)FileIdentifiers.TEXTURE_DATA); + bin.Write(binEntryCount); + bin.Write(binHeaderStart); + bin.Close(); + + //Update headers in PAK for all entries + BinaryWriter pak = new BinaryWriter(File.OpenWrite(_filePathPAK)); + pak.BaseStream.Position = 32; + int pakEntryCount = 0; + for (int i = 0; i < _entries.Count; i++) + { + for (int x = 0; x < 2; x++) + { + TEX4_Part currentRes = (x == 0) ? _entries[i].tex_LowRes : _entries[i].tex_HighRes; + if (currentRes.Length == 0) continue; + pak.Write(new byte[] { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }); + pak.Write(BigEndianUtils.FlipEndian(currentRes.Length)); + pak.Write(BigEndianUtils.FlipEndian(currentRes.Length)); + pak.Write(BigEndianUtils.FlipEndian(currentRes.Offset)); + pak.Write(new byte[] { 0x00, 0x00 }); + pak.Write((Int16)x); //isHighRes + pak.Write(new byte[] { 0x00, 0x00 }); + pak.Write((Int16)256); //TODO: derive this from the actual texture + pak.Write(BigEndianUtils.FlipEndian(currentRes.unk1)); + pak.Write(BigEndianUtils.FlipEndian(currentRes.unk2)); + pak.Write(BigEndianUtils.FlipEndian((Int16)index)); + pak.Write(new byte[] { 0x00, 0x00, 0x00, 0x00 }); + pak.Write(BigEndianUtils.FlipEndian(currentRes.unk3)); + pak.Write(BigEndianUtils.FlipEndian(currentRes.unk4)); + pakEntryCount++; + } } - ArchiveFileWriter.Close(); - - //Pull PAK sections before/after V2 - BinaryReader ArchiveFile = new BinaryReader(File.OpenRead(FilePathPAK)); - byte[] PAK_Pt1 = ArchiveFile.ReadBytes(BiggestPart.StartPos); - ArchiveFile.BaseStream.Position += OriginalLength; - byte[] PAK_Pt2 = ArchiveFile.ReadBytes((int)ArchiveFile.BaseStream.Length - (int)ArchiveFile.BaseStream.Position); - ArchiveFile.Close(); - - //Write the PAK back out with new content - ArchiveFileWriter = new BinaryWriter(File.OpenWrite(FilePathPAK)); - ArchiveFileWriter.BaseStream.SetLength(0); - ArchiveFileWriter.Write(PAK_Pt1); - ArchiveFileWriter.Write(NewTexture.DataBlock); - ArchiveFileWriter.Write(PAK_Pt2); - ArchiveFileWriter.Close(); + //TODO: Pull all PAK content for textures & then rewrite properly using new info + pak.Write(0); + pak.Write((int)FileIdentifiers.ASSET_FILE); + pak.Write((int)FileIdentifiers.TEXTURE_DATA); + pak.Write(pakEntryCount); + pak.Write(pakEntryCount); + pak.Close(); return PAKReturnType.SUCCESS; } @@ -292,30 +309,22 @@ public override PAKReturnType ExportFile(string PathToExport, string FileName) if (FileIndex == -1) return PAKReturnType.FAIL_GENERAL_LOGIC_ERROR; //CHANGED FOR OPENCAGE //Get the biggest texture part stored - TEX4_Part TexturePart; - if (TextureEntries[FileIndex].Texture_V2.Saved) - { - TexturePart = TextureEntries[FileIndex].Texture_V2; - } - else if (TextureEntries[FileIndex].Texture_V1.Saved) - { - TexturePart = TextureEntries[FileIndex].Texture_V1; - } - else - { - return PAKReturnType.FAIL_REQUEST_IS_UNSUPPORTED; - } + TEX4_Part TexturePart = _entries[FileIndex].tex_HighRes; + if (TexturePart.Length == 0) + TexturePart = _entries[FileIndex].tex_LowRes; + if (TexturePart.Length == 0) + return PAKReturnType.FAIL_GENERAL_LOGIC_ERROR; //Pull the texture part content from the PAK - BinaryReader ArchiveFile = new BinaryReader(File.OpenRead(FilePathPAK)); - ArchiveFile.BaseStream.Position = TexturePart.StartPos; + BinaryReader ArchiveFile = new BinaryReader(File.OpenRead(_filePathPAK)); + ArchiveFile.BaseStream.Position = (NumberOfEntriesPAK * 48) + 32 + TexturePart.Offset; byte[] TexturePartContent = ArchiveFile.ReadBytes(TexturePart.Length); ArchiveFile.Close(); //Generate a DDS header based on the tex4's information DDSWriter TextureOutput; bool FailsafeSave = false; - switch (TextureEntries[FileIndex].Format) + switch (_entries[FileIndex].Format) { case TextureFormat.DXGI_FORMAT_BC5_UNORM: TextureOutput = new DDSWriter(TexturePartContent, TexturePart.Width, TexturePart.Height, 32, 0, TextureType.ATI2N); diff --git a/CathodeLib/Scripts/AssetPAKs/Headers/CS2.cs b/CathodeLib/Scripts/AssetPAKs/Headers/CS2.cs index 8d7922d..da1e21c 100644 --- a/CathodeLib/Scripts/AssetPAKs/Headers/CS2.cs +++ b/CathodeLib/Scripts/AssetPAKs/Headers/CS2.cs @@ -1,29 +1,83 @@ -using System; +using CathodeLib; +using System; using System.Collections.Generic; using System.Linq; +using System.Runtime.InteropServices; using System.Text; using System.Threading.Tasks; namespace CATHODE.Assets { - public class CS2 - { - /* BIN */ - public string Filename = ""; - public string ModelPartName = ""; - public string MaterialName = ""; //Pulled from MTL with MateralLibraryIndex + public class AlienVBF + { + public int ElementCount; + public List Elements; + } + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public struct AlienVBFE + { + public int ArrayIndex; + public int Offset; // NOTE: Offset within data structure, generally not important. + public VBFE_InputType VariableType; //(int) + public VBFE_InputSlot ShaderSlot; //(int) + public int VariantIndex; // NOTE: Variant index such as UVs: (UV0, UV1, UV2...) + public int Unknown_; // NOTE: Seems to be always 2? + }; + + public enum VBFE_InputType + { + AlienVertexInputType_v3 = 0x03, + // TODO: Present at 'bsp_torrens' but I haven't seen models that contain that being rendered yet. + AlienVertexInputType_Unknown0_ = 0x04, + AlienVertexInputType_u32_C = 0x05, + AlienVertexInputType_v4u8_i = 0x06, + AlienVertexInputType_v4u8_f = 0x09, + AlienVertexInputType_v2s16_UV = 0x0A, + AlienVertexInputType_v4s16_f = 0x0B, + AlienVertexInputType_v4u8_NTB = 0x0F, + AlienVertexInputType_u16 = 0x13, + }; + + public enum VBFE_InputSlot + { + AlienVertexInputSlot_P = 0x01, + AlienVertexInputSlot_BW = 0x02, // NOTE: Bone Weights + AlienVertexInputSlot_BI = 0x03, // NOTE: Bone Indices + AlienVertexInputSlot_N = 0x04, + AlienVertexInputSlot_UV = 0x06, + AlienVertexInputSlot_T = 0x07, // NOTE: Tangent + AlienVertexInputSlot_B = 0x08, // NOTE: Bitangent + AlienVertexInputSlot_C = 0x0A, // NOTE: Color? Specular? What is this? + }; - public int FilenameOffset = 0; - public int ModelPartNameOffset = 0; - public int MaterialLibaryIndex = 0; - public int BlockSize = 0; - public int ScaleFactor = 0; - public int VertCount = 0; - public int FaceCount = 0; - public int BoneCount = 0; - - /* PAK */ - public int PakOffset = 0; - public int PakSize = 0; - } + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public struct CS2 + { + public int FileNameOffset; + public int UnknownZero_; // NOTE: Always 0 on starting area. + public int ModelPartNameOffset; + public float UnknownValue0_; // NOTE: Always 0 on starting area. + public Vector3 AABBMin; + public float LODMinDistance_; + public Vector3 AABBMax; + public float LODMaxDistance_; + public int NextInLODGroup_; + public int FirstModelInGroupForNextLOD_; + public int MaterialLibraryIndex; + public uint Unknown2_; // NOTE: Flags? + public int UnknownIndex; // NOTE: -1 means no index. Seems to be related to Next/Parent. + public uint BlockSize; + public int CollisionIndex_; // NODE: If this is not -1, model piece name starts with "COL_" and are always character models. + public int BoneArrayOffset_; // TODO: This indexes on the leftover data and points to an array of linearly growing indices. + // And the array count is BoneCount. + public UInt16 VertexFormatIndex; + public UInt16 VertexFormatIndexLowDetail; + public UInt16 VertexFormatIndexDefault_; // TODO: This is always equals to the VertexFormatIndex + public UInt16 ScaleFactor; + public Int16 HeadRelated_; // NOTE: Seems to be valid on some 'HEAD' models, otherwise -1. Maybe morphing related??? + public UInt16 VertexCount; + public UInt16 IndexCount; + public UInt16 BoneCount; + }; } diff --git a/CathodeLib/Scripts/AssetPAKs/Headers/TEX4.cs b/CathodeLib/Scripts/AssetPAKs/Headers/TEX4.cs index 02e9be0..9b62415 100644 --- a/CathodeLib/Scripts/AssetPAKs/Headers/TEX4.cs +++ b/CathodeLib/Scripts/AssetPAKs/Headers/TEX4.cs @@ -20,41 +20,49 @@ public enum TextureFormat : int //The Tex4 Entry class TEX4 { - //Misc header info (used for rewriting and not a lot else) - public string Magic = ""; - public int Length_V2 = -1; - public int Length_V1 = -1; - public Int16 Unk_V2 = -1; - public Int16 Unk_V1 = -1; - public byte[] UnknownHeaderBytes = new byte[20]; - - //The filename and path public string FileName = ""; - //Misc metadata public TextureFormat Format; - public int HeaderPos = -1; + public int Type = -1; //AlienTextureType + public AlienUnknownTextureThing UnknownTexThing; - //Actual texture content - public TEX4_Part Texture_V1 = new TEX4_Part(); - public TEX4_Part Texture_V2 = new TEX4_Part(); //V2 is the largest, unless we don't have a V2 in which case V1 is. + public TEX4_Part tex_LowRes = new TEX4_Part(); + public TEX4_Part tex_HighRes = new TEX4_Part(); //We don't always have this + } + + public enum AlienTextureType + { + SPECULAR_OR_NORMAL = 0, + DIFFUSE = 1, + LUT = 21, + + DECAL = 5, + ENVIRONMENT_MAP = 7, + + } + + public enum AlienUnknownTextureThing + { + REGULAR_TEXTURE = 0, + SOME_SPECIAL_TEXTURE = 9, } //The Tex4 Sub-Parts class TEX4_Part { - public Int16 Width = -1; - public Int16 Height = -1; - - public bool Saved = false; - public int HeaderPos = -1; - - public int StartPos = -1; - public int Length = -1; - - //Misc header info (used for rewriting) - all byte arrays will be BIG ENDIAN - public byte[] UnknownHeaderLead = new byte[8]; - public byte[] UnknownHeaderTrail_1 = new byte[18]; - public byte[] UnknownHeaderTrail_2 = new byte[12]; + public Int16 Width = 0; + public Int16 Height = 0; + + public Int16 Depth = 0; + public Int16 MipLevels = 0; + + public int Offset = 0; + public int Length = 0; + + //Saving these so we can re-write without issue + public UInt32 unk1 = 0; + public UInt16 unk2 = 0; + public UInt32 unk3 = 0; + public UInt32 unk4 = 0; } } diff --git a/CathodeLib/Scripts/CATHODE/AnimationStringDatabase.cs b/CathodeLib/Scripts/CATHODE/AnimationStringDatabase.cs new file mode 100644 index 0000000..a243900 --- /dev/null +++ b/CathodeLib/Scripts/CATHODE/AnimationStringDatabase.cs @@ -0,0 +1,115 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Runtime.InteropServices; +using System.Text; +using CATHODE.Scripting; +using CathodeLib; + +namespace CATHODE +{ + /* Handles Cathode animation string DB files (ANIM_STRING_DB.BIN, ANIM_STRING_DB_DEBUG.BIN) */ + public class AnimationStringDatabase : CathodeFile + { + private Dictionary _strings = new Dictionary(); + + public AnimationStringDatabase(string path) : base(path) { } + + #region FILE_IO + /* Load the file */ + protected override bool Load() + { + if (!File.Exists(_filepath)) return false; + + BinaryReader stream = new BinaryReader(File.OpenRead(_filepath)); + try + { + //Read all data in + int EntryCount = stream.ReadInt32(); + int StringCount = stream.ReadInt32(); + Entry[] entries = Utilities.ConsumeArray(stream, EntryCount); + int[] stringOffsets = Utilities.ConsumeArray(stream, StringCount); + List strings = new List(); + for (int i = 0; i < StringCount; i++) strings.Add(Utilities.ReadString(stream)); + + //Parse + for (int i = 0; i < entries.Length; i++) _strings.Add(entries[i].StringID, strings[entries[i].StringIndex]); + //TODO: encoding on a couple strings here is wrong + } + catch + { + stream.Close(); + return false; + } + stream.Close(); + return true; + } + + /* Save the file */ + override public bool Save() + { + BinaryWriter writer = new BinaryWriter(File.OpenWrite(_filepath)); + try + { + writer.Write(_strings.Count); + writer.Write(_strings.Count); + int count = 0; + foreach (KeyValuePair value in _strings) + { + writer.Write(value.Key); + writer.Write(count); + count++; + } + int baseline = (_strings.Count * 4 * 2) + 8 + (_strings.Count * 4); + writer.BaseStream.Position = baseline; + List stringOffsets = new List(); + foreach (KeyValuePair value in _strings) + { + stringOffsets.Add((int)writer.BaseStream.Position - baseline); + ExtraBinaryUtils.WriteString(value.Value, writer); + writer.Write((char)0x00); + } + writer.BaseStream.Position = (_strings.Count * 4 * 2) + 8; + for (int i = 0; i < stringOffsets.Count; i++) + { + writer.Write(stringOffsets[i]); + } + } + catch + { + writer.Close(); + return false; + } + writer.Close(); + return true; + } + #endregion + + #region ACCESSORS + /* Add a string to the DB */ + public void AddString(string str) + { + uint id = Utilities.AnimationHashedString(str); + if (_strings.ContainsKey(id)) return; + _strings.Add(id, str); + } + + /* Remove a string from the DB */ + public void RemoveString(string str) + { + uint id = Utilities.AnimationHashedString(str); + _strings.Remove(id); + } + #endregion + + #region STRUCTURES + [StructLayout(LayoutKind.Sequential, Pack = 1)] + private struct Entry + { + public uint StringID; + public int StringIndex; + }; + #endregion + } +} diff --git a/CathodeLib/Scripts/CATHODE/CollisionMapDatabase.cs b/CathodeLib/Scripts/CATHODE/CollisionMapDatabase.cs new file mode 100644 index 0000000..b177959 --- /dev/null +++ b/CathodeLib/Scripts/CATHODE/CollisionMapDatabase.cs @@ -0,0 +1,92 @@ +using CathodeLib; +using System.IO; +using System.Runtime.InteropServices; + +namespace CATHODE +{ + /* Handles Cathode COLLISION.MAP files */ + public class CollisionMapDatabase : CathodeFile + { + //TODO: tidy how we access these + public Header _header; + public Entry[] _entries; + + public CollisionMapDatabase(string path) : base(path) { } + + #region FILE_IO + /* Load the file */ + protected override bool Load() + { + if (!File.Exists(_filepath)) return false; + + BinaryReader stream = new BinaryReader(File.OpenRead(_filepath)); + try + { + _header = Utilities.Consume
(stream); + _entries = Utilities.ConsumeArray(stream, _header.EntryCount); + } + catch + { + stream.Close(); + return false; + } + stream.Close(); + return true; + } + + /* Save the file */ + override public bool Save() + { + BinaryWriter stream = new BinaryWriter(File.OpenWrite(_filepath)); + try + { + stream.BaseStream.SetLength(0); + Utilities.Write
(stream, _header); + Utilities.Write(stream, _entries); + } + catch + { + stream.Close(); + return false; + } + stream.Close(); + return true; + } + #endregion + + #region ACCESSORS + /* Data accessors */ + public int EntryCount { get { return _entries.Length; } } + public Entry[] Entries { get { return _entries; } } + public Entry GetEntry(int i) + { + return _entries[i]; + } + + /* Data setters */ + public void SetEntry(int i, Entry content) + { + _entries[i] = content; + } + #endregion + + #region STRUCTURES + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public struct Header + { + public int DataSize; + public int EntryCount; + }; + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public struct Entry + { + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)] + public int[] Unknowns1; //12 + public int ID; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 7)] + public int[] Unknowns2; //12 + }; + #endregion + } +} \ No newline at end of file diff --git a/CathodeLib/Scripts/CommandsPAK/CommandsPAK.cs b/CathodeLib/Scripts/CATHODE/Commands.cs similarity index 69% rename from CathodeLib/Scripts/CommandsPAK/CommandsPAK.cs rename to CathodeLib/Scripts/CATHODE/Commands.cs index 7e0a38c..21138ad 100644 --- a/CathodeLib/Scripts/CommandsPAK/CommandsPAK.cs +++ b/CathodeLib/Scripts/CATHODE/Commands.cs @@ -1,112 +1,44 @@ //#define DO_PRETTY_COMPOSITES +using CATHODE.Scripting; using CathodeLib; using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Runtime.InteropServices; -#if UNITY_EDITOR || UNITY_STANDALONE -using UnityEngine; -#endif -namespace CATHODE.Commands +namespace CATHODE { - /* - - A:I iOS contains all symbols which has been super helpful. There's some new Commands info, as well as a bunch of info about REDS/MVR. - - COMMANDS.BIN loads into CommandBuffer object. - CommandBuffer is looped through once for number of commands entries, adding or removing: - composite_template - alias_from_command - parameter_from_command - entity_to_seq_from_command - link - connector - resource - track_from_command - It's then looped through again, adding or removing: - entity - binding_from_command - **something undefined** - method - proxy_from_command - breakpoint_from_command - - */ - - public class CommandsPAK + public class Commands : CathodeFile { public Action OnLoaded; public Action OnSaved; - /* Load and parse the COMMANDS.PAK */ - public CommandsPAK(string pathToPak) - { - _path = pathToPak; - _didLoadCorrectly = Load(_path); - } - - #region ACCESSORS - /* Return a list of filenames for composites in the CommandsPAK archive */ - public string[] GetCompositeNames() - { - string[] toReturn = new string[_composites.Count]; - for (int i = 0; i < _composites.Count; i++) toReturn[i] = _composites[i].name; - return toReturn; - } - - /* Find the a script entry object by name */ - public int GetFileIndex(string FileName) - { - for (int i = 0; i < _composites.Count; i++) if (_composites[i].name == FileName || _composites[i].name == FileName.Replace('/', '\\')) return i; - return -1; - } - - /* Get an individual composite */ - public CathodeComposite GetComposite(ShortGuid id) - { - if (id.val == null) return null; - return _composites.FirstOrDefault(o => o.shortGUID == id); - } - public CathodeComposite GetCompositeByIndex(int index) - { - return (index >= _composites.Count || index < 0) ? null : _composites[index]; - } - - /* Get all composites */ - public List Composites { get { return _composites; } } + // This is always: + // - Root Instance (the map's entry composite, usually containing entities that call mission/environment composites) + // - Global Instance (the main data handler for keeping track of mission number, etc - kinda like a big singleton) + // - Pause Menu Instance + private ShortGuid[] _entryPoints; + private Composite[] _entryPointObjects = null; - /* Get entry point composite objects */ - public CathodeComposite[] EntryPoints - { - get - { - if (_entryPointObjects != null) return _entryPointObjects; - _entryPointObjects = new CathodeComposite[_entryPoints.compositeIDs.Length]; - for (int i = 0; i < _entryPoints.compositeIDs.Length; i++) _entryPointObjects[i] = GetComposite(_entryPoints.compositeIDs[i]); - return _entryPointObjects; - } - } + private List _composites = null; - /* Set the root composite for this COMMANDS.PAK (the root of the level - GLOBAL and PAUSEMENU are also instanced) */ - public void SetRootComposite(ShortGuid id) - { - _entryPoints.compositeIDs[0] = id; - _entryPointObjects = null; - } - #endregion + public Commands(string path) : base(path) { } - #region WRITING + #region FILE_IO /* Save all changes back out */ - public void Save() + override public bool Save() { - BinaryWriter writer = new BinaryWriter(File.OpenWrite(_path)); + if (_entryPoints == null || _entryPoints.Length != 3 || _entryPoints[0] == null) + return false; + + BinaryWriter writer = new BinaryWriter(File.OpenWrite(_filepath)); writer.BaseStream.SetLength(0); //Write entry points - Utilities.Write(writer, _entryPoints); + for (int i = 0; i < 3; i++) + Utilities.Write(writer, _entryPoints[i]); //Write placeholder info for parameter/composite offsets int offsetToRewrite = (int)writer.BaseStream.Position; @@ -115,11 +47,96 @@ public void Save() writer.Write(0); writer.Write(0); + //Fix (& verify) entity-attached resource info + for (int i = 0; i < _composites.Count; i++) + { + List animatedModels = new List(); + for (int x = 0; x < _composites[i].functions.Count; x++) + { + if (!CommandsUtils.FunctionTypeExists(_composites[i].functions[x].function)) continue; + FunctionType type = CommandsUtils.GetFunctionType(_composites[i].functions[x].function); + switch (type) + { + // Types below require resources we can add, and information we should probably correct, so do it automatically! + case FunctionType.SoundBarrier: + _composites[i].functions[x].AddResource(ResourceType.COLLISION_MAPPING); + break; + case FunctionType.ExclusiveMaster: + _composites[i].functions[x].AddResource(ResourceType.EXCLUSIVE_MASTER_STATE_RESOURCE); + break; + case FunctionType.TRAV_1ShotSpline: + //TODO: There are loads of TRAV_ entities which are unused in the vanilla game, so I'm not sure if they should apply to those too... + _composites[i].functions[x].AddResource(ResourceType.TRAVERSAL_SEGMENT); + break; + case FunctionType.NavMeshBarrier: + _composites[i].functions[x].AddResource(ResourceType.NAV_MESH_BARRIER_RESOURCE); + _composites[i].functions[x].AddResource(ResourceType.COLLISION_MAPPING); + break; + case FunctionType.PhysicsSystem: + Parameter dps_index = _composites[i].functions[x].GetParameter("system_index"); + if (dps_index == null) + { + dps_index = new Parameter("system_index", new cInteger(0)); + _composites[i].functions[x].parameters.Add(dps_index); + } + _composites[i].functions[x].AddResource(ResourceType.DYNAMIC_PHYSICS_SYSTEM).startIndex = ((cInteger)dps_index.content).value; + break; + case FunctionType.EnvironmentModelReference: + Parameter rsc = _composites[i].functions[x].GetParameter("resource"); + if (rsc == null) + { + rsc = new Parameter("resource", new cResource(_composites[i].functions[x].shortGUID)); + _composites[i].functions[x].parameters.Add(rsc); + } + cResource rsc_p = (cResource)rsc.content; + rsc_p.AddResource(ResourceType.ANIMATED_MODEL); + break; + + // Types below require various things, but we don't add them as they work without it, so just log a warning. + case FunctionType.ModelReference: + Parameter mdl = _composites[i].functions[x].GetParameter("resource"); + if (mdl == null) + { + mdl = new Parameter("resource", new cResource(_composites[i].functions[x].shortGUID)); + _composites[i].functions[x].parameters.Add(mdl); + } + cResource mdl_p = (cResource)mdl.content; + if (mdl_p.GetResource(ResourceType.RENDERABLE_INSTANCE) == null) + Console.WriteLine("WARNING: ModelReference resource parameter does not contain a RENDERABLE_INSTANCE resource reference!"); + if (mdl_p.GetResource(ResourceType.COLLISION_MAPPING) == null) + Console.WriteLine("WARNING: ModelReference resource parameter does not contain a COLLISION_MAPPING resource reference!"); + break; + case FunctionType.CollisionBarrier: + if (_composites[i].functions[x].GetResource(ResourceType.COLLISION_MAPPING) == null) + Console.WriteLine("WARNING: CollisionBarrier entity does not contain a COLLISION_MAPPING resource reference!"); + break; + + // Types below require only RENDERABLE_INSTANCE resource references on the entity, pointing to the commented model. + // We can't add them automatically as we need to know REDS indexes! + // UPDATE: I think the game can handle any resource being set here! + case FunctionType.ParticleEmitterReference: /// [dynamic_mesh] /// - I think i've also seen 1000 particle system too + case FunctionType.RibbonEmitterReference: /// [dynamic_mesh] + case FunctionType.SurfaceEffectBox: /// Global/Props/fogbox.CS2 -> [VolumeFog] + case FunctionType.FogBox: /// Global/Props/fogplane.CS2 -> [Plane01] + case FunctionType.SurfaceEffectSphere: /// Global/Props/fogsphere.CS2 -> [Sphere01] + case FunctionType.FogSphere: /// Global/Props/fogsphere.CS2 -> [Sphere01] + case FunctionType.SimpleRefraction: /// Global/Props/refraction.CS2 -> [Plane01] + case FunctionType.SimpleWater: /// Global/Props/noninteractive_water.CS2 -> [Plane01] + case FunctionType.LightReference: /// Global/Props/deferred_point_light.cs2 -> [Sphere01], Global/Props/deferred_spot_light.cs2 -> [Sphere02], Global/Props/deferred_strip_light.cs2 -> [Sphere01] + if (_composites[i].functions[x].GetResource(ResourceType.RENDERABLE_INSTANCE) == null) + Console.WriteLine("ERROR: " + type + " entity does not contain a RENDERABLE_INSTANCE resource reference!"); + if (_composites[i].functions[x].GetParameter("resource") != null) + throw new Exception("Function entity of type " + type + " had an invalid resource parameter applied!"); + break; + } + } + } + //Work out unique parameters to write - List parameters = new List(); + List parameters = new List(); for (int i = 0; i < _composites.Count; i++) { - List fgEntities = _composites[i].GetEntities(); + List fgEntities = _composites[i].GetEntities(); for (int x = 0; x < fgEntities.Count; x++) for (int y = 0; y < fgEntities[x].parameters.Count; y++) parameters.Add(fgEntities[x].parameters[y].content); @@ -134,45 +151,45 @@ public void Save() Utilities.Write(writer, CommandsUtils.GetDataTypeGUID(parameters[i].dataType)); switch (parameters[i].dataType) { - case CathodeDataType.POSITION: - Vector3 pos = ((CathodeTransform)parameters[i]).position; - Vector3 rot = ((CathodeTransform)parameters[i]).rotation; + case DataType.TRANSFORM: + Vector3 pos = ((cTransform)parameters[i]).position; + Vector3 rot = ((cTransform)parameters[i]).rotation; writer.Write(pos.x); writer.Write(pos.y); writer.Write(pos.z); writer.Write(rot.y); writer.Write(rot.x); writer.Write(rot.z); break; - case CathodeDataType.INTEGER: - writer.Write(((CathodeInteger)parameters[i]).value); + case DataType.INTEGER: + writer.Write(((cInteger)parameters[i]).value); break; - case CathodeDataType.STRING: + case DataType.STRING: int stringStart = ((int)writer.BaseStream.Position + 4) / 4; byte[] stringStartRaw = BitConverter.GetBytes(stringStart); stringStartRaw[3] = 0x80; writer.Write(stringStartRaw); - string str = ((CathodeString)parameters[i]).value; + string str = ((cString)parameters[i]).value; writer.Write(ShortGuidUtils.Generate(str).val); for (int x = 0; x < str.Length; x++) writer.Write(str[x]); writer.Write((char)0x00); Utilities.Align(writer, 4); break; - case CathodeDataType.BOOL: - if (((CathodeBool)parameters[i]).value) writer.Write(1); else writer.Write(0); + case DataType.BOOL: + if (((cBool)parameters[i]).value) writer.Write(1); else writer.Write(0); break; - case CathodeDataType.FLOAT: - writer.Write(((CathodeFloat)parameters[i]).value); + case DataType.FLOAT: + writer.Write(((cFloat)parameters[i]).value); break; - case CathodeDataType.SHORT_GUID: - Utilities.Write(writer, ((CathodeResource)parameters[i]).resourceID); + case DataType.RESOURCE: + Utilities.Write(writer, ((cResource)parameters[i]).resourceID); break; - case CathodeDataType.DIRECTION: - Vector3 dir = ((CathodeVector3)parameters[i]).value; + case DataType.VECTOR: + Vector3 dir = ((cVector3)parameters[i]).value; writer.Write(dir.x); writer.Write(dir.y); writer.Write(dir.z); break; - case CathodeDataType.ENUM: - Utilities.Write(writer, ((CathodeEnum)parameters[i]).enumID); - writer.Write(((CathodeEnum)parameters[i]).enumIndex); + case DataType.ENUM: + Utilities.Write(writer, ((cEnum)parameters[i]).enumID); + writer.Write(((cEnum)parameters[i]).enumIndex); break; - case CathodeDataType.SPLINE_DATA: - CathodeSpline thisSpline = ((CathodeSpline)parameters[i]); + case DataType.SPLINE: + cSpline thisSpline = ((cSpline)parameters[i]); writer.Write(((int)writer.BaseStream.Position + 8) / 4); writer.Write(thisSpline.splinePoints.Count); for (int x = 0; x < thisSpline.splinePoints.Count; x++) @@ -201,14 +218,14 @@ public void Save() Utilities.Align(writer, 4); //Work out what we want to write - List ents = _composites[i].GetEntities(); - List entitiesWithLinks = new List(ents.FindAll(o => o.childLinks.Count != 0)); - List entitiesWithParams = new List(ents.FindAll(o => o.parameters.Count != 0)); + List ents = _composites[i].GetEntities(); + List entitiesWithLinks = new List(ents.FindAll(o => o.childLinks.Count != 0)); + List entitiesWithParams = new List(ents.FindAll(o => o.parameters.Count != 0)); //TODO: find a nicer way to sort into entity class types List cageAnimationEntities = new List(); List triggerSequenceEntities = new List(); - ShortGuid cageAnimationGUID = CommandsUtils.GetFunctionTypeGUID(CathodeFunctionType.CAGEAnimation); - ShortGuid triggerSequenceGUID = CommandsUtils.GetFunctionTypeGUID(CathodeFunctionType.TriggerSequence); + ShortGuid cageAnimationGUID = CommandsUtils.GetFunctionTypeGUID(FunctionType.CAGEAnimation); + ShortGuid triggerSequenceGUID = CommandsUtils.GetFunctionTypeGUID(FunctionType.TriggerSequence); for (int x = 0; x < _composites[i].functions.Count; x++) { if (_composites[i].functions[x].function == cageAnimationGUID) @@ -226,22 +243,21 @@ public void Save() } //Reconstruct resources - List resourceReferences = new List(); - ShortGuid resourceParamID = ShortGuidUtils.Generate("resource"); - for (int x = 0; x < ents.Count; x++) + List resourceReferences = new List(); + ShortGuid resource_param_id = ShortGuidUtils.Generate("resource"); + for (int x = 0; x < _composites[i].functions.Count; x++) { - for (int y = 0; y < ents[x].resources.Count; y++) - if (!resourceReferences.Contains(ents[x].resources[y])) - resourceReferences.Add(ents[x].resources[y]); + for (int y = 0; y < _composites[i].functions[x].resources.Count; y++) + if (!resourceReferences.Contains(_composites[i].functions[x].resources[y])) + resourceReferences.Add(_composites[i].functions[x].resources[y]); - CathodeLoadedParameter resParam = ents[x].parameters.FirstOrDefault(o => o.shortGUID == resourceParamID); + Parameter resParam = _composites[i].functions[x].parameters.FirstOrDefault(o => o.shortGUID == resource_param_id); if (resParam == null) continue; - List resParamRef = ((CathodeResource)resParam.content).value; + List resParamRef = ((cResource)resParam.content).value; for (int y = 0; y < resParamRef.Count; y++) if (!resourceReferences.Contains(resParamRef[y])) resourceReferences.Add(resParamRef[y]); } - resourceReferences.AddRange(_composites[i].resources); //Sort entitiesWithLinks = entitiesWithLinks.OrderBy(o => o.shortGUID.ToUInt32()).ToList(); @@ -250,25 +266,25 @@ public void Save() _composites[i].SortEntities(); //Write data - OffsetPair[] scriptPointerOffsetInfo = new OffsetPair[(int)CommandsDataBlock.NUMBER_OF_SCRIPT_BLOCKS]; - for (int x = 0; x < (int)CommandsDataBlock.NUMBER_OF_SCRIPT_BLOCKS; x++) + OffsetPair[] scriptPointerOffsetInfo = new OffsetPair[(int)DataBlock.NUMBER_OF_SCRIPT_BLOCKS]; + for (int x = 0; x < (int)DataBlock.NUMBER_OF_SCRIPT_BLOCKS; x++) { - switch ((CommandsDataBlock)x) + switch ((DataBlock)x) { - case CommandsDataBlock.COMPOSITE_HEADER: + case DataBlock.COMPOSITE_HEADER: { scriptPointerOffsetInfo[x] = new OffsetPair(writer.BaseStream.Position, 2); Utilities.Write(writer, _composites[i].shortGUID); writer.Write(0); break; } - case CommandsDataBlock.ENTITY_CONNECTIONS: + case DataBlock.ENTITY_CONNECTIONS: { List offsetPairs = new List(); - foreach (CathodeEntity entityWithLink in entitiesWithLinks) + foreach (Entity entityWithLink in entitiesWithLinks) { offsetPairs.Add(new OffsetPair(writer.BaseStream.Position, entityWithLink.childLinks.Count)); - Utilities.Write(writer, entityWithLink.childLinks); + Utilities.Write(writer, entityWithLink.childLinks); } scriptPointerOffsetInfo[x] = new OffsetPair(writer.BaseStream.Position, entitiesWithLinks.Count); @@ -281,10 +297,10 @@ public void Save() break; } - case CommandsDataBlock.ENTITY_PARAMETERS: + case DataBlock.ENTITY_PARAMETERS: { List offsetPairs = new List(); - foreach (CathodeEntity entityWithParam in entitiesWithParams) + foreach (Entity entityWithParam in entitiesWithParams) { offsetPairs.Add(new OffsetPair(writer.BaseStream.Position, entityWithParam.parameters.Count)); for (int y = 0; y < entityWithParam.parameters.Count; y++) @@ -314,7 +330,7 @@ public void Save() } break; } - case CommandsDataBlock.ENTITY_OVERRIDES: + case DataBlock.ENTITY_OVERRIDES: { List offsetPairs = new List(); for (int p = 0; p < _composites[i].overrides.Count; p++) @@ -332,7 +348,7 @@ public void Save() } break; } - case CommandsDataBlock.ENTITY_OVERRIDES_CHECKSUM: + case DataBlock.ENTITY_OVERRIDES_CHECKSUM: { scriptPointerOffsetInfo[x] = new OffsetPair(writer.BaseStream.Position, reshuffledChecksums.Count); for (int p = 0; p < reshuffledChecksums.Count; p++) @@ -342,18 +358,18 @@ public void Save() } break; } - case CommandsDataBlock.COMPOSITE_EXPOSED_PARAMETERS: + case DataBlock.COMPOSITE_EXPOSED_PARAMETERS: { - scriptPointerOffsetInfo[x] = new OffsetPair(writer.BaseStream.Position, _composites[i].datatypes.Count); - for (int p = 0; p < _composites[i].datatypes.Count; p++) + scriptPointerOffsetInfo[x] = new OffsetPair(writer.BaseStream.Position, _composites[i].variables.Count); + for (int p = 0; p < _composites[i].variables.Count; p++) { - writer.Write(_composites[i].datatypes[p].shortGUID.val); - writer.Write(CommandsUtils.GetDataTypeGUID(_composites[i].datatypes[p].type).val); - writer.Write(_composites[i].datatypes[p].parameter.val); + writer.Write(_composites[i].variables[p].shortGUID.val); + writer.Write(CommandsUtils.GetDataTypeGUID(_composites[i].variables[p].type).val); + writer.Write(_composites[i].variables[p].parameter.val); } break; } - case CommandsDataBlock.ENTITY_PROXIES: + case DataBlock.ENTITY_PROXIES: { List offsetPairs = new List(); for (int p = 0; p < _composites[i].proxies.Count; p++) @@ -373,7 +389,7 @@ public void Save() } break; } - case CommandsDataBlock.ENTITY_FUNCTIONS: + case DataBlock.ENTITY_FUNCTIONS: { scriptPointerOffsetInfo[x] = new OffsetPair(writer.BaseStream.Position, _composites[i].functions.Count); for (int p = 0; p < _composites[i].functions.Count; p++) @@ -383,46 +399,45 @@ public void Save() } break; } - case CommandsDataBlock.RESOURCE_REFERENCES: + case DataBlock.RESOURCE_REFERENCES: { - //TODO: this case is quite messy as full parsing still isn't known scriptPointerOffsetInfo[x] = new OffsetPair(writer.BaseStream.Position, resourceReferences.Count); for (int p = 0; p < resourceReferences.Count; p++) { - writer.Write(resourceReferences[p].resourceRefID.val); - writer.Write(resourceReferences[p].unknownID1.val); - writer.Write(resourceReferences[p].positionOffset.x); - writer.Write(resourceReferences[p].positionOffset.y); - writer.Write(resourceReferences[p].positionOffset.z); - writer.Write(resourceReferences[p].unknownID2.val); + writer.Write(resourceReferences[p].position.x); + writer.Write(resourceReferences[p].position.y); + writer.Write(resourceReferences[p].position.z); + writer.Write(resourceReferences[p].rotation.x); + writer.Write(resourceReferences[p].rotation.y); + writer.Write(resourceReferences[p].rotation.z); writer.Write(resourceReferences[p].resourceID.val); //Sometimes this is the entity ID that uses the resource, other times it's the "resource" parameter ID link writer.Write(CommandsUtils.GetResourceEntryTypeGUID(resourceReferences[p].entryType).val); switch (resourceReferences[p].entryType) { - case CathodeResourceReferenceType.RENDERABLE_INSTANCE: - writer.Write(resourceReferences[p].entryIndexREDS); - writer.Write(resourceReferences[p].entryCountREDS); + case ResourceType.RENDERABLE_INSTANCE: + writer.Write(resourceReferences[p].startIndex); + writer.Write(resourceReferences[p].count); break; - case CathodeResourceReferenceType.COLLISION_MAPPING: - writer.Write(resourceReferences[p].unknownInteger1); + case ResourceType.COLLISION_MAPPING: + writer.Write(resourceReferences[p].startIndex); writer.Write(resourceReferences[p].entityID.val); break; - case CathodeResourceReferenceType.EXCLUSIVE_MASTER_STATE_RESOURCE: - case CathodeResourceReferenceType.NAV_MESH_BARRIER_RESOURCE: - case CathodeResourceReferenceType.TRAVERSAL_SEGMENT: - writer.Write(resourceReferences[p].unknownInteger1); - writer.Write(resourceReferences[p].unknownInteger2); + case ResourceType.ANIMATED_MODEL: + case ResourceType.DYNAMIC_PHYSICS_SYSTEM: + writer.Write(resourceReferences[p].startIndex); + writer.Write(-1); break; - case CathodeResourceReferenceType.ANIMATED_MODEL: - case CathodeResourceReferenceType.DYNAMIC_PHYSICS_SYSTEM: - writer.Write(resourceReferences[p].unknownInteger1); - writer.Write(resourceReferences[p].unknownInteger2); + case ResourceType.EXCLUSIVE_MASTER_STATE_RESOURCE: + case ResourceType.NAV_MESH_BARRIER_RESOURCE: + case ResourceType.TRAVERSAL_SEGMENT: + writer.Write(-1); + writer.Write(-1); break; } } break; } - case CommandsDataBlock.TRIGGERSEQUENCE_DATA: //Actually CAGEANIMATION_DATA, but indexes are flipped + case DataBlock.TRIGGERSEQUENCE_DATA: //Actually CAGEANIMATION_DATA, but indexes are flipped { List globalOffsets = new List(); for (int p = 0; p < cageAnimationEntities.Count; p++) @@ -514,14 +529,14 @@ public void Save() writer.Write(cageAnimationEntities[p].paramsData3.Count); } - scriptPointerOffsetInfo[(int)CommandsDataBlock.CAGEANIMATION_DATA] = new OffsetPair(writer.BaseStream.Position, globalOffsets.Count); + scriptPointerOffsetInfo[(int)DataBlock.CAGEANIMATION_DATA] = new OffsetPair(writer.BaseStream.Position, globalOffsets.Count); for (int p = 0; p < globalOffsets.Count; p++) { writer.Write(globalOffsets[p] / 4); } break; } - case CommandsDataBlock.CAGEANIMATION_DATA: //Actually TRIGGERSEQUENCE_DATA, but indexes are flipped + case DataBlock.CAGEANIMATION_DATA: //Actually TRIGGERSEQUENCE_DATA, but indexes are flipped { List globalOffsets = new List(); for (int p = 0; p < triggerSequenceEntities.Count; p++) @@ -557,19 +572,19 @@ public void Save() writer.Write(triggerSequenceEntities[p].events.Count); } - scriptPointerOffsetInfo[(int)CommandsDataBlock.TRIGGERSEQUENCE_DATA] = new OffsetPair(writer.BaseStream.Position, globalOffsets.Count); + scriptPointerOffsetInfo[(int)DataBlock.TRIGGERSEQUENCE_DATA] = new OffsetPair(writer.BaseStream.Position, globalOffsets.Count); for (int p = 0; p < globalOffsets.Count; p++) { writer.Write(globalOffsets[p] / 4); } break; } - case CommandsDataBlock.UNUSED: + case DataBlock.UNUSED: { scriptPointerOffsetInfo[x] = new OffsetPair(0, 0); break; } - case CommandsDataBlock.UNKNOWN_COUNTS: + case DataBlock.UNKNOWN_COUNTS: { //TODO: These count values are unknown. Temp fix in place for the div by 4 at the end on offset (as this isn't actually an offset!) scriptPointerOffsetInfo[x] = new OffsetPair(_composites[i].unknownPair.GlobalOffset * 4, _composites[i].unknownPair.EntryCount); @@ -581,7 +596,7 @@ public void Save() //Write pointers to the pointers of the content compositeOffsets[i] = (int)writer.BaseStream.Position / 4; writer.Write(0); - for (int x = 0; x < (int)CommandsDataBlock.NUMBER_OF_SCRIPT_BLOCKS; x++) + for (int x = 0; x < (int)DataBlock.NUMBER_OF_SCRIPT_BLOCKS; x++) { if (x == 0) { @@ -612,47 +627,19 @@ public void Save() writer.Close(); OnSaved?.Invoke(); - } - - /* Filter down a list of parameters to contain only unique entries */ - private List PruneParameterList(List parameters) - { - List prunedList = new List(); - bool canAdd = true; - for (int i = 0; i < parameters.Count; i++) - { - canAdd = true; - for (int x = 0; x < prunedList.Count; x++) - { - if (prunedList[x] == parameters[i]) //This is where the bulk of our logic lies - { - canAdd = false; - break; - } - } - if (canAdd) prunedList.Add(parameters[i]); - } - return prunedList; - } - #endregion - - #region READING - /* Read offset info & count, jump to the offset & return the count */ - private int JumpToOffset(ref BinaryReader reader) - { - CommandsOffsetPair pair = Utilities.Consume(reader); - reader.BaseStream.Position = pair.offset * 4; - return pair.count; + return true; } /* Read the parameter and composite offsets & get entry points */ - private bool Load(string path) + override protected bool Load() { - if (!File.Exists(path)) return false; - BinaryReader reader = new BinaryReader(File.OpenRead(path)); + if (!File.Exists(_filepath)) return false; + + BinaryReader reader = new BinaryReader(File.OpenRead(_filepath)); //Read entry points - _entryPoints = Utilities.Consume(reader); + _entryPoints = new ShortGuid[3]; + for (int i = 0; i < 3; i++) _entryPoints[i] = Utilities.Consume(reader); //Read parameter/composite counts int parameter_offset_pos = reader.ReadInt32() * 4; @@ -667,78 +654,70 @@ private bool Load(string path) int[] compositeOffsets = Utilities.ConsumeArray(reader, composite_count); //Read all parameters from the PAK - Dictionary parameters = new Dictionary(parameter_count); + Dictionary parameters = new Dictionary(parameter_count); for (int i = 0; i < parameter_count; i++) { reader.BaseStream.Position = parameterOffsets[i] * 4; - CathodeParameter this_parameter = new CathodeParameter(CommandsUtils.GetDataType(new ShortGuid(reader))); + ParameterData this_parameter = new ParameterData(CommandsUtils.GetDataType(new ShortGuid(reader))); switch (this_parameter.dataType) { - case CathodeDataType.POSITION: - this_parameter = new CathodeTransform(); - ((CathodeTransform)this_parameter).position = new Vector3(reader.ReadSingle(), reader.ReadSingle(), reader.ReadSingle()); + case DataType.TRANSFORM: + this_parameter = new cTransform(); + ((cTransform)this_parameter).position = new Vector3(reader.ReadSingle(), reader.ReadSingle(), reader.ReadSingle()); float _x, _y, _z; _y = reader.ReadSingle(); _x = reader.ReadSingle(); _z = reader.ReadSingle(); //Y,X,Z! - ((CathodeTransform)this_parameter).rotation = new Vector3(_x, _y, _z); + ((cTransform)this_parameter).rotation = new Vector3(_x, _y, _z); break; - case CathodeDataType.INTEGER: - this_parameter = new CathodeInteger(); - ((CathodeInteger)this_parameter).value = reader.ReadInt32(); + case DataType.INTEGER: + this_parameter = new cInteger(reader.ReadInt32()); break; - case CathodeDataType.STRING: - this_parameter = new CathodeString(); + case DataType.STRING: reader.BaseStream.Position += 8; - ((CathodeString)this_parameter).value = Utilities.ReadString(reader); + this_parameter = new cString(Utilities.ReadString(reader)); Utilities.Align(reader, 4); break; - case CathodeDataType.BOOL: - this_parameter = new CathodeBool(); - ((CathodeBool)this_parameter).value = (reader.ReadInt32() == 1); + case DataType.BOOL: + this_parameter = new cBool((reader.ReadInt32() == 1)); break; - case CathodeDataType.FLOAT: - this_parameter = new CathodeFloat(); - ((CathodeFloat)this_parameter).value = reader.ReadSingle(); + case DataType.FLOAT: + this_parameter = new cFloat(reader.ReadSingle()); break; - case CathodeDataType.SHORT_GUID: - this_parameter = new CathodeResource(); - ((CathodeResource)this_parameter).resourceID = new ShortGuid(reader); + case DataType.RESOURCE: + this_parameter = new cResource(new ShortGuid(reader)); break; - case CathodeDataType.DIRECTION: - this_parameter = new CathodeVector3(); - ((CathodeVector3)this_parameter).value = new Vector3(reader.ReadSingle(), reader.ReadSingle(), reader.ReadSingle()); + case DataType.VECTOR: + this_parameter = new cVector3(new Vector3(reader.ReadSingle(), reader.ReadSingle(), reader.ReadSingle())); break; - case CathodeDataType.ENUM: - this_parameter = new CathodeEnum(); - ((CathodeEnum)this_parameter).enumID = new ShortGuid(reader); - ((CathodeEnum)this_parameter).enumIndex = reader.ReadInt32(); + case DataType.ENUM: + this_parameter = new cEnum(new ShortGuid(reader), reader.ReadInt32()); break; - case CathodeDataType.SPLINE_DATA: - this_parameter = new CathodeSpline(); + case DataType.SPLINE: reader.BaseStream.Position += 4; - int num_points = reader.ReadInt32(); - for (int x = 0; x < num_points; x++) + List points = new List(reader.ReadInt32()); + for (int x = 0; x < points.Capacity; x++) { - CathodeTransform this_point = new CathodeTransform(); - this_point.position = new Vector3(reader.ReadSingle(), reader.ReadSingle(), reader.ReadSingle()); - this_point.rotation = new Vector3(reader.ReadSingle(), reader.ReadSingle(), reader.ReadSingle()); //TODO is this YXZ? - ((CathodeSpline)this_parameter).splinePoints.Add(this_point); + points.Add(new cTransform( + new Vector3(reader.ReadSingle(), reader.ReadSingle(), reader.ReadSingle()), + new Vector3(reader.ReadSingle(), reader.ReadSingle(), reader.ReadSingle()) //TODO is this YXZ? + )); } + this_parameter = new cSpline(points); break; } parameters.Add(parameterOffsets[i], this_parameter); } //Read all composites from the PAK - CathodeComposite[] composites = new CathodeComposite[composite_count]; + Composite[] composites = new Composite[composite_count]; for (int i = 0; i < composite_count; i++) { reader.BaseStream.Position = compositeOffsets[i] * 4; reader.BaseStream.Position += 4; //Skip 0x00,0x00,0x00,0x00 - CathodeComposite composite = new CathodeComposite(); + Composite composite = new Composite(); //Read the offsets and counts - OffsetPair[] offsetPairs = new OffsetPair[(int)CommandsDataBlock.NUMBER_OF_SCRIPT_BLOCKS]; + OffsetPair[] offsetPairs = new OffsetPair[(int)DataBlock.NUMBER_OF_SCRIPT_BLOCKS]; int scriptStartOffset = 0; - for (int x = 0; x < (int)CommandsDataBlock.NUMBER_OF_SCRIPT_BLOCKS; x++) + for (int x = 0; x < (int)DataBlock.NUMBER_OF_SCRIPT_BLOCKS; x++) { if (x == 0) { @@ -763,24 +742,24 @@ private bool Load(string path) //Pull data from those offsets List entityLinks = new List(); List paramRefSets = new List(); - List resourceRefs = new List(); + List resourceRefs = new List(); Dictionary overrideChecksums = new Dictionary(); for (int x = 0; x < offsetPairs.Length; x++) { reader.BaseStream.Position = offsetPairs[x].GlobalOffset * 4; for (int y = 0; y < offsetPairs[x].EntryCount; y++) { - switch ((CommandsDataBlock)x) + switch ((DataBlock)x) { - case CommandsDataBlock.ENTITY_CONNECTIONS: + case DataBlock.ENTITY_CONNECTIONS: { reader.BaseStream.Position = (offsetPairs[x].GlobalOffset * 4) + (y * 12); entityLinks.Add(new CommandsEntityLinks(new ShortGuid(reader))); int NumberOfParams = JumpToOffset(ref reader); - entityLinks[entityLinks.Count - 1].childLinks.AddRange(Utilities.ConsumeArray(reader, NumberOfParams)); + entityLinks[entityLinks.Count - 1].childLinks.AddRange(Utilities.ConsumeArray(reader, NumberOfParams)); break; } - case CommandsDataBlock.ENTITY_PARAMETERS: + case DataBlock.ENTITY_PARAMETERS: { reader.BaseStream.Position = (offsetPairs[x].GlobalOffset * 4) + (y * 12); paramRefSets.Add(new CommandsParamRefSet(new ShortGuid(reader))); @@ -788,7 +767,7 @@ private bool Load(string path) paramRefSets[paramRefSets.Count - 1].refs.AddRange(Utilities.ConsumeArray(reader, NumberOfParams)); break; } - case CommandsDataBlock.ENTITY_OVERRIDES: + case DataBlock.ENTITY_OVERRIDES: { reader.BaseStream.Position = (offsetPairs[x].GlobalOffset * 4) + (y * 12); OverrideEntity overrider = new OverrideEntity(new ShortGuid(reader)); @@ -797,24 +776,24 @@ private bool Load(string path) composite.overrides.Add(overrider); break; } - case CommandsDataBlock.ENTITY_OVERRIDES_CHECKSUM: + case DataBlock.ENTITY_OVERRIDES_CHECKSUM: { reader.BaseStream.Position = (offsetPairs[x].GlobalOffset * 4) + (y * 8); overrideChecksums.Add(new ShortGuid(reader), new ShortGuid(reader)); break; - } + } //TODO: Really, I think these should be treated as parameters on the composite class as they are the pins we use for composite instances. // Need to look into this more and see if any of these entities actually contain much data other than links into the composite itself. - case CommandsDataBlock.COMPOSITE_EXPOSED_PARAMETERS: + case DataBlock.COMPOSITE_EXPOSED_PARAMETERS: { reader.BaseStream.Position = (offsetPairs[x].GlobalOffset * 4) + (y * 12); - DatatypeEntity dtEntity = new DatatypeEntity(new ShortGuid(reader)); + VariableEntity dtEntity = new VariableEntity(new ShortGuid(reader)); dtEntity.type = CommandsUtils.GetDataType(new ShortGuid(reader)); dtEntity.parameter = new ShortGuid(reader); - composite.datatypes.Add(dtEntity); + composite.variables.Add(dtEntity); break; } - case CommandsDataBlock.ENTITY_PROXIES: + case DataBlock.ENTITY_PROXIES: { reader.BaseStream.Position = (offsetPairs[x].GlobalOffset * 4) + (y * 20); ProxyEntity thisProxy = new ProxyEntity(new ShortGuid(reader)); @@ -828,7 +807,7 @@ private bool Load(string path) composite.proxies.Add(thisProxy); break; } - case CommandsDataBlock.ENTITY_FUNCTIONS: + case DataBlock.ENTITY_FUNCTIONS: { reader.BaseStream.Position = (offsetPairs[x].GlobalOffset * 4) + (y * 8); ShortGuid entityID = new ShortGuid(reader); @@ -836,14 +815,14 @@ private bool Load(string path) if (CommandsUtils.FunctionTypeExists(functionID)) { //This entity executes a hard-coded CATHODE function - CathodeFunctionType functionType = CommandsUtils.GetFunctionType(functionID); + FunctionType functionType = CommandsUtils.GetFunctionType(functionID); switch (functionType) { - case CathodeFunctionType.CAGEAnimation: + case FunctionType.CAGEAnimation: CAGEAnimation cageAnimation = new CAGEAnimation(entityID); composite.functions.Add(cageAnimation); break; - case CathodeFunctionType.TriggerSequence: + case FunctionType.TriggerSequence: TriggerSequence triggerSequence = new TriggerSequence(entityID); composite.functions.Add(triggerSequence); break; @@ -863,50 +842,45 @@ private bool Load(string path) } break; } - //TODO: this case needs a refactor! - case CommandsDataBlock.RESOURCE_REFERENCES: + case DataBlock.RESOURCE_REFERENCES: { reader.BaseStream.Position = (offsetPairs[x].GlobalOffset * 4) + (y * 40); - //TODO: these values change by entry type - need to work out what they're for before allowing editing - CathodeResourceReference resource_ref = new CathodeResourceReference(); - resource_ref.resourceRefID = new ShortGuid(reader); //renderable element ID (also used in one of the param blocks for something) - resource_ref.unknownID1 = new ShortGuid(reader); //unk (sometimes 0x00 x4?) - resource_ref.positionOffset = new Vector3(reader.ReadSingle(), reader.ReadSingle(), reader.ReadSingle()); //position offset - resource_ref.unknownID2 = new ShortGuid(reader); //unk (sometimes 0x00 x4?) - resource_ref.resourceID = new ShortGuid(reader); //resource id - resource_ref.entryType = CommandsUtils.GetResourceEntryType(reader.ReadBytes(4)); //entry type - switch (resource_ref.entryType) + ResourceReference resource = new ResourceReference(); + resource.position = new Vector3(reader.ReadSingle(), reader.ReadSingle(), reader.ReadSingle()); + resource.rotation = new Vector3(reader.ReadSingle(), reader.ReadSingle(), reader.ReadSingle()); + resource.resourceID = new ShortGuid(reader); + resource.entryType = CommandsUtils.GetResourceEntryType(reader.ReadBytes(4)); + switch (resource.entryType) { - case CathodeResourceReferenceType.RENDERABLE_INSTANCE: - resource_ref.entryIndexREDS = reader.ReadInt32(); //REDS.BIN entry index - resource_ref.entryCountREDS = reader.ReadInt32(); //REDS.BIN entry count + case ResourceType.RENDERABLE_INSTANCE: + resource.startIndex = reader.ReadInt32(); //REDS.BIN entry index + resource.count = reader.ReadInt32(); //REDS.BIN entry count break; - case CathodeResourceReferenceType.COLLISION_MAPPING: - resource_ref.unknownInteger1 = reader.ReadInt32(); //unknown integer (COLLISION.MAP index?) - resource_ref.entityID = new ShortGuid(reader); //ID which maps to the entity using the resource (?) - check GetFriendlyName + case ResourceType.COLLISION_MAPPING: + resource.startIndex = reader.ReadInt32(); //COLLISION.MAP entry index? + resource.entityID = new ShortGuid(reader); //ID which maps to the entity using the resource (?) - check GetFriendlyName break; - case CathodeResourceReferenceType.EXCLUSIVE_MASTER_STATE_RESOURCE: - case CathodeResourceReferenceType.NAV_MESH_BARRIER_RESOURCE: - case CathodeResourceReferenceType.TRAVERSAL_SEGMENT: - resource_ref.unknownInteger1 = reader.ReadInt32(); //always -1? - resource_ref.unknownInteger2 = reader.ReadInt32(); //always -1? + case ResourceType.ANIMATED_MODEL: + case ResourceType.DYNAMIC_PHYSICS_SYSTEM: + resource.startIndex = reader.ReadInt32(); //PHYSICS.MAP entry index? + reader.BaseStream.Position += 4; break; - case CathodeResourceReferenceType.ANIMATED_MODEL: - case CathodeResourceReferenceType.DYNAMIC_PHYSICS_SYSTEM: - resource_ref.unknownInteger1 = reader.ReadInt32(); //unknown integer - resource_ref.unknownInteger2 = reader.ReadInt32(); //always zero/-1? + case ResourceType.EXCLUSIVE_MASTER_STATE_RESOURCE: + case ResourceType.NAV_MESH_BARRIER_RESOURCE: + case ResourceType.TRAVERSAL_SEGMENT: + reader.BaseStream.Position += 8; break; } - resourceRefs.Add(resource_ref); + resourceRefs.Add(resource); break; } - case CommandsDataBlock.CAGEANIMATION_DATA: + case DataBlock.CAGEANIMATION_DATA: { reader.BaseStream.Position = (offsetPairs[x].GlobalOffset * 4) + (y * 4); reader.BaseStream.Position = (reader.ReadInt32() * 4); - CathodeEntity thisEntity = composite.GetEntityByID(new ShortGuid(reader)); + Entity thisEntity = composite.GetEntityByID(new ShortGuid(reader)); if (thisEntity.variant == EntityVariant.PROXY) { break; // We don't handle this just yet... need to resolve the proxy. @@ -993,12 +967,12 @@ private bool Load(string path) } break; } - case CommandsDataBlock.TRIGGERSEQUENCE_DATA: + case DataBlock.TRIGGERSEQUENCE_DATA: { reader.BaseStream.Position = (offsetPairs[x].GlobalOffset * 4) + (y * 4); reader.BaseStream.Position = (reader.ReadInt32() * 4); - CathodeEntity thisEntity = composite.GetEntityByID(new ShortGuid(reader)); + Entity thisEntity = composite.GetEntityByID(new ShortGuid(reader)); if (thisEntity.variant == EntityVariant.PROXY) { break; // We don't handle this just yet... need to resolve the proxy. @@ -1045,79 +1019,53 @@ private bool Load(string path) //Apply connections between entities for (int x = 0; x < entityLinks.Count; x++) - { - CathodeEntity entToApply = composite.GetEntityByID(entityLinks[x].parentID); - if (entToApply == null) - { - //TODO: We shouldn't hit this, but we do... is this perhaps an ID from another composite, similar to proxies? - entToApply = new CathodeEntity(entityLinks[x].parentID); - composite.unknowns.Add(entToApply); - } - entToApply.childLinks.AddRange(entityLinks[x].childLinks); - } + composite.GetEntityByID(entityLinks[x].parentID)?.childLinks.AddRange(entityLinks[x].childLinks); - //Apply parameters to entities + //Clone parameter data to entities for (int x = 0; x < paramRefSets.Count; x++) { - CathodeEntity entToApply = composite.GetEntityByID(paramRefSets[x].id); - if (entToApply == null) - { - //TODO: We shouldn't hit this, but we do... is this perhaps an ID from another composite, similar to proxies? - entToApply = new CathodeEntity(paramRefSets[x].id); - composite.unknowns.Add(entToApply); - } + Entity entToApply = composite.GetEntityByID(paramRefSets[x].id); + if (entToApply == null) continue; for (int y = 0; y < paramRefSets[x].refs.Count; y++) - { - entToApply.parameters.Add(new CathodeLoadedParameter(paramRefSets[x].refs[y].paramID, (CathodeParameter)parameters[paramRefSets[x].refs[y].offset].Clone())); - } + entToApply.parameters.Add(new Parameter(paramRefSets[x].refs[y].paramID, (ParameterData)parameters[paramRefSets[x].refs[y].offset].Clone())); } - //Remap resources (TODO: This can be optimised) - List ents = composite.GetEntities(); + //Remap resource references ShortGuid resParamID = ShortGuidUtils.Generate("resource"); - //Check to see if this resource applies to an ENTITY - List resourceRefsCulled = new List(); - for (int x = 0; x < resourceRefs.Count; x++) + ShortGuid physEntID = ShortGuidUtils.Generate("PhysicsSystem"); + //Check to see if this resource applies to a PARAMETER on an entity + for (int x = 0; x < composite.functions.Count; x++) { - CathodeEntity ent = ents.FirstOrDefault(o => o.shortGUID == resourceRefs[x].resourceID); - if (ent != null) + for (int y = 0; y < composite.functions[x].parameters.Count; y++) { - ent.resources.Add(resourceRefs[x]); - continue; + if (composite.functions[x].parameters[y].shortGUID != resParamID) continue; + + cResource resourceParam = (cResource)composite.functions[x].parameters[y].content; + resourceParam.value.AddRange(resourceRefs.Where(o => o.resourceID == resourceParam.resourceID)); + resourceRefs.RemoveAll(o => o.resourceID == resourceParam.resourceID); } - resourceRefsCulled.Add(resourceRefs[x]); } - resourceRefs = resourceRefsCulled; - //Check to see if this resource applies to a PARAMETER - for (int z = 0; z < ents.Count; z++) + //Check to see if this resource applies directly to an ENTITY + for (int x = 0; x < composite.functions.Count; x++) { - for (int y = 0; y < ents[z].parameters.Count; y++) - { - if (ents[z].parameters[y].shortGUID != resParamID) continue; - - CathodeResource resourceParam = (CathodeResource)ents[z].parameters[y].content; - resourceRefsCulled = new List(); - for (int m = 0; m < resourceRefs.Count; m++) - { - if (resourceParam.resourceID == resourceRefs[m].resourceID) - { - resourceParam.value.Add(resourceRefs[m]); - continue; - } - resourceRefsCulled.Add(resourceRefs[m]); - } - resourceRefs = resourceRefsCulled; - } + composite.functions[x].resources.AddRange(resourceRefs.Where(o => o.resourceID == composite.functions[x].shortGUID)); + resourceRefs.RemoveAll(o => o.resourceID == composite.functions[x].shortGUID); + } + //Any that are left over will be applied to PhysicsSystem entities + if (resourceRefs.Count == 1 && resourceRefs[0].entryType == ResourceType.DYNAMIC_PHYSICS_SYSTEM) + { + FunctionEntity physEnt = composite.functions.FirstOrDefault(o => o.function == physEntID); + if (physEnt != null) physEnt.resources.Add(resourceRefs[0]); } - //If it applied to none of the above, apply it to the COMPOSITE - for (int z = 0; z < resourceRefs.Count; z++) + else if (resourceRefs.Count != 0) { - composite.resources.Add(resourceRefs[z]); + Console.WriteLine("WARNING: This composite contains unexpected trailing resources!"); } + resourceRefs.Clear(); composites[i] = composite; } - _composites = composites.ToList(); + _composites = composites.ToList(); reader.Close(); OnLoaded?.Invoke(); @@ -1125,45 +1073,122 @@ private bool Load(string path) } #endregion - private string _path = ""; + #region ACCESSORS + /* Return a list of filenames for composites in the CommandsPAK archive */ + public string[] GetCompositeNames() + { + string[] toReturn = new string[_composites.Count]; + for (int i = 0; i < _composites.Count; i++) toReturn[i] = _composites[i].name; + return toReturn; + } - private CommandsEntryPoints _entryPoints; - private CathodeComposite[] _entryPointObjects = null; + /* Find the a script entry object by name */ + public int GetFileIndex(string FileName) + { + for (int i = 0; i < _composites.Count; i++) if (_composites[i].name == FileName || _composites[i].name == FileName.Replace('/', '\\')) return i; + return -1; + } - private List _composites = null; + /* Get an individual composite */ + public Composite GetComposite(ShortGuid id) + { + if (id.val == null) return null; + return _composites.FirstOrDefault(o => o.shortGUID == id); + } + public Composite GetCompositeByIndex(int index) + { + return (index >= _composites.Count || index < 0) ? null : _composites[index]; + } - private bool _didLoadCorrectly = false; - public bool Loaded { get { return _didLoadCorrectly; } } - public string Filepath { get { return _path; } } - } + /* Get all composites */ + public List Composites { get { return _composites; } } - [StructLayout(LayoutKind.Sequential, Pack = 1)] - public struct CommandsEntryPoints - { - // This is always: - // - Root Instance (the map's entry composite, usually containing entities that call mission/environment composites) - // - Global Instance (the main data handler for keeping track of mission number, etc - kinda like a big singleton) - // - Pause Menu Instance + /* Get entry point composite objects */ + public Composite[] EntryPoints + { + get + { + if (_entryPoints == null) return null; + if (_entryPointObjects != null) return _entryPointObjects; + _entryPointObjects = new Composite[_entryPoints.Length]; + for (int i = 0; i < _entryPoints.Length; i++) _entryPointObjects[i] = GetComposite(_entryPoints[i]); + return _entryPointObjects; + } + } - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] - public ShortGuid[] compositeIDs; - } + /* Set the root composite for this COMMANDS.PAK (the root of the level - GLOBAL and PAUSEMENU are also instanced) */ + public void SetRootComposite(ShortGuid id) + { + _entryPoints[0] = id; + _entryPointObjects = null; + } + #endregion - [StructLayout(LayoutKind.Sequential, Pack = 1)] - public struct CommandsOffsetPair - { - public int offset; - public int count; - } + #region HELPERS + /* Read offset info & count, jump to the offset & return the count */ + private int JumpToOffset(ref BinaryReader reader) + { + int offset = reader.ReadInt32() * 4; + int count = reader.ReadInt32(); - [Serializable] - [StructLayout(LayoutKind.Sequential, Pack = 1)] - public struct CathodeEntityLink - { - public ShortGuid connectionID; //The unique ID for this connection - public ShortGuid parentParamID; //The ID of the parameter we're providing out - public ShortGuid childParamID; //The ID of the parameter we're providing into the child - public ShortGuid childID; //The ID of the entity we're linking to to provide the value for + reader.BaseStream.Position = offset; + return count; + } + + /* Filter down a list of parameters to contain only unique entries */ + private List PruneParameterList(List parameters) + { + List prunedList = new List(); + bool canAdd = true; + for (int i = 0; i < parameters.Count; i++) + { + canAdd = true; + for (int x = 0; x < prunedList.Count; x++) + { + if (prunedList[x] == parameters[i]) //This is where the bulk of our logic lies + { + canAdd = false; + break; + } + } + if (canAdd) prunedList.Add(parameters[i]); + } + return prunedList; + } + #endregion + + /* -- */ + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public struct CathodeParameterReference + { + public ShortGuid paramID; //The ID of the param in the entity + public int offset; //The offset of the param this reference points to (in memory this is *4) + } + + public class CommandsEntityLinks + { + public ShortGuid parentID; + public List childLinks = new List(); + + public CommandsEntityLinks(ShortGuid _id) + { + parentID = _id; + } + } + + public class CommandsParamRefSet + { + public int Index = -1; //TEMP TEST + + public ShortGuid id; + public List refs = new List(); + + public CommandsParamRefSet(ShortGuid _id) + { + id = _id; + } + } } [StructLayout(LayoutKind.Sequential, Pack = 1)] @@ -1184,47 +1209,16 @@ public OffsetPair(long _go, int _ec) } } - [StructLayout(LayoutKind.Sequential, Pack = 1)] - public struct CathodeParameterReference - { - public ShortGuid paramID; //The ID of the param in the entity - public int offset; //The offset of the param this reference points to (in memory this is *4) - } - - public class CommandsEntityLinks - { - public ShortGuid parentID; - public List childLinks = new List(); - - public CommandsEntityLinks(ShortGuid _id) - { - parentID = _id; - } - } - - public class CommandsParamRefSet - { - public int Index = -1; //TEMP TEST - - public ShortGuid id; - public List refs = new List(); - - public CommandsParamRefSet(ShortGuid _id) - { - id = _id; - } - } - /* TEMP STUFF TO FIX REWRITING */ [Serializable] public class CathodeParameterKeyframeHeader { public ShortGuid ID; - public CathodeDataType unk2; + public DataType unk2; public ShortGuid keyframeDataID; //public float unk3; public ShortGuid parameterID; - public CathodeDataType parameterDataType; + public DataType parameterDataType; public ShortGuid parameterSubID; //if parameterID is position, this might be x for example public List connectedEntity; //path to controlled entity } diff --git a/CathodeLib/Scripts/CATHODE/CommandsPAK/Components/Composite.cs b/CathodeLib/Scripts/CATHODE/CommandsPAK/Components/Composite.cs new file mode 100644 index 0000000..935cc0b --- /dev/null +++ b/CathodeLib/Scripts/CATHODE/CommandsPAK/Components/Composite.cs @@ -0,0 +1,78 @@ +using System; +using System.Collections.Generic; +using System.Linq; +#if UNITY_EDITOR || UNITY_STANDALONE +using UnityEngine; +#else +#endif + +namespace CATHODE.Scripting +{ + /* A script composite containing entities */ + [Serializable] + public class Composite + { + public ShortGuid shortGUID; //The id when this composite is used as an entity in another composite + public string name = ""; //The string name of the composite + + public OffsetPair unknownPair; + + public List variables = new List(); //Variables which can be accessed outside of this flowgraph as parameters, and connected to nodes as parameters internally + public List functions = new List(); //Functional nodes, including hard-coded functions and references to other composites + + public List overrides = new List(); //Overrides of parameters in child composites + public List proxies = new List(); //Instances of entities from other composites + + /* If an entity exists in the composite, return it */ + public Entity GetEntityByID(ShortGuid id) + { + foreach (Entity entity in variables) if (entity.shortGUID == id) return entity; + foreach (Entity entity in functions) if (entity.shortGUID == id) return entity; + foreach (Entity entity in overrides) if (entity.shortGUID == id) return entity; + foreach (Entity entity in proxies) if (entity.shortGUID == id) return entity; + return null; + } + + /* Returns a collection of all entities in the composite */ + public List GetEntities() + { + List toReturn = new List(); + toReturn.AddRange(variables); + toReturn.AddRange(functions); + toReturn.AddRange(overrides); + toReturn.AddRange(proxies); + return toReturn; + } + + /* Sort all entity arrays */ + public void SortEntities() + { + variables.OrderBy(o => o.shortGUID.ToUInt32()); + functions.OrderBy(o => o.shortGUID.ToUInt32()); + overrides.OrderBy(o => o.shortGUID.ToUInt32()); + proxies.OrderBy(o => o.shortGUID.ToUInt32()); + } + + /* Add a new function entity */ + public FunctionEntity AddFunction(string function, bool autopopulateParameters = false) + { + FunctionEntity func = new FunctionEntity(function, autopopulateParameters); + functions.Add(func); + return func; + } + public FunctionEntity AddFunction(Composite function, bool autopopulateParameters = false) + { + FunctionEntity func = new FunctionEntity(function.shortGUID, autopopulateParameters); + functions.Add(func); + return func; + } + + /* Add a new variable entity */ + public VariableEntity AddVariable(string parameter, DataType type, bool addDefaultParam = false) + { + VariableEntity vari = new VariableEntity(parameter, type, addDefaultParam); + variables.Add(vari); + return vari; + } + } +} diff --git a/CathodeLib/Scripts/CATHODE/CommandsPAK/Components/Entity.cs b/CathodeLib/Scripts/CATHODE/CommandsPAK/Components/Entity.cs new file mode 100644 index 0000000..aec1d05 --- /dev/null +++ b/CathodeLib/Scripts/CATHODE/CommandsPAK/Components/Entity.cs @@ -0,0 +1,272 @@ +using CATHODE.Assets.Utilities; +using CATHODE.Scripting; +using CathodeLib; +using CathodeLib.Properties; +using System; +using System.Collections.Generic; +using System.Diagnostics; +using System.Diagnostics.SymbolStore; +using System.Linq; +using System.Runtime.InteropServices; + +namespace CATHODE.Scripting +{ + /* An entity in a composite */ + [Serializable] + public class Entity : IComparable + { + public Entity(EntityVariant variant) + { + this.shortGUID = ShortGuidUtils.GenerateRandom(); + this.variant = variant; + } + public Entity(ShortGuid shortGUID, EntityVariant variant) + { + this.shortGUID = shortGUID; + this.variant = variant; + } + + public ShortGuid shortGUID; //Translates to string via EntityNameLookup.GetEntityName + public EntityVariant variant; + + public List childLinks = new List(); + public List parameters = new List(); + + /* Implements IComparable for searching */ + public int CompareTo(Entity other) + { + int TotalThis = shortGUID.val[0] + shortGUID.val[1] + shortGUID.val[2] + shortGUID.val[3]; + int TotalOther = other.shortGUID.val[0] + other.shortGUID.val[1] + other.shortGUID.val[2] + other.shortGUID.val[3]; + if (TotalThis > TotalOther) return 1; + else if (TotalThis == TotalOther) return 0; + return -1; + } + + /* Get parameter by string name or ShortGuid */ + public Parameter GetParameter(string name) + { + ShortGuid id = ShortGuidUtils.Generate(name); + return GetParameter(id); + } + public Parameter GetParameter(ShortGuid id) + { + return parameters.FirstOrDefault(o => o.shortGUID == id); + } + + /* Add a data-supplying parameter to the entity */ + public Parameter AddParameter(string name, ParameterData data, ParameterVariant variant = ParameterVariant.PARAMETER) + { + //TODO: we are limiting data-supplying params to ONE per entity here - is this correct? I think links are the only place where you can have multiple of the same. + ShortGuid id = ShortGuidUtils.Generate(name); + Parameter param = GetParameter(id); + if (param == null) + { + param = new Parameter(id, data, variant); + parameters.Add(param); + } + else + { + Console.WriteLine("WARNING: Updating data and variant type in parameter " + id); + param.content = data; + param.variant = variant; + } + return param; + } + + /* Remove a parameter from the entity */ + public void RemoveParameter(string name) + { + ShortGuid name_id = ShortGuidUtils.Generate(name); + parameters.RemoveAll(o => o.shortGUID == name_id); + } + + /* Add a link from a parameter on us out to a parameter on another entity */ + public void AddParameterLink(string parameter, Entity childEntity, string childParameter) + { + childLinks.Add(new EntityLink(childEntity.shortGUID, ShortGuidUtils.Generate(parameter), ShortGuidUtils.Generate(childParameter))); + } + + /* Remove a link to another entity */ + public void RemoveParameterLink(string parameter, Entity childEntity, string childParameter) + { + ShortGuid parameter_id = ShortGuidUtils.Generate(parameter); + ShortGuid childParameter_id = ShortGuidUtils.Generate(childParameter); + //TODO: do we want to do RemoveAll? should probably just remove the first + childLinks.RemoveAll(o => o.parentParamID == parameter_id && o.childID == childEntity.shortGUID && o.childParamID == childParameter_id); + } + } + [Serializable] + public class VariableEntity : Entity + { + public VariableEntity(bool addDefaultParam = false) : base(EntityVariant.DATATYPE) { if (addDefaultParam) AddDefaultParam(); } + public VariableEntity(ShortGuid shortGUID, bool addDefaultParam = false) : base(shortGUID, EntityVariant.DATATYPE) { if (addDefaultParam) AddDefaultParam(); } + + public VariableEntity(string parameter, DataType type, bool addDefaultParam = false) : base(EntityVariant.DATATYPE) + { + this.parameter = ShortGuidUtils.Generate(parameter); + this.type = type; + if (addDefaultParam) AddDefaultParam(); + } + + public VariableEntity(ShortGuid shortGUID, ShortGuid parameter, DataType type, bool addDefaultParam = false) : base(shortGUID, EntityVariant.DATATYPE) + { + this.parameter = parameter; + this.type = type; + if (addDefaultParam) AddDefaultParam(); + } + public VariableEntity(ShortGuid shortGUID, string parameter, DataType type, bool addDefaultParam = false) : base(shortGUID, EntityVariant.DATATYPE) + { + this.parameter = ShortGuidUtils.Generate(parameter); + this.type = type; + if (addDefaultParam) AddDefaultParam(); + } + + /* Add a default parameter on us when created, to provide a value from */ + private void AddDefaultParam() + { + ParameterData thisParam = null; + switch (type) + { + case DataType.STRING: + thisParam = new cString(""); + break; + case DataType.FLOAT: + thisParam = new cFloat(0.0f); + break; + case DataType.INTEGER: + thisParam = new cInteger(0); + break; + case DataType.BOOL: + thisParam = new cBool(true); + break; + case DataType.VECTOR: + thisParam = new cVector3(new Vector3(0, 0, 0)); + break; + case DataType.TRANSFORM: + thisParam = new cTransform(new Vector3(0, 0, 0), new Vector3(0, 0, 0)); + break; + case DataType.ENUM: + thisParam = new cEnum("ALERTNESS_STATE", 0); //ALERTNESS_STATE is the first alphabetically + break; + case DataType.SPLINE: + thisParam = new cSpline(); + break; + } + parameters.Add(new Parameter(parameter, thisParam)); + } + + public ShortGuid parameter; //Translates to string via ShortGuidUtils.FindString + public DataType type = DataType.NONE; + } + [Serializable] + public class FunctionEntity : Entity + { + public FunctionEntity() : base(EntityVariant.FUNCTION) { } + public FunctionEntity(ShortGuid shortGUID) : base(shortGUID, EntityVariant.FUNCTION) { } + + public FunctionEntity(string function, bool autoGenerateParameters = false) : base(EntityVariant.FUNCTION) + { + this.function = ShortGuidUtils.Generate(function); + if (autoGenerateParameters) EntityUtils.ApplyDefaults(this); + } + public FunctionEntity(ShortGuid function, bool autoGenerateParameters = false) : base(EntityVariant.FUNCTION) + { + this.function = function; + if (autoGenerateParameters) EntityUtils.ApplyDefaults(this); + } + + public FunctionEntity(ShortGuid shortGUID, ShortGuid function, bool autoGenerateParameters = false) : base(shortGUID, EntityVariant.FUNCTION) + { + this.function = function; + if (autoGenerateParameters) EntityUtils.ApplyDefaults(this); + } + public FunctionEntity(ShortGuid shortGUID, string function, bool autoGenerateParameters = false) : base(shortGUID, EntityVariant.FUNCTION) + { + this.function = ShortGuidUtils.Generate(function); + if (autoGenerateParameters) EntityUtils.ApplyDefaults(this); + } + + public ShortGuid function; //Translates to string via ShortGuidUtils.FindString + public List resources = new List(); //TODO: can we replace this with a cResource to save duplicating functionality? + + /* Add a new resource reference of type */ + public ResourceReference AddResource(ResourceType type) + { + //We can only have one type of resource reference per function entity, so if it already exists, we just return the existing one. + ResourceReference rr = GetResource(type); + if (rr == null) + { + rr = new ResourceReference(type); + rr.resourceID = shortGUID; + switch (rr.entryType) + { + case ResourceType.DYNAMIC_PHYSICS_SYSTEM: + case ResourceType.RENDERABLE_INSTANCE: + case ResourceType.ANIMATED_MODEL: + rr.startIndex = 0; + break; + } + resources.Add(rr); + } + return rr; + } + + /* Find a resource reference of type */ + public ResourceReference GetResource(ResourceType type) + { + return resources.FirstOrDefault(o => o.entryType == type); + } + } + [Serializable] + public class ProxyEntity : Entity + { + public ProxyEntity(ShortGuid shortGUID) : base(shortGUID, EntityVariant.PROXY) { } + + public ShortGuid extraId; //TODO: I'm unsure if this is actually used by the game - we might not need to store it and just make up something when we write. + public List hierarchy = new List(); + } + [Serializable] + public class OverrideEntity : Entity + { + public OverrideEntity(ShortGuid shortGUID) : base(shortGUID, EntityVariant.OVERRIDE) { } + + public ShortGuid checksum; //TODO: This value is apparently a hash of the hierarchy GUIDs, but need to verify that, and work out the salt. + public List hierarchy = new List(); + } + + #region SPECIAL FUNCTION ENTITIES + [Serializable] + public class CAGEAnimation : FunctionEntity + { + public CAGEAnimation(ShortGuid id) : base(id) { function = ShortGuidUtils.Generate("CAGEAnimation"); } + public List keyframeHeaders = new List(); + public List keyframeData = new List(); + public List paramsData3 = new List(); //events? + } + [Serializable] + public class TriggerSequence : FunctionEntity + { + public TriggerSequence(ShortGuid id) : base(id) { function = ShortGuidUtils.Generate("TriggerSequence"); } + public List triggers = new List(); + public List events = new List(); + } + #endregion + + [Serializable] + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public struct EntityLink + { + public EntityLink(ShortGuid childEntityID, ShortGuid parentParam, ShortGuid childParam) + { + connectionID = ShortGuidUtils.GenerateRandom(); + parentParamID = parentParam; + childParamID = childParam; + childID = childEntityID; + } + + public ShortGuid connectionID; //The unique ID for this connection + public ShortGuid parentParamID; //The ID of the parameter we're providing out + public ShortGuid childParamID; //The ID of the parameter we're providing into the child + public ShortGuid childID; //The ID of the entity we're linking to to provide the value for + } +} diff --git a/CathodeLib/Scripts/CATHODE/CommandsPAK/Components/Parameter.cs b/CathodeLib/Scripts/CATHODE/CommandsPAK/Components/Parameter.cs new file mode 100644 index 0000000..063af40 --- /dev/null +++ b/CathodeLib/Scripts/CATHODE/CommandsPAK/Components/Parameter.cs @@ -0,0 +1,28 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace CATHODE.Scripting +{ + /* A parameter which consists of a name and data, with a variant for how it is used */ + [Serializable] + public class Parameter + { + public Parameter(string name, ParameterData data, ParameterVariant var = ParameterVariant.PARAMETER) + { + shortGUID = ShortGuidUtils.Generate(name); + content = data; + variant = var; + } + public Parameter(ShortGuid id, ParameterData data, ParameterVariant var = ParameterVariant.PARAMETER) + { + shortGUID = id; + content = data; + variant = var; + } + + public ShortGuid shortGUID; //The ID of the param in the entity + public ParameterData content = null; + public ParameterVariant variant = ParameterVariant.PARAMETER; + } +} diff --git a/CathodeLib/Scripts/CATHODE/CommandsPAK/Components/ParameterData.cs b/CathodeLib/Scripts/CATHODE/CommandsPAK/Components/ParameterData.cs new file mode 100644 index 0000000..b6c59fb --- /dev/null +++ b/CathodeLib/Scripts/CATHODE/CommandsPAK/Components/ParameterData.cs @@ -0,0 +1,291 @@ +using CathodeLib; +using CathodeLib.Properties; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; + +namespace CATHODE.Scripting +{ + /* Data which can be used within a parameter */ + [Serializable] + public class ParameterData : ICloneable + { + public ParameterData() { } + public ParameterData(DataType type) + { + dataType = type; + } + public DataType dataType = DataType.NONE; + + public static bool operator ==(ParameterData x, ParameterData y) + { + if (ReferenceEquals(x, null)) return ReferenceEquals(y, null); + if (ReferenceEquals(y, null)) return ReferenceEquals(x, null); + if (x.dataType != y.dataType) return false; + switch (x.dataType) + { + case DataType.TRANSFORM: + cTransform x_t = (cTransform)x; + cTransform y_t = (cTransform)y; + return x_t.position == y_t.position && x_t.rotation == y_t.rotation; + case DataType.INTEGER: + return ((cInteger)x).value == ((cInteger)y).value; + case DataType.STRING: + return ((cString)x).value == ((cString)y).value; + case DataType.BOOL: + return ((cBool)x).value == ((cBool)y).value; + case DataType.FLOAT: + return ((cFloat)x).value == ((cFloat)y).value; + case DataType.RESOURCE: + return ((cResource)x).resourceID == ((cResource)y).resourceID; + case DataType.VECTOR: + return ((cVector3)x).value == ((cVector3)y).value; + case DataType.ENUM: + cEnum x_e = (cEnum)x; + cEnum y_e = (cEnum)y; + return x_e.enumIndex == y_e.enumIndex && x_e.enumID == y_e.enumID; + case DataType.SPLINE: + return ((cSpline)x).splinePoints == ((cSpline)y).splinePoints; + case DataType.NONE: + return true; + default: + return false; + } + } + public static bool operator !=(ParameterData x, ParameterData y) + { + return !(x == y); + } + + public override bool Equals(object obj) + { + if (!(obj is ParameterData)) return false; + return ((ParameterData)obj) == this; + } + + public override int GetHashCode() + { + //this is gross + switch (dataType) + { + case DataType.TRANSFORM: + cTransform x_t = (cTransform)this; + return Convert.ToInt32( + x_t.rotation.x.ToString() + x_t.rotation.y.ToString() + x_t.rotation.z.ToString() + + x_t.position.x.ToString() + x_t.position.y.ToString() + x_t.position.z.ToString()); + case DataType.INTEGER: + return ((cInteger)this).value; + case DataType.STRING: + cString x_s = (cString)this; + string num = ""; + for (int i = 0; i < x_s.value.Length; i++) num += ((int)x_s.value[i]).ToString(); + return Convert.ToInt32(num); + case DataType.BOOL: + return ((cBool)this).value ? 1 : 0; + case DataType.FLOAT: + return Convert.ToInt32(((cFloat)this).value.ToString().Replace(".", "")); + case DataType.RESOURCE: + string x_g_s = ((cString)this).value.ToString(); + string num2 = ""; + for (int i = 0; i < x_g_s.Length; i++) num2 += ((int)x_g_s[i]).ToString(); + return Convert.ToInt32(num2); + case DataType.VECTOR: + cVector3 x_v = (cVector3)this; + return Convert.ToInt32(x_v.value.x.ToString() + x_v.value.y.ToString() + x_v.value.z.ToString()); + case DataType.ENUM: + cEnum x_e = (cEnum)this; + string x_e_s = x_e.enumID.ToString(); + string num3 = ""; + for (int i = 0; i < x_e_s.Length; i++) num3 += ((int)x_e_s[i]).ToString(); + return Convert.ToInt32(num3 + x_e.enumIndex.ToString()); + case DataType.SPLINE: + cSpline x_sd = (cSpline)this; + string x_sd_s = ""; + for (int i = 0; i < x_sd.splinePoints.Count; i++) x_sd_s += x_sd.splinePoints[i].position.GetHashCode().ToString(); + ShortGuid x_sd_g = ShortGuidUtils.Generate(x_sd_s); + string x_sd_g_s = x_sd_g.ToString(); + string num4 = ""; + for (int i = 0; i < x_sd_g_s.Length; i++) num4 += ((int)x_sd_g_s[i]).ToString(); + return Convert.ToInt32(num4); + default: + return -1; + } + } + + public object Clone() + { + switch (dataType) + { + case DataType.SPLINE: + case DataType.RESOURCE: + return Utilities.CloneObject(this); + //HOTFIX FOR VECTOR 3 CLONE ISSUE - TODO: FIND WHY THIS ISN'T WORKING WITH MEMBERWISE CLONE + case DataType.VECTOR: + cVector3 v3 = (cVector3)this.MemberwiseClone(); + v3.value = (Vector3)((cVector3)this).value.Clone(); + return v3; + case DataType.TRANSFORM: + cTransform tr = (cTransform)this.MemberwiseClone(); + tr.position = (Vector3)((cTransform)this).position.Clone(); + tr.rotation = (Vector3)((cTransform)this).rotation.Clone(); + return tr; + //END OF HOTFIX - SHOULD THIS ALSO APPLY TO OTHERS?? + default: + return this.MemberwiseClone(); + } + } + } + [Serializable] + public class cTransform : ParameterData + { + public cTransform() { dataType = DataType.TRANSFORM; } + public cTransform(Vector3 position, Vector3 rotation) + { + this.position = position; + this.rotation = rotation; + dataType = DataType.TRANSFORM; + } + + public Vector3 position = new Vector3(); + public Vector3 rotation = new Vector3(); //In CATHODE this is named Roll/Pitch/Yaw + } + [Serializable] + public class cInteger : ParameterData + { + public cInteger() { dataType = DataType.INTEGER; } + public cInteger(int value) + { + this.value = value; + dataType = DataType.INTEGER; + } + + public int value = 0; + } + [Serializable] + public class cString : ParameterData + { + public cString() { dataType = DataType.STRING; } + public cString(string value) + { + this.value = value; + dataType = DataType.STRING; + } + + public string value = ""; + } + [Serializable] + public class cBool : ParameterData + { + public cBool() { dataType = DataType.BOOL; } + public cBool(bool value) + { + this.value = value; + dataType = DataType.BOOL; + } + + public bool value = false; + } + [Serializable] + public class cFloat : ParameterData + { + public cFloat() { dataType = DataType.FLOAT; } + public cFloat(float value) + { + this.value = value; + dataType = DataType.FLOAT; + } + + public float value = 0.0f; + } + [Serializable] + public class cResource : ParameterData + { + public cResource() { dataType = DataType.RESOURCE; } + public cResource(ShortGuid resourceID) + { + this.resourceID = resourceID; + dataType = DataType.RESOURCE; + } + public cResource(List value, ShortGuid resourceID) + { + this.value = value; + this.resourceID = resourceID; + dataType = DataType.RESOURCE; + } + + public List value = new List(); + public ShortGuid resourceID; //TODO: this is only ever gonna be the parent of the resouce (node or entity) - should we just generate on compilation? + + /* Add a new resource reference of type */ + public ResourceReference AddResource(ResourceType type) + { + //We can only have one type of resource reference, so if it already exists, we just return the existing one. + ResourceReference rr = GetResource(type); + if (rr == null) + { + rr = new ResourceReference(type); + rr.resourceID = resourceID; + switch (rr.entryType) + { + case ResourceType.DYNAMIC_PHYSICS_SYSTEM: + case ResourceType.RENDERABLE_INSTANCE: + case ResourceType.ANIMATED_MODEL: + rr.startIndex = 0; + break; + } + value.Add(rr); + } + return rr; + } + + /* Find a resource reference of type */ + public ResourceReference GetResource(ResourceType type) + { + return value.FirstOrDefault(o => o.entryType == type); + } + } + [Serializable] + public class cVector3 : ParameterData + { + public cVector3() { dataType = DataType.VECTOR; } + public cVector3(Vector3 value) + { + this.value = value; + dataType = DataType.VECTOR; + } + + public Vector3 value = new Vector3(); + } + [Serializable] + public class cEnum : ParameterData + { + public cEnum(ShortGuid enumID, int enumIndex) + { + this.enumID = enumID; + this.enumIndex = enumIndex; + dataType = DataType.ENUM; + } + public cEnum(string enumName = "ALERTNESS_STATE", int enumIndex = 0) + { + this.enumID = ShortGuidUtils.Generate(enumName); + this.enumIndex = enumIndex; + dataType = DataType.ENUM; + } + + public ShortGuid enumID; + public int enumIndex = 0; + } + [Serializable] + public class cSpline : ParameterData + { + public cSpline() { dataType = DataType.SPLINE; } + public cSpline(List splinePoints) + { + this.splinePoints = splinePoints; + dataType = DataType.SPLINE; + } + + public List splinePoints = new List(); + } +} diff --git a/CathodeLib/Scripts/CATHODE/CommandsPAK/Components/ResourceReference.cs b/CathodeLib/Scripts/CATHODE/CommandsPAK/Components/ResourceReference.cs new file mode 100644 index 0000000..769711d --- /dev/null +++ b/CathodeLib/Scripts/CATHODE/CommandsPAK/Components/ResourceReference.cs @@ -0,0 +1,89 @@ +using CathodeLib; +using System; +using System.Collections.Generic; + +namespace CATHODE.Scripting +{ + /* A reference to a game resource (E.G. a renderable element, a collision mapping, etc) */ + [Serializable] + public class ResourceReference : ICloneable + { + public ResourceReference() + { + + } + public ResourceReference(ResourceType type) + { + switch (type) + { + case ResourceType.DYNAMIC_PHYSICS_SYSTEM: + case ResourceType.RENDERABLE_INSTANCE: + case ResourceType.ANIMATED_MODEL: + startIndex = 0; + break; + } + entryType = type; + } + + public static bool operator ==(ResourceReference x, ResourceReference y) + { + if (ReferenceEquals(x, null)) return ReferenceEquals(y, null); + if (ReferenceEquals(y, null)) return ReferenceEquals(x, null); + + if (x.position != y.position) return false; + if (x.rotation != y.rotation) return false; + if (x.resourceID != y.resourceID) return false; + if (x.entryType != y.entryType) return false; + if (x.startIndex != y.startIndex) return false; + if (x.count != y.count) return false; + if (x.entityID != y.entityID) return false; + + return true; + } + public static bool operator !=(ResourceReference x, ResourceReference y) + { + return !(x == y); + } + + public object Clone() + { + return this.MemberwiseClone(); + } + + public override bool Equals(object obj) + { + return obj is ResourceReference reference && + EqualityComparer.Default.Equals(position, reference.position) && + EqualityComparer.Default.Equals(rotation, reference.rotation) && + EqualityComparer.Default.Equals(resourceID, reference.resourceID) && + entryType == reference.entryType && + startIndex == reference.startIndex && + count == reference.count && + EqualityComparer.Default.Equals(entityID, reference.entityID); + } + + public override int GetHashCode() + { + int hashCode = -1286985782; + hashCode = hashCode * -1521134295 + position.GetHashCode(); + hashCode = hashCode * -1521134295 + rotation.GetHashCode(); + hashCode = hashCode * -1521134295 + resourceID.GetHashCode(); + hashCode = hashCode * -1521134295 + entryType.GetHashCode(); + hashCode = hashCode * -1521134295 + startIndex.GetHashCode(); + hashCode = hashCode * -1521134295 + count.GetHashCode(); + hashCode = hashCode * -1521134295 + entityID.GetHashCode(); + return hashCode; + } + + public Vector3 position = new Vector3(0, 0, 0); + public Vector3 rotation = new Vector3(0, 0, 0); + + public ShortGuid resourceID; //TODO: we could deprecate this, and just write it knowing what we know with our object structure + public ResourceType entryType; + + public int startIndex = -1; + public int count = 1; + + public ShortGuid entityID = new ShortGuid("FF-FF-FF-FF"); + } +} diff --git a/CathodeLib/Scripts/CATHODE/CommandsPAK/Components/ShortGuid.cs b/CathodeLib/Scripts/CATHODE/CommandsPAK/Components/ShortGuid.cs new file mode 100644 index 0000000..c3e3674 --- /dev/null +++ b/CathodeLib/Scripts/CATHODE/CommandsPAK/Components/ShortGuid.cs @@ -0,0 +1,98 @@ +using System; +using System.IO; +using System.Linq; +using System.Runtime.InteropServices; + +namespace CATHODE.Scripting +{ + /* A unique id assigned to CATHODE objects */ + [Serializable] + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public struct ShortGuid : IComparable + { + public ShortGuid(float num) + { + val = BitConverter.GetBytes(num); + } + public ShortGuid(int num) + { + val = BitConverter.GetBytes(num); + } + public ShortGuid(byte[] id) + { + val = id; + } + public ShortGuid(BinaryReader reader) + { + val = reader.ReadBytes(4); + } + public ShortGuid(string id) + { + System.String[] arr = id.Split('-'); + if (arr.Length != 4) throw new Exception("Tried to initialise ShortGuid without 4-byte ID string."); + byte[] array = new byte[arr.Length]; + for (int i = 0; i < arr.Length; i++) array[i] = Convert.ToByte(arr[i], 16); + val = array; + } + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)] + public byte[] val; + + public override bool Equals(object obj) + { + if (!(obj is ShortGuid)) return false; + if (((ShortGuid)obj).val == null) return this.val == null; + if (this.val == null) return ((ShortGuid)obj).val == null; + return ((ShortGuid)obj).val.SequenceEqual(this.val); + } + public static bool operator ==(ShortGuid x, ShortGuid y) + { + if (ReferenceEquals(x, null)) return ReferenceEquals(y, null); + if (x.val == null) return y.val == null; + if (y.val == null) return x.val == null; + return x.val.SequenceEqual(y.val); + } + public static bool operator !=(ShortGuid x, ShortGuid y) + { + return !x.val.SequenceEqual(y.val); + } + public static bool operator ==(ShortGuid x, string y) + { + return x.ToString() == y; + } + public static bool operator !=(ShortGuid x, string y) + { + return x.ToString() != y; + } + public override int GetHashCode() + { + return BitConverter.ToInt32(val, 0); + } + + public int CompareTo(ShortGuid x) + { + if (x == null) return 0; + if (x.val == null && val != null) return 0; + if (x.val != null && val == null) return 0; + if (x.val.Length != val.Length) return 0; + + int comp = 0; + for (int i = 0; i < x.val.Length; i++) + { + comp += x.val[i].CompareTo(val[i]); + } + comp /= x.val.Length; + + return comp; + } + + public override string ToString() + { + return BitConverter.ToString(val); + } + public uint ToUInt32() + { + return BitConverter.ToUInt32(val, 0); + } + } +} diff --git a/CathodeLib/Scripts/CommandsPAK/CathodeParameter.cs b/CathodeLib/Scripts/CATHODE/CommandsPAK/Components/TypeEnums.cs similarity index 69% rename from CathodeLib/Scripts/CommandsPAK/CathodeParameter.cs rename to CathodeLib/Scripts/CATHODE/CommandsPAK/Components/TypeEnums.cs index 4b05b3d..b586d5a 100644 --- a/CathodeLib/Scripts/CommandsPAK/CathodeParameter.cs +++ b/CathodeLib/Scripts/CATHODE/CommandsPAK/Components/TypeEnums.cs @@ -1,32 +1,53 @@ using System; using System.Collections.Generic; -using System.IO; -using System.Linq; -#if UNITY_EDITOR || UNITY_STANDALONE -using UnityEngine; -#else -using System.Numerics; -using System.Runtime.Serialization.Formatters.Binary; -#endif +using System.Text; -namespace CATHODE.Commands +namespace CATHODE.Scripting { - /* Data types in the CATHODE scripting system */ - public enum CathodeDataType + /* Entity variants */ + public enum EntityVariant + { + DATATYPE, + FUNCTION, + + PROXY, + OVERRIDE, + } + + /* Parameter variants */ + public enum ParameterVariant + { + //Only on EntityMethodInterface + METHOD, + FINISHED, + RELAY, + + //On implementations of the interface + STATE, + PARAMETER, + TARGET, + INPUT, + INTERNAL, + OUTPUT + } + + /* Data types */ + public enum DataType { - POSITION, - FLOAT, STRING, - SPLINE_DATA, - ENUM, - SHORT_GUID, - FILEPATH, - BOOL, - DIRECTION, + FLOAT, INTEGER, + BOOL, + VECTOR, + TRANSFORM, + ENUM, + SPLINE, + NONE, //Translates to a blank string + + RESOURCE, + FILEPATH, OBJECT, - NO_TYPE, //Translates to a blank string ZONE_LINK_PTR, ZONE_PTR, MARKER, @@ -34,9 +55,29 @@ public enum CathodeDataType CAMERA } - /* Function types in the CATHODE scripting system */ - public enum CathodeFunctionType + /* Function types */ + public enum FunctionType { + //TODO: move these interface types outside of FunctionType + EntityMethodInterface, + AttachmentInterface, + BooleanLogicInterface, + CameraBehaviorInterface, + CloseableInterface, + CompositeInterface, + EvaluatorInterface, + GateInterface, + GateResourceInterface, + GetComponentInterface, + InspectorInterface, + ModifierInterface, + ProxyInterface, + ScriptInterface, + SensorAttachmentInterface, + SensorInterface, + TransformerInterface, + ZoneInterface, + AccessTerminal, AchievementMonitor, AchievementStat, @@ -57,13 +98,11 @@ public enum CathodeFunctionType ApplyRelativeTransform, AreaHitMonitor, AssetSpawner, - AttachmentInterface, Benchmark, BindObjectsMultiplexer, BlendLowResFrame, BloomSettings, BoneAttachedCamera, - BooleanLogicInterface, BooleanLogicOperation, Box, BroadcastTrigger, @@ -71,7 +110,6 @@ public enum CathodeFunctionType ButtonMashPrompt, CAGEAnimation, CameraAimAssistant, - CameraBehaviorInterface, CameraCollisionBox, CameraDofController, CameraFinder, @@ -130,7 +168,6 @@ public enum CathodeFunctionType ClearPrimaryObjective, ClearSubObjective, ClipPlanesController, - CloseableInterface, CMD_AimAt, CMD_AimAtCurrentTarget, CMD_Die, @@ -155,7 +192,6 @@ public enum CathodeFunctionType CollisionBarrier, ColourCorrectionTransition, ColourSettings, - CompositeInterface, CompoundVolume, ControllableRange, Convo, @@ -209,7 +245,6 @@ public enum CathodeFunctionType EnvironmentMap, EnvironmentModelReference, EQUIPPABLE_ITEM, - EvaluatorInterface, ExclusiveMaster, Explosion_AINotifier, ExternalVariableBool, @@ -310,8 +345,6 @@ public enum CathodeFunctionType GameOverCredits, GameplayTip, GameStateChanged, - GateInterface, - GateResourceInterface, GCIP_WorldPickup, //n:\\content\\build\\library\\archetypes\\gameplay\\gcip_worldpickup GenericHighlightEntity, GetBlueprintAvailable, @@ -322,7 +355,6 @@ public enum CathodeFunctionType GetClosestPoint, GetClosestPointFromSet, GetClosestPointOnSpline, - GetComponentInterface, GetCurrentCameraFov, GetCurrentCameraPos, GetCurrentCameraTarget, @@ -357,7 +389,6 @@ public enum CathodeFunctionType IdleTask, ImpactSphere, InhibitActionsUntilRelease, - InspectorInterface, IntegerAbsolute, IntegerAdd, IntegerAdd_All, @@ -456,7 +487,6 @@ public enum CathodeFunctionType Minigames, MissionNumber, ModelReference, - ModifierInterface, MonitorActionMap, MonitorBase, MonitorPadInput, @@ -603,7 +633,6 @@ public enum CathodeFunctionType ProjectiveDecal, ProximityDetector, ProximityTrigger, - ProxyInterface, QueryGCItemPool, RadiosityIsland, RadiosityProxy, @@ -641,10 +670,7 @@ public enum CathodeFunctionType ScreenFadeOutToBlackTimed, ScreenFadeOutToWhite, ScreenFadeOutToWhiteTimed, - ScriptInterface, ScriptVariable, - SensorAttachmentInterface, - SensorInterface, SetAsActiveMissionLevel, SetBlueprintInfo, SetBool, @@ -728,7 +754,6 @@ public enum CathodeFunctionType TogglePlayerTorch, Torch_Control, //n:\\content\\build\\library\\archetypes\\script\\gameplay\\torch_control TorchDynamicMovement, - TransformerInterface, TRAV_1ShotClimbUnder, TRAV_1ShotFloorVentEntrance, TRAV_1ShotFloorVentExit, @@ -851,208 +876,259 @@ public enum CathodeFunctionType WEAPON_TargetObjectFilter, Zone, ZoneExclusionLink, - ZoneInterface, ZoneLink, ZoneLoaded, } /* Resource reference types */ - public enum CathodeResourceReferenceType + public enum ResourceType { - //CATHODE_COVER_SEGMENT, - COLLISION_MAPPING, //This one seems to be called in another script block that I'm not currently parsing - DYNAMIC_PHYSICS_SYSTEM, //This is a count (usually small) and then a -1 32-bit int - EXCLUSIVE_MASTER_STATE_RESOURCE, //This just seems to be two -1 32-bit integers (same as above) - NAV_MESH_BARRIER_RESOURCE, //This just seems to be two -1 32-bit integers (same as above) - RENDERABLE_INSTANCE, //This one references an entry in the REnDerable elementS (REDS.BIN) database - TRAVERSAL_SEGMENT, //This just seems to be two -1 32-bit integers - ANIMATED_MODEL, //This is a count (usually small) and then a -1 32-bit int (same as above) - } + COLLISION_MAPPING, + DYNAMIC_PHYSICS_SYSTEM, + EXCLUSIVE_MASTER_STATE_RESOURCE, + NAV_MESH_BARRIER_RESOURCE, + RENDERABLE_INSTANCE, + TRAVERSAL_SEGMENT, + ANIMATED_MODEL, //Links to ResourceIndex in ENVIRONMENT_ANIMATION.DAT - /* A parameter compiled in COMMANDS.PAK */ - [Serializable] - public class CathodeParameter : ICloneable - { - public CathodeParameter() { } - public CathodeParameter(CathodeDataType type) - { - dataType = type; - } - public CathodeDataType dataType = CathodeDataType.NO_TYPE; - - public static bool operator ==(CathodeParameter x, CathodeParameter y) - { - if (ReferenceEquals(x, null)) return ReferenceEquals(y, null); - if (ReferenceEquals(y, null)) return ReferenceEquals(x, null); - if (x.dataType != y.dataType) return false; - switch (x.dataType) - { - case CathodeDataType.POSITION: - CathodeTransform x_t = (CathodeTransform)x; - CathodeTransform y_t = (CathodeTransform)y; - return x_t.position == y_t.position && x_t.rotation == y_t.rotation; - case CathodeDataType.INTEGER: - return ((CathodeInteger)x).value == ((CathodeInteger)y).value; - case CathodeDataType.STRING: - return ((CathodeString)x).value == ((CathodeString)y).value; - case CathodeDataType.BOOL: - return ((CathodeBool)x).value == ((CathodeBool)y).value; - case CathodeDataType.FLOAT: - return ((CathodeFloat)x).value == ((CathodeFloat)y).value; - case CathodeDataType.SHORT_GUID: - return ((CathodeResource)x).resourceID == ((CathodeResource)y).resourceID; - case CathodeDataType.DIRECTION: - return ((CathodeVector3)x).value == ((CathodeVector3)y).value; - case CathodeDataType.ENUM: - CathodeEnum x_e = (CathodeEnum)x; - CathodeEnum y_e = (CathodeEnum)y; - return x_e.enumIndex == y_e.enumIndex && x_e.enumID == y_e.enumID; - case CathodeDataType.SPLINE_DATA: - return ((CathodeSpline)x).splinePoints == ((CathodeSpline)y).splinePoints; - case CathodeDataType.NO_TYPE: - return true; - default: - return false; - } - } - public static bool operator !=(CathodeParameter x, CathodeParameter y) - { - return !(x == y); - } + // Any below this point are referenced in code, but not used in the vanilla game's CommandsPAKs + CATHODE_COVER_SEGMENT, + CHOKE_POINT_RESOURCE, + ANIMATION_MASK_RESOURCE, + PLAY_ANIMATION_DATA_RESOURCE, - public override bool Equals(object obj) - { - if (!(obj is CathodeParameter)) return false; - return ((CathodeParameter)obj) == this; - } - public override int GetHashCode() - { - //this is gross - switch (dataType) - { - case CathodeDataType.POSITION: - CathodeTransform x_t = (CathodeTransform)this; - return Convert.ToInt32( - x_t.rotation.x.ToString() + x_t.rotation.y.ToString() + x_t.rotation.z.ToString() + - x_t.position.x.ToString() + x_t.position.y.ToString() + x_t.position.z.ToString()); - case CathodeDataType.INTEGER: - return ((CathodeInteger)this).value; - case CathodeDataType.STRING: - CathodeString x_s = (CathodeString)this; - string num = ""; - for (int i = 0; i < x_s.value.Length; i++) num += ((int)x_s.value[i]).ToString(); - return Convert.ToInt32(num); - case CathodeDataType.BOOL: - return ((CathodeBool)this).value ? 1 : 0; - case CathodeDataType.FLOAT: - return Convert.ToInt32(((CathodeFloat)this).value.ToString().Replace(".", "")); - case CathodeDataType.SHORT_GUID: - string x_g_s = ((CathodeString)this).value.ToString(); - string num2 = ""; - for (int i = 0; i < x_g_s.Length; i++) num2 += ((int)x_g_s[i]).ToString(); - return Convert.ToInt32(num2); - case CathodeDataType.DIRECTION: - CathodeVector3 x_v = (CathodeVector3)this; - return Convert.ToInt32(x_v.value.x.ToString() + x_v.value.y.ToString() + x_v.value.z.ToString()); - case CathodeDataType.ENUM: - CathodeEnum x_e = (CathodeEnum)this; - string x_e_s = x_e.enumID.ToString(); - string num3 = ""; - for (int i = 0; i < x_e_s.Length; i++) num3 += ((int)x_e_s[i]).ToString(); - return Convert.ToInt32(num3 + x_e.enumIndex.ToString()); - case CathodeDataType.SPLINE_DATA: - CathodeSpline x_sd = (CathodeSpline)this; - string x_sd_s = ""; - for (int i = 0; i < x_sd.splinePoints.Count; i++) x_sd_s += x_sd.splinePoints[i].position.GetHashCode().ToString(); - ShortGuid x_sd_g = ShortGuidUtils.Generate(x_sd_s); - string x_sd_g_s = x_sd_g.ToString(); - string num4 = ""; - for (int i = 0; i < x_sd_g_s.Length; i++) num4 += ((int)x_sd_g_s[i]).ToString(); - return Convert.ToInt32(num4); - default: - return -1; - } - } - - public object Clone() - { - switch (dataType) - { - case CathodeDataType.SPLINE_DATA: - case CathodeDataType.SHORT_GUID: - return Utilities.CloneObject(this); - //HOTFIX FOR VECTOR 3 CLONE ISSUE - TODO: FIND WHY THIS ISN'T WORKING WITH MEMBERWISE CLONE - case CathodeDataType.DIRECTION: - CathodeVector3 v3 = (CathodeVector3)this.MemberwiseClone(); - v3.value = (Vector3)((CathodeVector3)this).value.Clone(); - return v3; - case CathodeDataType.POSITION: - CathodeTransform tr = (CathodeTransform)this.MemberwiseClone(); - tr.position = (Vector3)((CathodeTransform)this).position.Clone(); - tr.rotation = (Vector3)((CathodeTransform)this).rotation.Clone(); - return tr; - //END OF HOTFIX - SHOULD THIS ALSO APPLY TO OTHERS?? - default: - return this.MemberwiseClone(); - } - } - } - [Serializable] - public class CathodeTransform : CathodeParameter - { - public CathodeTransform() { dataType = CathodeDataType.POSITION; } - public Vector3 position = new Vector3(); - public Vector3 rotation = new Vector3(); //In CATHODE this is named Roll/Pitch/Yaw - } - [Serializable] - public class CathodeInteger : CathodeParameter - { - public CathodeInteger() { dataType = CathodeDataType.INTEGER; } - public int value = 0; - } - [Serializable] - public class CathodeString : CathodeParameter - { - public CathodeString() { dataType = CathodeDataType.STRING; } - public string value = ""; - } - [Serializable] - public class CathodeBool : CathodeParameter - { - public CathodeBool() { dataType = CathodeDataType.BOOL; } - public bool value = false; - } - [Serializable] - public class CathodeFloat : CathodeParameter - { - public CathodeFloat() { dataType = CathodeDataType.FLOAT; } - public float value = 0.0f; - } - [Serializable] - public class CathodeResource : CathodeParameter - { - public CathodeResource() { dataType = CathodeDataType.SHORT_GUID; } - public List value = new List(); //TODO: i dont know if this can actually have multiple entries. need to assert - public ShortGuid resourceID; - } - [Serializable] - public class CathodeVector3 : CathodeParameter - { - public CathodeVector3() { dataType = CathodeDataType.DIRECTION; } - public Vector3 value = new Vector3(); + CAMERA_INSTANCE, + VENT_ENTRANCE, + LOGIC_CHARACTER, + NPC_AREA_RESOURCE, + GAME_VARIABLE, + TUTORIAL_ENTRY_ID, + INVENTORY_ITEM_QUANTITY, + ANIM_SET, + ANIM_TREE_SET, + ATTRIBUTE_SET, + CHR_SKELETON_SET, + SOUND_TORSO_GROUP, + SOUND_LEG_GROUP, + SOUND_FOOTWEAR_GROUP, + IDTAG_ID, + SOUND_OBJECT, + SOUND_EVENT, + SOUND_ARGUMENT, + SOUND_SWITCH, + SOUND_REVERB, + SOUND_STATE, + SOUND_RTPC, + SOUND_PARAMETER, + EQUIPPABLE_ITEM_INSTANCE, + TERMINAL_CONTENT_DETAILS, + TERMINAL_FOLDER_DETAILS, + SEVASTOPOL_LOG_ID, + NOSTROMO_LOG_ID, + MAP_KEYFRAME_ID, + REWIRE_SYSTEM, + REWIRE_LOCATION, + REWIRE_ACCESS_POINT, + GAMEPLAY_TIP_STRING_ID, + BLUEPRINT_TYPE, + AUTODETECT, + OBJECTIVE_ENTRY_ID, + ACHIEVEMENT_ID, + ACHIEVEMENT_STAT_ID, + PRESENCE_ID, + CHARACTER, } - [Serializable] - public class CathodeEnum : CathodeParameter + + /* Enums available within Cathode */ + public enum EnumType { - public CathodeEnum() { dataType = CathodeDataType.ENUM; } - public ShortGuid enumID; - public int enumIndex = 0; + AGGRESSION_GAIN, + ALERTNESS_STATE, + ALIEN_CONFIGURATION_TYPE, + ALIEN_DEVELOPMENT_MANAGER_ABILITIES, + ALIEN_DEVELOPMENT_MANAGER_ABILITY_MASKS, + ALIEN_DEVELOPMENT_MANAGER_STAGES, + ALLIANCE_GROUP, + ALLIANCE_STANCE, + AMBUSH_TYPE, + AMMO_TYPE, + ANIM_CALLBACK_ENUM, + ANIM_MODE, + ANIM_TRACK_TYPE, + ANIM_TREE_ENUM, + ANIMATION_EFFECT_TYPE, + AREA_SWEEP_TYPE, + AREA_SWEEP_TYPE_CODE, + AUTODETECT, + BEHAVIOR_TREE_BRANCH_TYPE, + BEHAVIOUR_MOOD_SET, + BEHAVIOUR_TREE_FLAGS, + BLEND_MODE, + BLUEPRINT_LEVEL, + BUTTON_TYPE, + CAMERA_PATH_CLASS, + CAMERA_PATH_TYPE, + CHARACTER_BB_ENTRY_TYPE, + CHARACTER_CLASS, + CHARACTER_CLASS_COMBINATION, + CHARACTER_FOLEY_SOUND, + CHARACTER_NODE, + CHARACTER_STANCE, + CHECKPOINT_TYPE, + CI_MESSAGE_TYPE, + CLIPPING_PLANES_PRESETS, + COLLISION_TYPE, + COMBAT_BEHAVIOUR, + CROUCH_MODE, + CUSTOM_CHARACTER_ACCESSORY_OVERRIDE, + CUSTOM_CHARACTER_ASSETS, + CUSTOM_CHARACTER_BUILD, + CUSTOM_CHARACTER_COMPONENT, + CUSTOM_CHARACTER_ETHNICITY, + CUSTOM_CHARACTER_GENDER, + CUSTOM_CHARACTER_MODEL, + CUSTOM_CHARACTER_POPULATION, + CUSTOM_CHARACTER_SLEEVETYPE, + CUSTOM_CHARACTER_TYPE, + DAMAGE_EFFECT_TYPE_FLAGS, + DAMAGE_EFFECTS, + DAMAGE_MODE, + DEATH_STYLE, + DEVICE_INTERACTION_MODE, + DIALOGUE_ACTION, + DIALOGUE_ARGUMENT, + DIALOGUE_NPC_COMBAT_MODE, + DIALOGUE_NPC_CONTEXT, + DIALOGUE_NPC_EVENT, + DIALOGUE_VOICE_ACTOR, + DIFFICULTY_SETTING_TYPE, + DOOR_MECHANISM, + DOOR_STATE, + DUCK_HEIGHT, + ENEMY_TYPE, + ENVIRONMENT_ARCHETYPE, + EQUIPMENT_SLOT, + EVENT_OCCURED_TYPE, + EXIT_WAYPOINT, + FLAG_CHANGE_SOURCE_TYPE, + FLASH_INVOKE_TYPE, + FLASH_SCRIPT_RENDER_TYPE, + FOG_BOX_TYPE, + FOLDER_LOCK_TYPE, + FOLLOW_CAMERA_MODIFIERS, + FOLLOW_TYPE, + FRAME_FLAGS, + FRONTEND_STATE, + GAME_CLIP, + GATING_TOOL_TYPE, + IDLE, + IDLE_STYLE, + IMPACT_CHARACTER_BODY_LOCATION_TYPE, + INPUT_DEVICE_TYPE, + JOB_TYPE, + LEVEL_HEAP_TAG, + LEVER_TYPE, + LIGHT_ADAPTATION_MECHANISM, + LIGHT_ANIM, + LIGHT_FADE_TYPE, + LIGHT_TRANSITION, + LIGHT_TYPE, + LOCOMOTION_STATE, + LOCOMOTION_TARGET_SPEED, + LOGIC_CHARACTER_FLAGS, + LOGIC_CHARACTER_GAUGE_TYPE, + LOGIC_CHARACTER_TIMER_TYPE, + LOOK_SPEED, + MAP_ICON_TYPE, + MELEE_ATTACK_TYPE, + MELEE_CONTEXT_TYPE, + MOOD, + MOOD_INTENSITY, + MOVE, + MUSIC_RTPC_MODE, + NAV_MESH_AREA_TYPE, + NAVIGATION_CHARACTER_CLASS, + NAVIGATION_CHARACTER_CLASS_COMBINATION, + NOISE_TYPE, + NPC_AGGRO_LEVEL, + NPC_COMBAT_STATE, + NPC_COVER_REQUEST_TYPE, + NPC_GUN_AIM_MODE, + ORIENTATION_AXIS, + PATH_DRIVEN_TYPE, + PAUSE_SENSES_TYPE, + PICKUP_CATEGORY, + PLATFORM_TYPE, + PLAYER_INVENTORY_SET, + POPUP_MESSAGE_ICON, + POPUP_MESSAGE_SOUND, + PRIORITY, + RANGE_TEST_SHAPE, + RAYCAST_PRIORITY, + RESPAWN_MODE, + REWIRE_SYSTEM_NAME, + REWIRE_SYSTEM_TYPE, + SECONDARY_ANIMATION_LAYER, + SENSE_SET, + SENSE_SET_DEFAULT, + SENSE_SET_SYSTEM, + SENSORY_TYPE, + SHAKE_TYPE, + SIDE, + SOUND_POOL, + SPEECH_PRIORITY, + STEAL_CAMERA_TYPE, + SUB_OBJECTIVE_TYPE, + SUSPECT_RESPONSE_PHASE, + SUSPICIOUS_ITEM, + SUSPICIOUS_ITEM_BEHAVIOUR_TREE_PRIORITY, + SUSPICIOUS_ITEM_CLOSE_REACTION_DETAIL, + SUSPICIOUS_ITEM_REACTION, + SUSPICIOUS_ITEM_STAGE, + SUSPICIOUS_ITEM_START_OR_CONTINUE_STATE, + SUSPICIOUS_ITEM_TRIGGER, + TASK_CHARACTER_CLASS_FILTER, + TASK_OPERATION_MODE, + TASK_PRIORITY, + TERMINAL_LOCATION, + TEXT_ALIGNMENT, + THRESHOLD_QUALIFIER, + TRANSITION_DIRECTION, + TRAVERSAL_ANIMS, + TRAVERSAL_TYPE, + UI_ICON_ICON, + UI_KEYGATE_TYPE, + VENT_LOCK_REASON, + VIEWCONE_TYPE, + VISIBILITY_SETTINGS_TYPE, + WAVE_SHAPE, + WEAPON_HANDEDNESS, + WEAPON_IMPACT_EFFECT_ORIENTATION, + WEAPON_IMPACT_EFFECT_TYPE, + WEAPON_IMPACT_FILTER_ORIENTATION, + WEAPON_PROPERTY, + WEAPON_TYPE, } - [Serializable] - public class CathodeSpline : CathodeParameter + + /* Blocks of data in each compiled composite */ + public enum DataBlock { - public CathodeSpline() { dataType = CathodeDataType.SPLINE_DATA; } - public List splinePoints = new List(); + COMPOSITE_HEADER, //Defines the header of the composite, with global ID and string name + ENTITY_CONNECTIONS, //Defines the links between entities in the composite + ENTITY_PARAMETERS, //Defines parameters to be applied to entities in the composite + ENTITY_OVERRIDES, //Defines overrides to apply to nested instances of composites in this composite + ENTITY_OVERRIDES_CHECKSUM, //Defines a checksum value for the hierarchy override (TODO) + COMPOSITE_EXPOSED_PARAMETERS, //Defines variables which are exposed when instancing this composite which are then connected in to entities (think variable pins in UE4 blueprint) + ENTITY_PROXIES, //Defines "proxies" similar to the overrides hierarchy (TODO) + ENTITY_FUNCTIONS, //Defines entities with an attached script function within Cathode + RESOURCE_REFERENCES, //Defines renderable data which is referenced by entities in this composite + CAGEANIMATION_DATA, //Appears to define additional data for CAGEAnimation type entities (TODO) + TRIGGERSEQUENCE_DATA, //Appears to define additional data for TriggerSequence type entities (TODO) + + UNUSED, //Unused values + UNKNOWN_COUNTS, //TODO - unused? + + NUMBER_OF_SCRIPT_BLOCKS, //THIS IS NOT A DATA BLOCK: merely used as an easy way of sanity checking the number of blocks in-code! } } diff --git a/CathodeLib/Scripts/CommandsPAK/CommandsUtils.cs b/CathodeLib/Scripts/CATHODE/CommandsPAK/Helpers/CommandsUtils.cs similarity index 50% rename from CathodeLib/Scripts/CommandsPAK/CommandsUtils.cs rename to CathodeLib/Scripts/CATHODE/CommandsPAK/Helpers/CommandsUtils.cs index 77420e7..797c241 100644 --- a/CathodeLib/Scripts/CommandsPAK/CommandsUtils.cs +++ b/CathodeLib/Scripts/CATHODE/CommandsPAK/Helpers/CommandsUtils.cs @@ -3,8 +3,9 @@ using System.Linq; using System.Text; -namespace CATHODE.Commands +namespace CATHODE.Scripting { + //Helpful lookup tables for various Cathode Commands types public static class CommandsUtils { static CommandsUtils() @@ -14,24 +15,35 @@ static CommandsUtils() SetupResourceEntryTypeLUT(); } - private static Dictionary _functionTypeLUT = new Dictionary(); + /* Function Types */ + private static Dictionary _functionTypeLUT = new Dictionary(); private static void SetupFunctionTypeLUT() { if (_functionTypeLUT.Count != 0) return; - foreach (CathodeFunctionType functionType in Enum.GetValues(typeof(CathodeFunctionType))) - _functionTypeLUT.Add(ShortGuidUtils.Generate(functionType.ToString()), functionType); + foreach (FunctionType functionType in Enum.GetValues(typeof(FunctionType))) + { + string shortGuidString = functionType.ToString(); + if (functionType == FunctionType.GCIP_WorldPickup) + shortGuidString = "n:\\content\\build\\library\\archetypes\\gameplay\\gcip_worldpickup"; + if (functionType == FunctionType.PlayForMinDuration) + shortGuidString = "n:\\content\\build\\library\\ayz\\animation\\logichelpers\\playforminduration"; + if (functionType == FunctionType.Torch_Control) + shortGuidString = "n:\\content\\build\\library\\archetypes\\script\\gameplay\\torch_control"; + + _functionTypeLUT.Add(ShortGuidUtils.Generate(shortGuidString), functionType); + } } - public static CathodeFunctionType GetFunctionType(byte[] tag) + public static FunctionType GetFunctionType(byte[] tag) { return GetFunctionType(new ShortGuid(tag)); } - public static CathodeFunctionType GetFunctionType(ShortGuid tag) + public static FunctionType GetFunctionType(ShortGuid tag) { SetupFunctionTypeLUT(); return _functionTypeLUT[tag]; } - public static ShortGuid GetFunctionTypeGUID(CathodeFunctionType type) + public static ShortGuid GetFunctionTypeGUID(FunctionType type) { SetupFunctionTypeLUT(); return _functionTypeLUT.FirstOrDefault(x => x.Value == type).Key; @@ -41,39 +53,40 @@ public static bool FunctionTypeExists(ShortGuid tag) return _functionTypeLUT.ContainsKey(tag); } - private static Dictionary _dataTypeLUT = new Dictionary(); + /* Data Types */ + private static Dictionary _dataTypeLUT = new Dictionary(); private static void SetupDataTypeLUT() { if (_dataTypeLUT.Count != 0) return; - _dataTypeLUT.Add(ShortGuidUtils.Generate("bool"), CathodeDataType.BOOL); - _dataTypeLUT.Add(ShortGuidUtils.Generate("int"), CathodeDataType.INTEGER); - _dataTypeLUT.Add(ShortGuidUtils.Generate("float"), CathodeDataType.FLOAT); - _dataTypeLUT.Add(ShortGuidUtils.Generate("String"), CathodeDataType.STRING); - _dataTypeLUT.Add(ShortGuidUtils.Generate("FilePath"), CathodeDataType.FILEPATH); - _dataTypeLUT.Add(ShortGuidUtils.Generate("SplineData"), CathodeDataType.SPLINE_DATA); - _dataTypeLUT.Add(ShortGuidUtils.Generate("Direction"), CathodeDataType.DIRECTION); - _dataTypeLUT.Add(ShortGuidUtils.Generate("Position"), CathodeDataType.POSITION); - _dataTypeLUT.Add(ShortGuidUtils.Generate("Enum"), CathodeDataType.ENUM); - _dataTypeLUT.Add(ShortGuidUtils.Generate("ShortGuid"), CathodeDataType.SHORT_GUID); - _dataTypeLUT.Add(ShortGuidUtils.Generate("Object"), CathodeDataType.OBJECT); - _dataTypeLUT.Add(ShortGuidUtils.Generate("ZonePtr"), CathodeDataType.ZONE_PTR); - _dataTypeLUT.Add(ShortGuidUtils.Generate("ZoneLinkPtr"), CathodeDataType.ZONE_LINK_PTR); - _dataTypeLUT.Add(ShortGuidUtils.Generate(""), CathodeDataType.NO_TYPE); - _dataTypeLUT.Add(ShortGuidUtils.Generate("Marker"), CathodeDataType.MARKER); - _dataTypeLUT.Add(ShortGuidUtils.Generate("Character"), CathodeDataType.CHARACTER); - _dataTypeLUT.Add(ShortGuidUtils.Generate("Camera"), CathodeDataType.CAMERA); + _dataTypeLUT.Add(ShortGuidUtils.Generate("bool"), DataType.BOOL); + _dataTypeLUT.Add(ShortGuidUtils.Generate("int"), DataType.INTEGER); + _dataTypeLUT.Add(ShortGuidUtils.Generate("float"), DataType.FLOAT); + _dataTypeLUT.Add(ShortGuidUtils.Generate("String"), DataType.STRING); + _dataTypeLUT.Add(ShortGuidUtils.Generate("FilePath"), DataType.FILEPATH); + _dataTypeLUT.Add(ShortGuidUtils.Generate("SplineData"), DataType.SPLINE); + _dataTypeLUT.Add(ShortGuidUtils.Generate("Direction"), DataType.VECTOR); + _dataTypeLUT.Add(ShortGuidUtils.Generate("Position"), DataType.TRANSFORM); + _dataTypeLUT.Add(ShortGuidUtils.Generate("Enum"), DataType.ENUM); + _dataTypeLUT.Add(ShortGuidUtils.Generate("ShortGuid"), DataType.RESOURCE); + _dataTypeLUT.Add(ShortGuidUtils.Generate("Object"), DataType.OBJECT); + _dataTypeLUT.Add(ShortGuidUtils.Generate("ZonePtr"), DataType.ZONE_PTR); + _dataTypeLUT.Add(ShortGuidUtils.Generate("ZoneLinkPtr"), DataType.ZONE_LINK_PTR); + _dataTypeLUT.Add(ShortGuidUtils.Generate(""), DataType.NONE); + _dataTypeLUT.Add(ShortGuidUtils.Generate("Marker"), DataType.MARKER); + _dataTypeLUT.Add(ShortGuidUtils.Generate("Character"), DataType.CHARACTER); + _dataTypeLUT.Add(ShortGuidUtils.Generate("Camera"), DataType.CAMERA); } - public static CathodeDataType GetDataType(byte[] tag) + public static DataType GetDataType(byte[] tag) { return GetDataType(new ShortGuid(tag)); } - public static CathodeDataType GetDataType(ShortGuid tag) + public static DataType GetDataType(ShortGuid tag) { SetupDataTypeLUT(); return _dataTypeLUT[tag]; } - public static ShortGuid GetDataTypeGUID(CathodeDataType type) + public static ShortGuid GetDataTypeGUID(DataType type) { SetupDataTypeLUT(); return _dataTypeLUT.FirstOrDefault(x => x.Value == type).Key; @@ -83,24 +96,25 @@ public static bool DataTypeExists(ShortGuid tag) return _dataTypeLUT.ContainsKey(tag); } - private static Dictionary _resourceReferenceTypeLUT = new Dictionary(); + /* Resource Reference Types */ + private static Dictionary _resourceReferenceTypeLUT = new Dictionary(); private static void SetupResourceEntryTypeLUT() { if (_resourceReferenceTypeLUT.Count != 0) return; - foreach (CathodeResourceReferenceType referenceType in Enum.GetValues(typeof(CathodeResourceReferenceType))) + foreach (ResourceType referenceType in Enum.GetValues(typeof(ResourceType))) _resourceReferenceTypeLUT.Add(ShortGuidUtils.Generate(referenceType.ToString()), referenceType); } - public static CathodeResourceReferenceType GetResourceEntryType(byte[] tag) + public static ResourceType GetResourceEntryType(byte[] tag) { return GetResourceEntryType(new ShortGuid(tag)); } - public static CathodeResourceReferenceType GetResourceEntryType(ShortGuid tag) + public static ResourceType GetResourceEntryType(ShortGuid tag) { SetupResourceEntryTypeLUT(); return _resourceReferenceTypeLUT[tag]; } - public static ShortGuid GetResourceEntryTypeGUID(CathodeResourceReferenceType type) + public static ShortGuid GetResourceEntryTypeGUID(ResourceType type) { SetupResourceEntryTypeLUT(); return _resourceReferenceTypeLUT.FirstOrDefault(x => x.Value == type).Key; diff --git a/CathodeLib/Scripts/CommandsPAK/CompositePathDB.cs b/CathodeLib/Scripts/CATHODE/CommandsPAK/Helpers/CompositeUtils.cs similarity index 73% rename from CathodeLib/Scripts/CommandsPAK/CompositePathDB.cs rename to CathodeLib/Scripts/CATHODE/CommandsPAK/Helpers/CompositeUtils.cs index 6c121a3..0495542 100644 --- a/CathodeLib/Scripts/CommandsPAK/CompositePathDB.cs +++ b/CathodeLib/Scripts/CATHODE/CommandsPAK/Helpers/CompositeUtils.cs @@ -1,4 +1,4 @@ -using CATHODE.Commands; +using CATHODE.Scripting; using System; using System.Collections.Generic; using System.IO; @@ -7,27 +7,27 @@ namespace CathodeLib { //Has a store of all composite paths in the vanilla game: used for prettifying the all-caps Windows strings - public static class CompositePathDB + public static class CompositeUtils { private static Dictionary pathLookup; - static CompositePathDB() + static CompositeUtils() { BinaryReader reader = new BinaryReader(new MemoryStream(Properties.Resources.composite_paths)); int compositeCount = reader.ReadInt32(); pathLookup = new Dictionary(compositeCount); for (int i = 0; i < compositeCount; i++) - pathLookup.Add(CATHODE.Utilities.Consume(reader), reader.ReadString()); + pathLookup.Add(CathodeLib.Utilities.Consume(reader), reader.ReadString()); } - public static string GetFullPathForComposite(ShortGuid guid) + public static string GetFullPath(ShortGuid guid) { return pathLookup.ContainsKey(guid) ? pathLookup[guid] : ""; } - public static string GetPrettyPathForComposite(ShortGuid guid) + public static string GetPrettyPath(ShortGuid guid) { - string fullPath = GetFullPathForComposite(guid); + string fullPath = GetFullPath(guid); if (fullPath.Length < 1) return ""; string first25 = fullPath.Substring(0, 25); switch (first25) diff --git a/CathodeLib/Scripts/CATHODE/CommandsPAK/Helpers/EntityUtils.cs b/CathodeLib/Scripts/CATHODE/CommandsPAK/Helpers/EntityUtils.cs new file mode 100644 index 0000000..d9973dc --- /dev/null +++ b/CathodeLib/Scripts/CATHODE/CommandsPAK/Helpers/EntityUtils.cs @@ -0,0 +1,6496 @@ +using CathodeLib; +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Runtime.InteropServices; +using System.Runtime.Serialization.Formatters.Binary; +using System.Text; + +namespace CATHODE.Scripting +{ + //This should be initialised per-commandspak, and serves as a helpful extension to manage entity names + public class EntityUtils + { + private Commands commandsPAK; + private Dictionary> vanilla_composites; + private Dictionary> custom_composites; + + public EntityUtils(Commands commands = null) + { + commandsPAK = commands; + if (commandsPAK != null) + commandsPAK.OnSaved += SaveCustomNames; + + LoadVanillaNames(); + LoadCustomNames(); + } + + /* Get the name of an entity contained within a composite */ + public string GetName(ShortGuid compositeID, ShortGuid entityID) + { + if (custom_composites != null) + if (custom_composites.ContainsKey(compositeID) && custom_composites[compositeID].ContainsKey(entityID)) + return custom_composites[compositeID][entityID]; + if (vanilla_composites != null) + if (vanilla_composites.ContainsKey(compositeID) && vanilla_composites[compositeID].ContainsKey(entityID)) + return vanilla_composites[compositeID][entityID]; + return entityID.ToString(); + } + + /* Set the name of an entity contained within a composite */ + public void SetName(ShortGuid compositeID, ShortGuid entityID, string name) + { + if (!custom_composites.ContainsKey(compositeID)) + custom_composites.Add(compositeID, new Dictionary()); + + if (!custom_composites[compositeID].ContainsKey(entityID)) + custom_composites[compositeID].Add(entityID, name); + else + custom_composites[compositeID][entityID] = name; + } + + /* Clear the name of an entity contained within a composite */ + public void ClearName(ShortGuid compositeID, ShortGuid entityID) + { + if (custom_composites.ContainsKey(compositeID)) + custom_composites[compositeID].Remove(entityID); + } + + /* Applies all default parameter data to a Function entity (POTENTIALLY DESTRUCTIVE!) */ + public static void ApplyDefaults(FunctionEntity entity) + { + ApplyDefaultsInternal(entity); + } + + + /* Load all standard entity/composite names from our offline DB */ + private void LoadVanillaNames() + { + BinaryReader reader = new BinaryReader(new MemoryStream(CathodeLib.Properties.Resources.composite_entity_names)); + vanilla_composites = ConsumeDatabase(reader, reader.ReadInt32()); + reader.Close(); + } + + /* Pull non-vanilla entity names from the CommandsPAK */ + private void LoadCustomNames() + { + if (commandsPAK == null) return; + int endPos = GetEndOfCommands(); + BinaryReader reader = new BinaryReader(File.OpenRead(commandsPAK.Filepath)); + reader.BaseStream.Position = endPos; + if ((int)reader.BaseStream.Length - endPos == 0 || reader.ReadByte() != (byte)254) + { + custom_composites = new Dictionary>(); + reader.Close(); + return; + } + reader.BaseStream.Position += 4; + int compCount = reader.ReadInt32(); + reader.BaseStream.Position += 8; + custom_composites = ConsumeDatabase(reader, compCount); + reader.Close(); + } + + /* Write non-vanilla entity names to the CommandsPAK */ + private void SaveCustomNames() + { + if (commandsPAK == null) return; + int endPos = GetEndOfCommands(); + //TODO: move this writing functionality into its own thing + BinaryWriter writer = new BinaryWriter(File.OpenWrite(commandsPAK.Filepath)); + bool hasAlreadyWritten = (int)writer.BaseStream.Length - endPos != 0; + int posToJumpBackTo = 0; + writer.BaseStream.Position = endPos; + writer.Write((byte)254); + writer.Write((int)writer.BaseStream.Position + 16); + writer.Write(custom_composites.Count); + if (hasAlreadyWritten) + { + writer.BaseStream.Position += 8; + } + else + { + posToJumpBackTo = (int)writer.BaseStream.Position; + writer.Write(0); + writer.Write(0); + } + foreach (KeyValuePair> composite in custom_composites) + { + Utilities.Write(writer, composite.Key); + writer.Write(composite.Value.Count); + foreach (KeyValuePair entity in composite.Value) + { + Utilities.Write(writer, entity.Key); + writer.Write(entity.Value); + } + } + int posToWrite = (int)writer.BaseStream.Position; + writer.BaseStream.Position = posToJumpBackTo; + writer.Write(posToWrite); + writer.Close(); + } + + /* Consume our stored entity info */ + private Dictionary> ConsumeDatabase(BinaryReader reader, int compCount) + { + Dictionary> composites = new Dictionary>(compCount); + for (int i = 0; i < compCount; i++) + { + ShortGuid compositeID = Utilities.Consume(reader); + int entityCount = reader.ReadInt32(); + composites.Add(compositeID, new Dictionary(entityCount)); + for (int x = 0; x < entityCount; x++) + { + ShortGuid entityID = Utilities.Consume(reader); + composites[compositeID].Add(entityID, reader.ReadString()); + } + } + Console.WriteLine("Loaded names for " + compCount + " composites!"); + return composites; + } + + /* Get the position where we start writing our own data */ + private int GetEndOfCommands() + { + BinaryReader reader = new BinaryReader(File.OpenRead(commandsPAK.Filepath)); + reader.BaseStream.Position = 20; + int end_of_pak = (reader.ReadInt32() * 4) + (reader.ReadInt32() * 4); + reader.Close(); + return end_of_pak; + } + + /* Applies all default parameter data to a Function entity (DESTRUCTIVE!) */ + private static void ApplyDefaultsInternal(FunctionEntity newEntity) + { + //Function entity points to a composite + if (!CommandsUtils.FunctionTypeExists(newEntity.function)) + { + //TODO - look up composite parameters + //if (commandsPAK == null) return; + //commandsPAK.Composites.FirstOrDefault(o => o.shortGUID = newEntity.function) + return; + } + + //Function entity points to a hard-coded function + switch (CommandsUtils.GetFunctionType(newEntity.function)) + { + case FunctionType.EntityMethodInterface: + newEntity.AddParameter("reference", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("callback", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("trigger", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("refresh", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("start", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("stop", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("pause", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("resume", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("attach", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("detach", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("open", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("close", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("enable", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("disable", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("floating", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("sinking", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("lock", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("unlock", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("show", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("hide", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("spawn", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("despawn", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("light_switch_on", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("light_switch_off", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("proxy_enable", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("proxy_disable", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("simulate", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("keyframe", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("suspend", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("allow", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("request_open", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("request_close", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("request_lock", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("request_unlock", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("force_open", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("force_close", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("request_restore", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("rewind", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("kill", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("set", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("request_load", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("cancel_load", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("request_unload", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("cancel_unload", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("task_end", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("set_as_next_task", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("completed_pre_move", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("completed_interrupt", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("allow_early_end", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("start_allowing_interrupts", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("set_true", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("set_false", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("set_is_open", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("set_is_closed", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("apply_start", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("apply_stop", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("pause_activity", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("resume_activity", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("clear", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("enter", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("exit", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("reset", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("add_character", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("remove_character", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("purge", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("abort", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("Evaluate", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("terminate", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("cancel", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("impact", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("reloading", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("out_of_ammo", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("started_aiming", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("stopped_aiming", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("expire", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("Pin1", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("Pin2", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("Pin3", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("Pin4", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("Pin5", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("Pin6", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("Pin7", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("Pin8", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("Pin9", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("Pin10", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("Up", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("Down", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("Random", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("reset_all", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("reset_Random_1", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("reset_Random_2", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("reset_Random_3", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("reset_Random_4", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("reset_Random_5", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("reset_Random_6", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("reset_Random_7", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("reset_Random_8", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("reset_Random_9", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("reset_Random_10", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("Trigger_0", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("Trigger_1", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("Trigger_2", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("Trigger_3", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("Trigger_4", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("Trigger_5", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("Trigger_6", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("Trigger_7", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("Trigger_8", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("Trigger_9", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("Trigger_10", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("Trigger_11", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("Trigger_12", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("Trigger_13", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("Trigger_14", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("Trigger_15", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("Trigger_16", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("clear_user", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("clear_all", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("clear_of_alignment", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("clear_last", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("enable_dynamic_rtpc", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("disable_dynamic_rtpc", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("fail_game", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("start_X", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("stop_X", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("start_Y", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("stop_Y", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("start_Z", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("stop_Z", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("fade_out", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("set_decal_time", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("increase_aggro", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("decrease_aggro", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("force_stand_down", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("force_aggressive", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("load_bank", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("unload_bank", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("bank_loaded", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("set_override", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("enable_stealth", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("disable_stealth", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("enable_threat", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("disable_threat", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("enable_music", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("disable_music", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("trigger_now", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("barrier_open", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("barrier_close", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("enable_override", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("disable_override", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("clear_pending_ui", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("hide_ui", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("show_ui", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("update_cost", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("enable_chokepoint", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("disable_chokepoint", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("update_squad_params", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("start_ping", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("stop_ping", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("start_monitor", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("stop_monitor", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("start_monitoring", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("stop_monitoring", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("activate_tracker", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("deactivate_tracker", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("start_benchmark", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("stop_benchmark", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("apply_hide", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("apply_show", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("display_tutorial", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("transition_completed", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("display_tutorial_breathing_1", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("display_tutorial_breathing_2", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("breathing_game_tutorial_fail", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("refresh_value", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("refresh_text", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("stop_emitting", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("activate_camera", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("deactivate_camera", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("activate_behavior", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("deactivate_behavior", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("activate_modifier", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("deactivate_modifier", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("force_disable_highlight", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("cutting_panel_start", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("cutting_panel_finish", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("keypad_interaction_start", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("keypad_interaction_finish", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("traversal_interaction_start", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("lever_interaction_start", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("lever_interaction_finish", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("button_interaction_start", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("button_interaction_finish", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("ladder_interaction_start", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("ladder_interaction_finish", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("hacking_interaction_start", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("hacking_interaction_finish", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("rewire_interaction_start", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("rewire_interaction_finish", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("terminal_interaction_start", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("terminal_interaction_finish", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("suit_change_interaction_start", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("suit_change_interaction_finish", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("cutscene_visibility_start", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("cutscene_visibility_finish", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("hiding_visibility_start", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("hiding_visibility_finish", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("disable_radial", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("enable_radial", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("disable_radial_hacking_info", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("enable_radial_hacking_info", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("disable_radial_cutting_info", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("enable_radial_cutting_info", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("disable_radial_battery_info", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("enable_radial_battery_info", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("disable_hud_battery_info", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("enable_hud_battery_info", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("hide_objective_message", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("show_objective_message", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("finished_closing_container", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("seed", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("ignite", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("electrify", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("drench", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("poison", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("set_active", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("set_inactive", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("level_fade_start", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("level_fade_finish", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("torch_turned_on", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("torch_turned_off", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("torch_new_battery_added", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("torch_battery_has_expired", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("torch_low_power", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("turn_off_torch", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("turn_on_torch", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("toggle_torch", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("resume_torch", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("allow_torch", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("start_timer", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("stop_timer", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("notify_animation_started", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("notify_animation_finished", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("load_cutscene", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("unload_cutscene", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("start_cutscene", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("stop_cutscene", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("pause_cutscene", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("resume_cutscene", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("turn_on_system", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("turn_off_system", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("force_killtrap", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("cancel_force_killtrap", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("disable_killtrap", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("cancel_disable_killtrap", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("hit_by_flamethrower", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("cancel_hit_by_flamethrower", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("reload_fill", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("reload_empty", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("reload_load", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("reload_open", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("reload_fire", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("reload_finish", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("display_hacking_upgrade", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("hide_hacking_upgrade", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("reset_hacking_success_flag", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("impact_with_world", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("start_interaction", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("stop_interaction", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("allow_interrupt", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("disallow_interrupt", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("Get_In", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("Add_NPC", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("Start_Breathing_Game", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("End_Breathing_Game", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("bind_all", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("verify", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("fake_light_on", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("fake_light_off", new cFloat(), ParameterVariant.METHOD); // + newEntity.AddParameter("callback_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("trigger_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("refresh_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("start_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("stop_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("pause_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("resume_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("attach_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("detach_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("open_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("close_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("enable_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("disable_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("floating_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("sinking_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("lock_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("unlock_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("show_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("hide_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("spawn_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("despawn_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("light_switch_on_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("light_switch_off_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("proxy_enable_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("proxy_disable_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("simulate_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("keyframe_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("suspend_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("allow_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("request_open_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("request_close_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("request_lock_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("request_unlock_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("force_open_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("force_close_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("request_restore_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("rewind_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("kill_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("set_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("request_load_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("cancel_load_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("request_unload_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("cancel_unload_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("task_end_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("set_as_next_task_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("completed_pre_move_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("completed_interrupt_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("allow_early_end_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("start_allowing_interrupts_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("set_true_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("set_false_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("set_is_open_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("set_is_closed_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("apply_start_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("apply_stop_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("pause_activity_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("resume_activity_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("clear_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("enter_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("exit_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("reset_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("add_character_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("remove_character_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("purge_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("abort_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("Evaluate_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("terminate_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("cancel_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("impact_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("reloading_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("out_of_ammo_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("started_aiming_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("stopped_aiming_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("expire_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("Pin1_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("Pin2_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("Pin3_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("Pin4_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("Pin5_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("Pin6_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("Pin7_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("Pin8_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("Pin9_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("Pin10_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("Up_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("Down_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("Random_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("reset_all_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("reset_Random_1_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("reset_Random_2_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("reset_Random_3_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("reset_Random_4_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("reset_Random_5_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("reset_Random_6_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("reset_Random_7_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("reset_Random_8_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("reset_Random_9_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("reset_Random_10_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("Trigger_0_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("Trigger_1_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("Trigger_2_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("Trigger_3_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("Trigger_4_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("Trigger_5_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("Trigger_6_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("Trigger_7_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("Trigger_8_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("Trigger_9_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("Trigger_10_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("Trigger_11_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("Trigger_12_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("Trigger_13_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("Trigger_14_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("Trigger_15_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("Trigger_16_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("clear_user_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("clear_all_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("clear_of_alignment_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("clear_last_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("enable_dynamic_rtpc_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("disable_dynamic_rtpc_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("fail_game_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("start_X_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("stop_X_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("start_Y_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("stop_Y_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("start_Z_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("stop_Z_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("fade_out_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("set_decal_time_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("increase_aggro_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("decrease_aggro_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("force_stand_down_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("force_aggressive_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("load_bank_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("unload_bank_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("bank_loaded_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("set_override_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("enable_stealth_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("disable_stealth_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("enable_threat_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("disable_threat_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("enable_music_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("disable_music_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("trigger_now_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("barrier_open_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("barrier_close_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("enable_override_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("disable_override_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("clear_pending_ui_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("hide_ui_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("show_ui_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("update_cost_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("enable_chokepoint_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("disable_chokepoint_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("update_squad_params_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("start_ping_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("stop_ping_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("start_monitor_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("stop_monitor_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("start_monitoring_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("stop_monitoring_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("activate_tracker_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("deactivate_tracker_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("start_benchmark_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("stop_benchmark_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("apply_hide_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("apply_show_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("display_tutorial_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("transition_completed_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("display_tutorial_breathing_1_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("display_tutorial_breathing_2_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("breathing_game_tutorial_fail_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("refresh_value_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("refresh_text_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("stop_emitting_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("activate_camera_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("deactivate_camera_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("activate_behavior_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("deactivate_behavior_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("activate_modifier_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("deactivate_modifier_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("force_disable_highlight_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("cutting_panel_start_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("cutting_panel_finish_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("keypad_interaction_start_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("keypad_interaction_finish_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("traversal_interaction_start_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("lever_interaction_start_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("lever_interaction_finish_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("button_interaction_start_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("button_interaction_finish_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("ladder_interaction_start_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("ladder_interaction_finish_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("hacking_interaction_start_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("hacking_interaction_finish_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("rewire_interaction_start_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("rewire_interaction_finish_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("terminal_interaction_start_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("terminal_interaction_finish_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("suit_change_interaction_start_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("suit_change_interaction_finish_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("cutscene_visibility_start_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("cutscene_visibility_finish_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("hiding_visibility_start_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("hiding_visibility_finish_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("disable_radial_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("enable_radial_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("disable_radial_hacking_info_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("enable_radial_hacking_info_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("disable_radial_cutting_info_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("enable_radial_cutting_info_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("disable_radial_battery_info_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("enable_radial_battery_info_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("disable_hud_battery_info_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("enable_hud_battery_info_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("hide_objective_message_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("show_objective_message_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("finished_closing_container_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("seed_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("ignite_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("electrify_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("drench_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("poison_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("set_active_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("set_inactive_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("level_fade_start_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("level_fade_finish_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("torch_turned_on_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("torch_turned_off_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("torch_new_battery_added_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("torch_battery_has_expired_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("torch_low_power_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("turn_off_torch_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("turn_on_torch_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("toggle_torch_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("resume_torch_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("allow_torch_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("start_timer_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("stop_timer_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("notify_animation_started_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("notify_animation_finished_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("load_cutscene_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("unload_cutscene_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("start_cutscene_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("stop_cutscene_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("pause_cutscene_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("resume_cutscene_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("turn_on_system_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("turn_off_system_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("force_killtrap_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("cancel_force_killtrap_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("disable_killtrap_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("cancel_disable_killtrap_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("hit_by_flamethrower_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("cancel_hit_by_flamethrower_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("reload_fill_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("reload_empty_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("reload_load_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("reload_open_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("reload_fire_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("reload_finish_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("display_hacking_upgrade_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("hide_hacking_upgrade_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("reset_hacking_success_flag_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("impact_with_world_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("start_interaction_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("stop_interaction_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("allow_interrupt_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("disallow_interrupt_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("Get_In_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("Add_NPC_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("Start_Breathing_Game_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("End_Breathing_Game_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("bind_all_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("verify_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("fake_light_on_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("fake_light_off_finished", new cFloat(), ParameterVariant.FINISHED); // + newEntity.AddParameter("triggered", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("refreshed", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("started", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("stopped", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("paused", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("resumed", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("attached", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("detached", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("opened", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("closed", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("enabled", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("disabled", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("disabled_gravity", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("enabled_gravity", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("locked", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("unlocked", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("shown", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("hidden", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("spawned", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("despawned", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("light_switched_on", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("light_switched_off", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("proxy_enabled", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("proxy_disabled", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("simulating", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("keyframed", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("suspended", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("allowed", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("requested_open", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("requested_close", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("requested_lock", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("requested_unlock", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("forced_open", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("forced_close", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("requested_restore", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("rewound", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("killed", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("been_set", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("load_requested", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("load_cancelled", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("unload_requested", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("unload_cancelled", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("task_ended", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("task_set_as_next", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("on_pre_move_completed", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("on_completed_interrupt", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("on_early_end_allowed", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("on_start_allowing_interrupts", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("set_to_true", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("set_to_false", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("set_to_open", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("set_to_closed", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("start_applied", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("stop_applied", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("pause_applied", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("resume_applied", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("cleared", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("entered", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("exited", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("reseted", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("added", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("removed", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("purged", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("aborted", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("Evaluated", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("terminated", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("cancelled", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("impacted", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("reloading_handled", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("out_of_ammo_handled", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("started_aiming_handled", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("stopped_aiming_handled", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("expired", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("Pin1_Instant", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("Pin2_Instant", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("Pin3_Instant", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("Pin4_Instant", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("Pin5_Instant", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("Pin6_Instant", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("Pin7_Instant", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("Pin8_Instant", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("Pin9_Instant", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("Pin10_Instant", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("on_Up", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("on_Down", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("on_Random", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("on_reset_all", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("on_reset_Random_1", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("on_reset_Random_2", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("on_reset_Random_3", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("on_reset_Random_4", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("on_reset_Random_5", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("on_reset_Random_6", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("on_reset_Random_7", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("on_reset_Random_8", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("on_reset_Random_9", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("on_reset_Random_10", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("Pin_0", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("Pin_1", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("Pin_2", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("Pin_3", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("Pin_4", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("Pin_5", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("Pin_6", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("Pin_7", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("Pin_8", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("Pin_9", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("Pin_10", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("Pin_11", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("Pin_12", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("Pin_13", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("Pin_14", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("Pin_15", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("Pin_16", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("user_cleared", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("started_X", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("stopped_X", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("started_Y", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("stopped_Y", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("started_Z", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("stopped_Z", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("faded_out", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("decal_time_set", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("aggro_increased", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("aggro_decreased", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("forced_stand_down", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("forced_aggressive", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("ui_hidden", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("ui_shown", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("on_updated_cost", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("on_enable_chokepoint", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("on_disable_chokepoint", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("squad_params_updated", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("started_ping", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("stopped_ping", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("started_monitor", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("stopped_monitor", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("started_monitoring", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("stopped_monitoring", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("activated_tracker", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("deactivated_tracker", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("started_benchmark", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("stopped_benchmark", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("hide_applied", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("show_applied", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("value_refeshed", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("text_refeshed", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("stopped_emitting", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("camera_activated", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("camera_deactivated", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("behavior_activated", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("behavior_deactivated", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("modifier_activated", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("modifier_deactivated", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("cutting_pannel_started", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("cutting_pannel_finished", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("keypad_interaction_started", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("keypad_interaction_finished", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("traversal_interaction_started", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("lever_interaction_started", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("lever_interaction_finished", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("button_interaction_started", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("button_interaction_finished", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("ladder_interaction_started", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("ladder_interaction_finished", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("hacking_interaction_started", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("hacking_interaction_finished", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("rewire_interaction_started", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("rewire_interaction_finished", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("terminal_interaction_started", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("terminal_interaction_finished", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("suit_change_interaction_started", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("suit_change_interaction_finished", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("cutscene_visibility_started", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("cutscene_visibility_finished", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("hiding_visibility_started", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("hiding_visibility_finished", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("radial_disabled", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("radial_enabled", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("radial_hacking_info_disabled", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("radial_hacking_info_enabled", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("radial_cutting_info_disabled", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("radial_cutting_info_enabled", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("radial_battery_info_disabled", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("radial_battery_info_enabled", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("hud_battery_info_disabled", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("hud_battery_info_enabled", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("objective_message_hidden", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("objective_message_shown", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("closing_container_finished", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("seeded", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("activated", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("deactivated", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("level_fade_started", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("level_fade_finished", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("Turn_off_", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("Turn_on_", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("Toggle_Torch_", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("Resume_", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("Allow_", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("timer_started", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("timer_stopped", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("cutscene_started", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("cutscene_stopped", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("cutscene_paused", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("cutscene_resumed", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("killtrap_forced", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("canceled_force_killtrap", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("upon_hit_by_flamethrower", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("reload_filled", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("reload_emptied", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("reload_loaded", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("reload_opened", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("reload_fired", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("reload_finished", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("hacking_upgrade_displayed", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("hacking_upgrade_hidden", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("hacking_success_flag_reset", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("impacted_with_world", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("interaction_started", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("interaction_stopped", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("interrupt_allowed", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("interrupt_disallowed", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("Getting_in", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("Breathing_Game_Started", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("Breathing_Game_Ended", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("fake_light_on_triggered", new cFloat(), ParameterVariant.RELAY); // + newEntity.AddParameter("fake_light_off_triggered", new cFloat(), ParameterVariant.RELAY); // + break; + case FunctionType.ScriptInterface: + newEntity.AddParameter("delete_me", new cBool(false), ParameterVariant.STATE); //bool + newEntity.AddParameter("name", new cString(" "), ParameterVariant.PARAMETER); //String + break; + case FunctionType.ProxyInterface: + newEntity.AddParameter("proxy_filter_targets", new cBool(false), ParameterVariant.STATE); //bool + newEntity.AddParameter("proxy_enable_on_reset", new cBool(false), ParameterVariant.STATE); //bool + break; + case FunctionType.ScriptVariable: + newEntity.AddParameter("on_changed", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_restored", new cFloat(), ParameterVariant.TARGET); // + break; + case FunctionType.SensorInterface: + newEntity.AddParameter("start_on_reset", new cBool(false), ParameterVariant.STATE); //bool + newEntity.AddParameter("pause_on_reset", new cBool(false), ParameterVariant.STATE); //bool + break; + case FunctionType.CloseableInterface: + newEntity.AddParameter("open_on_reset", new cBool(false), ParameterVariant.STATE); //bool + break; + case FunctionType.GateInterface: + newEntity.AddParameter("open_on_reset", new cBool(false), ParameterVariant.STATE); //bool + newEntity.AddParameter("lock_on_reset", new cBool(false), ParameterVariant.STATE); //bool + break; + case FunctionType.ZoneInterface: + newEntity.AddParameter("on_loaded", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_unloaded", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_streaming", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("force_visible_on_load", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.AttachmentInterface: + newEntity.AddParameter("attach_on_reset", new cBool(true), ParameterVariant.STATE); //bool + newEntity.AddParameter("attachment", new cFloat(), ParameterVariant.INPUT); //ReferenceFramePtr + newEntity.AddParameter("position", new cTransform(), ParameterVariant.PARAMETER); //Position + break; + case FunctionType.SensorAttachmentInterface: + newEntity.AddParameter("start_on_reset", new cBool(false), ParameterVariant.STATE); //bool + newEntity.AddParameter("pause_on_reset", new cBool(false), ParameterVariant.STATE); //bool + break; + case FunctionType.CompositeInterface: + newEntity.AddParameter("is_template", new cBool(false), ParameterVariant.STATE); //bool + newEntity.AddParameter("local_only", new cBool(false), ParameterVariant.STATE); //bool + newEntity.AddParameter("suspend_on_reset", new cBool(false), ParameterVariant.STATE); //bool + newEntity.AddParameter("deleted", new cBool(false), ParameterVariant.STATE); //bool + newEntity.AddParameter("is_shared", new cBool(false), ParameterVariant.STATE); //bool + newEntity.AddParameter("requires_script_for_current_gen", new cBool(true), ParameterVariant.STATE); //bool + newEntity.AddParameter("requires_script_for_next_gen", new cBool(true), ParameterVariant.STATE); //bool + newEntity.AddParameter("convert_to_physics", new cBool(false), ParameterVariant.STATE); //bool + newEntity.AddParameter("delete_standard_collision", new cBool(false), ParameterVariant.STATE); //bool + newEntity.AddParameter("delete_ballistic_collision", new cBool(false), ParameterVariant.STATE); //bool + newEntity.AddParameter("disable_display", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("disable_collision", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("disable_simulation", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("mapping", new cString(), ParameterVariant.PARAMETER); //FilePath + newEntity.AddParameter("include_in_planar_reflections", new cBool(), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.EnvironmentModelReference: + cResource resourceData2 = new cResource(newEntity.shortGUID); + resourceData2.AddResource(ResourceType.ANIMATED_MODEL); //TODO: need to figure out what startIndex links to, so we can set that! + newEntity.parameters.Add(new Parameter("resource", resourceData2)); + break; + case FunctionType.SplinePath: + newEntity.AddParameter("loop", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("orientated", new cBool(), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("points", new cSpline(), ParameterVariant.INTERNAL); //SplineData + break; + case FunctionType.Box: + newEntity.AddParameter("event", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("enable_on_reset", new cBool(true), ParameterVariant.STATE); //bool + newEntity.AddParameter("half_dimensions", new cVector3(), ParameterVariant.PARAMETER); //Direction + newEntity.AddParameter("include_physics", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.HasAccessAtDifficulty: + newEntity.AddParameter("difficulty", new cInteger(0), ParameterVariant.PARAMETER); //int + break; + case FunctionType.UpdateLeaderBoardDisplay: + newEntity.AddParameter("time", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.SetNextLoadingMovie: + newEntity.AddParameter("playlist_to_load", new cString(" "), ParameterVariant.PARAMETER); //String + break; + case FunctionType.ButtonMashPrompt: + newEntity.AddParameter("on_back_to_zero", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_degrade", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_mashed", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_success", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("count", new cInteger(), ParameterVariant.OUTPUT); //int + newEntity.AddParameter("mashes_to_completion", new cInteger(0), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("time_between_degrades", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("use_degrade", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("hold_to_charge", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.GetFlashIntValue: + newEntity.AddParameter("callback", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("enable_on_reset", new cBool(false), ParameterVariant.STATE); //bool + newEntity.AddParameter("int_value", new cInteger(), ParameterVariant.OUTPUT); //int + newEntity.AddParameter("callback_name", new cString(" "), ParameterVariant.PARAMETER); //String + break; + case FunctionType.GetFlashFloatValue: + newEntity.AddParameter("callback", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("enable_on_reset", new cBool(false), ParameterVariant.STATE); //bool + newEntity.AddParameter("float_value", new cFloat(), ParameterVariant.OUTPUT); //float + newEntity.AddParameter("callback_name", new cString(" "), ParameterVariant.PARAMETER); //String + break; + case FunctionType.Sphere: + newEntity.AddParameter("event", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("enable_on_reset", new cBool(true), ParameterVariant.STATE); //bool + newEntity.AddParameter("radius", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("include_physics", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.ImpactSphere: + newEntity.AddParameter("event", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("radius", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("include_physics", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.UiSelectionBox: + newEntity.AddParameter("is_priority", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.UiSelectionSphere: + newEntity.AddParameter("is_priority", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.CollisionBarrier: + newEntity.AddParameter("on_damaged", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("deleted", new cBool(false), ParameterVariant.STATE); //bool + newEntity.AddParameter("collision_type", new cEnum("COLLISION_TYPE", 0), ParameterVariant.PARAMETER); //COLLISION_TYPE + newEntity.AddParameter("static_collision", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.PlayerTriggerBox: + newEntity.AddParameter("on_entered", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_exited", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("enable_on_reset", new cBool(true), ParameterVariant.STATE); //bool + newEntity.AddParameter("half_dimensions", new cVector3(), ParameterVariant.PARAMETER); //Direction + break; + case FunctionType.PlayerUseTriggerBox: + newEntity.AddParameter("on_entered", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_exited", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_use", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("enable_on_reset", new cBool(true), ParameterVariant.STATE); //bool + newEntity.AddParameter("half_dimensions", new cVector3(), ParameterVariant.PARAMETER); //Direction + newEntity.AddParameter("text", new cString(" "), ParameterVariant.PARAMETER); //String + break; + case FunctionType.ModelReference: + newEntity.AddParameter("on_damaged", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("show_on_reset", new cBool(true), ParameterVariant.STATE); //bool + newEntity.AddParameter("enable_on_reset", new cBool(true), ParameterVariant.STATE); //bool + newEntity.AddParameter("simulate_on_reset", new cBool(true), ParameterVariant.STATE); //bool + newEntity.AddParameter("light_on_reset", new cBool(true), ParameterVariant.STATE); //bool + newEntity.AddParameter("convert_to_physics", new cBool(false), ParameterVariant.STATE); //bool + newEntity.AddParameter("material", new cString(" "), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("occludes_atmosphere", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("include_in_planar_reflections", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("lod_ranges", new cString(" "), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("intensity_multiplier", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("radiosity_multiplier", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("emissive_tint", new cVector3(), ParameterVariant.PARAMETER); //Direction + newEntity.AddParameter("replace_intensity", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("replace_tint", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("decal_scale", new cVector3(), ParameterVariant.PARAMETER); //Direction + newEntity.AddParameter("lightdecal_tint", new cVector3(), ParameterVariant.PARAMETER); //Direction + newEntity.AddParameter("lightdecal_intensity", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("diffuse_colour_scale", new cVector3(), ParameterVariant.PARAMETER); //Direction + newEntity.AddParameter("diffuse_opacity_scale", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("vertex_colour_scale", new cVector3(), ParameterVariant.PARAMETER); //Direction + newEntity.AddParameter("vertex_opacity_scale", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("uv_scroll_speed_x", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("uv_scroll_speed_y", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("alpha_blend_noise_power_scale", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("alpha_blend_noise_uv_scale", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("alpha_blend_noise_uv_offset_X", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("alpha_blend_noise_uv_offset_Y", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("dirt_multiply_blend_spec_power_scale", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("dirt_map_uv_scale", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("remove_on_damaged", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("damage_threshold", new cInteger(1), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("is_debris", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("is_prop", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("is_thrown", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("report_sliding", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("force_keyframed", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("force_transparent", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("soft_collision", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("allow_reposition_of_physics", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("disable_size_culling", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("cast_shadows", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("cast_shadows_in_torch", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("alpha_light_offset_x", new cFloat(0.0f), ParameterVariant.INTERNAL); //float + newEntity.AddParameter("alpha_light_offset_y", new cFloat(0.0f), ParameterVariant.INTERNAL); //float + newEntity.AddParameter("alpha_light_scale_x", new cFloat(1.0f), ParameterVariant.INTERNAL); //float + newEntity.AddParameter("alpha_light_scale_y", new cFloat(1.0f), ParameterVariant.INTERNAL); //float + newEntity.AddParameter("alpha_light_average_normal", new cVector3(), ParameterVariant.INTERNAL); //Direction + cResource resourceData = new cResource(newEntity.shortGUID); + resourceData.AddResource(ResourceType.RENDERABLE_INSTANCE); + newEntity.parameters.Add(new Parameter("resource", resourceData)); + break; + case FunctionType.LightReference: + newEntity.AddParameter("deleted", new cBool(false), ParameterVariant.STATE); //bool + newEntity.AddParameter("show_on_reset", new cBool(true), ParameterVariant.STATE); //bool + newEntity.AddParameter("light_on_reset", new cBool(true), ParameterVariant.STATE); //bool + newEntity.AddParameter("occlusion_geometry", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.RENDERABLE_INSTANCE) }.ToList(), newEntity.shortGUID), ParameterVariant.INPUT); //RENDERABLE_INSTANCE + newEntity.AddParameter("mastered_by_visibility", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("exclude_shadow_entities", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("type", new cEnum("LIGHT_TYPE", 0), ParameterVariant.PARAMETER); //LIGHT_TYPE + newEntity.AddParameter("defocus_attenuation", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("start_attenuation", new cFloat(0.1f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("end_attenuation", new cFloat(2.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("physical_attenuation", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("near_dist", new cFloat(0.1f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("near_dist_shadow_offset", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("inner_cone_angle", new cFloat(22.5f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("outer_cone_angle", new cFloat(45.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("intensity_multiplier", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("radiosity_multiplier", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("area_light_radius", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("diffuse_softness", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("diffuse_bias", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("glossiness_scale", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("flare_occluder_radius", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("flare_spot_offset", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("flare_intensity_scale", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("cast_shadow", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("fade_type", new cEnum("LIGHT_FADE_TYPE", 1), ParameterVariant.PARAMETER); //LIGHT_FADE_TYPE + newEntity.AddParameter("is_specular", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("has_lens_flare", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("has_noclip", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("is_square_light", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("is_flash_light", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("no_alphalight", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("include_in_planar_reflections", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("shadow_priority", new cInteger(0), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("aspect_ratio", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("gobo_texture", new cString(" "), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("horizontal_gobo_flip", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("colour", new cVector3(), ParameterVariant.PARAMETER); //Direction + newEntity.AddParameter("strip_length", new cFloat(10.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("distance_mip_selection_gobo", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("volume", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("volume_end_attenuation", new cFloat(-1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("volume_colour_factor", new cVector3(), ParameterVariant.PARAMETER); //Direction + newEntity.AddParameter("volume_density", new cFloat(0.2f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("depth_bias", new cFloat(0.05f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("slope_scale_depth_bias", new cInteger(1), ParameterVariant.PARAMETER); //int + newEntity.AddResource(ResourceType.RENDERABLE_INSTANCE); + break; + case FunctionType.ParticleEmitterReference: + newEntity.AddParameter("start_on_reset", new cBool(true), ParameterVariant.STATE); //bool + newEntity.AddParameter("show_on_reset", new cBool(true), ParameterVariant.STATE); //bool + newEntity.AddParameter("deleted", new cBool(false), ParameterVariant.STATE); //bool + newEntity.AddParameter("mastered_by_visibility", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("use_local_rotation", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("include_in_planar_reflections", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("material", new cString(" "), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("unique_material", new cBool(), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("quality_level", new cInteger(1), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("bounds_max", new cVector3(), ParameterVariant.PARAMETER); //Direction + newEntity.AddParameter("bounds_min", new cVector3(), ParameterVariant.PARAMETER); //Direction + newEntity.AddParameter("TEXTURE_MAP", new cString(""), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("DRAW_PASS", new cInteger(8), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("ASPECT_RATIO", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("FADE_AT_DISTANCE", new cFloat(5000.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("PARTICLE_COUNT", new cInteger(100), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("SYSTEM_EXPIRY_TIME", new cFloat(10.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("SIZE_START_MIN", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("SIZE_START_MAX", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("SIZE_END_MIN", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("SIZE_END_MAX", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("ALPHA_IN", new cFloat(0.01f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("ALPHA_OUT", new cFloat(99.99f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("MASK_AMOUNT_MIN", new cFloat(0.5f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("MASK_AMOUNT_MAX", new cFloat(0.5f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("MASK_AMOUNT_MIDPOINT", new cFloat(0.5f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("PARTICLE_EXPIRY_TIME_MIN", new cFloat(2.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("PARTICLE_EXPIRY_TIME_MAX", new cFloat(2.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("COLOUR_SCALE_MIN", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("COLOUR_SCALE_MAX", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("WIND_X", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("WIND_Y", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("WIND_Z", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("ALPHA_REF_VALUE", new cFloat(0.5f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("BILLBOARDING_LS", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("BILLBOARDING", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("BILLBOARDING_NONE", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("BILLBOARDING_ON_AXIS_X", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("BILLBOARDING_ON_AXIS_Y", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("BILLBOARDING_ON_AXIS_Z", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("BILLBOARDING_VELOCITY_ALIGNED", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("BILLBOARDING_VELOCITY_STRETCHED", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("BILLBOARDING_SPHERE_PROJECTION", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("BLENDING_STANDARD", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("BLENDING_ALPHA_REF", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("BLENDING_ADDITIVE", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("BLENDING_PREMULTIPLIED", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("BLENDING_DISTORTION", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("LOW_RES", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("EARLY_ALPHA", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("LOOPING", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("ANIMATED_ALPHA", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("NONE", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("LIGHTING", new cInteger(0), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("PER_PARTICLE_LIGHTING", new cInteger(0), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("X_AXIS_FLIP", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("Y_AXIS_FLIP", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("BILLBOARD_FACING", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("BILLBOARDING_ON_AXIS_FADEOUT", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("BILLBOARDING_CAMERA_LOCKED", new cInteger(0), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("CAMERA_RELATIVE_POS_X", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("CAMERA_RELATIVE_POS_Y", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("CAMERA_RELATIVE_POS_Z", new cFloat(3.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("SPHERE_PROJECTION_RADIUS", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("DISTORTION_STRENGTH", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("SCALE_MODIFIER", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("CPU", new cInteger(0), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("SPAWN_RATE", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("SPAWN_RATE_VAR", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("SPAWN_NUMBER", new cInteger(0), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("LIFETIME", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("LIFETIME_VAR", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("WORLD_TO_LOCAL_BLEND_START", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("WORLD_TO_LOCAL_BLEND_END", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("WORLD_TO_LOCAL_MAX_DIST", new cFloat(1000.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("CELL_EMISSION", new cInteger(0), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("CELL_MAX_DIST", new cFloat(6.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("CUSTOM_SEED_CPU", new cInteger(0), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("SEED", new cInteger(0), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("ALPHA_TEST", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("ZTEST", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("START_MID_END_SPEED", new cInteger(0), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("SPEED_START_MIN", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("SPEED_START_MAX", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("SPEED_MID_MIN", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("SPEED_MID_MAX", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("SPEED_END_MIN", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("SPEED_END_MAX", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("LAUNCH_DECELERATE_SPEED", new cInteger(0), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("LAUNCH_DECELERATE_SPEED_START_MIN", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("LAUNCH_DECELERATE_SPEED_START_MAX", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("LAUNCH_DECELERATE_DEC_RATE", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("EMISSION_AREA", new cInteger(0), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("EMISSION_AREA_X", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("EMISSION_AREA_Y", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("EMISSION_AREA_Z", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("EMISSION_SURFACE", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("EMISSION_DIRECTION_SURFACE", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("AREA_CUBOID", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("AREA_SPHEROID", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("AREA_CYLINDER", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("PIVOT_X", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("PIVOT_Y", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("GRAVITY", new cInteger(1), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("GRAVITY_STRENGTH", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("GRAVITY_MAX_STRENGTH", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("COLOUR_TINT", new cInteger(0), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("COLOUR_TINT_START", new cVector3(), ParameterVariant.PARAMETER); //Direction + newEntity.AddParameter("COLOUR_TINT_END", new cVector3(), ParameterVariant.PARAMETER); //Direction + newEntity.AddParameter("COLOUR_USE_MID", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("COLOUR_TINT_MID", new cVector3(), ParameterVariant.PARAMETER); //Direction + newEntity.AddParameter("COLOUR_MIDPOINT", new cFloat(0.5f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("SPREAD_FEATURE", new cInteger(1), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("SPREAD_MIN", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("SPREAD", new cFloat(360.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("ROTATION", new cInteger(0), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("ROTATION_MIN", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("ROTATION_MAX", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("ROTATION_RANDOM_START", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("ROTATION_BASE", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("ROTATION_VAR", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("ROTATION_RAMP", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("ROTATION_IN", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("ROTATION_OUT", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("ROTATION_DAMP", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("FADE_NEAR_CAMERA", new cInteger(0), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("FADE_NEAR_CAMERA_MAX_DIST", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("FADE_NEAR_CAMERA_THRESHOLD", new cFloat(0.8f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("TEXTURE_ANIMATION", new cInteger(0), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("TEXTURE_ANIMATION_FRAMES", new cInteger(1), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("NUM_ROWS", new cInteger(1), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("TEXTURE_ANIMATION_LOOP_COUNT", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("RANDOM_START_FRAME", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("WRAP_FRAMES", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("NO_ANIM", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("SUB_FRAME_BLEND", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("SOFTNESS", new cInteger(0), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("SOFTNESS_EDGE", new cFloat(0.1f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("SOFTNESS_ALPHA_THICKNESS", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("SOFTNESS_ALPHA_DEPTH_MODIFIER", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("REVERSE_SOFTNESS", new cInteger(0), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("REVERSE_SOFTNESS_EDGE", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("PIVOT_AND_TURBULENCE", new cInteger(0), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("PIVOT_OFFSET_MIN", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("PIVOT_OFFSET_MAX", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("TURBULENCE_FREQUENCY_MIN", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("TURBULENCE_FREQUENCY_MAX", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("TURBULENCE_AMOUNT_MIN", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("TURBULENCE_AMOUNT_MAX", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("ALPHATHRESHOLD", new cInteger(0), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("ALPHATHRESHOLD_TOTALTIME", new cFloat(5.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("ALPHATHRESHOLD_RANGE", new cFloat(0.1f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("ALPHATHRESHOLD_BEGINSTART", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("ALPHATHRESHOLD_BEGINSTOP", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("ALPHATHRESHOLD_ENDSTART", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("ALPHATHRESHOLD_ENDSTOP", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("COLOUR_RAMP", new cInteger(0), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("COLOUR_RAMP_MAP", new cString(""), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("COLOUR_RAMP_ALPHA", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("DEPTH_FADE_AXIS", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("DEPTH_FADE_AXIS_DIST", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("DEPTH_FADE_AXIS_PERCENT", new cFloat(0.5f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("FLOW_UV_ANIMATION", new cInteger(0), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("FLOW_MAP", new cString(""), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("FLOW_TEXTURE_MAP", new cString(""), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("CYCLE_TIME", new cFloat(0.5f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("FLOW_SPEED", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("FLOW_TEX_SCALE", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("FLOW_WARP_STRENGTH", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("INFINITE_PROJECTION", new cInteger(0), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("PARALLAX_POSITION", new cVector3(), ParameterVariant.PARAMETER); //Direction + newEntity.AddParameter("DISTORTION_OCCLUSION", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("AMBIENT_LIGHTING", new cInteger(0), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("AMBIENT_LIGHTING_COLOUR", new cVector3(), ParameterVariant.PARAMETER); //Direction + newEntity.AddParameter("NO_CLIP", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddResource(ResourceType.RENDERABLE_INSTANCE); + break; + case FunctionType.RibbonEmitterReference: + newEntity.AddParameter("deleted", new cBool(false), ParameterVariant.STATE); //bool + newEntity.AddParameter("start_on_reset", new cBool(true), ParameterVariant.STATE); //bool + newEntity.AddParameter("show_on_reset", new cBool(true), ParameterVariant.STATE); //bool + newEntity.AddParameter("mastered_by_visibility", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("use_local_rotation", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("include_in_planar_reflections", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("material", new cString(" "), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("unique_material", new cBool(), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("quality_level", new cInteger(1), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("BLENDING_STANDARD", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("BLENDING_ALPHA_REF", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("BLENDING_ADDITIVE", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("BLENDING_PREMULTIPLIED", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("BLENDING_DISTORTION", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("NO_MIPS", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("UV_SQUARED", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("LOW_RES", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("LIGHTING", new cInteger(0), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("MASK_AMOUNT_MIN", new cFloat(0.5f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("MASK_AMOUNT_MAX", new cFloat(0.5f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("MASK_AMOUNT_MIDPOINT", new cFloat(0.5f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("DRAW_PASS", new cInteger(8), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("SYSTEM_EXPIRY_TIME", new cFloat(10.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("LIFETIME", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("SMOOTHED", new cInteger(1), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("WORLD_TO_LOCAL_BLEND_START", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("WORLD_TO_LOCAL_BLEND_END", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("WORLD_TO_LOCAL_MAX_DIST", new cFloat(1000.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("TEXTURE", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("TEXTURE_MAP", new cString(""), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("UV_REPEAT", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("UV_SCROLLSPEED", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("MULTI_TEXTURE", new cInteger(0), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("U2_SCALE", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("V2_REPEAT", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("V2_SCROLLSPEED", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("MULTI_TEXTURE_BLEND", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("MULTI_TEXTURE_ADD", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("MULTI_TEXTURE_MULT", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("MULTI_TEXTURE_MAX", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("MULTI_TEXTURE_MIN", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("SECOND_TEXTURE", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("TEXTURE_MAP2", new cString(""), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("CONTINUOUS", new cInteger(1), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("BASE_LOCKED", new cInteger(0), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("SPAWN_RATE", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("TRAILING", new cInteger(0), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("INSTANT", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("RATE", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("TRAIL_SPAWN_RATE", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("TRAIL_DELAY", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("MAX_TRAILS", new cFloat(5.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("POINT_TO_POINT", new cInteger(0), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("TARGET_POINT_POSITION", new cVector3(), ParameterVariant.PARAMETER); //Direction + newEntity.AddParameter("DENSITY", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("ABS_FADE_IN_0", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("ABS_FADE_IN_1", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("FORCES", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("GRAVITY_STRENGTH", new cFloat(-4.81f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("GRAVITY_MAX_STRENGTH", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("DRAG_STRENGTH", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("WIND_X", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("WIND_Y", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("WIND_Z", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("START_MID_END_SPEED", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("SPEED_START_MIN", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("SPEED_START_MAX", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("WIDTH", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("WIDTH_START", new cFloat(0.2f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("WIDTH_MID", new cFloat(0.2f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("WIDTH_END", new cFloat(0.2f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("WIDTH_IN", new cFloat(0.2f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("WIDTH_OUT", new cFloat(0.8f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("COLOUR_TINT", new cInteger(1), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("COLOUR_SCALE_START", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("COLOUR_SCALE_MID", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("COLOUR_SCALE_END", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("COLOUR_TINT_START", new cVector3(), ParameterVariant.PARAMETER); //Direction + newEntity.AddParameter("COLOUR_TINT_MID", new cVector3(), ParameterVariant.PARAMETER); //Direction + newEntity.AddParameter("COLOUR_TINT_END", new cVector3(), ParameterVariant.PARAMETER); //Direction + newEntity.AddParameter("ALPHA_FADE", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("FADE_IN", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("FADE_OUT", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("EDGE_FADE", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("ALPHA_ERODE", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("SIDE_ON_FADE", new cInteger(0), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("SIDE_FADE_START", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("SIDE_FADE_END", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("DISTANCE_SCALING", new cInteger(0), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("DIST_SCALE", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("SPREAD_FEATURE", new cInteger(1), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("SPREAD_MIN", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("SPREAD", new cFloat(0.99999f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("EMISSION_AREA", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("EMISSION_AREA_X", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("EMISSION_AREA_Y", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("EMISSION_AREA_Z", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("AREA_CUBOID", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("AREA_SPHEROID", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("AREA_CYLINDER", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("COLOUR_RAMP", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("COLOUR_RAMP_MAP", new cString(""), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("SOFTNESS", new cInteger(0), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("SOFTNESS_EDGE", new cFloat(0.1f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("SOFTNESS_ALPHA_THICKNESS", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("SOFTNESS_ALPHA_DEPTH_MODIFIER", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("AMBIENT_LIGHTING", new cInteger(0), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("AMBIENT_LIGHTING_COLOUR", new cVector3(), ParameterVariant.PARAMETER); //Direction + newEntity.AddParameter("NO_CLIP", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddResource(ResourceType.RENDERABLE_INSTANCE); + break; + case FunctionType.GPU_PFXEmitterReference: + newEntity.AddParameter("start_on_reset", new cBool(true), ParameterVariant.STATE); //bool + newEntity.AddParameter("deleted", new cBool(false), ParameterVariant.STATE); //bool + newEntity.AddParameter("mastered_by_visibility", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("EFFECT_NAME", new cString(" "), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("SPAWN_NUMBER", new cInteger(100), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("SPAWN_RATE", new cFloat(100.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("SPREAD_MIN", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("SPREAD_MAX", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("EMITTER_SIZE", new cFloat(0.1f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("SPEED", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("SPEED_VAR", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("LIFETIME", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("LIFETIME_VAR", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.FogSphere: + newEntity.AddParameter("deleted", new cBool(false), ParameterVariant.STATE); //bool + newEntity.AddParameter("show_on_reset", new cBool(true), ParameterVariant.STATE); //bool + newEntity.AddParameter("COLOUR_TINT", new cVector3(), ParameterVariant.PARAMETER); //Direction + newEntity.AddParameter("INTENSITY", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("OPACITY", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("EARLY_ALPHA", new cBool(), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("LOW_RES_ALPHA", new cBool(), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("CONVEX_GEOM", new cBool(), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("DISABLE_SIZE_CULLING", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("NO_CLIP", new cBool(), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("ALPHA_LIGHTING", new cBool(), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("DYNAMIC_ALPHA_LIGHTING", new cBool(), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("DENSITY", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("EXPONENTIAL_DENSITY", new cBool(), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("SCENE_DEPENDANT_DENSITY", new cBool(), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("FRESNEL_TERM", new cBool(), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("FRESNEL_POWER", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("SOFTNESS", new cBool(), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("SOFTNESS_EDGE", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("BLEND_ALPHA_OVER_DISTANCE", new cBool(), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("FAR_BLEND_DISTANCE", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("NEAR_BLEND_DISTANCE", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("SECONDARY_BLEND_ALPHA_OVER_DISTANCE", new cBool(), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("SECONDARY_FAR_BLEND_DISTANCE", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("SECONDARY_NEAR_BLEND_DISTANCE", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("DEPTH_INTERSECT_COLOUR", new cBool(), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("DEPTH_INTERSECT_COLOUR_VALUE", new cVector3(), ParameterVariant.PARAMETER); //Direction + newEntity.AddParameter("DEPTH_INTERSECT_ALPHA_VALUE", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("DEPTH_INTERSECT_RANGE", new cFloat(0.1f), ParameterVariant.PARAMETER); //float + newEntity.AddResource(ResourceType.RENDERABLE_INSTANCE); + break; + case FunctionType.FogBox: + newEntity.AddParameter("deleted", new cBool(false), ParameterVariant.STATE); //bool + newEntity.AddParameter("show_on_reset", new cBool(true), ParameterVariant.STATE); //bool + newEntity.AddParameter("GEOMETRY_TYPE", new cEnum("FOG_BOX_TYPE", 1), ParameterVariant.PARAMETER); //FOG_BOX_TYPE + newEntity.AddParameter("COLOUR_TINT", new cVector3(), ParameterVariant.PARAMETER); //Direction + newEntity.AddParameter("DISTANCE_FADE", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("ANGLE_FADE", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("BILLBOARD", new cBool(), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("EARLY_ALPHA", new cBool(), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("LOW_RES", new cBool(), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("CONVEX_GEOM", new cBool(), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("THICKNESS", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("START_DISTANT_CLIP", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("START_DISTANCE_FADE", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("SOFTNESS", new cBool(), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("SOFTNESS_EDGE", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("LINEAR_HEIGHT_DENSITY", new cBool(), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("SMOOTH_HEIGHT_DENSITY", new cBool(), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("HEIGHT_MAX_DENSITY", new cFloat(0.4f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("FRESNEL_FALLOFF", new cBool(), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("FRESNEL_POWER", new cFloat(3.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("DEPTH_INTERSECT_COLOUR", new cBool(), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("DEPTH_INTERSECT_INITIAL_COLOUR", new cVector3(), ParameterVariant.PARAMETER); //Direction + newEntity.AddParameter("DEPTH_INTERSECT_INITIAL_ALPHA", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("DEPTH_INTERSECT_MIDPOINT_COLOUR", new cVector3(), ParameterVariant.PARAMETER); //Direction + newEntity.AddParameter("DEPTH_INTERSECT_MIDPOINT_ALPHA", new cFloat(1.5f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("DEPTH_INTERSECT_MIDPOINT_DEPTH", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("DEPTH_INTERSECT_END_COLOUR", new cVector3(), ParameterVariant.PARAMETER); //Direction + newEntity.AddParameter("DEPTH_INTERSECT_END_ALPHA", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("DEPTH_INTERSECT_END_DEPTH", new cFloat(2.0f), ParameterVariant.PARAMETER); //float + newEntity.AddResource(ResourceType.RENDERABLE_INSTANCE); + break; + case FunctionType.SurfaceEffectSphere: + newEntity.AddParameter("deleted", new cBool(false), ParameterVariant.STATE); //bool + newEntity.AddParameter("show_on_reset", new cBool(true), ParameterVariant.STATE); //bool + newEntity.AddParameter("COLOUR_TINT", new cVector3(), ParameterVariant.PARAMETER); //Direction + newEntity.AddParameter("COLOUR_TINT_OUTER", new cVector3(), ParameterVariant.PARAMETER); //Direction + newEntity.AddParameter("INTENSITY", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("OPACITY", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("FADE_OUT_TIME", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("SURFACE_WRAP", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("ROUGHNESS_SCALE", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("SPARKLE_SCALE", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("METAL_STYLE_REFLECTIONS", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("SHININESS_OPACITY", new cFloat(), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("TILING_ZY", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("TILING_ZX", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("TILING_XY", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("WS_LOCKED", new cBool(), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("TEXTURE_MAP", new cString(""), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("SPARKLE_MAP", new cString(""), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("ENVMAP", new cBool(), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("ENVIRONMENT_MAP", new cString(""), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("ENVMAP_PERCENT_EMISSIVE", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("SPHERE", new cBool(), ParameterVariant.PARAMETER); //bool + newEntity.AddResource(ResourceType.RENDERABLE_INSTANCE); + break; + case FunctionType.SurfaceEffectBox: + newEntity.AddParameter("deleted", new cBool(false), ParameterVariant.STATE); //bool + newEntity.AddParameter("show_on_reset", new cBool(true), ParameterVariant.STATE); //bool + newEntity.AddParameter("COLOUR_TINT", new cVector3(), ParameterVariant.PARAMETER); //Direction + newEntity.AddParameter("COLOUR_TINT_OUTER", new cVector3(), ParameterVariant.PARAMETER); //Direction + newEntity.AddParameter("INTENSITY", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("OPACITY", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("FADE_OUT_TIME", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("SURFACE_WRAP", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("ROUGHNESS_SCALE", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("SPARKLE_SCALE", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("METAL_STYLE_REFLECTIONS", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("SHININESS_OPACITY", new cFloat(), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("TILING_ZY", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("TILING_ZX", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("TILING_XY", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("FALLOFF", new cVector3(), ParameterVariant.PARAMETER); //Direction + newEntity.AddParameter("WS_LOCKED", new cBool(), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("TEXTURE_MAP", new cString(""), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("SPARKLE_MAP", new cString(""), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("ENVMAP", new cBool(), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("ENVIRONMENT_MAP", new cString(""), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("ENVMAP_PERCENT_EMISSIVE", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("SPHERE", new cBool(), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("BOX", new cBool(), ParameterVariant.PARAMETER); //bool + newEntity.AddResource(ResourceType.RENDERABLE_INSTANCE); + break; + case FunctionType.SimpleWater: + newEntity.AddParameter("deleted", new cBool(false), ParameterVariant.STATE); //bool + newEntity.AddParameter("show_on_reset", new cBool(true), ParameterVariant.STATE); //bool + newEntity.AddParameter("SHININESS", new cFloat(0.8f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("softness_edge", new cFloat(0.005f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("FRESNEL_POWER", new cFloat(0.8f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("MIN_FRESNEL", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("MAX_FRESNEL", new cFloat(5.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("LOW_RES_ALPHA_PASS", new cBool(), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("ATMOSPHERIC_FOGGING", new cBool(), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("NORMAL_MAP", new cString(""), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("SPEED", new cFloat(0.01f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("SCALE", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("NORMAL_MAP_STRENGTH", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("SECONDARY_NORMAL_MAPPING", new cBool(), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("SECONDARY_SPEED", new cFloat(-0.01f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("SECONDARY_SCALE", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("SECONDARY_NORMAL_MAP_STRENGTH", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("ALPHA_MASKING", new cBool(), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("ALPHA_MASK", new cString(""), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("FLOW_MAPPING", new cBool(), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("FLOW_MAP", new cString(""), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("CYCLE_TIME", new cFloat(10.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("FLOW_SPEED", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("FLOW_TEX_SCALE", new cFloat(4.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("FLOW_WARP_STRENGTH", new cFloat(0.5f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("ENVIRONMENT_MAPPING", new cBool(), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("ENVIRONMENT_MAP", new cString(""), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("ENVIRONMENT_MAP_MULT", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("LOCALISED_ENVIRONMENT_MAPPING", new cBool(), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("ENVMAP_SIZE", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("LOCALISED_ENVMAP_BOX_PROJECTION", new cBool(), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("ENVMAP_BOXPROJ_BB_SCALE", new cVector3(), ParameterVariant.PARAMETER); //Direction + newEntity.AddParameter("REFLECTIVE_MAPPING", new cBool(), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("REFLECTION_PERTURBATION_STRENGTH", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("DEPTH_FOG_INITIAL_COLOUR", new cVector3(), ParameterVariant.PARAMETER); //Direction + newEntity.AddParameter("DEPTH_FOG_INITIAL_ALPHA", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("DEPTH_FOG_MIDPOINT_COLOUR", new cVector3(), ParameterVariant.PARAMETER); //Direction + newEntity.AddParameter("DEPTH_FOG_MIDPOINT_ALPHA", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("DEPTH_FOG_MIDPOINT_DEPTH", new cFloat(0.5f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("DEPTH_FOG_END_COLOUR", new cVector3(), ParameterVariant.PARAMETER); //Direction + newEntity.AddParameter("DEPTH_FOG_END_ALPHA", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("DEPTH_FOG_END_DEPTH", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("CAUSTIC_TEXTURE", new cString(""), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("CAUSTIC_TEXTURE_SCALE", new cFloat(), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("CAUSTIC_REFRACTIONS", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("CAUSTIC_REFLECTIONS", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("CAUSTIC_SPEED_SCALAR", new cFloat(), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("CAUSTIC_INTENSITY", new cFloat(), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("CAUSTIC_SURFACE_WRAP", new cFloat(), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("CAUSTIC_HEIGHT", new cFloat(), ParameterVariant.PARAMETER); //float + newEntity.AddResource(ResourceType.RENDERABLE_INSTANCE); + newEntity.AddParameter("CAUSTIC_TEXTURE_INDEX", new cInteger(-1), ParameterVariant.INTERNAL); //int + break; + case FunctionType.SimpleRefraction: + newEntity.AddParameter("deleted", new cBool(false), ParameterVariant.STATE); //bool + newEntity.AddParameter("show_on_reset", new cBool(true), ParameterVariant.STATE); //bool + newEntity.AddParameter("DISTANCEFACTOR", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("NORMAL_MAP", new cString(""), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("SPEED", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("SCALE", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("REFRACTFACTOR", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("SECONDARY_NORMAL_MAPPING", new cBool(), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("SECONDARY_NORMAL_MAP", new cString(""), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("SECONDARY_SPEED", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("SECONDARY_SCALE", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("SECONDARY_REFRACTFACTOR", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("ALPHA_MASKING", new cBool(), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("ALPHA_MASK", new cString(""), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("DISTORTION_OCCLUSION", new cBool(), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("MIN_OCCLUSION_DISTANCE", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("FLOW_UV_ANIMATION", new cBool(), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("FLOW_MAP", new cString(""), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("CYCLE_TIME", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("FLOW_SPEED", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("FLOW_TEX_SCALE", new cFloat(4.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("FLOW_WARP_STRENGTH", new cFloat(0.5f), ParameterVariant.PARAMETER); //float + newEntity.AddResource(ResourceType.RENDERABLE_INSTANCE); + break; + case FunctionType.ProjectiveDecal: + newEntity.AddParameter("deleted", new cBool(false), ParameterVariant.STATE); //bool + newEntity.AddParameter("show_on_reset", new cBool(true), ParameterVariant.STATE); //bool + newEntity.AddParameter("time", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("include_in_planar_reflections", new cBool(), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("material", new cString(" "), ParameterVariant.PARAMETER); //String + newEntity.AddResource(ResourceType.RENDERABLE_INSTANCE); + break; + case FunctionType.LODControls: + newEntity.AddParameter("lod_range_scalar", new cFloat(1.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("disable_lods", new cBool(false), ParameterVariant.INPUT); //bool + break; + case FunctionType.LightingMaster: + newEntity.AddParameter("light_on_reset", new cBool(true), ParameterVariant.STATE); //bool + newEntity.AddParameter("objects", new cFloat(), ParameterVariant.INPUT); //Object + break; + case FunctionType.DebugCamera: + newEntity.AddParameter("linked_cameras", new cFloat(), ParameterVariant.INPUT); //Object + break; + case FunctionType.CameraResource: + newEntity.AddParameter("on_enter_transition_finished", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_exit_transition_finished", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("enable_on_reset", new cBool(false), ParameterVariant.STATE); //bool + newEntity.AddParameter("camera_name", new cString(" "), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("is_camera_transformation_local", new cBool(), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("camera_transformation", new cTransform(), ParameterVariant.PARAMETER); //Position + newEntity.AddParameter("fov", new cFloat(45.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("clipping_planes_preset", new cEnum("CLIPPING_PLANES_PRESETS", 2), ParameterVariant.PARAMETER); //CLIPPING_PLANES_PRESETS + newEntity.AddParameter("is_ghost", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("converge_to_player_camera", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("reset_player_camera_on_exit", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("enable_enter_transition", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("transition_curve_direction", new cEnum("TRANSITION_DIRECTION", 4), ParameterVariant.PARAMETER); //TRANSITION_DIRECTION + newEntity.AddParameter("transition_curve_strength", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("transition_duration", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("transition_ease_in", new cFloat(0.2f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("transition_ease_out", new cFloat(0.2f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("enable_exit_transition", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("exit_transition_curve_direction", new cEnum("TRANSITION_DIRECTION", 4), ParameterVariant.PARAMETER); //TRANSITION_DIRECTION + newEntity.AddParameter("exit_transition_curve_strength", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("exit_transition_duration", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("exit_transition_ease_in", new cFloat(0.2f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("exit_transition_ease_out", new cFloat(0.2f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.CameraFinder: + newEntity.AddParameter("camera_name", new cString(" "), ParameterVariant.PARAMETER); //String + break; + case FunctionType.CameraBehaviorInterface: + newEntity.AddParameter("start_on_reset", new cBool(false), ParameterVariant.STATE); //bool + newEntity.AddParameter("pause_on_reset", new cBool(false), ParameterVariant.STATE); //bool + newEntity.AddParameter("enable_on_reset", new cBool(false), ParameterVariant.STATE); //bool + newEntity.AddParameter("linked_cameras", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.CAMERA_INSTANCE) }.ToList(), newEntity.shortGUID), ParameterVariant.INPUT); //CAMERA_INSTANCE + newEntity.AddParameter("behavior_name", new cString(" "), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("priority", new cInteger(0), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("threshold", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("blend_in", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("duration", new cFloat(-1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("blend_out", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.HandCamera: + newEntity.AddParameter("noise_type", new cEnum("NOISE_TYPE", 0), ParameterVariant.PARAMETER); //NOISE_TYPE + newEntity.AddParameter("frequency", new cVector3(), ParameterVariant.PARAMETER); //Direction + newEntity.AddParameter("damping", new cVector3(), ParameterVariant.PARAMETER); //Direction + newEntity.AddParameter("rotation_intensity", new cVector3(), ParameterVariant.PARAMETER); //Direction + newEntity.AddParameter("min_fov_range", new cFloat(45.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("max_fov_range", new cFloat(45.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("min_noise", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("max_noise", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.CameraShake: + newEntity.AddParameter("relative_transformation", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("impulse_intensity", new cFloat(0.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("impulse_position", new cVector3(), ParameterVariant.INPUT); //Direction + newEntity.AddParameter("shake_type", new cEnum("SHAKE_TYPE", 0), ParameterVariant.PARAMETER); //SHAKE_TYPE + newEntity.AddParameter("shake_frequency", new cVector3(), ParameterVariant.PARAMETER); //Direction + newEntity.AddParameter("max_rotation_angles", new cVector3(), ParameterVariant.PARAMETER); //Direction + newEntity.AddParameter("max_position_offset", new cVector3(), ParameterVariant.PARAMETER); //Direction + newEntity.AddParameter("shake_rotation", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("shake_position", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("bone_shaking", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("override_weapon_swing", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("internal_radius", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("external_radius", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("strength_damping", new cFloat(0.5f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("explosion_push_back", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("spring_constant", new cFloat(3.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("spring_damping", new cFloat(0.5f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.CameraPathDriven: + newEntity.AddParameter("position_path", new cSpline(), ParameterVariant.INPUT); //SPLINE + newEntity.AddParameter("target_path", new cSpline(), ParameterVariant.INPUT); //SPLINE + newEntity.AddParameter("reference_path", new cSpline(), ParameterVariant.INPUT); //SPLINE + newEntity.AddParameter("position_path_transform", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("target_path_transform", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("reference_path_transform", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("point_to_project", new cVector3(), ParameterVariant.INPUT); //Direction + newEntity.AddParameter("path_driven_type", new cEnum("PATH_DRIVEN_TYPE", 2), ParameterVariant.PARAMETER); //PATH_DRIVEN_TYPE + newEntity.AddParameter("invert_progression", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("position_path_offset", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("target_path_offset", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("animation_duration", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.FixedCamera: + newEntity.AddParameter("use_transform_position", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("transform_position", new cTransform(), ParameterVariant.PARAMETER); //Position + newEntity.AddParameter("camera_position", new cVector3(), ParameterVariant.PARAMETER); //Direction + newEntity.AddParameter("camera_target", new cVector3(), ParameterVariant.PARAMETER); //Direction + newEntity.AddParameter("camera_position_offset", new cVector3(), ParameterVariant.PARAMETER); //Direction + newEntity.AddParameter("camera_target_offset", new cVector3(), ParameterVariant.PARAMETER); //Direction + newEntity.AddParameter("apply_target", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("apply_position", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("use_target_offset", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("use_position_offset", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.BoneAttachedCamera: + newEntity.AddParameter("character", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("position_offset", new cVector3(), ParameterVariant.PARAMETER); //Direction + newEntity.AddParameter("rotation_offset", new cVector3(), ParameterVariant.PARAMETER); //Direction + newEntity.AddParameter("movement_damping", new cFloat(0.6f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("bone_name", new cString(" "), ParameterVariant.PARAMETER); //String + break; + case FunctionType.ControllableRange: + newEntity.AddParameter("min_range_x", new cFloat(-180.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("max_range_x", new cFloat(180.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("min_range_y", new cFloat(-180.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("max_range_y", new cFloat(180.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("min_feather_range_x", new cFloat(-180.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("max_feather_range_x", new cFloat(180.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("min_feather_range_y", new cFloat(-180.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("max_feather_range_y", new cFloat(180.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("speed_x", new cFloat(30.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("speed_y", new cFloat(30.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("damping_x", new cFloat(0.6f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("damping_y", new cFloat(0.6f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("mouse_speed_x", new cFloat(30.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("mouse_speed_y", new cFloat(30.0f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.StealCamera: + newEntity.AddParameter("on_converged", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("focus_position", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("steal_type", new cEnum("STEAL_CAMERA_TYPE", 0), ParameterVariant.PARAMETER); //STEAL_CAMERA_TYPE + newEntity.AddParameter("check_line_of_sight", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("blend_in_duration", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.FollowCameraModifier: + newEntity.AddParameter("enable_on_reset", new cBool(false), ParameterVariant.STATE); //bool + newEntity.AddParameter("position_curve", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("target_curve", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("modifier_type", new cEnum("FOLLOW_CAMERA_MODIFIERS", 0), ParameterVariant.PARAMETER); //FOLLOW_CAMERA_MODIFIERS + newEntity.AddParameter("position_offset", new cVector3(), ParameterVariant.PARAMETER); //Direction + newEntity.AddParameter("target_offset", new cVector3(), ParameterVariant.PARAMETER); //Direction + newEntity.AddParameter("field_of_view", new cFloat(35.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("force_state", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("force_state_initial_value", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("can_mirror", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("is_first_person", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("bone_blending_ratio", new cFloat(0.5f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("movement_speed", new cFloat(0.7f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("movement_speed_vertical", new cFloat(0.7f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("movement_damping", new cFloat(0.7f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("horizontal_limit_min", new cFloat(-1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("horizontal_limit_max", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("vertical_limit_min", new cFloat(-1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("vertical_limit_max", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("mouse_speed_hori", new cFloat(0.7f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("mouse_speed_vert", new cFloat(0.7f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("acceleration_duration", new cFloat(0.5f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("acceleration_ease_in", new cFloat(0.25f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("acceleration_ease_out", new cFloat(0.25f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("transition_duration", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("transition_ease_in", new cFloat(0.2f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("transition_ease_out", new cFloat(0.2f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.CameraPath: + newEntity.AddParameter("linked_splines", new cSpline(), ParameterVariant.INPUT); //SPLINE + newEntity.AddParameter("path_name", new cString(""), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("path_type", new cEnum("CAMERA_PATH_TYPE", 0), ParameterVariant.PARAMETER); //CAMERA_PATH_TYPE + newEntity.AddParameter("path_class", new cEnum("CAMERA_PATH_CLASS", 0), ParameterVariant.PARAMETER); //CAMERA_PATH_CLASS + newEntity.AddParameter("is_local", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("relative_position", new cTransform(), ParameterVariant.PARAMETER); //Position + newEntity.AddParameter("is_loop", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("duration", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.CameraAimAssistant: + newEntity.AddParameter("enable_on_reset", new cBool(false), ParameterVariant.STATE); //bool + newEntity.AddParameter("activation_radius", new cFloat(0.5f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("inner_radius", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("camera_speed_attenuation", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("min_activation_distance", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("fading_range", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.CameraPlayAnimation: + newEntity.AddParameter("on_animation_finished", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("animated_camera", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("position_marker", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("character_to_focus", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("focal_length_mm", new cFloat(75.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("focal_plane_m", new cFloat(2.5f), ParameterVariant.INPUT); //float + newEntity.AddParameter("fnum", new cFloat(2.8f), ParameterVariant.INPUT); //float + newEntity.AddParameter("focal_point", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("animation_length", new cFloat(), ParameterVariant.OUTPUT); //float + newEntity.AddParameter("frames_count", new cInteger(), ParameterVariant.OUTPUT); //int + newEntity.AddParameter("result_transformation", new cTransform(), ParameterVariant.OUTPUT); //Position + newEntity.AddParameter("data_file", new cString(" "), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("start_frame", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("end_frame", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("play_speed", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("loop_play", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("clipping_planes_preset", new cEnum("CLIPPING_PLANES_PRESETS", 2), ParameterVariant.PARAMETER); //CLIPPING_PLANES_PRESETS + newEntity.AddParameter("is_cinematic", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("dof_key", new cInteger(-1), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("shot_number", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("override_dof", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("focal_point_offset", new cVector3(), ParameterVariant.PARAMETER); //Direction + newEntity.AddParameter("bone_to_focus", new cString(" "), ParameterVariant.PARAMETER); //String + break; + case FunctionType.CamPeek: + newEntity.AddParameter("pos", new cTransform(), ParameterVariant.OUTPUT); //Position + newEntity.AddParameter("x_ratio", new cFloat(), ParameterVariant.OUTPUT); //float + newEntity.AddParameter("y_ratio", new cFloat(), ParameterVariant.OUTPUT); //float + newEntity.AddParameter("range_left", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("range_right", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("range_up", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("range_down", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("range_forward", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("range_backward", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("speed_x", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("speed_y", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("damping_x", new cFloat(0.5f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("damping_y", new cFloat(0.5f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("focal_distance", new cFloat(8.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("focal_distance_y", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("roll_factor", new cFloat(15.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("use_ik_solver", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("use_horizontal_plane", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("stick", new cEnum("SIDE", 0), ParameterVariant.PARAMETER); //SIDE + newEntity.AddParameter("disable_collision_test", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.CameraDofController: + newEntity.AddParameter("character_to_focus", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("focal_length_mm", new cFloat(75.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("focal_plane_m", new cFloat(2.5f), ParameterVariant.INPUT); //float + newEntity.AddParameter("fnum", new cFloat(2.8f), ParameterVariant.INPUT); //float + newEntity.AddParameter("focal_point", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("focal_point_offset", new cVector3(), ParameterVariant.PARAMETER); //Direction + newEntity.AddParameter("bone_to_focus", new cString(" "), ParameterVariant.PARAMETER); //String + break; + case FunctionType.ClipPlanesController: + newEntity.AddParameter("near_plane", new cFloat(0.1f), ParameterVariant.INPUT); //float + newEntity.AddParameter("far_plane", new cFloat(1000.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("update_near", new cBool(false), ParameterVariant.INPUT); //bool + newEntity.AddParameter("update_far", new cBool(false), ParameterVariant.INPUT); //bool + break; + case FunctionType.GetCurrentCameraTarget: + newEntity.AddParameter("target", new cTransform(), ParameterVariant.OUTPUT); //Position + newEntity.AddParameter("distance", new cFloat(), ParameterVariant.OUTPUT); //float + break; + case FunctionType.Logic_Vent_Entrance: + newEntity.AddParameter("Hide_Pos", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("Emit_Pos", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("force_stand_on_exit", new cBool(true), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.Logic_Vent_System: + newEntity.AddParameter("Vent_Entrances", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.VENT_ENTRANCE) }.ToList(), newEntity.shortGUID), ParameterVariant.INPUT); //VENT_ENTRANCE + break; + case FunctionType.CharacterCommand: + newEntity.AddParameter("command_started", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("override_all_ai", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.CMD_Follow: + newEntity.AddParameter("entered_inner_radius", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("exitted_outer_radius", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("failed", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Waypoint", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("idle_stance", new cEnum("IDLE", 0), ParameterVariant.PARAMETER); //IDLE + newEntity.AddParameter("move_type", new cEnum("MOVE", 1), ParameterVariant.PARAMETER); //MOVE + newEntity.AddParameter("inner_radius", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("outer_radius", new cFloat(2.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("prefer_traversals", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.CMD_FollowUsingJobs: + newEntity.AddParameter("failed", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("target_to_follow", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("who_Im_leading", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("fastest_allowed_move_type", new cEnum("MOVE", 3), ParameterVariant.PARAMETER); //MOVE + newEntity.AddParameter("slowest_allowed_move_type", new cEnum("MOVE", 0), ParameterVariant.PARAMETER); //MOVE + newEntity.AddParameter("centre_job_restart_radius", new cFloat(2.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("inner_radius", new cFloat(4.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("outer_radius", new cFloat(8.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("job_select_radius", new cFloat(6.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("job_cancel_radius", new cFloat(8.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("teleport_required_range", new cFloat(25.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("teleport_radius", new cFloat(20.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("prefer_traversals", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("avoid_player", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("allow_teleports", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("follow_type", new cEnum("FOLLOW_TYPE", 0), ParameterVariant.PARAMETER); //FOLLOW_TYPE + newEntity.AddParameter("clamp_speed", new cBool(true), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.NPC_FollowOffset: + newEntity.AddParameter("offset", new cVector3(), ParameterVariant.INPUT); //Direction + newEntity.AddParameter("target_to_follow", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("Result", new cTransform(), ParameterVariant.OUTPUT); //Position + break; + case FunctionType.AnimationMask: + newEntity.AddParameter("maskHips", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("maskTorso", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("maskNeck", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("maskHead", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("maskFace", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("maskLeftLeg", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("maskRightLeg", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("maskLeftArm", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("maskRightArm", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("maskLeftHand", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("maskRightHand", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("maskLeftFingers", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("maskRightFingers", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("maskTail", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("maskLips", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("maskEyes", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("maskLeftShoulder", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("maskRightShoulder", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("maskRoot", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("maskPrecedingLayers", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("maskSelf", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("maskFollowingLayers", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("weight", new cFloat(), ParameterVariant.PARAMETER); //float + newEntity.AddResource(ResourceType.ANIMATION_MASK_RESOURCE); + break; + case FunctionType.CMD_PlayAnimation: + newEntity.AddParameter("Interrupted", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("finished", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("badInterrupted", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_loaded", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("SafePos", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("Marker", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("ExitPosition", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("ExternalStartTime", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("ExternalTime", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("OverrideCharacter", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("OptionalMask", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("animationLength", new cFloat(), ParameterVariant.OUTPUT); //float + newEntity.AddParameter("AnimationSet", new cString(" "), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("Animation", new cString(" "), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("StartFrame", new cInteger(-1), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("EndFrame", new cInteger(-1), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("PlayCount", new cInteger(1), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("PlaySpeed", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("AllowGravity", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("AllowCollision", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("Start_Instantly", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("AllowInterruption", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("RemoveMotion", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("DisableGunLayer", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("BlendInTime", new cFloat(0.3f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("GaitSyncStart", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("ConvergenceTime", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("LocationConvergence", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("OrientationConvergence", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("UseExitConvergence", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("ExitConvergenceTime", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("Mirror", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("FullCinematic", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("RagdollEnabled", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("NoIK", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("NoFootIK", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("NoLayers", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("PlayerAnimDrivenView", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("ExertionFactor", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("AutomaticZoning", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("ManualLoading", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("IsCrouchedAnim", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("InitiallyBackstage", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("Death_by_ragdoll_only", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("dof_key", new cInteger(-1), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("shot_number", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("UseShivaArms", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddResource(ResourceType.PLAY_ANIMATION_DATA_RESOURCE); + break; + case FunctionType.CMD_Idle: + newEntity.AddParameter("finished", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("interrupted", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("target_to_face", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("should_face_target", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("should_raise_gun_while_turning", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("desired_stance", new cEnum("CHARACTER_STANCE", 0), ParameterVariant.PARAMETER); //CHARACTER_STANCE + newEntity.AddParameter("duration", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("idle_style", new cEnum("IDLE_STYLE", 1), ParameterVariant.PARAMETER); //IDLE_STYLE + newEntity.AddParameter("lock_cameras", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("anchor", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("start_instantly", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.CMD_GoTo: + newEntity.AddParameter("succeeded", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("failed", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Waypoint", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("AimTarget", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("move_type", new cEnum("MOVE", 1), ParameterVariant.PARAMETER); //MOVE + newEntity.AddParameter("enable_lookaround", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("use_stopping_anim", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("always_stop_at_radius", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("stop_at_radius_if_lined_up", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("continue_from_previous_move", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("disallow_traversal", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("arrived_radius", new cFloat(0.6f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("should_be_aiming", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("use_current_target_as_aim", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("allow_to_use_vents", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("DestinationIsBackstage", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("maintain_current_facing", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("start_instantly", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.CMD_GoToCover: + newEntity.AddParameter("succeeded", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("failed", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("entered_cover", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("CoverPoint", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("AimTarget", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("move_type", new cEnum("MOVE", 1), ParameterVariant.PARAMETER); //MOVE + newEntity.AddParameter("SearchRadius", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("enable_lookaround", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("duration", new cFloat(-1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("continue_from_previous_move", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("disallow_traversal", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("should_be_aiming", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("use_current_target_as_aim", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.CMD_MoveTowards: + newEntity.AddParameter("succeeded", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("failed", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("MoveTarget", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("AimTarget", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("move_type", new cEnum("MOVE", 1), ParameterVariant.PARAMETER); //MOVE + newEntity.AddParameter("disallow_traversal", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("should_be_aiming", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("use_current_target_as_aim", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("never_succeed", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.CMD_Die: + newEntity.AddParameter("Killer", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("death_style", new cEnum("DEATH_STYLE", 0), ParameterVariant.PARAMETER); //DEATH_STYLE + break; + case FunctionType.CMD_LaunchMeleeAttack: + newEntity.AddParameter("finished", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("melee_attack_type", new cEnum("MELEE_ATTACK_TYPE", 0), ParameterVariant.PARAMETER); //MELEE_ATTACK_TYPE + newEntity.AddParameter("enemy_type", new cEnum("ENEMY_TYPE", 15), ParameterVariant.PARAMETER); //ENEMY_TYPE + newEntity.AddParameter("melee_attack_index", new cInteger(0), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("skip_convergence", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.CMD_ModifyCombatBehaviour: + newEntity.AddParameter("behaviour_type", new cEnum("COMBAT_BEHAVIOUR", 0), ParameterVariant.PARAMETER); //COMBAT_BEHAVIOUR + newEntity.AddParameter("status", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.CMD_HolsterWeapon: + newEntity.AddParameter("failed", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("success", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("should_holster", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("skip_anims", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("equipment_slot", new cEnum("EQUIPMENT_SLOT", -2), ParameterVariant.PARAMETER); //EQUIPMENT_SLOT + newEntity.AddParameter("force_player_unarmed_on_holster", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("force_drop_held_item", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.CMD_ForceReloadWeapon: + newEntity.AddParameter("success", new cFloat(), ParameterVariant.TARGET); // + break; + case FunctionType.CMD_ForceMeleeAttack: + newEntity.AddParameter("melee_attack_type", new cEnum("MELEE_ATTACK_TYPE", 0), ParameterVariant.PARAMETER); //MELEE_ATTACK_TYPE + newEntity.AddParameter("enemy_type", new cEnum("ENEMY_TYPE", 15), ParameterVariant.PARAMETER); //ENEMY_TYPE + newEntity.AddParameter("melee_attack_index", new cInteger(0), ParameterVariant.PARAMETER); //int + break; + case FunctionType.CHR_ModifyBreathing: + newEntity.AddParameter("Exhaustion", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.CHR_HoldBreath: + newEntity.AddParameter("ExhaustionOnStop", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.CHR_DeepCrouch: + newEntity.AddParameter("crouch_amount", new cFloat(0.4f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("smooth_damping", new cFloat(0.4f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("allow_stand_up", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.CHR_PlaySecondaryAnimation: + newEntity.AddParameter("Interrupted", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("finished", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_loaded", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Marker", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("OptionalMask", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("ExternalStartTime", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("ExternalTime", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("animationLength", new cFloat(), ParameterVariant.OUTPUT); //float + newEntity.AddParameter("AnimationSet", new cString(" "), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("Animation", new cString(" "), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("StartFrame", new cInteger(-1), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("EndFrame", new cInteger(-1), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("PlayCount", new cInteger(1), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("PlaySpeed", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("StartInstantly", new cBool(), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("AllowInterruption", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("BlendInTime", new cFloat(0.3f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("GaitSyncStart", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("Mirror", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("AnimationLayer", new cEnum("SECONDARY_ANIMATION_LAYER", 0), ParameterVariant.PARAMETER); //SECONDARY_ANIMATION_LAYER + newEntity.AddParameter("AutomaticZoning", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("ManualLoading", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.CHR_LocomotionModifier: + newEntity.AddParameter("Can_Run", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("Can_Crouch", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("Can_Aim", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("Can_Injured", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("Must_Walk", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("Must_Run", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("Must_Crouch", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("Must_Aim", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("Must_Injured", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("Is_In_Spacesuit", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.CHR_SetMood: + newEntity.AddParameter("mood", new cEnum("MOOD", 0), ParameterVariant.PARAMETER); //MOOD + newEntity.AddParameter("moodIntensity", new cEnum("MOOD_INTENSITY", 0), ParameterVariant.PARAMETER); //MOOD_INTENSITY + newEntity.AddParameter("timeOut", new cFloat(10.0f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.CHR_LocomotionEffect: + newEntity.AddParameter("Effect", new cEnum("ANIMATION_EFFECT_TYPE", 0), ParameterVariant.PARAMETER); //ANIMATION_EFFECT_TYPE + break; + case FunctionType.CHR_LocomotionDuck: + newEntity.AddParameter("Height", new cEnum("DUCK_HEIGHT", 0), ParameterVariant.PARAMETER); //DUCK_HEIGHT + break; + case FunctionType.CMD_ShootAt: + newEntity.AddParameter("succeeded", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("failed", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Target", new cFloat(), ParameterVariant.INPUT); //Object + break; + case FunctionType.CMD_AimAtCurrentTarget: + newEntity.AddParameter("succeeded", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Raise_gun", new cBool(), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.CMD_AimAt: + newEntity.AddParameter("finished", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("AimTarget", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("Raise_gun", new cBool(), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("use_current_target", new cBool(), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.Player_Sensor: + newEntity.AddParameter("Standard", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Running", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Aiming", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Vent", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Grapple", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Death", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Cover", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Motion_Tracked", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Motion_Tracked_Vent", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Leaning", new cFloat(), ParameterVariant.TARGET); // + break; + case FunctionType.CMD_Ragdoll: + newEntity.AddParameter("finished", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("actor", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.CHARACTER) }.ToList(), newEntity.shortGUID), ParameterVariant.INPUT); //CHARACTER + newEntity.AddParameter("impact_velocity", new cVector3(), ParameterVariant.INPUT); //Direction + break; + case FunctionType.CHR_SetTacticalPosition: + newEntity.AddParameter("tactical_position", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("sweep_type", new cEnum("AREA_SWEEP_TYPE", 0), ParameterVariant.PARAMETER); //AREA_SWEEP_TYPE + newEntity.AddParameter("fixed_sweep_radius", new cFloat(10.0f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.CHR_SetFocalPoint: + newEntity.AddParameter("focal_point", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("priority", new cEnum("PRIORITY", 0), ParameterVariant.PARAMETER); //PRIORITY + newEntity.AddParameter("speed", new cEnum("LOOK_SPEED", 1), ParameterVariant.PARAMETER); //LOOK_SPEED + newEntity.AddParameter("steal_camera", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("line_of_sight_test", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.CHR_SetAndroidThrowTarget: + newEntity.AddParameter("thrown", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("throw_position", new cTransform(), ParameterVariant.INPUT); //Position + break; + case FunctionType.CHR_SetAlliance: + newEntity.AddParameter("Alliance", new cEnum("ALLIANCE_GROUP", 0), ParameterVariant.PARAMETER); //ALLIANCE_GROUP + break; + case FunctionType.CHR_GetAlliance: + newEntity.AddParameter("Alliance", new cEnum(), ParameterVariant.OUTPUT); //Enum + break; + case FunctionType.ALLIANCE_SetDisposition: + newEntity.AddParameter("A", new cEnum("ALLIANCE_GROUP", 1), ParameterVariant.PARAMETER); //ALLIANCE_GROUP + newEntity.AddParameter("B", new cEnum("ALLIANCE_GROUP", 5), ParameterVariant.PARAMETER); //ALLIANCE_GROUP + newEntity.AddParameter("Disposition", new cEnum("ALLIANCE_STANCE", 1), ParameterVariant.PARAMETER); //ALLIANCE_STANCE + break; + case FunctionType.CHR_SetInvincibility: + newEntity.AddParameter("damage_mode", new cEnum("DAMAGE_MODE", 0), ParameterVariant.PARAMETER); //DAMAGE_MODE + break; + case FunctionType.CHR_SetHealth: + newEntity.AddParameter("HealthPercentage", new cInteger(100), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("UsePercentageOfCurrentHeath", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.CHR_GetHealth: + newEntity.AddParameter("Health", new cInteger(), ParameterVariant.OUTPUT); //int + break; + case FunctionType.CHR_SetDebugDisplayName: + newEntity.AddParameter("DebugName", new cString(" "), ParameterVariant.PARAMETER); //String + break; + case FunctionType.CHR_TakeDamage: + newEntity.AddParameter("Damage", new cInteger(100), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("DamageIsAPercentage", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("AmmoType", new cEnum("AMMO_TYPE", 0), ParameterVariant.PARAMETER); //AMMO_TYPE + break; + case FunctionType.CHR_SetSubModelVisibility: + newEntity.AddParameter("is_visible", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("matching", new cString(" "), ParameterVariant.PARAMETER); //String + break; + case FunctionType.CHR_SetHeadVisibility: + newEntity.AddParameter("is_visible", new cBool(true), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.CHR_SetFacehuggerAggroRadius: + newEntity.AddParameter("radius", new cFloat(10.0f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.CHR_DamageMonitor: + newEntity.AddParameter("damaged", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("InstigatorFilter", new cBool(true), ParameterVariant.INPUT); //bool + newEntity.AddParameter("DamageDone", new cInteger(), ParameterVariant.OUTPUT); //int + newEntity.AddParameter("Instigator", new cFloat(), ParameterVariant.OUTPUT); //Object + newEntity.AddParameter("DamageType", new cEnum("DAMAGE_EFFECTS", -65536), ParameterVariant.PARAMETER); //DAMAGE_EFFECTS + break; + case FunctionType.CHR_KnockedOutMonitor: + newEntity.AddParameter("on_knocked_out", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_recovered", new cFloat(), ParameterVariant.TARGET); // + break; + case FunctionType.CHR_DeathMonitor: + newEntity.AddParameter("dying", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("killed", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("KillerFilter", new cBool(true), ParameterVariant.INPUT); //bool + newEntity.AddParameter("Killer", new cFloat(), ParameterVariant.OUTPUT); //Object + newEntity.AddParameter("DamageType", new cEnum("DAMAGE_EFFECTS", -65536), ParameterVariant.PARAMETER); //DAMAGE_EFFECTS + break; + case FunctionType.CHR_RetreatMonitor: + newEntity.AddParameter("reached_retreat", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("started_retreating", new cFloat(), ParameterVariant.TARGET); // + break; + case FunctionType.CHR_WeaponFireMonitor: + newEntity.AddParameter("fired", new cFloat(), ParameterVariant.TARGET); // + break; + case FunctionType.CHR_TorchMonitor: + newEntity.AddParameter("torch_on", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("torch_off", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("TorchOn", new cBool(), ParameterVariant.OUTPUT); //bool + newEntity.AddParameter("trigger_on_start", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("trigger_on_checkpoint_restart", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.CHR_VentMonitor: + newEntity.AddParameter("entered_vent", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("exited_vent", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("IsInVent", new cBool(), ParameterVariant.OUTPUT); //bool + newEntity.AddParameter("trigger_on_start", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("trigger_on_checkpoint_restart", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.CharacterTypeMonitor: + newEntity.AddParameter("spawned", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("despawned", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("all_despawned", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("AreAny", new cBool(), ParameterVariant.OUTPUT); //bool + newEntity.AddParameter("character_class", new cEnum("CHARACTER_CLASS_COMBINATION", 2), ParameterVariant.PARAMETER); //CHARACTER_CLASS_COMBINATION + newEntity.AddParameter("trigger_on_start", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("trigger_on_checkpoint_restart", new cBool(), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.Convo: + newEntity.AddParameter("everyoneArrived", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("playerJoined", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("playerLeft", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("npcJoined", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("members", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.LOGIC_CHARACTER) }.ToList(), newEntity.shortGUID), ParameterVariant.INPUT); //LOGIC_CHARACTER + newEntity.AddParameter("speaker", new cFloat(), ParameterVariant.OUTPUT); //Object + newEntity.AddParameter("alwaysTalkToPlayerIfPresent", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("playerCanJoin", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("playerCanLeave", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("positionNPCs", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("circularShape", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("convoPosition", new cFloat(), ParameterVariant.PARAMETER); //Object + newEntity.AddParameter("personalSpaceRadius", new cFloat(0.4f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.NPC_NotifyDynamicDialogueEvent: + newEntity.AddParameter("DialogueEvent", new cEnum("DIALOGUE_NPC_EVENT", -1), ParameterVariant.PARAMETER); //DIALOGUE_NPC_EVENT + break; + case FunctionType.NPC_Squad_DialogueMonitor: + newEntity.AddParameter("Suspicious_Item_Initial", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Suspicious_Item_Close", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Suspicious_Warning", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Suspicious_Warning_Fail", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Missing_Buddy", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Search_Started", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Search_Loop", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Search_Complete", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Detected_Enemy", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Alien_Heard_Backstage", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Interrogative", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Warning", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Last_Chance", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Stand_Down", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Attack", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Advance", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Melee", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Hit_By_Weapon", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Go_to_Cover", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("No_Cover", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Shoot_From_Cover", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Cover_Broken", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Retreat", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Panic", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Final_Hit", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Ally_Death", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Incoming_IED", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Alert_Squad", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("My_Death", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Idle_Passive", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Idle_Aggressive", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Block", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Enter_Grapple", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Grapple_From_Cover", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Player_Observed", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("squad_coordinator", new cFloat(), ParameterVariant.PARAMETER); //Object + break; + case FunctionType.NPC_Group_DeathCounter: + newEntity.AddParameter("on_threshold", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("TriggerThreshold", new cInteger(1), ParameterVariant.PARAMETER); //int + break; + case FunctionType.NPC_Group_Death_Monitor: + newEntity.AddParameter("last_man_dying", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("all_killed", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("squad_coordinator", new cFloat(), ParameterVariant.PARAMETER); //Object + newEntity.AddParameter("CheckAllNPCs", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.NPC_SenseLimiter: + newEntity.AddParameter("Sense", new cEnum("SENSORY_TYPE", -1), ParameterVariant.PARAMETER); //SENSORY_TYPE + break; + case FunctionType.NPC_ResetSensesAndMemory: + newEntity.AddParameter("ResetMenaceToFull", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("ResetSensesLimiters", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.NPC_SetupMenaceManager: + newEntity.AddParameter("AgressiveMenace", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("ProgressionFraction", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("ResetMenaceMeter", new cBool(true), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.NPC_AlienConfig: + newEntity.AddParameter("AlienConfigString", new cString(" "), ParameterVariant.PARAMETER); //String + break; + case FunctionType.NPC_SetSenseSet: + newEntity.AddParameter("SenseSet", new cEnum("SENSE_SET", 0), ParameterVariant.PARAMETER); //SENSE_SET + break; + case FunctionType.NPC_GetLastSensedPositionOfTarget: + newEntity.AddParameter("NoRecentSense", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("SensedOnLeft", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("SensedOnRight", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("SensedInFront", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("SensedBehind", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("OptionalTarget", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("LastSensedPosition", new cTransform(), ParameterVariant.OUTPUT); //Position + newEntity.AddParameter("MaxTimeSince", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.HeldItem_AINotifier: + newEntity.AddParameter("Item", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("Duration", new cFloat(0.0f), ParameterVariant.INPUT); //float + break; + case FunctionType.NPC_Gain_Aggression_In_Radius: + newEntity.AddParameter("Position", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("Radius", new cFloat(5.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("AggressionGain", new cEnum("AGGRESSION_GAIN", 1), ParameterVariant.PARAMETER); //AGGRESSION_GAIN + break; + case FunctionType.NPC_Aggression_Monitor: + newEntity.AddParameter("on_interrogative", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_warning", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_last_chance", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_stand_down", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_idle", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_aggressive", new cFloat(), ParameterVariant.TARGET); // + break; + case FunctionType.Explosion_AINotifier: + newEntity.AddParameter("on_character_damage_fx", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("ExplosionPos", new cVector3(), ParameterVariant.PARAMETER); //Direction + newEntity.AddParameter("AmmoType", new cEnum("AMMO_TYPE", 12), ParameterVariant.PARAMETER); //AMMO_TYPE + break; + case FunctionType.NPC_Sleeping_Android_Monitor: + newEntity.AddParameter("Twitch", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("SitUp_Start", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("SitUp_End", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Sleeping_GetUp", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Sitting_GetUp", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Android_NPC", new cFloat(), ParameterVariant.INPUT); //Object + break; + case FunctionType.NPC_Highest_Awareness_Monitor: + newEntity.AddParameter("All_Dead", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Stunned", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Unaware", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Suspicious", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("SearchingArea", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("SearchingLastSensed", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Aware", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_changed", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("NPC_Coordinator", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("Target", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("trigger_on_start", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("CheckAllNPCs", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.NPC_Squad_GetAwarenessState: + newEntity.AddParameter("All_Dead", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Stunned", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Unaware", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Suspicious", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("SearchingArea", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("SearchingLastSensed", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Aware", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("NPC_Coordinator", new cFloat(), ParameterVariant.INPUT); //Object + break; + case FunctionType.NPC_Squad_GetAwarenessWatermark: + newEntity.AddParameter("All_Dead", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Stunned", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Unaware", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Suspicious", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("SearchingArea", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("SearchingLastSensed", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Aware", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("NPC_Coordinator", new cFloat(), ParameterVariant.INPUT); //Object + break; + case FunctionType.PlayerCameraMonitor: + newEntity.AddParameter("AndroidNeckSnap", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("AlienKill", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("AlienKillBroken", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("AlienKillInVent", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("StandardAnimDrivenView", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("StopNonStandardCameras", new cFloat(), ParameterVariant.TARGET); // + break; + case FunctionType.ScreenEffectEventMonitor: + newEntity.AddParameter("MeleeHit", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("BulletHit", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("MedkitHeal", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("StartStrangle", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("StopStrangle", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("StartLowHealth", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("StopLowHealth", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("StartDeath", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("StopDeath", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("AcidHit", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("FlashbangHit", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("HitAndRun", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("CancelHitAndRun", new cFloat(), ParameterVariant.TARGET); // + break; + case FunctionType.DEBUG_SenseLevels: + newEntity.AddParameter("no_activation", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("trace_activation", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("lower_activation", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("normal_activation", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("upper_activation", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Sense", new cEnum("SENSORY_TYPE", -1), ParameterVariant.PARAMETER); //SENSORY_TYPE + break; + case FunctionType.NPC_FakeSense: + newEntity.AddParameter("SensedObject", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("FakePosition", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("Sense", new cEnum("SENSORY_TYPE", -1), ParameterVariant.PARAMETER); //SENSORY_TYPE + newEntity.AddParameter("ForceThreshold", new cEnum("THRESHOLD_QUALIFIER", 2), ParameterVariant.PARAMETER); //THRESHOLD_QUALIFIER + break; + case FunctionType.NPC_SuspiciousItem: + newEntity.AddParameter("ItemPosition", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("Item", new cEnum("SUSPICIOUS_ITEM", 0), ParameterVariant.PARAMETER); //SUSPICIOUS_ITEM + newEntity.AddParameter("InitialReactionValidStartDuration", new cFloat(0.5f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("FurtherReactionValidStartDuration", new cFloat(6.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("RetriggerDelay", new cFloat(10.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("Trigger", new cEnum("SUSPICIOUS_ITEM_TRIGGER", 1), ParameterVariant.PARAMETER); //SUSPICIOUS_ITEM_TRIGGER + newEntity.AddParameter("ShouldMakeAggressive", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("MaxGroupMembersInteract", new cInteger(2), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("SystematicSearchRadius", new cFloat(8.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("AllowSamePriorityToOveride", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("UseSamePriorityCloserDistanceConstraint", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("SamePriorityCloserDistanceConstraint", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("UseSamePriorityRecentTimeConstraint", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("SamePriorityRecentTimeConstraint", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("BehaviourTreePriority", new cEnum("SUSPICIOUS_ITEM_BEHAVIOUR_TREE_PRIORITY", 0), ParameterVariant.PARAMETER); //SUSPICIOUS_ITEM_BEHAVIOUR_TREE_PRIORITY + newEntity.AddParameter("InteruptSubPriority", new cInteger(1), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("DetectableByBackstageAlien", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("DoIntialReaction", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("MoveCloseToSuspectPosition", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("DoCloseToReaction", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("DoCloseToWaitForGroupMembers", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("DoSystematicSearch", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("GroupNotify", new cEnum("SUSPICIOUS_ITEM_STAGE", 1), ParameterVariant.PARAMETER); //SUSPICIOUS_ITEM_STAGE + newEntity.AddParameter("DoIntialReactionSubsequentGroupMember", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("MoveCloseToSuspectPositionSubsequentGroupMember", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("DoCloseToReactionSubsequentGroupMember", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("DoCloseToWaitForGroupMembersSubsequentGroupMember", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("DoSystematicSearchSubsequentGroupMember", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.NPC_SetAlienDevelopmentStage: + newEntity.AddParameter("AlienStage", new cEnum("ALIEN_DEVELOPMENT_MANAGER_STAGES", 0), ParameterVariant.PARAMETER); //ALIEN_DEVELOPMENT_MANAGER_STAGES + newEntity.AddParameter("Reset", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.NPC_TargetAcquire: + newEntity.AddParameter("no_targets", new cFloat(), ParameterVariant.TARGET); // + break; + case FunctionType.CHR_IsWithinRange: + newEntity.AddParameter("In_range", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Out_of_range", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Position", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("Radius", new cFloat(1.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("Height", new cFloat(0.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("Range_test_shape", new cEnum("RANGE_TEST_SHAPE", 0), ParameterVariant.PARAMETER); //RANGE_TEST_SHAPE + break; + case FunctionType.NPC_ForceCombatTarget: + newEntity.AddParameter("Target", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("LockOtherAttackersOut", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.NPC_SetAimTarget: + newEntity.AddParameter("Target", new cFloat(), ParameterVariant.INPUT); //Object + break; + case FunctionType.CHR_SetTorch: + newEntity.AddParameter("TorchOn", new cBool(true), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.CHR_GetTorch: + newEntity.AddParameter("torch_on", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("torch_off", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("TorchOn", new cBool(), ParameterVariant.OUTPUT); //bool + break; + case FunctionType.NPC_SetAutoTorchMode: + newEntity.AddParameter("AutoUseTorchInDark", new cBool(), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.NPC_GetCombatTarget: + newEntity.AddParameter("bound_trigger", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("target", new cFloat(), ParameterVariant.OUTPUT); //Object + break; + case FunctionType.NPC_AreaBox: + newEntity.AddParameter("half_dimensions", new cVector3(), ParameterVariant.PARAMETER); //Direction + newEntity.AddParameter("position", new cTransform(), ParameterVariant.PARAMETER); //Position + break; + case FunctionType.NPC_MeleeContext: + newEntity.AddParameter("ConvergePos", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("Radius", new cFloat(0.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("Context_Type", new cEnum("MELEE_CONTEXT_TYPE", 0), ParameterVariant.PARAMETER); //MELEE_CONTEXT_TYPE + break; + case FunctionType.NPC_SetSafePoint: + newEntity.AddParameter("SafePositions", new cTransform(), ParameterVariant.INPUT); //Position + break; + case FunctionType.Player_ExploitableArea: + newEntity.AddParameter("NpcSafePositions", new cTransform(), ParameterVariant.INPUT); //Position + break; + case FunctionType.NPC_SetDefendArea: + newEntity.AddParameter("AreaObjects", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.NPC_AREA_RESOURCE) }.ToList(), newEntity.shortGUID), ParameterVariant.INPUT); //NPC_AREA_RESOURCE + break; + case FunctionType.NPC_SetPursuitArea: + newEntity.AddParameter("AreaObjects", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.NPC_AREA_RESOURCE) }.ToList(), newEntity.shortGUID), ParameterVariant.INPUT); //NPC_AREA_RESOURCE + break; + case FunctionType.NPC_ForceRetreat: + newEntity.AddParameter("AreaObjects", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.NPC_AREA_RESOURCE) }.ToList(), newEntity.shortGUID), ParameterVariant.INPUT); //NPC_AREA_RESOURCE + break; + case FunctionType.NPC_DefineBackstageAvoidanceArea: + newEntity.AddParameter("AreaObjects", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.NPC_AREA_RESOURCE) }.ToList(), newEntity.shortGUID), ParameterVariant.INPUT); //NPC_AREA_RESOURCE + break; + case FunctionType.NPC_SetAlertness: + newEntity.AddParameter("AlertState", new cEnum("ALERTNESS_STATE", 0), ParameterVariant.PARAMETER); //ALERTNESS_STATE + break; + case FunctionType.NPC_SetStartPos: + newEntity.AddParameter("StartPos", new cTransform(), ParameterVariant.INPUT); //Position + break; + case FunctionType.NPC_SetAgressionProgression: + newEntity.AddParameter("allow_progression", new cBool(), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.NPC_SetLocomotionTargetSpeed: + newEntity.AddParameter("Speed", new cEnum("LOCOMOTION_TARGET_SPEED", 1), ParameterVariant.PARAMETER); //LOCOMOTION_TARGET_SPEED + break; + case FunctionType.NPC_SetGunAimMode: + newEntity.AddParameter("AimingMode", new cEnum("NPC_GUN_AIM_MODE", 0), ParameterVariant.PARAMETER); //NPC_GUN_AIM_MODE + break; + case FunctionType.NPC_set_behaviour_tree_flags: + newEntity.AddParameter("BehaviourTreeFlag", new cEnum("BEHAVIOUR_TREE_FLAGS", 2), ParameterVariant.PARAMETER); //BEHAVIOUR_TREE_FLAGS + newEntity.AddParameter("FlagSetting", new cBool(true), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.NPC_SetHidingSearchRadius: + newEntity.AddParameter("Radius", new cFloat(), ParameterVariant.PARAMETER); //float + break; + case FunctionType.NPC_SetHidingNearestLocation: + newEntity.AddParameter("hiding_pos", new cTransform(), ParameterVariant.INPUT); //Position + break; + case FunctionType.NPC_WithdrawAlien: + newEntity.AddParameter("allow_any_searches_to_complete", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("permanent", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("killtraps", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("initial_radius", new cFloat(15.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("timed_out_radius", new cFloat(3.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("time_to_force", new cFloat(10.0f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.NPC_behaviour_monitor: + newEntity.AddParameter("state_set", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("state_unset", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("behaviour", new cEnum("BEHAVIOR_TREE_BRANCH_TYPE", 0), ParameterVariant.PARAMETER); //BEHAVIOR_TREE_BRANCH_TYPE + newEntity.AddParameter("trigger_on_start", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("trigger_on_checkpoint_restart", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.NPC_multi_behaviour_monitor: + newEntity.AddParameter("Cinematic_set", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Cinematic_unset", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Damage_Response_set", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Damage_Response_unset", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Target_Is_NPC_set", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Target_Is_NPC_unset", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Breakout_set", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Breakout_unset", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Attack_set", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Attack_unset", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Stunned_set", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Stunned_unset", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Backstage_set", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Backstage_unset", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("In_Vent_set", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("In_Vent_unset", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Killtrap_set", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Killtrap_unset", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Threat_Aware_set", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Threat_Aware_unset", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Suspect_Target_Response_set", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Suspect_Target_Response_unset", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Player_Hiding_set", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Player_Hiding_unset", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Suspicious_Item_set", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Suspicious_Item_unset", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Search_set", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Search_unset", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Area_Sweep_set", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Area_Sweep_unset", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("trigger_on_start", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("trigger_on_checkpoint_restart", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.NPC_ambush_monitor: + newEntity.AddParameter("setup", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("abandoned", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("trap_sprung", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("ambush_type", new cEnum("AMBUSH_TYPE", 0), ParameterVariant.PARAMETER); //AMBUSH_TYPE + newEntity.AddParameter("trigger_on_start", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("trigger_on_checkpoint_restart", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.NPC_navmesh_type_monitor: + newEntity.AddParameter("state_set", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("state_unset", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("nav_mesh_type", new cEnum("NAV_MESH_AREA_TYPE", 0), ParameterVariant.PARAMETER); //NAV_MESH_AREA_TYPE + newEntity.AddParameter("trigger_on_start", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("trigger_on_checkpoint_restart", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.CHR_HasWeaponOfType: + newEntity.AddParameter("on_true", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_false", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Result", new cBool(), ParameterVariant.OUTPUT); //bool + newEntity.AddParameter("weapon_type", new cEnum("WEAPON_TYPE", 0), ParameterVariant.PARAMETER); //WEAPON_TYPE + newEntity.AddParameter("check_if_weapon_draw", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.NPC_TriggerAimRequest: + newEntity.AddParameter("started_aiming", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("finished_aiming", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("interrupted", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("AimTarget", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("Raise_gun", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("use_current_target", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("duration", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("clamp_angle", new cFloat(30.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("clear_current_requests", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.NPC_TriggerShootRequest: + newEntity.AddParameter("started_shooting", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("finished_shooting", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("interrupted", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("empty_current_clip", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("shot_count", new cInteger(-1), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("duration", new cFloat(-1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("clear_current_requests", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.Squad_SetMaxEscalationLevel: + newEntity.AddParameter("max_level", new cEnum("NPC_AGGRO_LEVEL", 5), ParameterVariant.PARAMETER); //NPC_AGGRO_LEVEL + newEntity.AddParameter("squad_coordinator", new cFloat(), ParameterVariant.PARAMETER); //Object + break; + case FunctionType.Chr_PlayerCrouch: + newEntity.AddParameter("crouch", new cBool(true), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.NPC_Once: + newEntity.AddParameter("on_success", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_failure", new cFloat(), ParameterVariant.TARGET); // + break; + case FunctionType.Custom_Hiding_Vignette_controller: + newEntity.AddParameter("StartFade", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("StopFade", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Breath", new cInteger(0), ParameterVariant.INPUT); //int + newEntity.AddParameter("Blackout_start_time", new cInteger(15), ParameterVariant.INPUT); //int + newEntity.AddParameter("run_out_time", new cInteger(60), ParameterVariant.INPUT); //int + newEntity.AddParameter("Vignette", new cFloat(), ParameterVariant.OUTPUT); //float + newEntity.AddParameter("FadeValue", new cFloat(), ParameterVariant.OUTPUT); //float + break; + case FunctionType.Custom_Hiding_Controller: + newEntity.AddParameter("Started_Idle", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Started_Exit", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Got_Out", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Prompt_1", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Prompt_2", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Start_choking", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Start_oxygen_starvation", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Show_MT", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Hide_MT", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Spawn_MT", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Despawn_MT", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Start_Busted_By_Alien", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Start_Busted_By_Android", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("End_Busted_By_Android", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Start_Busted_By_Human", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("End_Busted_By_Human", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Enter_Anim", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.PLAY_ANIMATION_DATA_RESOURCE) }.ToList(), newEntity.shortGUID), ParameterVariant.INPUT); //PLAY_ANIMATION_DATA_RESOURCE + newEntity.AddParameter("Idle_Anim", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.PLAY_ANIMATION_DATA_RESOURCE) }.ToList(), newEntity.shortGUID), ParameterVariant.INPUT); //PLAY_ANIMATION_DATA_RESOURCE + newEntity.AddParameter("Exit_Anim", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.PLAY_ANIMATION_DATA_RESOURCE) }.ToList(), newEntity.shortGUID), ParameterVariant.INPUT); //PLAY_ANIMATION_DATA_RESOURCE + newEntity.AddParameter("has_MT", new cBool(), ParameterVariant.INPUT); //bool + newEntity.AddParameter("is_high", new cBool(), ParameterVariant.INPUT); //bool + newEntity.AddParameter("AlienBusted_Player_1", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.PLAY_ANIMATION_DATA_RESOURCE) }.ToList(), newEntity.shortGUID), ParameterVariant.INPUT); //PLAY_ANIMATION_DATA_RESOURCE + newEntity.AddParameter("AlienBusted_Alien_1", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.PLAY_ANIMATION_DATA_RESOURCE) }.ToList(), newEntity.shortGUID), ParameterVariant.INPUT); //PLAY_ANIMATION_DATA_RESOURCE + newEntity.AddParameter("AlienBusted_Player_2", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.PLAY_ANIMATION_DATA_RESOURCE) }.ToList(), newEntity.shortGUID), ParameterVariant.INPUT); //PLAY_ANIMATION_DATA_RESOURCE + newEntity.AddParameter("AlienBusted_Alien_2", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.PLAY_ANIMATION_DATA_RESOURCE) }.ToList(), newEntity.shortGUID), ParameterVariant.INPUT); //PLAY_ANIMATION_DATA_RESOURCE + newEntity.AddParameter("AlienBusted_Player_3", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.PLAY_ANIMATION_DATA_RESOURCE) }.ToList(), newEntity.shortGUID), ParameterVariant.INPUT); //PLAY_ANIMATION_DATA_RESOURCE + newEntity.AddParameter("AlienBusted_Alien_3", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.PLAY_ANIMATION_DATA_RESOURCE) }.ToList(), newEntity.shortGUID), ParameterVariant.INPUT); //PLAY_ANIMATION_DATA_RESOURCE + newEntity.AddParameter("AlienBusted_Player_4", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.PLAY_ANIMATION_DATA_RESOURCE) }.ToList(), newEntity.shortGUID), ParameterVariant.INPUT); //PLAY_ANIMATION_DATA_RESOURCE + newEntity.AddParameter("AlienBusted_Alien_4", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.PLAY_ANIMATION_DATA_RESOURCE) }.ToList(), newEntity.shortGUID), ParameterVariant.INPUT); //PLAY_ANIMATION_DATA_RESOURCE + newEntity.AddParameter("AndroidBusted_Player_1", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.PLAY_ANIMATION_DATA_RESOURCE) }.ToList(), newEntity.shortGUID), ParameterVariant.INPUT); //PLAY_ANIMATION_DATA_RESOURCE + newEntity.AddParameter("AndroidBusted_Android_1", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.PLAY_ANIMATION_DATA_RESOURCE) }.ToList(), newEntity.shortGUID), ParameterVariant.INPUT); //PLAY_ANIMATION_DATA_RESOURCE + newEntity.AddParameter("AndroidBusted_Player_2", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.PLAY_ANIMATION_DATA_RESOURCE) }.ToList(), newEntity.shortGUID), ParameterVariant.INPUT); //PLAY_ANIMATION_DATA_RESOURCE + newEntity.AddParameter("AndroidBusted_Android_2", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.PLAY_ANIMATION_DATA_RESOURCE) }.ToList(), newEntity.shortGUID), ParameterVariant.INPUT); //PLAY_ANIMATION_DATA_RESOURCE + newEntity.AddParameter("MT_pos", new cTransform(), ParameterVariant.OUTPUT); //Position + break; + case FunctionType.TorchDynamicMovement: + newEntity.AddParameter("start_on_reset", new cBool(true), ParameterVariant.STATE); //bool + newEntity.AddParameter("torch", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("max_spatial_velocity", new cFloat(5.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("max_angular_velocity", new cFloat(30.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("max_position_displacement", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("max_target_displacement", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("position_damping", new cFloat(0.6f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("target_damping", new cFloat(0.6f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.EQUIPPABLE_ITEM: + newEntity.AddParameter("finished_spawning", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("equipped", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("unequipped", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_pickup", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_discard", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_melee_impact", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_used_basic_function", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("spawn_on_reset", new cBool(false), ParameterVariant.STATE); //bool + newEntity.AddParameter("item_animated_asset", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("owner", new cFloat(), ParameterVariant.OUTPUT); //Object + newEntity.AddParameter("has_owner", new cBool(), ParameterVariant.OUTPUT); //bool + newEntity.AddParameter("character_animation_context", new cString(" "), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("character_activate_animation_context", new cString(""), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("left_handed", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("inventory_name", new cString(" "), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("equipment_slot", new cEnum("EQUIPMENT_SLOT", 0), ParameterVariant.PARAMETER); //EQUIPMENT_SLOT + newEntity.AddParameter("holsters_on_owner", new cBool(), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("holster_node", new cString(" "), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("holster_scale", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("weapon_handedness", new cEnum("WEAPON_HANDEDNESS", 0), ParameterVariant.PARAMETER); //WEAPON_HANDEDNESS + break; + case FunctionType.AIMED_ITEM: + newEntity.AddParameter("on_started_aiming", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_stopped_aiming", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_display_on", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_display_off", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_effect_on", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_effect_off", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("target_position", new cTransform(), ParameterVariant.OUTPUT); //Position + newEntity.AddParameter("average_target_distance", new cFloat(), ParameterVariant.OUTPUT); //float + newEntity.AddParameter("min_target_distance", new cFloat(), ParameterVariant.OUTPUT); //float + newEntity.AddParameter("fixed_target_distance_for_local_player", new cFloat(6.0f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.MELEE_WEAPON: + newEntity.AddParameter("item_animated_model_and_collision", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("normal_attack_damage", new cFloat(), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("power_attack_damage", new cFloat(), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("position_input", new cTransform(), ParameterVariant.PARAMETER); //Position + break; + case FunctionType.AIMED_WEAPON: + newEntity.AddParameter("on_fired_success", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_fired_fail", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_fired_fail_single", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_impact", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_reload_started", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_reload_another", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_reload_empty_clip", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_reload_canceled", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_reload_success", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_reload_fail", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_shooting_started", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_shooting_wind_down", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_shooting_finished", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_overheated", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_cooled_down", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_charge_complete", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_charge_started", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_charge_stopped", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_turned_on", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_turned_off", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_torch_on_requested", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_torch_off_requested", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("ammoRemainingInClip", new cInteger(), ParameterVariant.OUTPUT); //int + newEntity.AddParameter("ammoToFillClip", new cInteger(), ParameterVariant.OUTPUT); //int + newEntity.AddParameter("ammoThatWasInClip", new cInteger(), ParameterVariant.OUTPUT); //int + newEntity.AddParameter("charge_percentage", new cFloat(), ParameterVariant.OUTPUT); //float + newEntity.AddParameter("charge_noise_percentage", new cFloat(), ParameterVariant.OUTPUT); //float + newEntity.AddParameter("weapon_type", new cEnum("WEAPON_TYPE", 2), ParameterVariant.PARAMETER); //WEAPON_TYPE + newEntity.AddParameter("requires_turning_on", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("ejectsShellsOnFiring", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("aim_assist_scale", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("default_ammo_type", new cEnum("AMMO_TYPE", 0), ParameterVariant.PARAMETER); //AMMO_TYPE + newEntity.AddParameter("starting_ammo", new cInteger(0), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("clip_size", new cInteger(0), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("consume_ammo_over_time_when_turned_on", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("max_auto_shots_per_second", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("max_manual_shots_per_second", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("wind_down_time_in_seconds", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("maximum_continous_fire_time_in_seconds", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("overheat_recharge_time_in_seconds", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("automatic_firing", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("overheats", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("charged_firing", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("charging_duration", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("min_charge_to_fire", new cFloat(0.3f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("overcharge_timer", new cFloat(2.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("charge_noise_start_time", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("reloadIndividualAmmo", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("alwaysDoFullReloadOfClips", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("movement_accuracy_penalty_per_second", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("aim_rotation_accuracy_penalty_per_second", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("accuracy_penalty_per_shot", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("accuracy_accumulated_per_second", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("player_exposed_accuracy_penalty_per_shot", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("player_exposed_accuracy_accumulated_per_second", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("recoils_on_fire", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("alien_threat_aware", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.PlayerWeaponMonitor: + newEntity.AddParameter("on_clip_above_percentage", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_clip_below_percentage", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_clip_empty", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_clip_full", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("weapon_type", new cEnum("WEAPON_TYPE", 2), ParameterVariant.PARAMETER); //WEAPON_TYPE + newEntity.AddParameter("ammo_percentage_in_clip", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.PlayerDiscardsWeapons: + newEntity.AddParameter("discard_pistol", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("discard_shotgun", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("discard_flamethrower", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("discard_boltgun", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("discard_cattleprod", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("discard_melee", new cBool(true), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.PlayerDiscardsItems: + newEntity.AddParameter("discard_ieds", new cBool(), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("discard_medikits", new cBool(), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("discard_ammo", new cBool(), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("discard_flares_and_lights", new cBool(), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("discard_materials", new cBool(), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("discard_batteries", new cBool(), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.PlayerDiscardsTools: + newEntity.AddParameter("discard_motion_tracker", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("discard_cutting_torch", new cBool(), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("discard_hacking_tool", new cBool(), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("discard_keycard", new cBool(), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.WEAPON_GiveToCharacter: + newEntity.AddParameter("Character", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("Weapon", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("is_holstered", new cBool(true), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.WEAPON_GiveToPlayer: + newEntity.AddParameter("weapon", new cEnum("EQUIPMENT_SLOT", 1), ParameterVariant.PARAMETER); //EQUIPMENT_SLOT + newEntity.AddParameter("holster", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("starting_ammo", new cInteger(0), ParameterVariant.PARAMETER); //int + break; + case FunctionType.WEAPON_ImpactEffect: + newEntity.AddParameter("StaticEffects", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("DynamicEffects", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("DynamicAttachedEffects", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("Type", new cEnum("WEAPON_IMPACT_EFFECT_TYPE", 0), ParameterVariant.PARAMETER); //WEAPON_IMPACT_EFFECT_TYPE + newEntity.AddParameter("Orientation", new cEnum("WEAPON_IMPACT_EFFECT_ORIENTATION", 0), ParameterVariant.PARAMETER); //WEAPON_IMPACT_EFFECT_ORIENTATION + newEntity.AddParameter("Priority", new cInteger(16), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("SafeDistant", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("LifeTime", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("character_damage_offset", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("RandomRotation", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.WEAPON_ImpactFilter: + newEntity.AddParameter("passed", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("failed", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("PhysicMaterial", new cString(" "), ParameterVariant.PARAMETER); //String + break; + case FunctionType.WEAPON_AttackerFilter: + newEntity.AddParameter("passed", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("failed", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("filter", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.WEAPON_TargetObjectFilter: + newEntity.AddParameter("passed", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("failed", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("filter", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.WEAPON_ImpactInspector: + newEntity.AddParameter("damage", new cInteger(), ParameterVariant.OUTPUT); //int + newEntity.AddParameter("impact_position", new cTransform(), ParameterVariant.OUTPUT); //Position + newEntity.AddParameter("impact_target", new cFloat(), ParameterVariant.OUTPUT); //Object + break; + case FunctionType.WEAPON_DamageFilter: + newEntity.AddParameter("passed", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("failed", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("damage_threshold", new cInteger(100), ParameterVariant.PARAMETER); //int + break; + case FunctionType.WEAPON_DidHitSomethingFilter: + newEntity.AddParameter("passed", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("failed", new cFloat(), ParameterVariant.TARGET); // + break; + case FunctionType.WEAPON_MultiFilter: + newEntity.AddParameter("passed", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("failed", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("AttackerFilter", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("TargetFilter", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("DamageThreshold", new cInteger(0), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("DamageType", new cEnum("DAMAGE_EFFECTS", 33554432), ParameterVariant.PARAMETER); //DAMAGE_EFFECTS + newEntity.AddParameter("UseAmmoFilter", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("AmmoType", new cEnum("AMMO_TYPE", 22), ParameterVariant.PARAMETER); //AMMO_TYPE + break; + case FunctionType.WEAPON_ImpactCharacterFilter: + newEntity.AddParameter("passed", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("failed", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("character_classes", new cEnum("CHARACTER_CLASS_COMBINATION", 1023), ParameterVariant.PARAMETER); //CHARACTER_CLASS_COMBINATION + newEntity.AddParameter("character_body_location", new cEnum("IMPACT_CHARACTER_BODY_LOCATION_TYPE", 0), ParameterVariant.PARAMETER); //IMPACT_CHARACTER_BODY_LOCATION_TYPE + break; + case FunctionType.WEAPON_Effect: + newEntity.AddParameter("WorldPos", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("AttachedEffects", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("UnattachedEffects", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("LifeTime", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.WEAPON_AmmoTypeFilter: + newEntity.AddParameter("passed", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("failed", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("AmmoType", new cEnum("DAMAGE_EFFECTS", 33554432), ParameterVariant.PARAMETER); //DAMAGE_EFFECTS + break; + case FunctionType.WEAPON_ImpactAngleFilter: + newEntity.AddParameter("greater", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("less", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("ReferenceAngle", new cFloat(60.0f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.WEAPON_ImpactOrientationFilter: + newEntity.AddParameter("passed", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("failed", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("ThresholdAngle", new cFloat(15.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("Orientation", new cEnum("WEAPON_IMPACT_FILTER_ORIENTATION", 2), ParameterVariant.PARAMETER); //WEAPON_IMPACT_FILTER_ORIENTATION + break; + case FunctionType.EFFECT_ImpactGenerator: + newEntity.AddParameter("on_impact", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_failed", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("trigger_on_reset", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("min_distance", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("distance", new cFloat(3.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("max_count", new cInteger(1), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("count", new cInteger(1), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("spread", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("skip_characters", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("use_local_rotation", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.EFFECT_EntityGenerator: + newEntity.AddParameter("entities", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("trigger_on_reset", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("count", new cInteger(1), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("spread", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("force_min", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("force_max", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("force_offset_XY_min", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("force_offset_XY_max", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("force_offset_Z_min", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("force_offset_Z_max", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("lifetime_min", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("lifetime_max", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("use_local_rotation", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.EFFECT_DirectionalPhysics: + newEntity.AddParameter("relative_direction", new cVector3(), ParameterVariant.PARAMETER); //Direction + newEntity.AddParameter("effect_distance", new cFloat(10.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("angular_falloff", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("min_force", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("max_force", new cFloat(10.0f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.PlatformConstantBool: + newEntity.AddParameter("NextGen", new cBool(), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("X360", new cBool(), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("PS3", new cBool(), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.PlatformConstantInt: + newEntity.AddParameter("NextGen", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("X360", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("PS3", new cInteger(), ParameterVariant.PARAMETER); //int + break; + case FunctionType.PlatformConstantFloat: + newEntity.AddParameter("NextGen", new cFloat(), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("X360", new cFloat(), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("PS3", new cFloat(), ParameterVariant.PARAMETER); //float + break; + case FunctionType.VariableBool: + newEntity.AddParameter("initial_value", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("is_persistent", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.VariableInt: + newEntity.AddParameter("initial_value", new cInteger(0), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("is_persistent", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.VariableFloat: + newEntity.AddParameter("initial_value", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("is_persistent", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.VariableString: + newEntity.AddParameter("initial_value", new cString(" "), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("is_persistent", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.VariableVector: + newEntity.AddParameter("initial_x", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("initial_y", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("initial_z", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.VariableVector2: + newEntity.AddParameter("initial_value", new cVector3(), ParameterVariant.INPUT); //Direction + break; + case FunctionType.VariableColour: + newEntity.AddParameter("initial_colour", new cVector3(), ParameterVariant.INPUT); //Direction + break; + case FunctionType.VariableFlashScreenColour: + newEntity.AddParameter("start_on_reset", new cBool(true), ParameterVariant.STATE); //bool + newEntity.AddParameter("pause_on_reset", new cBool(false), ParameterVariant.STATE); //bool + newEntity.AddParameter("initial_colour", new cVector3(), ParameterVariant.INPUT); //Direction + newEntity.AddParameter("flash_layer_name", new cString(" "), ParameterVariant.PARAMETER); //String + break; + case FunctionType.VariableHackingConfig: + newEntity.AddParameter("nodes", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("sensors", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("victory_nodes", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("victory_sensors", new cInteger(), ParameterVariant.PARAMETER); //int + break; + case FunctionType.VariableEnum: + newEntity.AddParameter("initial_value", new cEnum(), ParameterVariant.PARAMETER); //Enum + newEntity.AddParameter("is_persistent", new cBool(), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.VariableObject: + newEntity.AddParameter("initial", new cFloat(), ParameterVariant.INPUT); //Object + break; + case FunctionType.VariableAnimationInfo: + newEntity.AddParameter("AnimationSet", new cString(" "), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("Animation", new cString(" "), ParameterVariant.PARAMETER); //String + break; + case FunctionType.ExternalVariableBool: + newEntity.AddParameter("game_variable", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.GAME_VARIABLE) }.ToList(), newEntity.shortGUID), ParameterVariant.PARAMETER); //GAME_VARIABLE + break; + case FunctionType.NonPersistentBool: + newEntity.AddParameter("initial_value", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.NonPersistentInt: + newEntity.AddParameter("initial_value", new cInteger(0), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("is_persistent", new cBool(), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.GameDVR: + newEntity.AddParameter("start_time", new cInteger(0), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("duration", new cInteger(0), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("moment_ID", new cEnum("GAME_CLIP", 0), ParameterVariant.PARAMETER); //GAME_CLIP + break; + case FunctionType.Zone: + newEntity.AddParameter("composites", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("suspend_on_unload", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("space_visible", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.ZoneLink: + newEntity.AddParameter("ZoneA", new cFloat(), ParameterVariant.INPUT); //ZonePtr + newEntity.AddParameter("ZoneB", new cFloat(), ParameterVariant.INPUT); //ZonePtr + newEntity.AddParameter("cost", new cInteger(6), ParameterVariant.PARAMETER); //int + break; + case FunctionType.ZoneExclusionLink: + newEntity.AddParameter("ZoneA", new cFloat(), ParameterVariant.INPUT); //ZonePtr + newEntity.AddParameter("ZoneB", new cFloat(), ParameterVariant.INPUT); //ZonePtr + newEntity.AddParameter("exclude_streaming", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.ZoneLoaded: + newEntity.AddParameter("on_loaded", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_unloaded", new cFloat(), ParameterVariant.TARGET); // + break; + case FunctionType.FlushZoneCache: + newEntity.AddParameter("CurrentGen", new cBool(), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("NextGen", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.StateQuery: + newEntity.AddParameter("on_true", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_false", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Input", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("Result", new cBool(), ParameterVariant.OUTPUT); //bool + break; + case FunctionType.BooleanLogicInterface: + newEntity.AddParameter("on_true", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_false", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("LHS", new cBool(false), ParameterVariant.INPUT); //bool + newEntity.AddParameter("RHS", new cBool(false), ParameterVariant.INPUT); //bool + newEntity.AddParameter("Result", new cBool(), ParameterVariant.OUTPUT); //bool + break; + case FunctionType.LogicOnce: + newEntity.AddParameter("on_success", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_failure", new cFloat(), ParameterVariant.TARGET); // + break; + case FunctionType.LogicDelay: + newEntity.AddParameter("on_delay_finished", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("delay", new cFloat(0.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("can_suspend", new cBool(true), ParameterVariant.INPUT); //bool + break; + case FunctionType.LogicSwitch: + newEntity.AddParameter("true_now_false", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("false_now_true", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_true", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_false", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_restored_true", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_restored_false", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("initial_value", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("is_persistent", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.LogicGate: + newEntity.AddParameter("on_allowed", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_disallowed", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("allow", new cBool(), ParameterVariant.INPUT); //bool + break; + case FunctionType.BooleanLogicOperation: + newEntity.AddParameter("Input", new cBool(), ParameterVariant.INPUT); //bool + newEntity.AddParameter("Result", new cBool(), ParameterVariant.OUTPUT); //bool + break; + case FunctionType.FloatMath_All: + newEntity.AddParameter("Numbers", new cFloat(), ParameterVariant.INPUT); //float + newEntity.AddParameter("Result", new cFloat(), ParameterVariant.OUTPUT); //float + break; + case FunctionType.FloatMultiply_All: + newEntity.AddParameter("Invert", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.FloatMath: + newEntity.AddParameter("LHS", new cFloat(0.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("RHS", new cFloat(0.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("Result", new cFloat(), ParameterVariant.OUTPUT); //float + break; + case FunctionType.FloatMultiplyClamp: + newEntity.AddParameter("Min", new cFloat(0.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("Max", new cFloat(1.0f), ParameterVariant.INPUT); //float + break; + case FunctionType.FloatClampMultiply: + newEntity.AddParameter("Min", new cFloat(0.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("Max", new cFloat(1.0f), ParameterVariant.INPUT); //float + break; + case FunctionType.FloatOperation: + newEntity.AddParameter("Input", new cFloat(), ParameterVariant.INPUT); //float + newEntity.AddParameter("Result", new cFloat(), ParameterVariant.OUTPUT); //float + break; + case FunctionType.FloatCompare: + newEntity.AddParameter("on_true", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_false", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("LHS", new cFloat(0.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("RHS", new cFloat(0.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("Threshold", new cFloat(0.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("Result", new cBool(), ParameterVariant.OUTPUT); //bool + break; + case FunctionType.FloatModulate: + newEntity.AddParameter("on_think", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Result", new cFloat(), ParameterVariant.OUTPUT); //float + newEntity.AddParameter("wave_shape", new cEnum("WAVE_SHAPE", 0), ParameterVariant.PARAMETER); //WAVE_SHAPE + newEntity.AddParameter("frequency", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("phase", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("amplitude", new cFloat(0.5f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("bias", new cFloat(0.5f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.FloatModulateRandom: + newEntity.AddParameter("on_full_switched_on", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_full_switched_off", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_think", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Result", new cFloat(), ParameterVariant.OUTPUT); //float + newEntity.AddParameter("switch_on_anim", new cEnum("LIGHT_TRANSITION", 1), ParameterVariant.PARAMETER); //LIGHT_TRANSITION + newEntity.AddParameter("switch_on_delay", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("switch_on_custom_frequency", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("switch_on_duration", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("switch_off_anim", new cEnum("LIGHT_TRANSITION", 1), ParameterVariant.PARAMETER); //LIGHT_TRANSITION + newEntity.AddParameter("switch_off_custom_frequency", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("switch_off_duration", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("behaviour_anim", new cEnum("LIGHT_ANIM", 1), ParameterVariant.PARAMETER); //LIGHT_ANIM + newEntity.AddParameter("behaviour_frequency", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("behaviour_frequency_variance", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("behaviour_offset", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("pulse_modulation", new cFloat(), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("oscillate_range_min", new cFloat(0.75f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("sparking_speed", new cFloat(0.9f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("blink_rate", new cFloat(0.5f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("blink_range_min", new cFloat(0.01f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("flicker_rate", new cFloat(0.75f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("flicker_off_rate", new cFloat(0.15f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("flicker_range_min", new cFloat(0.1f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("flicker_off_range_min", new cFloat(0.01f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("disable_behaviour", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.FloatLinearProportion: + newEntity.AddParameter("Initial_Value", new cFloat(0.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("Target_Value", new cFloat(1.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("Proportion", new cFloat(1.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("Result", new cFloat(), ParameterVariant.OUTPUT); //float + break; + case FunctionType.FloatGetLinearProportion: + newEntity.AddParameter("Min", new cFloat(0.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("Input", new cFloat(1.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("Max", new cFloat(1.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("Proportion", new cFloat(), ParameterVariant.OUTPUT); //float + break; + case FunctionType.FloatLinearInterpolateTimed: + newEntity.AddParameter("on_finished", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_think", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Result", new cFloat(), ParameterVariant.OUTPUT); //float + newEntity.AddParameter("Initial_Value", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("Target_Value", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("Time", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("PingPong", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("Loop", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.FloatLinearInterpolateSpeed: + newEntity.AddParameter("on_finished", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_think", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Result", new cFloat(), ParameterVariant.OUTPUT); //float + newEntity.AddParameter("Initial_Value", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("Target_Value", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("Speed", new cFloat(0.1f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("PingPong", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("Loop", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.FloatLinearInterpolateSpeedAdvanced: + newEntity.AddParameter("on_finished", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_think", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("trigger_on_min", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("trigger_on_max", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("trigger_on_loop", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Result", new cFloat(), ParameterVariant.OUTPUT); //float + newEntity.AddParameter("Initial_Value", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("Min_Value", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("Max_Value", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("Speed", new cFloat(0.1f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("PingPong", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("Loop", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.FloatSmoothStep: + newEntity.AddParameter("Low_Edge", new cFloat(0.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("High_Edge", new cFloat(1.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("Value", new cFloat(1.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("Result", new cFloat(), ParameterVariant.OUTPUT); //float + break; + case FunctionType.FloatClamp: + newEntity.AddParameter("Min", new cFloat(0.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("Max", new cFloat(1.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("Value", new cFloat(1.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("Result", new cFloat(), ParameterVariant.OUTPUT); //float + break; + case FunctionType.FilterAbsorber: + newEntity.AddParameter("output", new cFloat(), ParameterVariant.OUTPUT); //float + newEntity.AddParameter("factor", new cFloat(0.95f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("start_value", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("input", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.IntegerMath_All: + newEntity.AddParameter("Numbers", new cInteger(), ParameterVariant.INPUT); //int + newEntity.AddParameter("Result", new cInteger(), ParameterVariant.OUTPUT); //int + break; + case FunctionType.IntegerMath: + newEntity.AddParameter("LHS", new cInteger(0), ParameterVariant.INPUT); //int + newEntity.AddParameter("RHS", new cInteger(0), ParameterVariant.INPUT); //int + newEntity.AddParameter("Result", new cInteger(), ParameterVariant.OUTPUT); //int + break; + case FunctionType.IntegerOperation: + newEntity.AddParameter("Input", new cInteger(), ParameterVariant.INPUT); //int + newEntity.AddParameter("Result", new cInteger(), ParameterVariant.OUTPUT); //int + break; + case FunctionType.IntegerCompare: + newEntity.AddParameter("on_true", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_false", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("LHS", new cInteger(0), ParameterVariant.INPUT); //int + newEntity.AddParameter("RHS", new cInteger(0), ParameterVariant.INPUT); //int + newEntity.AddParameter("Result", new cBool(), ParameterVariant.OUTPUT); //bool + break; + case FunctionType.IntegerAnalyse: + newEntity.AddParameter("Input", new cInteger(0), ParameterVariant.INPUT); //int + newEntity.AddParameter("Result", new cInteger(), ParameterVariant.OUTPUT); //int + newEntity.AddParameter("Val0", new cInteger(0), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("Val1", new cInteger(1), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("Val2", new cInteger(2), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("Val3", new cInteger(3), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("Val4", new cInteger(4), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("Val5", new cInteger(5), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("Val6", new cInteger(6), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("Val7", new cInteger(7), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("Val8", new cInteger(8), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("Val9", new cInteger(9), ParameterVariant.PARAMETER); //int + break; + case FunctionType.SetEnum: + newEntity.AddParameter("Output", new cEnum(), ParameterVariant.OUTPUT); //Enum + newEntity.AddParameter("initial_value", new cEnum(), ParameterVariant.PARAMETER); //Enum + break; + case FunctionType.SetString: + newEntity.AddParameter("Output", new cString(""), ParameterVariant.OUTPUT); //String + newEntity.AddParameter("initial_value", new cString(""), ParameterVariant.PARAMETER); //String + break; + case FunctionType.VectorMath: + newEntity.AddParameter("LHS", new cVector3(), ParameterVariant.INPUT); //Direction + newEntity.AddParameter("RHS", new cVector3(), ParameterVariant.INPUT); //Direction + newEntity.AddParameter("Result", new cVector3(), ParameterVariant.OUTPUT); //Direction + break; + case FunctionType.VectorScale: + newEntity.AddParameter("LHS", new cVector3(), ParameterVariant.INPUT); //Direction + newEntity.AddParameter("RHS", new cFloat(0.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("Result", new cVector3(), ParameterVariant.OUTPUT); //Direction + break; + case FunctionType.VectorNormalise: + newEntity.AddParameter("Input", new cVector3(), ParameterVariant.INPUT); //Direction + newEntity.AddParameter("Result", new cVector3(), ParameterVariant.OUTPUT); //Direction + break; + case FunctionType.VectorModulus: + newEntity.AddParameter("Input", new cVector3(), ParameterVariant.INPUT); //Direction + newEntity.AddParameter("Result", new cFloat(), ParameterVariant.OUTPUT); //float + break; + case FunctionType.ScalarProduct: + newEntity.AddParameter("LHS", new cVector3(), ParameterVariant.INPUT); //Direction + newEntity.AddParameter("RHS", new cVector3(), ParameterVariant.INPUT); //Direction + newEntity.AddParameter("Result", new cFloat(), ParameterVariant.OUTPUT); //float + break; + case FunctionType.VectorDirection: + newEntity.AddParameter("From", new cVector3(), ParameterVariant.INPUT); //Direction + newEntity.AddParameter("To", new cVector3(), ParameterVariant.INPUT); //Direction + newEntity.AddParameter("Result", new cFloat(), ParameterVariant.OUTPUT); //float + break; + case FunctionType.VectorYaw: + newEntity.AddParameter("Vector", new cVector3(), ParameterVariant.INPUT); //Direction + newEntity.AddParameter("Result", new cFloat(), ParameterVariant.OUTPUT); //float + break; + case FunctionType.VectorRotateYaw: + newEntity.AddParameter("Vector", new cVector3(), ParameterVariant.INPUT); //Direction + newEntity.AddParameter("Yaw", new cFloat(0.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("Result", new cVector3(), ParameterVariant.OUTPUT); //Direction + break; + case FunctionType.VectorRotateRoll: + newEntity.AddParameter("Vector", new cVector3(), ParameterVariant.INPUT); //Direction + newEntity.AddParameter("Roll", new cFloat(0.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("Result", new cVector3(), ParameterVariant.OUTPUT); //Direction + break; + case FunctionType.VectorRotatePitch: + newEntity.AddParameter("Vector", new cVector3(), ParameterVariant.INPUT); //Direction + newEntity.AddParameter("Pitch", new cFloat(0.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("Result", new cVector3(), ParameterVariant.OUTPUT); //Direction + break; + case FunctionType.VectorRotateByPos: + newEntity.AddParameter("Vector", new cVector3(), ParameterVariant.INPUT); //Direction + newEntity.AddParameter("WorldPos", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("Result", new cVector3(), ParameterVariant.OUTPUT); //Direction + break; + case FunctionType.VectorMultiplyByPos: + newEntity.AddParameter("Vector", new cVector3(), ParameterVariant.INPUT); //Direction + newEntity.AddParameter("WorldPos", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("Result", new cTransform(), ParameterVariant.OUTPUT); //Position + break; + case FunctionType.VectorDistance: + newEntity.AddParameter("LHS", new cVector3(), ParameterVariant.INPUT); //Direction + newEntity.AddParameter("RHS", new cVector3(), ParameterVariant.INPUT); //Direction + newEntity.AddParameter("Result", new cFloat(), ParameterVariant.OUTPUT); //float + break; + case FunctionType.VectorReflect: + newEntity.AddParameter("Input", new cVector3(), ParameterVariant.INPUT); //Direction + newEntity.AddParameter("Normal", new cVector3(), ParameterVariant.INPUT); //Direction + newEntity.AddParameter("Result", new cVector3(), ParameterVariant.OUTPUT); //Direction + break; + case FunctionType.SetVector: + newEntity.AddParameter("x", new cFloat(0.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("y", new cFloat(0.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("z", new cFloat(0.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("Result", new cVector3(), ParameterVariant.OUTPUT); //Direction + break; + case FunctionType.SetVector2: + newEntity.AddParameter("Input", new cVector3(), ParameterVariant.INPUT); //Direction + newEntity.AddParameter("Result", new cVector3(), ParameterVariant.OUTPUT); //Direction + break; + case FunctionType.SetColour: + newEntity.AddParameter("Colour", new cVector3(), ParameterVariant.INPUT); //Direction + newEntity.AddParameter("Result", new cVector3(), ParameterVariant.OUTPUT); //Direction + break; + case FunctionType.GetTranslation: + newEntity.AddParameter("Input", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("Result", new cVector3(), ParameterVariant.OUTPUT); //Direction + break; + case FunctionType.GetRotation: + newEntity.AddParameter("Input", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("Result", new cVector3(), ParameterVariant.OUTPUT); //Direction + break; + case FunctionType.GetComponentInterface: + newEntity.AddParameter("Input", new cVector3(), ParameterVariant.INPUT); //Direction + newEntity.AddParameter("Result", new cFloat(), ParameterVariant.OUTPUT); //float + break; + case FunctionType.SetPosition: + newEntity.AddParameter("Translation", new cVector3(), ParameterVariant.INPUT); //Direction + newEntity.AddParameter("Rotation", new cVector3(), ParameterVariant.INPUT); //Direction + newEntity.AddParameter("Input", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("Result", new cTransform(), ParameterVariant.OUTPUT); //Position + newEntity.AddParameter("set_on_reset", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.PositionDistance: + newEntity.AddParameter("LHS", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("RHS", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("Result", new cFloat(), ParameterVariant.OUTPUT); //float + break; + case FunctionType.VectorLinearProportion: + newEntity.AddParameter("Initial_Value", new cVector3(), ParameterVariant.INPUT); //Direction + newEntity.AddParameter("Target_Value", new cVector3(), ParameterVariant.INPUT); //Direction + newEntity.AddParameter("Proportion", new cFloat(1.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("Result", new cVector3(), ParameterVariant.OUTPUT); //Direction + break; + case FunctionType.VectorLinearInterpolateTimed: + newEntity.AddParameter("on_finished", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_think", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Initial_Value", new cVector3(), ParameterVariant.INPUT); //Direction + newEntity.AddParameter("Target_Value", new cVector3(), ParameterVariant.INPUT); //Direction + newEntity.AddParameter("Reverse", new cBool(false), ParameterVariant.INPUT); //bool + newEntity.AddParameter("Result", new cVector3(), ParameterVariant.OUTPUT); //Direction + newEntity.AddParameter("Time", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("PingPong", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("Loop", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.VectorLinearInterpolateSpeed: + newEntity.AddParameter("on_finished", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_think", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Initial_Value", new cVector3(), ParameterVariant.INPUT); //Direction + newEntity.AddParameter("Target_Value", new cVector3(), ParameterVariant.INPUT); //Direction + newEntity.AddParameter("Reverse", new cBool(false), ParameterVariant.INPUT); //bool + newEntity.AddParameter("Result", new cVector3(), ParameterVariant.OUTPUT); //Direction + newEntity.AddParameter("Speed", new cFloat(0.1f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("PingPong", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("Loop", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.MoveInTime: + newEntity.AddParameter("on_finished", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("start_position", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("end_position", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("result", new cTransform(), ParameterVariant.OUTPUT); //Position + newEntity.AddParameter("duration", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.SmoothMove: + newEntity.AddParameter("on_finished", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("timer", new cFloat(0.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("start_position", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("end_position", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("start_velocity", new cVector3(), ParameterVariant.INPUT); //Direction + newEntity.AddParameter("end_velocity", new cVector3(), ParameterVariant.INPUT); //Direction + newEntity.AddParameter("result", new cTransform(), ParameterVariant.OUTPUT); //Position + newEntity.AddParameter("duration", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.RotateInTime: + newEntity.AddParameter("on_finished", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_think", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("start_pos", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("origin", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("timer", new cFloat(0.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("Result", new cTransform(), ParameterVariant.OUTPUT); //Position + newEntity.AddParameter("duration", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("time_X", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("time_Y", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("time_Z", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("loop", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.RotateAtSpeed: + newEntity.AddParameter("on_finished", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_think", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("start_pos", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("origin", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("timer", new cFloat(0.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("Result", new cTransform(), ParameterVariant.OUTPUT); //Position + newEntity.AddParameter("duration", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("speed_X", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("speed_Y", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("speed_Z", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("loop", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.PointAt: + newEntity.AddParameter("origin", new cVector3(), ParameterVariant.INPUT); //Direction + newEntity.AddParameter("target", new cVector3(), ParameterVariant.INPUT); //Direction + newEntity.AddParameter("Result", new cTransform(), ParameterVariant.OUTPUT); //Position + break; + case FunctionType.SetLocationAndOrientation: + newEntity.AddParameter("location", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("axis", new cVector3(), ParameterVariant.INPUT); //Direction + newEntity.AddParameter("local_offset", new cVector3(), ParameterVariant.INPUT); //Direction + newEntity.AddParameter("result", new cTransform(), ParameterVariant.OUTPUT); //Position + newEntity.AddParameter("axis_is", new cEnum("ORIENTATION_AXIS", 2), ParameterVariant.PARAMETER); //ORIENTATION_AXIS + break; + case FunctionType.ApplyRelativeTransform: + newEntity.AddParameter("origin", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("destination", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("input", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("output", new cTransform(), ParameterVariant.OUTPUT); //Position + newEntity.AddParameter("use_trigger_entity", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.RandomFloat: + newEntity.AddParameter("Result", new cFloat(), ParameterVariant.OUTPUT); //float + newEntity.AddParameter("Min", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("Max", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.RandomInt: + newEntity.AddParameter("Result", new cInteger(), ParameterVariant.OUTPUT); //int + newEntity.AddParameter("Min", new cInteger(0), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("Max", new cInteger(100), ParameterVariant.PARAMETER); //int + break; + case FunctionType.RandomBool: + newEntity.AddParameter("Result", new cBool(), ParameterVariant.OUTPUT); //bool + break; + case FunctionType.RandomVector: + newEntity.AddParameter("Result", new cVector3(), ParameterVariant.OUTPUT); //Direction + newEntity.AddParameter("MinX", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("MaxX", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("MinY", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("MaxY", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("MinZ", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("MaxZ", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("Normalised", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.RandomSelect: + newEntity.AddParameter("Input", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("Result", new cFloat(), ParameterVariant.OUTPUT); //Object + newEntity.AddParameter("Seed", new cFloat(0.5f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.TriggerRandom: + newEntity.AddParameter("Random_1", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Random_2", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Random_3", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Random_4", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Random_5", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Random_6", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Random_7", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Random_8", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Random_9", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Random_10", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Random_11", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Random_12", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Num", new cInteger(1), ParameterVariant.PARAMETER); //int + break; + case FunctionType.TriggerRandomSequence: + newEntity.AddParameter("Random_1", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Random_2", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Random_3", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Random_4", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Random_5", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Random_6", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Random_7", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Random_8", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Random_9", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Random_10", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("All_triggered", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("current", new cInteger(), ParameterVariant.OUTPUT); //int + newEntity.AddParameter("num", new cInteger(1), ParameterVariant.PARAMETER); //int + break; + case FunctionType.Persistent_TriggerRandomSequence: + newEntity.AddParameter("Random_1", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Random_2", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Random_3", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Random_4", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Random_5", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Random_6", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Random_7", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Random_8", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Random_9", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Random_10", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("All_triggered", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("current", new cInteger(), ParameterVariant.OUTPUT); //int + newEntity.AddParameter("num", new cInteger(1), ParameterVariant.PARAMETER); //int + break; + case FunctionType.TriggerWeightedRandom: + newEntity.AddParameter("Random_1", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Random_2", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Random_3", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Random_4", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Random_5", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Random_6", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Random_7", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Random_8", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Random_9", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Random_10", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("current", new cInteger(), ParameterVariant.OUTPUT); //int + newEntity.AddParameter("Weighting_01", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("Weighting_02", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("Weighting_03", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("Weighting_04", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("Weighting_05", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("Weighting_06", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("Weighting_07", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("Weighting_08", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("Weighting_09", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("Weighting_10", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("allow_same_pin_in_succession", new cBool(true), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.PlayEnvironmentAnimation: + newEntity.AddParameter("on_finished", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_finished_streaming", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("play_on_reset", new cBool(false), ParameterVariant.STATE); //bool + newEntity.AddParameter("jump_to_the_end_on_play", new cBool(false), ParameterVariant.STATE); //bool + newEntity.AddParameter("geometry", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("marker", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("external_start_time", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("external_time", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("animation_length", new cFloat(), ParameterVariant.OUTPUT); //float + newEntity.AddParameter("animation_info", new cFloat(), ParameterVariant.PARAMETER); //AnimationInfoPtr + newEntity.AddParameter("AnimationSet", new cString(" "), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("Animation", new cString(" "), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("start_frame", new cInteger(-1), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("end_frame", new cInteger(-1), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("play_speed", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("loop", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("is_cinematic", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("shot_number", new cInteger(), ParameterVariant.PARAMETER); //int + break; + case FunctionType.CAGEAnimation: + //newEntity = new CAGEAnimation(thisID); + newEntity.AddParameter("animation_finished", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("animation_interrupted", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("animation_changed", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("cinematic_loaded", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("cinematic_unloaded", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("enable_on_reset", new cBool(true), ParameterVariant.STATE); //bool + newEntity.AddParameter("external_time", new cFloat(0.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("current_time", new cFloat(), ParameterVariant.OUTPUT); //float + newEntity.AddParameter("use_external_time", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("rewind_on_stop", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("jump_to_the_end", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("playspeed", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("anim_length", new cFloat(10.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("is_cinematic", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("is_cinematic_skippable", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("skippable_timer", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("capture_video", new cBool(), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("capture_clip_name", new cString(""), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("playback", new cFloat(0.0f), ParameterVariant.INTERNAL); //float + break; + case FunctionType.MultitrackLoop: + newEntity.AddParameter("current_time", new cFloat(), ParameterVariant.INPUT); //float + newEntity.AddParameter("loop_condition", new cBool(), ParameterVariant.INPUT); //bool + newEntity.AddParameter("start_time", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("end_time", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.ReTransformer: + newEntity.AddParameter("new_transform", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("result", new cTransform(), ParameterVariant.OUTPUT); //Position + break; + case FunctionType.TriggerSequence: + //newEntity = new TriggerSequence(thisID); + newEntity.AddParameter("proxy_enable_on_reset", new cBool(false), ParameterVariant.STATE); //bool + newEntity.AddParameter("attach_on_reset", new cBool(false), ParameterVariant.STATE); //bool + newEntity.AddParameter("duration", new cFloat(), ParameterVariant.OUTPUT); //float + newEntity.AddParameter("trigger_mode", new cEnum("ANIM_MODE", 0), ParameterVariant.PARAMETER); //ANIM_MODE + newEntity.AddParameter("random_seed", new cFloat(0.5f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("use_random_intervals", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("no_duplicates", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("interval_multiplier", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.Checkpoint: + newEntity.AddParameter("on_checkpoint", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_captured", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_saved", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("finished_saving", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("finished_loading", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("cancelled_saving", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("finished_saving_to_hdd", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("player_spawn_position", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("is_first_checkpoint", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("is_first_autorun_checkpoint", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("section", new cString(""), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("mission_number", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("checkpoint_type", new cEnum("CHECKPOINT_TYPE", 0), ParameterVariant.PARAMETER); //CHECKPOINT_TYPE + break; + case FunctionType.MissionNumber: + newEntity.AddParameter("on_changed", new cFloat(), ParameterVariant.TARGET); // + break; + case FunctionType.SetAsActiveMissionLevel: + newEntity.AddParameter("clear_level", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.CheckpointRestoredNotify: + newEntity.AddParameter("restored", new cFloat(), ParameterVariant.TARGET); // + break; + case FunctionType.DebugLoadCheckpoint: + newEntity.AddParameter("previous_checkpoint", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.GameStateChanged: + newEntity.AddParameter("mission_number", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.DisplayMessage: + newEntity.AddParameter("title_id", new cString(" "), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("message_id", new cString(" "), ParameterVariant.PARAMETER); //String + break; + case FunctionType.DisplayMessageWithCallbacks: + newEntity.AddParameter("on_yes", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_no", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_cancel", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("title_text", new cString(" "), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("message_text", new cString(" "), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("yes_text", new cString(" "), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("no_text", new cString(" "), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("cancel_text", new cString(" "), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("yes_button", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("no_button", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("cancel_button", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.LevelInfo: + newEntity.AddParameter("save_level_name_id", new cString(" "), ParameterVariant.PARAMETER); //String + break; + case FunctionType.DebugCheckpoint: + newEntity.AddParameter("on_checkpoint", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("section", new cString(""), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("level_reset", new cBool(), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.Benchmark: + newEntity.AddParameter("benchmark_name", new cString(" "), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("save_stats", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.EndGame: + newEntity.AddParameter("on_game_end_started", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_game_ended", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("success", new cBool(), ParameterVariant.INPUT); //bool + break; + case FunctionType.LeaveGame: + newEntity.AddParameter("disconnect_from_session", new cBool(), ParameterVariant.INPUT); //bool + break; + case FunctionType.DebugTextStacking: + newEntity.AddParameter("float_input", new cFloat(), ParameterVariant.INPUT); //float + newEntity.AddParameter("int_input", new cInteger(), ParameterVariant.INPUT); //int + newEntity.AddParameter("bool_input", new cBool(), ParameterVariant.INPUT); //bool + newEntity.AddParameter("vector_input", new cVector3(), ParameterVariant.INPUT); //Direction + newEntity.AddParameter("enum_input", new cEnum(), ParameterVariant.INPUT); //Enum + newEntity.AddParameter("text", new cString(""), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("namespace", new cString(""), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("size", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("colour", new cVector3(), ParameterVariant.PARAMETER); //Direction + newEntity.AddParameter("ci_type", new cEnum("CI_MESSAGE_TYPE", 0), ParameterVariant.PARAMETER); //CI_MESSAGE_TYPE + newEntity.AddParameter("needs_debug_opt_to_render", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.DebugText: + newEntity.AddParameter("duration_finished", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("float_input", new cFloat(), ParameterVariant.INPUT); //float + newEntity.AddParameter("int_input", new cInteger(), ParameterVariant.INPUT); //int + newEntity.AddParameter("bool_input", new cBool(), ParameterVariant.INPUT); //bool + newEntity.AddParameter("vector_input", new cVector3(), ParameterVariant.INPUT); //Direction + newEntity.AddParameter("enum_input", new cEnum(), ParameterVariant.INPUT); //Enum + newEntity.AddParameter("text_input", new cString(""), ParameterVariant.INPUT); //String + newEntity.AddParameter("text", new cString(""), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("namespace", new cString(""), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("size", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("colour", new cVector3(), ParameterVariant.PARAMETER); //Direction + newEntity.AddParameter("alignment", new cEnum("TEXT_ALIGNMENT", 4), ParameterVariant.PARAMETER); //TEXT_ALIGNMENT + newEntity.AddParameter("duration", new cFloat(5.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("pause_game", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("cancel_pause_with_button_press", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("priority", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("ci_type", new cEnum("CI_MESSAGE_TYPE", 0), ParameterVariant.PARAMETER); //CI_MESSAGE_TYPE + break; + case FunctionType.TutorialMessage: + newEntity.AddParameter("text", new cString(" "), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("text_list", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.TUTORIAL_ENTRY_ID) }.ToList(), newEntity.shortGUID), ParameterVariant.PARAMETER); //TUTORIAL_ENTRY_ID + newEntity.AddParameter("show_animation", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.DebugEnvironmentMarker: + newEntity.AddParameter("target", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("float_input", new cFloat(), ParameterVariant.INPUT); //float + newEntity.AddParameter("int_input", new cInteger(), ParameterVariant.INPUT); //int + newEntity.AddParameter("bool_input", new cBool(), ParameterVariant.INPUT); //bool + newEntity.AddParameter("vector_input", new cVector3(), ParameterVariant.INPUT); //Direction + newEntity.AddParameter("enum_input", new cEnum(), ParameterVariant.INPUT); //Enum + newEntity.AddParameter("text", new cString(" "), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("namespace", new cString(""), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("size", new cFloat(20.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("colour", new cVector3(), ParameterVariant.PARAMETER); //Direction + newEntity.AddParameter("world_pos", new cTransform(), ParameterVariant.PARAMETER); //Position + newEntity.AddParameter("duration", new cFloat(), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("scale_with_distance", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("max_string_length", new cInteger(10), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("scroll_speed", new cFloat(), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("show_distance_from_target", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.DebugPositionMarker: + newEntity.AddParameter("world_pos", new cTransform(), ParameterVariant.PARAMETER); //Position + break; + case FunctionType.DebugCaptureScreenShot: + newEntity.AddParameter("finished_capturing", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("wait_for_streamer", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("capture_filename", new cString(""), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("fov", new cFloat(), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("near", new cFloat(), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("far", new cFloat(), ParameterVariant.PARAMETER); //float + break; + case FunctionType.DebugCaptureCorpse: + newEntity.AddParameter("finished_capturing", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("character", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("corpse_name", new cString(""), ParameterVariant.PARAMETER); //String + break; + case FunctionType.DebugMenuToggle: + newEntity.AddParameter("debug_variable", new cString(""), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("value", new cBool(), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.PlayerTorch: + newEntity.AddParameter("requested_torch_holster", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("requested_torch_draw", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("start_on_reset", new cBool(true), ParameterVariant.STATE); //bool + newEntity.AddParameter("power_in_current_battery", new cFloat(1.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("battery_count", new cInteger(), ParameterVariant.OUTPUT); //int + break; + case FunctionType.Master: + newEntity.AddParameter("suspend_on_reset", new cBool(false), ParameterVariant.STATE); //bool + newEntity.AddParameter("objects", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("disable_display", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("disable_collision", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("disable_simulation", new cBool(true), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.ExclusiveMaster: + newEntity.AddParameter("active_objects", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("inactive_objects", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddResource(ResourceType.EXCLUSIVE_MASTER_STATE_RESOURCE); + break; + case FunctionType.ThinkOnce: + newEntity.AddParameter("on_think", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("start_on_reset", new cBool(true), ParameterVariant.STATE); //bool + newEntity.AddParameter("use_random_start", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("random_start_delay", new cFloat(0.1f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.Thinker: + newEntity.AddParameter("on_think", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("delay_between_triggers", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("is_continuous", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("use_random_start", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("random_start_delay", new cFloat(0.1f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("total_thinking_time", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.AllPlayersReady: + newEntity.AddParameter("on_all_players_ready", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("start_on_reset", new cBool(true), ParameterVariant.STATE); //bool + newEntity.AddParameter("pause_on_reset", new cBool(false), ParameterVariant.STATE); //bool + newEntity.AddParameter("activation_delay", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.SyncOnAllPlayers: + newEntity.AddParameter("on_synchronized", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_synchronized_host", new cFloat(), ParameterVariant.TARGET); // + break; + case FunctionType.SyncOnFirstPlayer: + newEntity.AddParameter("on_synchronized", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_synchronized_host", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_synchronized_local", new cFloat(), ParameterVariant.TARGET); // + break; + case FunctionType.NetPlayerCounter: + newEntity.AddParameter("on_full", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_empty", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_intermediate", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("is_full", new cBool(), ParameterVariant.OUTPUT); //bool + newEntity.AddParameter("is_empty", new cBool(), ParameterVariant.OUTPUT); //bool + newEntity.AddParameter("contains_local_player", new cBool(), ParameterVariant.OUTPUT); //bool + break; + case FunctionType.BroadcastTrigger: + newEntity.AddParameter("on_triggered", new cFloat(), ParameterVariant.TARGET); // + break; + case FunctionType.HostOnlyTrigger: + newEntity.AddParameter("on_triggered", new cFloat(), ParameterVariant.TARGET); // + break; + case FunctionType.SpawnGroup: + newEntity.AddParameter("on_spawn_request", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("default_group", new cBool(false), ParameterVariant.INPUT); //bool + newEntity.AddParameter("trigger_on_reset", new cBool(true), ParameterVariant.INPUT); //bool + break; + case FunctionType.RespawnExcluder: + newEntity.AddParameter("excluded_points", new cFloat(), ParameterVariant.INPUT); //Object + break; + case FunctionType.RespawnConfig: + newEntity.AddParameter("min_dist", new cFloat(), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("preferred_dist", new cFloat(), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("max_dist", new cFloat(), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("respawn_mode", new cEnum("RESPAWN_MODE", 0), ParameterVariant.PARAMETER); //RESPAWN_MODE + newEntity.AddParameter("respawn_wait_time", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("uncollidable_time", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("is_default", new cBool(true), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.NumConnectedPlayers: + newEntity.AddParameter("on_count_changed", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("count", new cInteger(), ParameterVariant.OUTPUT); //int + break; + case FunctionType.NumPlayersOnStart: + newEntity.AddParameter("count", new cInteger(), ParameterVariant.OUTPUT); //int + break; + case FunctionType.NetworkedTimer: + newEntity.AddParameter("on_second_changed", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_started_counting", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_finished_counting", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("time_elapsed", new cFloat(), ParameterVariant.OUTPUT); //float + newEntity.AddParameter("time_left", new cFloat(), ParameterVariant.OUTPUT); //float + newEntity.AddParameter("time_elapsed_sec", new cInteger(), ParameterVariant.OUTPUT); //int + newEntity.AddParameter("time_left_sec", new cInteger(), ParameterVariant.OUTPUT); //int + newEntity.AddParameter("duration", new cFloat(5.0f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.DebugObjectMarker: + newEntity.AddParameter("marked_object", new cFloat(), ParameterVariant.PARAMETER); //Object + newEntity.AddParameter("marked_name", new cString(" "), ParameterVariant.PARAMETER); //String + break; + case FunctionType.EggSpawner: + newEntity.AddParameter("egg_position", new cTransform(), ParameterVariant.PARAMETER); //Position + newEntity.AddParameter("hostile_egg", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.RandomObjectSelector: + newEntity.AddParameter("objects", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("chosen_object", new cFloat(), ParameterVariant.OUTPUT); //Object + break; + case FunctionType.CompoundVolume: + newEntity.AddParameter("event", new cFloat(), ParameterVariant.TARGET); // + break; + case FunctionType.TriggerVolumeFilter: + newEntity.AddParameter("on_event_entered", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_event_exited", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("filter", new cBool(true), ParameterVariant.INPUT); //bool + break; + case FunctionType.TriggerVolumeFilter_Monitored: + newEntity.AddParameter("on_event_entered", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_event_exited", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("filter", new cBool(true), ParameterVariant.INPUT); //bool + break; + case FunctionType.TriggerFilter: + newEntity.AddParameter("on_success", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_failure", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("filter", new cBool(true), ParameterVariant.INPUT); //bool + break; + case FunctionType.TriggerObjectsFilter: + newEntity.AddParameter("on_success", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_failure", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("filter", new cBool(true), ParameterVariant.INPUT); //bool + newEntity.AddParameter("objects", new cFloat(), ParameterVariant.INPUT); //Object + break; + case FunctionType.BindObjectsMultiplexer: + newEntity.AddParameter("Pin1_Bound", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Pin2_Bound", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Pin3_Bound", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Pin4_Bound", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Pin5_Bound", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Pin6_Bound", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Pin7_Bound", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Pin8_Bound", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Pin9_Bound", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Pin10_Bound", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("objects", new cFloat(), ParameterVariant.INPUT); //Object + break; + case FunctionType.TriggerObjectsFilterCounter: + newEntity.AddParameter("none_passed", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("some_passed", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("all_passed", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("objects", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("filter", new cBool(true), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.TriggerContainerObjectsFilterCounter: + newEntity.AddParameter("none_passed", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("some_passed", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("all_passed", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("filter", new cBool(true), ParameterVariant.INPUT); //bool + newEntity.AddParameter("container", new cFloat(), ParameterVariant.PARAMETER); //Object + break; + case FunctionType.TriggerTouch: + newEntity.AddParameter("touch_event", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("enable_on_reset", new cBool(true), ParameterVariant.STATE); //bool + newEntity.AddParameter("physics_object", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.COLLISION_MAPPING) }.ToList(), newEntity.shortGUID), ParameterVariant.INPUT); //COLLISION_MAPPING + newEntity.AddParameter("impact_normal", new cVector3(), ParameterVariant.OUTPUT); //Direction + break; + case FunctionType.TriggerDamaged: + newEntity.AddParameter("on_damaged", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("enable_on_reset", new cBool(true), ParameterVariant.STATE); //bool + newEntity.AddParameter("physics_object", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.COLLISION_MAPPING) }.ToList(), newEntity.shortGUID), ParameterVariant.INPUT); //COLLISION_MAPPING + newEntity.AddParameter("impact_normal", new cVector3(), ParameterVariant.OUTPUT); //Direction + newEntity.AddParameter("threshold", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.TriggerBindCharacter: + newEntity.AddParameter("bound_trigger", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("characters", new cFloat(), ParameterVariant.INPUT); //Object + break; + case FunctionType.TriggerBindAllCharactersOfType: + newEntity.AddParameter("bound_trigger", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("character_class", new cEnum("CHARACTER_CLASS_COMBINATION", 2), ParameterVariant.PARAMETER); //CHARACTER_CLASS_COMBINATION + break; + case FunctionType.TriggerBindCharactersInSquad: + newEntity.AddParameter("bound_trigger", new cFloat(), ParameterVariant.TARGET); // + break; + case FunctionType.TriggerUnbindCharacter: + newEntity.AddParameter("unbound_trigger", new cFloat(), ParameterVariant.TARGET); // + break; + case FunctionType.TriggerExtractBoundObject: + newEntity.AddParameter("unbound_trigger", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("bound_object", new cFloat(), ParameterVariant.OUTPUT); //Object + break; + case FunctionType.TriggerExtractBoundCharacter: + newEntity.AddParameter("unbound_trigger", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("bound_character", new cFloat(), ParameterVariant.OUTPUT); //Object + break; + case FunctionType.TriggerDelay: + newEntity.AddParameter("delayed_trigger", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("purged_trigger", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("time_left", new cFloat(), ParameterVariant.OUTPUT); //float + newEntity.AddParameter("Hrs", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("Min", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("Sec", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.TriggerSwitch: + newEntity.AddParameter("Pin_1", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Pin_2", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Pin_3", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Pin_4", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Pin_5", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Pin_6", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Pin_7", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Pin_8", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Pin_9", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Pin_10", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("current", new cInteger(), ParameterVariant.OUTPUT); //int + newEntity.AddParameter("num", new cInteger(1), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("loop", new cBool(true), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.TriggerSelect: + newEntity.AddParameter("Pin_0", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Pin_1", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Pin_2", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Pin_3", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Pin_4", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Pin_5", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Pin_6", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Pin_7", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Pin_8", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Pin_9", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Pin_10", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Pin_11", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Pin_12", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Pin_13", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Pin_14", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Pin_15", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Pin_16", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Object_0", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("Object_1", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("Object_2", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("Object_3", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("Object_4", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("Object_5", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("Object_6", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("Object_7", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("Object_8", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("Object_9", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("Object_10", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("Object_11", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("Object_12", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("Object_13", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("Object_14", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("Object_15", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("Object_16", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("Result", new cFloat(), ParameterVariant.OUTPUT); //Object + newEntity.AddParameter("index", new cInteger(0), ParameterVariant.PARAMETER); //int + break; + case FunctionType.TriggerSelect_Direct: + newEntity.AddParameter("Changed_to_0", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Changed_to_1", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Changed_to_2", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Changed_to_3", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Changed_to_4", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Changed_to_5", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Changed_to_6", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Changed_to_7", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Changed_to_8", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Changed_to_9", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Changed_to_10", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Changed_to_11", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Changed_to_12", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Changed_to_13", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Changed_to_14", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Changed_to_15", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Changed_to_16", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Object_0", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("Object_1", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("Object_2", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("Object_3", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("Object_4", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("Object_5", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("Object_6", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("Object_7", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("Object_8", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("Object_9", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("Object_10", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("Object_11", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("Object_12", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("Object_13", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("Object_14", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("Object_15", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("Object_16", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("Result", new cFloat(), ParameterVariant.OUTPUT); //Object + newEntity.AddParameter("TriggeredIndex", new cInteger(), ParameterVariant.OUTPUT); //int + newEntity.AddParameter("Changes_only", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.TriggerCheckDifficulty: + newEntity.AddParameter("on_success", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_failure", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("DifficultyLevel", new cEnum("DIFFICULTY_SETTING_TYPE", 2), ParameterVariant.PARAMETER); //DIFFICULTY_SETTING_TYPE + break; + case FunctionType.TriggerSync: + newEntity.AddParameter("Pin1_Synced", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Pin2_Synced", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Pin3_Synced", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Pin4_Synced", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Pin5_Synced", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Pin6_Synced", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Pin7_Synced", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Pin8_Synced", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Pin9_Synced", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Pin10_Synced", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("reset_on_trigger", new cBool(true), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.LogicAll: + newEntity.AddParameter("Pin1_Synced", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Pin2_Synced", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Pin3_Synced", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Pin4_Synced", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Pin5_Synced", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Pin6_Synced", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Pin7_Synced", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Pin8_Synced", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Pin9_Synced", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Pin10_Synced", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("num", new cInteger(1), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("reset_on_trigger", new cBool(true), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.Logic_MultiGate: + newEntity.AddParameter("Underflow", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Pin_1", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Pin_2", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Pin_3", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Pin_4", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Pin_5", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Pin_6", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Pin_7", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Pin_8", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Pin_9", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Pin_10", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Pin_11", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Pin_12", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Pin_13", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Pin_14", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Pin_15", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Pin_16", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Pin_17", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Pin_18", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Pin_19", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Pin_20", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Overflow", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("trigger_pin", new cInteger(1), ParameterVariant.PARAMETER); //int + break; + case FunctionType.Counter: + newEntity.AddParameter("on_under_limit", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_limit", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_over_limit", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Count", new cInteger(), ParameterVariant.OUTPUT); //int + newEntity.AddParameter("is_limitless", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("trigger_limit", new cInteger(1), ParameterVariant.PARAMETER); //int + break; + case FunctionType.LogicCounter: + newEntity.AddParameter("on_under_limit", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_limit", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_over_limit", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("restored_on_under_limit", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("restored_on_limit", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("restored_on_over_limit", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Count", new cInteger(), ParameterVariant.OUTPUT); //int + newEntity.AddParameter("is_limitless", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("trigger_limit", new cInteger(1), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("non_persistent", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.LogicPressurePad: + newEntity.AddParameter("Pad_Activated", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Pad_Deactivated", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("bound_characters", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Limit", new cInteger(1), ParameterVariant.INPUT); //int + newEntity.AddParameter("Count", new cInteger(), ParameterVariant.OUTPUT); //int + break; + case FunctionType.SetObject: + newEntity.AddParameter("Input", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("Output", new cFloat(), ParameterVariant.OUTPUT); //Object + break; + case FunctionType.GateResourceInterface: + newEntity.AddParameter("gate_status_changed", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("request_open_on_reset", new cBool(false), ParameterVariant.INPUT); //bool + newEntity.AddParameter("request_lock_on_reset", new cBool(false), ParameterVariant.INPUT); //bool + newEntity.AddParameter("force_open_on_reset", new cBool(false), ParameterVariant.INPUT); //bool + newEntity.AddParameter("force_close_on_reset", new cBool(false), ParameterVariant.INPUT); //bool + newEntity.AddParameter("is_auto", new cBool(false), ParameterVariant.INPUT); //bool + newEntity.AddParameter("auto_close_delay", new cFloat(0.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("is_open", new cBool(), ParameterVariant.OUTPUT); //bool + newEntity.AddParameter("is_locked", new cBool(), ParameterVariant.OUTPUT); //bool + newEntity.AddParameter("gate_status", new cInteger(), ParameterVariant.OUTPUT); //int + break; + case FunctionType.Door: + newEntity.AddParameter("started_opening", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("started_closing", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("finished_opening", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("finished_closing", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("used_locked", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("used_unlocked", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("used_forced_open", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("used_forced_closed", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("waiting_to_open", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("highlight", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("unhighlight", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("zone_link", new cFloat(), ParameterVariant.INPUT); //ZoneLinkPtr + newEntity.AddParameter("animation", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.ANIMATED_MODEL) }.ToList(), newEntity.shortGUID), ParameterVariant.INPUT); //ANIMATED_MODEL + newEntity.AddParameter("trigger_filter", new cBool(true), ParameterVariant.INPUT); //bool + newEntity.AddParameter("icon_pos", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("icon_usable_radius", new cFloat(), ParameterVariant.INPUT); //float + newEntity.AddParameter("show_icon_when_locked", new cBool(true), ParameterVariant.INPUT); //bool + newEntity.AddParameter("nav_mesh", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.NAV_MESH_BARRIER_RESOURCE) }.ToList(), newEntity.shortGUID), ParameterVariant.INPUT); //NAV_MESH_BARRIER_RESOURCE + newEntity.AddParameter("wait_point_1", new cInteger(), ParameterVariant.INPUT); //int + newEntity.AddParameter("wait_point_2", new cInteger(), ParameterVariant.INPUT); //int + newEntity.AddParameter("geometry", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("is_scripted", new cBool(false), ParameterVariant.INPUT); //bool + newEntity.AddParameter("wait_to_open", new cBool(false), ParameterVariant.INPUT); //bool + newEntity.AddParameter("is_waiting", new cBool(), ParameterVariant.OUTPUT); //bool + newEntity.AddParameter("unlocked_text", new cString(" "), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("locked_text", new cString(" "), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("icon_keyframe", new cEnum("UI_ICON_ICON", 0), ParameterVariant.PARAMETER); //UI_ICON_ICON + newEntity.AddParameter("detach_anim", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("invert_nav_mesh_barrier", new cBool(), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.MonitorPadInput: + newEntity.AddParameter("on_pressed_A", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_released_A", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_pressed_B", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_released_B", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_pressed_X", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_released_X", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_pressed_Y", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_released_Y", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_pressed_L1", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_released_L1", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_pressed_R1", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_released_R1", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_pressed_L2", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_released_L2", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_pressed_R2", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_released_R2", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_pressed_L3", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_released_L3", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_pressed_R3", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_released_R3", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_dpad_left", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_released_dpad_left", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_dpad_right", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_released_dpad_right", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_dpad_up", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_released_dpad_up", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_dpad_down", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_released_dpad_down", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("left_stick_x", new cFloat(), ParameterVariant.OUTPUT); //float + newEntity.AddParameter("left_stick_y", new cFloat(), ParameterVariant.OUTPUT); //float + newEntity.AddParameter("right_stick_x", new cFloat(), ParameterVariant.OUTPUT); //float + newEntity.AddParameter("right_stick_y", new cFloat(), ParameterVariant.OUTPUT); //float + break; + case FunctionType.MonitorActionMap: + newEntity.AddParameter("on_pressed_use", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_released_use", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_pressed_crouch", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_released_crouch", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_pressed_run", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_released_run", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_pressed_aim", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_released_aim", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_pressed_shoot", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_released_shoot", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_pressed_reload", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_released_reload", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_pressed_melee", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_released_melee", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_pressed_activate_item", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_released_activate_item", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_pressed_switch_weapon", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_released_switch_weapon", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_pressed_change_dof_focus", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_released_change_dof_focus", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_pressed_select_motion_tracker", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_released_select_motion_tracker", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_pressed_select_torch", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_released_select_torch", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_pressed_torch_beam", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_released_torch_beam", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_pressed_peek", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_released_peek", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_pressed_back_close", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_released_back_close", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("movement_stick_x", new cFloat(), ParameterVariant.OUTPUT); //float + newEntity.AddParameter("movement_stick_y", new cFloat(), ParameterVariant.OUTPUT); //float + newEntity.AddParameter("camera_stick_x", new cFloat(), ParameterVariant.OUTPUT); //float + newEntity.AddParameter("camera_stick_y", new cFloat(), ParameterVariant.OUTPUT); //float + newEntity.AddParameter("mouse_x", new cFloat(), ParameterVariant.OUTPUT); //float + newEntity.AddParameter("mouse_y", new cFloat(), ParameterVariant.OUTPUT); //float + newEntity.AddParameter("analog_aim", new cFloat(), ParameterVariant.OUTPUT); //float + newEntity.AddParameter("analog_shoot", new cFloat(), ParameterVariant.OUTPUT); //float + break; + case FunctionType.PadLightBar: + newEntity.AddParameter("colour", new cVector3(), ParameterVariant.PARAMETER); //Direction + break; + case FunctionType.PadRumbleImpulse: + newEntity.AddParameter("low_frequency_rumble", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("high_frequency_rumble", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("left_trigger_impulse", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("right_trigger_impulse", new cFloat(), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("aim_trigger_impulse", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("shoot_trigger_impulse", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.TriggerViewCone: + newEntity.AddParameter("enter", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("exit", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("target_is_visible", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("no_target_visible", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("target", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("fov", new cFloat(0.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("max_distance", new cFloat(15.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("aspect_ratio", new cFloat(1.777f), ParameterVariant.INPUT); //float + newEntity.AddParameter("source_position", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("filter", new cBool(true), ParameterVariant.INPUT); //bool + newEntity.AddParameter("intersect_with_geometry", new cBool(false), ParameterVariant.INPUT); //bool + newEntity.AddParameter("visible_target", new cFloat(), ParameterVariant.OUTPUT); //Object + newEntity.AddParameter("target_offset", new cTransform(), ParameterVariant.PARAMETER); //Position + newEntity.AddParameter("visible_area_type", new cEnum("VIEWCONE_TYPE", 1), ParameterVariant.PARAMETER); //VIEWCONE_TYPE + newEntity.AddParameter("visible_area_horizontal", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("visible_area_vertical", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("raycast_grace", new cFloat(0.5f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.TriggerCameraViewCone: + newEntity.AddParameter("enter", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("exit", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("target", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("fov", new cFloat(0.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("aspect_ratio", new cFloat(1.777f), ParameterVariant.INPUT); //float + newEntity.AddParameter("intersect_with_geometry", new cBool(false), ParameterVariant.INPUT); //bool + newEntity.AddParameter("use_camera_fov", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("target_offset", new cTransform(), ParameterVariant.PARAMETER); //Position + newEntity.AddParameter("visible_area_type", new cEnum("VIEWCONE_TYPE", 1), ParameterVariant.PARAMETER); //VIEWCONE_TYPE + newEntity.AddParameter("visible_area_horizontal", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("visible_area_vertical", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("raycast_grace", new cFloat(0.5f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.TriggerCameraViewConeMulti: + newEntity.AddParameter("enter", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("exit", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("enter1", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("exit1", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("enter2", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("exit2", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("enter3", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("exit3", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("enter4", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("exit4", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("enter5", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("exit5", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("enter6", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("exit6", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("enter7", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("exit7", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("enter8", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("exit8", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("enter9", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("exit9", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("target", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("target1", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("target2", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("target3", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("target4", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("target5", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("target6", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("target7", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("target8", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("target9", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("fov", new cFloat(0.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("aspect_ratio", new cFloat(1.777f), ParameterVariant.INPUT); //float + newEntity.AddParameter("intersect_with_geometry", new cBool(false), ParameterVariant.INPUT); //bool + newEntity.AddParameter("number_of_inputs", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("use_camera_fov", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("visible_area_type", new cEnum("VIEWCONE_TYPE", 1), ParameterVariant.PARAMETER); //VIEWCONE_TYPE + newEntity.AddParameter("visible_area_horizontal", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("visible_area_vertical", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("raycast_grace", new cFloat(0.5f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.TriggerCameraVolume: + newEntity.AddParameter("inside", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("enter", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("exit", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("inside_factor", new cFloat(), ParameterVariant.OUTPUT); //float + newEntity.AddParameter("lookat_factor", new cFloat(), ParameterVariant.OUTPUT); //float + newEntity.AddParameter("lookat_X_position", new cFloat(), ParameterVariant.OUTPUT); //float + newEntity.AddParameter("lookat_Y_position", new cFloat(), ParameterVariant.OUTPUT); //float + newEntity.AddParameter("start_radius", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("radius", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.NPC_Debug_Menu_Item: + newEntity.AddParameter("character", new cFloat(), ParameterVariant.INPUT); //Object + break; + case FunctionType.Character: + newEntity.AddParameter("finished_spawning", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("finished_respawning", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("dead_container_take_slot", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("dead_container_emptied", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_ragdoll_impact", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_footstep", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_despawn_requested", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("spawn_on_reset", new cBool(false), ParameterVariant.STATE); //bool + newEntity.AddParameter("show_on_reset", new cBool(false), ParameterVariant.STATE); //bool + newEntity.AddParameter("contents_of_dead_container", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.INVENTORY_ITEM_QUANTITY) }.ToList(), newEntity.shortGUID), ParameterVariant.INPUT); //INVENTORY_ITEM_QUANTITY + newEntity.AddParameter("PopToNavMesh", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("is_cinematic", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("disable_dead_container", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("allow_container_without_death", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("container_interaction_text", new cString(" "), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("anim_set", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.ANIM_SET) }.ToList(), newEntity.shortGUID), ParameterVariant.PARAMETER); //ANIM_SET + newEntity.AddParameter("anim_tree_set", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.ANIM_TREE_SET) }.ToList(), newEntity.shortGUID), ParameterVariant.PARAMETER); //ANIM_TREE_SET + newEntity.AddParameter("attribute_set", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.ATTRIBUTE_SET) }.ToList(), newEntity.shortGUID), ParameterVariant.PARAMETER); //ATTRIBUTE_SET + newEntity.AddParameter("is_player", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("is_backstage", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("force_backstage_on_respawn", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("character_class", new cEnum("CHARACTER_CLASS", 3), ParameterVariant.PARAMETER); //CHARACTER_CLASS + newEntity.AddParameter("alliance_group", new cEnum("ALLIANCE_GROUP", 0), ParameterVariant.PARAMETER); //ALLIANCE_GROUP + newEntity.AddParameter("dialogue_voice", new cEnum("DIALOGUE_VOICE_ACTOR", 0), ParameterVariant.PARAMETER); //DIALOGUE_VOICE_ACTOR + newEntity.AddParameter("spawn_id", new cInteger(0), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("position", new cTransform(), ParameterVariant.PARAMETER); //Position + newEntity.AddParameter("display_model", new cString(" "), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("reference_skeleton", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.CHR_SKELETON_SET) }.ToList(), newEntity.shortGUID), ParameterVariant.PARAMETER); //CHR_SKELETON_SET + newEntity.AddParameter("torso_sound", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.SOUND_TORSO_GROUP) }.ToList(), newEntity.shortGUID), ParameterVariant.PARAMETER); //SOUND_TORSO_GROUP + newEntity.AddParameter("leg_sound", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.SOUND_LEG_GROUP) }.ToList(), newEntity.shortGUID), ParameterVariant.PARAMETER); //SOUND_LEG_GROUP + newEntity.AddParameter("footwear_sound", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.SOUND_FOOTWEAR_GROUP) }.ToList(), newEntity.shortGUID), ParameterVariant.PARAMETER); //SOUND_FOOTWEAR_GROUP + newEntity.AddParameter("custom_character_type", new cEnum("CUSTOM_CHARACTER_TYPE", 0), ParameterVariant.PARAMETER); //CUSTOM_CHARACTER_TYPE + newEntity.AddParameter("custom_character_accessory_override", new cEnum("CUSTOM_CHARACTER_ACCESSORY_OVERRIDE", 0), ParameterVariant.PARAMETER); //CUSTOM_CHARACTER_ACCESSORY_OVERRIDE + newEntity.AddParameter("custom_character_population_type", new cEnum("CUSTOM_CHARACTER_POPULATION", 0), ParameterVariant.PARAMETER); //CUSTOM_CHARACTER_POPULATION + newEntity.AddParameter("named_custom_character", new cString(""), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("named_custom_character_assets_set", new cEnum("CUSTOM_CHARACTER_ASSETS", 0), ParameterVariant.PARAMETER); //CUSTOM_CHARACTER_ASSETS + newEntity.AddParameter("gcip_distribution_bias", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("inventory_set", new cEnum("PLAYER_INVENTORY_SET", 0), ParameterVariant.PARAMETER); //PLAYER_INVENTORY_SET + break; + case FunctionType.RegisterCharacterModel: + newEntity.AddParameter("display_model", new cString(""), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("reference_skeleton", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.CHR_SKELETON_SET) }.ToList(), newEntity.shortGUID), ParameterVariant.PARAMETER); //CHR_SKELETON_SET + break; + case FunctionType.DespawnPlayer: + newEntity.AddParameter("despawned", new cFloat(), ParameterVariant.TARGET); // + break; + case FunctionType.DespawnCharacter: + newEntity.AddParameter("despawned", new cFloat(), ParameterVariant.TARGET); // + break; + case FunctionType.FilterAnd: + newEntity.AddParameter("filter", new cBool(), ParameterVariant.INPUT); //bool + break; + case FunctionType.FilterOr: + newEntity.AddParameter("filter", new cBool(), ParameterVariant.INPUT); //bool + break; + case FunctionType.FilterNot: + newEntity.AddParameter("filter", new cBool(true), ParameterVariant.INPUT); //bool + break; + case FunctionType.FilterIsEnemyOfCharacter: + newEntity.AddParameter("Character", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("use_alliance_at_death", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.FilterIsEnemyOfAllianceGroup: + newEntity.AddParameter("alliance_group", new cEnum("ALLIANCE_GROUP", 0), ParameterVariant.PARAMETER); //ALLIANCE_GROUP + break; + case FunctionType.FilterIsPhysicsObject: + newEntity.AddParameter("object", new cFloat(), ParameterVariant.INPUT); //Object + break; + case FunctionType.FilterIsObject: + newEntity.AddParameter("objects", new cFloat(), ParameterVariant.INPUT); //Object + break; + case FunctionType.FilterIsCharacter: + newEntity.AddParameter("character", new cFloat(), ParameterVariant.INPUT); //Object + break; + case FunctionType.FilterIsFacingTarget: + newEntity.AddParameter("target", new cVector3(), ParameterVariant.INPUT); //Direction + newEntity.AddParameter("tolerance", new cFloat(45.0f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.FilterBelongsToAlliance: + newEntity.AddParameter("alliance_group", new cEnum("ALLIANCE_GROUP", 0), ParameterVariant.PARAMETER); //ALLIANCE_GROUP + break; + case FunctionType.FilterHasWeaponOfType: + newEntity.AddParameter("weapon_type", new cEnum("WEAPON_TYPE", 0), ParameterVariant.PARAMETER); //WEAPON_TYPE + break; + case FunctionType.FilterHasWeaponEquipped: + newEntity.AddParameter("weapon_type", new cEnum("WEAPON_TYPE", 0), ParameterVariant.PARAMETER); //WEAPON_TYPE + break; + case FunctionType.FilterIsinInventory: + newEntity.AddParameter("ItemName", new cString(" "), ParameterVariant.INPUT); //String + break; + case FunctionType.FilterIsCharacterClass: + newEntity.AddParameter("character_class", new cEnum("CHARACTER_CLASS", 3), ParameterVariant.PARAMETER); //CHARACTER_CLASS + break; + case FunctionType.FilterIsCharacterClassCombo: + newEntity.AddParameter("character_classes", new cEnum("CHARACTER_CLASS_COMBINATION", 1023), ParameterVariant.PARAMETER); //CHARACTER_CLASS_COMBINATION + break; + case FunctionType.FilterIsInAlertnessState: + newEntity.AddParameter("AlertState", new cEnum("ALERTNESS_STATE", 0), ParameterVariant.PARAMETER); //ALERTNESS_STATE + break; + case FunctionType.FilterIsInLocomotionState: + newEntity.AddParameter("State", new cEnum("LOCOMOTION_STATE", 0), ParameterVariant.PARAMETER); //LOCOMOTION_STATE + break; + case FunctionType.FilterCanSeeTarget: + newEntity.AddParameter("Target", new cFloat(), ParameterVariant.INPUT); //Object + break; + case FunctionType.FilterIsAgressing: + newEntity.AddParameter("Target", new cFloat(), ParameterVariant.INPUT); //Object + break; + case FunctionType.FilterIsValidInventoryItem: + newEntity.AddParameter("item", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.INVENTORY_ITEM_QUANTITY) }.ToList(), newEntity.shortGUID), ParameterVariant.INPUT); //INVENTORY_ITEM_QUANTITY + break; + case FunctionType.FilterIsInWeaponRange: + newEntity.AddParameter("weapon_owner", new cFloat(), ParameterVariant.INPUT); //Object + break; + case FunctionType.TriggerWhenSeeTarget: + newEntity.AddParameter("seen", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Target", new cFloat(), ParameterVariant.INPUT); //Object + break; + case FunctionType.FilterIsPlatform: + newEntity.AddParameter("Platform", new cEnum("PLATFORM_TYPE", 5), ParameterVariant.PARAMETER); //PLATFORM_TYPE + break; + case FunctionType.FilterIsUsingDevice: + newEntity.AddParameter("Device", new cEnum("INPUT_DEVICE_TYPE", 0), ParameterVariant.PARAMETER); //INPUT_DEVICE_TYPE + break; + case FunctionType.FilterSmallestUsedDifficulty: + newEntity.AddParameter("difficulty", new cEnum("DIFFICULTY_SETTING_TYPE", 2), ParameterVariant.PARAMETER); //DIFFICULTY_SETTING_TYPE + break; + case FunctionType.FilterHasPlayerCollectedIdTag: + newEntity.AddParameter("tag_id", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.IDTAG_ID) }.ToList(), newEntity.shortGUID), ParameterVariant.PARAMETER); //IDTAG_ID + break; + case FunctionType.FilterHasBehaviourTreeFlagSet: + newEntity.AddParameter("BehaviourTreeFlag", new cEnum("BEHAVIOUR_TREE_FLAGS", 2), ParameterVariant.PARAMETER); //BEHAVIOUR_TREE_FLAGS + break; + case FunctionType.Job: + newEntity.AddParameter("start_on_reset", new cBool(true), ParameterVariant.STATE); //bool + break; + case FunctionType.JOB_Idle: + newEntity.AddParameter("task_operation_mode", new cEnum("TASK_OPERATION_MODE", 0), ParameterVariant.PARAMETER); //TASK_OPERATION_MODE + newEntity.AddParameter("should_perform_all_tasks", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.JOB_SpottingPosition: + newEntity.AddParameter("SpottingPosition", new cTransform(), ParameterVariant.INPUT); //Position + break; + case FunctionType.Task: + newEntity.AddParameter("start_command", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("selected_by_npc", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("clean_up", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("start_on_reset", new cBool(true), ParameterVariant.STATE); //bool + newEntity.AddParameter("Job", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("TaskPosition", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("filter", new cBool(true), ParameterVariant.INPUT); //bool + newEntity.AddParameter("should_stop_moving_when_reached", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("should_orientate_when_reached", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("reached_distance_threshold", new cFloat(0.6f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("selection_priority", new cEnum("TASK_PRIORITY", 0), ParameterVariant.PARAMETER); //TASK_PRIORITY + newEntity.AddParameter("timeout", new cFloat(5.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("always_on_tracker", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.FlareTask: + newEntity.AddParameter("specific_character", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("filter_options", new cEnum("TASK_CHARACTER_CLASS_FILTER", 1024), ParameterVariant.PARAMETER); //TASK_CHARACTER_CLASS_FILTER + break; + case FunctionType.IdleTask: + newEntity.AddParameter("start_pre_move", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("start_interrupt", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("interrupted_while_moving", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("specific_character", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("should_auto_move_to_position", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("ignored_for_auto_selection", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("has_pre_move_script", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("has_interrupt_script", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("filter_options", new cEnum("TASK_CHARACTER_CLASS_FILTER", 1024), ParameterVariant.PARAMETER); //TASK_CHARACTER_CLASS_FILTER + break; + case FunctionType.FollowTask: + newEntity.AddParameter("can_initially_end_early", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("stop_radius", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.NPC_ForceNextJob: + newEntity.AddParameter("job_started", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("job_completed", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("job_interrupted", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("ShouldInterruptCurrentTask", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("Job", new cFloat(), ParameterVariant.PARAMETER); //Object + newEntity.AddParameter("InitialTask", new cFloat(), ParameterVariant.PARAMETER); //Object + break; + case FunctionType.NPC_SetRateOfFire: + newEntity.AddParameter("MinTimeBetweenShots", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("RandomRange", new cFloat(0.5f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.NPC_SetFiringRhythm: + newEntity.AddParameter("MinShootingTime", new cFloat(3.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("RandomRangeShootingTime", new cFloat(2.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("MinNonShootingTime", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("RandomRangeNonShootingTime", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("MinCoverNonShootingTime", new cFloat(3.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("RandomRangeCoverNonShootingTime", new cFloat(2.0f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.NPC_SetFiringAccuracy: + newEntity.AddParameter("Accuracy", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.TriggerBindAllNPCs: + newEntity.AddParameter("npc_inside", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("npc_outside", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("filter", new cBool(true), ParameterVariant.INPUT); //bool + newEntity.AddParameter("centre", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("radius", new cFloat(10.0f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.Trigger_AudioOccluded: + newEntity.AddParameter("NotOccluded", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Occluded", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("position", new cTransform(), ParameterVariant.PARAMETER); //Position + newEntity.AddParameter("Range", new cFloat(30.0f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.SwitchLevel: + newEntity.AddParameter("level_name", new cString(""), ParameterVariant.PARAMETER); //String + break; + case FunctionType.SoundPlaybackBaseClass: + newEntity.AddParameter("on_finished", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("attached_sound_object", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.SOUND_OBJECT) }.ToList(), newEntity.shortGUID), ParameterVariant.INPUT); //SOUND_OBJECT + newEntity.AddParameter("sound_event", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.SOUND_EVENT) }.ToList(), newEntity.shortGUID), ParameterVariant.PARAMETER); //SOUND_EVENT + newEntity.AddParameter("is_occludable", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("argument_1", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.SOUND_ARGUMENT) }.ToList(), newEntity.shortGUID), ParameterVariant.PARAMETER); //SOUND_ARGUMENT + newEntity.AddParameter("argument_2", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.SOUND_ARGUMENT) }.ToList(), newEntity.shortGUID), ParameterVariant.PARAMETER); //SOUND_ARGUMENT + newEntity.AddParameter("argument_3", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.SOUND_ARGUMENT) }.ToList(), newEntity.shortGUID), ParameterVariant.PARAMETER); //SOUND_ARGUMENT + newEntity.AddParameter("argument_4", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.SOUND_ARGUMENT) }.ToList(), newEntity.shortGUID), ParameterVariant.PARAMETER); //SOUND_ARGUMENT + newEntity.AddParameter("argument_5", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.SOUND_ARGUMENT) }.ToList(), newEntity.shortGUID), ParameterVariant.PARAMETER); //SOUND_ARGUMENT + newEntity.AddParameter("namespace", new cString(""), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("object_position", new cTransform(), ParameterVariant.PARAMETER); //Position + newEntity.AddParameter("restore_on_checkpoint", new cBool(true), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.Sound: + newEntity.AddParameter("stop_event", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.SOUND_EVENT) }.ToList(), newEntity.shortGUID), ParameterVariant.PARAMETER); //SOUND_EVENT + newEntity.AddParameter("is_static_ambience", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("start_on", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("multi_trigger", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("use_multi_emitter", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("create_sound_object", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("position", new cTransform(), ParameterVariant.PARAMETER); //Position + newEntity.AddParameter("switch_name", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.SOUND_SWITCH) }.ToList(), newEntity.shortGUID), ParameterVariant.PARAMETER); //SOUND_SWITCH + newEntity.AddParameter("switch_value", new cString(" "), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("last_gen_enabled", new cBool(), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("resume_after_suspended", new cBool(true), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.Speech: + newEntity.AddParameter("on_speech_started", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("character", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("alt_character", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("speech_priority", new cEnum("SPEECH_PRIORITY", 2), ParameterVariant.PARAMETER); //SPEECH_PRIORITY + newEntity.AddParameter("queue_time", new cFloat(4.0f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.NPC_DynamicDialogueGlobalRange: + newEntity.AddParameter("dialogue_range", new cFloat(35.0f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.CHR_PlayNPCBark: + newEntity.AddParameter("on_speech_started", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_speech_finished", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("queue_time", new cFloat(4.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("sound_event", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.SOUND_EVENT) }.ToList(), newEntity.shortGUID), ParameterVariant.PARAMETER); //SOUND_EVENT + newEntity.AddParameter("speech_priority", new cEnum("SPEECH_PRIORITY", 0), ParameterVariant.PARAMETER); //SPEECH_PRIORITY + newEntity.AddParameter("dialogue_mode", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.SOUND_ARGUMENT) }.ToList(), newEntity.shortGUID), ParameterVariant.PARAMETER); //SOUND_ARGUMENT + newEntity.AddParameter("action", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.SOUND_ARGUMENT) }.ToList(), newEntity.shortGUID), ParameterVariant.PARAMETER); //SOUND_ARGUMENT + break; + case FunctionType.SpeechScript: + newEntity.AddParameter("on_script_ended", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("character_01", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("character_02", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("character_03", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("character_04", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("character_05", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("alt_character_01", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("alt_character_02", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("alt_character_03", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("alt_character_04", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("alt_character_05", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("speech_priority", new cEnum("SPEECH_PRIORITY", 2), ParameterVariant.PARAMETER); //SPEECH_PRIORITY + newEntity.AddParameter("is_occludable", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("line_01_event", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.SOUND_EVENT) }.ToList(), newEntity.shortGUID), ParameterVariant.PARAMETER); //SOUND_EVENT + newEntity.AddParameter("line_01_character", new cInteger(1), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("line_02_delay", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("line_02_event", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.SOUND_EVENT) }.ToList(), newEntity.shortGUID), ParameterVariant.PARAMETER); //SOUND_EVENT + newEntity.AddParameter("line_02_character", new cInteger(1), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("line_03_delay", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("line_03_event", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.SOUND_EVENT) }.ToList(), newEntity.shortGUID), ParameterVariant.PARAMETER); //SOUND_EVENT + newEntity.AddParameter("line_03_character", new cInteger(1), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("line_04_delay", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("line_04_event", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.SOUND_EVENT) }.ToList(), newEntity.shortGUID), ParameterVariant.PARAMETER); //SOUND_EVENT + newEntity.AddParameter("line_04_character", new cInteger(1), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("line_05_delay", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("line_05_event", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.SOUND_EVENT) }.ToList(), newEntity.shortGUID), ParameterVariant.PARAMETER); //SOUND_EVENT + newEntity.AddParameter("line_05_character", new cInteger(1), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("line_06_delay", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("line_06_event", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.SOUND_EVENT) }.ToList(), newEntity.shortGUID), ParameterVariant.PARAMETER); //SOUND_EVENT + newEntity.AddParameter("line_06_character", new cInteger(1), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("line_07_delay", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("line_07_event", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.SOUND_EVENT) }.ToList(), newEntity.shortGUID), ParameterVariant.PARAMETER); //SOUND_EVENT + newEntity.AddParameter("line_07_character", new cInteger(1), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("line_08_delay", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("line_08_event", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.SOUND_EVENT) }.ToList(), newEntity.shortGUID), ParameterVariant.PARAMETER); //SOUND_EVENT + newEntity.AddParameter("line_08_character", new cInteger(1), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("line_09_delay", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("line_09_event", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.SOUND_EVENT) }.ToList(), newEntity.shortGUID), ParameterVariant.PARAMETER); //SOUND_EVENT + newEntity.AddParameter("line_09_character", new cInteger(1), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("line_10_delay", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("line_10_event", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.SOUND_EVENT) }.ToList(), newEntity.shortGUID), ParameterVariant.PARAMETER); //SOUND_EVENT + newEntity.AddParameter("line_10_character", new cInteger(1), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("restore_on_checkpoint", new cBool(true), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.SoundNetworkNode: + newEntity.AddParameter("position", new cTransform(), ParameterVariant.PARAMETER); //Position + break; + case FunctionType.SoundEnvironmentMarker: + newEntity.AddParameter("reverb_name", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.SOUND_REVERB) }.ToList(), newEntity.shortGUID), ParameterVariant.PARAMETER); //SOUND_REVERB + newEntity.AddParameter("on_enter_event", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.SOUND_EVENT) }.ToList(), newEntity.shortGUID), ParameterVariant.PARAMETER); //SOUND_EVENT + newEntity.AddParameter("on_exit_event", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.SOUND_EVENT) }.ToList(), newEntity.shortGUID), ParameterVariant.PARAMETER); //SOUND_EVENT + newEntity.AddParameter("linked_network_occlusion_scaler", new cFloat(), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("room_size", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.SOUND_STATE) }.ToList(), newEntity.shortGUID), ParameterVariant.PARAMETER); //SOUND_STATE + newEntity.AddParameter("disable_network_creation", new cBool(), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("position", new cTransform(), ParameterVariant.PARAMETER); //Position + break; + case FunctionType.SoundEnvironmentZone: + newEntity.AddParameter("reverb_name", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.SOUND_REVERB) }.ToList(), newEntity.shortGUID), ParameterVariant.PARAMETER); //SOUND_REVERB + newEntity.AddParameter("priority", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("position", new cTransform(), ParameterVariant.PARAMETER); //Position + newEntity.AddParameter("half_dimensions", new cVector3(), ParameterVariant.PARAMETER); //Direction + break; + case FunctionType.SoundLoadBank: + newEntity.AddParameter("bank_loaded", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("sound_bank", new cString(""), ParameterVariant.INPUT); //String + newEntity.AddParameter("trigger_via_pin", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("memory_pool", new cEnum("SOUND_POOL", 0), ParameterVariant.PARAMETER); //SOUND_POOL + break; + case FunctionType.SoundLoadSlot: + newEntity.AddParameter("bank_loaded", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("sound_bank", new cString(" "), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("memory_pool", new cEnum("SOUND_POOL", 0), ParameterVariant.PARAMETER); //SOUND_POOL + break; + case FunctionType.SoundSetRTPC: + newEntity.AddParameter("rtpc_value", new cFloat(0.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("sound_object", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.SOUND_OBJECT) }.ToList(), newEntity.shortGUID), ParameterVariant.INPUT); //SOUND_OBJECT + newEntity.AddParameter("rtpc_name", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.SOUND_RTPC) }.ToList(), newEntity.shortGUID), ParameterVariant.PARAMETER); //SOUND_RTPC + newEntity.AddParameter("smooth_rate", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("start_on", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.SoundSetState: + newEntity.AddParameter("state_name", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.SOUND_STATE) }.ToList(), newEntity.shortGUID), ParameterVariant.PARAMETER); //SOUND_STATE + newEntity.AddParameter("state_value", new cString(" "), ParameterVariant.PARAMETER); //String + break; + case FunctionType.SoundSetSwitch: + newEntity.AddParameter("sound_object", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.SOUND_OBJECT) }.ToList(), newEntity.shortGUID), ParameterVariant.INPUT); //SOUND_OBJECT + newEntity.AddParameter("switch_name", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.SOUND_SWITCH) }.ToList(), newEntity.shortGUID), ParameterVariant.PARAMETER); //SOUND_SWITCH + newEntity.AddParameter("switch_value", new cString(" "), ParameterVariant.PARAMETER); //String + break; + case FunctionType.SoundImpact: + newEntity.AddParameter("sound_event", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.SOUND_EVENT) }.ToList(), newEntity.shortGUID), ParameterVariant.PARAMETER); //SOUND_EVENT + newEntity.AddParameter("is_occludable", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("argument_1", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.SOUND_ARGUMENT) }.ToList(), newEntity.shortGUID), ParameterVariant.PARAMETER); //SOUND_ARGUMENT + newEntity.AddParameter("argument_2", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.SOUND_ARGUMENT) }.ToList(), newEntity.shortGUID), ParameterVariant.PARAMETER); //SOUND_ARGUMENT + newEntity.AddParameter("argument_3", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.SOUND_ARGUMENT) }.ToList(), newEntity.shortGUID), ParameterVariant.PARAMETER); //SOUND_ARGUMENT + break; + case FunctionType.SoundBarrier: + newEntity.AddParameter("default_open", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("position", new cTransform(), ParameterVariant.PARAMETER); //Position + newEntity.AddParameter("half_dimensions", new cVector3(), ParameterVariant.PARAMETER); //Direction + newEntity.AddParameter("band_aid", new cBool(), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("override_value", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddResource(ResourceType.COLLISION_MAPPING); + break; + case FunctionType.MusicController: + newEntity.AddParameter("music_start_event", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.SOUND_EVENT) }.ToList(), newEntity.shortGUID), ParameterVariant.PARAMETER); //SOUND_EVENT + newEntity.AddParameter("music_end_event", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.SOUND_EVENT) }.ToList(), newEntity.shortGUID), ParameterVariant.PARAMETER); //SOUND_EVENT + newEntity.AddParameter("music_restart_event", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.SOUND_EVENT) }.ToList(), newEntity.shortGUID), ParameterVariant.PARAMETER); //SOUND_EVENT + newEntity.AddParameter("layer_control_rtpc", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.SOUND_PARAMETER) }.ToList(), newEntity.shortGUID), ParameterVariant.PARAMETER); //SOUND_PARAMETER + newEntity.AddParameter("smooth_rate", new cFloat(0.2f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("alien_max_distance", new cFloat(50.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("object_max_distance", new cFloat(50.0f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.MusicTrigger: + newEntity.AddParameter("on_triggered", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("connected_object", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("music_event", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.SOUND_EVENT) }.ToList(), newEntity.shortGUID), ParameterVariant.PARAMETER); //SOUND_EVENT + newEntity.AddParameter("smooth_rate", new cFloat(-1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("queue_time", new cFloat(), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("interrupt_all", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("trigger_once", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("rtpc_set_mode", new cEnum("MUSIC_RTPC_MODE", 0), ParameterVariant.PARAMETER); //MUSIC_RTPC_MODE + newEntity.AddParameter("rtpc_target_value", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("rtpc_duration", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("rtpc_set_return_mode", new cEnum("MUSIC_RTPC_MODE", 0), ParameterVariant.PARAMETER); //MUSIC_RTPC_MODE + newEntity.AddParameter("rtpc_return_value", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.SoundLevelInitialiser: + newEntity.AddParameter("auto_generate_networks", new cBool(), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("network_node_min_spacing", new cFloat(), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("network_node_max_visibility", new cFloat(), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("network_node_ceiling_height", new cFloat(), ParameterVariant.PARAMETER); //float + break; + case FunctionType.SoundMissionInitialiser: + newEntity.AddParameter("human_max_threat", new cFloat(0.7f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("android_max_threat", new cFloat(0.8f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("alien_max_threat", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.SoundRTPCController: + newEntity.AddParameter("stealth_default_on", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("threat_default_on", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.SoundTimelineTrigger: + newEntity.AddParameter("sound_event", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.SOUND_EVENT) }.ToList(), newEntity.shortGUID), ParameterVariant.PARAMETER); //SOUND_EVENT + newEntity.AddParameter("trigger_time", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.SoundPhysicsInitialiser: + newEntity.AddParameter("contact_max_timeout", new cFloat(0.33f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("contact_smoothing_attack_rate", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("contact_smoothing_decay_rate", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("contact_min_magnitude", new cFloat(0.01f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("contact_max_trigger_distance", new cFloat(25.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("impact_min_speed", new cFloat(0.2f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("impact_max_trigger_distance", new cFloat(10.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("ragdoll_min_timeout", new cFloat(0.25f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("ragdoll_min_speed", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.SoundPlayerFootwearOverride: + newEntity.AddParameter("footwear_sound", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.SOUND_FOOTWEAR_GROUP) }.ToList(), newEntity.shortGUID), ParameterVariant.PARAMETER); //SOUND_FOOTWEAR_GROUP + break; + case FunctionType.AddToInventory: + newEntity.AddParameter("success", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("fail", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("items", new cFloat(), ParameterVariant.INPUT); //Object + break; + case FunctionType.RemoveFromInventory: + newEntity.AddParameter("success", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("fail", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("items", new cFloat(), ParameterVariant.INPUT); //Object + break; + case FunctionType.LimitItemUse: + newEntity.AddParameter("enable_on_reset", new cBool(false), ParameterVariant.STATE); //bool + newEntity.AddParameter("items", new cFloat(), ParameterVariant.INPUT); //Object + break; + case FunctionType.PlayerHasItem: + newEntity.AddParameter("items", new cFloat(), ParameterVariant.INPUT); //Object + break; + case FunctionType.PlayerHasItemWithName: + newEntity.AddParameter("item_name", new cString(" "), ParameterVariant.INPUT); //String + break; + case FunctionType.PlayerHasItemEntity: + newEntity.AddParameter("success", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("fail", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("items", new cFloat(), ParameterVariant.INPUT); //Object + break; + case FunctionType.PlayerHasEnoughItems: + newEntity.AddParameter("items", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("quantity", new cInteger(1), ParameterVariant.PARAMETER); //int + break; + case FunctionType.PlayerHasSpaceForItem: + newEntity.AddParameter("items", new cFloat(), ParameterVariant.INPUT); //Object + break; + case FunctionType.InventoryItem: + newEntity.AddParameter("collect", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("itemName", new cString(""), ParameterVariant.INPUT); //String + newEntity.AddParameter("out_itemName", new cString(""), ParameterVariant.OUTPUT); //String + newEntity.AddParameter("out_quantity", new cInteger(), ParameterVariant.OUTPUT); //int + newEntity.AddParameter("item", new cString(" "), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("quantity", new cInteger(0), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("clear_on_collect", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("gcip_instances_count", new cInteger(1), ParameterVariant.PARAMETER); //int + break; + case FunctionType.GetInventoryItemName: + newEntity.AddParameter("item", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.INVENTORY_ITEM_QUANTITY) }.ToList(), newEntity.shortGUID), ParameterVariant.INPUT); //INVENTORY_ITEM_QUANTITY + newEntity.AddParameter("equippable_item", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.EQUIPPABLE_ITEM_INSTANCE) }.ToList(), newEntity.shortGUID), ParameterVariant.INPUT); //EQUIPPABLE_ITEM_INSTANCE + break; + case FunctionType.PickupSpawner: + newEntity.AddParameter("collect", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("spawn_on_reset", new cBool(true), ParameterVariant.STATE); //bool + newEntity.AddParameter("pos", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("item_name", new cString(" "), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("item_quantity", new cInteger(0), ParameterVariant.PARAMETER); //int + break; + case FunctionType.MultiplePickupSpawner: + newEntity.AddParameter("pos", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("item_name", new cString(" "), ParameterVariant.PARAMETER); //String + break; + case FunctionType.AddItemsToGCPool: + newEntity.AddParameter("items", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.INVENTORY_ITEM_QUANTITY) }.ToList(), newEntity.shortGUID), ParameterVariant.INPUT); //INVENTORY_ITEM_QUANTITY + break; + case FunctionType.SetupGCDistribution: + newEntity.AddParameter("c00", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("c01", new cFloat(0.969f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("c02", new cFloat(0.882f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("c03", new cFloat(0.754f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("c04", new cFloat(0.606f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("c05", new cFloat(0.457f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("c06", new cFloat(0.324f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("c07", new cFloat(0.216f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("c08", new cFloat(0.135f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("c09", new cFloat(0.079f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("c10", new cFloat(0.043f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("minimum_multiplier", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("divisor", new cFloat(20.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("lookup_decrease_time", new cFloat(15.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("lookup_point_increase", new cInteger(2), ParameterVariant.PARAMETER); //int + break; + case FunctionType.AllocateGCItemsFromPool: + newEntity.AddParameter("on_success", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_failure", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("items", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.INVENTORY_ITEM_QUANTITY) }.ToList(), newEntity.shortGUID), ParameterVariant.INPUT); //INVENTORY_ITEM_QUANTITY + newEntity.AddParameter("force_usage_count", new cInteger(0), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("distribution_bias", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.AllocateGCItemFromPoolBySubset: + newEntity.AddParameter("on_success", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_failure", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("selectable_items", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("item_name", new cString(""), ParameterVariant.OUTPUT); //String + newEntity.AddParameter("item_quantity", new cInteger(), ParameterVariant.OUTPUT); //int + newEntity.AddParameter("force_usage", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("distribution_bias", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.QueryGCItemPool: + newEntity.AddParameter("count", new cInteger(), ParameterVariant.OUTPUT); //int + newEntity.AddParameter("item_name", new cString(" "), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("item_quantity", new cInteger(0), ParameterVariant.PARAMETER); //int + break; + case FunctionType.RemoveFromGCItemPool: + newEntity.AddParameter("on_success", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_failure", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("item_name", new cString(" "), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("item_quantity", new cInteger(0), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("gcip_instances_to_remove", new cInteger(0), ParameterVariant.PARAMETER); //int + break; + case FunctionType.FlashScript: + newEntity.AddParameter("show_on_reset", new cBool(true), ParameterVariant.STATE); //bool + newEntity.AddParameter("filename", new cString(" "), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("layer_name", new cString(""), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("target_texture_name", new cString(" "), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("type", new cEnum("FLASH_SCRIPT_RENDER_TYPE", 0), ParameterVariant.PARAMETER); //FLASH_SCRIPT_RENDER_TYPE + break; + case FunctionType.UI_KeyGate: + newEntity.AddParameter("keycard_success", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("keycode_success", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("keycard_fail", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("keycode_fail", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("keycard_cancelled", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("keycode_cancelled", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("ui_breakout_triggered", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("lock_on_reset", new cBool(true), ParameterVariant.STATE); //bool + newEntity.AddParameter("light_on_reset", new cBool(true), ParameterVariant.STATE); //bool + newEntity.AddParameter("code", new cString(" "), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("carduid", new cInteger(0), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("key_type", new cEnum("UI_KEYGATE_TYPE", 1), ParameterVariant.PARAMETER); //UI_KEYGATE_TYPE + break; + case FunctionType.RTT_MoviePlayer: + newEntity.AddParameter("start", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("end", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("show_on_reset", new cBool(true), ParameterVariant.STATE); //bool + newEntity.AddParameter("filename", new cString(" "), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("layer_name", new cString(""), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("target_texture_name", new cString(" "), ParameterVariant.PARAMETER); //String + break; + case FunctionType.MoviePlayer: + newEntity.AddParameter("start", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("end", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("skipped", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("trigger_end_on_skipped", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("filename", new cString(" "), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("skippable", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("enable_debug_skip", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.DurangoVideoCapture: + newEntity.AddParameter("clip_name", new cString(" "), ParameterVariant.PARAMETER); //String + break; + case FunctionType.VideoCapture: + newEntity.AddParameter("clip_name", new cString(" "), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("only_in_capture_mode", new cBool(true), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.FlashInvoke: + newEntity.AddParameter("layer_name", new cString(" "), ParameterVariant.INPUT); //String + newEntity.AddParameter("mrtt_texture", new cString(" "), ParameterVariant.INPUT); //String + newEntity.AddParameter("method", new cString(" "), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("invoke_type", new cEnum("FLASH_INVOKE_TYPE", 0), ParameterVariant.PARAMETER); //FLASH_INVOKE_TYPE + newEntity.AddParameter("int_argument_0", new cInteger(0), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("int_argument_1", new cInteger(0), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("int_argument_2", new cInteger(0), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("int_argument_3", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("float_argument_0", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("float_argument_1", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("float_argument_2", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("float_argument_3", new cFloat(), ParameterVariant.PARAMETER); //float + break; + case FunctionType.MotionTrackerPing: + newEntity.AddParameter("FakePosition", new cTransform(), ParameterVariant.INPUT); //Position + break; + case FunctionType.FlashCallback: + newEntity.AddParameter("callback", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("callback_name", new cString(" "), ParameterVariant.PARAMETER); //String + break; + case FunctionType.PopupMessage: + newEntity.AddParameter("display", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("finished", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("header_text", new cString(" "), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("main_text", new cString(" "), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("duration", new cFloat(5.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("sound_event", new cEnum("POPUP_MESSAGE_SOUND", 1), ParameterVariant.PARAMETER); //POPUP_MESSAGE_SOUND + newEntity.AddParameter("icon_keyframe", new cEnum("POPUP_MESSAGE_ICON", 0), ParameterVariant.PARAMETER); //POPUP_MESSAGE_ICON + break; + case FunctionType.UIBreathingGameIcon: + newEntity.AddParameter("fill_percentage", new cInteger(0), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("prompt_text", new cString(" "), ParameterVariant.PARAMETER); //String + break; + case FunctionType.GenericHighlightEntity: + newEntity.AddParameter("highlight_geometry", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.RENDERABLE_INSTANCE) }.ToList(), newEntity.shortGUID), ParameterVariant.INPUT); //RENDERABLE_INSTANCE + break; + case FunctionType.UI_Icon: + newEntity.AddParameter("start", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("start_fail", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("button_released", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("broadcasted_start", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("highlight", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("unhighlight", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("lock_looked_at", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("lock_interaction", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("lock_on_reset", new cBool(false), ParameterVariant.STATE); //bool + newEntity.AddParameter("enable_on_reset", new cBool(false), ParameterVariant.STATE); //bool + newEntity.AddParameter("show_on_reset", new cBool(false), ParameterVariant.STATE); //bool + newEntity.AddParameter("geometry", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("highlight_geometry", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("target_pickup_item", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("highlight_distance_threshold", new cFloat(3.15f), ParameterVariant.INPUT); //float + newEntity.AddParameter("interaction_distance_threshold", new cFloat(), ParameterVariant.INPUT); //float + newEntity.AddParameter("icon_user", new cFloat(), ParameterVariant.OUTPUT); //Object + newEntity.AddParameter("unlocked_text", new cString(" "), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("locked_text", new cString(" "), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("action_text", new cString(""), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("icon_keyframe", new cEnum("UI_ICON_ICON", 0), ParameterVariant.PARAMETER); //UI_ICON_ICON + newEntity.AddParameter("can_be_used", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("category", new cEnum("PICKUP_CATEGORY", 0), ParameterVariant.PARAMETER); //PICKUP_CATEGORY + newEntity.AddParameter("push_hold_time", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.UI_Attached: + newEntity.AddParameter("closed", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("ui_icon", new cInteger(0), ParameterVariant.INPUT); //int + break; + case FunctionType.UI_Container: + newEntity.AddParameter("take_slot", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("emptied", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("contents", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.INVENTORY_ITEM_QUANTITY) }.ToList(), newEntity.shortGUID), ParameterVariant.INPUT); //INVENTORY_ITEM_QUANTITY + newEntity.AddParameter("has_been_used", new cBool(), ParameterVariant.OUTPUT); //bool + newEntity.AddParameter("is_persistent", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("is_temporary", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.UI_ReactionGame: + newEntity.AddParameter("success", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("fail", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("stage0_success", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("stage0_fail", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("stage1_success", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("stage1_fail", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("stage2_success", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("stage2_fail", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("ui_breakout_triggered", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("resources_finished_unloading", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("resources_finished_loading", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("completion_percentage", new cFloat(), ParameterVariant.OUTPUT); //float + newEntity.AddParameter("exit_on_fail", new cBool(true), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.UI_Keypad: + newEntity.AddParameter("success", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("fail", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("code", new cString(""), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("exit_on_fail", new cBool(), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.HackingGame: + newEntity.AddParameter("win", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("fail", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("alarm_triggered", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("closed", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("loaded_idle", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("loaded_success", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("ui_breakout_triggered", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("resources_finished_unloading", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("resources_finished_loading", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("lock_on_reset", new cBool(true), ParameterVariant.STATE); //bool + newEntity.AddParameter("light_on_reset", new cBool(true), ParameterVariant.STATE); //bool + newEntity.AddParameter("completion_percentage", new cFloat(), ParameterVariant.OUTPUT); //float + newEntity.AddParameter("hacking_difficulty", new cInteger(0), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("auto_exit", new cBool(true), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.SetHackingToolLevel: + newEntity.AddParameter("level", new cInteger(0), ParameterVariant.PARAMETER); //int + break; + case FunctionType.TerminalContent: + newEntity.AddParameter("selected", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("content_title", new cString(" "), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("content_decoration_title", new cString(" "), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("additional_info", new cString(" "), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("is_connected_to_audio_log", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("is_triggerable", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("is_single_use", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.TerminalFolder: + newEntity.AddParameter("code_success", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("code_fail", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("selected", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("lock_on_reset", new cBool(false), ParameterVariant.STATE); //bool + newEntity.AddParameter("content0", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.TERMINAL_CONTENT_DETAILS) }.ToList(), newEntity.shortGUID), ParameterVariant.INPUT); //TERMINAL_CONTENT_DETAILS + newEntity.AddParameter("content1", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.TERMINAL_CONTENT_DETAILS) }.ToList(), newEntity.shortGUID), ParameterVariant.INPUT); //TERMINAL_CONTENT_DETAILS + newEntity.AddParameter("code", new cString(" "), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("folder_title", new cString(" "), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("folder_lock_type", new cEnum("FOLDER_LOCK_TYPE", 1), ParameterVariant.PARAMETER); //FOLDER_LOCK_TYPE + break; + case FunctionType.AccessTerminal: + newEntity.AddParameter("closed", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("all_data_has_been_read", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("ui_breakout_triggered", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("light_on_reset", new cBool(true), ParameterVariant.STATE); //bool + newEntity.AddParameter("folder0", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.TERMINAL_FOLDER_DETAILS) }.ToList(), newEntity.shortGUID), ParameterVariant.INPUT); //TERMINAL_FOLDER_DETAILS + newEntity.AddParameter("folder1", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.TERMINAL_FOLDER_DETAILS) }.ToList(), newEntity.shortGUID), ParameterVariant.INPUT); //TERMINAL_FOLDER_DETAILS + newEntity.AddParameter("folder2", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.TERMINAL_FOLDER_DETAILS) }.ToList(), newEntity.shortGUID), ParameterVariant.INPUT); //TERMINAL_FOLDER_DETAILS + newEntity.AddParameter("folder3", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.TERMINAL_FOLDER_DETAILS) }.ToList(), newEntity.shortGUID), ParameterVariant.INPUT); //TERMINAL_FOLDER_DETAILS + newEntity.AddParameter("all_data_read", new cBool(), ParameterVariant.OUTPUT); //bool + newEntity.AddParameter("location", new cEnum("TERMINAL_LOCATION", 0), ParameterVariant.PARAMETER); //TERMINAL_LOCATION + break; + case FunctionType.SetGatingToolLevel: + newEntity.AddParameter("level", new cInteger(0), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("tool_type", new cEnum("GATING_TOOL_TYPE", 0), ParameterVariant.PARAMETER); //GATING_TOOL_TYPE + break; + case FunctionType.GetGatingToolLevel: + newEntity.AddParameter("level", new cInteger(), ParameterVariant.OUTPUT); //int + newEntity.AddParameter("tool_type", new cEnum("GATING_TOOL_TYPE", 0), ParameterVariant.PARAMETER); //GATING_TOOL_TYPE + break; + case FunctionType.GetPlayerHasGatingTool: + newEntity.AddParameter("has_tool", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("doesnt_have_tool", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("tool_type", new cEnum("GATING_TOOL_TYPE", 0), ParameterVariant.PARAMETER); //GATING_TOOL_TYPE + break; + case FunctionType.GetPlayerHasKeycard: + newEntity.AddParameter("has_card", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("doesnt_have_card", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("card_uid", new cInteger(0), ParameterVariant.PARAMETER); //int + break; + case FunctionType.SetPlayerHasKeycard: + newEntity.AddParameter("card_uid", new cInteger(0), ParameterVariant.PARAMETER); //int + break; + case FunctionType.SetPlayerHasGatingTool: + newEntity.AddParameter("tool_type", new cEnum("GATING_TOOL_TYPE", 0), ParameterVariant.PARAMETER); //GATING_TOOL_TYPE + break; + case FunctionType.CollectSevastopolLog: + newEntity.AddParameter("log_id", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.SEVASTOPOL_LOG_ID) }.ToList(), newEntity.shortGUID), ParameterVariant.PARAMETER); //SEVASTOPOL_LOG_ID + break; + case FunctionType.CollectNostromoLog: + newEntity.AddParameter("log_id", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.NOSTROMO_LOG_ID) }.ToList(), newEntity.shortGUID), ParameterVariant.PARAMETER); //NOSTROMO_LOG_ID + break; + case FunctionType.CollectIDTag: + newEntity.AddParameter("tag_id", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.IDTAG_ID) }.ToList(), newEntity.shortGUID), ParameterVariant.PARAMETER); //IDTAG_ID + break; + case FunctionType.StartNewChapter: + newEntity.AddParameter("chapter", new cInteger(), ParameterVariant.PARAMETER); //int + break; + case FunctionType.UnlockLogEntry: + newEntity.AddParameter("entry", new cInteger(), ParameterVariant.PARAMETER); //int + break; + case FunctionType.MapAnchor: + newEntity.AddParameter("map_north", new cVector3(), ParameterVariant.INPUT); //Direction + newEntity.AddParameter("map_pos", new cVector3(), ParameterVariant.INPUT); //Direction + newEntity.AddParameter("map_scale", new cFloat(1.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("keyframe", new cString(" "), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("keyframe1", new cString(" "), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("keyframe2", new cString(" "), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("keyframe3", new cString(" "), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("keyframe4", new cString(" "), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("keyframe5", new cString(" "), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("world_pos", new cTransform(), ParameterVariant.PARAMETER); //Position + newEntity.AddParameter("is_default_for_items", new cBool(true), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.MapItem: + newEntity.AddParameter("show_ui_on_reset", new cBool(false), ParameterVariant.STATE); //bool + newEntity.AddParameter("item_type", new cEnum("MAP_ICON_TYPE", 0), ParameterVariant.PARAMETER); //MAP_ICON_TYPE + newEntity.AddParameter("map_keyframe", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.MAP_KEYFRAME_ID) }.ToList(), newEntity.shortGUID), ParameterVariant.PARAMETER); //MAP_KEYFRAME_ID + break; + case FunctionType.UnlockMapDetail: + newEntity.AddParameter("map_keyframe", new cString(""), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("details", new cString(" "), ParameterVariant.PARAMETER); //String + break; + case FunctionType.RewireSystem: + newEntity.AddParameter("on", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("off", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("world_pos", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("display_name", new cString(""), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("display_name_enum", new cEnum("REWIRE_SYSTEM_NAME", 0), ParameterVariant.PARAMETER); //REWIRE_SYSTEM_NAME + newEntity.AddParameter("on_by_default", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("running_cost", new cInteger(0), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("system_type", new cEnum("REWIRE_SYSTEM_TYPE", 0), ParameterVariant.PARAMETER); //REWIRE_SYSTEM_TYPE + newEntity.AddParameter("map_name", new cString(" "), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("element_name", new cString(" "), ParameterVariant.PARAMETER); //String + break; + case FunctionType.RewireLocation: + newEntity.AddParameter("power_draw_increased", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("power_draw_reduced", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("systems", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.REWIRE_SYSTEM) }.ToList(), newEntity.shortGUID), ParameterVariant.INPUT); //REWIRE_SYSTEM + newEntity.AddParameter("element_name", new cString(" "), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("display_name", new cString(" "), ParameterVariant.PARAMETER); //String + break; + case FunctionType.RewireAccess_Point: + newEntity.AddParameter("closed", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("ui_breakout_triggered", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("interactive_locations", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.REWIRE_LOCATION) }.ToList(), newEntity.shortGUID), ParameterVariant.INPUT); //REWIRE_LOCATION + newEntity.AddParameter("visible_locations", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.REWIRE_LOCATION) }.ToList(), newEntity.shortGUID), ParameterVariant.INPUT); //REWIRE_LOCATION + newEntity.AddParameter("additional_power", new cInteger(0), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("display_name", new cString(""), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("map_element_name", new cString(" "), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("map_name", new cString(" "), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("map_x_offset", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("map_y_offset", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("map_zoom", new cFloat(3.0f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.RewireTotalPowerResource: + newEntity.AddParameter("total_power", new cInteger(0), ParameterVariant.PARAMETER); //int + break; + case FunctionType.Rewire: + newEntity.AddParameter("closed", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("locations", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.REWIRE_LOCATION) }.ToList(), newEntity.shortGUID), ParameterVariant.INPUT); //REWIRE_LOCATION + newEntity.AddParameter("access_points", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.REWIRE_ACCESS_POINT) }.ToList(), newEntity.shortGUID), ParameterVariant.INPUT); //REWIRE_ACCESS_POINT + newEntity.AddParameter("map_keyframe", new cString(""), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("total_power", new cInteger(), ParameterVariant.PARAMETER); //int + break; + case FunctionType.SetMotionTrackerRange: + newEntity.AddParameter("range", new cFloat(20.0f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.SetGamepadAxes: + newEntity.AddParameter("invert_x", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("invert_y", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("save_settings", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.SetGameplayTips: + newEntity.AddParameter("tip_string_id", new cString(" "), ParameterVariant.PARAMETER); //String + break; + case FunctionType.GameOver: + newEntity.AddParameter("tip_string_id", new cString(" "), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("default_tips_enabled", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("level_tips_enabled", new cBool(true), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.GameplayTip: + newEntity.AddParameter("string_id", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.GAMEPLAY_TIP_STRING_ID) }.ToList(), newEntity.shortGUID), ParameterVariant.PARAMETER); //GAMEPLAY_TIP_STRING_ID + break; + case FunctionType.Minigames: + newEntity.AddParameter("on_success", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_failure", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("game_inertial_damping_active", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("game_green_text_active", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("game_yellow_chart_active", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("game_overloc_fail_active", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("game_docking_active", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("game_environ_ctr_active", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("config_pass_number", new cInteger(1), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("config_fail_limit", new cInteger(1), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("config_difficulty", new cInteger(1), ParameterVariant.PARAMETER); //int + break; + case FunctionType.SetBlueprintInfo: + newEntity.AddParameter("type", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.BLUEPRINT_TYPE) }.ToList(), newEntity.shortGUID), ParameterVariant.PARAMETER); //BLUEPRINT_TYPE + newEntity.AddParameter("level", new cEnum("BLUEPRINT_LEVEL", 1), ParameterVariant.PARAMETER); //BLUEPRINT_LEVEL + newEntity.AddParameter("available", new cBool(true), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.GetBlueprintLevel: + newEntity.AddParameter("level", new cInteger(), ParameterVariant.OUTPUT); //int + newEntity.AddParameter("type", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.BLUEPRINT_TYPE) }.ToList(), newEntity.shortGUID), ParameterVariant.PARAMETER); //BLUEPRINT_TYPE + break; + case FunctionType.GetBlueprintAvailable: + newEntity.AddParameter("available", new cBool(), ParameterVariant.OUTPUT); //bool + newEntity.AddParameter("type", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.BLUEPRINT_TYPE) }.ToList(), newEntity.shortGUID), ParameterVariant.PARAMETER); //BLUEPRINT_TYPE + break; + case FunctionType.GetSelectedCharacterId: + newEntity.AddParameter("character_id", new cInteger(), ParameterVariant.OUTPUT); //int + break; + case FunctionType.GetNextPlaylistLevelName: + newEntity.AddParameter("level_name", new cString(""), ParameterVariant.OUTPUT); //String + break; + case FunctionType.IsPlaylistTypeSingle: + newEntity.AddParameter("single", new cBool(), ParameterVariant.OUTPUT); //bool + break; + case FunctionType.IsPlaylistTypeAll: + newEntity.AddParameter("all", new cBool(), ParameterVariant.OUTPUT); //bool + break; + case FunctionType.IsPlaylistTypeMarathon: + newEntity.AddParameter("marathon", new cBool(), ParameterVariant.OUTPUT); //bool + break; + case FunctionType.IsCurrentLevelAChallengeMap: + newEntity.AddParameter("challenge_map", new cBool(), ParameterVariant.OUTPUT); //bool + break; + case FunctionType.IsCurrentLevelAPreorderMap: + newEntity.AddParameter("preorder_map", new cBool(), ParameterVariant.OUTPUT); //bool + break; + case FunctionType.GetCurrentPlaylistLevelIndex: + newEntity.AddParameter("index", new cInteger(), ParameterVariant.OUTPUT); //int + break; + case FunctionType.SetObjectiveCompleted: + newEntity.AddParameter("objective_id", new cInteger(0), ParameterVariant.PARAMETER); //int + break; + case FunctionType.GoToFrontend: + newEntity.AddParameter("frontend_state", new cEnum("FRONTEND_STATE", 0), ParameterVariant.PARAMETER); //FRONTEND_STATE + break; + case FunctionType.TriggerLooper: + newEntity.AddParameter("target", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("count", new cInteger(1), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("delay", new cFloat(0.1f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.CoverLine: + newEntity.AddParameter("enable_on_reset", new cBool(true), ParameterVariant.STATE); //bool + newEntity.AddParameter("LinePath", new cSpline(), ParameterVariant.INPUT); //SPLINE + newEntity.AddParameter("low", new cBool(), ParameterVariant.INPUT); //bool + newEntity.AddResource(ResourceType.CATHODE_COVER_SEGMENT); + newEntity.AddParameter("LinePathPosition", new cTransform(), ParameterVariant.INTERNAL); //Position + break; + case FunctionType.TRAV_ContinuousLadder: + newEntity.AddParameter("OnEnter", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("OnExit", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("enable_on_reset", new cBool(true), ParameterVariant.STATE); //bool + newEntity.AddParameter("LinePath", new cSpline(), ParameterVariant.INPUT); //SPLINE + newEntity.AddParameter("InUse", new cBool(), ParameterVariant.OUTPUT); //bool + newEntity.AddParameter("RungSpacing", new cFloat(), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("character_classes", new cEnum("CHARACTER_CLASS_COMBINATION", 0), ParameterVariant.PARAMETER); //CHARACTER_CLASS_COMBINATION + break; + case FunctionType.TRAV_ContinuousPipe: + newEntity.AddParameter("OnEnter", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("OnExit", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("enable_on_reset", new cBool(true), ParameterVariant.STATE); //bool + newEntity.AddParameter("LinePath", new cSpline(), ParameterVariant.INPUT); //SPLINE + newEntity.AddParameter("InUse", new cBool(), ParameterVariant.OUTPUT); //bool + newEntity.AddParameter("character_classes", new cEnum("CHARACTER_CLASS_COMBINATION", 0), ParameterVariant.PARAMETER); //CHARACTER_CLASS_COMBINATION + break; + case FunctionType.TRAV_ContinuousLedge: + newEntity.AddParameter("OnEnter", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("OnExit", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("enable_on_reset", new cBool(true), ParameterVariant.STATE); //bool + newEntity.AddParameter("LinePath", new cSpline(), ParameterVariant.INPUT); //SPLINE + newEntity.AddParameter("InUse", new cBool(), ParameterVariant.OUTPUT); //bool + newEntity.AddParameter("Dangling", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.AUTODETECT) }.ToList(), newEntity.shortGUID), ParameterVariant.PARAMETER); //AUTODETECT + newEntity.AddParameter("Sidling", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.AUTODETECT) }.ToList(), newEntity.shortGUID), ParameterVariant.PARAMETER); //AUTODETECT + newEntity.AddParameter("character_classes", new cEnum("CHARACTER_CLASS_COMBINATION", 0), ParameterVariant.PARAMETER); //CHARACTER_CLASS_COMBINATION + break; + case FunctionType.TRAV_ContinuousClimbingWall: + newEntity.AddParameter("OnEnter", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("OnExit", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("LinePath", new cSpline(), ParameterVariant.INPUT); //SPLINE + newEntity.AddParameter("InUse", new cBool(), ParameterVariant.OUTPUT); //bool + newEntity.AddParameter("Dangling", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.AUTODETECT) }.ToList(), newEntity.shortGUID), ParameterVariant.PARAMETER); //AUTODETECT + newEntity.AddParameter("character_classes", new cEnum("CHARACTER_CLASS_COMBINATION", 0), ParameterVariant.PARAMETER); //CHARACTER_CLASS_COMBINATION + break; + case FunctionType.TRAV_ContinuousCinematicSidle: + newEntity.AddParameter("OnEnter", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("OnExit", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("enable_on_reset", new cBool(true), ParameterVariant.STATE); //bool + newEntity.AddParameter("LinePath", new cSpline(), ParameterVariant.INPUT); //SPLINE + newEntity.AddParameter("InUse", new cBool(), ParameterVariant.OUTPUT); //bool + newEntity.AddParameter("character_classes", new cEnum("CHARACTER_CLASS_COMBINATION", 0), ParameterVariant.PARAMETER); //CHARACTER_CLASS_COMBINATION + break; + case FunctionType.TRAV_ContinuousBalanceBeam: + newEntity.AddParameter("OnEnter", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("OnExit", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("enable_on_reset", new cBool(true), ParameterVariant.STATE); //bool + newEntity.AddParameter("LinePath", new cSpline(), ParameterVariant.INPUT); //SPLINE + newEntity.AddParameter("InUse", new cBool(), ParameterVariant.OUTPUT); //bool + newEntity.AddParameter("character_classes", new cEnum("CHARACTER_CLASS_COMBINATION", 0), ParameterVariant.PARAMETER); //CHARACTER_CLASS_COMBINATION + break; + case FunctionType.TRAV_ContinuousTightGap: + newEntity.AddParameter("OnEnter", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("OnExit", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("enable_on_reset", new cBool(true), ParameterVariant.STATE); //bool + newEntity.AddParameter("LinePath", new cSpline(), ParameterVariant.INPUT); //SPLINE + newEntity.AddParameter("InUse", new cBool(), ParameterVariant.OUTPUT); //bool + newEntity.AddParameter("character_classes", new cEnum("CHARACTER_CLASS_COMBINATION", 0), ParameterVariant.PARAMETER); //CHARACTER_CLASS_COMBINATION + break; + case FunctionType.TRAV_1ShotVentEntrance: + newEntity.AddParameter("OnEnter", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Completed", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("enable_on_reset", new cBool(true), ParameterVariant.STATE); //bool + newEntity.AddParameter("LinePath", new cSpline(), ParameterVariant.INPUT); //SPLINE + newEntity.AddParameter("character_classes", new cEnum("CHARACTER_CLASS_COMBINATION", 1023), ParameterVariant.PARAMETER); //CHARACTER_CLASS_COMBINATION + newEntity.AddResource(ResourceType.TRAVERSAL_SEGMENT); + break; + case FunctionType.TRAV_1ShotVentExit: + newEntity.AddParameter("OnExit", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Completed", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("enable_on_reset", new cBool(true), ParameterVariant.STATE); //bool + newEntity.AddParameter("LinePath", new cSpline(), ParameterVariant.INPUT); //SPLINE + newEntity.AddParameter("character_classes", new cEnum("CHARACTER_CLASS_COMBINATION", 1023), ParameterVariant.PARAMETER); //CHARACTER_CLASS_COMBINATION + newEntity.AddResource(ResourceType.TRAVERSAL_SEGMENT); + break; + case FunctionType.TRAV_1ShotFloorVentEntrance: + newEntity.AddParameter("OnEnter", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Completed", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("enable_on_reset", new cBool(true), ParameterVariant.STATE); //bool + newEntity.AddParameter("LinePath", new cSpline(), ParameterVariant.INPUT); //SPLINE + newEntity.AddParameter("character_classes", new cEnum("CHARACTER_CLASS_COMBINATION", 1023), ParameterVariant.PARAMETER); //CHARACTER_CLASS_COMBINATION + newEntity.AddResource(ResourceType.TRAVERSAL_SEGMENT); + break; + case FunctionType.TRAV_1ShotFloorVentExit: + newEntity.AddParameter("OnExit", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Completed", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("enable_on_reset", new cBool(true), ParameterVariant.STATE); //bool + newEntity.AddParameter("LinePath", new cSpline(), ParameterVariant.INPUT); //SPLINE + newEntity.AddParameter("character_classes", new cEnum("CHARACTER_CLASS_COMBINATION", 1023), ParameterVariant.PARAMETER); //CHARACTER_CLASS_COMBINATION + newEntity.AddResource(ResourceType.TRAVERSAL_SEGMENT); + break; + case FunctionType.TRAV_1ShotClimbUnder: + newEntity.AddParameter("OnEnter", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("OnExit", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("enable_on_reset", new cBool(true), ParameterVariant.STATE); //bool + newEntity.AddParameter("LinePath", new cSpline(), ParameterVariant.INPUT); //SPLINE + newEntity.AddParameter("InUse", new cBool(), ParameterVariant.OUTPUT); //bool + newEntity.AddParameter("character_classes", new cEnum("CHARACTER_CLASS_COMBINATION", 0), ParameterVariant.PARAMETER); //CHARACTER_CLASS_COMBINATION + break; + case FunctionType.TRAV_1ShotLeap: + newEntity.AddParameter("OnEnter", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("OnExit", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("OnSuccess", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("OnFailure", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("enable_on_reset", new cBool(true), ParameterVariant.STATE); //bool + newEntity.AddParameter("StartEdgeLinePath", new cSpline(), ParameterVariant.INPUT); //SPLINE + newEntity.AddParameter("EndEdgeLinePath", new cSpline(), ParameterVariant.INPUT); //SPLINE + newEntity.AddParameter("InUse", new cBool(), ParameterVariant.OUTPUT); //bool + newEntity.AddParameter("MissDistance", new cFloat(), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("NearMissDistance", new cFloat(), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("character_classes", new cEnum("CHARACTER_CLASS_COMBINATION", 0), ParameterVariant.PARAMETER); //CHARACTER_CLASS_COMBINATION + break; + case FunctionType.TRAV_1ShotSpline: + newEntity.AddParameter("OnEnter", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("OnExit", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("enable_on_reset", new cBool(true), ParameterVariant.STATE); //bool + newEntity.AddParameter("open_on_reset", new cBool(true), ParameterVariant.STATE); //bool + newEntity.AddParameter("EntrancePath", new cSpline(), ParameterVariant.INPUT); //SPLINE + newEntity.AddParameter("ExitPath", new cSpline(), ParameterVariant.INPUT); //SPLINE + newEntity.AddParameter("MinimumPath", new cSpline(), ParameterVariant.INPUT); //SPLINE + newEntity.AddParameter("MaximumPath", new cSpline(), ParameterVariant.INPUT); //SPLINE + newEntity.AddParameter("MinimumSupport", new cSpline(), ParameterVariant.INPUT); //SPLINE + newEntity.AddParameter("MaximumSupport", new cSpline(), ParameterVariant.INPUT); //SPLINE + newEntity.AddParameter("template", new cBool(), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("headroom", new cFloat(), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("extra_cost", new cFloat(), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("fit_end_to_edge", new cBool(), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("min_speed", new cEnum("LOCOMOTION_TARGET_SPEED", 0), ParameterVariant.PARAMETER); //LOCOMOTION_TARGET_SPEED + newEntity.AddParameter("max_speed", new cEnum("LOCOMOTION_TARGET_SPEED", 0), ParameterVariant.PARAMETER); //LOCOMOTION_TARGET_SPEED + newEntity.AddParameter("animationTree", new cString(""), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("character_classes", new cEnum("CHARACTER_CLASS_COMBINATION", 1023), ParameterVariant.PARAMETER); //CHARACTER_CLASS_COMBINATION + newEntity.AddResource(ResourceType.TRAVERSAL_SEGMENT); + break; + case FunctionType.NavMeshBarrier: + newEntity.AddParameter("open_on_reset", new cBool(false), ParameterVariant.STATE); //bool + newEntity.AddParameter("position", new cTransform(), ParameterVariant.PARAMETER); //Position + newEntity.AddParameter("half_dimensions", new cVector3(), ParameterVariant.PARAMETER); //Direction + newEntity.AddParameter("opaque", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("allowed_character_classes_when_open", new cEnum("CHARACTER_CLASS_COMBINATION", 1023), ParameterVariant.PARAMETER); //CHARACTER_CLASS_COMBINATION + newEntity.AddParameter("allowed_character_classes_when_closed", new cEnum("CHARACTER_CLASS_COMBINATION", 0), ParameterVariant.PARAMETER); //CHARACTER_CLASS_COMBINATION + newEntity.AddResource(ResourceType.NAV_MESH_BARRIER_RESOURCE); + break; + case FunctionType.NavMeshWalkablePlatform: + newEntity.AddParameter("position", new cTransform(), ParameterVariant.PARAMETER); //Position + newEntity.AddParameter("half_dimensions", new cVector3(), ParameterVariant.PARAMETER); //Direction + break; + case FunctionType.NavMeshExclusionArea: + newEntity.AddParameter("position", new cTransform(), ParameterVariant.PARAMETER); //Position + newEntity.AddParameter("half_dimensions", new cVector3(), ParameterVariant.PARAMETER); //Direction + break; + case FunctionType.NavMeshArea: + newEntity.AddParameter("position", new cTransform(), ParameterVariant.PARAMETER); //Position + newEntity.AddParameter("half_dimensions", new cVector3(), ParameterVariant.PARAMETER); //Direction + newEntity.AddParameter("area_type", new cEnum("NAV_MESH_AREA_TYPE", 0), ParameterVariant.PARAMETER); //NAV_MESH_AREA_TYPE + break; + case FunctionType.NavMeshReachabilitySeedPoint: + newEntity.AddParameter("position", new cTransform(), ParameterVariant.PARAMETER); //Position + break; + case FunctionType.CoverExclusionArea: + newEntity.AddParameter("position", new cTransform(), ParameterVariant.PARAMETER); //Position + newEntity.AddParameter("half_dimensions", new cVector3(), ParameterVariant.PARAMETER); //Direction + newEntity.AddParameter("exclude_cover", new cBool(), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("exclude_vaults", new cBool(), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("exclude_mantles", new cBool(), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("exclude_jump_downs", new cBool(), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("exclude_crawl_space_spotting_positions", new cBool(), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("exclude_spotting_positions", new cBool(), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("exclude_assault_positions", new cBool(), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.SpottingExclusionArea: + newEntity.AddParameter("position", new cTransform(), ParameterVariant.PARAMETER); //Position + newEntity.AddParameter("half_dimensions", new cVector3(), ParameterVariant.PARAMETER); //Direction + break; + case FunctionType.PathfindingTeleportNode: + newEntity.AddParameter("started_teleporting", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("stopped_teleporting", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("destination", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("build_into_navmesh", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("position", new cTransform(), ParameterVariant.PARAMETER); //Position + newEntity.AddParameter("extra_cost", new cFloat(), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("character_classes", new cEnum("CHARACTER_CLASS_COMBINATION", 0), ParameterVariant.PARAMETER); //CHARACTER_CLASS_COMBINATION + break; + case FunctionType.PathfindingWaitNode: + newEntity.AddParameter("character_getting_near", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("character_arriving", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("character_stopped", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("started_waiting", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("stopped_waiting", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("destination", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("build_into_navmesh", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("position", new cTransform(), ParameterVariant.PARAMETER); //Position + newEntity.AddParameter("extra_cost", new cFloat(), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("character_classes", new cEnum("CHARACTER_CLASS_COMBINATION", 0), ParameterVariant.PARAMETER); //CHARACTER_CLASS_COMBINATION + break; + case FunctionType.PathfindingManualNode: + newEntity.AddParameter("character_arriving", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("character_stopped", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("started_animating", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("stopped_animating", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_loaded", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("PlayAnimData", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.PLAY_ANIMATION_DATA_RESOURCE) }.ToList(), newEntity.shortGUID), ParameterVariant.INPUT); //PLAY_ANIMATION_DATA_RESOURCE + newEntity.AddParameter("destination", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("build_into_navmesh", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("position", new cTransform(), ParameterVariant.PARAMETER); //Position + newEntity.AddParameter("extra_cost", new cFloat(), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("character_classes", new cEnum("CHARACTER_CLASS_COMBINATION", 1023), ParameterVariant.PARAMETER); //CHARACTER_CLASS_COMBINATION + break; + case FunctionType.PathfindingAlienBackstageNode: + newEntity.AddParameter("started_animating_Entry", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("stopped_animating_Entry", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("started_animating_Exit", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("stopped_animating_Exit", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("killtrap_anim_started", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("killtrap_anim_stopped", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("killtrap_fx_start", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("killtrap_fx_stop", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_loaded", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("open_on_reset", new cBool(false), ParameterVariant.STATE); //bool + newEntity.AddParameter("PlayAnimData_Entry", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.PLAY_ANIMATION_DATA_RESOURCE) }.ToList(), newEntity.shortGUID), ParameterVariant.INPUT); //PLAY_ANIMATION_DATA_RESOURCE + newEntity.AddParameter("PlayAnimData_Exit", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.PLAY_ANIMATION_DATA_RESOURCE) }.ToList(), newEntity.shortGUID), ParameterVariant.INPUT); //PLAY_ANIMATION_DATA_RESOURCE + newEntity.AddParameter("Killtrap_alien", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.PLAY_ANIMATION_DATA_RESOURCE) }.ToList(), newEntity.shortGUID), ParameterVariant.INPUT); //PLAY_ANIMATION_DATA_RESOURCE + newEntity.AddParameter("Killtrap_victim", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.PLAY_ANIMATION_DATA_RESOURCE) }.ToList(), newEntity.shortGUID), ParameterVariant.INPUT); //PLAY_ANIMATION_DATA_RESOURCE + newEntity.AddParameter("build_into_navmesh", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("position", new cTransform(), ParameterVariant.PARAMETER); //Position + newEntity.AddParameter("top", new cTransform(), ParameterVariant.PARAMETER); //Position + newEntity.AddParameter("extra_cost", new cFloat(100.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("network_id", new cInteger(), ParameterVariant.PARAMETER); //int + break; + case FunctionType.ChokePoint: + newEntity.AddResource(ResourceType.CHOKE_POINT_RESOURCE); + break; + case FunctionType.NPC_SetChokePoint: + newEntity.AddParameter("chokepoints", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.CHOKE_POINT_RESOURCE) }.ToList(), newEntity.shortGUID), ParameterVariant.INPUT); //CHOKE_POINT_RESOURCE + break; + case FunctionType.Planet: + newEntity.AddParameter("planet_resource", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("parallax_position", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("sun_position", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("light_shaft_source_position", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("parallax_scale", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("planet_sort_key", new cInteger(0), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("overbright_scalar", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("light_wrap_angle_scalar", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("penumbra_falloff_power_scalar", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("lens_flare_brightness", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("lens_flare_colour", new cVector3(), ParameterVariant.PARAMETER); //Direction + newEntity.AddParameter("atmosphere_edge_falloff_power", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("atmosphere_edge_transparency", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("atmosphere_scroll_speed", new cFloat(0.1f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("atmosphere_detail_scroll_speed", new cFloat(0.1f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("override_global_tint", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("global_tint", new cVector3(), ParameterVariant.PARAMETER); //Direction + newEntity.AddParameter("flow_cycle_time", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("flow_speed", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("flow_tex_scale", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("flow_warp_strength", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("detail_uv_scale", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("normal_uv_scale", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("terrain_uv_scale", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("atmosphere_normal_strength", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("terrain_normal_strength", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("light_shaft_colour", new cVector3(), ParameterVariant.PARAMETER); //Direction + newEntity.AddParameter("light_shaft_range", new cFloat(0.5f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("light_shaft_decay", new cFloat(0.8f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("light_shaft_min_occlusion_distance", new cFloat(100.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("light_shaft_intensity", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("light_shaft_density", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("light_shaft_source_occlusion", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("blocks_light_shafts", new cBool(true), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.SpaceTransform: + newEntity.AddParameter("affected_geometry", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("yaw_speed", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("pitch_speed", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("roll_speed", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.SpaceSuitVisor: + newEntity.AddParameter("breath_level", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.NonInteractiveWater: + newEntity.AddParameter("water_resource", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("SCALE_X", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("SCALE_Z", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("SHININESS", new cFloat(0.8f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("SPEED", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("SCALE", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("NORMAL_MAP_STRENGTH", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("SECONDARY_SPEED", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("SECONDARY_SCALE", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("SECONDARY_NORMAL_MAP_STRENGTH", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("CYCLE_TIME", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("FLOW_SPEED", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("FLOW_TEX_SCALE", new cFloat(4.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("FLOW_WARP_STRENGTH", new cFloat(0.5f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("FRESNEL_POWER", new cFloat(0.8f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("MIN_FRESNEL", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("MAX_FRESNEL", new cFloat(5.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("ENVIRONMENT_MAP_MULT", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("ENVMAP_SIZE", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("ENVMAP_BOXPROJ_BB_SCALE", new cVector3(), ParameterVariant.PARAMETER); //Direction + newEntity.AddParameter("REFLECTION_PERTURBATION_STRENGTH", new cFloat(0.05f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("ALPHA_PERTURBATION_STRENGTH", new cFloat(0.05f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("ALPHALIGHT_MULT", new cFloat(0.4f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("softness_edge", new cFloat(10.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("DEPTH_FOG_INITIAL_COLOUR", new cVector3(), ParameterVariant.PARAMETER); //Direction + newEntity.AddParameter("DEPTH_FOG_INITIAL_ALPHA", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("DEPTH_FOG_MIDPOINT_COLOUR", new cVector3(), ParameterVariant.PARAMETER); //Direction + newEntity.AddParameter("DEPTH_FOG_MIDPOINT_ALPHA", new cFloat(0.5f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("DEPTH_FOG_MIDPOINT_DEPTH", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("DEPTH_FOG_END_COLOUR", new cVector3(), ParameterVariant.PARAMETER); //Direction + newEntity.AddParameter("DEPTH_FOG_END_ALPHA", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("DEPTH_FOG_END_DEPTH", new cFloat(2.0f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.Refraction: + newEntity.AddParameter("refraction_resource", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("SCALE_X", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("SCALE_Z", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("DISTANCEFACTOR", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("REFRACTFACTOR", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("SPEED", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("SCALE", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("SECONDARY_REFRACTFACTOR", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("SECONDARY_SPEED", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("SECONDARY_SCALE", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("MIN_OCCLUSION_DISTANCE", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("CYCLE_TIME", new cFloat(10.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("FLOW_SPEED", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("FLOW_TEX_SCALE", new cFloat(4.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("FLOW_WARP_STRENGTH", new cFloat(0.5f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.FogPlane: + newEntity.AddParameter("fog_plane_resource", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("start_distance_fade_scalar", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("distance_fade_scalar", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("angle_fade_scalar", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("linear_height_density_fresnel_power_scalar", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("linear_heigth_density_max_scalar", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("tint", new cVector3(), ParameterVariant.PARAMETER); //Direction + newEntity.AddParameter("thickness_scalar", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("edge_softness_scalar", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("diffuse_0_uv_scalar", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("diffuse_0_speed_scalar", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("diffuse_1_uv_scalar", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("diffuse_1_speed_scalar", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.PostprocessingSettings: + newEntity.AddParameter("intensity", new cFloat(1.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("priority", new cInteger(100), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("blend_mode", new cEnum("BLEND_MODE", 2), ParameterVariant.PARAMETER); //BLEND_MODE + break; + case FunctionType.BloomSettings: + newEntity.AddParameter("frame_buffer_scale", new cFloat(1.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("frame_buffer_offset", new cFloat(0.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("bloom_scale", new cFloat(1.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("bloom_gather_exponent", new cFloat(1.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("bloom_gather_scale", new cFloat(0.04f), ParameterVariant.INPUT); //float + break; + case FunctionType.ColourSettings: + newEntity.AddParameter("brightness", new cFloat(0.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("contrast", new cFloat(1.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("saturation", new cFloat(1.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("red_tint", new cFloat(1.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("green_tint", new cFloat(1.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("blue_tint", new cFloat(1.0f), ParameterVariant.INPUT); //float + break; + case FunctionType.FlareSettings: + newEntity.AddParameter("flareOffset0", new cFloat(-1.2f), ParameterVariant.INPUT); //float + newEntity.AddParameter("flareIntensity0", new cFloat(0.05f), ParameterVariant.INPUT); //float + newEntity.AddParameter("flareAttenuation0", new cFloat(1.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("flareOffset1", new cFloat(-1.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("flareIntensity1", new cFloat(0.15f), ParameterVariant.INPUT); //float + newEntity.AddParameter("flareAttenuation1", new cFloat(0.7f), ParameterVariant.INPUT); //float + newEntity.AddParameter("flareOffset2", new cFloat(-0.8f), ParameterVariant.INPUT); //float + newEntity.AddParameter("flareIntensity2", new cFloat(0.2f), ParameterVariant.INPUT); //float + newEntity.AddParameter("flareAttenuation2", new cFloat(7.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("flareOffset3", new cFloat(-0.6f), ParameterVariant.INPUT); //float + newEntity.AddParameter("flareIntensity3", new cFloat(0.4f), ParameterVariant.INPUT); //float + newEntity.AddParameter("flareAttenuation3", new cFloat(1.5f), ParameterVariant.INPUT); //float + break; + case FunctionType.HighSpecMotionBlurSettings: + newEntity.AddParameter("contribution", new cFloat(1.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("camera_velocity_scalar", new cFloat(0.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("camera_velocity_min", new cFloat(1.5f), ParameterVariant.INPUT); //float + newEntity.AddParameter("camera_velocity_max", new cFloat(3.5f), ParameterVariant.INPUT); //float + newEntity.AddParameter("object_velocity_scalar", new cFloat(0.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("object_velocity_min", new cFloat(1.5f), ParameterVariant.INPUT); //float + newEntity.AddParameter("object_velocity_max", new cFloat(3.5f), ParameterVariant.INPUT); //float + newEntity.AddParameter("blur_range", new cFloat(16.0f), ParameterVariant.INPUT); //float + break; + case FunctionType.FilmGrainSettings: + newEntity.AddParameter("low_lum_amplifier", new cFloat(0.2f), ParameterVariant.INPUT); //float + newEntity.AddParameter("mid_lum_amplifier", new cFloat(0.25f), ParameterVariant.INPUT); //float + newEntity.AddParameter("high_lum_amplifier", new cFloat(0.4f), ParameterVariant.INPUT); //float + newEntity.AddParameter("low_lum_range", new cFloat(0.2f), ParameterVariant.INPUT); //float + newEntity.AddParameter("mid_lum_range", new cFloat(0.3f), ParameterVariant.INPUT); //float + newEntity.AddParameter("high_lum_range", new cFloat(0.2f), ParameterVariant.INPUT); //float + newEntity.AddParameter("noise_texture_scale", new cFloat(4.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("adaptive", new cBool(false), ParameterVariant.INPUT); //bool + newEntity.AddParameter("adaptation_scalar", new cFloat(3.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("adaptation_time_scalar", new cFloat(0.25f), ParameterVariant.INPUT); //float + newEntity.AddParameter("unadapted_low_lum_amplifier", new cFloat(0.2f), ParameterVariant.INPUT); //float + newEntity.AddParameter("unadapted_mid_lum_amplifier", new cFloat(0.25f), ParameterVariant.INPUT); //float + newEntity.AddParameter("unadapted_high_lum_amplifier", new cFloat(0.4f), ParameterVariant.INPUT); //float + break; + case FunctionType.VignetteSettings: + newEntity.AddParameter("vignette_factor", new cFloat(1.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("vignette_chromatic_aberration_scale", new cFloat(0.0f), ParameterVariant.INPUT); //float + break; + case FunctionType.DistortionSettings: + newEntity.AddParameter("radial_distort_factor", new cFloat(0.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("radial_distort_constraint", new cFloat(1.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("radial_distort_scalar", new cFloat(1.0f), ParameterVariant.INPUT); //float + break; + case FunctionType.SharpnessSettings: + newEntity.AddParameter("local_contrast_factor", new cFloat(1.0f), ParameterVariant.INPUT); //float + break; + case FunctionType.LensDustSettings: + newEntity.AddParameter("DUST_MAX_REFLECTED_BLOOM_INTENSITY", new cFloat(0.02f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("DUST_REFLECTED_BLOOM_INTENSITY_SCALAR", new cFloat(0.25f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("DUST_MAX_BLOOM_INTENSITY", new cFloat(0.004f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("DUST_BLOOM_INTENSITY_SCALAR", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("DUST_THRESHOLD", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.IrawanToneMappingSettings: + newEntity.AddParameter("target_device_luminance", new cFloat(6.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("target_device_adaptation", new cFloat(20.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("saccadic_time", new cFloat(0.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("superbright_adaptation", new cFloat(0.5f), ParameterVariant.INPUT); //float + break; + case FunctionType.HableToneMappingSettings: + newEntity.AddParameter("shoulder_strength", new cFloat(0.22f), ParameterVariant.INPUT); //float + newEntity.AddParameter("linear_strength", new cFloat(0.3f), ParameterVariant.INPUT); //float + newEntity.AddParameter("linear_angle", new cFloat(0.1f), ParameterVariant.INPUT); //float + newEntity.AddParameter("toe_strength", new cFloat(0.2f), ParameterVariant.INPUT); //float + newEntity.AddParameter("toe_numerator", new cFloat(0.01f), ParameterVariant.INPUT); //float + newEntity.AddParameter("toe_denominator", new cFloat(0.3f), ParameterVariant.INPUT); //float + newEntity.AddParameter("linear_white_point", new cFloat(11.2f), ParameterVariant.INPUT); //float + break; + case FunctionType.DayToneMappingSettings: + newEntity.AddParameter("black_point", new cFloat(0.00625f), ParameterVariant.INPUT); //float + newEntity.AddParameter("cross_over_point", new cFloat(0.4f), ParameterVariant.INPUT); //float + newEntity.AddParameter("white_point", new cFloat(40.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("shoulder_strength", new cFloat(0.95f), ParameterVariant.INPUT); //float + newEntity.AddParameter("toe_strength", new cFloat(0.15f), ParameterVariant.INPUT); //float + newEntity.AddParameter("luminance_scale", new cFloat(5.0f), ParameterVariant.INPUT); //float + break; + case FunctionType.LightAdaptationSettings: + newEntity.AddParameter("fast_neural_t0", new cFloat(5.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("slow_neural_t0", new cFloat(5.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("pigment_bleaching_t0", new cFloat(20.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("fb_luminance_to_candelas_per_m2", new cFloat(105.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("max_adaptation_lum", new cFloat(20000.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("min_adaptation_lum", new cFloat(0.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("adaptation_percentile", new cFloat(0.3f), ParameterVariant.INPUT); //float + newEntity.AddParameter("low_bracket", new cFloat(0.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("high_bracket", new cFloat(1.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("adaptation_mechanism", new cEnum("LIGHT_ADAPTATION_MECHANISM", 0), ParameterVariant.PARAMETER); //LIGHT_ADAPTATION_MECHANISM + break; + case FunctionType.ColourCorrectionTransition: + newEntity.AddParameter("interpolate", new cFloat(0.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("colour_lut_a", new cString(""), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("colour_lut_b", new cString(""), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("lut_a_contribution", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("lut_b_contribution", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("colour_lut_a_index", new cInteger(-1), ParameterVariant.INTERNAL); //int + newEntity.AddParameter("colour_lut_b_index", new cInteger(-1), ParameterVariant.INTERNAL); //int + break; + case FunctionType.ProjectileMotion: + newEntity.AddParameter("on_think", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_finished", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("start_pos", new cVector3(), ParameterVariant.INPUT); //Direction + newEntity.AddParameter("start_velocity", new cVector3(), ParameterVariant.INPUT); //Direction + newEntity.AddParameter("duration", new cFloat(0.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("Current_Position", new cTransform(), ParameterVariant.OUTPUT); //Position + newEntity.AddParameter("Current_Velocity", new cVector3(), ParameterVariant.OUTPUT); //Direction + break; + case FunctionType.ProjectileMotionComplex: + newEntity.AddParameter("on_think", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_finished", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("start_position", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("start_velocity", new cVector3(), ParameterVariant.INPUT); //Direction + newEntity.AddParameter("start_angular_velocity", new cVector3(), ParameterVariant.INPUT); //Direction + newEntity.AddParameter("flight_time_in_seconds", new cFloat(0.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("current_position", new cTransform(), ParameterVariant.OUTPUT); //Position + newEntity.AddParameter("current_velocity", new cVector3(), ParameterVariant.OUTPUT); //Direction + newEntity.AddParameter("current_angular_velocity", new cVector3(), ParameterVariant.OUTPUT); //Direction + newEntity.AddParameter("current_flight_time_in_seconds", new cFloat(), ParameterVariant.OUTPUT); //float + break; + case FunctionType.SplineDistanceLerp: + newEntity.AddParameter("on_think", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("spline", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("lerp_position", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("Result", new cFloat(), ParameterVariant.OUTPUT); //float + break; + case FunctionType.MoveAlongSpline: + newEntity.AddParameter("on_think", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_finished", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("spline", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("speed", new cFloat(0.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("Result", new cTransform(), ParameterVariant.OUTPUT); //Position + break; + case FunctionType.GetSplineLength: + newEntity.AddParameter("spline", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("Result", new cFloat(), ParameterVariant.OUTPUT); //float + break; + case FunctionType.GetPointOnSpline: + newEntity.AddParameter("spline", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("percentage_of_spline", new cFloat(0.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("Result", new cTransform(), ParameterVariant.OUTPUT); //Position + break; + case FunctionType.GetClosestPercentOnSpline: + newEntity.AddParameter("spline", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("pos_to_be_near", new cVector3(), ParameterVariant.INPUT); //Direction + newEntity.AddParameter("position_on_spline", new cTransform(), ParameterVariant.OUTPUT); //Position + newEntity.AddParameter("Result", new cFloat(), ParameterVariant.OUTPUT); //float + newEntity.AddParameter("bidirectional", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.GetClosestPointOnSpline: + newEntity.AddParameter("spline", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("pos_to_be_near", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("position_on_spline", new cTransform(), ParameterVariant.OUTPUT); //Position + newEntity.AddParameter("look_ahead_distance", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("unidirectional", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("directional_damping_threshold", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.GetClosestPoint: + newEntity.AddParameter("bound_to_closest", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Positions", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("pos_to_be_near", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("position_of_closest", new cTransform(), ParameterVariant.OUTPUT); //Position + break; + case FunctionType.GetClosestPointFromSet: + newEntity.AddParameter("closest_is_1", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("closest_is_2", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("closest_is_3", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("closest_is_4", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("closest_is_5", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("closest_is_6", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("closest_is_7", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("closest_is_8", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("closest_is_9", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("closest_is_10", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Position_1", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("Position_2", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("Position_3", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("Position_4", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("Position_5", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("Position_6", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("Position_7", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("Position_8", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("Position_9", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("Position_10", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("pos_to_be_near", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("position_of_closest", new cTransform(), ParameterVariant.OUTPUT); //Position + newEntity.AddParameter("index_of_closest", new cInteger(), ParameterVariant.OUTPUT); //int + break; + case FunctionType.GetCentrePoint: + newEntity.AddParameter("Positions", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("position_of_centre", new cTransform(), ParameterVariant.OUTPUT); //Position + break; + case FunctionType.FogSetting: + newEntity.AddParameter("linear_distance", new cFloat(0.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("max_distance", new cFloat(850.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("linear_density", new cFloat(0.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("exponential_density", new cFloat(0.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("near_colour", new cVector3(), ParameterVariant.INPUT); //Direction + newEntity.AddParameter("far_colour", new cVector3(), ParameterVariant.INPUT); //Direction + break; + case FunctionType.FullScreenBlurSettings: + newEntity.AddParameter("contribution", new cFloat(0.0f), ParameterVariant.INPUT); //float + break; + case FunctionType.DistortionOverlay: + newEntity.AddParameter("intensity", new cFloat(0.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("time", new cFloat(0.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("distortion_texture", new cString(" "), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("alpha_threshold_enabled", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("threshold_texture", new cString(" "), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("range", new cFloat(0.1f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("begin_start_time", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("begin_stop_time", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("end_start_time", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("end_stop_time", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.FullScreenOverlay: + newEntity.AddParameter("overlay_texture", new cString(" "), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("threshold_value", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("threshold_start", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("threshold_stop", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("threshold_range", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("alpha_scalar", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.DepthOfFieldSettings: + newEntity.AddParameter("focal_length_mm", new cFloat(75.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("focal_plane_m", new cFloat(2.5f), ParameterVariant.INPUT); //float + newEntity.AddParameter("fnum", new cFloat(2.8f), ParameterVariant.INPUT); //float + newEntity.AddParameter("focal_point", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("use_camera_target", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.ChromaticAberrations: + newEntity.AddParameter("aberration_scalar", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.ScreenFadeOutToBlack: + newEntity.AddParameter("fade_value", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.ScreenFadeOutToBlackTimed: + newEntity.AddParameter("on_finished", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("time", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.ScreenFadeOutToWhite: + newEntity.AddParameter("fade_value", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.ScreenFadeOutToWhiteTimed: + newEntity.AddParameter("on_finished", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("time", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.ScreenFadeIn: + newEntity.AddParameter("fade_value", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.ScreenFadeInTimed: + newEntity.AddParameter("on_finished", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("time", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.BlendLowResFrame: + newEntity.AddParameter("blend_value", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.CharacterMonitor: + newEntity.AddParameter("character", new cFloat(), ParameterVariant.INPUT); //ResourceID + break; + case FunctionType.AreaHitMonitor: + newEntity.AddParameter("on_flamer_hit", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_shotgun_hit", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_pistol_hit", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("SpherePos", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("SphereRadius", new cFloat(), ParameterVariant.INPUT); //float + break; + case FunctionType.ENT_Debug_Exit_Game: + newEntity.AddParameter("FailureText", new cString(""), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("FailureCode", new cInteger(), ParameterVariant.PARAMETER); //int + break; + case FunctionType.StreamingMonitor: + newEntity.AddParameter("on_loaded", new cFloat(), ParameterVariant.TARGET); // + break; + case FunctionType.Raycast: + newEntity.AddParameter("Obstructed", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Unobstructed", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("OutOfRange", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("source_position", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("target_position", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("max_distance", new cFloat(100.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("hit_object", new cFloat(), ParameterVariant.OUTPUT); //Object + newEntity.AddParameter("hit_distance", new cFloat(), ParameterVariant.OUTPUT); //float + newEntity.AddParameter("hit_position", new cTransform(), ParameterVariant.OUTPUT); //Position + newEntity.AddParameter("priority", new cEnum("RAYCAST_PRIORITY", 2), ParameterVariant.PARAMETER); //RAYCAST_PRIORITY + break; + case FunctionType.PhysicsApplyImpulse: + newEntity.AddParameter("objects", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("offset", new cVector3(), ParameterVariant.INPUT); //Direction + newEntity.AddParameter("direction", new cVector3(), ParameterVariant.INPUT); //Direction + newEntity.AddParameter("force", new cFloat(1.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("can_damage", new cBool(true), ParameterVariant.INPUT); //bool + break; + case FunctionType.PhysicsApplyVelocity: + newEntity.AddParameter("objects", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("angular_velocity", new cVector3(), ParameterVariant.INPUT); //Direction + newEntity.AddParameter("linear_velocity", new cVector3(), ParameterVariant.INPUT); //Direction + newEntity.AddParameter("propulsion_velocity", new cFloat(1.0f), ParameterVariant.INPUT); //float + break; + case FunctionType.PhysicsModifyGravity: + newEntity.AddParameter("float_on_reset", new cBool(false), ParameterVariant.STATE); //bool + newEntity.AddParameter("objects", new cFloat(), ParameterVariant.INPUT); //Object + break; + case FunctionType.PhysicsApplyBuoyancy: + newEntity.AddParameter("objects", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("water_height", new cFloat(1.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("water_density", new cFloat(1.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("water_viscosity", new cFloat(1.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("water_choppiness", new cFloat(0.05f), ParameterVariant.INPUT); //float + break; + case FunctionType.AssetSpawner: + newEntity.AddParameter("finished_spawning", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("callback_triggered", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("forced_despawn", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("spawn_on_reset", new cBool(false), ParameterVariant.STATE); //bool + newEntity.AddParameter("asset", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("spawn_on_load", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("allow_forced_despawn", new cBool(), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("persist_on_callback", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("allow_physics", new cBool(true), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.ProximityTrigger: + newEntity.AddParameter("ignited", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("electrified", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("drenched", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("poisoned", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("fire_spread_rate", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("water_permeate_rate", new cFloat(10.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("electrical_conduction_rate", new cFloat(100.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("gas_diffusion_rate", new cFloat(0.1f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("ignition_range", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("electrical_arc_range", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("water_flow_range", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("gas_dispersion_range", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.CharacterAttachmentNode: + newEntity.AddParameter("attach_on_reset", new cBool(true), ParameterVariant.STATE); //bool + newEntity.AddParameter("character", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.CHARACTER) }.ToList(), newEntity.shortGUID), ParameterVariant.INPUT); //CHARACTER + newEntity.AddParameter("attachment", new cFloat(), ParameterVariant.INPUT); //ReferenceFramePtr + newEntity.AddParameter("Node", new cEnum("CHARACTER_NODE", 1), ParameterVariant.PARAMETER); //CHARACTER_NODE + newEntity.AddParameter("AdditiveNode", new cEnum("CHARACTER_NODE", 1), ParameterVariant.PARAMETER); //CHARACTER_NODE + newEntity.AddParameter("AdditiveNodeIntensity", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("UseOffset", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("Translation", new cVector3(), ParameterVariant.PARAMETER); //Direction + newEntity.AddParameter("Rotation", new cVector3(), ParameterVariant.PARAMETER); //Direction + break; + case FunctionType.MultipleCharacterAttachmentNode: + newEntity.AddParameter("attach_on_reset", new cBool(true), ParameterVariant.STATE); //bool + newEntity.AddParameter("character_01", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.CHARACTER) }.ToList(), newEntity.shortGUID), ParameterVariant.INPUT); //CHARACTER + newEntity.AddParameter("attachment_01", new cFloat(), ParameterVariant.INPUT); //ReferenceFramePtr + newEntity.AddParameter("character_02", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.CHARACTER) }.ToList(), newEntity.shortGUID), ParameterVariant.INPUT); //CHARACTER + newEntity.AddParameter("attachment_02", new cFloat(), ParameterVariant.INPUT); //ReferenceFramePtr + newEntity.AddParameter("character_03", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.CHARACTER) }.ToList(), newEntity.shortGUID), ParameterVariant.INPUT); //CHARACTER + newEntity.AddParameter("attachment_03", new cFloat(), ParameterVariant.INPUT); //ReferenceFramePtr + newEntity.AddParameter("character_04", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.CHARACTER) }.ToList(), newEntity.shortGUID), ParameterVariant.INPUT); //CHARACTER + newEntity.AddParameter("attachment_04", new cFloat(), ParameterVariant.INPUT); //ReferenceFramePtr + newEntity.AddParameter("character_05", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.CHARACTER) }.ToList(), newEntity.shortGUID), ParameterVariant.INPUT); //CHARACTER + newEntity.AddParameter("attachment_05", new cFloat(), ParameterVariant.INPUT); //ReferenceFramePtr + newEntity.AddParameter("node", new cEnum("CHARACTER_NODE", 1), ParameterVariant.PARAMETER); //CHARACTER_NODE + newEntity.AddParameter("use_offset", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("translation", new cVector3(), ParameterVariant.PARAMETER); //Direction + newEntity.AddParameter("rotation", new cVector3(), ParameterVariant.PARAMETER); //Direction + newEntity.AddParameter("is_cinematic", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.AnimatedModelAttachmentNode: + newEntity.AddParameter("attach_on_reset", new cBool(true), ParameterVariant.STATE); //bool + newEntity.AddParameter("animated_model", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("attachment", new cFloat(), ParameterVariant.INPUT); //ReferenceFramePtr + newEntity.AddParameter("bone_name", new cString(" "), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("use_offset", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("offset", new cTransform(), ParameterVariant.PARAMETER); //Position + break; + case FunctionType.GetCharacterRotationSpeed: + newEntity.AddParameter("character", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.CHARACTER) }.ToList(), newEntity.shortGUID), ParameterVariant.INPUT); //CHARACTER + newEntity.AddParameter("speed", new cFloat(), ParameterVariant.OUTPUT); //float + break; + case FunctionType.LevelCompletionTargets: + newEntity.AddParameter("TargetTime", new cFloat(), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("NumDeaths", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("TeamRespawnBonus", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("NoLocalRespawnBonus", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("NoRespawnBonus", new cInteger(), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("GrappleBreakBonus", new cInteger(), ParameterVariant.PARAMETER); //int + break; + case FunctionType.EnvironmentMap: + newEntity.AddParameter("Entities", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("Priority", new cInteger(100), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("ColourFactor", new cVector3(), ParameterVariant.PARAMETER); //Direction + newEntity.AddParameter("EmissiveFactor", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("Texture", new cString(""), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("Texture_Index", new cInteger(-1), ParameterVariant.INTERNAL); //int + newEntity.AddParameter("environmentmap_index", new cInteger(-1), ParameterVariant.INTERNAL); //int + break; + case FunctionType.Display_Element_On_Map: + newEntity.AddParameter("map_name", new cString(" "), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("element_name", new cString(" "), ParameterVariant.PARAMETER); //String + break; + case FunctionType.Map_Floor_Change: + newEntity.AddParameter("floor_name", new cString(" "), ParameterVariant.PARAMETER); //String + break; + case FunctionType.Force_UI_Visibility: + newEntity.AddParameter("also_disable_interactions", new cBool(true), ParameterVariant.STATE); //bool + break; + case FunctionType.AddExitObjective: + newEntity.AddParameter("marker", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("level_name", new cEnum("EXIT_WAYPOINT", 0), ParameterVariant.PARAMETER); //EXIT_WAYPOINT + break; + case FunctionType.SetPrimaryObjective: + newEntity.AddParameter("title", new cString(" "), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("additional_info", new cString(" "), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("title_list", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.OBJECTIVE_ENTRY_ID) }.ToList(), newEntity.shortGUID), ParameterVariant.PARAMETER); //OBJECTIVE_ENTRY_ID + newEntity.AddParameter("additional_info_list", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.OBJECTIVE_ENTRY_ID) }.ToList(), newEntity.shortGUID), ParameterVariant.PARAMETER); //OBJECTIVE_ENTRY_ID + newEntity.AddParameter("show_message", new cBool(true), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.SetSubObjective: + newEntity.AddParameter("target_position", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("title", new cString(" "), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("map_description", new cString(" "), ParameterVariant.PARAMETER); //String + newEntity.AddParameter("title_list", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.OBJECTIVE_ENTRY_ID) }.ToList(), newEntity.shortGUID), ParameterVariant.PARAMETER); //OBJECTIVE_ENTRY_ID + newEntity.AddParameter("map_description_list", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.OBJECTIVE_ENTRY_ID) }.ToList(), newEntity.shortGUID), ParameterVariant.PARAMETER); //OBJECTIVE_ENTRY_ID + newEntity.AddParameter("slot_number", new cInteger(0), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("objective_type", new cEnum("SUB_OBJECTIVE_TYPE", 0), ParameterVariant.PARAMETER); //SUB_OBJECTIVE_TYPE + newEntity.AddParameter("show_message", new cBool(true), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.ClearPrimaryObjective: + newEntity.AddParameter("clear_all_sub_objectives", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.ClearSubObjective: + newEntity.AddParameter("slot_number", new cInteger(0), ParameterVariant.PARAMETER); //int + break; + case FunctionType.UpdatePrimaryObjective: + newEntity.AddParameter("show_message", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("clear_objective", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.UpdateSubObjective: + newEntity.AddParameter("slot_number", new cInteger(0), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("show_message", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("clear_objective", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.DebugGraph: + newEntity.AddParameter("Inputs", new cFloat(), ParameterVariant.INPUT); //float + newEntity.AddParameter("scale", new cFloat(), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("duration", new cFloat(), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("samples_per_second", new cFloat(), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("auto_scale", new cBool(), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("auto_scroll", new cBool(), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.UnlockAchievement: + newEntity.AddParameter("achievement_id", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.ACHIEVEMENT_ID) }.ToList(), newEntity.shortGUID), ParameterVariant.PARAMETER); //ACHIEVEMENT_ID + break; + case FunctionType.AchievementMonitor: + newEntity.AddParameter("achievement_id", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.ACHIEVEMENT_ID) }.ToList(), newEntity.shortGUID), ParameterVariant.PARAMETER); //ACHIEVEMENT_ID + break; + case FunctionType.AchievementStat: + newEntity.AddParameter("achievement_id", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.ACHIEVEMENT_STAT_ID) }.ToList(), newEntity.shortGUID), ParameterVariant.PARAMETER); //ACHIEVEMENT_STAT_ID + break; + case FunctionType.AchievementUniqueCounter: + newEntity.AddParameter("achievement_id", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.ACHIEVEMENT_STAT_ID) }.ToList(), newEntity.shortGUID), ParameterVariant.PARAMETER); //ACHIEVEMENT_STAT_ID + newEntity.AddParameter("unique_object", new cFloat(), ParameterVariant.PARAMETER); //Object + break; + case FunctionType.SetRichPresence: + newEntity.AddParameter("presence_id", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.PRESENCE_ID) }.ToList(), newEntity.shortGUID), ParameterVariant.PARAMETER); //PRESENCE_ID + newEntity.AddParameter("mission_number", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.SmokeCylinder: + newEntity.AddParameter("pos", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("radius", new cFloat(0.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("height", new cFloat(0.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("duration", new cFloat(0.0f), ParameterVariant.INPUT); //float + break; + case FunctionType.SmokeCylinderAttachmentInterface: + newEntity.AddParameter("radius", new cFloat(0.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("height", new cFloat(0.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("duration", new cFloat(0.0f), ParameterVariant.INPUT); //float + break; + case FunctionType.PointTracker: + newEntity.AddParameter("origin", new cVector3(), ParameterVariant.INPUT); //Direction + newEntity.AddParameter("target", new cVector3(), ParameterVariant.INPUT); //Direction + newEntity.AddParameter("target_offset", new cVector3(), ParameterVariant.INPUT); //Direction + newEntity.AddParameter("result", new cTransform(), ParameterVariant.OUTPUT); //Position + newEntity.AddParameter("origin_offset", new cVector3(), ParameterVariant.PARAMETER); //Direction + newEntity.AddParameter("max_speed", new cFloat(180.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("damping_factor", new cFloat(0.6f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.ThrowingPointOfImpact: + newEntity.AddParameter("show_point_of_impact", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("hide_point_of_impact", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Location", new cTransform(), ParameterVariant.OUTPUT); //Position + newEntity.AddParameter("Visible", new cBool(), ParameterVariant.OUTPUT); //bool + break; + case FunctionType.VisibilityMaster: + newEntity.AddParameter("renderable", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.RENDERABLE_INSTANCE) }.ToList(), newEntity.shortGUID), ParameterVariant.INPUT); //RENDERABLE_INSTANCE + newEntity.AddParameter("mastered_by_visibility", new cFloat(), ParameterVariant.INPUT); //Object + break; + case FunctionType.MotionTrackerMonitor: + newEntity.AddParameter("on_motion_sound", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_enter_range_sound", new cFloat(), ParameterVariant.TARGET); // + break; + case FunctionType.GlobalEvent: + newEntity.AddParameter("EventValue", new cInteger(1), ParameterVariant.INPUT); //int + newEntity.AddParameter("EventName", new cString(" "), ParameterVariant.PARAMETER); //String + break; + case FunctionType.GlobalEventMonitor: + newEntity.AddParameter("Event_1", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Event_2", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Event_3", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Event_4", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Event_5", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Event_6", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Event_7", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Event_8", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Event_9", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Event_10", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Event_11", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Event_12", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Event_13", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Event_14", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Event_15", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Event_16", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Event_17", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Event_18", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Event_19", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Event_20", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("EventName", new cString(" "), ParameterVariant.PARAMETER); //String + break; + case FunctionType.GlobalPosition: + newEntity.AddParameter("PositionName", new cString(" "), ParameterVariant.PARAMETER); //String + break; + case FunctionType.UpdateGlobalPosition: + newEntity.AddParameter("PositionName", new cString(" "), ParameterVariant.PARAMETER); //String + break; + case FunctionType.PlayerLightProbe: + newEntity.AddParameter("output", new cVector3(), ParameterVariant.OUTPUT); //Direction + newEntity.AddParameter("light_level_for_ai", new cFloat(), ParameterVariant.OUTPUT); //float + newEntity.AddParameter("dark_threshold", new cFloat(), ParameterVariant.OUTPUT); //float + newEntity.AddParameter("fully_lit_threshold", new cFloat(), ParameterVariant.OUTPUT); //float + break; + case FunctionType.PlayerKilledAllyMonitor: + newEntity.AddParameter("ally_killed", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("start_on_reset", new cBool(true), ParameterVariant.STATE); //bool + break; + case FunctionType.AILightCurveSettings: + newEntity.AddParameter("y0", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("x1", new cFloat(0.25f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("y1", new cFloat(0.3f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("x2", new cFloat(0.6f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("y2", new cFloat(0.8f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("x3", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.InteractiveMovementControl: + newEntity.AddParameter("completed", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("duration", new cFloat(0.0f), ParameterVariant.INPUT); //float + newEntity.AddParameter("start_time", new cFloat(), ParameterVariant.INPUT); //float + newEntity.AddParameter("progress_path", new cSpline(), ParameterVariant.INPUT); //SPLINE + newEntity.AddParameter("result", new cFloat(), ParameterVariant.OUTPUT); //float + newEntity.AddParameter("speed", new cFloat(), ParameterVariant.OUTPUT); //float + newEntity.AddParameter("can_go_both_ways", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("use_left_input_stick", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("base_progress_speed", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("movement_threshold", new cFloat(30.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("momentum_damping", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("track_bone_position", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("character_node", new cEnum("CHARACTER_NODE", 9), ParameterVariant.PARAMETER); //CHARACTER_NODE + newEntity.AddParameter("track_position", new cTransform(), ParameterVariant.PARAMETER); //Position + break; + case FunctionType.PlayForMinDuration: + newEntity.AddParameter("timer_expired", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("first_animation_started", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("next_animation", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("all_animations_finished", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("MinDuration", new cFloat(5.0f), ParameterVariant.INPUT); //float + break; + case FunctionType.GCIP_WorldPickup: + newEntity.AddParameter("spawn_completed", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("pickup_collected", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("Pipe", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("Gasoline", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("Explosive", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("Battery", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("Blade", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("Gel", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("Adhesive", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("BoltGun Ammo", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("Revolver Ammo", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("Shotgun Ammo", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("BoltGun", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("Revolver", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("Shotgun", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("Flare", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("Flamer Fuel", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("Flamer", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("Scrap", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("Torch Battery", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("Torch", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("Cattleprod Ammo", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("Cattleprod", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("StartOnReset", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("MissionNumber", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.Torch_Control: + newEntity.AddParameter("torch_switched_off", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("torch_switched_on", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("character", new cResource(new ResourceReference[] { new ResourceReference(ResourceType.CHARACTER) }.ToList(), newEntity.shortGUID), ParameterVariant.INPUT); //CHARACTER + break; + case FunctionType.DoorStatus: + newEntity.AddParameter("hacking_difficulty", new cInteger(0), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("door_mechanism", new cEnum("DOOR_MECHANISM", 0), ParameterVariant.PARAMETER); //DOOR_MECHANISM + newEntity.AddParameter("gate_type", new cEnum("UI_KEYGATE_TYPE", 0), ParameterVariant.PARAMETER); //UI_KEYGATE_TYPE + newEntity.AddParameter("has_correct_keycard", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("cutting_tool_level", new cInteger(0), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("is_locked", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("is_powered", new cBool(false), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("is_cutting_complete", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.DeleteHacking: + newEntity.AddParameter("door_mechanism", new cEnum("DOOR_MECHANISM", 0), ParameterVariant.PARAMETER); //DOOR_MECHANISM + break; + case FunctionType.DeleteKeypad: + newEntity.AddParameter("door_mechanism", new cEnum("DOOR_MECHANISM", 0), ParameterVariant.PARAMETER); //DOOR_MECHANISM + break; + case FunctionType.DeleteCuttingPanel: + newEntity.AddParameter("door_mechanism", new cEnum("DOOR_MECHANISM", 0), ParameterVariant.PARAMETER); //DOOR_MECHANISM + break; + case FunctionType.DeleteBlankPanel: + newEntity.AddParameter("door_mechanism", new cEnum("DOOR_MECHANISM", 0), ParameterVariant.PARAMETER); //DOOR_MECHANISM + break; + case FunctionType.DeleteHousing: + newEntity.AddParameter("door_mechanism", new cEnum("DOOR_MECHANISM", 0), ParameterVariant.PARAMETER); //DOOR_MECHANISM + newEntity.AddParameter("is_door", new cBool(true), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.DeletePullLever: + newEntity.AddParameter("door_mechanism", new cEnum("DOOR_MECHANISM", 0), ParameterVariant.PARAMETER); //DOOR_MECHANISM + newEntity.AddParameter("lever_type", new cEnum("LEVER_TYPE", 0), ParameterVariant.PARAMETER); //LEVER_TYPE + break; + case FunctionType.DeleteRotateLever: + newEntity.AddParameter("door_mechanism", new cEnum("DOOR_MECHANISM", 0), ParameterVariant.PARAMETER); //DOOR_MECHANISM + newEntity.AddParameter("lever_type", new cEnum("LEVER_TYPE", 0), ParameterVariant.PARAMETER); //LEVER_TYPE + break; + case FunctionType.DeleteButtonDisk: + newEntity.AddParameter("door_mechanism", new cEnum("DOOR_MECHANISM", 0), ParameterVariant.PARAMETER); //DOOR_MECHANISM + newEntity.AddParameter("button_type", new cEnum("BUTTON_TYPE", 0), ParameterVariant.PARAMETER); //BUTTON_TYPE + break; + case FunctionType.DeleteButtonKeys: + newEntity.AddParameter("door_mechanism", new cEnum("DOOR_MECHANISM", 0), ParameterVariant.PARAMETER); //DOOR_MECHANISM + newEntity.AddParameter("button_type", new cEnum("BUTTON_TYPE", 0), ParameterVariant.PARAMETER); //BUTTON_TYPE + break; + case FunctionType.Interaction: + newEntity.AddParameter("on_damaged", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_interrupt", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("on_killed", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("interruptible_on_start", new cBool(false), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.PhysicsSystem: + newEntity.AddParameter("system_index", new cInteger(), ParameterVariant.INTERNAL); //int + newEntity.AddResource(ResourceType.DYNAMIC_PHYSICS_SYSTEM).startIndex = 0; + break; + case FunctionType.BulletChamber: + newEntity.AddParameter("Slot1", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("Slot2", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("Slot3", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("Slot4", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("Slot5", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("Slot6", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("Weapon", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("Geometry", new cFloat(), ParameterVariant.INPUT); //Object + break; + case FunctionType.PlayerDeathCounter: + newEntity.AddParameter("on_limit", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("above_limit", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("filter", new cBool(), ParameterVariant.INPUT); //bool + newEntity.AddParameter("count", new cInteger(), ParameterVariant.OUTPUT); //int + newEntity.AddParameter("Limit", new cInteger(1), ParameterVariant.PARAMETER); //int + break; + case FunctionType.RadiosityIsland: + newEntity.AddParameter("composites", new cFloat(), ParameterVariant.INPUT); //Object + newEntity.AddParameter("exclusions", new cFloat(), ParameterVariant.INPUT); //Object + break; + case FunctionType.RadiosityProxy: + newEntity.AddParameter("position", new cTransform(), ParameterVariant.PARAMETER); //Position + newEntity.AddResource(ResourceType.RENDERABLE_INSTANCE); + break; + case FunctionType.LeaderboardWriter: + newEntity.AddParameter("time_elapsed", new cFloat(0.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("score", new cInteger(0), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("level_number", new cInteger(0), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("grade", new cInteger(5), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("player_character", new cInteger(0), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("combat", new cInteger(0), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("stealth", new cInteger(0), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("improv", new cInteger(0), ParameterVariant.PARAMETER); //int + newEntity.AddParameter("star1", new cBool(), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("star2", new cBool(), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("star3", new cBool(), ParameterVariant.PARAMETER); //bool + break; + case FunctionType.ProximityDetector: + newEntity.AddParameter("in_proximity", new cFloat(), ParameterVariant.TARGET); // + newEntity.AddParameter("filter", new cBool(true), ParameterVariant.INPUT); //bool + newEntity.AddParameter("detector_position", new cTransform(), ParameterVariant.INPUT); //Position + newEntity.AddParameter("min_distance", new cFloat(0.3f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("max_distance", new cFloat(100.0f), ParameterVariant.PARAMETER); //float + newEntity.AddParameter("requires_line_of_sight", new cBool(true), ParameterVariant.PARAMETER); //bool + newEntity.AddParameter("proximity_duration", new cFloat(1.0f), ParameterVariant.PARAMETER); //float + break; + case FunctionType.FakeAILightSourceInPlayersHand: + newEntity.AddParameter("radius", new cFloat(5.0f), ParameterVariant.PARAMETER); //float + break; + + } + } + } +} diff --git a/CathodeLib/Scripts/CATHODE/CommandsPAK/Helpers/EnumUtils.cs b/CathodeLib/Scripts/CATHODE/CommandsPAK/Helpers/EnumUtils.cs new file mode 100644 index 0000000..a45179e --- /dev/null +++ b/CathodeLib/Scripts/CATHODE/CommandsPAK/Helpers/EnumUtils.cs @@ -0,0 +1,57 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using CATHODE; +using CATHODE.Scripting; +#if UNITY_EDITOR || UNITY_STANDALONE +using UnityEngine; +#endif + +namespace CathodeLib +{ + public class EnumUtils + { + private static List lookup_enum; + static EnumUtils() + { + lookup_enum = ReadDB(Properties.Resources.cathode_enum_lut).Cast().ToList(); + } + + //Check the formatted enum dump for content + public static EnumDescriptor GetEnum(string name) + { + ShortGuid id = ShortGuidUtils.Generate(name); + return GetEnum(id); + } + public static EnumDescriptor GetEnum(ShortGuid id) + { + return lookup_enum.FirstOrDefault(o => o.ID == id); + } + + //Read a generic entity database file + private static List ReadDB(byte[] db_content) + { + List toReturn = new List(); + BinaryReader reader = new BinaryReader(new MemoryStream(db_content)); + while (reader.BaseStream.Position < reader.BaseStream.Length) + { + EnumDescriptor thisDesc = new EnumDescriptor(); + thisDesc.ID = new ShortGuid(reader.ReadBytes(4)); + thisDesc.Name = reader.ReadString(); + int entryCount = reader.ReadInt32(); + for (int i = 0; i < entryCount; i++) thisDesc.Entries.Add(reader.ReadString()); + toReturn.Add(thisDesc); + } + reader.Close(); + return toReturn; + } + + public class EnumDescriptor + { + public string Name; + public List Entries = new List(); + public ShortGuid ID; + } + } +} diff --git a/CathodeLib/Scripts/CommandsPAK/ShortGuid.cs b/CathodeLib/Scripts/CATHODE/CommandsPAK/Helpers/ShortGuidUtils.cs similarity index 65% rename from CathodeLib/Scripts/CommandsPAK/ShortGuid.cs rename to CathodeLib/Scripts/CATHODE/CommandsPAK/Helpers/ShortGuidUtils.cs index 64cc079..4714397 100644 --- a/CathodeLib/Scripts/CommandsPAK/ShortGuid.cs +++ b/CathodeLib/Scripts/CATHODE/CommandsPAK/Helpers/ShortGuidUtils.cs @@ -1,19 +1,18 @@ -using System; +using CATHODE.Scripting; +using System; using System.Collections.Generic; using System.IO; -using System.Linq; -using System.Runtime.InteropServices; using System.Security.Cryptography; using System.Text; -namespace CATHODE.Commands +namespace CATHODE.Scripting { public static class ShortGuidUtils { private static ShortGuidTable vanilla = new ShortGuidTable(); private static ShortGuidTable custom = new ShortGuidTable(); - private static CommandsPAK commandsPAK; + private static Commands commandsPAK; /* Pull in strings we know are cached as ShortGuid in Cathode */ static ShortGuidUtils(/*CommandsPAK pak = null*/) @@ -62,6 +61,13 @@ public static string FindString(ShortGuid guid) return vanilla.cacheReversed[guid]; } + /* Generate a random unique ShortGuid */ + public static ShortGuid GenerateRandom() + { + //TODO: we should really check the caches here to make sure it IS random, and then go again if not + return Generate(DateTime.Now.ToString("G") + (new Random()).Next(0, 9999)); + } + /* Cache a pre-generated ShortGuid */ private static void Cache(ShortGuid guid, string value, bool isVanilla = false) { @@ -150,95 +156,4 @@ private class ShortGuidTable public Dictionary cacheReversed = new Dictionary(); } } - - /* A unique id assigned to CATHODE objects */ - [Serializable] - [StructLayout(LayoutKind.Sequential, Pack = 1)] - public struct ShortGuid : IComparable - { - public ShortGuid(float num) - { - val = BitConverter.GetBytes(num); - } - public ShortGuid(int num) - { - val = BitConverter.GetBytes(num); - } - public ShortGuid(byte[] id) - { - val = id; - } - public ShortGuid(BinaryReader reader) - { - val = reader.ReadBytes(4); - } - public ShortGuid(string id) - { - String[] arr = id.Split('-'); - if (arr.Length != 4) throw new Exception("Tried to initialise cGUID without 4-byte ID string."); - byte[] array = new byte[arr.Length]; - for (int i = 0; i < arr.Length; i++) array[i] = Convert.ToByte(arr[i], 16); - val = array; - } - - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)] - public byte[] val; - - public override bool Equals(object obj) - { - if (!(obj is ShortGuid)) return false; - if (((ShortGuid)obj).val == null) return this.val == null; - if (this.val == null) return ((ShortGuid)obj).val == null; - return ((ShortGuid)obj).val.SequenceEqual(this.val); - } - public static bool operator ==(ShortGuid x, ShortGuid y) - { - if (ReferenceEquals(x, null)) return ReferenceEquals(y, null); - if (x.val == null) return y.val == null; - if (y.val == null) return x.val == null; - return x.val.SequenceEqual(y.val); - } - public static bool operator !=(ShortGuid x, ShortGuid y) - { - return !x.val.SequenceEqual(y.val); - } - public static bool operator ==(ShortGuid x, string y) - { - return x.ToString() == y; - } - public static bool operator !=(ShortGuid x, string y) - { - return x.ToString() != y; - } - public override int GetHashCode() - { - return BitConverter.ToInt32(val, 0); - } - - public int CompareTo(ShortGuid x) - { - if (x == null) return 0; - if (x.val == null && val != null) return 0; - if (x.val != null && val == null) return 0; - if (x.val.Length != val.Length) return 0; - - int comp = 0; - for (int i = 0; i < x.val.Length; i++) - { - comp += x.val[i].CompareTo(val[i]); - } - comp /= x.val.Length; - - return comp; - } - - public override string ToString() - { - return BitConverter.ToString(val); - } - public uint ToUInt32() - { - return BitConverter.ToUInt32(val, 0); - } - } } diff --git a/CathodeLib/Scripts/CATHODE/EnvironmentAnimationDatabase.cs b/CathodeLib/Scripts/CATHODE/EnvironmentAnimationDatabase.cs new file mode 100644 index 0000000..d416ed2 --- /dev/null +++ b/CathodeLib/Scripts/CATHODE/EnvironmentAnimationDatabase.cs @@ -0,0 +1,135 @@ +using System.Collections.Generic; +using System.IO; +using System.Numerics; +using System.Runtime.InteropServices; +using CATHODE.Scripting; +using CathodeLib; + +namespace CATHODE +{ + /* Handles Cathode ENVIRONMENT_ANIMATION.DAT files */ + public class EnvironmentAnimationDatabase : CathodeFile + { + private List _animations = new List(); + public List Animations { get { return _animations; } } + + public EnvironmentAnimationDatabase(string path) : base(path) { } + + #region FILE_IO + /* Load the file */ + protected override bool Load() + { + if (!File.Exists(_filepath)) return false; + + BinaryReader reader = new BinaryReader(File.OpenRead(_filepath)); + try + { + //Read header + reader.BaseStream.Position += 8; //Skip version and filesize + OffsetPair matrix0 = Utilities.Consume(reader); + OffsetPair matrix1 = Utilities.Consume(reader); + OffsetPair entries1 = Utilities.Consume(reader); + OffsetPair entries0 = Utilities.Consume(reader); + OffsetPair ids0 = Utilities.Consume(reader); + OffsetPair ids1 = Utilities.Consume(reader); + reader.BaseStream.Position += 8; //Skip unknown + + //Jump down and read all content we'll consume into our EnvironmentAnimation + reader.BaseStream.Position = matrix0.GlobalOffset; + Matrix4x4[] Matrices0 = Utilities.ConsumeArray(reader, matrix0.EntryCount); + Matrix4x4[] Matrices1 = Utilities.ConsumeArray(reader, matrix1.EntryCount); + int[] IDs0 = Utilities.ConsumeArray(reader, ids0.EntryCount); + int[] IDs1 = Utilities.ConsumeArray(reader, ids1.EntryCount); + EnvironmentAnimationInfo[] Entries1 = Utilities.ConsumeArray(reader, entries1.EntryCount); + + //Jump back to our main definition and read all additional content in + reader.BaseStream.Position = entries0.GlobalOffset; + for (int i = 0; i < entries0.EntryCount; i++) + { + EnvironmentAnimation anim = new EnvironmentAnimation(); + anim.Matrix = Utilities.Consume(reader); + anim.ID = Utilities.Consume(reader); + reader.BaseStream.Position += 4; + anim.ResourceIndex = reader.ReadInt32(); + + anim.Indexes0 = PopulateArray(reader, IDs0); + anim.Indexes1 = PopulateArray(reader, IDs1); + + int matrix_count = reader.ReadInt32(); + int matrix_index = reader.ReadInt32(); + anim.Matrices0 = PopulateArray(matrix_count, matrix_index, Matrices0); + anim.Matrices1 = PopulateArray(matrix_count, matrix_index, Matrices1); + + anim.Data0 = PopulateArray(reader, Entries1); + + reader.BaseStream.Position += 4; //TODO: i think this might be a flag - it's usually zero but has been 1 on hab_airport + _animations.Add(anim); + } + } + catch + { + reader.Close(); + return false; + } + reader.Close(); + return true; + } + #endregion + + #region HELPERS + private List PopulateArray(BinaryReader reader, T[] array) + { + List arr = new List(); + int count = reader.ReadInt32(); + int index = reader.ReadInt32(); + if (typeof(T) == typeof(EnvironmentAnimationInfo)) + { + //Hacky fix for EnvironmentAnimationInfo pointers count/index order being inverted + for (int x = 0; x < index; x++) + arr.Add(array[count + x]); + } + else + { + for (int x = 0; x < count; x++) + arr.Add(array[index + x]); + } + return arr; + } + private List PopulateArray(int count, int index, T[] array) + { + List arr = new List(); + for (int x = 0; x < count; x++) + arr.Add(array[index + x]); + return arr; + } + #endregion + + #region STRUCTURES + public class EnvironmentAnimation + { + public Matrix4x4 Matrix; + public ShortGuid ID; + public int ResourceIndex; //This matches the ANIMATED_MODEL resource reference + + public List Indexes0; + public List Indexes1; + + public List Matrices0; + public List Matrices1; + + public List Data0; + } + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public struct EnvironmentAnimationInfo + { + public ShortGuid ID; + public CathodeLib.Vector3 P; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 6)] + public float[] V; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] + public byte[] Unknown_; + }; + #endregion + } +} \ No newline at end of file diff --git a/CathodeLib/Scripts/CATHODE/EnvironmentMapDatabase.cs b/CathodeLib/Scripts/CATHODE/EnvironmentMapDatabase.cs new file mode 100644 index 0000000..69de4d2 --- /dev/null +++ b/CathodeLib/Scripts/CATHODE/EnvironmentMapDatabase.cs @@ -0,0 +1,90 @@ +using CathodeLib; +using System.Collections.Generic; +using System.IO; +using System.Runtime.InteropServices; + +namespace CATHODE +{ + /* Loads and/or creates Cathode ENVIRONMENTMAP.BIN files */ + public class EnvironmentMapDatabase : CathodeFile + { + private int _unknownValue = 12; + + private List _entries = new List(); + public List EnvironmentMaps { get { return _entries; } } + + public EnvironmentMapDatabase(string path) : base(path) { } + + #region FILE_IO + /* Load the file */ + protected override bool Load() + { + if (!File.Exists(_filepath)) return false; + + BinaryReader reader = new BinaryReader(File.OpenRead(_filepath)); + try + { + reader.BaseStream.Position += 8; + int entryCount = reader.ReadInt32(); + _unknownValue = reader.ReadInt32(); + for (int i = 0; i < entryCount; i++) + { + EnvironmentMapEntry entry = new EnvironmentMapEntry(); + entry.envMapIndex = reader.ReadInt32(); + entry.mvrIndex = reader.ReadInt32(); + _entries.Add(entry); + } + } + catch + { + reader.Close(); + return false; + } + reader.Close(); + return true; + } + + override public bool Save() + { + BinaryWriter writer = new BinaryWriter(File.OpenWrite(_filepath)); + try + { + writer.BaseStream.SetLength(0); + writer.Write(new char[] { 'e', 'n', 'v', 'm' }); + writer.Write(1); + writer.Write(_entries.Count); + writer.Write(_unknownValue); //TODO: what is this value? need to know for making new files. + for (int i = 0; i < _entries.Count; i++) + { + writer.Write(_entries[i].envMapIndex); + writer.Write(_entries[i].mvrIndex); + } + } + catch + { + writer.Close(); + return false; + } + writer.Close(); + return true; + } + #endregion + + #region STRUCTURES + public class EnvironmentMapEntry + { + public int envMapIndex; + public int mvrIndex; //huh? + }; + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public struct EnvironmentMapHeader + { + public fourcc FourCC; + public uint Unknown0_; + public int EntryCount; + public uint Unknown1_; + }; + #endregion + } +} \ No newline at end of file diff --git a/CathodeLib/Scripts/CATHODE/MaterialDatabase.cs b/CathodeLib/Scripts/CATHODE/MaterialDatabase.cs new file mode 100644 index 0000000..d70a0c6 --- /dev/null +++ b/CathodeLib/Scripts/CATHODE/MaterialDatabase.cs @@ -0,0 +1,115 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Runtime.InteropServices; +using CathodeLib; + +namespace CATHODE +{ + /* Handles Cathode MODELS.MTL files */ + public class MaterialDatabase : CathodeFile + { + //TODO: tidy how we access these + public Header _header; + public Entry[] _materials; + public List _textureReferenceCounts; + public List _materialNames; + + public MaterialDatabase(string path) : base(path) { } + + #region FILE_IO + /* Load the file */ + protected override bool Load() + { + if (!File.Exists(_filepath)) return false; + + BinaryReader reader = new BinaryReader(File.OpenRead(_filepath)); + try + { + _header = Utilities.Consume
(reader); + + _materialNames = new List(_header.MaterialCount); + for (int MaterialIndex = 0; MaterialIndex < _header.MaterialCount; ++MaterialIndex) + { + _materialNames.Add(Utilities.ReadString(reader)); + } + + reader.BaseStream.Position = _header.FirstMaterialOffset + Marshal.SizeOf(_header.BytesRemainingAfterThis); + + _materials = Utilities.ConsumeArray(reader, _header.MaterialCount); + _textureReferenceCounts = new List(_header.MaterialCount); + for (int MaterialIndex = 0; MaterialIndex < _header.MaterialCount; ++MaterialIndex) + { + Entry Material = _materials[MaterialIndex]; + + int count = 0; + for (int I = 0; I < Material.TextureReferences.Length; ++I) + { + TextureReference Pair = Material.TextureReferences[I]; + if (Pair.TextureTableIndex == 2 || Pair.TextureTableIndex == 0) count++; + } + _textureReferenceCounts.Add(count); + } + } + catch + { + reader.Close(); + return false; + } + reader.Close(); + return true; + } + #endregion + + #region STRUCTURES + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public struct Header + { + public int BytesRemainingAfterThis; // TODO: Weird, is there any case where this is not true? Assert! + public int Unknown0_; + public int FirstMaterialOffset; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 5)] + public int[] CSTOffsets; //5 + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] + public int[] UnknownOffsets; //2 + public Int16 MaterialCount; + public Int16 Unknown2_; + }; + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public struct TextureReference + { + public Int16 TextureIndex; // NOTE: Entry index in texture BIN file. Max value seen matches the BIN file entry count; + public Int16 TextureTableIndex; // NOTE: Only seen as -1, 0 or 2 so far. + }; + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public struct Entry + { + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)] + public TextureReference[] TextureReferences; //12 + public int UnknownZero0_; // NOTE: Only seen as 0 so far. + public int MaterialIndex; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 5)] + public int[] CSTOffsets; //5 + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 5)] + public byte[] CSTCounts; //5 + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] + public byte[] ZeroPad; //3 + public int UnknownZero1_; + public int UnknownValue0; + public int UberShaderIndex; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)] + public int[] UnknownZeros0_; //32 + public int UnknownValue1; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)] + public int[] UnknownZeros1_; //12 + public int Unknown4_; + public int Color; // TODO: This is not really color AFAIK. + public int UnknownValue2; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] + public int[] UnknownZeros2_; //2 + }; + #endregion + } +} \ No newline at end of file diff --git a/CathodeLib/Scripts/CATHODE/MissionSave.cs b/CathodeLib/Scripts/CATHODE/MissionSave.cs new file mode 100644 index 0000000..ec784dc --- /dev/null +++ b/CathodeLib/Scripts/CATHODE/MissionSave.cs @@ -0,0 +1,173 @@ +using CATHODE.Scripting; +using CathodeLib; +using System; +using System.IO; +using System.Runtime.InteropServices; + +namespace CATHODE +{ + /* Handles Cathode PROGRESSION.AIS files */ + public class MissionSave : CathodeFile + { + private Header _header; + + // From the iOS decomp: the saves work with a "leaf and node" system, where you have + // "node" names saved with their connected "leafs" which acts like a "system" and + // "parameter" to apply to the system + + /* Load the file */ + public MissionSave(string path) : base(path) { } + + #region FILE_IO + /* Load the file */ + protected override bool Load() + { + if (!File.Exists(_filepath)) return false; + + BinaryReader reader = new BinaryReader(File.OpenRead(_filepath)); + try + { + _header = Utilities.Consume
(reader); + string levelname = Utilities.ReadString(reader.ReadBytes(128)); + + reader.BaseStream.Position = _header.save_root_offset; + + ValidateGuid(reader, "save_root"); + reader.BaseStream.Position += 8; + + ValidateGuid(reader, "trigger"); + ParseHeaderAndSkip(reader); + + ValidateGuid(reader, "pause_context_trigger"); + ParseHeaderAndSkip(reader); + + ValidateGuid(reader, "forward_triggers"); + ParseHeaderAndSkip(reader); + + ValidateGuid(reader, "m_broadcast_messages"); + ParseHeaderAndSkip(reader); + + ValidateGuid(reader, "player_pos"); + ParseHeaderAndSkip(reader); + + ValidateGuid(reader, "player_pos_valid"); + reader.BaseStream.Position += 2; + + ValidateGuid(reader, "filter_object"); + ParseHeaderAndSkip(reader); + + ValidateGuid(reader, "next_temporary_guid"); + ParseHeaderAndSkip(reader); + + ValidateGuid(reader, "trigger_object"); + ParseHeaderAndSkip(reader); + + ValidateGuid(reader, "temp_entities_data"); + ParseHeaderAndSkip(reader); + + ValidateGuid(reader, "temp_entities"); + ParseHeaderAndSkip(reader); + + //TODO: What do we reach after this point? Can't find the ShortGuid! + + int pos = (int)reader.BaseStream.Position; + + /* + List dump = new List(); + int prevPos = (int)Stream.BaseStream.Position; + while (true) + { + if (Stream.BaseStream.Position + 4 >= Stream.BaseStream.Length) break; + + ShortGuid consumed_guid = Utilities.Consume(Stream); + if (consumed_guid.ToString() == "00-00-00-00") continue; + + string match = ShortGuidUtils.FindString(consumed_guid); + if (match != consumed_guid.ToString()) + { + dump.Add((Stream.BaseStream.Position - 4) + " => [ + " + ((Stream.BaseStream.Position - 4) - prevPos) + "] => " + match); + prevPos = (int)Stream.BaseStream.Position; + } + + Stream.BaseStream.Position -= 3; + } + File.WriteAllLines(Path.GetFileNameWithoutExtension(pathToMVR) + "_dump.txt", dump); + */ + } + catch + { + reader.Close(); + return false; + } + reader.Close(); + return true; + } + + /* Save the file */ + override public bool Save() + { + BinaryWriter stream = new BinaryWriter(File.OpenWrite(_filepath)); + try + { + stream.BaseStream.SetLength(0); + Utilities.Write
(stream, _header); + } + catch + { + stream.Close(); + return false; + } + stream.Close(); + return true; + } + #endregion + + #region HELPERS + private void ParseHeaderAndSkip(BinaryReader stream) + { + byte type = stream.ReadByte(); + int offset = stream.ReadInt16(); + byte unk = stream.ReadByte(); + if (unk == 0x01) + throw new Exception("Unhandled"); + + switch (type) + { + case 0x40: + case 0x0D: + stream.BaseStream.Position += offset; + break; + case 0x04: + stream.BaseStream.Position += 1; + break; + default: + throw new Exception("Unhandled"); + } + } + + private void ValidateGuid(BinaryReader Stream, string str) + { + ShortGuid consumed_guid = Utilities.Consume(Stream); + if (consumed_guid != ShortGuidUtils.Generate(str)) + throw new Exception(str + " mismatch"); + } + #endregion + + #region STRUCTURES + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public struct Header + { + public fourcc FourCC; + public int VersionNum; + + public ShortGuid unk1; + public ShortGuid unk2; + public ShortGuid unk3; + + public int Offset1; + public int save_root_offset; + public int Offset3; + }; + #endregion + } +} \ No newline at end of file diff --git a/CathodeLib/Scripts/CATHODE/MoverDatabase.cs b/CathodeLib/Scripts/CATHODE/MoverDatabase.cs new file mode 100644 index 0000000..920321a --- /dev/null +++ b/CathodeLib/Scripts/CATHODE/MoverDatabase.cs @@ -0,0 +1,296 @@ +using System.Collections.Generic; +using System.IO; +using System.Runtime.InteropServices; +using System; +using CATHODE.Scripting; +using CathodeLib; +using System.Numerics; + +namespace CATHODE +{ + /* Handles Cathode MODELS.MVR files */ + public class MoverDatabase : CathodeFile + { + private int _fileSize = 32; + private int _entryCount = 0; + private int _entrySize = 320; + private int _entryCountUnk = 0; + + private List _movers = new List(); + public List Movers { get { return _movers; } } + + public MoverDatabase(string path) : base(path) { } + + #region FILE_IO + /* Load the file */ + protected override bool Load() + { + if (!File.Exists(_filepath)) return false; + + BinaryReader stream = new BinaryReader(File.OpenRead(_filepath)); + try + { + _fileSize = stream.ReadInt32(); + _entryCount = stream.ReadInt32(); + _entryCountUnk = stream.ReadInt32(); //a count of something - not sure what + stream.BaseStream.Position += 4; + _entrySize = stream.ReadInt32(); + stream.BaseStream.Position += 12; + _movers = new List(Utilities.ConsumeArray(stream, _entryCount)); + } + catch + { + stream.Close(); + return false; + } + stream.Close(); + return true; + } + + /* Save the file */ + override public bool Save() + { + _fileSize = (_movers.Count * _entrySize) + 32; + _entryCount = _movers.Count; + _entryCountUnk = 0; + + BinaryWriter stream = new BinaryWriter(File.OpenWrite(_filepath)); + try + { + stream.BaseStream.SetLength(0); + stream.Write(_fileSize); + stream.Write(_entryCount); + stream.Write(_entryCountUnk); + stream.Write(0); + stream.Write(_entrySize); + stream.Write(0); stream.Write(0); stream.Write(0); + Utilities.Write(stream, _movers); + } + catch + { + stream.Close(); + return false; + } + stream.Close(); + return true; + } + #endregion + + #region STRUCTURES + //Pulled from the iOS decomp + public enum RENDERABLE_INSTANCE_Type + { + RenderableLightInstance = 0, + RenderableDynamicFXInstance = 1, + RenderableDynamicTempFXInstance = 2, + RenderableEnvironmentInstance = 3, + RenderableCharacterInstance = 4, + RenderableMiscInstance = 5, + RenderablePlanetInstance = 6, + RenderableEnvironmentExtraInstance = 7, + RenderableFogSphereInstance = 8, + } + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public struct MOVER_DESCRIPTOR + { + /* + + RenderableScene::calculate_renderable_instance_type is called on RenderableElementSet which seems to define a type (RENDERABLE_INSTANCE::Type?) + It can have values 1-9, which I think are one of (as per RenderableScene::InstanceManager): + - RenderableCharacterInstance + - RenderableDynamicFXInstance + - RenderableDynamicTempFXInstance + - RenderableEnvironmentExtraInstance + - RenderableEnvironmentInstance + - RenderableFogSphereInstance + - RenderableLightInstance + - RenderableMiscInstance + - RenderablePlanetInstance + Logic is applied based on a numeric range, rather than per individual number (although maybe specific logic is applied within these ranges) + The ranges are: + - 1-9 + - 3-9 + - 5-9 + - 7-9 + These ranges are found using RenderableScene::ForEachInstanceType + MVR and REDS data is used per Type, being pulled from MOVER_DESCRIPTOR and RenderableElementSet respectively + + RenderableElementSet is always paired with a MOVER_DESCRIPTOR (see RenderableScene::create_instance) + + RenderableEnvironmentInstance::set_constants is what uses RENDER_CONSTANTS - look there to define that struct + RenderableEnvironmentInstance::set_gpu_constants is what uses GPU_CONSTANTS - look there to define that struct + + RenderableScene::initialize passes MOVER_DESCRIPTOR to create_instance and defines its length as 320 + RenderableScene::create_instance takes MOVER_DESCRIPTOR and grabs two values: + 296: (uint) uVar1 - used as first parameter in call to RenderableScene::add_new_zone, which passes it to g_zone_ids + 300: (uint) uVar3 - used as second parameter in call to RenderableScene::add_new_zone, which does some conditional check to call Zone::activate + + INSTANCE_DATABASE::initialise_emissive_surfaces uses MOVER_DESCRIPTOR: + 284: dunno what this is used for, but it goes +4, +8 - so 3 offsets? + + RENDERABLE_INSTANCE::TYPE values RenderableLightInstance/RenderableDynamicFxInstance/RenderableDynamicTempFXInstance/etc do this... + RenderableScene::InstanceManager<>::reserve_light_light_master_sets takes takes MOVER_DESCRIPTOR and grabs two values: + 304: uint* appears if this is 0 then light or w/e isn't initialised, then some CONCAT44 operation is applied with its value, stacking with previous lights in a while loop + RenderableScene::InstanceManager<>::add_instance_to_light_master_set also grabs this same value (304) and checks to see if its 0, then if its less than or equal to another value. + + For personal reference of offset conversions: + 0x40 = 64 + 0xa0 = 160 + 0x10c = 268 + 0x118 = 280 + 0x130 = 304 + 0x136 = 310 + 0x140 = 320 + + RenderableCharacterInstance: + 0: MATRIX_44 + 64: GPU_CONSTANTS + 160: RENDER_CONSTANTS + 268: uint* (visibility) + 310: ushort* which is used for a couple things... + RenderableCharacterInstance + 0x34 (ushort*) - (ushort)((uVar1 & 4) << 2) + if ((uVar1 & 1) != 0) then RenderableCharacterInstance::activate + + RenderableEnvironmentInstance: + 0: MATRIX_44 + 64: GPU_CONSTANTS + 160: RENDER_CONSTANTS + 268: uint* (visibility) + 280: undefined4* which sets RenderableEnvironmentInstance + 0xa0 as (short)* + 310: ushort* which is used for a couple things... + RenderableEnvironmentInstance + 0x34 (ushort*) - (ushort)((uVar1 & 4) << 2) + if ((uVar1 & 1) != 0) then RenderableEnvironmentInstance::activate + + RenderableDynamicTempFXInstance: + 0: MATRIX_44 + 64: GPU_CONSTANTS + 160: RENDER_CONSTANTS + 268: uint* (visibility) + 310: if ((uVar3 & 1) != 0) then RenderableDynamicFxInstance::activate + + RenderableDynamicFxInstance: + 0: MATRIX_44 + 64: GPU_CONSTANTS + 160: RENDER_CONSTANTS + 268: uint* (visibility) + 310: *something* + + RenderableLightInstance: + 0: MATRIX_44 + 64: GPU_CONSTANTS + 160: RENDER_CONSTANTS + 268: uint* (visibility) + 310: ushort* (logic checks on this value releated to activating RenderableLightInstance and calling LIGHT_MANAGER::add_dynamic_light) + + */ + + public Matrix4x4 transform; + //64 + public GPU_CONSTANTS gpuConstants; + //144 + public UInt64 fogsphere_val1; // 0xa0 in RenderableFogSphereInstance + public UInt64 fogsphere_val2; // 0xa8 in RenderableFogSphereInstance + //160 + public RENDER_CONSTANTS renderConstants; + //244 + public UInt32 renderableElementIndex; //reds.bin index + public UInt32 renderableElementCount; //reds.bin count + + public UInt32 resourcesIndex; + //256 + public CathodeLib.Vector3 Unknowns5_; + public UInt32 visibility; // pulled from iOS dump - should be visibility var? + //272 + public ShortGuid commandsNodeID; // this is the ID of the node inside the composite, not the instanced composite node + public ShortGuid resourcesEntryID; // NOTE: This is 'IDFromMVREntry' field on 'alien_resources_bin_entry'. + //280 + public UInt32 environmentMapIndex; //environment_map.bin index - converted to short in code + //284 + public float emissive_val1; //emissive surface val1 + public float emissive_val2; //emissive surface val2 + public float emissive_val3; //emissive surface val3 + //296 + public UInt32 zoneID; //zone id? RenderableScene::create_instance, RenderableScene::initialize + public UInt32 zoneActivator; //zone activator? RenderableScene::create_instance, RenderableScene::initialize + //304 + public UInt32 Unknowns61_; //uVar3 in reserve_light_light_master_sets, val of LightMasterSet, or an incrementer + public UInt16 Unknown17_; // TODO: It is -1 most of the time, but some times it isn't. + //310 + public UInt16 instanceTypeFlags; //ushort - used for bitwise flags depending on mover RENDERABLE_INSTANCE::Type. Environment types seem to use first bit to decide if its position comes from MVR. + //312 + public UInt32 Unknowns70_; + public UInt32 Unknowns71_; + //320 + }; + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public struct GPU_CONSTANTS //As best I can tell, this is 80 bytes long + { + /* + + As per RenderableEnvironmentInstance::set_gpu_constants, values are at: + (undefined 8) 0 + (undefined 8) 8 + (undefined 8) 16 + (undefined 8) 24 + (undefined 8) 32 + (undefined 8) 40 + (undefined 8) 48 + (undefined 8) 56 + (undefined 8) 64 + (undefined 8) 72 + + */ + + + //64 + public Vector4 LightColour; + public Vector4 MaterialTint; + //96 + public float lightVolumeIntensity; //todo: idk if this is right, but editing this value seems to increase/decrease the brightness of the light volume meshes + public float particleIntensity; //0 = black particle + public float particleSystemOffset; //todo: not sure entirely, but increasing this value seems to apply an offset to particle systems + //108 + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] + public byte[] blankSpace1; + //116 + public float lightRadius; + public Vector2 textureTile; //x = horizontal tile, y = vertical tile + //128 + public float UnknownValue1_; + public float UnknownValue2_; + public float UnknownValue3_; + public float UnknownValue4_; + //144 + } + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public struct RENDER_CONSTANTS //appears to be 84 long + { + /* + + used in + RenderableEnvironmentInstance::set_constants + RenderableMiscInstance::set_constants + RenderablePlanetInstance::set_constants + etc + + */ + + //160 + public Vector4 Unknown3_; + //176 + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] + public UInt32[] Unknowns2_; + //184 + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] + public CathodeLib.Vector3[] UnknownMinMax_; // NOTE: Sometimes I see 'nan's here too. + //208 + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 36)] + public byte[] blankSpace3; + //244 + } + #endregion + } +} \ No newline at end of file diff --git a/CathodeLib/Scripts/MiscFormats/NavigationMesh.cs b/CathodeLib/Scripts/CATHODE/NavigationMesh.cs similarity index 83% rename from CathodeLib/Scripts/MiscFormats/NavigationMesh.cs rename to CathodeLib/Scripts/CATHODE/NavigationMesh.cs index b79ca36..7493db4 100644 --- a/CathodeLib/Scripts/MiscFormats/NavigationMesh.cs +++ b/CathodeLib/Scripts/CATHODE/NavigationMesh.cs @@ -1,13 +1,12 @@ using System; -using System.Collections.Generic; using System.IO; using System.Runtime.InteropServices; -using System.Text; +using CathodeLib; -namespace CATHODE.Misc +namespace CATHODE { /* CATHODE uses a slightly modified version of Detour */ - public class NavigationMesh + public class NavigationMesh : CathodeFile { dtMeshHeader Header; @@ -20,23 +19,38 @@ public class NavigationMesh public dtBVNode[] BoundingVolumeTree; public dtOffMeshConnection[] OffMeshConnections; - public NavigationMesh(string path) + public NavigationMesh(string path) : base(path) { } + + #region FILE_IO + /* Load the file */ + protected override bool Load() { - BinaryReader stream = new BinaryReader(File.OpenRead(path)); - Header = Utilities.Consume(stream); - Vertices = Utilities.ConsumeArray(stream, Header.vertCount); - Polygons = Utilities.ConsumeArray(stream, Header.polyCount); - Links = Utilities.ConsumeArray(stream, Header.maxLinkCount); - DetailMeshes = Utilities.ConsumeArray(stream, Header.detailMeshCount); - DetailVertices = Utilities.ConsumeArray(stream, Header.vertCount); - DetailIndices = Utilities.ConsumeArray(stream, Header.detailTriCount * 4); - BoundingVolumeTree = Utilities.ConsumeArray(stream, Header.bvNodeCount); - OffMeshConnections = Utilities.ConsumeArray(stream, Header.offMeshConCount); + if (!File.Exists(_filepath)) return false; + + BinaryReader stream = new BinaryReader(File.OpenRead(_filepath)); + try + { + Header = Utilities.Consume(stream); + Vertices = Utilities.ConsumeArray(stream, Header.vertCount); + Polygons = Utilities.ConsumeArray(stream, Header.polyCount); + Links = Utilities.ConsumeArray(stream, Header.maxLinkCount); + DetailMeshes = Utilities.ConsumeArray(stream, Header.detailMeshCount); + DetailVertices = Utilities.ConsumeArray(stream, Header.vertCount); + DetailIndices = Utilities.ConsumeArray(stream, Header.detailTriCount * 4); + BoundingVolumeTree = Utilities.ConsumeArray(stream, Header.bvNodeCount); + OffMeshConnections = Utilities.ConsumeArray(stream, Header.offMeshConCount); + } + catch + { + stream.Close(); + return false; + } stream.Close(); + return true; } + #endregion - - + #region STRUCTURES [StructLayout(LayoutKind.Sequential, Pack = 1)] public struct dtMeshHeader { @@ -174,5 +188,6 @@ public struct dtOffMeshConnection /// The id of the offmesh connection. (User assigned when the navigation mesh is built.) public int userId; }; + #endregion } } diff --git a/CathodeLib/Scripts/CATHODE/PhysicsMapDatabase.cs b/CathodeLib/Scripts/CATHODE/PhysicsMapDatabase.cs new file mode 100644 index 0000000..c793d95 --- /dev/null +++ b/CathodeLib/Scripts/CATHODE/PhysicsMapDatabase.cs @@ -0,0 +1,97 @@ +using System.IO; +using System.Numerics; +using System.Runtime.InteropServices; +using CathodeLib; + +namespace CATHODE +{ + /* Handles Cathode PHYSICS.MAP files */ + public class PhysicsMapDatabase : CathodeFile + { + //TODO: tidy how we access these + public Header _header; + public Entry[] _entries; + + public PhysicsMapDatabase(string path) : base(path) { } + + #region FILE_IO + /* Load the file */ + protected override bool Load() + { + if (!File.Exists(_filepath)) return false; + + BinaryReader stream = new BinaryReader(File.OpenRead(_filepath)); + try + { + _header = Utilities.Consume
(stream); + _entries = Utilities.ConsumeArray(stream, _header.EntryCount); + } + catch + { + stream.Close(); + return false; + } + stream.Close(); + return true; + } + + /* Save the file */ + override public bool Save() + { + BinaryWriter stream = new BinaryWriter(File.OpenWrite(_filepath)); + try + { + stream.BaseStream.SetLength(0); + Utilities.Write
(stream, _header); + Utilities.Write(stream, _entries); + } + catch + { + stream.Close(); + return false; + } + stream.Close(); + return true; + } + #endregion + + #region ACCESSORS + /* Data accessors */ + public int EntryCount { get { return _entries.Length; } } + public Entry[] Entries { get { return _entries; } } + public Entry GetEntry(int i) + { + return _entries[i]; + } + + /* Data setters */ + public void SetEntry(int i, Entry content) + { + _entries[i] = content; + } + #endregion + + #region STRUCTURES + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public struct Header + { + public int FileSizeExcludingThis; + public int EntryCount; + }; + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public struct Entry + { + public int UnknownNotableValue_; + public int UnknownZero; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)] + public int[] IDs; //4 + public Vector4 Row0; // NOTE: This is a 3x4 matrix, seems to have rotation data on the leftmost 3x3 matrix, and position + public Vector4 Row1; // on the rightmost 3x1 matrix. + public Vector4 Row2; + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] + public int[] UnknownZeros_; //2 + }; + #endregion + } +} \ No newline at end of file diff --git a/CathodeLib/Scripts/CATHODE/ProgressionSave.cs b/CathodeLib/Scripts/CATHODE/ProgressionSave.cs new file mode 100644 index 0000000..96c5fbc --- /dev/null +++ b/CathodeLib/Scripts/CATHODE/ProgressionSave.cs @@ -0,0 +1,83 @@ +using System.IO; +using System.Runtime.InteropServices; +using CathodeLib; + +namespace CATHODE +{ + /* Handles Cathode PROGRESSION.AIS files */ + public class ProgressionSave : CathodeFile + { + private Progression _content; + public Progression Content { get { return _content; } } + + public ProgressionSave(string path) : base(path) { } + + #region FILE_IO + /* Load the file */ + protected override bool Load() + { + if (!File.Exists(_filepath)) return false; + + BinaryReader Stream = new BinaryReader(File.OpenRead(_filepath)); + try + { + _content = Utilities.Consume(Stream); + } + catch + { + Stream.Close(); + return false; + } + Stream.Close(); + return true; + } + + /* Save the file */ + override public bool Save() + { + BinaryWriter stream = new BinaryWriter(File.OpenWrite(_filepath)); + try + { + Utilities.Write(stream, _content); + } + catch + { + stream.Close(); + return false; + } + stream.Close(); + return true; + } + #endregion + + #region STRUCTURES + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public struct Progression + { + public fourcc FourCC; + public int VersionNum; + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 36)] public byte[] unk1; + + public byte gamepad_ControlScheme; //44 + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] unk2; + + public float gamepad_ControllerSensitivity; //48 + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] public byte[] unk3; + + public byte InvertX; //56 + public byte InvertY; //57 + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 1)] public byte[] unk4; + + public byte gamepad_Vibration; //59 + + [MarshalAs(UnmanagedType.ByValArray, SizeConst = 5)] public byte[] unk5; + + public byte aimAssist; + }; + #endregion + } +} \ No newline at end of file diff --git a/CathodeLib/Scripts/CATHODE/RenderableElementsDatabase.cs b/CathodeLib/Scripts/CATHODE/RenderableElementsDatabase.cs new file mode 100644 index 0000000..4ad43ce --- /dev/null +++ b/CathodeLib/Scripts/CATHODE/RenderableElementsDatabase.cs @@ -0,0 +1,89 @@ +using CathodeLib; +using System.Collections.Generic; +using System.IO; + +namespace CATHODE +{ + /* Handles reading/creating/writing Cathode REDS.BIN files */ + public class RenderableElementsDatabase : CathodeFile + { + private List entries = new List(); + public List RenderableElements { get { return entries; } } + + /* Load the file */ + public RenderableElementsDatabase(string path) : base(path) { } + + #region FILE_IO + /* Load the file */ + protected override bool Load() + { + if (!File.Exists(_filepath)) return false; + + BinaryReader reader = new BinaryReader(File.OpenRead(_filepath)); + try + { + int entryCount = reader.ReadInt32(); + for (int i = 0; i < entryCount; i++) + { + RenderableElement element = new RenderableElement(); + reader.BaseStream.Position += 4; + element.ModelIndex = reader.ReadInt32(); + reader.BaseStream.Position += 5; + element.MaterialLibraryIndex = reader.ReadInt32(); + reader.BaseStream.Position += 1; + element.ModelLODIndex = reader.ReadInt32(); + element.ModelLODPrimitiveCount = reader.ReadByte(); //TODO: convert to int for ease of use? + entries.Add(element); + } + } + catch + { + reader.Close(); + return false; + } + reader.Close(); + return true; + } + + /* Save the file */ + override public bool Save() + { + BinaryWriter writer = new BinaryWriter(File.OpenWrite(_filepath)); + try + { + writer.BaseStream.SetLength(0); + writer.Write(entries.Count); + for (int i = 0; i < entries.Count; i++) + { + writer.Write(new byte[] { 0x00, 0x00, 0x00, 0x00 }); + writer.Write(entries[i].ModelIndex); + writer.Write(new byte[] { 0x00, 0x00, 0x00, 0x00, 0x00 }); + writer.Write(entries[i].MaterialLibraryIndex); + writer.Write((byte)0x00); + writer.Write(entries[i].ModelLODIndex); + writer.Write((byte)entries[i].ModelLODPrimitiveCount); + } + } + catch + { + writer.Close(); + return false; + } + writer.Close(); + return true; + } + #endregion + + #region STRUCTURES + /* Definition of a Renderable Element in CATHODE */ + public class RenderableElement + { + public int ModelIndex; + public int MaterialLibraryIndex; + + public int ModelLODIndex = -1; // NOTE: Not sure, looks like it. + public byte ModelLODPrimitiveCount = 0; // NOTE: Sure it is primitive count, not sure about the ModelLOD part. + } + #endregion + } +} \ No newline at end of file diff --git a/CathodeLib/Scripts/CATHODE/ResourcesDatabase.cs b/CathodeLib/Scripts/CATHODE/ResourcesDatabase.cs new file mode 100644 index 0000000..8c2e7d8 --- /dev/null +++ b/CathodeLib/Scripts/CATHODE/ResourcesDatabase.cs @@ -0,0 +1,105 @@ +using System.IO; +using System.Runtime.InteropServices; +using CATHODE.Scripting; +using CathodeLib; + +namespace CATHODE +{ + /* Handles CATHODE RESOURCES.BIN files */ + //This file seems to govern data being drawn from either MVR or COMMANDS + public class ResourcesDatabase : CathodeFile + { + //TODO: tidy how we access these + public Header _header; + public Entry[] _entries; + + /* Load the file */ + public ResourcesDatabase(string path) : base(path) { } + + #region FILE_IO + /* Load the file */ + protected override bool Load() + { + BinaryReader stream = new BinaryReader(File.OpenRead(_filepath)); + try + { + _header = Utilities.Consume
(stream); + _entries = Utilities.ConsumeArray(stream, _header.EntryCount); + } + catch + { + stream.Close(); + return false; + } + stream.Close(); + return true; + } + + /* Save the file */ + override public bool Save() + { + BinaryWriter stream = new BinaryWriter(File.OpenWrite(_filepath)); + try + { + stream.BaseStream.SetLength(0); + Utilities.Write
(stream, _header); + Utilities.Write(stream, _entries); + } + catch + { + stream.Close(); + return false; + } + stream.Close(); + return true; + } + #endregion + + #region ACCESSORS + /* Data accessors */ + public int EntryCount { get { return _entries.Length; } } + public Entry[] Entries { get { return _entries; } } + public Entry GetEntry(int i) + { + return _entries[i]; + } + + /* Data setters */ + public void SetEntry(int i, Entry content) + { + _entries[i] = content; + } + #endregion + + #region HELPERS + /* + public void OrderEntries() + { + List entrieslist = new List(); + entrieslist.AddRange(entries); + entrieslist.OrderBy(o => o.IndexFromMVREntry); + entries = entrieslist.ToArray(); + } + */ + #endregion + + #region STRUCTURES + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public struct Header + { + public fourcc Magic; + public int UnknownOne_; //maybe file version + public int EntryCount; + public int UnknownZero_; + }; + + [StructLayout(LayoutKind.Sequential, Pack = 1)] + public struct Entry + { + public ShortGuid NodeID; + public int IDFromMVREntry; //ResourceID? + public int IndexFromMVREntry; // NOTE: This is an entry index in this file itself. + }; + #endregion + } +} \ No newline at end of file diff --git a/CathodeLib/Scripts/CathodeFile.cs b/CathodeLib/Scripts/CathodeFile.cs new file mode 100644 index 0000000..0fa0763 --- /dev/null +++ b/CathodeLib/Scripts/CathodeFile.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Text; + +namespace CathodeLib +{ + public class CathodeFile + { + public string Filepath { get { return _filepath; } } + protected string _filepath = ""; + + public bool Loaded { get { return _loaded; } } + protected bool _loaded = false; + + public CathodeFile(string filepath) + { + _filepath = filepath; + _loaded = Load(); + } + + protected virtual bool Load() + { + Console.WriteLine("WARNING: This class does not implement loading functionality!"); + return false; + } + + public virtual bool Save() + { + Console.WriteLine("WARNING: This class does not implement saving functionality!"); + return false; + } + } +} diff --git a/CathodeLib/Scripts/CommandsPAK/CathodeComposite.cs b/CathodeLib/Scripts/CommandsPAK/CathodeComposite.cs deleted file mode 100644 index 6a20c21..0000000 --- a/CathodeLib/Scripts/CommandsPAK/CathodeComposite.cs +++ /dev/null @@ -1,227 +0,0 @@ -using System; -using System.Collections.Generic; -using System.Linq; -#if UNITY_EDITOR || UNITY_STANDALONE -using UnityEngine; -#else -#endif - -namespace CATHODE.Commands -{ - /* Blocks of data in each compiled composite */ - public enum CommandsDataBlock - { - COMPOSITE_HEADER, //Defines the header of the composite, with global ID and string name - ENTITY_CONNECTIONS, //Defines the links between entities in the composite - ENTITY_PARAMETERS, //Defines parameters to be applied to entities in the composite - ENTITY_OVERRIDES, //Defines overrides to apply to nested instances of composites in this composite - ENTITY_OVERRIDES_CHECKSUM, //Defines a checksum value for the hierarchy override (TODO) - COMPOSITE_EXPOSED_PARAMETERS, //Defines variables which are exposed when instancing this composite which are then connected in to entities (think variable pins in UE4 blueprint) - ENTITY_PROXIES, //Defines "proxies" similar to the overrides hierarchy (TODO) - ENTITY_FUNCTIONS, //Defines entities with an attached script function within Cathode - RESOURCE_REFERENCES, //Defines renderable data which is referenced by entities in this composite - CAGEANIMATION_DATA, //Appears to define additional data for CAGEAnimation type entities (TODO) - TRIGGERSEQUENCE_DATA, //Appears to define additional data for TriggerSequence type entities (TODO) - - UNUSED, //Unused values - UNKNOWN_COUNTS, //TODO - unused? - - NUMBER_OF_SCRIPT_BLOCKS, //THIS IS NOT A DATA BLOCK: merely used as an easy way of sanity checking the number of blocks in-code! - } - - /* A reference to a parameter in a composite */ - [Serializable] - public class CathodeLoadedParameter - { - public CathodeLoadedParameter(ShortGuid id, CathodeParameter cont) - { - shortGUID = id; - content = cont; - } - - public ShortGuid shortGUID; //The ID of the param in the entity - public CathodeParameter content = null; - } - - /* A reference to a game resource (E.G. a renderable element, a collision mapping, etc) */ - [Serializable] - public class CathodeResourceReference : ICloneable - { - public static bool operator ==(CathodeResourceReference x, CathodeResourceReference y) - { - if (ReferenceEquals(x, null)) return ReferenceEquals(y, null); - if (ReferenceEquals(y, null)) return ReferenceEquals(x, null); - - if (x.resourceRefID != y.resourceRefID) return false; - if (x.unknownID1 != y.unknownID1) return false; - if (x.unknownID2 != y.unknownID2) return false; - if (x.positionOffset != y.positionOffset) return false; - if (x.resourceID != y.resourceID) return false; - if (x.entryType != y.entryType) return false; - if (x.entryIndexREDS != y.entryIndexREDS) return false; - if (x.entryCountREDS != y.entryCountREDS) return false; - if (x.unknownInteger1 != y.unknownInteger1) return false; - if (x.unknownInteger2 != y.unknownInteger2) return false; - if (x.entityID != y.entityID) return false; - - return true; - } - public static bool operator !=(CathodeResourceReference x, CathodeResourceReference y) - { - return !(x == y); - } - - public object Clone() - { - return this.MemberwiseClone(); - } - - public ShortGuid resourceRefID; //The ID of this entry? - public ShortGuid unknownID1; - public ShortGuid unknownID2; - public Vector3 positionOffset; //The 3D position to offset the resource by - public ShortGuid resourceID; //This is the ID also contained in the RESOURCE_ID parameter list - public CathodeResourceReferenceType entryType; //This is the type of resource entry - - //For type REDS_REFERENCE - public int entryIndexREDS; //The index in REDS.BIN - public int entryCountREDS; //The count in REDS.BIN - - //For type UNKNOWN_REFERENCE & others - public int unknownInteger1; - public int unknownInteger2; - public ShortGuid entityID; - } - - /* An entity in a composite */ - [Serializable] - public class CathodeEntity : IComparable - { - public CathodeEntity(ShortGuid id) - { - shortGUID = id; - } - - public ShortGuid shortGUID; //Translates to string in COMMANDS.BIN dump - public EntityVariant variant = EntityVariant.NOT_SETUP; - - public List childLinks = new List(); - public List parameters = new List(); - public List resources = new List(); - - public int CompareTo(CathodeEntity other) - { - int TotalThis = shortGUID.val[0] + shortGUID.val[1] + shortGUID.val[2] + shortGUID.val[3]; - int TotalOther = other.shortGUID.val[0] + other.shortGUID.val[1] + other.shortGUID.val[2] + other.shortGUID.val[3]; - if (TotalThis > TotalOther) return 1; - else if (TotalThis == TotalOther) return 0; - return -1; - } - } - [Serializable] - public class DatatypeEntity : CathodeEntity - { - public DatatypeEntity(ShortGuid id) : base(id) { variant = EntityVariant.DATATYPE; } - public CathodeDataType type = CathodeDataType.NO_TYPE; - public ShortGuid parameter; //Translates to string in COMMANDS.BIN dump - } - [Serializable] - public class FunctionEntity : CathodeEntity - { - public FunctionEntity(ShortGuid id) : base(id) { variant = EntityVariant.FUNCTION; } - public ShortGuid function; - } - [Serializable] - public class CAGEAnimation : FunctionEntity - { - public CAGEAnimation(ShortGuid id) : base(id) { function = ShortGuidUtils.Generate("CAGEAnimation"); } - public List keyframeHeaders = new List(); - public List keyframeData = new List(); - public List paramsData3 = new List(); //events? - } - [Serializable] - public class TriggerSequence : FunctionEntity - { - public TriggerSequence(ShortGuid id) : base(id) { function = ShortGuidUtils.Generate("TriggerSequence"); } - public List triggers = new List(); - public List events = new List(); - } - [Serializable] - public class ProxyEntity : CathodeEntity - { - public ProxyEntity(ShortGuid id) : base(id) { variant = EntityVariant.PROXY; } - //todo: what does the proxy nodeID translate to? is it a composite id? - public ShortGuid extraId; //todo: what is this? - public List hierarchy = new List(); - } - [Serializable] - public class OverrideEntity : CathodeEntity - { - public OverrideEntity(ShortGuid id) : base(id) { variant = EntityVariant.OVERRIDE; } - public ShortGuid checksum; //TODO: This value is apparently a hash of the hierarchy GUIDs, but need to verify that, and work out the salt. - public List hierarchy = new List(); - } - public enum EntityVariant - { - DATATYPE, - FUNCTION, - - PROXY, - OVERRIDE, - - NOT_SETUP, - } - - /* A script composite containing entities */ - [Serializable] - public class CathodeComposite - { - public ShortGuid shortGUID; //The id when this composite is used as an entity in another composite - public string name = ""; //The string name of the composite - - public OffsetPair unknownPair; - - public List unknowns = new List(); //These entities are generated using info from links & parameters. I know nothing else about them. - - public List datatypes = new List(); - public List functions = new List(); - - public List overrides = new List(); - public List proxies = new List(); - - public List resources = new List(); //Resources are per-entity, and also per-composite! - - /* If an entity exists in the composite, return it */ - public CathodeEntity GetEntityByID(ShortGuid id) - { - foreach (CathodeEntity entity in datatypes) if (entity.shortGUID == id) return entity; - foreach (CathodeEntity entity in functions) if (entity.shortGUID == id) return entity; - foreach (CathodeEntity entity in overrides) if (entity.shortGUID == id) return entity; - foreach (CathodeEntity entity in proxies) if (entity.shortGUID == id) return entity; - foreach (CathodeEntity entity in unknowns) if (entity.shortGUID == id) return entity; - return null; - } - - /* Returns a collection of all entities in the composite */ - public List GetEntities() - { - List toReturn = new List(); - toReturn.AddRange(datatypes); - toReturn.AddRange(functions); - toReturn.AddRange(overrides); - toReturn.AddRange(proxies); - toReturn.AddRange(unknowns); - return toReturn; - } - - /* Sort all entity arrays */ - public void SortEntities() - { - datatypes.OrderBy(o => o.shortGUID.ToUInt32()); - functions.OrderBy(o => o.shortGUID.ToUInt32()); - overrides.OrderBy(o => o.shortGUID.ToUInt32()); - proxies.OrderBy(o => o.shortGUID.ToUInt32()); - unknowns.OrderBy(o => o.shortGUID.ToUInt32()); - } - } -} diff --git a/CathodeLib/Scripts/CommandsPAK/EntityDB.cs b/CathodeLib/Scripts/CommandsPAK/EntityDB.cs deleted file mode 100644 index 0c855c4..0000000 --- a/CathodeLib/Scripts/CommandsPAK/EntityDB.cs +++ /dev/null @@ -1,888 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using CATHODE; -using CATHODE.Commands; -#if UNITY_EDITOR || UNITY_STANDALONE -using UnityEngine; -#endif - -namespace CathodeLib -{ - public class EntityDBDescriptor - { - public ShortGuid ID; - public string ID_cachedstring; - } - public class ShortGuidDescriptor : EntityDBDescriptor - { - public string Description; - } - public class EnumDescriptor : EntityDBDescriptor - { - public string Name; - public List Entries = new List(); - } - - public class EntityDB - { - private enum DatabaseType - { - ENUM_LOOKUP, - COMPOSITE_LOOKUP, - } - - static EntityDB() - { - lookup_enum = ReadDB(Properties.Resources.cathode_enum_lut, DatabaseType.ENUM_LOOKUP).Cast().ToList(); //Correctly formatted enum list from EXE - SetupEntityParameterList(); - } - - //Check the formatted enum dump for content - public static EnumDescriptor GetEnum(ShortGuid id) - { - return lookup_enum.FirstOrDefault(o => o.ID == id); - } - - //Get the known-valid params for a entity (this list is incomplete, and needs populating with default vals) - public static string[] GetEntityParameterList(string entity_name) - { - if (!entity_parameters.ContainsKey(entity_name)) return null; - return entity_parameters[entity_name]; - } - - //Read a generic entity database file - private static List ReadDB(byte[] db_content, DatabaseType db_type) - { - List toReturn = new List(); - BinaryReader reader = new BinaryReader(new MemoryStream(db_content)); - switch (db_type) - { - case DatabaseType.ENUM_LOOKUP: - { - reader.BaseStream.Position += 1; - while (reader.BaseStream.Position < reader.BaseStream.Length) - { - EnumDescriptor thisDesc = new EnumDescriptor(); - thisDesc.ID = new ShortGuid(reader.ReadBytes(4)); - thisDesc.Name = reader.ReadString(); - int entryCount = reader.ReadInt32(); - for (int i = 0; i < entryCount; i++) thisDesc.Entries.Add(reader.ReadString()); - toReturn.Add(thisDesc); - } - break; - } - } - reader.Close(); - for (int i = 0; i < toReturn.Count; i++) toReturn[i].ID_cachedstring = toReturn[i].ID.ToString(); - return toReturn; - } - - //Populate the entity parameter dictionary - private static void SetupEntityParameterList() - { - if (entity_parameters.Count != 0) return; - - entity_parameters.Add("AccessTerminal", new string[] { "closed", "all_data_has_been_read", "ui_breakout_triggered", "light_on_reset", "folder0", "folder1", "folder2", "folder3", "all_data_read", "location" }); - entity_parameters.Add("AchievementMonitor", new string[] { "achievement_id" }); - entity_parameters.Add("AchievementStat", new string[] { "achievement_id" }); - entity_parameters.Add("AchievementUniqueCounter", new string[] { "achievement_id", "unique_object" }); - entity_parameters.Add("AddExitObjective", new string[] { "marker", "level_name" }); - entity_parameters.Add("AddItemsToGCPool", new string[] { "items" }); - entity_parameters.Add("AddToInventory", new string[] { "success", "fail", "items" }); - entity_parameters.Add("AILightCurveSettings", new string[] { "y0", "x1", "y1", "x2", "y2", "x3" }); - entity_parameters.Add("AIMED_ITEM", new string[] { "on_started_aiming", "on_stopped_aiming", "on_display_on", "on_display_off", "on_effect_on", "on_effect_off", "target_position", "average_target_distance", "min_target_distance", "fixed_target_distance_for_local_player" }); - entity_parameters.Add("AIMED_WEAPON", new string[] { "on_fired_success", "on_fired_fail", "on_fired_fail_single", "on_impact", "on_reload_started", "on_reload_another", "on_reload_empty_clip", "on_reload_canceled", "on_reload_success", "on_reload_fail", "on_shooting_started", "on_shooting_wind_down", "on_shooting_finished", "on_overheated", "on_cooled_down", "on_charge_complete", "on_charge_started", "on_charge_stopped", "on_turned_on", "on_turned_off", "on_torch_on_requested", "on_torch_off_requested", "ammoRemainingInClip", "ammoToFillClip", "ammoThatWasInClip", "charge_percentage", "charge_noise_percentage", "weapon_type", "requires_turning_on", "ejectsShellsOnFiring", "aim_assist_scale", "default_ammo_type", "starting_ammo", "clip_size", "consume_ammo_over_time_when_turned_on", "max_auto_shots_per_second", "max_manual_shots_per_second", "wind_down_time_in_seconds", "maximum_continous_fire_time_in_seconds", "overheat_recharge_time_in_seconds", "automatic_firing", "overheats", "charged_firing", "charging_duration", "min_charge_to_fire", "overcharge_timer", "charge_noise_start_time", "reloadIndividualAmmo", "alwaysDoFullReloadOfClips", "movement_accuracy_penalty_per_second", "aim_rotation_accuracy_penalty_per_second", "accuracy_penalty_per_shot", "accuracy_accumulated_per_second", "player_exposed_accuracy_penalty_per_shot", "player_exposed_accuracy_accumulated_per_second", "recoils_on_fire", "alien_threat_aware" }); - entity_parameters.Add("ALLIANCE_ResetAll", new string[] { }); - entity_parameters.Add("ALLIANCE_SetDisposition", new string[] { "A", "B", "Disposition" }); - entity_parameters.Add("AllocateGCItemFromPoolBySubset", new string[] { "on_success", "on_failure", "selectable_items", "item_name", "item_quantity", "force_usage", "distribution_bias" }); - entity_parameters.Add("AllocateGCItemsFromPool", new string[] { "on_success", "on_failure", "items", "force_usage_count", "distribution_bias" }); - entity_parameters.Add("AllPlayersReady", new string[] { "on_all_players_ready", "start_on_reset", "pause_on_reset", "activation_delay" }); - entity_parameters.Add("AnimatedModelAttachmentNode", new string[] { "attach_on_reset", "animated_model", "attachment", "bone_name", "use_offset", "offset" }); - entity_parameters.Add("AnimationMask", new string[] { "maskHips", "maskTorso", "maskNeck", "maskHead", "maskFace", "maskLeftLeg", "maskRightLeg", "maskLeftArm", "maskRightArm", "maskLeftHand", "maskRightHand", "maskLeftFingers", "maskRightFingers", "maskTail", "maskLips", "maskEyes", "maskLeftShoulder", "maskRightShoulder", "maskRoot", "maskPrecedingLayers", "maskSelf", "maskFollowingLayers", "weight", "resource" }); - entity_parameters.Add("ApplyRelativeTransform", new string[] { "origin", "destination", "input", "output", "use_trigger_entity" }); - entity_parameters.Add("AreaHitMonitor", new string[] { "on_flamer_hit", "on_shotgun_hit", "on_pistol_hit", "SpherePos", "SphereRadius" }); - entity_parameters.Add("AssetSpawner", new string[] { "finished_spawning", "callback_triggered", "forced_despawn", "spawn_on_reset", "asset", "spawn_on_load", "allow_forced_despawn", "persist_on_callback", "allow_physics" }); - entity_parameters.Add("Benchmark", new string[] { "benchmark_name", "save_stats" }); - entity_parameters.Add("BindObjectsMultiplexer", new string[] { "Pin1_Bound", "Pin2_Bound", "Pin3_Bound", "Pin4_Bound", "Pin5_Bound", "Pin6_Bound", "Pin7_Bound", "Pin8_Bound", "Pin9_Bound", "Pin10_Bound", "objects" }); - entity_parameters.Add("BlendLowResFrame", new string[] { "blend_value", "CharacterMonitor", "character" }); - entity_parameters.Add("BloomSettings", new string[] { "frame_buffer_scale", "frame_buffer_offset", "bloom_scale", "bloom_gather_exponent", "bloom_gather_scale" }); - entity_parameters.Add("BoneAttachedCamera", new string[] { "character", "position_offset", "rotation_offset", "movement_damping", "bone_name" }); - entity_parameters.Add("BooleanLogicInterface", new string[] { "on_true", "on_false", "LHS", "RHS", "Result" }); - entity_parameters.Add("BooleanLogicOperation", new string[] { "Input", "Result" }); - entity_parameters.Add("Box", new string[] { "event", "enable_on_reset", "half_dimensions", "include_physics" }); - entity_parameters.Add("BroadcastTrigger", new string[] { "on_triggered" }); - entity_parameters.Add("BulletChamber", new string[] { "Slot1", "Slot2", "Slot3", "Slot4", "Slot5", "Slot6", "Weapon", "Geometry" }); - entity_parameters.Add("ButtonMashPrompt", new string[] { "on_back_to_zero", "on_degrade", "on_mashed", "on_success", "count", "mashes_to_completion", "time_between_degrades", "use_degrade", "hold_to_charge" }); - entity_parameters.Add("CAGEAnimation", new string[] { "animation_finished", "animation_interrupted", "animation_changed", "cinematic_loaded", "cinematic_unloaded", "enable_on_reset", "external_time", "current_time", "use_external_time", "rewind_on_stop", "jump_to_the_end", "playspeed", "anim_length", "is_cinematic", "is_cinematic_skippable", "skippable_timer", "capture_video", "capture_clip_name", "playback" }); - entity_parameters.Add("CameraAimAssistant", new string[] { "enable_on_reset", "activation_radius", "inner_radius", "camera_speed_attenuation", "min_activation_distance", "fading_range" }); - entity_parameters.Add("CameraBehaviorInterface", new string[] { "start_on_reset", "pause_on_reset", "enable_on_reset", "linked_cameras", "behavior_name", "priority", "threshold", "blend_in", "duration", "blend_out" }); - entity_parameters.Add("CameraCollisionBox", new string[] { }); - entity_parameters.Add("CameraDofController", new string[] { "character_to_focus", "focal_length_mm", "focal_plane_m", "fnum", "focal_point", "focal_point_offset", "bone_to_focus" }); - entity_parameters.Add("CameraFinder", new string[] { "camera_name" }); - entity_parameters.Add("CameraPath", new string[] { "linked_splines", "path_name", "path_type", "path_class", "is_local", "relative_position", "is_loop", "duration" }); - entity_parameters.Add("CameraPathDriven", new string[] { "position_path", "target_path", "reference_path", "position_path_transform", "target_path_transform", "reference_path_transform", "point_to_project", "path_driven_type", "invert_progression", "position_path_offset", "target_path_offset", "animation_duration" }); - entity_parameters.Add("CameraPlayAnimation", new string[] { "on_animation_finished", "animated_camera", "position_marker", "character_to_focus", "focal_length_mm", "focal_plane_m", "fnum", "focal_point", "animation_length", "frames_count", "result_transformation", "data_file", "start_frame", "end_frame", "play_speed", "loop_play", "clipping_planes_preset", "is_cinematic", "dof_key", "shot_number", "override_dof", "focal_point_offset", "bone_to_focus" }); - entity_parameters.Add("CameraResource", new string[] { "on_enter_transition_finished", "on_exit_transition_finished", "enable_on_reset", "camera_name", "is_camera_transformation_local", "camera_transformation", "fov", "clipping_planes_preset", "is_ghost", "converge_to_player_camera", "reset_player_camera_on_exit", "enable_enter_transition", "transition_curve_direction", "transition_curve_strength", "transition_duration", "transition_ease_in", "transition_ease_out", "enable_exit_transition", "exit_transition_curve_direction", "exit_transition_curve_strength", "exit_transition_duration", "exit_transition_ease_in", "exit_transition_ease_out" }); - entity_parameters.Add("CameraShake", new string[] { "relative_transformation", "impulse_intensity", "impulse_position", "shake_type", "shake_frequency", "max_rotation_angles", "max_position_offset", "shake_rotation", "shake_position", "bone_shaking", "override_weapon_swing", "internal_radius", "external_radius", "strength_damping", "explosion_push_back", "spring_constant", "spring_damping" }); - entity_parameters.Add("CamPeek", new string[] { "pos", "x_ratio", "y_ratio", "range_left", "range_right", "range_up", "range_down", "range_forward", "range_backward", "speed_x", "speed_y", "damping_x", "damping_y", "focal_distance", "focal_distance_y", "roll_factor", "use_ik_solver", "use_horizontal_plane", "stick", "disable_collision_test" }); - entity_parameters.Add("Character", new string[] { "finished_spawning", "finished_respawning", "dead_container_take_slot", "dead_container_emptied", "on_ragdoll_impact", "on_footstep", "on_despawn_requested", "spawn_on_reset", "show_on_reset", "contents_of_dead_container", "PopToNavMesh", "is_cinematic", "disable_dead_container", "allow_container_without_death", "container_interaction_text", "anim_set", "anim_tree_set", "attribute_set", "is_player", "is_backstage", "force_backstage_on_respawn", "character_class", "alliance_group", "dialogue_voice", "spawn_id", "position", "display_model", "reference_skeleton", "torso_sound", "leg_sound", "footwear_sound", "custom_character_type", "custom_character_accessory_override", "custom_character_population_type", "named_custom_character", "named_custom_character_assets_set", "gcip_distribution_bias", "inventory_set" }); - entity_parameters.Add("CharacterAttachmentNode", new string[] { "attach_on_reset", "character", "attachment", "Node", "AdditiveNode", "AdditiveNodeIntensity", "UseOffset", "Translation", "Rotation" }); - entity_parameters.Add("CharacterCommand", new string[] { "command_started", "override_all_ai" }); - entity_parameters.Add("CharacterShivaArms", new string[] { }); - entity_parameters.Add("CharacterTypeMonitor", new string[] { "spawned", "despawned", "all_despawned", "AreAny", "character_class", "trigger_on_start", "trigger_on_checkpoint_restart" }); - entity_parameters.Add("Checkpoint", new string[] { "on_checkpoint", "on_captured", "on_saved", "finished_saving", "finished_loading", "cancelled_saving", "finished_saving_to_hdd", "player_spawn_position", "is_first_checkpoint", "is_first_autorun_checkpoint", "section", "mission_number", "checkpoint_type" }); - entity_parameters.Add("CheckpointRestoredNotify", new string[] { "restored" }); - entity_parameters.Add("ChokePoint", new string[] { "resource" }); - entity_parameters.Add("CHR_DamageMonitor", new string[] { "damaged", "InstigatorFilter", "DamageDone", "Instigator", "DamageType" }); - entity_parameters.Add("CHR_DeathMonitor", new string[] { "dying", "killed", "KillerFilter", "Killer", "DamageType" }); - entity_parameters.Add("CHR_DeepCrouch", new string[] { "crouch_amount", "smooth_damping", "allow_stand_up" }); - entity_parameters.Add("CHR_GetAlliance", new string[] { "Alliance" }); - entity_parameters.Add("CHR_GetHealth", new string[] { "Health" }); - entity_parameters.Add("CHR_GetTorch", new string[] { "torch_on", "torch_off", "TorchOn" }); - entity_parameters.Add("CHR_HasWeaponOfType", new string[] { "on_true", "on_false", "Result", "weapon_type", "check_if_weapon_draw" }); - entity_parameters.Add("CHR_HoldBreath", new string[] { "ExhaustionOnStop" }); - entity_parameters.Add("CHR_IsWithinRange", new string[] { "In_range", "Out_of_range", "Position", "Radius", "Height", "Range_test_shape" }); - entity_parameters.Add("CHR_KnockedOutMonitor", new string[] { "on_knocked_out", "on_recovered" }); - entity_parameters.Add("CHR_LocomotionDuck", new string[] { "Height" }); - entity_parameters.Add("CHR_LocomotionEffect", new string[] { "Effect" }); - entity_parameters.Add("CHR_LocomotionModifier", new string[] { "Can_Run", "Can_Crouch", "Can_Aim", "Can_Injured", "Must_Walk", "Must_Run", "Must_Crouch", "Must_Aim", "Must_Injured", "Is_In_Spacesuit" }); - entity_parameters.Add("CHR_ModifyBreathing", new string[] { "Exhaustion" }); - entity_parameters.Add("Chr_PlayerCrouch", new string[] { "crouch" }); - entity_parameters.Add("CHR_PlayNPCBark", new string[] { "on_speech_started", "on_speech_finished", "queue_time", "sound_event", "speech_priority", "dialogue_mode", "action" }); - entity_parameters.Add("CHR_PlaySecondaryAnimation", new string[] { "Interrupted", "finished", "on_loaded", "Marker", "OptionalMask", "ExternalStartTime", "ExternalTime", "animationLength", "AnimationSet", "Animation", "StartFrame", "EndFrame", "PlayCount", "PlaySpeed", "StartInstantly", "AllowInterruption", "BlendInTime", "GaitSyncStart", "Mirror", "AnimationLayer", "AutomaticZoning", "ManualLoading" }); - entity_parameters.Add("CHR_RetreatMonitor", new string[] { "reached_retreat", "started_retreating" }); - entity_parameters.Add("CHR_SetAlliance", new string[] { "Alliance" }); - entity_parameters.Add("CHR_SetAndroidThrowTarget", new string[] { "thrown", "throw_position" }); - entity_parameters.Add("CHR_SetDebugDisplayName", new string[] { "DebugName" }); - entity_parameters.Add("CHR_SetFacehuggerAggroRadius", new string[] { "radius" }); - entity_parameters.Add("CHR_SetFocalPoint", new string[] { "focal_point", "priority", "speed", "steal_camera", "line_of_sight_test" }); - entity_parameters.Add("CHR_SetHeadVisibility", new string[] { "is_visible" }); - entity_parameters.Add("CHR_SetHealth", new string[] { "HealthPercentage", "UsePercentageOfCurrentHeath" }); - entity_parameters.Add("CHR_SetInvincibility", new string[] { "damage_mode" }); - entity_parameters.Add("CHR_SetMood", new string[] { "mood", "moodIntensity", "timeOut" }); - entity_parameters.Add("CHR_SetShowInMotionTracker", new string[] { }); - entity_parameters.Add("CHR_SetSubModelVisibility", new string[] { "is_visible", "matching" }); - entity_parameters.Add("CHR_SetTacticalPosition", new string[] { "tactical_position", "sweep_type", "fixed_sweep_radius" }); - entity_parameters.Add("CHR_SetTacticalPositionToTarget", new string[] { }); - entity_parameters.Add("CHR_SetTorch", new string[] { "TorchOn" }); - entity_parameters.Add("CHR_TakeDamage", new string[] { "Damage", "DamageIsAPercentage", "AmmoType" }); - entity_parameters.Add("CHR_TorchMonitor", new string[] { "torch_on", "torch_off", "TorchOn", "trigger_on_start", "trigger_on_checkpoint_restart" }); - entity_parameters.Add("CHR_VentMonitor", new string[] { "entered_vent", "exited_vent", "IsInVent", "trigger_on_start", "trigger_on_checkpoint_restart" }); - entity_parameters.Add("CHR_WeaponFireMonitor", new string[] { "fired" }); - entity_parameters.Add("ChromaticAberrations", new string[] { "aberration_scalar" }); - entity_parameters.Add("ClearPrimaryObjective", new string[] { "clear_all_sub_objectives" }); - entity_parameters.Add("ClearSubObjective", new string[] { "slot_number" }); - entity_parameters.Add("ClipPlanesController", new string[] { "near_plane", "far_plane", "update_near", "update_far" }); - entity_parameters.Add("CMD_AimAt", new string[] { "finished", "AimTarget", "Raise_gun", "use_current_target" }); - entity_parameters.Add("CMD_AimAtCurrentTarget", new string[] { "succeeded", "Raise_gun" }); - entity_parameters.Add("CMD_Die", new string[] { "Killer", "death_style" }); - entity_parameters.Add("CMD_Follow", new string[] { "entered_inner_radius", "exitted_outer_radius", "failed", "Waypoint", "idle_stance", "move_type", "inner_radius", "outer_radius", "prefer_traversals" }); - entity_parameters.Add("CMD_FollowUsingJobs", new string[] { "failed", "target_to_follow", "who_Im_leading", "fastest_allowed_move_type", "slowest_allowed_move_type", "centre_job_restart_radius", "inner_radius", "outer_radius", "job_select_radius", "job_cancel_radius", "teleport_required_range", "teleport_radius", "prefer_traversals", "avoid_player", "allow_teleports", "follow_type", "clamp_speed" }); - entity_parameters.Add("CMD_ForceMeleeAttack", new string[] { "melee_attack_type", "enemy_type", "melee_attack_index" }); - entity_parameters.Add("CMD_ForceReloadWeapon", new string[] { "success" }); - entity_parameters.Add("CMD_GoTo", new string[] { "succeeded", "failed", "Waypoint", "AimTarget", "move_type", "enable_lookaround", "use_stopping_anim", "always_stop_at_radius", "stop_at_radius_if_lined_up", "continue_from_previous_move", "disallow_traversal", "arrived_radius", "should_be_aiming", "use_current_target_as_aim", "allow_to_use_vents", "DestinationIsBackstage", "maintain_current_facing", "start_instantly" }); - entity_parameters.Add("CMD_GoToCover", new string[] { "succeeded", "failed", "entered_cover", "CoverPoint", "AimTarget", "move_type", "SearchRadius", "enable_lookaround", "duration", "continue_from_previous_move", "disallow_traversal", "should_be_aiming", "use_current_target_as_aim" }); - entity_parameters.Add("CMD_HolsterWeapon", new string[] { "failed", "success", "should_holster", "skip_anims", "equipment_slot", "force_player_unarmed_on_holster", "force_drop_held_item" }); - entity_parameters.Add("CMD_Idle", new string[] { "finished", "interrupted", "target_to_face", "should_face_target", "should_raise_gun_while_turning", "desired_stance", "duration", "idle_style", "lock_cameras", "anchor", "start_instantly" }); - entity_parameters.Add("CMD_LaunchMeleeAttack", new string[] { "finished", "melee_attack_type", "enemy_type", "melee_attack_index", "skip_convergence" }); - entity_parameters.Add("CMD_ModifyCombatBehaviour", new string[] { "behaviour_type", "status" }); - entity_parameters.Add("CMD_MoveTowards", new string[] { "succeeded", "failed", "MoveTarget", "AimTarget", "move_type", "disallow_traversal", "should_be_aiming", "use_current_target_as_aim", "never_succeed" }); - entity_parameters.Add("CMD_PlayAnimation", new string[] { "Interrupted", "finished", "badInterrupted", "on_loaded", "SafePos", "Marker", "ExitPosition", "ExternalStartTime", "ExternalTime", "OverrideCharacter", "OptionalMask", "animationLength", "AnimationSet", "Animation", "StartFrame", "EndFrame", "PlayCount", "PlaySpeed", "AllowGravity", "AllowCollision", "Start_Instantly", "AllowInterruption", "RemoveMotion", "DisableGunLayer", "BlendInTime", "GaitSyncStart", "ConvergenceTime", "LocationConvergence", "OrientationConvergence", "UseExitConvergence", "ExitConvergenceTime", "Mirror", "FullCinematic", "RagdollEnabled", "NoIK", "NoFootIK", "NoLayers", "PlayerAnimDrivenView", "ExertionFactor", "AutomaticZoning", "ManualLoading", "IsCrouchedAnim", "InitiallyBackstage", "Death_by_ragdoll_only", "dof_key", "shot_number", "UseShivaArms", "resource" }); - entity_parameters.Add("CMD_Ragdoll", new string[] { "finished", "actor", "impact_velocity" }); - entity_parameters.Add("CMD_ShootAt", new string[] { "succeeded", "failed", "Target" }); - entity_parameters.Add("CMD_StopScript", new string[] { }); - entity_parameters.Add("CollectIDTag", new string[] { "tag_id" }); - entity_parameters.Add("CollectNostromoLog", new string[] { "log_id" }); - entity_parameters.Add("CollectSevastopolLog", new string[] { "log_id" }); - entity_parameters.Add("CollisionBarrier", new string[] { "on_damaged", "deleted", "collision_type", "static_collision" }); - entity_parameters.Add("ColourCorrectionTransition", new string[] { "interpolate", "colour_lut_a", "colour_lut_b", "lut_a_contribution", "lut_b_contribution", "colour_lut_a_index", "colour_lut_b_index" }); - entity_parameters.Add("ColourSettings", new string[] { "brightness", "contrast", "saturation", "red_tint", "green_tint", "blue_tint" }); - entity_parameters.Add("CompoundVolume", new string[] { "event" }); - entity_parameters.Add("ControllableRange", new string[] { "min_range_x", "max_range_x", "min_range_y", "max_range_y", "min_feather_range_x", "max_feather_range_x", "min_feather_range_y", "max_feather_range_y", "speed_x", "speed_y", "damping_x", "damping_y", "mouse_speed_x", "mouse_speed_y" }); - entity_parameters.Add("Convo", new string[] { "everyoneArrived", "playerJoined", "playerLeft", "npcJoined", "members", "speaker", "alwaysTalkToPlayerIfPresent", "playerCanJoin", "playerCanLeave", "positionNPCs", "circularShape", "convoPosition", "personalSpaceRadius" }); - entity_parameters.Add("Counter", new string[] { "on_under_limit", "on_limit", "on_over_limit", "Count", "is_limitless", "trigger_limit" }); - entity_parameters.Add("CoverExclusionArea", new string[] { "position", "half_dimensions", "exclude_cover", "exclude_vaults", "exclude_mantles", "exclude_jump_downs", "exclude_crawl_space_spotting_positions", "exclude_spotting_positions", "exclude_assault_positions" }); - entity_parameters.Add("CoverLine", new string[] { "enable_on_reset", "LinePath", "low", "resource", "LinePathPosition" }); - entity_parameters.Add("Custom_Hiding_Controller", new string[] { "Started_Idle", "Started_Exit", "Got_Out", "Prompt_1", "Prompt_2", "Start_choking", "Start_oxygen_starvation", "Show_MT", "Hide_MT", "Spawn_MT", "Despawn_MT", "Start_Busted_By_Alien", "Start_Busted_By_Android", "End_Busted_By_Android", "Start_Busted_By_Human", "End_Busted_By_Human", "Enter_Anim", "Idle_Anim", "Exit_Anim", "has_MT", "is_high", "AlienBusted_Player_1", "AlienBusted_Alien_1", "AlienBusted_Player_2", "AlienBusted_Alien_2", "AlienBusted_Player_3", "AlienBusted_Alien_3", "AlienBusted_Player_4", "AlienBusted_Alien_4", "AndroidBusted_Player_1", "AndroidBusted_Android_1", "AndroidBusted_Player_2", "AndroidBusted_Android_2", "MT_pos" }); - entity_parameters.Add("Custom_Hiding_Vignette_controller", new string[] { "StartFade", "StopFade", "Breath", "Blackout_start_time", "run_out_time", "Vignette", "FadeValue" }); - entity_parameters.Add("DayToneMappingSettings", new string[] { "black_point", "cross_over_point", "white_point", "shoulder_strength", "toe_strength", "luminance_scale" }); - entity_parameters.Add("DEBUG_SenseLevels", new string[] { "no_activation", "trace_activation", "lower_activation", "normal_activation", "upper_activation", "Sense" }); - entity_parameters.Add("DebugCamera", new string[] { "linked_cameras" }); - entity_parameters.Add("DebugCaptureCorpse", new string[] { "finished_capturing", "character", "corpse_name" }); - entity_parameters.Add("DebugCaptureScreenShot", new string[] { "finished_capturing", "wait_for_streamer", "capture_filename", "fov", "near", "far" }); - entity_parameters.Add("DebugCheckpoint", new string[] { "on_checkpoint", "section", "level_reset" }); - entity_parameters.Add("DebugEnvironmentMarker", new string[] { "target", "float_input", "int_input", "bool_input", "vector_input", "enum_input", "text", "namespace", "size", "colour", "world_pos", "duration", "scale_with_distance", "max_string_length", "scroll_speed", "show_distance_from_target", "DebugPositionMarker", "world_pos" }); - entity_parameters.Add("DebugGraph", new string[] { "Inputs", "scale", "duration", "samples_per_second", "auto_scale", "auto_scroll" }); - entity_parameters.Add("DebugLoadCheckpoint", new string[] { "previous_checkpoint" }); - entity_parameters.Add("DebugMenuToggle", new string[] { "debug_variable", "value" }); - entity_parameters.Add("DebugObjectMarker", new string[] { "marked_object", "marked_name" }); - entity_parameters.Add("DebugText", new string[] { "duration_finished", "float_input", "int_input", "bool_input", "vector_input", "enum_input", "text_input", "text", "namespace", "size", "colour", "alignment", "duration", "pause_game", "cancel_pause_with_button_press", "priority", "ci_type" }); - entity_parameters.Add("DebugTextStacking", new string[] { "float_input", "int_input", "bool_input", "vector_input", "enum_input", "text", "namespace", "size", "colour", "ci_type", "needs_debug_opt_to_render" }); - entity_parameters.Add("DeleteBlankPanel", new string[] { "door_mechanism" }); - entity_parameters.Add("DeleteButtonDisk", new string[] { "door_mechanism", "button_type" }); - entity_parameters.Add("DeleteButtonKeys", new string[] { "door_mechanism", "button_type" }); - entity_parameters.Add("DeleteCuttingPanel", new string[] { "door_mechanism" }); - entity_parameters.Add("DeleteHacking", new string[] { "door_mechanism" }); - entity_parameters.Add("DeleteHousing", new string[] { "door_mechanism", "is_door" }); - entity_parameters.Add("DeleteKeypad", new string[] { "door_mechanism" }); - entity_parameters.Add("DeletePullLever", new string[] { "door_mechanism", "lever_type" }); - entity_parameters.Add("DeleteRotateLever", new string[] { "door_mechanism", "lever_type" }); - entity_parameters.Add("DepthOfFieldSettings", new string[] { "focal_length_mm", "focal_plane_m", "fnum", "focal_point", "use_camera_target" }); - entity_parameters.Add("DespawnCharacter", new string[] { "despawned" }); - entity_parameters.Add("DespawnPlayer", new string[] { "despawned" }); - entity_parameters.Add("Display_Element_On_Map", new string[] { "map_name", "element_name" }); - entity_parameters.Add("DisplayMessage", new string[] { "title_id", "message_id" }); - entity_parameters.Add("DisplayMessageWithCallbacks", new string[] { "on_yes", "on_no", "on_cancel", "title_text", "message_text", "yes_text", "no_text", "cancel_text", "yes_button", "no_button", "cancel_button" }); - entity_parameters.Add("DistortionOverlay", new string[] { "intensity", "time", "distortion_texture", "alpha_threshold_enabled", "threshold_texture", "range", "begin_start_time", "begin_stop_time", "end_start_time", "end_stop_time" }); - entity_parameters.Add("DistortionSettings", new string[] { "radial_distort_factor", "radial_distort_constraint", "radial_distort_scalar" }); - entity_parameters.Add("Door", new string[] { "started_opening", "started_closing", "finished_opening", "finished_closing", "used_locked", "used_unlocked", "used_forced_open", "used_forced_closed", "waiting_to_open", "highlight", "unhighlight", "zone_link", "animation", "trigger_filter", "icon_pos", "icon_usable_radius", "show_icon_when_locked", "nav_mesh", "wait_point_1", "wait_point_2", "geometry", "is_scripted", "wait_to_open", "is_waiting", "unlocked_text", "locked_text", "icon_keyframe", "detach_anim", "invert_nav_mesh_barrier" }); - entity_parameters.Add("DoorStatus", new string[] { "hacking_difficulty", "door_mechanism", "gate_type", "has_correct_keycard", "cutting_tool_level", "is_locked", "is_powered", "is_cutting_complete" }); - entity_parameters.Add("DurangoVideoCapture", new string[] { "clip_name" }); - entity_parameters.Add("EFFECT_DirectionalPhysics", new string[] { "relative_direction", "effect_distance", "angular_falloff", "min_force", "max_force" }); - entity_parameters.Add("EFFECT_EntityGenerator", new string[] { "entities", "trigger_on_reset", "count", "spread", "force_min", "force_max", "force_offset_XY_min", "force_offset_XY_max", "force_offset_Z_min", "force_offset_Z_max", "lifetime_min", "lifetime_max", "use_local_rotation" }); - entity_parameters.Add("EFFECT_ImpactGenerator", new string[] { "on_impact", "on_failed", "trigger_on_reset", "min_distance", "distance", "max_count", "count", "spread", "skip_characters", "use_local_rotation" }); - entity_parameters.Add("EggSpawner", new string[] { "egg_position", "hostile_egg" }); - entity_parameters.Add("ElapsedTimer", new string[] { }); - entity_parameters.Add("EnableMotionTrackerPassiveAudio", new string[] { }); - entity_parameters.Add("EndGame", new string[] { "on_game_end_started", "on_game_ended", "success" }); - entity_parameters.Add("ENT_Debug_Exit_Game", new string[] { "FailureText", "FailureCode" }); - entity_parameters.Add("EnvironmentMap", new string[] { "Entities", "Priority", "ColourFactor", "EmissiveFactor", "Texture", "Texture_Index", "environmentmap_index" }); - entity_parameters.Add("EnvironmentModelReference", new string[] { "resource" }); - entity_parameters.Add("EQUIPPABLE_ITEM", new string[] { "finished_spawning", "equipped", "unequipped", "on_pickup", "on_discard", "on_melee_impact", "on_used_basic_function", "spawn_on_reset", "item_animated_asset", "owner", "has_owner", "character_animation_context", "character_activate_animation_context", "left_handed", "inventory_name", "equipment_slot", "holsters_on_owner", "holster_node", "holster_scale", "weapon_handedness" }); - entity_parameters.Add("ExclusiveMaster", new string[] { "active_objects", "inactive_objects", "resource" }); - entity_parameters.Add("Explosion_AINotifier", new string[] { "on_character_damage_fx", "ExplosionPos", "AmmoType" }); - entity_parameters.Add("ExternalVariableBool", new string[] { "game_variable" }); - entity_parameters.Add("FakeAILightSourceInPlayersHand", new string[] { "radius", "pos" }); - entity_parameters.Add("FilmGrainSettings", new string[] { "low_lum_amplifier", "mid_lum_amplifier", "high_lum_amplifier", "low_lum_range", "mid_lum_range", "high_lum_range", "noise_texture_scale", "adaptive", "adaptation_scalar", "adaptation_time_scalar", "unadapted_low_lum_amplifier", "unadapted_mid_lum_amplifier", "unadapted_high_lum_amplifier" }); - entity_parameters.Add("FilterAbsorber", new string[] { "output", "factor", "start_value", "input" }); - entity_parameters.Add("FilterAnd", new string[] { "filter" }); - entity_parameters.Add("FilterBelongsToAlliance", new string[] { "alliance_group" }); - entity_parameters.Add("FilterCanSeeTarget", new string[] { "Target" }); - entity_parameters.Add("FilterHasBehaviourTreeFlagSet", new string[] { "BehaviourTreeFlag" }); - entity_parameters.Add("FilterHasPlayerCollectedIdTag", new string[] { "tag_id" }); - entity_parameters.Add("FilterHasWeaponEquipped", new string[] { "weapon_type" }); - entity_parameters.Add("FilterHasWeaponOfType", new string[] { "weapon_type" }); - entity_parameters.Add("FilterIsACharacter", new string[] { }); - entity_parameters.Add("FilterIsAgressing", new string[] { "Target" }); - entity_parameters.Add("FilterIsAnySaveInProgress", new string[] { }); - entity_parameters.Add("FilterIsAPlayer", new string[] { }); - entity_parameters.Add("FilterIsCharacter", new string[] { "character" }); - entity_parameters.Add("FilterIsCharacterClass", new string[] { "character_class" }); - entity_parameters.Add("FilterIsCharacterClassCombo", new string[] { "character_classes" }); - entity_parameters.Add("FilterIsDead", new string[] { }); - entity_parameters.Add("FilterIsEnemyOfAllianceGroup", new string[] { "alliance_group" }); - entity_parameters.Add("FilterIsEnemyOfCharacter", new string[] { "Character", "use_alliance_at_death" }); - entity_parameters.Add("FilterIsEnemyOfPlayer", new string[] { }); - entity_parameters.Add("FilterIsFacingTarget", new string[] { "target", "tolerance" }); - entity_parameters.Add("FilterIsHumanNPC", new string[] { }); - entity_parameters.Add("FilterIsInAGroup", new string[] { }); - entity_parameters.Add("FilterIsInAlertnessState", new string[] { "AlertState" }); - entity_parameters.Add("FilterIsinInventory", new string[] { "ItemName" }); - entity_parameters.Add("FilterIsInLocomotionState", new string[] { "State" }); - entity_parameters.Add("FilterIsInWeaponRange", new string[] { "weapon_owner" }); - entity_parameters.Add("FilterIsLocalPlayer", new string[] { }); - entity_parameters.Add("FilterIsNotDeadManWalking", new string[] { }); - entity_parameters.Add("FilterIsObject", new string[] { "objects" }); - entity_parameters.Add("FilterIsPhysics", new string[] { }); - entity_parameters.Add("FilterIsPhysicsObject", new string[] { "object" }); - entity_parameters.Add("FilterIsPlatform", new string[] { "Platform" }); - entity_parameters.Add("FilterIsUsingDevice", new string[] { "Device" }); - entity_parameters.Add("FilterIsValidInventoryItem", new string[] { "item" }); - entity_parameters.Add("FilterIsWithdrawnAlien", new string[] { }); - entity_parameters.Add("FilterNot", new string[] { "filter" }); - entity_parameters.Add("FilterOr", new string[] { "filter" }); - entity_parameters.Add("FilterSmallestUsedDifficulty", new string[] { "difficulty" }); - entity_parameters.Add("FixedCamera", new string[] { "use_transform_position", "transform_position", "camera_position", "camera_target", "camera_position_offset", "camera_target_offset", "apply_target", "apply_position", "use_target_offset", "use_position_offset" }); - entity_parameters.Add("FlareSettings", new string[] { "flareOffset0", "flareIntensity0", "flareAttenuation0", "flareOffset1", "flareIntensity1", "flareAttenuation1", "flareOffset2", "flareIntensity2", "flareAttenuation2", "flareOffset3", "flareIntensity3", "flareAttenuation3" }); - entity_parameters.Add("FlareTask", new string[] { "specific_character", "filter_options" }); - entity_parameters.Add("FlashCallback", new string[] { "callback", "callback_name" }); - entity_parameters.Add("FlashInvoke", new string[] { "layer_name", "mrtt_texture", "method", "invoke_type", "int_argument_0", "int_argument_1", "int_argument_2", "int_argument_3", "float_argument_0", "float_argument_1", "float_argument_2", "float_argument_3" }); - entity_parameters.Add("FlashScript", new string[] { "show_on_reset", "filename", "layer_name", "target_texture_name", "type" }); - entity_parameters.Add("FloatAbsolute", new string[] { }); - entity_parameters.Add("FloatAdd", new string[] { }); - entity_parameters.Add("FloatAdd_All", new string[] { }); - entity_parameters.Add("FloatClamp", new string[] { "Min", "Max", "Value", "Result" }); - entity_parameters.Add("FloatClampMultiply", new string[] { "Min", "Max" }); - entity_parameters.Add("FloatCompare", new string[] { "on_true", "on_false", "LHS", "RHS", "Threshold", "Result" }); - entity_parameters.Add("FloatDivide", new string[] { }); - entity_parameters.Add("FloatEquals", new string[] { }); - entity_parameters.Add("FloatGetLinearProportion", new string[] { "Min", "Input", "Max", "Proportion" }); - entity_parameters.Add("FloatGreaterThan", new string[] { }); - entity_parameters.Add("FloatGreaterThanOrEqual", new string[] { }); - entity_parameters.Add("FloatLessThan", new string[] { }); - entity_parameters.Add("FloatLessThanOrEqual", new string[] { }); - entity_parameters.Add("FloatLinearInterpolateSpeed", new string[] { "on_finished", "on_think", "Result", "Initial_Value", "Target_Value", "Speed", "PingPong", "Loop" }); - entity_parameters.Add("FloatLinearInterpolateSpeedAdvanced", new string[] { "on_finished", "on_think", "trigger_on_min", "trigger_on_max", "trigger_on_loop", "Result", "Initial_Value", "Min_Value", "Max_Value", "Speed", "PingPong", "Loop" }); - entity_parameters.Add("FloatLinearInterpolateTimed", new string[] { "on_finished", "on_think", "Result", "Initial_Value", "Target_Value", "Time", "PingPong", "Loop" }); - entity_parameters.Add("FloatLinearProportion", new string[] { "Initial_Value", "Target_Value", "Proportion", "Result" }); - entity_parameters.Add("FloatMath", new string[] { "LHS", "RHS", "Result" }); - entity_parameters.Add("FloatMath_All", new string[] { "Numbers", "Result" }); - entity_parameters.Add("FloatMax", new string[] { }); - entity_parameters.Add("FloatMax_All", new string[] { }); - entity_parameters.Add("FloatMin", new string[] { }); - entity_parameters.Add("FloatMin_All", new string[] { }); - entity_parameters.Add("FloatModulate", new string[] { "on_think", "Result", "wave_shape", "frequency", "phase", "amplitude", "bias" }); - entity_parameters.Add("FloatModulateRandom", new string[] { "on_full_switched_on", "on_full_switched_off", "on_think", "Result", "switch_on_anim", "switch_on_delay", "switch_on_custom_frequency", "switch_on_duration", "switch_off_anim", "switch_off_custom_frequency", "switch_off_duration", "behaviour_anim", "behaviour_frequency", "behaviour_frequency_variance", "behaviour_offset", "pulse_modulation", "oscillate_range_min", "sparking_speed", "blink_rate", "blink_range_min", "flicker_rate", "flicker_off_rate", "flicker_range_min", "flicker_off_range_min", "disable_behaviour" }); - entity_parameters.Add("FloatMultiply", new string[] { }); - entity_parameters.Add("FloatMultiply_All", new string[] { "Invert" }); - entity_parameters.Add("FloatMultiplyClamp", new string[] { "Min", "Max" }); - entity_parameters.Add("FloatNotEqual", new string[] { }); - entity_parameters.Add("FloatOperation", new string[] { "Input", "Result" }); - entity_parameters.Add("FloatReciprocal", new string[] { }); - entity_parameters.Add("FloatRemainder", new string[] { }); - entity_parameters.Add("FloatSmoothStep", new string[] { "Low_Edge", "High_Edge", "Value", "Result" }); - entity_parameters.Add("FloatSqrt", new string[] { }); - entity_parameters.Add("FloatSubtract", new string[] { }); - entity_parameters.Add("FlushZoneCache", new string[] { "CurrentGen", "NextGen" }); - entity_parameters.Add("FogBox", new string[] { "deleted", "show_on_reset", "GEOMETRY_TYPE", "COLOUR_TINT", "DISTANCE_FADE", "ANGLE_FADE", "BILLBOARD", "EARLY_ALPHA", "LOW_RES", "CONVEX_GEOM", "THICKNESS", "START_DISTANT_CLIP", "START_DISTANCE_FADE", "SOFTNESS", "SOFTNESS_EDGE", "LINEAR_HEIGHT_DENSITY", "SMOOTH_HEIGHT_DENSITY", "HEIGHT_MAX_DENSITY", "FRESNEL_FALLOFF", "FRESNEL_POWER", "DEPTH_INTERSECT_COLOUR", "DEPTH_INTERSECT_INITIAL_COLOUR", "DEPTH_INTERSECT_INITIAL_ALPHA", "DEPTH_INTERSECT_MIDPOINT_COLOUR", "DEPTH_INTERSECT_MIDPOINT_ALPHA", "DEPTH_INTERSECT_MIDPOINT_DEPTH", "DEPTH_INTERSECT_END_COLOUR", "DEPTH_INTERSECT_END_ALPHA", "DEPTH_INTERSECT_END_DEPTH", "resource" }); - entity_parameters.Add("FogPlane", new string[] { "fog_plane_resource", "start_distance_fade_scalar", "distance_fade_scalar", "angle_fade_scalar", "linear_height_density_fresnel_power_scalar", "linear_heigth_density_max_scalar", "tint", "thickness_scalar", "edge_softness_scalar", "diffuse_0_uv_scalar", "diffuse_0_speed_scalar", "diffuse_1_uv_scalar", "diffuse_1_speed_scalar" }); - entity_parameters.Add("FogSetting", new string[] { "linear_distance", "max_distance", "linear_density", "exponential_density", "near_colour", "far_colour" }); - entity_parameters.Add("FogSphere", new string[] { "deleted", "show_on_reset", "COLOUR_TINT", "INTENSITY", "OPACITY", "EARLY_ALPHA", "LOW_RES_ALPHA", "CONVEX_GEOM", "DISABLE_SIZE_CULLING", "NO_CLIP", "ALPHA_LIGHTING", "DYNAMIC_ALPHA_LIGHTING", "DENSITY", "EXPONENTIAL_DENSITY", "SCENE_DEPENDANT_DENSITY", "FRESNEL_TERM", "FRESNEL_POWER", "SOFTNESS", "SOFTNESS_EDGE", "BLEND_ALPHA_OVER_DISTANCE", "FAR_BLEND_DISTANCE", "NEAR_BLEND_DISTANCE", "SECONDARY_BLEND_ALPHA_OVER_DISTANCE", "SECONDARY_FAR_BLEND_DISTANCE", "SECONDARY_NEAR_BLEND_DISTANCE", "DEPTH_INTERSECT_COLOUR", "DEPTH_INTERSECT_COLOUR_VALUE", "DEPTH_INTERSECT_ALPHA_VALUE", "DEPTH_INTERSECT_RANGE", "resource" }); - entity_parameters.Add("FollowCameraModifier", new string[] { "enable_on_reset", "position_curve", "target_curve", "modifier_type", "position_offset", "target_offset", "field_of_view", "force_state", "force_state_initial_value", "can_mirror", "is_first_person", "bone_blending_ratio", "movement_speed", "movement_speed_vertical", "movement_damping", "horizontal_limit_min", "horizontal_limit_max", "vertical_limit_min", "vertical_limit_max", "mouse_speed_hori", "mouse_speed_vert", "acceleration_duration", "acceleration_ease_in", "acceleration_ease_out", "transition_duration", "transition_ease_in", "transition_ease_out" }); - entity_parameters.Add("FollowTask", new string[] { "can_initially_end_early", "stop_radius" }); - entity_parameters.Add("Force_UI_Visibility", new string[] { "also_disable_interactions" }); - entity_parameters.Add("FullScreenBlurSettings", new string[] { "contribution" }); - entity_parameters.Add("FullScreenOverlay", new string[] { "overlay_texture", "threshold_value", "threshold_start", "threshold_stop", "threshold_range", "alpha_scalar" }); - entity_parameters.Add("GameDVR", new string[] { "start_time", "duration", "moment_ID" }); - entity_parameters.Add("GameOver", new string[] { "tip_string_id", "default_tips_enabled", "level_tips_enabled" }); - entity_parameters.Add("GameOverCredits", new string[] { }); - entity_parameters.Add("GameplayTip", new string[] { "string_id" }); - entity_parameters.Add("GameStateChanged", new string[] { "mission_number" }); - entity_parameters.Add("GateResourceInterface", new string[] { "gate_status_changed", "request_open_on_reset", "request_lock_on_reset", "force_open_on_reset", "force_close_on_reset", "is_auto", "auto_close_delay", "is_open", "is_locked", "gate_status" }); - entity_parameters.Add("GenericHighlightEntity", new string[] { "highlight_geometry" }); - entity_parameters.Add("GetBlueprintAvailable", new string[] { "available", "type" }); - entity_parameters.Add("GetBlueprintLevel", new string[] { "level", "type" }); - entity_parameters.Add("GetCentrePoint", new string[] { "Positions", "position_of_centre" }); - entity_parameters.Add("GetCharacterRotationSpeed", new string[] { "character", "speed" }); - entity_parameters.Add("GetClosestPercentOnSpline", new string[] { "spline", "pos_to_be_near", "position_on_spline", "Result", "bidirectional" }); - entity_parameters.Add("GetClosestPoint", new string[] { "bound_to_closest", "Positions", "pos_to_be_near", "position_of_closest" }); - entity_parameters.Add("GetClosestPointFromSet", new string[] { "closest_is_1", "closest_is_2", "closest_is_3", "closest_is_4", "closest_is_5", "closest_is_6", "closest_is_7", "closest_is_8", "closest_is_9", "closest_is_10", "Position_1", "Position_2", "Position_3", "Position_4", "Position_5", "Position_6", "Position_7", "Position_8", "Position_9", "Position_10", "pos_to_be_near", "position_of_closest", "index_of_closest" }); - entity_parameters.Add("GetClosestPointOnSpline", new string[] { "spline", "pos_to_be_near", "position_on_spline", "look_ahead_distance", "unidirectional", "directional_damping_threshold" }); - entity_parameters.Add("GetComponentInterface", new string[] { "Input", "Result" }); - entity_parameters.Add("GetCurrentCameraFov", new string[] { }); - entity_parameters.Add("GetCurrentCameraPos", new string[] { }); - entity_parameters.Add("GetCurrentCameraTarget", new string[] { "target", "distance" }); - entity_parameters.Add("GetCurrentPlaylistLevelIndex", new string[] { "index" }); - entity_parameters.Add("GetFlashFloatValue", new string[] { "callback", "enable_on_reset", "float_value", "callback_name" }); - entity_parameters.Add("GetFlashIntValue", new string[] { "callback", "enable_on_reset", "int_value", "callback_name" }); - entity_parameters.Add("GetGatingToolLevel", new string[] { "level", "tool_type" }); - entity_parameters.Add("GetInventoryItemName", new string[] { "item", "equippable_item" }); - entity_parameters.Add("GetNextPlaylistLevelName", new string[] { "level_name" }); - entity_parameters.Add("GetPlayerHasGatingTool", new string[] { "has_tool", "doesnt_have_tool", "tool_type" }); - entity_parameters.Add("GetPlayerHasKeycard", new string[] { "has_card", "doesnt_have_card", "card_uid" }); - entity_parameters.Add("GetPointOnSpline", new string[] { "spline", "percentage_of_spline", "Result" }); - entity_parameters.Add("GetRotation", new string[] { "Input", "Result" }); - entity_parameters.Add("GetSelectedCharacterId", new string[] { "character_id" }); - entity_parameters.Add("GetSplineLength", new string[] { "spline", "Result" }); - entity_parameters.Add("GetTranslation", new string[] { "Input", "Result" }); - entity_parameters.Add("GetX", new string[] { }); - entity_parameters.Add("GetY", new string[] { }); - entity_parameters.Add("GetZ", new string[] { }); - entity_parameters.Add("GlobalEvent", new string[] { "EventValue", "EventName" }); - entity_parameters.Add("GlobalEventMonitor", new string[] { "Event_1", "Event_2", "Event_3", "Event_4", "Event_5", "Event_6", "Event_7", "Event_8", "Event_9", "Event_10", "Event_11", "Event_12", "Event_13", "Event_14", "Event_15", "Event_16", "Event_17", "Event_18", "Event_19", "Event_20", "EventName" }); - entity_parameters.Add("GlobalPosition", new string[] { "PositionName" }); - entity_parameters.Add("GoToFrontend", new string[] { "frontend_state" }); - entity_parameters.Add("GPU_PFXEmitterReference", new string[] { "start_on_reset", "deleted", "mastered_by_visibility", "EFFECT_NAME", "SPAWN_NUMBER", "SPAWN_RATE", "SPREAD_MIN", "SPREAD_MAX", "EMITTER_SIZE", "SPEED", "SPEED_VAR", "LIFETIME", "LIFETIME_VAR" }); - entity_parameters.Add("HableToneMappingSettings", new string[] { "shoulder_strength", "linear_strength", "linear_angle", "toe_strength", "toe_numerator", "toe_denominator", "linear_white_point" }); - entity_parameters.Add("HackingGame", new string[] { "win", "fail", "alarm_triggered", "closed", "loaded_idle", "loaded_success", "ui_breakout_triggered", "resources_finished_unloading", "resources_finished_loading", "lock_on_reset", "light_on_reset", "completion_percentage", "hacking_difficulty", "auto_exit" }); - entity_parameters.Add("HandCamera", new string[] { "noise_type", "frequency", "damping", "rotation_intensity", "min_fov_range", "max_fov_range", "min_noise", "max_noise" }); - entity_parameters.Add("HasAccessAtDifficulty", new string[] { "difficulty" }); - entity_parameters.Add("HeldItem_AINotifier", new string[] { "Item", "Duration" }); - entity_parameters.Add("HighSpecMotionBlurSettings", new string[] { "contribution", "camera_velocity_scalar", "camera_velocity_min", "camera_velocity_max", "object_velocity_scalar", "object_velocity_min", "object_velocity_max", "blur_range" }); - entity_parameters.Add("HostOnlyTrigger", new string[] { "on_triggered" }); - entity_parameters.Add("IdleTask", new string[] { "start_pre_move", "start_interrupt", "interrupted_while_moving", "specific_character", "should_auto_move_to_position", "ignored_for_auto_selection", "has_pre_move_script", "has_interrupt_script", "filter_options" }); - entity_parameters.Add("ImpactSphere", new string[] { "event", "radius", "include_physics" }); - entity_parameters.Add("InhibitActionsUntilRelease", new string[] { }); - entity_parameters.Add("IntegerAbsolute", new string[] { }); - entity_parameters.Add("IntegerAdd", new string[] { }); - entity_parameters.Add("IntegerAdd_All", new string[] { }); - entity_parameters.Add("IntegerAnalyse", new string[] { "Input", "Result", "Val0", "Val1", "Val2", "Val3", "Val4", "Val5", "Val6", "Val7", "Val8", "Val9" }); - entity_parameters.Add("IntegerAnd", new string[] { }); - entity_parameters.Add("IntegerCompare", new string[] { "on_true", "on_false", "LHS", "RHS", "Result" }); - entity_parameters.Add("IntegerCompliment", new string[] { }); - entity_parameters.Add("IntegerDivide", new string[] { }); - entity_parameters.Add("IntegerEquals", new string[] { }); - entity_parameters.Add("IntegerGreaterThan", new string[] { }); - entity_parameters.Add("IntegerGreaterThanOrEqual", new string[] { }); - entity_parameters.Add("IntegerLessThan", new string[] { }); - entity_parameters.Add("IntegerLessThanOrEqual", new string[] { }); - entity_parameters.Add("IntegerMath", new string[] { "LHS", "RHS", "Result" }); - entity_parameters.Add("IntegerMath_All", new string[] { "Numbers", "Result" }); - entity_parameters.Add("IntegerMax", new string[] { }); - entity_parameters.Add("IntegerMax_All", new string[] { }); - entity_parameters.Add("IntegerMin", new string[] { }); - entity_parameters.Add("IntegerMin_All", new string[] { }); - entity_parameters.Add("IntegerMultiply", new string[] { }); - entity_parameters.Add("IntegerMultiply_All", new string[] { }); - entity_parameters.Add("IntegerNotEqual", new string[] { }); - entity_parameters.Add("IntegerOperation", new string[] { "Input", "Result" }); - entity_parameters.Add("IntegerOr", new string[] { }); - entity_parameters.Add("IntegerRemainder", new string[] { }); - entity_parameters.Add("IntegerSubtract", new string[] { }); - entity_parameters.Add("Interaction", new string[] { "on_damaged", "on_interrupt", "on_killed", "interruptible_on_start" }); - entity_parameters.Add("InteractiveMovementControl", new string[] { "completed", "duration", "start_time", "progress_path", "result", "speed", "can_go_both_ways", "use_left_input_stick", "base_progress_speed", "movement_threshold", "momentum_damping", "track_bone_position", "character_node", "track_position" }); - entity_parameters.Add("Internal_JOB_SearchTarget", new string[] { }); - entity_parameters.Add("InventoryItem", new string[] { "collect", "itemName", "out_itemName", "out_quantity", "item", "quantity", "clear_on_collect", "gcip_instances_count" }); - entity_parameters.Add("IrawanToneMappingSettings", new string[] { "target_device_luminance", "target_device_adaptation", "saccadic_time", "superbright_adaptation" }); - entity_parameters.Add("IsActive", new string[] { }); - entity_parameters.Add("IsAttached", new string[] { }); - entity_parameters.Add("IsCurrentLevelAChallengeMap", new string[] { "challenge_map" }); - entity_parameters.Add("IsCurrentLevelAPreorderMap", new string[] { "preorder_map" }); - entity_parameters.Add("IsEnabled", new string[] { }); - entity_parameters.Add("IsInstallComplete", new string[] { }); - entity_parameters.Add("IsLoaded", new string[] { }); - entity_parameters.Add("IsLoading", new string[] { }); - entity_parameters.Add("IsLocked", new string[] { }); - entity_parameters.Add("IsMultiplayerMode", new string[] { }); - entity_parameters.Add("IsOpen", new string[] { }); - entity_parameters.Add("IsOpening", new string[] { }); - entity_parameters.Add("IsPaused", new string[] { }); - entity_parameters.Add("IsPlaylistTypeAll", new string[] { "all" }); - entity_parameters.Add("IsPlaylistTypeMarathon", new string[] { "marathon" }); - entity_parameters.Add("IsPlaylistTypeSingle", new string[] { "single" }); - entity_parameters.Add("IsSpawned", new string[] { }); - entity_parameters.Add("IsStarted", new string[] { }); - entity_parameters.Add("IsSuspended", new string[] { }); - entity_parameters.Add("IsVisible", new string[] { }); - entity_parameters.Add("Job", new string[] { "start_on_reset" }); - entity_parameters.Add("JOB_AreaSweep", new string[] { }); - entity_parameters.Add("JOB_AreaSweepFlare", new string[] { }); - entity_parameters.Add("JOB_Assault", new string[] { }); - entity_parameters.Add("JOB_Follow", new string[] { }); - entity_parameters.Add("JOB_Follow_Centre", new string[] { }); - entity_parameters.Add("JOB_Idle", new string[] { "task_operation_mode", "should_perform_all_tasks" }); - entity_parameters.Add("JOB_Panic", new string[] { }); - entity_parameters.Add("JOB_SpottingPosition", new string[] { "SpottingPosition" }); - entity_parameters.Add("JOB_SystematicSearch", new string[] { }); - entity_parameters.Add("JOB_SystematicSearchFlare", new string[] { }); - entity_parameters.Add("JobWithPosition", new string[] { }); - entity_parameters.Add("LeaderboardWriter", new string[] { "time_elapsed", "score", "level_number", "grade", "player_character", "combat", "stealth", "improv", "star1", "star2", "star3" }); - entity_parameters.Add("LeaveGame", new string[] { "disconnect_from_session" }); - entity_parameters.Add("LensDustSettings", new string[] { "DUST_MAX_REFLECTED_BLOOM_INTENSITY", "DUST_REFLECTED_BLOOM_INTENSITY_SCALAR", "DUST_MAX_BLOOM_INTENSITY", "DUST_BLOOM_INTENSITY_SCALAR", "DUST_THRESHOLD" }); - entity_parameters.Add("LevelCompletionTargets", new string[] { "TargetTime", "NumDeaths", "TeamRespawnBonus", "NoLocalRespawnBonus", "NoRespawnBonus", "GrappleBreakBonus" }); - entity_parameters.Add("LevelInfo", new string[] { "save_level_name_id" }); - entity_parameters.Add("LevelLoaded", new string[] { }); - entity_parameters.Add("LightAdaptationSettings", new string[] { "fast_neural_t0", "slow_neural_t0", "pigment_bleaching_t0", "fb_luminance_to_candelas_per_m2", "max_adaptation_lum", "min_adaptation_lum", "adaptation_percentile", "low_bracket", "high_bracket", "adaptation_mechanism" }); - entity_parameters.Add("LightingMaster", new string[] { "light_on_reset", "objects" }); - entity_parameters.Add("LightReference", new string[] { "deleted", "show_on_reset", "light_on_reset", "occlusion_geometry", "mastered_by_visibility", "exclude_shadow_entities", "type", "defocus_attenuation", "start_attenuation", "end_attenuation", "physical_attenuation", "near_dist", "near_dist_shadow_offset", "inner_cone_angle", "outer_cone_angle", "intensity_multiplier", "radiosity_multiplier", "area_light_radius", "diffuse_softness", "diffuse_bias", "glossiness_scale", "flare_occluder_radius", "flare_spot_offset", "flare_intensity_scale", "cast_shadow", "fade_type", "is_specular", "has_lens_flare", "has_noclip", "is_square_light", "is_flash_light", "no_alphalight", "include_in_planar_reflections", "shadow_priority", "aspect_ratio", "gobo_texture", "horizontal_gobo_flip", "colour", "strip_length", "distance_mip_selection_gobo", "volume", "volume_end_attenuation", "volume_colour_factor", "volume_density", "depth_bias", "slope_scale_depth_bias", "resource" }); - entity_parameters.Add("LimitItemUse", new string[] { "enable_on_reset", "items" }); - entity_parameters.Add("LODControls", new string[] { "lod_range_scalar", "disable_lods" }); - entity_parameters.Add("Logic_MultiGate", new string[] { "Underflow", "Pin_1", "Pin_2", "Pin_3", "Pin_4", "Pin_5", "Pin_6", "Pin_7", "Pin_8", "Pin_9", "Pin_10", "Pin_11", "Pin_12", "Pin_13", "Pin_14", "Pin_15", "Pin_16", "Pin_17", "Pin_18", "Pin_19", "Pin_20", "Overflow", "trigger_pin" }); - entity_parameters.Add("Logic_Vent_Entrance", new string[] { "Hide_Pos", "Emit_Pos", "force_stand_on_exit" }); - entity_parameters.Add("Logic_Vent_System", new string[] { "Vent_Entrances" }); - entity_parameters.Add("LogicAll", new string[] { "Pin1_Synced", "Pin2_Synced", "Pin3_Synced", "Pin4_Synced", "Pin5_Synced", "Pin6_Synced", "Pin7_Synced", "Pin8_Synced", "Pin9_Synced", "Pin10_Synced", "num", "reset_on_trigger" }); - entity_parameters.Add("LogicCounter", new string[] { "on_under_limit", "on_limit", "on_over_limit", "restored_on_under_limit", "restored_on_limit", "restored_on_over_limit", "Count", "is_limitless", "trigger_limit", "non_persistent" }); - entity_parameters.Add("LogicDelay", new string[] { "on_delay_finished", "delay", "can_suspend" }); - entity_parameters.Add("LogicGate", new string[] { "on_allowed", "on_disallowed", "allow" }); - entity_parameters.Add("LogicGateAnd", new string[] { }); - entity_parameters.Add("LogicGateEquals", new string[] { }); - entity_parameters.Add("LogicGateNotEqual", new string[] { }); - entity_parameters.Add("LogicGateOr", new string[] { }); - entity_parameters.Add("LogicNot", new string[] { }); - entity_parameters.Add("LogicOnce", new string[] { "on_success", "on_failure" }); - entity_parameters.Add("LogicPressurePad", new string[] { "Pad_Activated", "Pad_Deactivated", "bound_characters", "Limit", "Count" }); - entity_parameters.Add("LogicSwitch", new string[] { "true_now_false", "false_now_true", "on_true", "on_false", "on_restored_true", "on_restored_false", "initial_value", "is_persistent" }); - entity_parameters.Add("LowResFrameCapture", new string[] { }); - entity_parameters.Add("Map_Floor_Change", new string[] { "floor_name" }); - entity_parameters.Add("MapAnchor", new string[] { "map_north", "map_pos", "map_scale", "keyframe", "keyframe1", "keyframe2", "keyframe3", "keyframe4", "keyframe5", "world_pos", "is_default_for_items" }); - entity_parameters.Add("MapItem", new string[] { "show_ui_on_reset", "item_type", "map_keyframe" }); - entity_parameters.Add("Master", new string[] { "suspend_on_reset", "objects", "disable_display", "disable_collision", "disable_simulation" }); - entity_parameters.Add("MELEE_WEAPON", new string[] { "item_animated_model_and_collision", "normal_attack_damage", "power_attack_damage", "position_input" }); - entity_parameters.Add("Minigames", new string[] { "on_success", "on_failure", "game_inertial_damping_active", "game_green_text_active", "game_yellow_chart_active", "game_overloc_fail_active", "game_docking_active", "game_environ_ctr_active", "config_pass_number", "config_fail_limit", "config_difficulty" }); - entity_parameters.Add("MissionNumber", new string[] { "on_changed" }); - entity_parameters.Add("ModelReference", new string[] { "on_damaged", "show_on_reset", "enable_on_reset", "simulate_on_reset", "light_on_reset", "convert_to_physics", "material", "occludes_atmosphere", "include_in_planar_reflections", "lod_ranges", "intensity_multiplier", "radiosity_multiplier", "emissive_tint", "replace_intensity", "replace_tint", "decal_scale", "lightdecal_tint", "lightdecal_intensity", "diffuse_colour_scale", "diffuse_opacity_scale", "vertex_colour_scale", "vertex_opacity_scale", "uv_scroll_speed_x", "uv_scroll_speed_y", "alpha_blend_noise_power_scale", "alpha_blend_noise_uv_scale", "alpha_blend_noise_uv_offset_X", "alpha_blend_noise_uv_offset_Y", "dirt_multiply_blend_spec_power_scale", "dirt_map_uv_scale", "remove_on_damaged", "damage_threshold", "is_debris", "is_prop", "is_thrown", "report_sliding", "force_keyframed", "force_transparent", "soft_collision", "allow_reposition_of_physics", "disable_size_culling", "cast_shadows", "cast_shadows_in_torch", "resource", "alpha_light_offset_x", "alpha_light_offset_y", "alpha_light_scale_x", "alpha_light_scale_y", "alpha_light_average_normal" }); - entity_parameters.Add("MonitorActionMap", new string[] { "on_pressed_use", "on_released_use", "on_pressed_crouch", "on_released_crouch", "on_pressed_run", "on_released_run", "on_pressed_aim", "on_released_aim", "on_pressed_shoot", "on_released_shoot", "on_pressed_reload", "on_released_reload", "on_pressed_melee", "on_released_melee", "on_pressed_activate_item", "on_released_activate_item", "on_pressed_switch_weapon", "on_released_switch_weapon", "on_pressed_change_dof_focus", "on_released_change_dof_focus", "on_pressed_select_motion_tracker", "on_released_select_motion_tracker", "on_pressed_select_torch", "on_released_select_torch", "on_pressed_torch_beam", "on_released_torch_beam", "on_pressed_peek", "on_released_peek", "on_pressed_back_close", "on_released_back_close", "movement_stick_x", "movement_stick_y", "camera_stick_x", "camera_stick_y", "mouse_x", "mouse_y", "analog_aim", "analog_shoot" }); - entity_parameters.Add("MonitorBase", new string[] { }); - entity_parameters.Add("MonitorPadInput", new string[] { "on_pressed_A", "on_released_A", "on_pressed_B", "on_released_B", "on_pressed_X", "on_released_X", "on_pressed_Y", "on_released_Y", "on_pressed_L1", "on_released_L1", "on_pressed_R1", "on_released_R1", "on_pressed_L2", "on_released_L2", "on_pressed_R2", "on_released_R2", "on_pressed_L3", "on_released_L3", "on_pressed_R3", "on_released_R3", "on_dpad_left", "on_released_dpad_left", "on_dpad_right", "on_released_dpad_right", "on_dpad_up", "on_released_dpad_up", "on_dpad_down", "on_released_dpad_down", "left_stick_x", "left_stick_y", "right_stick_x", "right_stick_y" }); - entity_parameters.Add("MotionTrackerMonitor", new string[] { "on_motion_sound", "on_enter_range_sound" }); - entity_parameters.Add("MotionTrackerPing", new string[] { "FakePosition" }); - entity_parameters.Add("MoveAlongSpline", new string[] { "on_think", "on_finished", "spline", "speed", "Result" }); - entity_parameters.Add("MoveInTime", new string[] { "on_finished", "start_position", "end_position", "result", "duration" }); - entity_parameters.Add("MoviePlayer", new string[] { "start", "end", "skipped", "trigger_end_on_skipped", "filename", "skippable", "enable_debug_skip" }); - entity_parameters.Add("MultipleCharacterAttachmentNode", new string[] { "attach_on_reset", "character_01", "attachment_01", "character_02", "attachment_02", "character_03", "attachment_03", "character_04", "attachment_04", "character_05", "attachment_05", "node", "use_offset", "translation", "rotation", "is_cinematic" }); - entity_parameters.Add("MultiplePickupSpawner", new string[] { "pos", "item_name" }); - entity_parameters.Add("MultitrackLoop", new string[] { "current_time", "loop_condition", "start_time", "end_time" }); - entity_parameters.Add("MusicController", new string[] { "music_start_event", "music_end_event", "music_restart_event", "layer_control_rtpc", "smooth_rate", "alien_max_distance", "object_max_distance" }); - entity_parameters.Add("MusicTrigger", new string[] { "on_triggered", "connected_object", "music_event", "smooth_rate", "queue_time", "interrupt_all", "trigger_once", "rtpc_set_mode", "rtpc_target_value", "rtpc_duration", "rtpc_set_return_mode", "rtpc_return_value" }); - entity_parameters.Add(@"n:\content\build\library\archetypes\gameplay\gcip_worldpickup", new string[] { "spawn_completed", "pickup_collected", "Pipe", "Gasoline", "Explosive", "Battery", "Blade", "Gel", "Adhesive", "BoltGun Ammo", "Revolver Ammo", "Shotgun Ammo", "BoltGun", "Revolver", "Shotgun", "Flare", "Flamer Fuel", "Flamer", "Scrap", "Torch Battery", "Torch", "Cattleprod Ammo", "Cattleprod", "StartOnReset", "MissionNumber" }); - entity_parameters.Add(@"n:\content\build\library\archetypes\script\gameplay\torch_control", new string[] { "torch_switched_off", "torch_switched_on", "character" }); - entity_parameters.Add(@"n:\content\build\library\ayz\animation\logichelpers\playforminduration", new string[] { "timer_expired", "first_animation_started", "next_animation", "all_animations_finished", "MinDuration" }); - entity_parameters.Add("NavMeshArea", new string[] { "position", "half_dimensions", "area_type" }); - entity_parameters.Add("NavMeshBarrier", new string[] { "open_on_reset", "position", "half_dimensions", "opaque", "allowed_character_classes_when_open", "allowed_character_classes_when_closed", "resource" }); - entity_parameters.Add("NavMeshExclusionArea", new string[] { "position", "half_dimensions" }); - entity_parameters.Add("NavMeshReachabilitySeedPoint", new string[] { "position" }); - entity_parameters.Add("NavMeshWalkablePlatform", new string[] { "position", "half_dimensions" }); - entity_parameters.Add("NetPlayerCounter", new string[] { "on_full", "on_empty", "on_intermediate", "is_full", "is_empty", "contains_local_player" }); - entity_parameters.Add("NetworkedTimer", new string[] { "on_second_changed", "on_started_counting", "on_finished_counting", "time_elapsed", "time_left", "time_elapsed_sec", "time_left_sec", "duration" }); - entity_parameters.Add("NonInteractiveWater", new string[] { "water_resource", "SCALE_X", "SCALE_Z", "SHININESS", "SPEED", "SCALE", "NORMAL_MAP_STRENGTH", "SECONDARY_SPEED", "SECONDARY_SCALE", "SECONDARY_NORMAL_MAP_STRENGTH", "CYCLE_TIME", "FLOW_SPEED", "FLOW_TEX_SCALE", "FLOW_WARP_STRENGTH", "FRESNEL_POWER", "MIN_FRESNEL", "MAX_FRESNEL", "ENVIRONMENT_MAP_MULT", "ENVMAP_SIZE", "ENVMAP_BOXPROJ_BB_SCALE", "REFLECTION_PERTURBATION_STRENGTH", "ALPHA_PERTURBATION_STRENGTH", "ALPHALIGHT_MULT", "softness_edge", "DEPTH_FOG_INITIAL_COLOUR", "DEPTH_FOG_INITIAL_ALPHA", "DEPTH_FOG_MIDPOINT_COLOUR", "DEPTH_FOG_MIDPOINT_ALPHA", "DEPTH_FOG_MIDPOINT_DEPTH", "DEPTH_FOG_END_COLOUR", "DEPTH_FOG_END_ALPHA", "DEPTH_FOG_END_DEPTH" }); - entity_parameters.Add("NonPersistentBool", new string[] { "initial_value" }); - entity_parameters.Add("NonPersistentInt", new string[] { "initial_value", "is_persistent" }); - entity_parameters.Add("NPC_Aggression_Monitor", new string[] { "on_interrogative", "on_warning", "on_last_chance", "on_stand_down", "on_idle", "on_aggressive" }); - entity_parameters.Add("NPC_AlienConfig", new string[] { "AlienConfigString" }); - entity_parameters.Add("NPC_AllSensesLimiter", new string[] { }); - entity_parameters.Add("NPC_ambush_monitor", new string[] { "setup", "abandoned", "trap_sprung", "ambush_type", "trigger_on_start", "trigger_on_checkpoint_restart" }); - entity_parameters.Add("NPC_AreaBox", new string[] { "half_dimensions", "position" }); - entity_parameters.Add("NPC_behaviour_monitor", new string[] { "state_set", "state_unset", "behaviour", "trigger_on_start", "trigger_on_checkpoint_restart" }); - entity_parameters.Add("NPC_ClearDefendArea", new string[] { }); - entity_parameters.Add("NPC_ClearPursuitArea", new string[] { }); - entity_parameters.Add("NPC_Coordinator", new string[] { "Target", "trigger_on_start", "CheckAllNPCs" }); - entity_parameters.Add("NPC_Debug_Menu_Item", new string[] { "character" }); - entity_parameters.Add("NPC_DefineBackstageAvoidanceArea", new string[] { "AreaObjects" }); - entity_parameters.Add("NPC_DynamicDialogue", new string[] { }); - entity_parameters.Add("NPC_DynamicDialogueGlobalRange", new string[] { "dialogue_range" }); - entity_parameters.Add("NPC_FakeSense", new string[] { "SensedObject", "FakePosition", "Sense", "ForceThreshold" }); - entity_parameters.Add("NPC_FollowOffset", new string[] { "offset", "target_to_follow", "Result" }); - entity_parameters.Add("NPC_ForceCombatTarget", new string[] { "Target", "LockOtherAttackersOut" }); - entity_parameters.Add("NPC_ForceNextJob", new string[] { "job_started", "job_completed", "job_interrupted", "ShouldInterruptCurrentTask", "Job", "InitialTask" }); - entity_parameters.Add("NPC_ForceRetreat", new string[] { "AreaObjects" }); - entity_parameters.Add("NPC_Gain_Aggression_In_Radius", new string[] { "Position", "Radius", "AggressionGain" }); - entity_parameters.Add("NPC_GetCombatTarget", new string[] { "bound_trigger", "target" }); - entity_parameters.Add("NPC_GetLastSensedPositionOfTarget", new string[] { "NoRecentSense", "SensedOnLeft", "SensedOnRight", "SensedInFront", "SensedBehind", "OptionalTarget", "LastSensedPosition", "MaxTimeSince" }); - entity_parameters.Add("NPC_Group_Death_Monitor", new string[] { "last_man_dying", "all_killed", "squad_coordinator", "CheckAllNPCs" }); - entity_parameters.Add("NPC_Group_DeathCounter", new string[] { "on_threshold", "TriggerThreshold" }); - entity_parameters.Add("NPC_Highest_Awareness_Monitor", new string[] { "All_Dead", "Stunned", "Unaware", "Suspicious", "SearchingArea", "SearchingLastSensed", "Aware", "on_changed" }); - entity_parameters.Add("NPC_MeleeContext", new string[] { "ConvergePos", "Radius", "Context_Type" }); - entity_parameters.Add("NPC_multi_behaviour_monitor", new string[] { "Cinematic_set", "Cinematic_unset", "Damage_Response_set", "Damage_Response_unset", "Target_Is_NPC_set", "Target_Is_NPC_unset", "Breakout_set", "Breakout_unset", "Attack_set", "Attack_unset", "Stunned_set", "Stunned_unset", "Backstage_set", "Backstage_unset", "In_Vent_set", "In_Vent_unset", "Killtrap_set", "Killtrap_unset", "Threat_Aware_set", "Threat_Aware_unset", "Suspect_Target_Response_set", "Suspect_Target_Response_unset", "Player_Hiding_set", "Player_Hiding_unset", "Suspicious_Item_set", "Suspicious_Item_unset", "Search_set", "Search_unset", "Area_Sweep_set", "Area_Sweep_unset", "trigger_on_start", "trigger_on_checkpoint_restart" }); - entity_parameters.Add("NPC_navmesh_type_monitor", new string[] { "state_set", "state_unset", "nav_mesh_type", "trigger_on_start", "trigger_on_checkpoint_restart" }); - entity_parameters.Add("NPC_NotifyDynamicDialogueEvent", new string[] { "DialogueEvent" }); - entity_parameters.Add("NPC_Once", new string[] { "on_success", "on_failure" }); - entity_parameters.Add("NPC_ResetFiringStats", new string[] { }); - entity_parameters.Add("NPC_ResetSensesAndMemory", new string[] { "ResetMenaceToFull", "ResetSensesLimiters" }); - entity_parameters.Add("NPC_SenseLimiter", new string[] { "Sense" }); - entity_parameters.Add("NPC_set_behaviour_tree_flags", new string[] { "BehaviourTreeFlag", "FlagSetting" }); - entity_parameters.Add("NPC_SetAgressionProgression", new string[] { "allow_progression" }); - entity_parameters.Add("NPC_SetAimTarget", new string[] { "Target" }); - entity_parameters.Add("NPC_SetAlertness", new string[] { "AlertState" }); - entity_parameters.Add("NPC_SetAlienDevelopmentStage", new string[] { "AlienStage", "Reset" }); - entity_parameters.Add("NPC_SetAutoTorchMode", new string[] { "AutoUseTorchInDark" }); - entity_parameters.Add("NPC_SetChokePoint", new string[] { "chokepoints" }); - entity_parameters.Add("NPC_SetDefendArea", new string[] { "AreaObjects" }); - entity_parameters.Add("NPC_SetFiringAccuracy", new string[] { "Accuracy" }); - entity_parameters.Add("NPC_SetFiringRhythm", new string[] { "MinShootingTime", "RandomRangeShootingTime", "MinNonShootingTime", "RandomRangeNonShootingTime", "MinCoverNonShootingTime", "RandomRangeCoverNonShootingTime" }); - entity_parameters.Add("NPC_SetGunAimMode", new string[] { "AimingMode" }); - entity_parameters.Add("NPC_SetHidingNearestLocation", new string[] { "hiding_pos" }); - entity_parameters.Add("NPC_SetHidingSearchRadius", new string[] { "Radius" }); - entity_parameters.Add("NPC_SetInvisible", new string[] { }); - entity_parameters.Add("NPC_SetLocomotionStyleForJobs", new string[] { }); - entity_parameters.Add("NPC_SetLocomotionTargetSpeed", new string[] { "Speed" }); - entity_parameters.Add("NPC_SetPursuitArea", new string[] { "AreaObjects" }); - entity_parameters.Add("NPC_SetRateOfFire", new string[] { "MinTimeBetweenShots", "RandomRange" }); - entity_parameters.Add("NPC_SetSafePoint", new string[] { "SafePositions" }); - entity_parameters.Add("NPC_SetSenseSet", new string[] { "SenseSet" }); - entity_parameters.Add("NPC_SetStartPos", new string[] { "StartPos" }); - entity_parameters.Add("NPC_SetTotallyBlindInDark", new string[] { }); - entity_parameters.Add("NPC_SetupMenaceManager", new string[] { "AgressiveMenace", "ProgressionFraction", "ResetMenaceMeter" }); - entity_parameters.Add("NPC_Sleeping_Android_Monitor", new string[] { "Twitch", "SitUp_Start", "SitUp_End", "Sleeping_GetUp", "Sitting_GetUp", "Android_NPC" }); - entity_parameters.Add("NPC_Squad_DialogueMonitor", new string[] { "Suspicious_Item_Initial", "Suspicious_Item_Close", "Suspicious_Warning", "Suspicious_Warning_Fail", "Missing_Buddy", "Search_Started", "Search_Loop", "Search_Complete", "Detected_Enemy", "Alien_Heard_Backstage", "Interrogative", "Warning", "Last_Chance", "Stand_Down", "Attack", "Advance", "Melee", "Hit_By_Weapon", "Go_to_Cover", "No_Cover", "Shoot_From_Cover", "Cover_Broken", "Retreat", "Panic", "Final_Hit", "Ally_Death", "Incoming_IED", "Alert_Squad", "My_Death", "Idle_Passive", "Idle_Aggressive", "Block", "Enter_Grapple", "Grapple_From_Cover", "Player_Observed", "squad_coordinator" }); - entity_parameters.Add("NPC_Squad_GetAwarenessState", new string[] { "All_Dead", "Stunned", "Unaware", "Suspicious", "SearchingArea", "SearchingLastSensed", "Aware" }); - entity_parameters.Add("NPC_Squad_GetAwarenessWatermark", new string[] { "All_Dead", "Stunned", "Unaware", "Suspicious", "SearchingArea", "SearchingLastSensed", "Aware" }); - entity_parameters.Add("NPC_StopAiming", new string[] { }); - entity_parameters.Add("NPC_StopShooting", new string[] { }); - entity_parameters.Add("NPC_SuspiciousItem", new string[] { "ItemPosition", "Item", "InitialReactionValidStartDuration", "FurtherReactionValidStartDuration", "RetriggerDelay", "Trigger", "ShouldMakeAggressive", "MaxGroupMembersInteract", "SystematicSearchRadius", "AllowSamePriorityToOveride", "UseSamePriorityCloserDistanceConstraint", "SamePriorityCloserDistanceConstraint", "UseSamePriorityRecentTimeConstraint", "SamePriorityRecentTimeConstraint", "BehaviourTreePriority", "InteruptSubPriority", "DetectableByBackstageAlien", "DoIntialReaction", "MoveCloseToSuspectPosition", "DoCloseToReaction", "DoCloseToWaitForGroupMembers", "DoSystematicSearch", "GroupNotify", "DoIntialReactionSubsequentGroupMember", "MoveCloseToSuspectPositionSubsequentGroupMember", "DoCloseToReactionSubsequentGroupMember", "DoCloseToWaitForGroupMembersSubsequentGroupMember", "DoSystematicSearchSubsequentGroupMember" }); - entity_parameters.Add("NPC_TargetAcquire", new string[] { "no_targets" }); - entity_parameters.Add("NPC_TriggerAimRequest", new string[] { "started_aiming", "finished_aiming", "interrupted", "AimTarget", "Raise_gun", "use_current_target", "duration", "clamp_angle", "clear_current_requests" }); - entity_parameters.Add("NPC_TriggerShootRequest", new string[] { "started_shooting", "finished_shooting", "interrupted", "empty_current_clip", "shot_count", "duration", "clear_current_requests" }); - entity_parameters.Add("NPC_WithdrawAlien", new string[] { "allow_any_searches_to_complete", "permanent", "killtraps", "initial_radius", "timed_out_radius", "time_to_force" }); - entity_parameters.Add("NumConnectedPlayers", new string[] { "on_count_changed", "count" }); - entity_parameters.Add("NumDeadPlayers", new string[] { }); - entity_parameters.Add("NumPlayersOnStart", new string[] { "count" }); - entity_parameters.Add("PadLightBar", new string[] { "colour" }); - entity_parameters.Add("PadRumbleImpulse", new string[] { "low_frequency_rumble", "high_frequency_rumble", "left_trigger_impulse", "right_trigger_impulse", "aim_trigger_impulse", "shoot_trigger_impulse" }); - entity_parameters.Add("ParticipatingPlayersList", new string[] { }); - entity_parameters.Add("ParticleEmitterReference", new string[] { "start_on_reset", "show_on_reset", "deleted", "mastered_by_visibility", "use_local_rotation", "include_in_planar_reflections", "material", "unique_material", "quality_level", "bounds_max", "bounds_min", "TEXTURE_MAP", "DRAW_PASS", "ASPECT_RATIO", "FADE_AT_DISTANCE", "PARTICLE_COUNT", "SYSTEM_EXPIRY_TIME", "SIZE_START_MIN", "SIZE_START_MAX", "SIZE_END_MIN", "SIZE_END_MAX", "ALPHA_IN", "ALPHA_OUT", "MASK_AMOUNT_MIN", "MASK_AMOUNT_MAX", "MASK_AMOUNT_MIDPOINT", "PARTICLE_EXPIRY_TIME_MIN", "PARTICLE_EXPIRY_TIME_MAX", "COLOUR_SCALE_MIN", "COLOUR_SCALE_MAX", "WIND_X", "WIND_Y", "WIND_Z", "ALPHA_REF_VALUE", "BILLBOARDING_LS", "BILLBOARDING", "BILLBOARDING_NONE", "BILLBOARDING_ON_AXIS_X", "BILLBOARDING_ON_AXIS_Y", "BILLBOARDING_ON_AXIS_Z", "BILLBOARDING_VELOCITY_ALIGNED", "BILLBOARDING_VELOCITY_STRETCHED", "BILLBOARDING_SPHERE_PROJECTION", "BLENDING_STANDARD", "BLENDING_ALPHA_REF", "BLENDING_ADDITIVE", "BLENDING_PREMULTIPLIED", "BLENDING_DISTORTION", "LOW_RES", "EARLY_ALPHA", "LOOPING", "ANIMATED_ALPHA", "NONE", "LIGHTING", "PER_PARTICLE_LIGHTING", "X_AXIS_FLIP", "Y_AXIS_FLIP", "BILLBOARD_FACING", "BILLBOARDING_ON_AXIS_FADEOUT", "BILLBOARDING_CAMERA_LOCKED", "CAMERA_RELATIVE_POS_X", "CAMERA_RELATIVE_POS_Y", "CAMERA_RELATIVE_POS_Z", "SPHERE_PROJECTION_RADIUS", "DISTORTION_STRENGTH", "SCALE_MODIFIER", "CPU", "SPAWN_RATE", "SPAWN_RATE_VAR", "SPAWN_NUMBER", "LIFETIME", "LIFETIME_VAR", "WORLD_TO_LOCAL_BLEND_START", "WORLD_TO_LOCAL_BLEND_END", "WORLD_TO_LOCAL_MAX_DIST", "CELL_EMISSION", "CELL_MAX_DIST", "CUSTOM_SEED_CPU", "SEED", "ALPHA_TEST", "ZTEST", "START_MID_END_SPEED", "SPEED_START_MIN", "SPEED_START_MAX", "SPEED_MID_MIN", "SPEED_MID_MAX", "SPEED_END_MIN", "SPEED_END_MAX", "LAUNCH_DECELERATE_SPEED", "LAUNCH_DECELERATE_SPEED_START_MIN", "LAUNCH_DECELERATE_SPEED_START_MAX", "LAUNCH_DECELERATE_DEC_RATE", "EMISSION_AREA", "EMISSION_AREA_X", "EMISSION_AREA_Y", "EMISSION_AREA_Z", "EMISSION_SURFACE", "EMISSION_DIRECTION_SURFACE", "AREA_CUBOID", "AREA_SPHEROID", "AREA_CYLINDER", "PIVOT_X", "PIVOT_Y", "GRAVITY", "GRAVITY_STRENGTH", "GRAVITY_MAX_STRENGTH", "COLOUR_TINT", "COLOUR_TINT_START", "COLOUR_TINT_END", "COLOUR_USE_MID", "COLOUR_TINT_MID", "COLOUR_MIDPOINT", "SPREAD_FEATURE", "SPREAD_MIN", "SPREAD", "ROTATION", "ROTATION_MIN", "ROTATION_MAX", "ROTATION_RANDOM_START", "ROTATION_BASE", "ROTATION_VAR", "ROTATION_RAMP", "ROTATION_IN", "ROTATION_OUT", "ROTATION_DAMP", "FADE_NEAR_CAMERA", "FADE_NEAR_CAMERA_MAX_DIST", "FADE_NEAR_CAMERA_THRESHOLD", "TEXTURE_ANIMATION", "TEXTURE_ANIMATION_FRAMES", "NUM_ROWS", "TEXTURE_ANIMATION_LOOP_COUNT", "RANDOM_START_FRAME", "WRAP_FRAMES", "NO_ANIM", "SUB_FRAME_BLEND", "SOFTNESS", "SOFTNESS_EDGE", "SOFTNESS_ALPHA_THICKNESS", "SOFTNESS_ALPHA_DEPTH_MODIFIER", "REVERSE_SOFTNESS", "REVERSE_SOFTNESS_EDGE", "PIVOT_AND_TURBULENCE", "PIVOT_OFFSET_MIN", "PIVOT_OFFSET_MAX", "TURBULENCE_FREQUENCY_MIN", "TURBULENCE_FREQUENCY_MAX", "TURBULENCE_AMOUNT_MIN", "TURBULENCE_AMOUNT_MAX", "ALPHATHRESHOLD", "ALPHATHRESHOLD_TOTALTIME", "ALPHATHRESHOLD_RANGE", "ALPHATHRESHOLD_BEGINSTART", "ALPHATHRESHOLD_BEGINSTOP", "ALPHATHRESHOLD_ENDSTART", "ALPHATHRESHOLD_ENDSTOP", "COLOUR_RAMP", "COLOUR_RAMP_MAP", "COLOUR_RAMP_ALPHA", "DEPTH_FADE_AXIS", "DEPTH_FADE_AXIS_DIST", "DEPTH_FADE_AXIS_PERCENT", "FLOW_UV_ANIMATION", "FLOW_MAP", "FLOW_TEXTURE_MAP", "CYCLE_TIME", "FLOW_SPEED", "FLOW_TEX_SCALE", "FLOW_WARP_STRENGTH", "INFINITE_PROJECTION", "PARALLAX_POSITION", "DISTORTION_OCCLUSION", "AMBIENT_LIGHTING", "AMBIENT_LIGHTING_COLOUR", "NO_CLIP", "resource" }); - entity_parameters.Add("PathfindingAlienBackstageNode", new string[] { "started_animating_Entry", "stopped_animating_Entry", "started_animating_Exit", "stopped_animating_Exit", "killtrap_anim_started", "killtrap_anim_stopped", "killtrap_fx_start", "killtrap_fx_stop", "on_loaded", "open_on_reset", "PlayAnimData_Entry", "PlayAnimData_Exit", "Killtrap_alien", "Killtrap_victim", "build_into_navmesh", "position", "top", "extra_cost", "network_id" }); - entity_parameters.Add("PathfindingManualNode", new string[] { "character_arriving", "character_stopped", "started_animating", "stopped_animating", "on_loaded", "PlayAnimData", "destination", "build_into_navmesh", "position", "extra_cost", "character_classes" }); - entity_parameters.Add("PathfindingTeleportNode", new string[] { "started_teleporting", "stopped_teleporting", "destination", "build_into_navmesh", "position", "extra_cost", "character_classes" }); - entity_parameters.Add("PathfindingWaitNode", new string[] { "character_getting_near", "character_arriving", "character_stopped", "started_waiting", "stopped_waiting", "destination", "build_into_navmesh", "position", "extra_cost", "character_classes" }); - entity_parameters.Add("Persistent_TriggerRandomSequence", new string[] { "Random_1", "Random_2", "Random_3", "Random_4", "Random_5", "Random_6", "Random_7", "Random_8", "Random_9", "Random_10", "All_triggered", "current", "num" }); - entity_parameters.Add("PhysicsApplyBuoyancy", new string[] { "objects", "water_height", "water_density", "water_viscosity", "water_choppiness" }); - entity_parameters.Add("PhysicsApplyImpulse", new string[] { "objects", "offset", "direction", "force", "can_damage" }); - entity_parameters.Add("PhysicsApplyVelocity", new string[] { "objects", "angular_velocity", "linear_velocity", "propulsion_velocity" }); - entity_parameters.Add("PhysicsModifyGravity", new string[] { "float_on_reset", "objects" }); - entity_parameters.Add("PhysicsSystem", new string[] { "system_index" }); - entity_parameters.Add("PickupSpawner", new string[] { "collect", "spawn_on_reset", "pos", "item_name", "item_quantity" }); - entity_parameters.Add("Planet", new string[] { "planet_resource", "parallax_position", "sun_position", "light_shaft_source_position", "parallax_scale", "planet_sort_key", "overbright_scalar", "light_wrap_angle_scalar", "penumbra_falloff_power_scalar", "lens_flare_brightness", "lens_flare_colour", "atmosphere_edge_falloff_power", "atmosphere_edge_transparency", "atmosphere_scroll_speed", "atmosphere_detail_scroll_speed", "override_global_tint", "global_tint", "flow_cycle_time", "flow_speed", "flow_tex_scale", "flow_warp_strength", "detail_uv_scale", "normal_uv_scale", "terrain_uv_scale", "atmosphere_normal_strength", "terrain_normal_strength", "light_shaft_colour", "light_shaft_range", "light_shaft_decay", "light_shaft_min_occlusion_distance", "light_shaft_intensity", "light_shaft_density", "light_shaft_source_occlusion", "blocks_light_shafts" }); - entity_parameters.Add("PlatformConstantBool", new string[] { "NextGen", "X360", "PS3" }); - entity_parameters.Add("PlatformConstantFloat", new string[] { "NextGen", "X360", "PS3" }); - entity_parameters.Add("PlatformConstantInt", new string[] { "NextGen", "X360", "PS3" }); - entity_parameters.Add("PlayEnvironmentAnimation", new string[] { "on_finished", "on_finished_streaming", "play_on_reset", "jump_to_the_end_on_play", "geometry", "marker", "external_start_time", "external_time", "animation_length", "animation_info", "AnimationSet", "Animation", "start_frame", "end_frame", "play_speed", "loop", "is_cinematic", "shot_number" }); - entity_parameters.Add("Player_ExploitableArea", new string[] { "NpcSafePositions" }); - entity_parameters.Add("Player_Sensor", new string[] { "Standard", "Running", "Aiming", "Vent", "Grapple", "Death", "Cover", "Motion_Tracked", "Motion_Tracked_Vent", "Leaning" }); - entity_parameters.Add("PlayerCamera", new string[] { }); - entity_parameters.Add("PlayerCameraMonitor", new string[] { "AndroidNeckSnap", "AlienKill", "AlienKillBroken", "AlienKillInVent", "StandardAnimDrivenView", "StopNonStandardCameras" }); - entity_parameters.Add("PlayerCampaignDeaths", new string[] { }); - entity_parameters.Add("PlayerCampaignDeathsInARow", new string[] { }); - entity_parameters.Add("PlayerDeathCounter", new string[] { "on_limit", "above_limit", "filter", "count", "Limit" }); - entity_parameters.Add("PlayerDiscardsItems", new string[] { "discard_ieds", "discard_medikits", "discard_ammo", "discard_flares_and_lights", "discard_materials", "discard_batteries" }); - entity_parameters.Add("PlayerDiscardsTools", new string[] { "discard_motion_tracker", "discard_cutting_torch", "discard_hacking_tool", "discard_keycard" }); - entity_parameters.Add("PlayerDiscardsWeapons", new string[] { "discard_pistol", "discard_shotgun", "discard_flamethrower", "discard_boltgun", "discard_cattleprod", "discard_melee" }); - entity_parameters.Add("PlayerHasEnoughItems", new string[] { "items", "quantity" }); - entity_parameters.Add("PlayerHasItem", new string[] { "items" }); - entity_parameters.Add("PlayerHasItemEntity", new string[] { "success", "fail", "items" }); - entity_parameters.Add("PlayerHasItemWithName", new string[] { "item_name" }); - entity_parameters.Add("PlayerHasSpaceForItem", new string[] { "items" }); - entity_parameters.Add("PlayerKilledAllyMonitor", new string[] { "ally_killed", "start_on_reset" }); - entity_parameters.Add("PlayerLightProbe", new string[] { "output", "light_level_for_ai", "dark_threshold", "fully_lit_threshold" }); - entity_parameters.Add("PlayerTorch", new string[] { "requested_torch_holster", "requested_torch_draw", "start_on_reset", "power_in_current_battery", "battery_count" }); - entity_parameters.Add("PlayerTriggerBox", new string[] { "on_entered", "on_exited", "enable_on_reset", "half_dimensions" }); - entity_parameters.Add("PlayerUseTriggerBox", new string[] { "on_entered", "on_exited", "on_use", "enable_on_reset", "half_dimensions", "text" }); - entity_parameters.Add("PlayerWeaponMonitor", new string[] { "on_clip_above_percentage", "on_clip_below_percentage", "on_clip_empty", "on_clip_full", "weapon_type", "ammo_percentage_in_clip" }); - entity_parameters.Add("PointAt", new string[] { "origin", "target", "Result" }); - entity_parameters.Add("PointTracker", new string[] { "origin", "target", "target_offset", "result", "origin_offset", "max_speed", "damping_factor" }); - entity_parameters.Add("PopupMessage", new string[] { "display", "finished", "header_text", "main_text", "duration", "sound_event", "icon_keyframe" }); - entity_parameters.Add("PositionDistance", new string[] { "LHS", "RHS", "Result" }); - entity_parameters.Add("PositionMarker", new string[] { }); - entity_parameters.Add("PostprocessingSettings", new string[] { "intensity", "priority", "blend_mode" }); - entity_parameters.Add("ProjectileMotion", new string[] { "on_think", "on_finished", "start_pos", "start_velocity", "duration", "Current_Position", "Current_Velocity" }); - entity_parameters.Add("ProjectileMotionComplex", new string[] { "on_think", "on_finished", "start_position", "start_velocity", "start_angular_velocity", "flight_time_in_seconds", "current_position", "current_velocity", "current_angular_velocity", "current_flight_time_in_seconds" }); - entity_parameters.Add("ProjectiveDecal", new string[] { "deleted", "show_on_reset", "time", "include_in_planar_reflections", "material", "resource" }); - entity_parameters.Add("ProximityDetector", new string[] { "in_proximity", "filter", "detector_position", "min_distance", "max_distance", "requires_line_of_sight", "proximity_duration" }); - entity_parameters.Add("ProximityTrigger", new string[] { "ignited", "electrified", "drenched", "poisoned", "fire_spread_rate", "water_permeate_rate", "electrical_conduction_rate", "gas_diffusion_rate", "ignition_range", "electrical_arc_range", "water_flow_range", "gas_dispersion_range" }); - entity_parameters.Add("QueryGCItemPool", new string[] { "count", "item_name", "item_quantity" }); - entity_parameters.Add("RadiosityIsland", new string[] { "composites", "exclusions" }); - entity_parameters.Add("RadiosityProxy", new string[] { "position", "resource" }); - entity_parameters.Add("RandomBool", new string[] { "Result" }); - entity_parameters.Add("RandomFloat", new string[] { "Result", "Min", "Max" }); - entity_parameters.Add("RandomInt", new string[] { "Result", "Min", "Max" }); - entity_parameters.Add("RandomObjectSelector", new string[] { "objects", "chosen_object" }); - entity_parameters.Add("RandomSelect", new string[] { "Input", "Result", "Seed" }); - entity_parameters.Add("RandomVector", new string[] { "Result", "MinX", "MaxX", "MinY", "MaxY", "MinZ", "MaxZ", "Normalised" }); - entity_parameters.Add("Raycast", new string[] { "Obstructed", "Unobstructed", "OutOfRange", "source_position", "target_position", "max_distance", "hit_object", "hit_distance", "hit_position", "priority" }); - entity_parameters.Add("Refraction", new string[] { "refraction_resource", "SCALE_X", "SCALE_Z", "DISTANCEFACTOR", "REFRACTFACTOR", "SPEED", "SCALE", "SECONDARY_REFRACTFACTOR", "SECONDARY_SPEED", "SECONDARY_SCALE", "MIN_OCCLUSION_DISTANCE", "CYCLE_TIME", "FLOW_SPEED", "FLOW_TEX_SCALE", "FLOW_WARP_STRENGTH" }); - entity_parameters.Add("RegisterCharacterModel", new string[] { "display_model", "reference_skeleton" }); - entity_parameters.Add("RemoveFromGCItemPool", new string[] { "on_success", "on_failure", "item_name", "item_quantity", "gcip_instances_to_remove" }); - entity_parameters.Add("RemoveFromInventory", new string[] { "success", "fail", "items" }); - entity_parameters.Add("RemoveWeaponsFromPlayer", new string[] { }); - entity_parameters.Add("RespawnConfig", new string[] { "min_dist", "preferred_dist", "max_dist", "respawn_mode", "respawn_wait_time", "uncollidable_time", "is_default" }); - entity_parameters.Add("RespawnExcluder", new string[] { "excluded_points" }); - entity_parameters.Add("ReTransformer", new string[] { "new_transform", "result" }); - entity_parameters.Add("Rewire", new string[] { "closed", "locations", "access_points", "map_keyframe", "total_power" }); - entity_parameters.Add("RewireAccess_Point", new string[] { "closed", "ui_breakout_triggered", "interactive_locations", "visible_locations", "additional_power", "display_name", "map_element_name", "map_name", "map_x_offset", "map_y_offset", "map_zoom" }); - entity_parameters.Add("RewireLocation", new string[] { "power_draw_increased", "power_draw_reduced", "systems", "element_name", "display_name" }); - entity_parameters.Add("RewireSystem", new string[] { "on", "off", "world_pos", "display_name", "display_name_enum", "on_by_default", "running_cost", "system_type", "map_name", "element_name" }); - entity_parameters.Add("RewireTotalPowerResource", new string[] { "total_power" }); - entity_parameters.Add("RibbonEmitterReference", new string[] { "deleted", "start_on_reset", "show_on_reset", "mastered_by_visibility", "use_local_rotation", "include_in_planar_reflections", "material", "unique_material", "quality_level", "BLENDING_STANDARD", "BLENDING_ALPHA_REF", "BLENDING_ADDITIVE", "BLENDING_PREMULTIPLIED", "BLENDING_DISTORTION", "NO_MIPS", "UV_SQUARED", "LOW_RES", "LIGHTING", "MASK_AMOUNT_MIN", "MASK_AMOUNT_MAX", "MASK_AMOUNT_MIDPOINT", "DRAW_PASS", "SYSTEM_EXPIRY_TIME", "LIFETIME", "SMOOTHED", "WORLD_TO_LOCAL_BLEND_START", "WORLD_TO_LOCAL_BLEND_END", "WORLD_TO_LOCAL_MAX_DIST", "TEXTURE", "TEXTURE_MAP", "UV_REPEAT", "UV_SCROLLSPEED", "MULTI_TEXTURE", "U2_SCALE", "V2_REPEAT", "V2_SCROLLSPEED", "MULTI_TEXTURE_BLEND", "MULTI_TEXTURE_ADD", "MULTI_TEXTURE_MULT", "MULTI_TEXTURE_MAX", "MULTI_TEXTURE_MIN", "SECOND_TEXTURE", "TEXTURE_MAP2", "CONTINUOUS", "BASE_LOCKED", "SPAWN_RATE", "TRAILING", "INSTANT", "RATE", "TRAIL_SPAWN_RATE", "TRAIL_DELAY", "MAX_TRAILS", "POINT_TO_POINT", "TARGET_POINT_POSITION", "DENSITY", "ABS_FADE_IN_0", "ABS_FADE_IN_1", "FORCES", "GRAVITY_STRENGTH", "GRAVITY_MAX_STRENGTH", "DRAG_STRENGTH", "WIND_X", "WIND_Y", "WIND_Z", "START_MID_END_SPEED", "SPEED_START_MIN", "SPEED_START_MAX", "WIDTH", "WIDTH_START", "WIDTH_MID", "WIDTH_END", "WIDTH_IN", "WIDTH_OUT", "COLOUR_TINT", "COLOUR_SCALE_START", "COLOUR_SCALE_MID", "COLOUR_SCALE_END", "COLOUR_TINT_START", "COLOUR_TINT_MID", "COLOUR_TINT_END", "ALPHA_FADE", "FADE_IN", "FADE_OUT", "EDGE_FADE", "ALPHA_ERODE", "SIDE_ON_FADE", "SIDE_FADE_START", "SIDE_FADE_END", "DISTANCE_SCALING", "DIST_SCALE", "SPREAD_FEATURE", "SPREAD_MIN", "SPREAD", "EMISSION_AREA", "EMISSION_AREA_X", "EMISSION_AREA_Y", "EMISSION_AREA_Z", "AREA_CUBOID", "AREA_SPHEROID", "AREA_CYLINDER", "COLOUR_RAMP", "COLOUR_RAMP_MAP", "SOFTNESS", "SOFTNESS_EDGE", "SOFTNESS_ALPHA_THICKNESS", "SOFTNESS_ALPHA_DEPTH_MODIFIER", "AMBIENT_LIGHTING", "AMBIENT_LIGHTING_COLOUR", "NO_CLIP", "resource" }); - entity_parameters.Add("RotateAtSpeed", new string[] { "on_finished", "on_think", "start_pos", "origin", "timer", "Result", "duration", "speed_X", "speed_Y", "speed_Z", "loop" }); - entity_parameters.Add("RotateInTime", new string[] { "on_finished", "on_think", "start_pos", "origin", "timer", "Result", "duration", "time_X", "time_Y", "time_Z", "loop" }); - entity_parameters.Add("RTT_MoviePlayer", new string[] { "start", "end", "show_on_reset", "filename", "layer_name", "target_texture_name" }); - entity_parameters.Add("SaveGlobalProgression", new string[] { }); - entity_parameters.Add("SaveManagers", new string[] { }); - entity_parameters.Add("ScalarProduct", new string[] { "LHS", "RHS", "Result" }); - entity_parameters.Add("ScreenEffectEventMonitor", new string[] { "MeleeHit", "BulletHit", "MedkitHeal", "StartStrangle", "StopStrangle", "StartLowHealth", "StopLowHealth", "StartDeath", "StopDeath", "AcidHit", "FlashbangHit", "HitAndRun", "CancelHitAndRun" }); - entity_parameters.Add("ScreenFadeIn", new string[] { "fade_value" }); - entity_parameters.Add("ScreenFadeInTimed", new string[] { "on_finished", "time" }); - entity_parameters.Add("ScreenFadeOutToBlack", new string[] { "fade_value" }); - entity_parameters.Add("ScreenFadeOutToBlackTimed", new string[] { "on_finished", "time" }); - entity_parameters.Add("ScreenFadeOutToWhite", new string[] { "fade_value" }); - entity_parameters.Add("ScreenFadeOutToWhiteTimed", new string[] { "on_finished", "time" }); - entity_parameters.Add("SetAsActiveMissionLevel", new string[] { "clear_level" }); - entity_parameters.Add("SetBlueprintInfo", new string[] { "type", "level", "available" }); - entity_parameters.Add("SetBool", new string[] { }); - entity_parameters.Add("SetColour", new string[] { "Colour", "Result" }); - entity_parameters.Add("SetEnum", new string[] { "Output", "initial_value" }); - entity_parameters.Add("SetFloat", new string[] { }); - entity_parameters.Add("SetGamepadAxes", new string[] { "invert_x", "invert_y", "save_settings" }); - entity_parameters.Add("SetGameplayTips", new string[] { "tip_string_id" }); - entity_parameters.Add("SetGatingToolLevel", new string[] { "level", "tool_type" }); - entity_parameters.Add("SetHackingToolLevel", new string[] { "level" }); - entity_parameters.Add("SetInteger", new string[] { }); - entity_parameters.Add("SetLocationAndOrientation", new string[] { "location", "axis", "local_offset", "result", "axis_is" }); - entity_parameters.Add("SetMotionTrackerRange", new string[] { "range" }); - entity_parameters.Add("SetNextLoadingMovie", new string[] { "playlist_to_load" }); - entity_parameters.Add("SetObject", new string[] { "Input", "Output" }); - entity_parameters.Add("SetObjectiveCompleted", new string[] { "objective_id" }); - entity_parameters.Add("SetPlayerHasGatingTool", new string[] { "tool_type" }); - entity_parameters.Add("SetPlayerHasKeycard", new string[] { "card_uid" }); - entity_parameters.Add("SetPosition", new string[] { "Translation", "Rotation", "Input", "Result", "set_on_reset" }); - entity_parameters.Add("SetPrimaryObjective", new string[] { "title", "additional_info", "title_list", "additional_info_list", "show_message" }); - entity_parameters.Add("SetRichPresence", new string[] { "presence_id", "mission_number" }); - entity_parameters.Add("SetString", new string[] { "Output", "initial_value", "SetEnumString" }); - entity_parameters.Add("SetSubObjective", new string[] { "target_position", "title", "map_description", "title_list", "map_description_list", "slot_number", "objective_type", "show_message" }); - entity_parameters.Add("SetupGCDistribution", new string[] { "c00", "c01", "c02", "c03", "c04", "c05", "c06", "c07", "c08", "c09", "c10", "minimum_multiplier", "divisor", "lookup_decrease_time", "lookup_point_increase" }); - entity_parameters.Add("SetVector", new string[] { "x", "y", "z", "Result" }); - entity_parameters.Add("SetVector2", new string[] { "Input", "Result" }); - entity_parameters.Add("SharpnessSettings", new string[] { "local_contrast_factor" }); - entity_parameters.Add("Showlevel_Completed", new string[] { }); - entity_parameters.Add("SimpleRefraction", new string[] { "deleted", "show_on_reset", "DISTANCEFACTOR", "NORMAL_MAP", "SPEED", "SCALE", "REFRACTFACTOR", "SECONDARY_NORMAL_MAPPING", "SECONDARY_NORMAL_MAP", "SECONDARY_SPEED", "SECONDARY_SCALE", "SECONDARY_REFRACTFACTOR", "ALPHA_MASKING", "ALPHA_MASK", "DISTORTION_OCCLUSION", "MIN_OCCLUSION_DISTANCE", "FLOW_UV_ANIMATION", "FLOW_MAP", "CYCLE_TIME", "FLOW_SPEED", "FLOW_TEX_SCALE", "FLOW_WARP_STRENGTH", "resource" }); - entity_parameters.Add("SimpleWater", new string[] { "deleted", "show_on_reset", "SHININESS", "softness_edge", "FRESNEL_POWER", "MIN_FRESNEL", "MAX_FRESNEL", "LOW_RES_ALPHA_PASS", "ATMOSPHERIC_FOGGING", "NORMAL_MAP", "SPEED", "SCALE", "NORMAL_MAP_STRENGTH", "SECONDARY_NORMAL_MAPPING", "SECONDARY_SPEED", "SECONDARY_SCALE", "SECONDARY_NORMAL_MAP_STRENGTH", "ALPHA_MASKING", "ALPHA_MASK", "FLOW_MAPPING", "FLOW_MAP", "CYCLE_TIME", "FLOW_SPEED", "FLOW_TEX_SCALE", "FLOW_WARP_STRENGTH", "ENVIRONMENT_MAPPING", "ENVIRONMENT_MAP", "ENVIRONMENT_MAP_MULT", "LOCALISED_ENVIRONMENT_MAPPING", "ENVMAP_SIZE", "LOCALISED_ENVMAP_BOX_PROJECTION", "ENVMAP_BOXPROJ_BB_SCALE", "REFLECTIVE_MAPPING", "REFLECTION_PERTURBATION_STRENGTH", "DEPTH_FOG_INITIAL_COLOUR", "DEPTH_FOG_INITIAL_ALPHA", "DEPTH_FOG_MIDPOINT_COLOUR", "DEPTH_FOG_MIDPOINT_ALPHA", "DEPTH_FOG_MIDPOINT_DEPTH", "DEPTH_FOG_END_COLOUR", "DEPTH_FOG_END_ALPHA", "DEPTH_FOG_END_DEPTH", "CAUSTIC_TEXTURE", "CAUSTIC_TEXTURE_SCALE", "CAUSTIC_REFRACTIONS", "CAUSTIC_REFLECTIONS", "CAUSTIC_SPEED_SCALAR", "CAUSTIC_INTENSITY", "CAUSTIC_SURFACE_WRAP", "CAUSTIC_HEIGHT", "resource", "CAUSTIC_TEXTURE_INDEX" }); - entity_parameters.Add("SmokeCylinder", new string[] { "pos", "radius", "height", "duration" }); - entity_parameters.Add("SmokeCylinderAttachmentInterface", new string[] { "radius", "height", "duration" }); - entity_parameters.Add("SmoothMove", new string[] { "on_finished", "timer", "start_position", "end_position", "start_velocity", "end_velocity", "result", "duration" }); - entity_parameters.Add("Sound", new string[] { "stop_event", "is_static_ambience", "start_on", "multi_trigger", "use_multi_emitter", "create_sound_object", "position", "switch_name", "switch_value", "last_gen_enabled", "resume_after_suspended" }); - entity_parameters.Add("SoundBarrier", new string[] { "default_open", "position", "half_dimensions", "band_aid", "override_value", "resource" }); - entity_parameters.Add("SoundEnvironmentMarker", new string[] { "reverb_name", "on_enter_event", "on_exit_event", "linked_network_occlusion_scaler", "room_size", "disable_network_creation", "position" }); - entity_parameters.Add("SoundEnvironmentZone", new string[] { "reverb_name", "priority", "position", "half_dimensions" }); - entity_parameters.Add("SoundImpact", new string[] { "sound_event", "is_occludable", "argument_1", "argument_2", "argument_3" }); - entity_parameters.Add("SoundLevelInitialiser", new string[] { "auto_generate_networks", "network_node_min_spacing", "network_node_max_visibility", "network_node_ceiling_height" }); - entity_parameters.Add("SoundLoadBank", new string[] { "bank_loaded", "sound_bank", "trigger_via_pin", "memory_pool" }); - entity_parameters.Add("SoundLoadSlot", new string[] { "bank_loaded", "sound_bank", "memory_pool" }); - entity_parameters.Add("SoundMissionInitialiser", new string[] { "human_max_threat", "android_max_threat", "alien_max_threat" }); - entity_parameters.Add("SoundNetworkNode", new string[] { "position" }); - entity_parameters.Add("SoundObject", new string[] { }); - entity_parameters.Add("SoundPhysicsInitialiser", new string[] { "contact_max_timeout", "contact_smoothing_attack_rate", "contact_smoothing_decay_rate", "contact_min_magnitude", "contact_max_trigger_distance", "impact_min_speed", "impact_max_trigger_distance", "ragdoll_min_timeout", "ragdoll_min_speed" }); - entity_parameters.Add("SoundPlaybackBaseClass", new string[] { "on_finished", "attached_sound_object", "sound_event", "is_occludable", "argument_1", "argument_2", "argument_3", "argument_4", "argument_5", "namespace", "object_position", "restore_on_checkpoint" }); - entity_parameters.Add("SoundPlayerFootwearOverride", new string[] { "footwear_sound" }); - entity_parameters.Add("SoundRTPCController", new string[] { "stealth_default_on", "threat_default_on" }); - entity_parameters.Add("SoundSetRTPC", new string[] { "rtpc_value", "sound_object", "rtpc_name", "smooth_rate", "start_on" }); - entity_parameters.Add("SoundSetState", new string[] { "state_name", "state_value" }); - entity_parameters.Add("SoundSetSwitch", new string[] { "sound_object", "switch_name", "switch_value" }); - entity_parameters.Add("SoundSpline", new string[] { }); - entity_parameters.Add("SoundTimelineTrigger", new string[] { "sound_event", "trigger_time" }); - entity_parameters.Add("SpaceSuitVisor", new string[] { "breath_level" }); - entity_parameters.Add("SpaceTransform", new string[] { "affected_geometry", "yaw_speed", "pitch_speed", "roll_speed" }); - entity_parameters.Add("SpawnGroup", new string[] { "on_spawn_request", "default_group", "trigger_on_reset" }); - entity_parameters.Add("Speech", new string[] { "on_speech_started", "character", "alt_character", "speech_priority", "queue_time" }); - entity_parameters.Add("SpeechScript", new string[] { "on_script_ended", "character_01", "character_02", "character_03", "character_04", "character_05", "alt_character_01", "alt_character_02", "alt_character_03", "alt_character_04", "alt_character_05", "speech_priority", "is_occludable", "line_01_event", "line_01_character", "line_02_delay", "line_02_event", "line_02_character", "line_03_delay", "line_03_event", "line_03_character", "line_04_delay", "line_04_event", "line_04_character", "line_05_delay", "line_05_event", "line_05_character", "line_06_delay", "line_06_event", "line_06_character", "line_07_delay", "line_07_event", "line_07_character", "line_08_delay", "line_08_event", "line_08_character", "line_09_delay", "line_09_event", "line_09_character", "line_10_delay", "line_10_event", "line_10_character", "restore_on_checkpoint" }); - entity_parameters.Add("Sphere", new string[] { "event", "enable_on_reset", "radius", "include_physics" }); - entity_parameters.Add("SplineDistanceLerp", new string[] { "on_think", "spline", "lerp_position", "Result" }); - entity_parameters.Add("SplinePath", new string[] { "loop", "orientated", "points" }); - entity_parameters.Add("SpottingExclusionArea", new string[] { "position", "half_dimensions" }); - entity_parameters.Add("Squad_SetMaxEscalationLevel", new string[] { "max_level", "squad_coordinator" }); - entity_parameters.Add("StartNewChapter", new string[] { "chapter" }); - entity_parameters.Add("StateQuery", new string[] { "on_true", "on_false", "Input", "Result" }); - entity_parameters.Add("StealCamera", new string[] { "on_converged", "focus_position", "steal_type", "check_line_of_sight", "blend_in_duration" }); - entity_parameters.Add("StreamingMonitor", new string[] { "on_loaded" }); - entity_parameters.Add("SurfaceEffectBox", new string[] { "deleted", "show_on_reset", "COLOUR_TINT", "COLOUR_TINT_OUTER", "INTENSITY", "OPACITY", "FADE_OUT_TIME", "SURFACE_WRAP", "ROUGHNESS_SCALE", "SPARKLE_SCALE", "METAL_STYLE_REFLECTIONS", "SHININESS_OPACITY", "TILING_ZY", "TILING_ZX", "TILING_XY", "FALLOFF", "WS_LOCKED", "TEXTURE_MAP", "SPARKLE_MAP", "ENVMAP", "ENVIRONMENT_MAP", "ENVMAP_PERCENT_EMISSIVE", "SPHERE", "BOX", "resource" }); - entity_parameters.Add("SurfaceEffectSphere", new string[] { "deleted", "show_on_reset", "COLOUR_TINT", "COLOUR_TINT_OUTER", "INTENSITY", "OPACITY", "FADE_OUT_TIME", "SURFACE_WRAP", "ROUGHNESS_SCALE", "SPARKLE_SCALE", "METAL_STYLE_REFLECTIONS", "SHININESS_OPACITY", "TILING_ZY", "TILING_ZX", "TILING_XY", "WS_LOCKED", "TEXTURE_MAP", "SPARKLE_MAP", "ENVMAP", "ENVIRONMENT_MAP", "ENVMAP_PERCENT_EMISSIVE", "SPHERE", "resource" }); - entity_parameters.Add("SwitchLevel", new string[] { "level_name" }); - entity_parameters.Add("SyncOnAllPlayers", new string[] { "on_synchronized", "on_synchronized_host" }); - entity_parameters.Add("SyncOnFirstPlayer", new string[] { "on_synchronized", "on_synchronized_host", "on_synchronized_local" }); - entity_parameters.Add("Task", new string[] { "start_command", "selected_by_npc", "clean_up", "start_on_reset", "Job", "TaskPosition", "filter", "should_stop_moving_when_reached", "should_orientate_when_reached", "reached_distance_threshold", "selection_priority", "timeout", "always_on_tracker" }); - entity_parameters.Add("TerminalContent", new string[] { "selected", "content_title", "content_decoration_title", "additional_info", "is_connected_to_audio_log", "is_triggerable", "is_single_use" }); - entity_parameters.Add("TerminalFolder", new string[] { "code_success", "code_fail", "selected", "lock_on_reset", "content0", "content1", "code", "folder_title", "folder_lock_type" }); - entity_parameters.Add("Thinker", new string[] { "on_think", "delay_between_triggers", "is_continuous", "use_random_start", "random_start_delay", "total_thinking_time" }); - entity_parameters.Add("ThinkOnce", new string[] { "on_think", "start_on_reset", "use_random_start", "random_start_delay" }); - entity_parameters.Add("ThrowingPointOfImpact", new string[] { "show_point_of_impact", "hide_point_of_impact", "Location", "Visible" }); - entity_parameters.Add("ToggleFunctionality", new string[] { }); - entity_parameters.Add("TogglePlayerTorch", new string[] { }); - entity_parameters.Add("TorchDynamicMovement", new string[] { "start_on_reset", "torch", "max_spatial_velocity", "max_angular_velocity", "max_position_displacement", "max_target_displacement", "position_damping", "target_damping" }); - entity_parameters.Add("TRAV_1ShotClimbUnder", new string[] { "OnEnter", "OnExit", "enable_on_reset", "LinePath", "InUse", "character_classes" }); - entity_parameters.Add("TRAV_1ShotFloorVentEntrance", new string[] { "OnEnter", "Completed", "enable_on_reset", "LinePath", "character_classes", "resource" }); - entity_parameters.Add("TRAV_1ShotFloorVentExit", new string[] { "OnExit", "Completed", "enable_on_reset", "LinePath", "character_classes", "resource" }); - entity_parameters.Add("TRAV_1ShotLeap", new string[] { "OnEnter", "OnExit", "OnSuccess", "OnFailure", "enable_on_reset", "StartEdgeLinePath", "EndEdgeLinePath", "InUse", "MissDistance", "NearMissDistance", "character_classes" }); - entity_parameters.Add("TRAV_1ShotSpline", new string[] { "OnEnter", "OnExit", "enable_on_reset", "open_on_reset", "EntrancePath", "ExitPath", "MinimumPath", "MaximumPath", "MinimumSupport", "MaximumSupport", "template", "headroom", "extra_cost", "fit_end_to_edge", "min_speed", "max_speed", "animationTree", "character_classes", "resource" }); - entity_parameters.Add("TRAV_1ShotVentEntrance", new string[] { "OnEnter", "Completed", "enable_on_reset", "LinePath", "character_classes", "resource" }); - entity_parameters.Add("TRAV_1ShotVentExit", new string[] { "OnExit", "Completed", "enable_on_reset", "LinePath", "character_classes", "resource" }); - entity_parameters.Add("TRAV_ContinuousBalanceBeam", new string[] { "OnEnter", "OnExit", "enable_on_reset", "LinePath", "InUse", "character_classes" }); - entity_parameters.Add("TRAV_ContinuousCinematicSidle", new string[] { "OnEnter", "OnExit", "enable_on_reset", "LinePath", "InUse", "character_classes" }); - entity_parameters.Add("TRAV_ContinuousClimbingWall", new string[] { "OnEnter", "OnExit", "LinePath", "InUse", "Dangling", "character_classes" }); - entity_parameters.Add("TRAV_ContinuousLadder", new string[] { "OnEnter", "OnExit", "enable_on_reset", "LinePath", "InUse", "RungSpacing", "character_classes" }); - entity_parameters.Add("TRAV_ContinuousLedge", new string[] { "OnEnter", "OnExit", "enable_on_reset", "LinePath", "InUse", "Dangling", "Sidling", "character_classes" }); - entity_parameters.Add("TRAV_ContinuousPipe", new string[] { "OnEnter", "OnExit", "enable_on_reset", "LinePath", "InUse", "character_classes" }); - entity_parameters.Add("TRAV_ContinuousTightGap", new string[] { "OnEnter", "OnExit", "enable_on_reset", "LinePath", "InUse", "character_classes" }); - entity_parameters.Add("Trigger_AudioOccluded", new string[] { "NotOccluded", "Occluded", "position", "Range" }); - entity_parameters.Add("TriggerBindAllCharactersOfType", new string[] { "bound_trigger", "character_class" }); - entity_parameters.Add("TriggerBindAllNPCs", new string[] { "npc_inside", "npc_outside", "filter", "centre", "radius" }); - entity_parameters.Add("TriggerBindCharacter", new string[] { "bound_trigger", "characters" }); - entity_parameters.Add("TriggerBindCharactersInSquad", new string[] { "bound_trigger" }); - entity_parameters.Add("TriggerCameraViewCone", new string[] { "enter", "exit", "target", "fov", "aspect_ratio", "intersect_with_geometry", "use_camera_fov", "target_offset", "visible_area_type", "visible_area_horizontal", "visible_area_vertical", "raycast_grace" }); - entity_parameters.Add("TriggerCameraViewConeMulti", new string[] { "enter", "exit", "enter1", "exit1", "enter2", "exit2", "enter3", "exit3", "enter4", "exit4", "enter5", "exit5", "enter6", "exit6", "enter7", "exit7", "enter8", "exit8", "enter9", "exit9", "target", "target1", "target2", "target3", "target4", "target5", "target6", "target7", "target8", "target9", "fov", "aspect_ratio", "intersect_with_geometry", "number_of_inputs", "use_camera_fov", "visible_area_type", "visible_area_horizontal", "visible_area_vertical", "raycast_grace" }); - entity_parameters.Add("TriggerCameraVolume", new string[] { "inside", "enter", "exit", "inside_factor", "lookat_factor", "lookat_X_position", "lookat_Y_position", "start_radius", "radius" }); - entity_parameters.Add("TriggerCheckDifficulty", new string[] { "on_success", "on_failure", "DifficultyLevel" }); - entity_parameters.Add("TriggerContainerObjectsFilterCounter", new string[] { "none_passed", "some_passed", "all_passed", "filter", "container" }); - entity_parameters.Add("TriggerDamaged", new string[] { "on_damaged", "enable_on_reset", "physics_object", "impact_normal", "threshold" }); - entity_parameters.Add("TriggerDelay", new string[] { "delayed_trigger", "purged_trigger", "time_left", "Hrs", "Min", "Sec" }); - entity_parameters.Add("TriggerExtractBoundCharacter", new string[] { "unbound_trigger", "bound_character" }); - entity_parameters.Add("TriggerExtractBoundObject", new string[] { "unbound_trigger", "bound_object" }); - entity_parameters.Add("TriggerFilter", new string[] { "on_success", "on_failure", "filter" }); - entity_parameters.Add("TriggerLooper", new string[] { "target", "count", "delay" }); - entity_parameters.Add("TriggerObjectsFilter", new string[] { "on_success", "on_failure", "filter", "objects" }); - entity_parameters.Add("TriggerObjectsFilterCounter", new string[] { "none_passed", "some_passed", "all_passed", "objects", "filter" }); - entity_parameters.Add("TriggerRandom", new string[] { "Random_1", "Random_2", "Random_3", "Random_4", "Random_5", "Random_6", "Random_7", "Random_8", "Random_9", "Random_10", "Random_11", "Random_12", "Num" }); - entity_parameters.Add("TriggerRandomSequence", new string[] { "Random_1", "Random_2", "Random_3", "Random_4", "Random_5", "Random_6", "Random_7", "Random_8", "Random_9", "Random_10", "All_triggered", "current", "num" }); - entity_parameters.Add("TriggerSelect", new string[] { "Pin_0", "Pin_1", "Pin_2", "Pin_3", "Pin_4", "Pin_5", "Pin_6", "Pin_7", "Pin_8", "Pin_9", "Pin_10", "Pin_11", "Pin_12", "Pin_13", "Pin_14", "Pin_15", "Pin_16", "Object_0", "Object_1", "Object_2", "Object_3", "Object_4", "Object_5", "Object_6", "Object_7", "Object_8", "Object_9", "Object_10", "Object_11", "Object_12", "Object_13", "Object_14", "Object_15", "Object_16", "Result", "index" }); - entity_parameters.Add("TriggerSelect_Direct", new string[] { "Changed_to_0", "Changed_to_1", "Changed_to_2", "Changed_to_3", "Changed_to_4", "Changed_to_5", "Changed_to_6", "Changed_to_7", "Changed_to_8", "Changed_to_9", "Changed_to_10", "Changed_to_11", "Changed_to_12", "Changed_to_13", "Changed_to_14", "Changed_to_15", "Changed_to_16", "Object_0", "Object_1", "Object_2", "Object_3", "Object_4", "Object_5", "Object_6", "Object_7", "Object_8", "Object_9", "Object_10", "Object_11", "Object_12", "Object_13", "Object_14", "Object_15", "Object_16", "Result", "TriggeredIndex", "Changes_only" }); - entity_parameters.Add("TriggerSequence", new string[] { "proxy_enable_on_reset", "attach_on_reset", "duration", "trigger_mode", "random_seed", "use_random_intervals", "no_duplicates", "interval_multiplier" }); - entity_parameters.Add("TriggerSimple", new string[] { }); - entity_parameters.Add("TriggerSwitch", new string[] { "Pin_1", "Pin_2", "Pin_3", "Pin_4", "Pin_5", "Pin_6", "Pin_7", "Pin_8", "Pin_9", "Pin_10", "current", "num", "loop" }); - entity_parameters.Add("TriggerSync", new string[] { "Pin1_Synced", "Pin2_Synced", "Pin3_Synced", "Pin4_Synced", "Pin5_Synced", "Pin6_Synced", "Pin7_Synced", "Pin8_Synced", "Pin9_Synced", "Pin10_Synced", "reset_on_trigger" }); - entity_parameters.Add("TriggerTouch", new string[] { "touch_event", "enable_on_reset", "physics_object", "impact_normal" }); - entity_parameters.Add("TriggerUnbindCharacter", new string[] { "unbound_trigger" }); - entity_parameters.Add("TriggerViewCone", new string[] { "enter", "exit", "target_is_visible", "no_target_visible", "target", "fov", "max_distance", "aspect_ratio", "source_position", "filter", "intersect_with_geometry", "visible_target", "target_offset", "visible_area_type", "visible_area_horizontal", "visible_area_vertical", "raycast_grace" }); - entity_parameters.Add("TriggerVolumeFilter", new string[] { "on_event_entered", "on_event_exited", "filter" }); - entity_parameters.Add("TriggerVolumeFilter_Monitored", new string[] { "on_event_entered", "on_event_exited", "filter" }); - entity_parameters.Add("TriggerWeightedRandom", new string[] { "Random_1", "Random_2", "Random_3", "Random_4", "Random_5", "Random_6", "Random_7", "Random_8", "Random_9", "Random_10", "current", "Weighting_01", "Weighting_02", "Weighting_03", "Weighting_04", "Weighting_05", "Weighting_06", "Weighting_07", "Weighting_08", "Weighting_09", "Weighting_10", "allow_same_pin_in_succession" }); - entity_parameters.Add("TriggerWhenSeeTarget", new string[] { "seen", "Target" }); - entity_parameters.Add("TutorialMessage", new string[] { "text", "text_list", "show_animation" }); - entity_parameters.Add("UI_Attached", new string[] { "closed", "ui_icon" }); - entity_parameters.Add("UI_Container", new string[] { "take_slot", "emptied", "contents", "has_been_used", "is_persistent", "is_temporary" }); - entity_parameters.Add("UI_Icon", new string[] { "start", "start_fail", "button_released", "broadcasted_start", "highlight", "unhighlight", "lock_looked_at", "lock_interaction", "lock_on_reset", "enable_on_reset", "show_on_reset", "geometry", "highlight_geometry", "target_pickup_item", "highlight_distance_threshold", "interaction_distance_threshold", "icon_user", "unlocked_text", "locked_text", "action_text", "icon_keyframe", "can_be_used", "category", "push_hold_time" }); - entity_parameters.Add("UI_KeyGate", new string[] { "keycard_success", "keycode_success", "keycard_fail", "keycode_fail", "keycard_cancelled", "keycode_cancelled", "ui_breakout_triggered", "lock_on_reset", "light_on_reset", "code", "carduid", "key_type" }); - entity_parameters.Add("UI_Keypad", new string[] { "success", "fail", "code", "exit_on_fail" }); - entity_parameters.Add("UI_ReactionGame", new string[] { "success", "fail", "stage0_success", "stage0_fail", "stage1_success", "stage1_fail", "stage2_success", "stage2_fail", "ui_breakout_triggered", "resources_finished_unloading", "resources_finished_loading", "completion_percentage", "exit_on_fail" }); - entity_parameters.Add("UIBreathingGameIcon", new string[] { "fill_percentage", "prompt_text" }); - entity_parameters.Add("UiSelectionBox", new string[] { "is_priority" }); - entity_parameters.Add("UiSelectionSphere", new string[] { "is_priority" }); - entity_parameters.Add("UnlockAchievement", new string[] { "achievement_id" }); - entity_parameters.Add("UnlockLogEntry", new string[] { "entry" }); - entity_parameters.Add("UnlockMapDetail", new string[] { "map_keyframe", "details" }); - entity_parameters.Add("UpdateGlobalPosition", new string[] { "PositionName" }); - entity_parameters.Add("UpdateLeaderBoardDisplay", new string[] { "time" }); - entity_parameters.Add("UpdatePrimaryObjective", new string[] { "show_message", "clear_objective" }); - entity_parameters.Add("UpdateSubObjective", new string[] { "slot_number", "show_message", "clear_objective" }); - entity_parameters.Add("VariableAnimationInfo", new string[] { "AnimationSet", "Animation" }); - entity_parameters.Add("VariableBool", new string[] { "initial_value", "is_persistent" }); - entity_parameters.Add("VariableColour", new string[] { "initial_colour" }); - entity_parameters.Add("VariableEnum", new string[] { "initial_value", "is_persistent", "VariableEnumString" }); - entity_parameters.Add("VariableFilterObject", new string[] { }); - entity_parameters.Add("VariableFlashScreenColour", new string[] { "start_on_reset", "pause_on_reset", "initial_colour", "flash_layer_name" }); - entity_parameters.Add("VariableFloat", new string[] { "initial_value", "is_persistent" }); - entity_parameters.Add("VariableHackingConfig", new string[] { "nodes", "sensors", "victory_nodes", "victory_sensors" }); - entity_parameters.Add("VariableInt", new string[] { "initial_value", "is_persistent" }); - entity_parameters.Add("VariableObject", new string[] { "initial" }); - entity_parameters.Add("VariablePosition", new string[] { }); - entity_parameters.Add("VariableString", new string[] { "initial_value", "is_persistent" }); - entity_parameters.Add("VariableThePlayer", new string[] { }); - entity_parameters.Add("VariableTriggerObject", new string[] { }); - entity_parameters.Add("VariableVector", new string[] { "initial_x", "initial_y", "initial_z" }); - entity_parameters.Add("VariableVector2", new string[] { "initial_value" }); - entity_parameters.Add("VectorAdd", new string[] { }); - entity_parameters.Add("VectorDirection", new string[] { "From", "To", "Result" }); - entity_parameters.Add("VectorDistance", new string[] { "LHS", "RHS", "Result" }); - entity_parameters.Add("VectorLinearInterpolateSpeed", new string[] { "on_finished", "on_think", "Initial_Value", "Target_Value", "Reverse", "Result", "Speed", "PingPong", "Loop" }); - entity_parameters.Add("VectorLinearInterpolateTimed", new string[] { "on_finished", "on_think", "Initial_Value", "Target_Value", "Reverse", "Result", "Time", "PingPong", "Loop" }); - entity_parameters.Add("VectorLinearProportion", new string[] { "Initial_Value", "Target_Value", "Proportion", "Result" }); - entity_parameters.Add("VectorMath", new string[] { "LHS", "RHS", "Result" }); - entity_parameters.Add("VectorModulus", new string[] { "Input", "Result" }); - entity_parameters.Add("VectorMultiply", new string[] { }); - entity_parameters.Add("VectorMultiplyByPos", new string[] { "Vector", "WorldPos", "Result" }); - entity_parameters.Add("VectorNormalise", new string[] { "Input", "Result" }); - entity_parameters.Add("VectorProduct", new string[] { }); - entity_parameters.Add("VectorReflect", new string[] { "Input", "Normal", "Result" }); - entity_parameters.Add("VectorRotateByPos", new string[] { "Vector", "WorldPos", "Result" }); - entity_parameters.Add("VectorRotatePitch", new string[] { "Vector", "Pitch", "Result" }); - entity_parameters.Add("VectorRotateRoll", new string[] { "Vector", "Roll", "Result" }); - entity_parameters.Add("VectorRotateYaw", new string[] { "Vector", "Yaw", "Result" }); - entity_parameters.Add("VectorScale", new string[] { "LHS", "RHS", "Result" }); - entity_parameters.Add("VectorSubtract", new string[] { }); - entity_parameters.Add("VectorYaw", new string[] { "Vector", "Result" }); - entity_parameters.Add("VideoCapture", new string[] { "clip_name", "only_in_capture_mode" }); - entity_parameters.Add("VignetteSettings", new string[] { "vignette_factor", "vignette_chromatic_aberration_scale" }); - entity_parameters.Add("VisibilityMaster", new string[] { "renderable", "mastered_by_visibility" }); - entity_parameters.Add("Weapon_AINotifier", new string[] { }); - entity_parameters.Add("WEAPON_AmmoTypeFilter", new string[] { "passed", "failed", "AmmoType" }); - entity_parameters.Add("WEAPON_AttackerFilter", new string[] { "passed", "failed", "filter" }); - entity_parameters.Add("WEAPON_DamageFilter", new string[] { "passed", "failed", "damage_threshold", "WEAPON_DidHitSomethingFilter", "passed", "failed" }); - entity_parameters.Add("WEAPON_Effect", new string[] { "WorldPos", "AttachedEffects", "UnattachedEffects", "LifeTime" }); - entity_parameters.Add("WEAPON_GiveToCharacter", new string[] { "Character", "Weapon", "is_holstered" }); - entity_parameters.Add("WEAPON_GiveToPlayer", new string[] { "weapon", "holster", "starting_ammo" }); - entity_parameters.Add("WEAPON_ImpactAngleFilter", new string[] { "greater", "less", "ReferenceAngle" }); - entity_parameters.Add("WEAPON_ImpactCharacterFilter", new string[] { "passed", "failed", "character_classes", "character_body_location" }); - entity_parameters.Add("WEAPON_ImpactEffect", new string[] { "StaticEffects", "DynamicEffects", "DynamicAttachedEffects", "Type", "Orientation", "Priority", "SafeDistant", "LifeTime", "character_damage_offset", "RandomRotation" }); - entity_parameters.Add("WEAPON_ImpactFilter", new string[] { "passed", "failed", "PhysicMaterial" }); - entity_parameters.Add("WEAPON_ImpactInspector", new string[] { "damage", "impact_position", "impact_target" }); - entity_parameters.Add("WEAPON_ImpactOrientationFilter", new string[] { "passed", "failed", "ThresholdAngle", "Orientation" }); - entity_parameters.Add("WEAPON_MultiFilter", new string[] { "passed", "failed", "AttackerFilter", "TargetFilter", "DamageThreshold", "DamageType", "UseAmmoFilter", "AmmoType" }); - entity_parameters.Add("WEAPON_TargetObjectFilter", new string[] { "passed", "failed", "filter" }); - entity_parameters.Add("Zone", new string[] { "composites", "suspend_on_unload", "space_visible" }); - entity_parameters.Add("ZoneExclusionLink", new string[] { "ZoneA", "ZoneB", "exclude_streaming" }); - entity_parameters.Add("ZoneLink", new string[] { "ZoneA", "ZoneB", "cost" }); - entity_parameters.Add("ZoneLoaded", new string[] { "on_loaded", "on_unloaded" }); - } - - private static List lookup_enum; - private static Dictionary entity_parameters = new Dictionary(); - } -} diff --git a/CathodeLib/Scripts/CommandsPAK/EntityNameLookup.cs b/CathodeLib/Scripts/CommandsPAK/EntityNameLookup.cs deleted file mode 100644 index 91fcec6..0000000 --- a/CathodeLib/Scripts/CommandsPAK/EntityNameLookup.cs +++ /dev/null @@ -1,170 +0,0 @@ -using CathodeLib; -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Runtime.InteropServices; -using System.Runtime.Serialization.Formatters.Binary; -using System.Text; - -namespace CATHODE.Commands -{ - //This should be initialised per-commandspak, and serves as a helpful extension to manage entity & composite names - public class EntityNameLookup - { - private CommandsPAK commandsPAK; - private Dictionary> vanilla_composites; - private Dictionary> custom_composites; - - public EntityNameLookup(CommandsPAK commands = null) - { - commandsPAK = commands; - if (commandsPAK != null) - commandsPAK.OnSaved += SaveCustomNames; - - LoadVanillaNames(); - LoadCustomNames(); - } - -#if DEBUG - /* For testing only: get from any composite */ - public string GetFromAnyComposite(ShortGuid id) - { - foreach (KeyValuePair> composite in vanilla_composites) - { - foreach (KeyValuePair entity in composite.Value) - { - if (composite.Key == id) return entity.Value; - } - } - return ""; - } -#endif - - /* Get the name of an entity contained within a composite */ - public string GetEntityName(ShortGuid compositeID, ShortGuid entityID) - { - if (custom_composites.ContainsKey(compositeID) && custom_composites[compositeID].ContainsKey(entityID)) - return custom_composites[compositeID][entityID]; - if (vanilla_composites.ContainsKey(compositeID) && vanilla_composites[compositeID].ContainsKey(entityID)) - return vanilla_composites[compositeID][entityID]; - return entityID.ToString(); - } - - /* Set the name of an entity contained within a composite */ - public void SetEntityName(ShortGuid compositeID, ShortGuid entityID, string name) - { - if (!custom_composites.ContainsKey(compositeID)) - custom_composites.Add(compositeID, new Dictionary()); - - if (!custom_composites[compositeID].ContainsKey(entityID)) - custom_composites[compositeID].Add(entityID, name); - else - custom_composites[compositeID][entityID] = name; - } - - /* Clear the name of an entity contained within a composite */ - public void ClearEntityName(ShortGuid compositeID, ShortGuid entityID) - { - if (custom_composites.ContainsKey(compositeID)) - vanilla_composites[compositeID].Remove(entityID); - } - - - /* Load all standard entity/composite names from our offline DB */ - private void LoadVanillaNames() - { - BinaryReader reader = new BinaryReader(new MemoryStream(CathodeLib.Properties.Resources.composite_entity_names)); - vanilla_composites = ConsumeDatabase(reader, reader.ReadInt32()); - reader.Close(); - } - - /* Pull non-vanilla entity names from the CommandsPAK */ - private void LoadCustomNames() - { - if (commandsPAK == null) return; - int endPos = GetEndOfCommands(); - BinaryReader reader = new BinaryReader(File.OpenRead(commandsPAK.Filepath)); - reader.BaseStream.Position = endPos; - if ((int)reader.BaseStream.Length - endPos == 0 || reader.ReadByte() != (byte)254) - { - custom_composites = new Dictionary>(); - reader.Close(); - return; - } - reader.BaseStream.Position += 4; - int compCount = reader.ReadInt32(); - reader.BaseStream.Position += 8; - custom_composites = ConsumeDatabase(reader, compCount); - reader.Close(); - } - - /* Write non-vanilla entity names to the CommandsPAK */ - private void SaveCustomNames() - { - if (commandsPAK == null) return; - int endPos = GetEndOfCommands(); - //TODO: move this writing functionality into its own thing - BinaryWriter writer = new BinaryWriter(File.OpenWrite(commandsPAK.Filepath)); - bool hasAlreadyWritten = (int)writer.BaseStream.Length - endPos != 0; - int posToJumpBackTo = 0; - writer.BaseStream.Position = endPos; - writer.Write((byte)254); - writer.Write((int)writer.BaseStream.Position + 16); - writer.Write(custom_composites.Count); - if (hasAlreadyWritten) - { - writer.BaseStream.Position += 8; - } - else - { - posToJumpBackTo = (int)writer.BaseStream.Position; - writer.Write(0); - writer.Write(0); - } - foreach (KeyValuePair> composite in custom_composites) - { - Utilities.Write(writer, composite.Key); - writer.Write(composite.Value.Count); - foreach (KeyValuePair entity in composite.Value) - { - Utilities.Write(writer, entity.Key); - writer.Write(entity.Value); - } - } - int posToWrite = (int)writer.BaseStream.Position; - writer.BaseStream.Position = posToJumpBackTo; - writer.Write(posToWrite); - writer.Close(); - } - - /* Consume our stored entity info */ - private Dictionary> ConsumeDatabase(BinaryReader reader, int compCount) - { - Dictionary> composites = new Dictionary>(compCount); - for (int i = 0; i < compCount; i++) - { - ShortGuid compositeID = Utilities.Consume(reader); - int entityCount = reader.ReadInt32(); - composites.Add(compositeID, new Dictionary(entityCount)); - for (int x = 0; x < entityCount; x++) - { - ShortGuid entityID = Utilities.Consume(reader); - composites[compositeID].Add(entityID, reader.ReadString()); - } - } - Console.WriteLine("Loaded names for " + compCount + " composites!"); - return composites; - } - - /* Get the position where we start writing our own data */ - private int GetEndOfCommands() - { - BinaryReader reader = new BinaryReader(File.OpenRead(commandsPAK.Filepath)); - reader.BaseStream.Position = 20; - int end_of_pak = (reader.ReadInt32() * 4) + (reader.ReadInt32() * 4); - reader.Close(); - return end_of_pak; - } - } -} diff --git a/CathodeLib/Scripts/LEGACY_DAN/CathodeModels.cs b/CathodeLib/Scripts/LEGACY_DAN/CathodeModels.cs index 4dea9a3..9c4a4a3 100644 --- a/CathodeLib/Scripts/LEGACY_DAN/CathodeModels.cs +++ b/CathodeLib/Scripts/LEGACY_DAN/CathodeModels.cs @@ -1,4 +1,5 @@ -using System; +using CathodeLib; +using System; using System.Buffers.Binary; using System.Collections.Generic; using System.IO; @@ -13,7 +14,7 @@ public class CathodeModels : CathodePAK { public List Models; - private alien_model_bin modelBIN; + public alien_model_bin modelBIN; private string pathToPAK, pathToBIN; @@ -29,8 +30,8 @@ private void LoadModelPAK() { LoadPAK(pathToPAK, true); - Models = new List(header.entryCount); - for (int i = 0; i < header.entryCount; ++i) + Models = new List(header.EntryCount); + for (int i = 0; i < header.EntryCount; ++i) { BinaryReader modelBuffer = new BinaryReader(new MemoryStream(entryContents[i])); @@ -51,7 +52,7 @@ private void LoadModelPAK() ModelDataEntry newChunk = new ModelDataEntry(); modelBuffer.BaseStream.Position = SubmeshInfo[x].Offset; - newChunk.content = modelBuffer.ReadBytes(SubmeshInfo[x].Size); + newChunk.content = (SubmeshInfo[x].Size != -1) ? modelBuffer.ReadBytes(SubmeshInfo[x].Size) : new byte[] { }; newChunk.binIndex = SubmeshInfo[x].BINIndex; Model.Submeshes.Add(newChunk); } diff --git a/CathodeLib/Scripts/LEGACY_DAN/CathodePAK.cs b/CathodeLib/Scripts/LEGACY_DAN/CathodePAK.cs index 34ee1f7..43ebb2c 100644 --- a/CathodeLib/Scripts/LEGACY_DAN/CathodePAK.cs +++ b/CathodeLib/Scripts/LEGACY_DAN/CathodePAK.cs @@ -1,4 +1,5 @@ -using System; +using CathodeLib; +using System; using System.Buffers.Binary; using System.Collections; using System.Collections.Generic; @@ -20,6 +21,7 @@ public class CathodePAK protected void LoadPAK(string filepath, bool BigEndian) { + /* BinaryReader Stream = new BinaryReader(File.OpenRead(filepath)); header = Utilities.Consume(Stream); @@ -34,67 +36,79 @@ protected void LoadPAK(string filepath, bool BigEndian) entryContents.Add(Buffer); } + Stream.Close(); + */ + + BinaryReader Stream = new BinaryReader(File.OpenRead(filepath)); + + GenericPAKHeader Header = Utilities.Consume(Stream); + if (BigEndian) + { + Header.Version = BinaryPrimitives.ReverseEndianness(Header.Version); + Header.MaxEntryCount = BinaryPrimitives.ReverseEndianness(Header.MaxEntryCount); + Header.EntryCount = BinaryPrimitives.ReverseEndianness(Header.EntryCount); + } + + GenericPAKEntry[] Entries = Utilities.ConsumeArray(Stream, Header.MaxEntryCount); + + //todo-mattf; remove the need for this + long resetpos = Stream.BaseStream.Position; + byte[] DataStart = Stream.ReadBytes((int)Stream.BaseStream.Length - (int)resetpos); + Stream.BaseStream.Position = resetpos; + + List EntryDatas = new List(Header.MaxEntryCount); + for (int EntryIndex = 0; EntryIndex < Header.MaxEntryCount; ++EntryIndex) + { + if (BigEndian) + { + GenericPAKEntry Entry = Entries[EntryIndex]; + Entry.Length = BinaryPrimitives.ReverseEndianness(Entries[EntryIndex].Length); + Entry.DataLength = BinaryPrimitives.ReverseEndianness(Entries[EntryIndex].DataLength); + Entry.UnknownIndex = BinaryPrimitives.ReverseEndianness(Entries[EntryIndex].UnknownIndex); + Entry.BINIndex = BinaryPrimitives.ReverseEndianness(Entries[EntryIndex].BINIndex); + Entry.Offset = BinaryPrimitives.ReverseEndianness(Entries[EntryIndex].Offset); + Entries[EntryIndex] = Entry; + } + byte[] Buffer = (Entries[EntryIndex].DataLength == -1) ? new byte[] { } : Stream.ReadBytes(Entries[EntryIndex].DataLength); + EntryDatas.Add(Buffer); + } + + header = Header; + entryHeaders = Entries; + entryContents = EntryDatas; + Stream.Close(); } } [StructLayout(LayoutKind.Sequential, Pack = 1)] public struct GenericPAKHeader - { - public fourcc magic; //unused - public int versionPAK; - public int versionBIN; - public int entryCount; - public int entryCountValidation; //should match entryCount - public int _Unknown3; - public int _Unknown4; + { + public int _Unknown1; + public int _Unknown2; + public int Version; + public int EntryCount; + public int MaxEntryCount; + public int _Unknown3; + public int _Unknown4; public int _Unknown5; - - public void EndianSwap() - { - //swap magic? - versionPAK = BinaryPrimitives.ReverseEndianness(versionPAK); - versionBIN = BinaryPrimitives.ReverseEndianness(versionBIN); - entryCount = BinaryPrimitives.ReverseEndianness(entryCount); - entryCountValidation = BinaryPrimitives.ReverseEndianness(entryCountValidation); - _Unknown3 = BinaryPrimitives.ReverseEndianness(_Unknown3); - _Unknown4 = BinaryPrimitives.ReverseEndianness(_Unknown4); - _Unknown5 = BinaryPrimitives.ReverseEndianness(_Unknown5); - } }; [StructLayout(LayoutKind.Sequential, Pack = 1)] public struct GenericPAKEntry - { - public int _Unknown1; //TODO: Is 'alien_pak_header' 40 bytes long instead? - public int _Unknown2; - public int length; - public int lengthValidation; //should match length - public int offset; - public int _Unknown3; - public int _Unknown4; - public int _Unknown5; - public Int16 _Unknown6; - public Int16 indexBIN; - public int _Unknown7; + { + public int _Unknown1; //TODO: Is 'alien_pak_header' 40 bytes long instead? + public int _Unknown2; + public int Length; + public int DataLength; //TODO: Seems to be the aligned version of Length, aligned to 16 bytes. + public int Offset; + public int _Unknown3; + public int _Unknown4; + public int _Unknown5; + public Int16 UnknownIndex; + public Int16 BINIndex; + public int _Unknown6; + public int _Unknown7; public int _Unknown8; - public int _Unknown9; - - public void EndianSwap() - { - _Unknown1 = BinaryPrimitives.ReverseEndianness(_Unknown1); - _Unknown2 = BinaryPrimitives.ReverseEndianness(_Unknown2); - length = BinaryPrimitives.ReverseEndianness(length); - lengthValidation = BinaryPrimitives.ReverseEndianness(lengthValidation); - offset = BinaryPrimitives.ReverseEndianness(offset); - _Unknown3 = BinaryPrimitives.ReverseEndianness(_Unknown3); - _Unknown4 = BinaryPrimitives.ReverseEndianness(_Unknown4); - _Unknown5 = BinaryPrimitives.ReverseEndianness(_Unknown5); - _Unknown6 = BinaryPrimitives.ReverseEndianness(_Unknown6); - indexBIN = BinaryPrimitives.ReverseEndianness(indexBIN); - _Unknown7 = BinaryPrimitives.ReverseEndianness(_Unknown7); - _Unknown8 = BinaryPrimitives.ReverseEndianness(_Unknown8); - _Unknown9 = BinaryPrimitives.ReverseEndianness(_Unknown9); - } }; } \ No newline at end of file diff --git a/CathodeLib/Scripts/LEGACY_DAN/CathodeTextures.cs b/CathodeLib/Scripts/LEGACY_DAN/CathodeTextures.cs index 2527868..ab8093c 100644 --- a/CathodeLib/Scripts/LEGACY_DAN/CathodeTextures.cs +++ b/CathodeLib/Scripts/LEGACY_DAN/CathodeTextures.cs @@ -1,4 +1,5 @@ -using System; +using CathodeLib; +using System; using System.Collections.Generic; using System.IO; using System.Linq; diff --git a/CathodeLib/Scripts/LEGACY_MATT/BinaryUtilities.cs b/CathodeLib/Scripts/LEGACY_MATT/BinaryUtilities.cs index 05555d1..30b35fa 100644 --- a/CathodeLib/Scripts/LEGACY_MATT/BinaryUtilities.cs +++ b/CathodeLib/Scripts/LEGACY_MATT/BinaryUtilities.cs @@ -15,83 +15,5 @@ namespace CathodeLib * This will probably be expanded over time as required. * */ - public static class BigEndianUtils - { - public static int ReadInt32(BinaryReader Reader) - { - byte[] data = Reader.ReadBytes(4); - Array.Reverse(data); - return BitConverter.ToInt32(data, 0); - } - public static Int16 ReadInt16(BinaryReader Reader) - { - var data = Reader.ReadBytes(2); - Array.Reverse(data); - return BitConverter.ToInt16(data, 0); - } - public static Int64 ReadInt64(BinaryReader Reader) - { - var data = Reader.ReadBytes(8); - Array.Reverse(data); - return BitConverter.ToInt64(data, 0); - } - public static UInt32 ReadUInt32(BinaryReader Reader) - { - var data = Reader.ReadBytes(4); - Array.Reverse(data); - return BitConverter.ToUInt32(data, 0); - } - - public static byte[] FlipEndian(byte[] ThisEndian) - { - Array.Reverse(ThisEndian); - return ThisEndian; - } - } - public static class ExtraBinaryUtils - { - //Gets a string from a byte array (at position) by reading chars until a null is hit - public static string GetStringFromByteArray(byte[] byte_array, int position) - { - string to_return = ""; - for (int i = 0; i < 999999999; i++) - { - byte this_byte = byte_array[position + i]; - if (this_byte == 0x00) - { - break; - } - to_return += (char)this_byte; - } - return to_return; - } - - //Removes the leading nulls from a byte array, useful for cleaning byte-aligned file extracts - public static byte[] RemoveLeadingNulls(byte[] extracted_file) - { - //Remove from leading - int start_offset = 0; - for (int i = 0; i < 4; i++) - { - if (extracted_file[i] == 0x00) - { - start_offset = i+1; - continue; - } - break; - } - byte[] to_return = new byte[extracted_file.Length - start_offset]; - Array.Copy(extracted_file, start_offset, to_return, 0, to_return.Length); - return to_return; - } - - //Writes a string without a leading length value (C# BinaryWriter default) - public static void WriteString(string string_to_write, BinaryWriter writer) - { - foreach (char character in string_to_write) - { - writer.Write(character); - } - } - } + } diff --git a/CathodeLib/Scripts/MiscFormats/AnimationStringDB.cs b/CathodeLib/Scripts/MiscFormats/AnimationStringDB.cs deleted file mode 100644 index 4b95e45..0000000 --- a/CathodeLib/Scripts/MiscFormats/AnimationStringDB.cs +++ /dev/null @@ -1,92 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Runtime.InteropServices; -using System.Text; -using CATHODE.Commands; -using CathodeLib; - -namespace CATHODE.Misc -{ - /* Handles Cathode animation string DB files (ANIM_STRING_DB.BIN, ANIM_STRING_DB_DEBUG.BIN) */ - public class AnimationStringDB - { - public string Filepath { get { return filepath; } } - private string filepath; - - private Dictionary cachedStrings = new Dictionary(); - - /* Load the file */ - public AnimationStringDB(string path) - { - filepath = path; - - //Read all data in - BinaryReader stream = new BinaryReader(File.OpenRead(path)); - int EntryCount = stream.ReadInt32(); - int StringCount = stream.ReadInt32(); - Entry[] entries = Utilities.ConsumeArray(stream, EntryCount); - int[] stringOffsets = Utilities.ConsumeArray(stream, StringCount); - List strings = new List(); - for (int i = 0; i < StringCount; i++) strings.Add(Utilities.ReadString(stream)); - stream.Close(); - - //Parse - for (int i = 0; i < entries.Length; i++) cachedStrings.Add(entries[i].StringID, strings[entries[i].StringIndex]); - //TODO: encoding on a couple strings here is wrong - } - - /* Add a string to the DB */ - public void AddString(string str) - { - uint id = Utilities.AnimationHashedString(str); - if (cachedStrings.ContainsKey(id)) return; - cachedStrings.Add(id, str); - } - - /* Remove a string from the DB */ - public void RemoveString(string str) - { - uint id = Utilities.AnimationHashedString(str); - cachedStrings.Remove(id); - } - - /* Save the file */ - public void Save() - { - BinaryWriter writer = new BinaryWriter(File.OpenWrite(filepath)); - writer.Write(cachedStrings.Count); - writer.Write(cachedStrings.Count); - int count = 0; - foreach (KeyValuePair value in cachedStrings) - { - writer.Write(value.Key); - writer.Write(count); - count++; - } - int baseline = (cachedStrings.Count * 4 * 2) + 8 + (cachedStrings.Count * 4); - writer.BaseStream.Position = baseline; - List stringOffsets = new List(); - foreach (KeyValuePair value in cachedStrings) - { - stringOffsets.Add((int)writer.BaseStream.Position - baseline); - ExtraBinaryUtils.WriteString(value.Value, writer); - writer.Write((char)0x00); - } - writer.BaseStream.Position = (cachedStrings.Count * 4 * 2) + 8; - for (int i = 0; i < stringOffsets.Count; i++) - { - writer.Write(stringOffsets[i]); - } - writer.Close(); - } - - [StructLayout(LayoutKind.Sequential, Pack = 1)] - private struct Entry - { - public uint StringID; - public int StringIndex; - }; - } -} diff --git a/CathodeLib/Scripts/MiscFormats/CollisionMap.cs b/CathodeLib/Scripts/MiscFormats/CollisionMap.cs deleted file mode 100644 index 57cf39f..0000000 --- a/CathodeLib/Scripts/MiscFormats/CollisionMap.cs +++ /dev/null @@ -1,70 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Runtime.InteropServices; -using System.Text; -using System.Threading.Tasks; - -namespace CATHODE.Misc -{ - /* Handles Cathode COLLISION.MAP files */ - public class CollisionMap - { - private string filepath; - public CollisionMapHeader header; - public CollisionMapEntry[] entries; - - /* Load the file */ - public CollisionMap(string path) - { - filepath = path; - - BinaryReader stream = new BinaryReader(File.OpenRead(path)); - header = Utilities.Consume(stream); - entries = Utilities.ConsumeArray(stream, header.EntryCount); - stream.Close(); - } - - /* Save the file */ - public void Save() - { - BinaryWriter stream = new BinaryWriter(File.OpenWrite(filepath)); - stream.BaseStream.SetLength(0); - Utilities.Write(stream, header); - Utilities.Write(stream, entries); - stream.Close(); - } - - /* Data accessors */ - public int EntryCount { get { return entries.Length; } } - public CollisionMapEntry[] Entries { get { return entries; } } - public CollisionMapEntry GetEntry(int i) - { - return entries[i]; - } - - /* Data setters */ - public void SetEntry(int i, CollisionMapEntry content) - { - entries[i] = content; - } - } - - [StructLayout(LayoutKind.Sequential, Pack = 1)] - public struct CollisionMapHeader - { - public int DataSize; - public int EntryCount; - }; - - [StructLayout(LayoutKind.Sequential, Pack = 1)] - public struct CollisionMapEntry - { - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)] - public int[] Unknowns1; //12 - public int ID; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 7)] - public int[] Unknowns2; //12 - }; -} \ No newline at end of file diff --git a/CathodeLib/Scripts/MiscFormats/EnvironmentAnimationDatabase.cs b/CathodeLib/Scripts/MiscFormats/EnvironmentAnimationDatabase.cs deleted file mode 100644 index f8e0b91..0000000 --- a/CathodeLib/Scripts/MiscFormats/EnvironmentAnimationDatabase.cs +++ /dev/null @@ -1,117 +0,0 @@ -using System.Collections.Generic; -using System.IO; -using System.Runtime.InteropServices; -#if UNITY_EDITOR || UNITY_STANDALONE -using UnityEngine; -#else -using System.Numerics; -#endif - -namespace CATHODE.Misc -{ - /* Handles Cathode ENVIRONMENT_ANIMATION.DAT files */ - public class EnvironmentAnimationDatabase - { - //This file is referenced by ANIMATED_MODEL resource type in COMMANDS - - private string filepath; - private EnvironmentAnimationHeader Header; - private EnvironmentAnimationEntry1[] Entries0; - private Matrix4x4[] Matrices0; - private Matrix4x4[] Matrices1; - private int[] IDs0; - private int[] IDs1; - private EnvironmentAnimationEntry2[] Entries1; - - /* Load the file */ - public EnvironmentAnimationDatabase(string path) - { - filepath = path; - - BinaryReader Stream = new BinaryReader(File.OpenRead(filepath)); - Header = Utilities.Consume(Stream); - Entries0 = Utilities.ConsumeArray(Stream, (int)Header.EntryCount0); - Matrices0 = Utilities.ConsumeArray(Stream, (int)Header.EntryCount0); - Matrices1 = Utilities.ConsumeArray(Stream, (int)Header.EntryCount0); - IDs0 = Utilities.ConsumeArray(Stream, (int)Header.EntryCount0); - IDs1 = Utilities.ConsumeArray(Stream, (int)Header.EntryCount0); - Entries1 = Utilities.ConsumeArray( Stream, (int)Header.EntryCount0); - Stream.Close(); - } - - /* Save the file */ - public void Save() - { - BinaryWriter stream = new BinaryWriter(File.OpenWrite(filepath)); - stream.BaseStream.SetLength(0); - Utilities.Write(stream, Header); - Utilities.Write(stream, Entries0); - Utilities.Write(stream, Matrices0); - Utilities.Write(stream, Matrices1); - Utilities.Write(stream, IDs0); - Utilities.Write(stream, IDs1); - Utilities.Write(stream, Entries1); - stream.Close(); - } - - - //TODO: edit functions - } - - [StructLayout(LayoutKind.Sequential, Pack = 1)] - public struct EnvironmentAnimationHeader - { - public int Version; - public int TotalFileSize; - - public int MatricesOffset0; - public int MatrixCount0; - - public int MatricesOffset1; - public int MatrixCount1; - - public int EntriesOffset1; - public int EntryCount1; - - public int EntriesOffset0; - public int EntryCount0; - - public int IDsOffset0; - public int IDCount0; - - public int IDsOffset1; - public int IDCount1; - - public int Unknown0_; - public int Unknown1_; - }; - - [StructLayout(LayoutKind.Sequential, Pack = 1)] - public struct EnvironmentAnimationEntry1 - { - public Matrix4x4 Matrix; - public int ID; - public int UnknownZero0_; - public int ResourceIndex; - public int IDCount0; - public int IDIndex0; - public int IDCount1; - public int IDIndex1; - public int MatrixCount; - public int MatrixIndex; - public int EntryIndex1; - public int EntryCount1; - public int UnknownZero1_; - }; - - [StructLayout(LayoutKind.Sequential, Pack = 1)] - public struct EnvironmentAnimationEntry2 - { - public int ID; - public Vector3 P; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 6)] - public int[] V; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] - public byte[] Unknown_; - }; -} \ No newline at end of file diff --git a/CathodeLib/Scripts/MiscFormats/EnvironmentMapDatabase.cs b/CathodeLib/Scripts/MiscFormats/EnvironmentMapDatabase.cs deleted file mode 100644 index 29df03c..0000000 --- a/CathodeLib/Scripts/MiscFormats/EnvironmentMapDatabase.cs +++ /dev/null @@ -1,69 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Runtime.InteropServices; -using System.Text; -using System.Threading.Tasks; - -namespace CATHODE.Misc -{ - /* Handles Cathode ENVIRONMENTMAP.BIN files */ - public class EnvironmentMapDatabase - { - private string filepath; - private EnvironmentMapHeader header; - private EnvironmentMapEntry[] entries; - - /* Load the file */ - public EnvironmentMapDatabase(string path) - { - filepath = path; - - BinaryReader Stream = new BinaryReader(File.OpenRead(filepath)); - header = Utilities.Consume(Stream); - entries = Utilities.ConsumeArray(Stream, (int)header.EntryCount); - Stream.Close(); - } - - /* Save the file */ - public void Save() - { - BinaryWriter stream = new BinaryWriter(File.OpenWrite(filepath)); - stream.BaseStream.SetLength(0); - Utilities.Write(stream, header); - Utilities.Write(stream, entries); - stream.Close(); - } - - /* Data accessors */ - public int EntryCount { get { return entries.Length; } } - public EnvironmentMapEntry[] Entries { get { return entries; } } - public EnvironmentMapEntry GetEntry(int i) - { - return entries[i]; - } - - /* Data setters */ - public void SetEntry(int i, EnvironmentMapEntry content) - { - entries[i] = content; - } - } - - [StructLayout(LayoutKind.Sequential, Pack = 1)] - public struct EnvironmentMapEntry - { - public int EnvironmentMapIndex; //Environment map index within ? - public uint MoverIndex; //Mover index within MVR file - }; - - [StructLayout(LayoutKind.Sequential, Pack = 1)] - public struct EnvironmentMapHeader - { - public fourcc FourCC; - public uint Unknown0_; - public int EntryCount; - public uint Unknown1_; - }; -} \ No newline at end of file diff --git a/CathodeLib/Scripts/MiscFormats/MaterialDatabase.cs b/CathodeLib/Scripts/MiscFormats/MaterialDatabase.cs deleted file mode 100644 index da3a9ba..0000000 --- a/CathodeLib/Scripts/MiscFormats/MaterialDatabase.cs +++ /dev/null @@ -1,98 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Runtime.InteropServices; -using System.Text; -using System.Threading.Tasks; - -namespace CATHODE.Misc -{ - /* Handles Cathode MODELS.MTL files */ - public class MaterialDatabase - { - public MaterialHeader Header; - public MaterialEntry[] Materials; - public List TextureReferenceCounts; - public List MaterialNames; - - public void Load(string FullFilePath) - { - BinaryReader Stream = new BinaryReader(File.OpenRead(FullFilePath)); - - Header = Utilities.Consume(Stream); - - MaterialNames = new List(Header.MaterialCount); - for (int MaterialIndex = 0; MaterialIndex < Header.MaterialCount; ++MaterialIndex) - { - MaterialNames.Add(Utilities.ReadString(Stream)); - } - - Stream.BaseStream.Position = Header.FirstMaterialOffset + Marshal.SizeOf(Header.BytesRemainingAfterThis); - - Materials = Utilities.ConsumeArray(Stream, Header.MaterialCount); - TextureReferenceCounts = new List(Header.MaterialCount); - for (int MaterialIndex = 0; MaterialIndex < Header.MaterialCount; ++MaterialIndex) - { - MaterialEntry Material = Materials[MaterialIndex]; - - int count = 0; - for (int I = 0; I < Material.TextureReferences.Length; ++I) - { - MaterialTextureReference Pair = Material.TextureReferences[I]; - if (Pair.TextureTableIndex == 2 || Pair.TextureTableIndex == 0) count++; - } - TextureReferenceCounts.Add(count); - } - } - } - - [StructLayout(LayoutKind.Sequential, Pack = 1)] - public struct MaterialHeader - { - public int BytesRemainingAfterThis; // TODO: Weird, is there any case where this is not true? Assert! - public int Unknown0_; - public int FirstMaterialOffset; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 5)] - public int[] CSTOffsets; //5 - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] - public int[] UnknownOffsets; //2 - public Int16 MaterialCount; - public Int16 Unknown2_; - }; - - [StructLayout(LayoutKind.Sequential, Pack = 1)] - public struct MaterialTextureReference - { - public Int16 TextureIndex; // NOTE: Entry index in texture BIN file. Max value seen matches the BIN file entry count; - public Int16 TextureTableIndex; // NOTE: Only seen as -1, 0 or 2 so far. - }; - - [StructLayout(LayoutKind.Sequential, Pack = 1)] - public struct MaterialEntry - { - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)] - public MaterialTextureReference[] TextureReferences; //12 - public int UnknownZero0_; // NOTE: Only seen as 0 so far. - public int MaterialIndex; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 5)] - public int[] CSTOffsets; //5 - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 5)] - public byte[] CSTCounts; //5 - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] - public byte[] ZeroPad; //3 - public int UnknownZero1_; - public int UnknownValue0; - public int UberShaderIndex; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 32)] - public int[] UnknownZeros0_; //32 - public int UnknownValue1; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 12)] - public int[] UnknownZeros1_; //12 - public int Unknown4_; - public int Color; // TODO: This is not really color AFAIK. - public int UnknownValue2; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] - public int[] UnknownZeros2_; //2 - }; -} \ No newline at end of file diff --git a/CathodeLib/Scripts/MiscFormats/MissionSave.cs b/CathodeLib/Scripts/MiscFormats/MissionSave.cs deleted file mode 100644 index a51089f..0000000 --- a/CathodeLib/Scripts/MiscFormats/MissionSave.cs +++ /dev/null @@ -1,152 +0,0 @@ -using CATHODE.Commands; -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Runtime.InteropServices; -using System.Text; -using System.Threading.Tasks; - -namespace CATHODE.Misc -{ - /* Handles Cathode PROGRESSION.AIS files */ - public class MissionSave - { - private string filepath; - private alien_mission_ais header; - - // From the iOS decomp: the saves work with a "leaf and node" system, where you have - // "node" names saved with their connected "leafs" which acts like a "system" and - // "parameter" to apply to the system - - /* Load the file */ - public MissionSave(string pathToAIS) - { - filepath = pathToAIS; - - BinaryReader reader = new BinaryReader(File.OpenRead(filepath)); - - header = Utilities.Consume(reader); - string levelname = Utilities.ReadString(reader.ReadBytes(128)); - - reader.BaseStream.Position = header.save_root_offset; - - ValidateGuid(reader, "save_root"); - reader.BaseStream.Position += 8; - - ValidateGuid(reader, "trigger"); - ParseHeaderAndSkip(reader); - - ValidateGuid(reader, "pause_context_trigger"); - ParseHeaderAndSkip(reader); - - ValidateGuid(reader, "forward_triggers"); - ParseHeaderAndSkip(reader); - - ValidateGuid(reader, "m_broadcast_messages"); - ParseHeaderAndSkip(reader); - - ValidateGuid(reader, "player_pos"); - ParseHeaderAndSkip(reader); - - ValidateGuid(reader, "player_pos_valid"); - reader.BaseStream.Position += 2; - - ValidateGuid(reader, "filter_object"); - ParseHeaderAndSkip(reader); - - ValidateGuid(reader, "next_temporary_guid"); - ParseHeaderAndSkip(reader); - - ValidateGuid(reader, "trigger_object"); - ParseHeaderAndSkip(reader); - - ValidateGuid(reader, "temp_entities_data"); - ParseHeaderAndSkip(reader); - - ValidateGuid(reader, "temp_entities"); - ParseHeaderAndSkip(reader); - - //TODO: What do we reach after this point? Can't find the ShortGuid! - - int pos = (int)reader.BaseStream.Position; - - /* - List dump = new List(); - int prevPos = (int)Stream.BaseStream.Position; - while (true) - { - if (Stream.BaseStream.Position + 4 >= Stream.BaseStream.Length) break; - - ShortGuid consumed_guid = Utilities.Consume(Stream); - if (consumed_guid.ToString() == "00-00-00-00") continue; - - string match = ShortGuidUtils.FindString(consumed_guid); - if (match != consumed_guid.ToString()) - { - dump.Add((Stream.BaseStream.Position - 4) + " => [ + " + ((Stream.BaseStream.Position - 4) - prevPos) + "] => " + match); - prevPos = (int)Stream.BaseStream.Position; - } - - Stream.BaseStream.Position -= 3; - } - File.WriteAllLines(Path.GetFileNameWithoutExtension(pathToMVR) + "_dump.txt", dump); - */ - - reader.Close(); - } - - private void ParseHeaderAndSkip(BinaryReader stream) - { - byte type = stream.ReadByte(); - int offset = stream.ReadInt16(); - byte unk = stream.ReadByte(); - if (unk == 0x01) - throw new Exception("Unhandled"); - - switch (type) - { - case 0x40: - case 0x0D: - stream.BaseStream.Position += offset; - break; - case 0x04: - stream.BaseStream.Position += 1; - break; - default: - throw new Exception("Unhandled"); - } - } - - private void ValidateGuid(BinaryReader Stream, string str) - { - ShortGuid consumed_guid = Utilities.Consume(Stream); - if (consumed_guid != ShortGuidUtils.Generate(str)) - throw new Exception(str + " mismatch"); - } - - /* Save the file */ - public void Save() - { - BinaryWriter stream = new BinaryWriter(File.OpenWrite(filepath)); - stream.BaseStream.SetLength(0); - Utilities.Write(stream, header); - stream.Close(); - } - } - - [StructLayout(LayoutKind.Sequential, Pack = 1)] - public struct alien_mission_ais - { - public fourcc FourCC; - public int VersionNum; - - public ShortGuid unk1; - public ShortGuid unk2; - public ShortGuid unk3; - - public int Offset1; - public int save_root_offset; - public int Offset3; - }; -} \ No newline at end of file diff --git a/CathodeLib/Scripts/MiscFormats/MoverDatabase.cs b/CathodeLib/Scripts/MiscFormats/MoverDatabase.cs deleted file mode 100644 index 638e482..0000000 --- a/CathodeLib/Scripts/MiscFormats/MoverDatabase.cs +++ /dev/null @@ -1,284 +0,0 @@ -using System.Collections.Generic; -using System.IO; -using System.Runtime.InteropServices; -using System; -#if UNITY_EDITOR || UNITY_STANDALONE -using UnityEngine; -#else -using System.Numerics; -#endif -using CATHODE.Commands; - -namespace CATHODE.Misc -{ - /* Handles Cathode MODELS.MVR files */ - public class MoverDatabase - { - public string FilePath { get { return filePath; } } - private string filePath = ""; - private int fileSize = 32; - private int entryCount = 0; - private int entrySize = 320; - private int nonCommandsEntries = 0; - - public List Movers = new List(); - - /* Load the file */ - public MoverDatabase() { } - public MoverDatabase(string pathToFile) - { - if (!File.Exists(pathToFile)) return; - - filePath = pathToFile; - - BinaryReader stream = new BinaryReader(File.OpenRead(filePath)); - fileSize = stream.ReadInt32(); - entryCount = stream.ReadInt32(); - nonCommandsEntries = stream.ReadInt32(); //this the number of entries that have a NodeID of 00-00-00-00 - stream.BaseStream.Position += 4; - entrySize = stream.ReadInt32(); - stream.BaseStream.Position += 12; - Movers = new List(Utilities.ConsumeArray(stream, entryCount)); - stream.Close(); - } - - /* Save the file */ - public void Save(string pathToFile = "") - { - if (pathToFile != "") filePath = pathToFile; - - fileSize = (Movers.Count * entrySize) + 32; - entryCount = Movers.Count; - nonCommandsEntries = 0; - for (int i = 0; i < Movers.Count; i++) - { - if (Movers[i].NodeID == new ShortGuid(0)) nonCommandsEntries++; - } - - BinaryWriter stream = new BinaryWriter(File.OpenWrite(filePath)); - stream.BaseStream.SetLength(0); - stream.Write(fileSize); - stream.Write(entryCount); - stream.Write(nonCommandsEntries); - stream.Write(0); - stream.Write(entrySize); - stream.Write(0); stream.Write(0); stream.Write(0); - Utilities.Write(stream, Movers); - stream.Close(); - } - } - - //Pulled from the iOS decomp - public enum RENDERABLE_INSTANCE_Type - { - RenderableLightInstance = 0, - RenderableDynamicFXInstance = 1, - RenderableDynamicTempFXInstance = 2, - RenderableEnvironmentInstance = 3, - RenderableCharacterInstance = 4, - RenderableMiscInstance = 5, - RenderablePlanetInstance = 6, - RenderableEnvironmentExtraInstance = 7, - RenderableFogSphereInstance = 8, - } - - [StructLayout(LayoutKind.Sequential, Pack = 1)] - public struct MOVER_DESCRIPTOR - { - /* - - RenderableScene::calculate_renderable_instance_type is called on RenderableElementSet which seems to define a type (RENDERABLE_INSTANCE::Type?) - It can have values 1-9, which I think are one of (as per RenderableScene::InstanceManager): - - RenderableCharacterInstance - - RenderableDynamicFXInstance - - RenderableDynamicTempFXInstance - - RenderableEnvironmentExtraInstance - - RenderableEnvironmentInstance - - RenderableFogSphereInstance - - RenderableLightInstance - - RenderableMiscInstance - - RenderablePlanetInstance - Logic is applied based on a numeric range, rather than per individual number (although maybe specific logic is applied within these ranges) - The ranges are: - - 1-9 - - 3-9 - - 5-9 - - 7-9 - These ranges are found using RenderableScene::ForEachInstanceType - MVR and REDS data is used per Type, being pulled from MOVER_DESCRIPTOR and RenderableElementSet respectively - - RenderableElementSet is always paired with a MOVER_DESCRIPTOR (see RenderableScene::create_instance) - - RenderableEnvironmentInstance::set_constants is what uses RENDER_CONSTANTS - look there to define that struct - RenderableEnvironmentInstance::set_gpu_constants is what uses GPU_CONSTANTS - look there to define that struct - - RenderableScene::initialize passes MOVER_DESCRIPTOR to create_instance and defines its length as 320 - RenderableScene::create_instance takes MOVER_DESCRIPTOR and grabs two values: - 296: (uint) uVar1 - used as first parameter in call to RenderableScene::add_new_zone, which passes it to g_zone_ids - 300: (uint) uVar3 - used as second parameter in call to RenderableScene::add_new_zone, which does some conditional check to call Zone::activate - - INSTANCE_DATABASE::initialise_emissive_surfaces uses MOVER_DESCRIPTOR: - 284: dunno what this is used for, but it goes +4, +8 - so 3 offsets? - - RENDERABLE_INSTANCE::TYPE values RenderableLightInstance/RenderableDynamicFxInstance/RenderableDynamicTempFXInstance/etc do this... - RenderableScene::InstanceManager<>::reserve_light_light_master_sets takes takes MOVER_DESCRIPTOR and grabs two values: - 304: uint* appears if this is 0 then light or w/e isn't initialised, then some CONCAT44 operation is applied with its value, stacking with previous lights in a while loop - RenderableScene::InstanceManager<>::add_instance_to_light_master_set also grabs this same value (304) and checks to see if its 0, then if its less than or equal to another value. - - For personal reference of offset conversions: - 0x40 = 64 - 0xa0 = 160 - 0x10c = 268 - 0x118 = 280 - 0x130 = 304 - 0x136 = 310 - 0x140 = 320 - - RenderableCharacterInstance: - 0: MATRIX_44 - 64: GPU_CONSTANTS - 160: RENDER_CONSTANTS - 268: uint* (visibility) - 310: ushort* which is used for a couple things... - RenderableCharacterInstance + 0x34 (ushort*) - (ushort)((uVar1 & 4) << 2) - if ((uVar1 & 1) != 0) then RenderableCharacterInstance::activate - - RenderableEnvironmentInstance: - 0: MATRIX_44 - 64: GPU_CONSTANTS - 160: RENDER_CONSTANTS - 268: uint* (visibility) - 280: undefined4* which sets RenderableEnvironmentInstance + 0xa0 as (short)* - 310: ushort* which is used for a couple things... - RenderableEnvironmentInstance + 0x34 (ushort*) - (ushort)((uVar1 & 4) << 2) - if ((uVar1 & 1) != 0) then RenderableEnvironmentInstance::activate - - RenderableDynamicTempFXInstance: - 0: MATRIX_44 - 64: GPU_CONSTANTS - 160: RENDER_CONSTANTS - 268: uint* (visibility) - 310: if ((uVar3 & 1) != 0) then RenderableDynamicFxInstance::activate - - RenderableDynamicFxInstance: - 0: MATRIX_44 - 64: GPU_CONSTANTS - 160: RENDER_CONSTANTS - 268: uint* (visibility) - 310: *something* - - RenderableLightInstance: - 0: MATRIX_44 - 64: GPU_CONSTANTS - 160: RENDER_CONSTANTS - 268: uint* (visibility) - 310: ushort* (logic checks on this value releated to activating RenderableLightInstance and calling LIGHT_MANAGER::add_dynamic_light) - - */ - - public Matrix4x4 Transform; - //64 - public GPU_CONSTANTS gpuConstants; - //144 - public UInt64 fogsphere_val1; // 0xa0 in RenderableFogSphereInstance - public UInt64 fogsphere_val2; // 0xa8 in RenderableFogSphereInstance - //160 - public RENDER_CONSTANTS renderConstants; - //244 - public UInt32 REDSIndex; // Index 45 - public UInt32 ModelCount; - public UInt32 ResourcesBINIndex; // NOTE: This is actually 'IndexFromMVREntry' field on 'alien_resources_bin_entry' - //256 - public Vector3 Unknowns5_; - public UInt32 Visibility; // pulled from iOS dump - should be visibility var? - //272 - public ShortGuid NodeID; // Index 52 - public ShortGuid ResourcesBINID; // NOTE: This is 'IDFromMVREntry' field on 'alien_resources_bin_entry'. - //280 - public UInt32 EnvironmentMapBINIndex; //Converted to short in code - //284 - public float UnknownValue1; //emissive surface val1 - public float UnknownValue; //emissive surface val2 - public float Unknown5_; //emissive surface val3 - //296 - public UInt32 CollisionMapThingID; //zone id? RenderableScene::create_instance, RenderableScene::initialize - public UInt32 Unknowns60_; //zone activator? RenderableScene::create_instance, RenderableScene::initialize - //304 - public UInt32 Unknowns61_; //uVar3 in reserve_light_light_master_sets, val of LightMasterSet, or an incrementer - public UInt16 Unknown17_; // TODO: It is -1 most of the time, but some times it isn't. - //310 - public UInt16 MoverFlags; //ushort - used for bitwise flags depending on mover RENDERABLE_INSTANCE::Type. Environment types seem to use first bit to decide if its position comes from MVR. - //312 - public UInt32 Unknowns70_; - public UInt32 Unknowns71_; - //320 - }; - - [StructLayout(LayoutKind.Sequential, Pack = 1)] - public struct GPU_CONSTANTS //As best I can tell, this is 80 bytes long - { - /* - - As per RenderableEnvironmentInstance::set_gpu_constants, values are at: - (undefined 8) 0 - (undefined 8) 8 - (undefined 8) 16 - (undefined 8) 24 - (undefined 8) 32 - (undefined 8) 40 - (undefined 8) 48 - (undefined 8) 56 - (undefined 8) 64 - (undefined 8) 72 - - */ - - - //64 - public Vector4 LightColour; - public Vector4 MaterialTint; - //96 - public float lightVolumeIntensity; //todo: idk if this is right, but editing this value seems to increase/decrease the brightness of the light volume meshes - public float particleIntensity; //0 = black particle - public float particleSystemOffset; //todo: not sure entirely, but increasing this value seems to apply an offset to particle systems - //108 - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] - public byte[] blankSpace1; - //116 - public float lightRadius; - public Vector2 textureTile; //x = horizontal tile, y = vertical tile - //128 - public float UnknownValue1_; - public float UnknownValue2_; - public float UnknownValue3_; - public float UnknownValue4_; - //144 - } - - [StructLayout(LayoutKind.Sequential, Pack = 1)] - public struct RENDER_CONSTANTS //appears to be 84 long - { - /* - - used in - RenderableEnvironmentInstance::set_constants - RenderableMiscInstance::set_constants - RenderablePlanetInstance::set_constants - etc - - */ - - //160 - public Vector4 Unknown3_; - //176 - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] - public UInt32[] Unknowns2_; - //184 - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] - public Vector3[] UnknownMinMax_; // NOTE: Sometimes I see 'nan's here too. - //208 - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 36)] - public byte[] blankSpace3; - //244 - } -} \ No newline at end of file diff --git a/CathodeLib/Scripts/MiscFormats/PhysicsMap.cs b/CathodeLib/Scripts/MiscFormats/PhysicsMap.cs deleted file mode 100644 index 6730a20..0000000 --- a/CathodeLib/Scripts/MiscFormats/PhysicsMap.cs +++ /dev/null @@ -1,75 +0,0 @@ -using System.Collections.Generic; -using System.IO; -using System.Runtime.InteropServices; -#if UNITY_EDITOR || UNITY_STANDALONE -using UnityEngine; -#else -using System.Numerics; -#endif - -namespace CATHODE.Misc -{ - /* Handles Cathode PHYSICS.MAP files */ - public class PhysicsMap - { - private string filepath; - public PhysicsMapHeader header; - public PhysicsMapEntry[] entries; - - /* Load the file */ - public PhysicsMap(string path) - { - filepath = path; - - BinaryReader stream = new BinaryReader(File.OpenRead(path)); - header = Utilities.Consume(stream); - entries = Utilities.ConsumeArray(stream, header.EntryCount); - stream.Close(); - } - - /* Save the file */ - public void Save() - { - BinaryWriter stream = new BinaryWriter(File.OpenWrite(filepath)); - stream.BaseStream.SetLength(0); - Utilities.Write(stream, header); - Utilities.Write(stream, entries); - stream.Close(); - } - - /* Data accessors */ - public int EntryCount { get { return entries.Length; } } - public PhysicsMapEntry[] Entries { get { return entries; } } - public PhysicsMapEntry GetEntry(int i) - { - return entries[i]; - } - - /* Data setters */ - public void SetEntry(int i, PhysicsMapEntry content) - { - entries[i] = content; - } - } - - [StructLayout(LayoutKind.Sequential, Pack = 1)] - public struct PhysicsMapHeader - { - public int FileSizeExcludingThis; - public int EntryCount; - }; - - [StructLayout(LayoutKind.Sequential, Pack = 1)] - public struct PhysicsMapEntry - { - public int UnknownNotableValue_; - public int UnknownZero; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 4)] - public int[] IDs; //4 - public Vector4 Row0; // NOTE: This is a 3x4 matrix, seems to have rotation data on the leftmost 3x3 matrix, and position - public Vector4 Row1; // on the rightmost 3x1 matrix. - public Vector4 Row2; - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 2)] - public int[] UnknownZeros_; //2 - }; -} \ No newline at end of file diff --git a/CathodeLib/Scripts/MiscFormats/ProgressionSave.cs b/CathodeLib/Scripts/MiscFormats/ProgressionSave.cs deleted file mode 100644 index b9e3443..0000000 --- a/CathodeLib/Scripts/MiscFormats/ProgressionSave.cs +++ /dev/null @@ -1,64 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Runtime.InteropServices; -using System.Text; -using System.Threading.Tasks; - -namespace CATHODE.Misc -{ - /* Handles Cathode PROGRESSION.AIS files */ - public class ProgressionSave - { - private string filepath; - private alien_progression_ais content; - - /* Load the file */ - public ProgressionSave(string pathToMVR) - { - filepath = pathToMVR; - - BinaryReader Stream = new BinaryReader(File.OpenRead(filepath)); - content = Utilities.Consume(Stream); - Stream.Close(); - } - - /* Save the file */ - public void Save() - { - BinaryWriter stream = new BinaryWriter(File.OpenWrite(filepath)); - stream.BaseStream.SetLength(0); - Utilities.Write(stream, content); - stream.Close(); - } - } - - [StructLayout(LayoutKind.Sequential, Pack = 1)] - public struct alien_progression_ais - { - public fourcc FourCC; - public int VersionNum; - - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 36)] public byte[] unk1; - - public byte gamepad_ControlScheme; //44 - - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 3)] public byte[] unk2; - - public float gamepad_ControllerSensitivity; //48 - - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 8)] public byte[] unk3; - - public byte InvertX; //56 - public byte InvertY; //57 - - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 1)] public byte[] unk4; - - public byte gamepad_Vibration; //59 - - [MarshalAs(UnmanagedType.ByValArray, SizeConst = 5)] public byte[] unk5; - - public byte aimAssist; - }; -} \ No newline at end of file diff --git a/CathodeLib/Scripts/MiscFormats/RenderableElementsDatabase.cs b/CathodeLib/Scripts/MiscFormats/RenderableElementsDatabase.cs deleted file mode 100644 index bddb53d..0000000 --- a/CathodeLib/Scripts/MiscFormats/RenderableElementsDatabase.cs +++ /dev/null @@ -1,73 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Runtime.InteropServices; -using System.Text; -using System.Threading.Tasks; - -namespace CATHODE.Misc -{ - /* Handles Cathode REDS.BIN files */ - public class RenderableElementsDatabase - { - private string filepath; - public RenderableElementHeader header; - public RenderableElementEntry[] entries; - - /* Load the file */ - public RenderableElementsDatabase(string path) - { - filepath = path; - - BinaryReader stream = new BinaryReader(File.OpenRead(path)); - header = Utilities.Consume(stream); - entries = Utilities.ConsumeArray(stream, header.EntryCount); - stream.Close(); - } - - /* Save the file */ - public void Save() - { - BinaryWriter stream = new BinaryWriter(File.OpenWrite(filepath)); - stream.BaseStream.SetLength(0); - Utilities.Write(stream, header); - Utilities.Write(stream, entries); - stream.Close(); - } - - /* Data accessors */ - public int EntryCount { get { return entries.Length; } } - public RenderableElementEntry[] Entries { get { return entries; } } - public RenderableElementEntry GetEntry(int i) - { - return entries[i]; - } - - /* Data setters */ - public void SetEntry(int i, RenderableElementEntry content) - { - entries[i] = content; - } - } - - [StructLayout(LayoutKind.Sequential, Pack = 1)] - public struct RenderableElementHeader - { - public int EntryCount; - }; - - [StructLayout(LayoutKind.Sequential, Pack = 1)] - public struct RenderableElementEntry - { - //in the ios dump it appears this data isn't actually in a struct, and just directly read - public int UnknownZeros0_; - public int ModelIndex; - public byte UnknownZeroByte0_; - public int UnknownZeros1_; - public int MaterialLibraryIndex; - public byte UnknownZeroByte1_; - public int ModelLODIndex; // NOTE: Not sure, looks like it. - public byte ModelLODPrimitiveCount; // NOTE: Sure it is primitive count, not sure about the ModelLOD part. - }; -} \ No newline at end of file diff --git a/CathodeLib/Scripts/MiscFormats/ResourcesDatabase.cs b/CathodeLib/Scripts/MiscFormats/ResourcesDatabase.cs deleted file mode 100644 index 054141d..0000000 --- a/CathodeLib/Scripts/MiscFormats/ResourcesDatabase.cs +++ /dev/null @@ -1,82 +0,0 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Linq; -using System.Runtime.InteropServices; -using System.Text; -using System.Threading.Tasks; -using CATHODE.Commands; - -namespace CATHODE.Misc -{ - /* Handles CATHODE RESOURCES.BIN files */ - //This file seems to govern data being drawn from either MVR or COMMANDS - public class ResourcesDatabase - { - private string filepath; - public CathodeResourcesHeader header; - public CathodeResourcesEntry[] entries; - - /* Load the file */ - public ResourcesDatabase(string path) - { - filepath = path; - - BinaryReader Stream = new BinaryReader(File.OpenRead(path)); - header = Utilities.Consume(Stream); - entries = Utilities.ConsumeArray(Stream, header.EntryCount); - Stream.Close(); - } - - /* - public void OrderEntries() - { - List entrieslist = new List(); - entrieslist.AddRange(entries); - entrieslist.OrderBy(o => o.IndexFromMVREntry); - entries = entrieslist.ToArray(); - } - */ - - /* Save the file */ - public void Save() - { - BinaryWriter stream = new BinaryWriter(File.OpenWrite(filepath)); - stream.BaseStream.SetLength(0); - Utilities.Write(stream, header); - Utilities.Write(stream, entries); - stream.Close(); - } - - /* Data accessors */ - public int EntryCount { get { return entries.Length; } } - public CathodeResourcesEntry[] Entries { get { return entries; } } - public CathodeResourcesEntry GetEntry(int i) - { - return entries[i]; - } - - /* Data setters */ - public void SetEntry(int i, CathodeResourcesEntry content) - { - entries[i] = content; - } - } - - [StructLayout(LayoutKind.Sequential, Pack = 1)] - public struct CathodeResourcesHeader - { - public fourcc Magic; - public int UnknownOne_; //maybe file version - public int EntryCount; - public int UnknownZero_; - }; - - [StructLayout(LayoutKind.Sequential, Pack = 1)] - public struct CathodeResourcesEntry - { - public ShortGuid NodeID; - public int IDFromMVREntry; //ResourceID? - public int IndexFromMVREntry; // NOTE: This is an entry index in this file itself. - }; -} \ No newline at end of file diff --git a/CathodeLib/Scripts/Utilities.cs b/CathodeLib/Scripts/Utilities.cs index f4f0d78..609e07f 100644 --- a/CathodeLib/Scripts/Utilities.cs +++ b/CathodeLib/Scripts/Utilities.cs @@ -1,15 +1,11 @@ using System; -using System.Buffers.Binary; using System.Collections.Generic; using System.IO; using System.Linq; using System.Runtime.InteropServices; using System.Runtime.Serialization.Formatters.Binary; -using System.Security.Cryptography; -using System.Text; -using System.Threading.Tasks; -namespace CATHODE +namespace CathodeLib { public class Utilities { @@ -138,6 +134,124 @@ public static uint AnimationHashedString(string str) } } + public static class BigEndianUtils + { + public static Int64 ReadInt64(BinaryReader Reader) + { + var data = Reader.ReadBytes(8); + Array.Reverse(data); + return BitConverter.ToInt64(data, 0); + } + public static UInt64 ReadUInt64(BinaryReader Reader) + { + var data = Reader.ReadBytes(8); + Array.Reverse(data); + return BitConverter.ToUInt64(data, 0); + } + + public static Int32 ReadInt32(BinaryReader Reader) + { + byte[] data = Reader.ReadBytes(4); + Array.Reverse(data); + return BitConverter.ToInt32(data, 0); + } + public static UInt32 ReadUInt32(BinaryReader Reader) + { + var data = Reader.ReadBytes(4); + Array.Reverse(data); + return BitConverter.ToUInt32(data, 0); + } + + public static Int16 ReadInt16(BinaryReader Reader) + { + var data = Reader.ReadBytes(2); + Array.Reverse(data); + return BitConverter.ToInt16(data, 0); + } + public static UInt16 ReadUInt16(BinaryReader Reader) + { + var data = Reader.ReadBytes(2); + Array.Reverse(data); + return BitConverter.ToUInt16(data, 0); + } + + public static byte[] FlipEndian(byte[] ThisEndian) + { + Array.Reverse(ThisEndian); + return ThisEndian; + } + public static byte[] FlipEndian(Int64 ThisEndian) + { + return FlipEndian(BitConverter.GetBytes(ThisEndian)); + } + public static byte[] FlipEndian(UInt64 ThisEndian) + { + return FlipEndian(BitConverter.GetBytes(ThisEndian)); + } + public static byte[] FlipEndian(Int32 ThisEndian) + { + return FlipEndian(BitConverter.GetBytes(ThisEndian)); + } + public static byte[] FlipEndian(UInt32 ThisEndian) + { + return FlipEndian(BitConverter.GetBytes(ThisEndian)); + } + public static byte[] FlipEndian(Int16 ThisEndian) + { + return FlipEndian(BitConverter.GetBytes(ThisEndian)); + } + public static byte[] FlipEndian(UInt16 ThisEndian) + { + return FlipEndian(BitConverter.GetBytes(ThisEndian)); + } + } + public static class ExtraBinaryUtils + { + //Gets a string from a byte array (at position) by reading chars until a null is hit + public static string GetStringFromByteArray(byte[] byte_array, int position) + { + string to_return = ""; + for (int i = 0; i < 999999999; i++) + { + byte this_byte = byte_array[position + i]; + if (this_byte == 0x00) + { + break; + } + to_return += (char)this_byte; + } + return to_return; + } + + //Removes the leading nulls from a byte array, useful for cleaning byte-aligned file extracts + public static byte[] RemoveLeadingNulls(byte[] extracted_file) + { + //Remove from leading + int start_offset = 0; + for (int i = 0; i < 4; i++) + { + if (extracted_file[i] == 0x00) + { + start_offset = i + 1; + continue; + } + break; + } + byte[] to_return = new byte[extracted_file.Length - start_offset]; + Array.Copy(extracted_file, start_offset, to_return, 0, to_return.Length); + return to_return; + } + + //Writes a string without a leading length value (C# BinaryWriter default) + public static void WriteString(string string_to_write, BinaryWriter writer) + { + foreach (char character in string_to_write) + { + writer.Write(character); + } + } + } + #if !(UNITY_EDITOR || UNITY_STANDALONE) [Serializable] [StructLayout(LayoutKind.Sequential, Pack = 1)] @@ -179,6 +293,11 @@ public object Clone() return new Vector3(this.x, this.y, this.z); } + public override string ToString() + { + return "(" + x + ", " + y + ", " + z + ")"; + } + public float x { get { return (vals == null) ? 0.0f : vals[0]; } set diff --git a/README.md b/README.md index b87a04d..158b80c 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,44 @@ -# CathodeLib + -An open source library providing functionality to parse and write various formats from the Cathode engine, used for modding Alien: Isolation. +# CathodeLib - Alien: Isolation C# Library -## Supported files & formats +### CathodeLib is an open source library providing functionality to parse and write various formats from the Cathode game engine, for modding Alien: Isolation. Used to power [OpenCAGE](https://github.com/MattFiler/OpenCAGE)! -* COMMANDS.PAK - * The Commands file forms the scripted logic for a game's level. This logic was created through a node-based scripting system similar to Blueprint in UE, and can be parsed using CathodeLib's `CATHODE.Commands.CommandsPAK` class. A `CommandsPAK` is made up of `CathodeComposite` objects (composites essentially being scripting functions), each containing various types of `CathodeEntity` objects (entities being nodes to script logic within the functions). Each `CathodeEntity` contains various information, with all containing `CathodeParameter` objects, which specify additional parameters on the scripting node (e.g. `position`, etc). +Available as a [NuGet package](https://www.nuget.org/packages/CathodeLib/), or alternatively just include this repo as a submodule in your project! -* MODELS.MVR - * The Mover file is a legacy format carried over from Viking: Battle for Asgard (a game which used an early version of Cathode), however it is still heavily utilised in Cathode alongside the Commands system. The Mover file sets up all Movers in a level, where a "Mover" is an instanced entity, containing a model and material/position data. Movers are given a type enum value which specifies how much data is used from the MVR file, and how much comes from the Commands.PAK file. Each Mover is defined in a `MoverEntry` object, however considerable work is still required to understand the Mover description completely. +--- +## For scripting: +- `CATHODE.Commands` handles `COMMANDS.PAK` files (for scripting) + - The file consists of `Composite` scripts which hold various `Entity` types for logic + - `FunctionEntity` = functions which execute functionality, with parameters and links to child `Entity` objects + - `VariableEntity` = variables which can be used externally as parameters on an instanced `Composite` via a `FunctionEntity` + - `ProxyEntity` = a proxy of a `FunctionEntity` within another `Composite`, useful for acting on events in another composite + - `OverrideEntity` = an override of a parameter value on an entity within an instanced `Composite` in this `Composite` + +## For assets: +- `CATHODE.Assets.PAK2` handles `UI.PAK` and `ANIMATIONS.PAK` files +- `CATHODE.Assets.Models` handles `LEVEL_MODELS.PAK` files, paired with a `MODELS_LEVEL.BIN` +- `CATHODE.Assets.Textures` handles `LEVEL_TEXTURES.ALL.PAK` files, paired with a `LEVEL_TEXTURE_HEADERS.ALL.BIN` +- `CATHODE.Assets.MaterialMapping` handles `MATERIAL_MAPPINGS.PAK` files +- `CATHODE.Assets.Shaders` handles various `SHADERS` `PAK` files +## For level data and mappings: +- `CATHODE.MoverDatabase` handles `MODELS.MVR` files +- `CATHODE.RenderableElementsDatabase` handles `REDS.BIN` files +- `CATHODE.ResourcesDatabase` handles `RESOURCES.BIN` files +- `CATHODE.MaterialDatabase` handles `MODELS.MTL` files +- `CATHODE.EnvironmentMapDatabase` handles `ENVIRONMENTMAP.BIN` files +- `CATHODE.EnvironmentAnimationDatabase` handles `ENVIRONMENT_ANIMATION.DAT` files +- `CATHODE.PhysicsMapDatabase` handles `PHYSICS.MAP` files +- `CATHODE.CollisionMapDatabase` handles `COLLISION.MAP` files +- `CATHODE.AnimationStringDatabase` handles `ANIM_STRING_DB.BIN` and `ANIM_STRING_DB_DEBUG.BIN` files +- `CATHODE.NavigationMesh` handles `NAV_MESH` files -**still writing this...** +## For configurations: +- `CATHODE.BML` handles any `.BML` files + - Get/set content as an `XmlDocument` via `BML.Content` + +## For saves: +- `CATHODE.ProgressionSave` handles `PROGRESSION.AIS` files +- `CATHODE.MissionSave` handles `PROGRESSION.AIS` files