no more sample!
This commit is contained in:
parent
3efcb311ba
commit
9abcc3bf0f
11 changed files with 25 additions and 30 deletions
|
@ -3,7 +3,7 @@ Microsoft Visual Studio Solution File, Format Version 12.00
|
||||||
# Visual Studio Version 16
|
# Visual Studio Version 16
|
||||||
VisualStudioVersion = 16.0.29709.97
|
VisualStudioVersion = 16.0.29709.97
|
||||||
MinimumVisualStudioVersion = 10.0.40219.1
|
MinimumVisualStudioVersion = 10.0.40219.1
|
||||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SamplePlugin", "SamplePlugin\SamplePlugin.csproj", "{13C812E9-0D42-4B95-8646-40EEBF30636F}"
|
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "CommandReference", "CommandReference\CommandReference.csproj", "{13C812E9-0D42-4B95-8646-40EEBF30636F}"
|
||||||
EndProject
|
EndProject
|
||||||
Global
|
Global
|
||||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
|
@ -5,10 +5,10 @@
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<Authors></Authors>
|
<Authors></Authors>
|
||||||
<Company></Company>
|
<Company></Company>
|
||||||
<Version>0.0.0.1</Version>
|
<Version>0.0.1.0</Version>
|
||||||
<Description>A sample plugin.</Description>
|
<Description>A simple plugin to group and display your current commands.</Description>
|
||||||
<Copyright></Copyright>
|
<Copyright></Copyright>
|
||||||
<PackageProjectUrl>https://github.com/goatcorp/SamplePlugin</PackageProjectUrl>
|
<PackageProjectUrl>https://git.zynh.me/Zynh0722/CommandReference</PackageProjectUrl>
|
||||||
<PackageLicenseExpression>AGPL-3.0-or-later</PackageLicenseExpression>
|
<PackageLicenseExpression>AGPL-3.0-or-later</PackageLicenseExpression>
|
||||||
<IsPackable>false</IsPackable>
|
<IsPackable>false</IsPackable>
|
||||||
</PropertyGroup>
|
</PropertyGroup>
|
8
CommandReference/CommandReference.json
Normal file
8
CommandReference/CommandReference.json
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
{
|
||||||
|
"Author": "RavenShade",
|
||||||
|
"Name": "Command Reference",
|
||||||
|
"Punchline": "A simple plugin to group and display your current commands.",
|
||||||
|
"Description": "A simple plugin to group and display your current commands. /cmdref",
|
||||||
|
"ApplicableVersion": "any",
|
||||||
|
"Tags": ["commands", "plugins"]
|
||||||
|
}
|
|
@ -2,7 +2,7 @@ using System;
|
||||||
using Dalamud.Configuration;
|
using Dalamud.Configuration;
|
||||||
using Dalamud.Plugin;
|
using Dalamud.Plugin;
|
||||||
|
|
||||||
namespace SamplePlugin
|
namespace CommandReference
|
||||||
{
|
{
|
||||||
[Serializable]
|
[Serializable]
|
||||||
public class Configuration : IPluginConfiguration
|
public class Configuration : IPluginConfiguration
|
|
@ -6,9 +6,9 @@ using Dalamud.IoC;
|
||||||
using Dalamud.Plugin;
|
using Dalamud.Plugin;
|
||||||
using Dalamud.Plugin.Services;
|
using Dalamud.Plugin.Services;
|
||||||
using Dalamud.Utility;
|
using Dalamud.Utility;
|
||||||
using SamplePlugin.Windows;
|
using CommandReference.Windows;
|
||||||
|
|
||||||
namespace SamplePlugin
|
namespace CommandReference
|
||||||
{
|
{
|
||||||
public sealed class Plugin : IDalamudPlugin
|
public sealed class Plugin : IDalamudPlugin
|
||||||
{
|
{
|
||||||
|
@ -19,7 +19,7 @@ namespace SamplePlugin
|
||||||
private DalamudPluginInterface pluginInterface { get; set; } = null!;
|
private DalamudPluginInterface pluginInterface { get; set; } = null!;
|
||||||
private ICommandManager commandManager { get; init; }
|
private ICommandManager commandManager { get; init; }
|
||||||
public Configuration configuration { get; init; }
|
public Configuration configuration { get; init; }
|
||||||
internal WindowSystem windowSystem = new("SamplePlugin");
|
internal WindowSystem windowSystem = new("CommandReference");
|
||||||
|
|
||||||
private ConfigWindow ConfigWindow { get; init; }
|
private ConfigWindow ConfigWindow { get; init; }
|
||||||
private MainWindow MainWindow { get; init; }
|
private MainWindow MainWindow { get; init; }
|
|
@ -3,7 +3,7 @@ using System.Numerics;
|
||||||
using Dalamud.Interface.Windowing;
|
using Dalamud.Interface.Windowing;
|
||||||
using ImGuiNET;
|
using ImGuiNET;
|
||||||
|
|
||||||
namespace SamplePlugin.Windows;
|
namespace CommandReference.Windows;
|
||||||
|
|
||||||
public class ConfigWindow : Window, IDisposable
|
public class ConfigWindow : Window, IDisposable
|
||||||
{
|
{
|
|
@ -4,7 +4,7 @@ using Dalamud.Interface.Internal;
|
||||||
using Dalamud.Interface.Windowing;
|
using Dalamud.Interface.Windowing;
|
||||||
using ImGuiNET;
|
using ImGuiNET;
|
||||||
|
|
||||||
namespace SamplePlugin.Windows;
|
namespace CommandReference.Windows;
|
||||||
|
|
||||||
public class MainWindow : Window, IDisposable
|
public class MainWindow : Window, IDisposable
|
||||||
{
|
{
|
15
README.md
15
README.md
|
@ -30,13 +30,12 @@ To begin, [clone this template repository][new-repo] to your own GitHub account.
|
||||||
|
|
||||||
Be sure to also check out the [Dalamud Developer Docs][dalamud-docs] for helpful information about building your own plugin. The Developer Docs includes helpful information about all sorts of things, including [how to submit][submit] your newly-created plugin to the official repository. Assuming you use this template repository, the provided project build configuration and license are already chosen to make everything a breeze.
|
Be sure to also check out the [Dalamud Developer Docs][dalamud-docs] for helpful information about building your own plugin. The Developer Docs includes helpful information about all sorts of things, including [how to submit][submit] your newly-created plugin to the official repository. Assuming you use this template repository, the provided project build configuration and license are already chosen to make everything a breeze.
|
||||||
|
|
||||||
[new-repo]: https://github.com/new?template_name=SamplePlugin&template_owner=goatcorp
|
|
||||||
[dalamud-docs]: https://dalamud.dev
|
[dalamud-docs]: https://dalamud.dev
|
||||||
[submit]: https://dalamud.dev/plugin-development/plugin-submission
|
[submit]: https://dalamud.dev/plugin-development/plugin-submission
|
||||||
|
|
||||||
### Prerequisites
|
### Prerequisites
|
||||||
|
|
||||||
SamplePlugin assumes all the following prerequisites are met:
|
CommandReference assumes all the following prerequisites are met:
|
||||||
|
|
||||||
- XIVLauncher, FINAL FANTASY XIV, and Dalamud have all been installed and the game has been run with Dalamud at least once.
|
- XIVLauncher, FINAL FANTASY XIV, and Dalamud have all been installed and the game has been run with Dalamud at least once.
|
||||||
- XIVLauncher is installed to its default directories and configurations.
|
- XIVLauncher is installed to its default directories and configurations.
|
||||||
|
@ -45,22 +44,22 @@ SamplePlugin assumes all the following prerequisites are met:
|
||||||
|
|
||||||
### Building
|
### Building
|
||||||
|
|
||||||
1. Open up `SamplePlugin.sln` in your C# editor of choice (likely [Visual Studio 2022](https://visualstudio.microsoft.com) or [JetBrains Rider](https://www.jetbrains.com/rider/)).
|
1. Open up `CommandReference.sln` in your C# editor of choice (likely [Visual Studio 2022](https://visualstudio.microsoft.com) or [JetBrains Rider](https://www.jetbrains.com/rider/)).
|
||||||
2. Build the solution. By default, this will build a `Debug` build, but you can switch to `Release` in your IDE.
|
2. Build the solution. By default, this will build a `Debug` build, but you can switch to `Release` in your IDE.
|
||||||
3. The resulting plugin can be found at `SamplePlugin/bin/x64/Debug/SamplePlugin.dll` (or `Release` if appropriate.)
|
3. The resulting plugin can be found at `CommandReference/bin/x64/Debug/CommandReference.dll` (or `Release` if appropriate.)
|
||||||
|
|
||||||
### Activating in-game
|
### Activating in-game
|
||||||
|
|
||||||
1. Launch the game and use `/xlsettings` in chat or `xlsettings` in the Dalamud Console to open up the Dalamud settings.
|
1. Launch the game and use `/xlsettings` in chat or `xlsettings` in the Dalamud Console to open up the Dalamud settings.
|
||||||
- In here, go to `Experimental`, and add the full path to the `SamplePlugin.dll` to the list of Dev Plugin Locations.
|
- In here, go to `Experimental`, and add the full path to the `CommandReference.dll` to the list of Dev Plugin Locations.
|
||||||
2. Next, use `/xlplugins` (chat) or `xlplugins` (console) to open up the Plugin Installer.
|
2. Next, use `/xlplugins` (chat) or `xlplugins` (console) to open up the Plugin Installer.
|
||||||
- In here, go to `Dev Tools > Installed Dev Plugins`, and the `SamplePlugin` should be visible. Enable it.
|
- In here, go to `Dev Tools > Installed Dev Plugins`, and the `CommandReference` should be visible. Enable it.
|
||||||
3. You should now be able to use `/pmycommand` (chat) or `pmycommand` (console)!
|
3. You should now be able to use `/pmycommand` (chat) or `pmycommand` (console)!
|
||||||
|
|
||||||
Note that you only need to add it to the Dev Plugin Locations once (Step 1); it is preserved afterwards. You can disable, enable, or load your plugin on startup through the Plugin Installer.
|
Note that you only need to add it to the Dev Plugin Locations once (Step 1); it is preserved afterwards. You can disable, enable, or load your plugin on startup through the Plugin Installer.
|
||||||
|
|
||||||
### Reconfiguring for your own uses
|
### Reconfiguring for your own uses
|
||||||
|
|
||||||
Basically, just replace all references to `SamplePlugin` in all of the files and filenames with your desired name, then start building the plugin of your dreams. You'll figure it out 😁
|
Basically, just replace all references to `CommandReference` in all of the files and filenames with your desired name, then start building the plugin of your dreams. You'll figure it out 😁
|
||||||
|
|
||||||
Dalamud will load the JSON file (by default, `SamplePlugin/SamplePlugin.json`) next to your DLL and use it for metadata, including the description for your plugin in the Plugin Installer. Make sure to update this with information relevant to _your_ plugin!
|
Dalamud will load the JSON file (by default, `CommandReference/CommandReference.json`) next to your DLL and use it for metadata, including the description for your plugin in the Plugin Installer. Make sure to update this with information relevant to _your_ plugin!
|
||||||
|
|
|
@ -1,12 +0,0 @@
|
||||||
{
|
|
||||||
"Author": "your name here",
|
|
||||||
"Name": "Sample Plugin",
|
|
||||||
"Punchline": "A short one-liner that shows up in /xlplugins.",
|
|
||||||
"Description": "A description that shows up in /xlplugins. List any major slash-command(s).",
|
|
||||||
"ApplicableVersion": "any",
|
|
||||||
"Tags": [
|
|
||||||
"sample",
|
|
||||||
"plugin",
|
|
||||||
"goats"
|
|
||||||
]
|
|
||||||
}
|
|
Loading…
Reference in a new issue