Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix first time setup issues #6

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 33 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,56 @@
# SamplePlugin
Simple example plugin for XivLauncher/Dalamud, that shows both a working plugin and an associated UI test project, to allow for building and tweaking the UI without having to run the game.
Simple example plugin for XIVLauncher/Dalamud, that shows both a working plugin and an associated UI test project, to allow for building and tweaking the UI without having to run the game.

This is not designed to be the simplest possible example, but neither is it designed to cover everything you might want to do.

I'm mostly hoping this helps some people to build out their UIs without having to constantly jump in and out of game.

**Sample Plugin is structured as Visual Studio Solution/Projects and will need to be adapted by anyone wishing to use something else.**

### Main Points
* The intention is less that any of this is used directly in other projects, and more to show how similar things can be done.
* Hides data files from visual studio to reduce clutter
* Also allows having data files in different paths than VS would usually allow if done in the IDE directly

#### SamplePlugin
* Simple functional plugin
* Slash command
* Main UI
* Settings UI
* Image loading
* Plugin json
* Simple, slightly-improved plugin configuration handling
* Copies all necessary plugin files to the output directory
* Does not copy dependencies that are provided by dalamud
* Output directory can be zipped directly and have exactly what is required

By default, building should out directly into the XIVLauncher's DevPlugins and be automatically loaded upon game launch.

#### UIDev
* Basic ImGui testbed application project
* Allows testing UI changes without needing to run the game
* UI environment provided should match what is seen in game
* Defaults to an invisible fullscreen overlay; can easily be changed to use an opaque window etc
* Currently relies more on copy/paste of your UI code than fully generic objects (though this could be done)
* Project organization
* Copies all necessary plugin files to the output directory
* Does not copy dependencies that are provided by dalamud
* Output directory can be zipped directly and have exactly what is required
* Hides data files from visual studio to reduce clutter
* Also allows having data files in different paths than VS would usually allow if done in the IDE directly


The intention is less that any of this is used directly in other projects, and more to show how similar things can be done.

The UIDev project could be used as-is, with just the UITest.cs file needing to be redone for your specific project UI.

### To Use
You'll need to fixup the library dependencies (for both projects), to point at your local dalamud binary directory.

Can be built as-us and run stand-alone directly resulting in a "pop-up" of the UI.

This will either be a custom dalamud build, or `%APPDATA%\XivLauncher\addon\Hooks\` for the current live release.
### First time setup

If you have not already done so, install the [latest version of the XIVLauncher](https://github.com/goatcorp/FFXIVQuickLauncher).
* The dalamud binaries come bundled with it and will get setup automatically and is the **highly preferred

You may need to fixup the library dependencies (for both projects), to point at your local dalamud binary directory.

Both projects are preconfigured to target the current live release's binaries in `%APPDATA%\XivLauncher\addon\Hooks\`. That said, updates, non-standard launcher installations, or, custom dalamud builds may result in the binaries being located elsewhere.

The simplest way to do this is to find this section in the .csproj files:
```
<PropertyGroup>
<DalamudLibPath>$(appdata)\XIVLauncher\addon\Hooks\dev\</DalamudLibPath>
</PropertyGroup>
```
and simply update the path as required.

After that, clear out what you don't need in UITest.cs, and implement your own local UI under Draw()
Once you've got it working, clear out what you don't need in UITest.cs and implement your own local UI under Draw()

4 changes: 4 additions & 0 deletions UIDev/UIDev.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,8 @@
<Visible>false</Visible>
</Content>
</ItemGroup>

<ItemGroup>
<PackageReference Include="ImGui.NET" Version="1.78.0" />
</ItemGroup>
</Project>