/// <summary>
        /// Builds the editable parameter map for use in moddesc.ini editor
        /// </summary>
        /// <param name="properties"></param>
        //private void buildParameterMap(Dictionary<string, string> properties)
        //{
        //    var parms = properties.Select(x => new AlternateOption.Parameter() { Key = x.Key, Value = x.Value }).ToList();
        //    foreach (var v in AllParameters)
        //    {
        //        if (parms.All(x => x.Key != v))
        //        {
        //            parms.Add(new MDParameter(v, ""));
        //        }
        //    }

        //    ParameterMap.ReplaceAll(parms.OrderBy(x => x.Key));
        //}

        /// <summary>
        /// List of all keys in the altdlc struct that are publicly parsable
        /// </summary>
        public override void BuildParameterMap(Mod mod)
        {
            var parameterDictionary = new Dictionary <string, object>()
            {
                { @"Condition", Condition },
                { @"ConditionalDLC", ConditionalDLC },
                { @"ModOperation", Operation },
                { @"ModAltDLC", AlternateDLCFolder },
                { @"ModDestDLC", DestinationDLCFolder },
                { @"FriendlyName", FriendlyName },
                { @"Description", Description },
                { @"CheckedByDefault", CheckedByDefault ? @"True" : null }, //don't put checkedbydefault in if it is not set to true.
                { @"OptionGroup", GroupName },
                { @"ApplicableAutoText", ApplicableAutoTextRaw },
                { @"NotApplicableAutoText", NotApplicableAutoTextRaw },
                { @"MultiListId", MultiListId > 0 ? MultiListId.ToString() : null },
                { @"MultiListRootPath", MultiListRootPath },
                { @"RequiredFileRelativePaths", RequiredSpecificFiles.Keys.ToList() }, // List of relative paths
                { @"RequiredFileSizes", RequiredSpecificFiles.Values.ToList() },       // List of relative sizes
                { @"DLCRequirements", DLCRequirementsForManual },
                { @"ImageAssetName", ImageAssetName },
                { @"ImageHeight", ImageHeight > 0 ? ImageHeight.ToString() : null }
            };

            ParameterMap.ReplaceAll(MDParameter.MapIntoParameterMap(parameterDictionary));
        }
        public void BuildParameterMap(Mod _)
        {
            ParameterMap.ClearEx();

            var parameterDictionary = new Dictionary <string, object>()
            {
                // ModManager
                { @"cmmver", ModDescTargetVersion },
                { @"minbuild", MinimumSupportedBuild > 102 ? MinimumSupportedBuild.ToString() : null },
            };

            ParameterMap.AddRange(MDParameter.MapIntoParameterMap(parameterDictionary, @"ModManager"));

            // ModInfo
            parameterDictionary = new Dictionary <string, object>()
            {
                { @"game", Game },
                { @"modname", ModName },
                { @"moddesc", ModDescription },
                { @"modver", ParsedModVersion },
                { @"moddev", ModDeveloper },
                { @"modsite", ModWebsite == Mod.DefaultWebsite ? "" : ModWebsite },
                { @"updatecode", ModClassicUpdateCode > 0 ? ModClassicUpdateCode.ToString() : null },
                { @"nexuscode", NexusModID > 0 ? NexusModID.ToString() : null },
                { @"requireddlc", RequiredDLC },
                { @"bannerimagename", BannerImageName },
            };


            // NON PUBLIC OPTIONS
            if (RequiresAMD)
            {
                parameterDictionary[@"amdprocessoronly"] = RequiresAMD;
            }

            if (!string.IsNullOrWhiteSpace(PostInstallToolLaunch))
            {
                // This is a non-public property but is used by one mod
                parameterDictionary[@"postinstalltool"] = PostInstallToolLaunch;
            }
            // END NON PUBLIC OPTIONS

            if (Game > MEGame.ME1)
            {
                // This flag only makes a difference for ME2/3
                parameterDictionary[@"prefercompressed"] = PreferCompressed ? @"True" : null;
            }

            ParameterMap.AddRange(MDParameter.MapIntoParameterMap(parameterDictionary, @"ModInfo"));

            // UPDATES
            parameterDictionary = new Dictionary <string, object>()
            {
                { @"serverfolder", UpdaterServiceServerFolder },
                { @"blacklistedfiles", UpdaterServiceBlacklistedFiles },
                { @"additionaldeploymentfolders", AdditionalDeploymentFolders },
                { @"additionaldeploymentfiles", AdditionalDeploymentFiles },
            };

            ParameterMap.AddRange(MDParameter.MapIntoParameterMap(parameterDictionary, @"UPDATES"));
        }
        public void BuildParameterMap(Mod mod)
        {
            Dictionary <string, object> parameterDictionary = new Dictionary <string, object>();

            if (IsVanillaJob(this, mod.Game))
            {
                if (Header == JobHeader.BASEGAME && mod.Game == MEGame.ME3 && mod.LegacyModCoal)
                {
                    // moddesc 2 supported this flag. In MM3 it auto converted the
                    // meaning of this into basegame coalesced job. We
                    // should convert it here since there are no raw values
                    // cached into raw

                    parameterDictionary[@"moddir"]       = @".";
                    parameterDictionary[@"newfiles"]     = @"Coalesced.bin";
                    parameterDictionary[@"replacefiles"] = @"BIOGame\CookedPCConsole\Coalesced.bin";

                    // Technically this doesn't support more on this version of moddesc.
                    // But since we can't save older moddesc formats we will allow
                    // additional parameters and not show the modcoal flag in the UI.
                }
                else
                {
                    parameterDictionary[@"moddir"]       = JobDirectory;
                    parameterDictionary[@"newfiles"]     = NewFilesRaw;
                    parameterDictionary[@"replacefiles"] = ReplaceFilesRaw;
                }

                if (mod.Game == MEGame.ME3 || Header == JobHeader.BASEGAME)
                {
                    // Add files
                    parameterDictionary[@"addfiles"]                = AddFilesRaw;
                    parameterDictionary[@"addfilestargets"]         = AddFilesTargetsRaw;
                    parameterDictionary[@"addfilesreadonlytargets"] = ReadOnlyIndicators;
                }

                parameterDictionary[@"gamedirectorystructure"] = GameDirectoryStructureRaw ? @"True" : null;
                parameterDictionary[@"jobdescription"]         = RequirementText;
            }
            else if (Header == JobHeader.CUSTOMDLC)
            {
                // These are serialized in special way by the editor
                // Do not put them into the parameter map
                //parameterDictionary[@"sourcedirs"] = CustomDLCFolderMapping.Keys;
                //parameterDictionary[@"destdirs"] = CustomDLCFolderMapping.Values;

                parameterDictionary[@"outdatedcustomdlc"]     = mod.OutdatedCustomDLC;
                parameterDictionary[@"incompatiblecustomdlc"] = mod.IncompatibleDLC;
                // NOT MAPPED: HUMAN READABLE NAMES
                // CONFIGURED DIRECTLY BY EDITOR UI
            }
            else if (Header == JobHeader.LOCALIZATION)
            {
                parameterDictionary[@"files"]   = FilesToInstall.Values;
                parameterDictionary[@"dlcname"] = mod.RequiredDLC.FirstOrDefault();
            }
            else if (Header == JobHeader.BALANCE_CHANGES)
            {
                parameterDictionary[@"moddir"]   = JobDirectory;
                parameterDictionary[@"newfiles"] = FilesToInstall.Values;
            }
            else if (Header == JobHeader.ME1_CONFIG)
            {
                parameterDictionary[@"moddir"] = JobDirectory;
                // files raw is handled by ui
            }

            ParameterMap.ReplaceAll(MDParameter.MapIntoParameterMap(parameterDictionary, Header.ToString()));
        }