When Turbohud is updated how do I update it without losing all my current settings?
I am getting exceptions when I add
Hud.GetPlugin<OriginalSkillBarPlugin>().SkillPainter.EnableSkillDpsBar = false;
Hud.GetPlugin<OriginalSkillBarPlugin>().SkillPainter.EnableDetailedDpsHint = false;
to the "PluginEnablerOrDisablerPlugin" to disable the DPS icons that appear around skills on the skillbar
2019.08.19 19:29:37.684 19.8.6.0 error while initializing plugins
2019.08.19 19:29:37.685 19.8.6.0 E:\THUD\Plugins\User\PluginEnablerOrDisablerPlugin.cs(49,37) : error CS0116: A namespace cannot directly contain members such as fields or methods
2019.08.19 19:29:37.685 19.8.6.0 E:\THUD\Plugins\User\PluginEnablerOrDisablerPlugin.cs(49,39) : error CS8124: Tuple must contain at least two elements.
2019.08.19 19:29:37.685 19.8.6.0 E:\THUD\Plugins\User\PluginEnablerOrDisablerPlugin.cs(49,40) : error CS1022: Type or namespace definition, or end-of-file expected
2019.08.19 19:29:37.685 19.8.6.0 E:\THUD\Plugins\User\PluginEnablerOrDisablerPlugin.cs(49,54) : error CS0116: A namespace cannot directly contain members such as fields or methods
2019.08.19 19:29:37.685 19.8.6.0 E:\THUD\Plugins\User\PluginEnablerOrDisablerPlugin.cs(49,72) : error CS1022: Type or namespace definition, or end-of-file expected
2019.08.19 19:29:37.685 19.8.6.0 E:\THUD\Plugins\User\PluginEnablerOrDisablerPlugin.cs(50,37) : error CS0116: A namespace cannot directly contain members such as fields or methods
2019.08.19 19:29:37.685 19.8.6.0 E:\THUD\Plugins\User\PluginEnablerOrDisablerPlugin.cs(50,39) : error CS8124: Tuple must contain at least two elements.
2019.08.19 19:29:37.685 19.8.6.0 E:\THUD\Plugins\User\PluginEnablerOrDisablerPlugin.cs(50,40) : error CS1022: Type or namespace definition, or end-of-file expected
2019.08.19 19:29:37.685 19.8.6.0 E:\THUD\Plugins\User\PluginEnablerOrDisablerPlugin.cs(50,54) : error CS0116: A namespace cannot directly contain members such as fields or methods
2019.08.19 19:29:37.685 19.8.6.0 E:\THUD\Plugins\User\PluginEnablerOrDisablerPlugin.cs(50,76) : error CS1022: Type or namespace definition, or end-of-file expected
To update it is advisable to decompress the .zip of the TH into a newly created folder and then copy the contents of the "Plugins" folder of the old TH, omitting the "Default" folder (important), to the "Plugins" folder of the new TH. These steps are usually enough, but it depends on whether you have made other configuration changes, such as language.
Those lines that you have written do not seem to be wrong, it seems to me that the problem comes from the fact that you have inserted them in a bad place.
Code:
public void Customize()
{
......
........
...........
here your code
}
To edit the file I recommend using Notepad++
And associate the .cs extension with the notepad ++
To update it is advisable to decompress the .zip of the TH into a newly created folder and then copy the contents of the "Plugins" folder of the old TH, omitting the "Default" folder (important), to the "Plugins" folder of the new TH. These steps are usually enough, but it depends on whether you have made other configuration changes, such as language.
Those lines that you have written do not seem to be wrong, it seems to me that the problem comes from the fact that you have inserted them in a bad place.
Code:
public void Customize()
{
......
........
...........
here your code
}
To edit the file I recommend using Notepad++
And associate the .cs extension with the notepad ++
Thank you for the reply. I have placed the lines as follows below. I haven't been able to test to see if it would work yet
Alright I was able to update the file and change where I put the lines. I am down to 2 exceptions now. Can someone confirm if I have the lines in the correct spot?
Code:
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// *.txt files are not loaded automatically by TurboHUD
// you have to change this file's extension to .cs to enable it
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
using Turbo.Plugins.Default;
namespace Turbo.Plugins.User
{
public class RevealConfigurationExamplePlugin : BasePlugin, ICustomizer
{
public RevealConfigurationExamplePlugin()
{
Enabled = true;
}
public override void Load(IController hud)
{
base.Load(hud);
}
// "Customize" methods are automatically executed after every plugin is loaded.
// So these methods can use Hud.GetPlugin<class> to access the plugin instances' public properties (like decorators, Enabled flag, parameters, etc)
// Make sure you test the return value against null!
public void Customize()
{
Hud.SceneReveal.MinimapClip = false;
{
Hud.GetPlugin<OriginalSkillBarPlugin>().SkillPainter.EnableSkillDpsBar = false;
Hud.GetPlugin<OriginalSkillBarPlugin>().SkillPainter.EnableDetailedDpsHint = false;
}
}
}
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// *.txt files are not loaded automatically by TurboHUD
// you have to change this file's extension to .cs to enable it
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
using Turbo.Plugins.Default;
namespace Turbo.Plugins.User
{
public class RevealConfigurationExamplePlugin : BasePlugin, ICustomizer
{
public RevealConfigurationExamplePlugin()
{
Enabled = true;
}
public override void Load(IController hud)
{
base.Load(hud);
}
// "Customize" methods are automatically executed after every plugin is loaded.
// So these methods can use Hud.GetPlugin<class> to access the plugin instances' public properties (like decorators, Enabled flag, parameters, etc)
// Make sure you test the return value against null!
public void Customize()
{
Hud.SceneReveal.MinimapClip = false;
{
Hud.GetPlugin<OriginalSkillBarPlugin>().SkillPainter.EnableSkillDpsBar = false;
Hud.GetPlugin<OriginalSkillBarPlugin>().SkillPainter.EnableDetailedDpsHint = false;
}
}
}
the "{" red you must remove it . You just have to do that to make it work.
the "{" and "}" are used to delimit instruction blocks, your code must be between the two green
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
// *.txt files are not loaded automatically by TurboHUD
// you have to change this file's extension to .cs to enable it
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
using Turbo.Plugins.Default;
namespace Turbo.Plugins.User
{
public class RevealConfigurationExamplePlugin : BasePlugin, ICustomizer
{
public RevealConfigurationExamplePlugin()
{
Enabled = true;
}
public override void Load(IController hud)
{
base.Load(hud);
}
// "Customize" methods are automatically executed after every plugin is loaded.
// So these methods can use Hud.GetPlugin<class> to access the plugin instances' public properties (like decorators, Enabled flag, parameters, etc)
// Make sure you test the return value against null!
public void Customize()
{
Hud.SceneReveal.MinimapClip = false;
{
Hud.GetPlugin<OriginalSkillBarPlugin>().SkillPainter.EnableSkillDpsBar = false;
Hud.GetPlugin<OriginalSkillBarPlugin>().SkillPainter.EnableDetailedDpsHint = false;
}
}
}
the "{" red you must remove it . You just have to do that to make it work.
the "{" and "}" are used to delimit instruction blocks, your code must be between the two green
That solved it thanks for your help and explaining, makes sense now