[Release] Sharing my custom effect editor

03/08/2024 02:01 iidagger#1
Just decided to share these, for those who are tired navigating from one tab to another tab and do multiple search using notepad++ maybe these could become handy.

How to use the tool:

its pretty much straight forward, you just need to grab the effect id that you want to edit and paste it in the search field and press the search button. it will outline the files were the same id exist, just expand it and highlight it and the content of that effect will be displayed on the text editor field.

PS: make sure to place the tool in the root folder of your dekaron client.:cool:
03/15/2024 15:43 DKUNitex#2
Nice release, thanks for sharing. I started working on a similar tool and started by trying to create models for EffectData and EffectScene. I'll share them below in case they are useful to you. My plan was to try to possibly create a description for each.

It seems like you're coding in C#/C++ but if not let me know what language you're using and I can convert it.
Code:
public class EffectData
{
    public int Category { get; set; }
    public string Name { get; set; }
    public string UnitType { get; set; }
    public string BillboardType { get; set; }
    public string TailStep { get; set; } // Could be a more complex type if needed
    public float? Size { get; set; }
    public bool? Backprint { get; set; }
    public bool? Disort { get; set; }
    public string TextureFile { get; set; }
    public string TexturePack { get; set; }
    public string BlendType { get; set; }
    public string TextureLoop { get; set; }
    public int? TexAnimTime { get; set; }

    // Additional fields based on 'particle' unit type
    public string LeafType { get; set; }
    public string ActiveState { get; set; }
    public int? Lifetime { get; set; }
    public int? EmitRate { get; set; }
    public int? MaxElementCount { get; set; }
    public int? AddRotate { get; set; }
    public float? Velocity { get; set; } // Could be a vector if needed
    public float? Acceleration { get; set; } // Could be a vector if needed
    public string SpawnDirection { get; set; } // Could be a vector if needed
    public string Gravity { get; set; } // Could be a vector if needed
    public float? ColorRange { get; set; }
    public float? StartRange { get; set; }
    public string EndPosition { get; set; } // Could be a vector if needed
    public string ParticleSize { get; set; } // Could be a vector if needed
    public bool? FollowDirection { get; set; }
    public bool? SpawnDirAbs { get; set; }
    public bool? TriangleRender { get; set; }

    public EffectData()
    {
        // Initialize with defaults or required values
    }
}


public class EffectScene
{
    public int Id { get; set; }
    public string Name { get; set; }
    public List<EffectResource> Resources { get; set; } = new List<EffectResource>();
    public List<Scene> Scenes { get; set; } = new List<Scene>();

    public class EffectResource
    {
        public int ResId { get; set; }
        public string EffectName { get; set; }
    }

    public class Scene
    {
        public int SceneId { get; set; }
        public string SceneName { get; set; }
        public List<Control> Controls { get; set; } = new List<Control>();
    }

    public class Control
    {
        public int UnitId { get; set; }
        public bool Active { get; set; }
        public string StartPosition { get; set; } // Could be a more complex type (like a vector)
        public (int, int) Lifetime { get; set; }
        public int AnimTime { get; set; }
        public string Scale { get; set; } // Could be a more complex type or a list of keyframes
        public string Alpha { get; set; } // Could be a more complex type or a list of keyframes
        public bool RandomStart { get; set; }
        public string BoneName { get; set; }
        public string Color { get; set; } // Could be a more complex type or a list of keyframes
        public string Rotation { get; set; } // Could be a more complex type or a list of keyframes
    }
}
03/18/2024 18:36 iidagger#3
Quote:
Originally Posted by DKUNitex View Post
Nice release, thanks for sharing. I started working on a similar tool and started by trying to create models for EffectData and EffectScene. I'll share them below in case they are useful to you. My plan was to try to possibly create a description for each.

It seems like you're coding in C#/C++ but if not let me know what language you're using and I can convert it.
Code:
public class EffectData
{
    public int Category { get; set; }
    public string Name { get; set; }
    public string UnitType { get; set; }
    public string BillboardType { get; set; }
    public string TailStep { get; set; } // Could be a more complex type if needed
    public float? Size { get; set; }
    public bool? Backprint { get; set; }
    public bool? Disort { get; set; }
    public string TextureFile { get; set; }
    public string TexturePack { get; set; }
    public string BlendType { get; set; }
    public string TextureLoop { get; set; }
    public int? TexAnimTime { get; set; }

    // Additional fields based on 'particle' unit type
    public string LeafType { get; set; }
    public string ActiveState { get; set; }
    public int? Lifetime { get; set; }
    public int? EmitRate { get; set; }
    public int? MaxElementCount { get; set; }
    public int? AddRotate { get; set; }
    public float? Velocity { get; set; } // Could be a vector if needed
    public float? Acceleration { get; set; } // Could be a vector if needed
    public string SpawnDirection { get; set; } // Could be a vector if needed
    public string Gravity { get; set; } // Could be a vector if needed
    public float? ColorRange { get; set; }
    public float? StartRange { get; set; }
    public string EndPosition { get; set; } // Could be a vector if needed
    public string ParticleSize { get; set; } // Could be a vector if needed
    public bool? FollowDirection { get; set; }
    public bool? SpawnDirAbs { get; set; }
    public bool? TriangleRender { get; set; }

    public EffectData()
    {
        // Initialize with defaults or required values
    }
}


public class EffectScene
{
    public int Id { get; set; }
    public string Name { get; set; }
    public List<EffectResource> Resources { get; set; } = new List<EffectResource>();
    public List<Scene> Scenes { get; set; } = new List<Scene>();

    public class EffectResource
    {
        public int ResId { get; set; }
        public string EffectName { get; set; }
    }

    public class Scene
    {
        public int SceneId { get; set; }
        public string SceneName { get; set; }
        public List<Control> Controls { get; set; } = new List<Control>();
    }

    public class Control
    {
        public int UnitId { get; set; }
        public bool Active { get; set; }
        public string StartPosition { get; set; } // Could be a more complex type (like a vector)
        public (int, int) Lifetime { get; set; }
        public int AnimTime { get; set; }
        public string Scale { get; set; } // Could be a more complex type or a list of keyframes
        public string Alpha { get; set; } // Could be a more complex type or a list of keyframes
        public bool RandomStart { get; set; }
        public string BoneName { get; set; }
        public string Color { get; set; } // Could be a more complex type or a list of keyframes
        public string Rotation { get; set; } // Could be a more complex type or a list of keyframes
    }
}
Yeah I coded the tool using C#