Exemplo n.º 1
0
        public override string ProcessString()
        {
            base.ProcessString();
            TextObject =
                "Begin Actor Class=Emitter Name=Emitter_0 Archetype=Emitter'Engine.Default__Emitter'\r\n" +
                TextObject;


            TextObject = TextObject.Replace("EDetailMode.", "");
            TextObject = TextObject.Replace("ParticleSystem'", $"ParticleSystem'{FileName}.");
            TextObject = TextObject.Replace("Translation=", "Location=");
            TextObject = TextObject.Replace("\tScale3D=", "\tDrawScale3D=");

            var finalString             = "";
            var stringToMoveAfterObject = "";
            var objectCreated           = false;

            var lines = TextObject.Split(new[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries);

            foreach (var line in lines)
            {
                if (line.ToLower().Contains("begin object "))
                {
                    finalString += "\t\t\t" + line + " ObjName=ParticleSystemComponent_0 Archetype=ParticleSystemComponent'Engine.Default__Emitter:ParticleSystemComponent0'\r\n";
                }
                else
                {
                    if (line.ToLower().Contains("location") || line.ToLower().Contains("rotation") ||
                        line.ToLower().Contains("drawscale3d"))
                    {
                        stringToMoveAfterObject += "\t\t" + line + "\r\n";
                    }
                    else if (line.ToLower().Contains("object end"))
                    {
                        finalString  += "\t\t\tEnd Object\r\n" + stringToMoveAfterObject + "\r\n";
                        objectCreated = true;
                    }
                    else
                    {
                        if (!objectCreated && !line.ToLower().Contains("begin actor"))
                        {
                            finalString += "\t\t\t" + line + "\r\n";
                        }
                        else
                        {
                            finalString += "\t\t" + line + "\r\n";
                        }
                    }
                }
            }

            finalString += "\t\tEnd Actor\r\n";

            Console.WriteLine("Done.");
            return(finalString);
        }
Exemplo n.º 2
0
        public override string ProcessString()
        {
            base.ProcessString();
            TextObject =
                "Begin Actor Class=StaticMeshActor Name=StaticMeshActor_0 Archetype=StaticMeshActor'Engine.Default__StaticMeshActor'\r\n" +
                TextObject +
                "\r\nEnd Actor\r\n";

            TextObject = TextObject.Replace("StaticMesh'", $"StaticMesh'{FileName}.");
            TextObject = TextObject.Replace("MaterialInstanceConstant'", $"MaterialInstanceConstant'{FileName}.");
            TextObject = TextObject.Replace("Material'", $"Material'{FileName}.");
            TextObject = TextObject.Replace("EDetailMode.", "");
            TextObject = TextObject.Replace("Translation=", "Location=");
            TextObject = TextObject.Replace("\tScale3D=", "\tDrawScale3D=");

            var finalString             = "";
            var stringToMoveAfterObject = "";

            var lines = TextObject.Split(new[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries);

            foreach (var line in lines)
            {
                if (line.ToLower().Contains("begin object "))
                {
                    finalString += "\t\t" + line + " ObjName=StaticMeshComponent_0 Archetype=StaticMeshComponent'Engine.Default__StaticMeshActor:StaticMeshComponent0'\r\n";
                }
                else
                {
                    if (line.ToLower().Contains("location") || line.ToLower().Contains("rotation") ||
                        line.ToLower().Contains("drawscale3d") || line.ToLower().Contains("blockrigidbody"))
                    {
                        stringToMoveAfterObject += "\t\t" + line + "\r\n";
                    }
                    else if (line.ToLower().Contains("object end"))
                    {
                        finalString += "\t\tEnd Object\r\n" + stringToMoveAfterObject + "\r\n";
                    }
                    else
                    {
                        finalString += "\t\t" + line + "\r\n";
                    }
                }
            }

            Console.WriteLine("Done.");
            return(finalString);
        }
Exemplo n.º 3
0
        public override string ProcessString()
        {
            base.ProcessString();
            TextObject =
                "Begin Actor Class=StaticMeshActor Name=StaticMeshActor_0 Archetype=StaticMeshActor'Engine.Default__StaticMeshActor'\r\n" +
                TextObject;

            TextObject = TextObject.Replace("StaticMesh'", $"StaticMesh'{FileName}.");
            TextObject = TextObject.Replace("MaterialInstanceConstant'", $"MaterialInstanceConstant'{FileName}.");
            TextObject = TextObject.Replace("Material'", $"Material'{FileName}.");
            TextObject = TextObject.Replace("EDetailMode.", "");
            TextObject = TextObject.Replace("Translation=", "Location=");
            TextObject = TextObject.Replace("\tScale3D=", "\tDrawScale3D=");

            var finalString = "";
            var stringToMoveInsideObject = "";
            var stringToMoveAfterObject  = "";
            var objectCreated            = false;
            var inObject = false;

            var lines = TextObject.Split(new[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries);

            foreach (var line in lines)
            {
                if (!objectCreated)
                {
                    if (Regex.IsMatch(line, @"begin object name=\w+ class=StaticMeshActor", RegexOptions.IgnoreCase))
                    {
                        continue;
                    }

                    if (line.ToLower().Contains("begin object "))
                    {
                        finalString += "\t\t" + line.Replace("class=StaticMeshActor", "class=StaticMeshComponent") + " ObjName=StaticMeshComponent_0 Archetype=StaticMeshComponent'Engine.Default__StaticMeshActor:StaticMeshComponent0'\r\n";
                        finalString += stringToMoveInsideObject;
                    }
                    else
                    {
                        if (line.ToLower().Contains("location") || line.ToLower().Contains("rotation") ||
                            line.ToLower().Contains("drawscale3d") || line.ToLower().Contains("blockrigidbody"))
                        {
                            stringToMoveAfterObject += "\t\t" + line + "\r\n";
                        }
                        else if (line.ToLower().Contains("object end"))
                        {
                            finalString  += "\t\t\tEnd Object\r\n" + stringToMoveAfterObject + "\r\n";
                            objectCreated = true;
                        }
                        else
                        {
                            finalString += "\t\t" + line + "\r\n";
                        }
                    }
                }
                else
                {
                    if (line.ToLower().Contains("begin object "))
                    {
                        inObject = true;
                    }

                    if (!inObject && !line.ToLower().Contains("object end") &&
                        !Regex.IsMatch(line, @"components\([0-9]+\)=", RegexOptions.IgnoreCase) &&
                        !line.ToLower().Contains("staticmeshcomponent=") &&
                        !line.ToLower().Contains("collisioncomponent="))
                    {
                        finalString += "\t\t" + line + "\r\n";
                    }

                    if (line.ToLower().Contains("object end"))
                    {
                        inObject = false;
                    }
                }
            }

            finalString += "\t\tEnd Actor\r\n";

            Console.WriteLine("Done.");
            return(finalString);
        }
Exemplo n.º 4
0
        public override string ProcessString()
        {
            base.ProcessString();
            TextObject =
                "Begin Actor Class=AkAmbientSoundActor Name=AkAmbientSoundActor_0 Archetype=AkAmbientSoundActor'akaudio.Default__AkAmbientSoundActor'\r\n" +
                TextObject +
                "\r\nEnd Actor\r\n";

            TextObject = TextObject.Replace("AkSoundCue'", $"AkSoundCue'{FileName}.");

            var finalString   = "";
            var objectCreated = false;
            var inObject      = false;

            var lines = TextObject.Split(new[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries);

            foreach (var line in lines)
            {
                if (!objectCreated)
                {
                    if (Regex.IsMatch(line, @"begin object name=\w+ class=AkAmbientSoundActor", RegexOptions.IgnoreCase))
                    {
                        continue;
                    }

                    if (line.ToLower().Contains("begin object "))
                    {
                        finalString += "\t\t" + line + " ObjName=AkPlaySoundComponent_0\r\n";
                    }
                    else
                    {
                        if (line.ToLower().Contains("object end"))
                        {
                            finalString  += "\t\t\tEnd Object\r\n";
                            objectCreated = true;
                        }
                        else
                        {
                            finalString += "\t\t" + line + "\r\n";
                        }
                    }
                }
                else
                {
                    if (line.ToLower().Contains("begin object "))
                    {
                        inObject = true;
                    }

                    if (!inObject && !line.ToLower().Contains("object end"))
                    {
                        if (line.ToLower().Contains("playsoundcomponent="))
                        {
                            finalString += "\t\t\tPlaySoundComponent=AkPlaySoundComponent_0\r\n";
                        }
                        else if (!Regex.IsMatch(line, @"components\([0-9]+\)=", RegexOptions.IgnoreCase))
                        {
                            finalString += "\t\t" + line + "\r\n";
                        }
                    }

                    if (line.ToLower().Contains("object end"))
                    {
                        inObject = false;
                    }
                }
            }

            Console.WriteLine("Done.");
            return(finalString);
        }
Exemplo n.º 5
0
        public override string ProcessString()
        {
            base.ProcessString();
            TextObject =
                "Begin Actor Class=LensFlareSource Name=LensFlareSource_0 Archetype=LensFlareSource'Engine.Default__LensFlareSource'\r\n" +
                TextObject +
                "\r\nEnd Actor\r\n";

            TextObject = TextObject.Replace("EDetailMode.", "");
            TextObject = TextObject.Replace("ESceneDepthPriorityGroup.", "");
            TextObject = TextObject.Replace("LensFlare'", $"LensFlare'{FileName}.");
            TextObject = TextObject.Replace("Translation=", "Location=");
            TextObject = TextObject.Replace("\tScale3D=", "\tDrawScale3D=");

            var finalString   = "";
            var objectCreated = false;
            var inObject      = false;

            var lines = TextObject.Split(new[] { '\r', '\n' }, StringSplitOptions.RemoveEmptyEntries);

            foreach (var line in lines)
            {
                if (!objectCreated)
                {
                    if (Regex.IsMatch(line, @"begin object name=\w+ class=LensFlareSource", RegexOptions.IgnoreCase))
                    {
                        continue;
                    }

                    if (line.ToLower().Contains("begin object "))
                    {
                        finalString += "\t\t" + line + " ObjName=LensFlareComponent_0 Archetype=LensFlareComponent'Engine.Default__LensFlareSource:LensFlareComponent0'\r\n";
                    }
                    else
                    {
                        if (line.ToLower().Contains("object end"))
                        {
                            finalString  += "\t\t\tEnd Object\r\n";
                            objectCreated = true;
                        }
                        else
                        {
                            finalString += "\t\t" + line + "\r\n";
                        }
                    }
                }
                else
                {
                    if (line.ToLower().Contains("begin object "))
                    {
                        inObject = true;
                    }

                    if (!inObject && !line.ToLower().Contains("object end"))
                    {
                        if (line.ToLower().Contains("lensflarecomp="))
                        {
                            finalString += "\t\t\tLensFlareComp=LensFlareComponent_0\r\n";
                        }
                        else if (!Regex.IsMatch(line, @"components\([0-9]+\)=", RegexOptions.IgnoreCase))
                        {
                            finalString += "\t\t" + line + "\r\n";
                        }
                    }

                    if (line.ToLower().Contains("object end"))
                    {
                        inObject = false;
                    }
                }
            }

            Console.WriteLine("Done.");
            return(finalString);
        }