Ejemplo n.º 1
0
        public void ConvertScriptExpressionData(ModPackage modPack, HsSyntaxNode expr)
        {
            if (expr.Flags == HsSyntaxNodeFlags.Expression)
            {
                switch (expr.ValueType.HaloOnline)
                {
                case HsType.HaloOnlineValue.Sound:
                case HsType.HaloOnlineValue.Effect:
                case HsType.HaloOnlineValue.Damage:
                case HsType.HaloOnlineValue.LoopingSound:
                case HsType.HaloOnlineValue.AnimationGraph:
                case HsType.HaloOnlineValue.DamageEffect:
                case HsType.HaloOnlineValue.ObjectDefinition:
                case HsType.HaloOnlineValue.Bitmap:
                case HsType.HaloOnlineValue.Shader:
                case HsType.HaloOnlineValue.RenderModel:
                case HsType.HaloOnlineValue.StructureDefinition:
                case HsType.HaloOnlineValue.LightmapDefinition:
                case HsType.HaloOnlineValue.CinematicDefinition:
                case HsType.HaloOnlineValue.CinematicSceneDefinition:
                case HsType.HaloOnlineValue.BinkDefinition:
                case HsType.HaloOnlineValue.AnyTag:
                case HsType.HaloOnlineValue.AnyTagNotResolving:
                    ConvertScriptTagReferenceExpressionData(modPack, expr);
                    return;

                default:
                    break;
                }
            }
        }
Ejemplo n.º 2
0
        private StringId ConvertStringId(ModPackage modPack, StringId stringId)
        {
            if (StringIdMapping.ContainsKey(stringId))
            {
                return(StringIdMapping[stringId]);
            }
            else
            {
                StringId cacheStringId;
                var      modString       = modPack.StringTable.GetString(stringId);
                var      cacheStringTest = CacheContext.StringTable.GetString(stringId);

                if (cacheStringTest != null && modString == cacheStringTest)            // check if base cache contains the exact same id with matching strings
                {
                    cacheStringId = stringId;
                }
                else if (CacheContext.StringTable.Contains(modString))                // try to find the string among all stringids
                {
                    cacheStringId = CacheContext.StringTable.GetStringId(modString);
                }
                else                                                                    // add new stringid
                {
                    cacheStringId = CacheContext.StringTable.AddString(modString);
                }

                StringIdMapping[stringId] = cacheStringId;
                return(cacheStringId);
            }
        }
Ejemplo n.º 3
0
        private static void Complete(ModPackage package)
        {
            InitializeSerialization(package);

            CoreManager.FinishedSerialization();
            Debug.Log("Serialized " + package.name);
        }
        public TileDef ToTileUnifiedDef(ModPackage modPackage)
        {
            var sprite = Resources.Load <Sprite>(SpriteKey);

            return(new TileDef(Name, modPackage, OccupiedPositions, sprite, CanBuildOn, HasCollision,
                               HasTransparencyOnPlayerBehind, TileEntityDefaults));
        }
Ejemplo n.º 5
0
        private ModPackage AssignRoomProperties(ModPackage mod)
        {
            mod.RoomsFolderPath = Path.Combine(mod.ContentPath, FileConstants.RoomsFolderName);
            if (!Directory.Exists(mod.RoomsFolderPath))
            {
                mod.IsProvidingRooms = false;
                mod.RoomPaths        = new string[0];
                return(mod);
            }

            var files = Directory.GetFiles(mod.RoomsFolderPath, "*.json");

            if (files.Length == 0)
            {
                mod.IsProvidingRooms = false;
                mod.RoomPaths        = new string[0];
                return(mod);
            }


            mod.IsProvidingRooms = true;
            mod.RoomPaths        = files;
            mod.RoomNames        = files.Select(Path.GetFileNameWithoutExtension).ToArray();
            return(mod);
        }
Ejemplo n.º 6
0
        private object ConvertData(ModPackage modPack, object data)
        {
            var type = data.GetType();

            switch (data)
            {
            case StringId _:
                return(ConvertStringId(modPack, (StringId)data));

            case null:
            case string _:
            case ValueType _:
                return(data);

            case PageableResource resource:
                return(ConvertPageableResource(modPack, resource));

            case TagStructure structure:
                return(ConvertStructure(modPack, structure));

            case IList collection:
                return(ConvertCollection(modPack, collection));

            case CachedTag tag:
                return(ConvertCachedTagInstance(modPack, tag));
            }

            return(data);
        }
Ejemplo n.º 7
0
 // Not yet implemented
 private ModPackage AssignRoomPatchPropertues(ModPackage mod)
 {
     mod.IsProvidingRoomPatches = false;
     mod.RoomPatchesFolderPath  = string.Empty;
     mod.RoomPatchPaths         = new string[0];
     mod.RoomPatchNames         = new string[0];
     return(mod);
 }
Ejemplo n.º 8
0
        private Scenario ConvertScenario(ModPackage modPack, Scenario scnr)
        {
            foreach (var expr in scnr.ScriptExpressions)
            {
                ConvertScriptExpression(modPack, expr);
            }

            return(scnr);
        }
Ejemplo n.º 9
0
        private static ModPackage getDefenseStats(int rarityLevel, double baseMultiplier)
        {
            ModPackage package = new ModPackage();

            double multiplier = baseMultiplier;

            if (rarityLevel == 3)
            {
                multiplier += 0.2;
            }
            else if (rarityLevel == 4)
            {
                multiplier += 0.45;
            }
            else if (rarityLevel == 5)
            {
                multiplier += 1.0;
            }
            else if (rarityLevel == 6)
            {
                multiplier += 4.0;
            }

            for (int i = 0; i < rarityLevel; i++)
            {
                //1  -  30  -  Health
                //31 -  60  -  P Reduction
                //61 -  75  -  S Reduction
                //76 -  90  -  S Avoidance
                //91 -  100 -  Health Regen

                int result = Engine.RNG.Next(1, 101);

                if (result <= 30)
                {
                    package.BonusHealth += (int)(Engine.RNG.NextDouble(10, 25) * multiplier).Truncate(2);
                }
                else if (result <= 60)
                {
                    package.PhysicalReduction += (Engine.RNG.NextDouble(0.25, 1.5) * multiplier).Truncate(2);
                }
                else if (result <= 75)
                {
                    package.SpellReduction += (Engine.RNG.NextDouble(0.2, 1.0) * multiplier).Truncate(2);
                }
                else if (result <= 90)
                {
                    package.SpellAvoidance += (Engine.RNG.NextDouble(0.1, 0.5) * multiplier).Truncate(2);
                }
                else if (result <= 100)
                {
                    package.BonusHealth += (int)(Engine.RNG.NextDouble(10, 25) * multiplier).Truncate(2); //TODO: Add Health regen
                }
            }
            return(package);
        }
Ejemplo n.º 10
0
        private static ModPackage getPhysicalPowerStats(int rarityLevel, double baseMultiplier)
        {
            ModPackage package = new ModPackage();

            double multiplier = baseMultiplier;

            if (rarityLevel == 3)
            {
                multiplier += 0.2;
            }
            else if (rarityLevel == 4)
            {
                multiplier += 0.45;
            }
            else if (rarityLevel == 5)
            {
                multiplier += 1.0;
            }
            else if (rarityLevel == 6)
            {
                multiplier += 4.0;
            }

            for (int i = 0; i < rarityLevel; i++)
            {
                //1  - 50  -  Attack Power
                //51 - 70  -  Crit Power
                //71 - 90  -  Hit Chance
                //91 - 95  -  Crit Chance
                //96 - 100 -  Haste

                int result = Engine.RNG.Next(1, 101);

                if (result <= 50)
                {
                    package.AttackPower += (Engine.RNG.NextDouble(1, 10) * multiplier).Truncate(2);
                }
                else if (result <= 70)
                {
                    package.PhysicalCritPower += (Engine.RNG.NextDouble(0.1, 0.3) * multiplier).Truncate(2);
                }
                else if (result <= 90)
                {
                    package.PhysicalHitChance += (Engine.RNG.NextDouble(2, 6) * multiplier).Truncate(2);
                }
                else if (result <= 95)
                {
                    package.PhysicalCritChance += (Engine.RNG.NextDouble(1, 3) * multiplier).Truncate(2);
                }
                else if (result <= 100)
                {
                    package.PhysicalHaste += (Engine.RNG.NextDouble(1, 4) * multiplier).Truncate(2);
                }
            }
            return(package);
        }
Ejemplo n.º 11
0
        private static ModPackage getPhysicalSpeedStats(int rarityLevel, double baseMultiplier)
        {
            ModPackage package = new ModPackage();

            double multiplier = baseMultiplier;

            if (rarityLevel == 3)
            {
                multiplier += 0.2;
            }
            else if (rarityLevel == 4)
            {
                multiplier += 0.45;
            }
            else if (rarityLevel == 5)
            {
                multiplier += 1.0;
            }
            else if (rarityLevel == 6)
            {
                multiplier += 4.0;
            }

            for (int i = 0; i < rarityLevel; i++)
            {
                //1  -  30  -  Crit Chance
                //31 -  60  -  Hit Chance
                //61 -  75  -  Haste
                //76 -  90  -  Attack Power
                //91 -  100 -  Crit Power

                int result = Engine.RNG.Next(1, 101);

                if (result <= 30)
                {
                    package.PhysicalCritChance += (Engine.RNG.NextDouble(1.0, 3.0) * multiplier).Truncate(2);
                }
                else if (result <= 60)
                {
                    package.PhysicalHitChance += (Engine.RNG.NextDouble(2.0, 6.0) * multiplier).Truncate(2);
                }
                else if (result <= 75)
                {
                    package.PhysicalHaste += (Engine.RNG.NextDouble(1.0, 4.0) * multiplier).Truncate(2);
                }
                else if (result <= 90)
                {
                    package.AttackPower += (Engine.RNG.NextDouble(1, 10) * multiplier).Truncate(2);
                }
                else if (result <= 100)
                {
                    package.PhysicalCritPower += (Engine.RNG.NextDouble(0.1, 0.3) * multiplier).Truncate(2);
                }
            }
            return(package);
        }
Ejemplo n.º 12
0
        public FormModPackage()
        {
            InitializeComponent();

            myPackage = new ModPackage();

            Text = "New Mod Package";

            buttonApply.Visible = false;
        }
Ejemplo n.º 13
0
        private ModPackage BuildDefaults(string folderPath)
        {
            var mod = new ModPackage();

            mod.Name                = Name;
            mod.Version             = Version;
            mod.Author              = Author;
            mod.ContributingAuthors = ContributingAuthors;
            mod.ContentPath         = folderPath;
            return(mod);
        }
Ejemplo n.º 14
0
        public static void SerializePackage(ModPackage package, string pathToFolder)
        {
            if (package == null)
            {
                throw new System.NullReferenceException();
            }

            _currentPath = pathToFolder;

            SerializePackages(package);
        }
Ejemplo n.º 15
0
        public override string GetDescription()
        {
            string desc = Name + "\n";

            desc += WeaponSubType + " - " + WeaponType + " - " + ItemRarity.ToString() + "\n";
            desc += "Gold: " + Value + " - " + EquipSlot.ToString() + "\n";
            desc += Description + "\n\n";
            desc += ModPackage.GetStatInfo();

            return(desc);
        }
Ejemplo n.º 16
0
 public TileDef(string name, ModPackage modPackage, Vector2Int[] occupiedPositions, Sprite sprite,
                bool canBuildOn, bool hasCollision, bool hasTransparencyOnPlayerBehind, TileEntity entityType)
 {
     Name                          = name;
     ModPackage                    = modPackage;
     OccupiedPositions             = occupiedPositions;
     Sprite                        = sprite;
     CanBuildOn                    = canBuildOn;
     HasCollision                  = hasCollision;
     HasTransparencyOnPlayerBehind = hasTransparencyOnPlayerBehind;
     TileEntityDefault             = entityType;
 }
Ejemplo n.º 17
0
        private ModPackage AssignTileDefProperties(ModPackage mod)
        {
            mod.TileDefsPath = Path.Combine(mod.ContentPath, FileConstants.TileDefsFolder);
            //mod.TileObjectDefsPath = Path.Combine(mod.ContentPath, FileConstants.TileObjectDefsFolder);
            //mod.TileObjectEntityDefsPath = Path.Combine(mod.ContentPath, FileConstants.TileObjectEntitiesDefsFolder);
            mod.IsProvidingTileDefs = DirectoryExistsAndHasFiles(mod.TileDefsPath, "*.json");
            //mod.IsProvidingTileObjectDefs = DirectoryExistsAndHasFiles(mod.TileObjectDefsPath, "*.json");
            //mod.IsProvidingTileObjectEntityDefs = DirectoryExistsAndHasFiles(mod.TileObjectEntityDefsPath, "*.json");
            mod.IsProvidingDefs = mod.IsProvidingTileDefs || mod.IsProvidingDefs;

            return(mod);
        }
Ejemplo n.º 18
0
        public void ConvertScriptTagReferenceExpressionData(ModPackage modPack, HsSyntaxNode expr)
        {
            var tagIndex = BitConverter.ToInt32(expr.Data.ToArray(), 0);

            if (tagIndex == -1)
            {
                return;
            }

            var tag = ConvertCachedTagInstance(modPack, modPack.TagCaches[0].Tags[tagIndex]);

            expr.Data = BitConverter.GetBytes(tag.Index).ToArray();
        }
Ejemplo n.º 19
0
        public FormModPackage(string fileName)
        {
            InitializeComponent();

            myPackage = new ModPackage();

            myPackage.Load(fileName, null);

            FillList();

            Text             = "Mod Package - " + fileName;
            textBoxDesc.Text = myPackage.Description;

            buttonApply.Visible = true;
        }
        public static void Load()
        {
            Deserializer.Initialize();

            string[] guids = AssetDatabase.FindAssets("t:ModPackage");

            foreach (string id in guids)
            {
                string     path    = AssetDatabase.GUIDToAssetPath(id);
                ModPackage package = AssetDatabase.LoadAssetAtPath <ModPackage>(path);

                foreach (ModPackage.ObjectEntry entry in package.ObjectEntries)
                {
                    Deserializer.AddObject(entry.Key, entry.Object);
                }
            }
        }
Ejemplo n.º 21
0
        private PageableResource ConvertPageableResource(ModPackage modPack, PageableResource resource)
        {
            if (resource.Page.Index == -1)
            {
                return(resource);
            }

            var resourceStream = new MemoryStream();

            modPack.Resources.Decompress(modPack.ResourcesStream, resource.Page.Index, resource.Page.CompressedBlockSize, resourceStream);
            resourceStream.Position = 0;
            resource.ChangeLocation(ResourceLocation.ResourcesB);
            resource.Page.OldFlags &= ~OldRawPageFlags.InMods;
            CacheContext.ResourceCaches.AddResource(resource, resourceStream);

            return(resource);
        }
Ejemplo n.º 22
0
        private IList ConvertCollection(ModPackage modPack, IList collection)
        {
            // return early where possible
            if (collection is null || collection.Count == 0)
            {
                return(collection);
            }

            for (var i = 0; i < collection.Count; i++)
            {
                var oldValue = collection[i];
                var newValue = ConvertData(modPack, oldValue);
                collection[i] = newValue;
            }

            return(collection);
        }
Ejemplo n.º 23
0
        private void buttonMerge_Click(object sender, EventArgs e)
        {
            if (openFileDialogFMP.ShowDialog() == DialogResult.OK)
            {
                ModPackage package = new ModPackage();

                package.Load(openFileDialogFMP.FileName, null);

                myPackage.Merge(package);

                FillList();

                package.Dispose();

                textBoxDesc.Text = myPackage.Description;
            }
        }
Ejemplo n.º 24
0
        private T ConvertStructure <T>(ModPackage modPack, T data) where T : TagStructure
        {
            foreach (var tagFieldInfo in TagStructure.GetTagFieldEnumerable(data.GetType(), CacheContext.Version))
            {
                var oldValue = tagFieldInfo.GetValue(data);

                if (oldValue is null)
                {
                    continue;
                }

                var newValue = ConvertData(modPack, oldValue);
                tagFieldInfo.SetValue(data, newValue);
            }

            return(data);
        }
Ejemplo n.º 25
0
        private static List <ModFile> GetModFilesInProject()
        {
            List <ModFile> toReturn = new List <ModFile>();

            foreach (string guid in AssetDatabase.FindAssets("t:ModPackage"))
            {
                string path = AssetDatabase.GUIDToAssetPath(guid);

                ModPackage package = AssetDatabase.LoadAssetAtPath <ModPackage>(path);

                //We have to simulate loading the files like we do in the built version
                ModFile file       = package.CreateFile();
                byte[]  serialized = Serializer.Serialize(file);

                toReturn.Add(ModFile.LoadFromBinary(serialized));
            }

            return(toReturn);
        }
Ejemplo n.º 26
0
        private ModPackage AssignDLLProperties(ModPackage mod)
        {
            if (!(DLLs != null && DLLs.Length != 0))
            {
                mod.IsProvidingDLLs = false;
                mod.DLLPaths        = new string[0];
                return(mod);
            }

            var validDLLPaths = new List <string>();

            foreach (var dllName in DLLs)
            {
                var path = Path.Combine(mod.ContentPath, dllName);
                if (File.Exists(path))
                {
                    validDLLPaths.Add(path);
                }
                else
                {
                    Debug.LogError("Mod " + Name + " is attempting to register DLL " + dllName +
                                   " but no such dll exists in its directory.");
                }
            }

            if (validDLLPaths.Count == 0)
            {
                mod.IsProvidingDLLs = false;
                mod.DLLPaths        = new string[0];
                return(mod);
            }

            mod.IsProvidingDLLs = true;
            mod.DLLPaths        = validDLLPaths.ToArray();
            return(mod);
        }
Ejemplo n.º 27
0
 // Not yet implemented.
 // TODO: Calculate folder checksums and compare to expected checksum
 private ModPackage AssignPackageValidity(ModPackage mod)
 {
     mod.IsPackageIntegrityValid = true;
     return(mod);
 }
Ejemplo n.º 28
0
        private void UpdateMod(ModPackage modPackage)
        {
            SetCurrentItem(modPackage.Name);
            // Set Up Our URL's for Downloading
            string modDownloadUrl = ModDownloadRootUrl + modPackage.Latest;

            UpdateStatus("Checking " + modPackage.Name);
            FileInfo modLatestFileInfo = new FileInfo(Path.Combine(ModDirectory.FullName, modPackage.Latest));

            // Iterate through all current mod files
            if (CurrentMods.Contains(modLatestFileInfo) == false)
            {
                // Mods folder is missing the mod, download it!
                UpdateStatus("Downloading " + modPackage.Latest + " ...");
                DownloadFile(modDownloadUrl, Path.Combine(ModDirectory.FullName, modPackage.Latest));
            }
            else
            {
                // Mods Folder already has the mod
                // Check for Forced Update and Process accordingly
                if (modPackage.Forced == true)
                {
                    UpdateStatus("Downloading " + modPackage.Latest + " ...");
                    File.Delete(Path.Combine(ModDirectory.FullName, modPackage.Latest));
                    DownloadFile(modDownloadUrl, Path.Combine(ModDirectory.FullName, modPackage.Latest));
                }
            }

            // Iterate through Current Mods and Delete historical versions
            UpdateStatus("Removing Old Versions of " + modPackage.Name);
            foreach (FileInfo file in CurrentMods)
            {
                // Search for and Delete matches of historical files
                foreach (string oldfile in modPackage.History)
                {
                    FileInfo modOldFileInfo = new FileInfo(Path.Combine(ModDirectory.FullName, oldfile));
                    if (file.Name == oldfile)
                    {
                        File.Delete(Path.Combine(ModDirectory.FullName, oldfile));
                    }
                }
            }

            // CONFIG(S)
            // Config Files are always updated
            if (modPackage.Config.Type != ConfigPackage.ConfigType.Null)
            {
                UpdateStatus("Updating " + modPackage.Name + " Config File(s)");
                switch (modPackage.Config.Type)
                {
                case ConfigPackage.ConfigType.File:
                {
                    foreach (string configFile in modPackage.Config.PathName)
                    {
                        foreach (FileInfo currentConfig in CurrentConfigFiles)
                        {
                            // Search for Match and Delete if Found
                            if (currentConfig.Name == configFile)
                            {
                                File.Delete(Path.Combine(ConfigDirectory.FullName, currentConfig.Name));
                            }
                        }

                        // Download A Copy of the Config
                        string configDownloadUrl = ConfigDownloadRootUrl + configFile;
                        UpdateStatus("Downloading Config File: " + configFile);
                        DownloadFile("ftp://mc.mlcgaming.com" + configDownloadUrl, Path.Combine(ConfigDirectory.FullName, configFile));
                    }
                    break;
                }

                case ConfigPackage.ConfigType.Directory:
                {
                    foreach (string configDirectory in modPackage.Config.PathName)
                    {
                        foreach (DirectoryInfo currentConfig in CurrentConfigDirectories)
                        {
                            // Search for Match and Delete if Found
                            if (currentConfig.FullName.Contains(configDirectory) == true)
                            {
                                Directory.Delete(currentConfig.FullName, true);
                            }
                        }

                        // Download A Copy of the Config
                        string configDownloadUrl = ConfigDownloadRootUrl + configDirectory + "/*";
                        UpdateStatus("Downloading Config File: " + configDirectory);
                        DownloadDirectory("mc.mlcgaming.com", configDownloadUrl, Path.Combine(ConfigDirectory.FullName, configDirectory));
                    }
                    break;
                }
                }
            }
        }
Ejemplo n.º 29
0
        public override object Execute(List <string> args)
        {
            if (args.Count != 1)
            {
                return(false);
            }

            var filePath = args[0];

            if (!File.Exists(filePath))
            {
                Console.WriteLine($"File {filePath} does not exist!");
                return(false);
            }

            TagMapping      = new Dictionary <int, int>();
            StringIdMapping = new Dictionary <StringId, StringId>();

            // build dictionary of names to tag instance for faster lookups
            CacheTagsByName = CacheContext.TagCache.TagTable
                              .Where(tag => tag != null)
                              .GroupBy(tag => $"{tag.Name}.{tag.Group}")
                              .Select(tags => tags.Last())
                              .ToDictionary(tag => $"{tag.Name}.{tag.Group}", tag => tag);

            CacheStream = CacheContext.OpenCacheReadWrite();

            var modPackage = new ModPackage(new FileInfo(filePath));

            var cacheIndex = 0; // Only apply cache at index 0 for now

            if (modPackage.Header.Version != ModPackageVersion.MultiCache)
            {
                Console.WriteLine($"Wrong mod package version {modPackage.Header.Version.ToString()}");
                return(true);
            }

            for (int i = 0; i < modPackage.TagCaches[cacheIndex].Count; i++)
            {
                var modTag = modPackage.TagCaches[cacheIndex].GetTag(i);

                if (modTag != null)
                {
                    if (!TagMapping.ContainsKey(modTag.Index))
                    {
                        ConvertCachedTagInstance(modPackage, modTag);
                    }
                }
            }

            // fixup map files

            foreach (var mapFile in modPackage.MapFileStreams)
            {
                using (var reader = new EndianReader(mapFile))
                {
                    MapFile map = new MapFile();
                    map.Read(reader);

                    var modIndex = map.Header.ScenarioTagIndex;
                    TagMapping.TryGetValue(modIndex, out int newScnrIndex);
                    map.Header.ScenarioTagIndex = newScnrIndex;
                    var mapName = map.Header.Name;

                    var mapPath    = $"{CacheContext.Directory.FullName}\\{mapName}.map";
                    var file       = new FileInfo(mapPath);
                    var fileStream = file.OpenWrite();
                    using (var writer = new EndianWriter(fileStream, map.EndianFormat))
                    {
                        map.Write(writer);
                    }
                }
            }

            // apply .campaign file
            if (modPackage.CampaignFileStream != null && modPackage.CampaignFileStream.Length > 0)
            {
                var campaignFilepath = $"{CacheContext.Directory.FullName}\\halo3.campaign";
                var campaignFile     = new FileInfo(campaignFilepath);
                using (var campaignFileStream = campaignFile.OpenWrite())
                {
                    modPackage.CampaignFileStream.CopyTo(campaignFileStream);
                }
            }

            // apply fonts
            if (modPackage.FontPackage != null && modPackage.FontPackage.Length > 0)
            {
                var fontFilePath = $"{CacheContext.Directory.FullName}\\fonts\\font_package.bin";
                var fontFile     = new FileInfo(fontFilePath);
                using (var fontFileStream = fontFile.OpenWrite())
                {
                    modPackage.FontPackage.CopyTo(fontFileStream);
                }
            }



            CacheStream.Close();
            CacheStream.Dispose();
            CacheContext.SaveTagNames();
            CacheContext.SaveStrings();

            return(true);
        }
Ejemplo n.º 30
0
 public void ConvertScriptExpression(ModPackage modPack, HsSyntaxNode expr)
 {
     ConvertScriptExpressionData(modPack, expr);
 }