Skip to content

Commit

Permalink
Merge pull request #7 from Digitalroot-Valheim/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
Digitalroot authored Oct 18, 2021
2 parents a66da25 + 81a0a0e commit 93e20da
Show file tree
Hide file tree
Showing 11 changed files with 567 additions and 123 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion README.md → docs/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Digitalroot Valheim Mods
## Digitalroot Valheim Mods
Mods for Valheim using BepInEx and Harmony

## License
Expand Down
9 changes: 7 additions & 2 deletions src/Digitalroot.Valheim.PluginInfo.sln
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{B6C936B0-4E6A-4AB8-A3FF-5AA2C1A0C59C}"
ProjectSection(SolutionItems) = preProject
..\.gitignore = ..\.gitignore
..\LICENSE = ..\LICENSE
..\README.md = ..\README.md
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{89E8E94A-90F4-4FD3-B72F-C558A9ED8BF9}"
Expand All @@ -25,6 +23,12 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{
..\.github\workflows\test-report.yml = ..\.github\workflows\test-report.yml
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{A9825C27-BBCE-488B-9D35-1BD96B713082}"
ProjectSection(SolutionItems) = preProject
..\docs\LICENSE = ..\docs\LICENSE
..\docs\README.md = ..\docs\README.md
EndProjectSection
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand All @@ -42,6 +46,7 @@ Global
GlobalSection(NestedProjects) = preSolution
{89E8E94A-90F4-4FD3-B72F-C558A9ED8BF9} = {B6C936B0-4E6A-4AB8-A3FF-5AA2C1A0C59C}
{0B780DC6-CDC0-4FE8-93BD-2945C9B0B8A6} = {89E8E94A-90F4-4FD3-B72F-C558A9ED8BF9}
{A9825C27-BBCE-488B-9D35-1BD96B713082} = {B6C936B0-4E6A-4AB8-A3FF-5AA2C1A0C59C}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {DBD9181E-33F5-4CBE-9C7D-06A9FDCEF711}
Expand Down
1 change: 1 addition & 0 deletions src/Digitalroot.Valheim.PluginInfo.sln.DotSettings
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/Abbreviations/=JVL/@EntryIndexedValue">JVL</s:String>
<s:Boolean x:Key="/Default/UserDictionary/Words/=Fejd/@EntryIndexedValue">True</s:Boolean></wpf:ResourceDictionary>
68 changes: 68 additions & 0 deletions src/Digitalroot.Valheim.PluginInfo/.nx/description.bbcode.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
[b][size=4]Digitalroot Valheim Mods
[/size][/b][size=3]Mods for Valheim using BepInEx, Harmony[b], [/b]and Jotunn (JVL)[/size][b][size=4]

License
[/size][/b][size=3][url=https://github.com/Digitalroot-Valheim/Digitalroot.Valheim.PluginInfo/blob/main/LICENSE]GNU Affero General Public License v3.0[/url][/size][size=3]
[/size][size=3]Closed-source license is available for commercial use.[/size]

[b][size=4]Plugin Info[/size][/b]

Writes output to the LogOutput.log detailing mods loaded by [url=https://harmony.pardeike.net]Harmony[/url].
Any dependency errors are listed at the bottom of the output.

[size=4][b]Example Output[/b][/size]
[font=Courier New][size=2][Debug :Digitalroot] ******* [Digitalroot Plug-ins Loaded] *******
[Debug :Digitalroot] Key: com.jotunn.jotunn
[Debug :Digitalroot] Value: Jotunn 2.0.6
[Debug :Digitalroot] GUID: com.jotunn.jotunn
[Debug :Digitalroot] Name: Jotunn
[Debug :Digitalroot] Version: 2.0.6
[Debug :Digitalroot] Location: C:\Program Files (x86)\Steam\steamapps\common\Valheim\BepInEx\plugins\Jotunn\Jotunn.dll
[Debug :Digitalroot] Dependencies:
[Debug :Digitalroot] Incompatibilities:
[Debug :Digitalroot] Instance: BepInEx_Manager (Jotunn.Main)
[Debug :Digitalroot] ***************************************
[Debug :Digitalroot] Key: maximods.valheim.multicraft
[Debug :Digitalroot] Value: MultiCraft 0.2.6
[Debug :Digitalroot] GUID: maximods.valheim.multicraft
[Debug :Digitalroot] Name: MultiCraft
[Debug :Digitalroot] Version: 0.2.6
[Debug :Digitalroot] Location: C:\Program Files (x86)\Steam\steamapps\common\Valheim\BepInEx\plugins\MaxiMods-MultiCraft\MultiCraft.dll
[Debug :Digitalroot] Dependencies:
[Debug :Digitalroot] DependencyGUID: aedenthorn.CraftFromContainers
[Debug :Digitalroot] Flags: SoftDependency
[Debug :Digitalroot] MinimumVersion: 0.0
[Debug :Digitalroot] Incompatibilities:
[Debug :Digitalroot] Instance: BepInEx_Manager (MultiCraft.MultiCraftPlugin)
[Debug :Digitalroot] ***************************************
[Debug :Digitalroot] DependencyErrors
[Debug :Digitalroot] ***************************************[/size][/font]


[b][size=4]Dependencies[/size][/b]
[list]
[*][size=3][url=https://valheim.thunderstore.io/package/denikson/BepInExPack_Valheim/]BepInExPack Valheim[/url][/size]
[/list]
[b][size=4]Installation (manual)[/size][/b]
[list=1]
[*][size=3]Download the latest release archive (zip) file.[/size]
[*][size=3]Extract the archive into <Steam Location>\steamapps\common\Valheim\BepInEx\plugins[/size]
[/list]
[b][size=4]Configuration[/size][/b]
[list]
[*][size=3]No need to configure.[/size]
[/list]
[b][size=4]Issues/Bugs[/size][/b]
Open an issue or bug on the [url=https://github.com/Digitalroot-Valheim/Digitalroot.Valheim.PluginInfo/issues]issue board[/url].

[b][size=4]Questions[/size][/b]
Ask a question on the [url=https://github.com/Digitalroot-Valheim/Digitalroot.Valheim.PluginInfo/discussions]discussions board[/url].

[b][size=4]Support Me[/size][/b] @ [url=https://www.buymeacoffee.com/digitalroot]https://www.buymeacoffee.com/digitalroot[/url]
[b][size=4]Thanks to[/size][/b]
[list]
[*][size=3][url=https://github.com/RandyKnapp]RandyKnapp[/url] and [url=https://github.com/Menthus123]Menthus[/url] for answering my questions.[/size]
[*][size=3]The [url=https://discord.gg/GUEBuCuAMz]Valheim Discord[/url] community. [/size]
[/list]
[center][size=3][b][color=#00ffff]Digitalroot can be found in the Odin Plus Team Discord[/color][/b][/size]
[url=https://discord.gg/mbkPcvu9ax][img]https://digitalroot.net/img/odinplusdisc.png[/img][/url][/center]
Binary file added src/Digitalroot.Valheim.PluginInfo/.ts/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
12 changes: 12 additions & 0 deletions src/Digitalroot.Valheim.PluginInfo/.ts/manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"$schema": "https://raw.githubusercontent.com/Digitalroot-Valheim/Digitalroot.Valheim.Common.Interfaces/main/src/json/tsio-manifest.json",
"name": "PluginInfo",
"author": "Digitalroot",
"description": "Writes output to the LogOutput.log detailing mods loaded by Harmony. Any dependency errors are listed at the bottom of the output. ",
"version_number": "%VERSION_NUMBER%",
"dependencies": [
"denikson-BepInExPack_Valheim-5.4.1600",
"ValheimModding-Jotunn-2.3.7"
],
"website_url": "https://github.com/Digitalroot-Valheim/Digitalroot.Valheim.PluginInfo"
}
106 changes: 106 additions & 0 deletions src/Digitalroot.Valheim.PluginInfo/ConfigurationManagerAttributes.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
namespace Digitalroot.Valheim.PluginInfo
{
/// <summary>
/// Class that specifies how a setting should be displayed inside the ConfigurationManager settings window.
///
/// Usage:
/// This class template has to be copied inside the plugin's project and referenced by its code directly.
/// make a new instance, assign any fields that you want to override, and pass it as a tag for your setting.
///
/// If a field is null (default), it will be ignored and won't change how the setting is displayed.
/// If a field is non-null (you assigned a value to it), it will override default behavior.
/// </summary>
///
/// <example>
/// Here's an example of overriding order of settings and marking one of the settings as advanced:
/// <code>
/// // Override IsAdvanced and Order
/// Config.AddSetting("X", "1", 1, new ConfigDescription("", null, new ConfigurationManagerAttributes { IsAdvanced = true, Order = 3 }));
/// // Override only Order, IsAdvanced stays as the default value assigned by ConfigManager
/// Config.AddSetting("X", "2", 2, new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 1 }));
/// Config.AddSetting("X", "3", 3, new ConfigDescription("", null, new ConfigurationManagerAttributes { Order = 2 }));
/// </code>
/// </example>
///
/// <remarks>
/// You can read more and see examples in the readme at https://github.com/BepInEx/BepInEx.ConfigurationManager
/// You can optionally remove fields that you won't use from this class, it's the same as leaving them null.
/// </remarks>
#pragma warning disable 0169, 0414, 0649
internal sealed class ConfigurationManagerAttributes
{
/// <summary>
/// Should the setting be shown as a percentage (only use with value range settings).
/// </summary>
public bool? ShowRangeAsPercent;

/// <summary>
/// Custom setting editor (OnGUI code that replaces the default editor provided by ConfigurationManager).
/// See below for a deeper explanation. Using a custom drawer will cause many of the other fields to do nothing.
/// </summary>
public System.Action<BepInEx.Configuration.ConfigEntryBase> CustomDrawer;

/// <summary>
/// Show this setting in the settings screen at all? If false, don't show.
/// </summary>
public bool? Browsable;

/// <summary>
/// Category the setting is under. Null to be directly under the plugin.
/// </summary>
public string Category;

/// <summary>
/// If set, a "Default" button will be shown next to the setting to allow resetting to default.
/// </summary>
public object DefaultValue;

/// <summary>
/// Force the "Reset" button to not be displayed, even if a valid DefaultValue is available.
/// </summary>
public bool? HideDefaultButton;

/// <summary>
/// Force the setting name to not be displayed. Should only be used with a <see cref="CustomDrawer"/> to get more space.
/// Can be used together with <see cref="HideDefaultButton"/> to gain even more space.
/// </summary>
public bool? HideSettingName;

/// <summary>
/// Optional description shown when hovering over the setting.
/// Not recommended, provide the description when creating the setting instead.
/// </summary>
public string Description;

/// <summary>
/// Name of the setting.
/// </summary>
public string DispName;

/// <summary>
/// Order of the setting on the settings list relative to other settings in a category.
/// 0 by default, higher number is higher on the list.
/// </summary>
public int? Order;

/// <summary>
/// Only show the value, don't allow editing it.
/// </summary>
public bool? ReadOnly;

/// <summary>
/// If true, don't show the setting by default. User has to turn on showing advanced settings or search for it.
/// </summary>
public bool? IsAdvanced;

/// <summary>
/// Custom converter from setting type to string for the built-in editor textboxes.
/// </summary>
public System.Func<object, string> ObjToStr;

/// <summary>
/// Custom converter from string to setting type for the built-in editor textboxes.
/// </summary>
public System.Func<string, object> StrToObj;
}
}
Loading

0 comments on commit 93e20da

Please sign in to comment.