Having some fun with code generation menu

User Tag List

Results 1 to 7 of 7
  1. #1
    KillerJohn's Avatar TurboHUD HUDmaster CoreCoins Purchaser Authenticator enabled
    Reputation
    3693
    Join Date
    Jul 2012
    Posts
    2,532
    Thanks G/R
    46/3335
    Trade Feedback
    0 (0%)
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)

    Having some fun with code generation

    [C#] public void ConfigureCheatDeathBuffFeederPlugin() { - Pastebin.com

    This is fully generated (reflected) by TurboHUD, so basically it can generate C# code from the actual state of a plugin.
    (NOT everything, but basic datatypes and fonts, brushes, etc)

    the idea:
    - add some UI support to allow the user to change those values
    -- nothing fancy, but a list of plugins on the left, and a list of keys/values on the right. hopefully with some support for basic data types,like integer, float, bool, Key (enum), -- DashStyle (enum), etc
    -- not sure how to handle brushes/fonts yet on the UI
    - apply the changed values to the plugin instances, so the changes are visible realtime
    - "persist" the changed values as a special C# plugin which is responsible to apply these changes so it will be loaded every time HUD starts

    Of course this UI would not replace the freedom of writing customizer plugins (whose affect other plugins properties), but for the newbies it would be an awesome start.
    Do not send me private messages unless it is absolutely necessary or the content is sensitive or when I ask you to do that...

    Having some fun with code generation
  2. Thanks cherouvim13, prrovoss, Litespeed0, aamlima, greatscott (5 members gave Thanks to KillerJohn for this useful post)
  3. #2
    prrovoss's Avatar Contributor
    Reputation
    152
    Join Date
    Jan 2013
    Posts
    420
    Thanks G/R
    23/130
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    wow great idea!

    one quick question:
    while you are at persisting data, would you consider providing the user plugins with a way to persist some informations? could be as simple as one string per plugin that gets saved when thud terminates and is loaded and set when it starts.
    maybe add it to the baseplugin interface so each plugin can access its own string/object that gets persisted

  4. Thanks greatscott (1 members gave Thanks to prrovoss for this useful post)
  5. #3
    KillerJohn's Avatar TurboHUD HUDmaster CoreCoins Purchaser Authenticator enabled
    Reputation
    3693
    Join Date
    Jul 2012
    Posts
    2,532
    Thanks G/R
    46/3335
    Trade Feedback
    0 (0%)
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    even better after I added enum indexers:

    public void ConfigureOtherPlayersPlugin()
    {
    var plugin = Hud.GetPlugin<OtherPlayersPlugin>();
    plugin.DecoratorByClass[HeroClass.DemonHunter].Enabled = true;
    plugin.DecoratorByClass[HeroClass.Barbarian].Enabled = true;
    plugin.DecoratorByClass[HeroClass.Wizard].Enabled = true;
    plugin.DecoratorByClass[HeroClass.WitchDoctor].Enabled = true;
    plugin.DecoratorByClass[HeroClass.Monk].Enabled = true;
    plugin.DecoratorByClass[HeroClass.Crusader].Enabled = true;
    plugin.DecoratorByClass[HeroClass.Necromancer].Enabled = true;
    plugin.NameOffsetZ = 8f;
    plugin.Enabled = true;
    plugin.Order = 0;
    }
    Do not send me private messages unless it is absolutely necessary or the content is sensitive or when I ask you to do that...

  6. #4
    KillerJohn's Avatar TurboHUD HUDmaster CoreCoins Purchaser Authenticator enabled
    Reputation
    3693
    Join Date
    Jul 2012
    Posts
    2,532
    Thanks G/R
    46/3335
    Trade Feedback
    0 (0%)
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    ingame UI for realtime plugin customization (yes it looks shit, I spent ~35 minutes with it...) and only bool/int fields are supported currently

    https://i.imgur.com/Zs9YkoK.png
    https://i.imgur.com/YZ3CM3D.png
    Last edited by KillerJohn; 09-12-2017 at 02:17 PM.
    Do not send me private messages unless it is absolutely necessary or the content is sensitive or when I ask you to do that...

  7. Thanks greatscott (1 members gave Thanks to KillerJohn for this useful post)
  8. #5
    KillerJohn's Avatar TurboHUD HUDmaster CoreCoins Purchaser Authenticator enabled
    Reputation
    3693
    Join Date
    Jul 2012
    Posts
    2,532
    Thanks G/R
    46/3335
    Trade Feedback
    0 (0%)
    Mentioned
    16 Post(s)
    Tagged
    0 Thread(s)
    wow, so much reaction
    Do not send me private messages unless it is absolutely necessary or the content is sensitive or when I ask you to do that...

  9. Thanks greatscott (1 members gave Thanks to KillerJohn for this useful post)
  10. #6
    prrovoss's Avatar Contributor
    Reputation
    152
    Join Date
    Jan 2013
    Posts
    420
    Thanks G/R
    23/130
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by KillerJohn View Post
    wow, so much reaction
    im very curious to see this in action^^
    I allways thought about an ingame menu but it makes no sense without the possibility to persist the changes

  11. #7
    Runn1ng_F4st's Avatar Member
    Reputation
    1
    Join Date
    Mar 2017
    Posts
    8
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    As a noob and not so savvy for this stuff I appreciate the work. Would it be possible to add a default button in the bottom just in case we/I screw something up? Or perhaps change the color of variable (true, false,disabled, enabled) we adjusted. Just cause I'm so forgetful lol. This is nice tho, sort of reminds me of someones theme who had the options in the paragon tab(forgot who it was).
    Any who thx for your work and thud.

Similar Threads

  1. I have some probs with my boss ><
    By da10 in forum WoW EMU Questions & Requests
    Replies: 4
    Last Post: 08-23-2008, 06:44 PM
  2. Having some trouble with making my server public without hamachi.
    By Life_Hero in forum World of Warcraft Emulator Servers
    Replies: 3
    Last Post: 10-25-2007, 06:20 AM
  3. Having some probs with char loggin....
    By grond in forum World of Warcraft Emulator Servers
    Replies: 4
    Last Post: 09-17-2007, 10:37 AM
  4. Some Fun With The Lowbies
    By Rohham in forum World of Warcraft General
    Replies: 2
    Last Post: 01-15-2007, 01:51 AM
  5. Some Fun With The Lowbies
    By Rohham in forum World of Warcraft Guides
    Replies: 1
    Last Post: 01-15-2007, 01:35 AM
All times are GMT -5. The time now is 07:50 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search