Skip to content
Draft

weee #18

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
185 commits
Select commit Hold shift + click to select a range
8ddadb4
Update equipment to read DrawObject data (Glamourer compatibility)
chirpxiv Sep 27, 2023
9545d49
Correct offset for `DemiEquip`
chirpxiv Sep 27, 2023
ba110c0
Update customize and equipment editing for Glamourer compatibility
chirpxiv Sep 27, 2023
ddbbc2d
Update repo.json for v0.2.16
Sep 27, 2023
bb787b9
Fix crash when loading appearance onto non-PCs
chirpxiv Sep 27, 2023
055e131
Fix customize tab locking for non-PCs
chirpxiv Sep 27, 2023
9f427d7
Fix gender button
chirpxiv Sep 27, 2023
e67646e
Update repo.json for v0.2.17
Sep 27, 2023
0eb87d8
remove dead code
chirpxiv Sep 29, 2023
859eab1
fix weapon variants not working correctly
chirpxiv Sep 29, 2023
638b566
Add `WorldTab`
chirpxiv Sep 29, 2023
8d449d2
Add `ITextureProvider` to `Services`
chirpxiv Sep 29, 2023
aac43f7
Implement time/weather controls & sky texture
chirpxiv Sep 29, 2023
93b9117
move env data access into `EnvService`
chirpxiv Sep 29, 2023
e7e4582
Update repo.json for v0.2.18
Sep 29, 2023
5b0c66f
bump version
chirpxiv Sep 29, 2023
1942c7d
Update repo.json for v0.2.18.1
Sep 29, 2023
557de54
Initial API 9 porting work
NotNite Oct 2, 2023
8071d3d
Merge pull request #115 from NotNite/api9
chirpxiv Oct 2, 2023
86aec25
Update signature for `SkyTexHook`
chirpxiv Oct 3, 2023
2bb9ca6
Update `Actor` offsets
chirpxiv Oct 3, 2023
321b987
Update params for `ActorChangeEquip`
chirpxiv Oct 3, 2023
7127cf5
Update `Weapon.Flags` offset
chirpxiv Oct 3, 2023
dd34cc7
Update `Gaze` offset
chirpxiv Oct 3, 2023
15f0ae8
ci: add v9 and staging for Dalamud
sudojunior Oct 3, 2023
543aee6
ci: disable fast-fail on matrix
sudojunior Oct 3, 2023
c54a8d7
Merge pull request #116 from Bnuuy-Central/patch/ci-tests
chirpxiv Oct 3, 2023
e91d10a
Add `OpenMainUi` handler
chirpxiv Oct 3, 2023
17446d3
Implement opacity slider
chirpxiv Oct 3, 2023
178a964
Add Transparency support for .chara files
chirpxiv Oct 3, 2023
82be2f5
Fix `SkyTexHook` leak
chirpxiv Oct 3, 2023
e5dc208
Auto Backup/Save poses (#114)
Cazzar Oct 4, 2023
728cabe
Update release.yml
chirpxiv Oct 4, 2023
2e83984
Update repo.json for v0.2.19
Oct 5, 2023
aeaf8e5
Update repo.json
chirpxiv Oct 5, 2023
289d136
Update release.yml
chirpxiv Oct 5, 2023
0969bb6
Remove v9 from test matrix
chirpxiv Oct 9, 2023
4c5404c
Change format of AutoSave directory to minimise clashing by including…
Cazzar Oct 9, 2023
c469d35
Move timer update logic to PoseAutoSave.UpdateSettings; generalize
Cazzar Oct 9, 2023
dc28882
Correct indentation in PoseHooks.cs
Cazzar Oct 9, 2023
3e17104
Add ability to load .cmp files (#122)
Spiderbuttons Nov 15, 2023
da6c53a
Match Anamnesis with allowing camera DistanceMin to go down to 0 when…
Cazzar Oct 21, 2023
3e636ae
Keyboard inputs for camera controls.
Cazzar Oct 21, 2023
41aa910
Stop free camera from moving when chat input is focused.
Cazzar Oct 21, 2023
273cddb
Add "Freeze Water" option to world tab
Caraxi Dec 2, 2023
e03a740
Hacky wetness stuff
Cazzar Oct 24, 2023
89d240e
Proof Of Concept - Allow auto save to customize the directory
Cazzar Nov 26, 2023
440b3f6
Slightly optimise the replace function to tokenise the string.
Cazzar Nov 26, 2023
1182d13
Fix UI being disabled by invalid actor models
chirpxiv Dec 11, 2023
16958ca
Add GLib to solution
chirpxiv Dec 11, 2023
3ba17ca
Upload gubal BNPc index
chirpxiv Dec 11, 2023
ebc51a4
Basic NPC import implementation
chirpxiv Dec 11, 2023
64c843c
Update GLib
chirpxiv Dec 11, 2023
a36bc5b
Restore GLib to main branch
chirpxiv Dec 11, 2023
14ce982
always use face hack when redrawing
chirpxiv Dec 11, 2023
e501d1c
Add button to revert actor to original state
chirpxiv Dec 11, 2023
6459c73
Add model IDs to NPC list
chirpxiv Dec 11, 2023
655a731
Add Glamourer IPC check
chirpxiv Dec 11, 2023
0457591
finalize npc import for now
chirpxiv Dec 11, 2023
a9aab65
Implement import modes for NPCs, fix bad weapon parsing
chirpxiv Dec 11, 2023
26db40e
rename revert button
chirpxiv Dec 11, 2023
a783731
Update repo.json for v0.2.20
Dec 11, 2023
1882954
bump version
chirpxiv Dec 11, 2023
3f42b4e
Update repo.json for v0.2.20.1
Dec 11, 2023
d303e18
Delete gubal-bnpcs-index.json
chirpxiv Dec 12, 2023
6398bad
Improve weather selection
chirpxiv Dec 15, 2023
7f149c7
Merge branch 'main' of github.com:ktisis-tools/Ktisis
chirpxiv Dec 15, 2023
e3cfb24
git moment
chirpxiv Dec 15, 2023
c6e7f41
bump version
chirpxiv Dec 15, 2023
722ca54
Update repo.json for v0.2.21
Dec 15, 2023
a838592
Handle possible exception when checking directory access.
Cazzar Dec 20, 2023
f4ba194
Update repo.json
chirpxiv Feb 12, 2024
748922b
Update repo.json
chirpxiv Feb 14, 2024
34d01aa
Merge pull request #129 from Cazzar/handle-unauthorized-access-to-paths
chirpxiv Mar 22, 2024
84acda6
.NET 8 update
chirpxiv Mar 22, 2024
7ce3a5e
bump version
chirpxiv Mar 22, 2024
e169aab
Update repo.json for v0.2.22
Mar 22, 2024
d588aa1
Update repo.json
chirpxiv Mar 22, 2024
11261e9
Update Dalamud API + CS
chirpxiv Jul 4, 2024
47e41f4
Update missing signatures
chirpxiv Jul 4, 2024
1a98eb4
more dalamud api changes
chirpxiv Jul 4, 2024
2f1a967
more signature updates
chirpxiv Jul 4, 2024
7d02400
fix camera matrices
chirpxiv Jul 4, 2024
b0babc8
update offsets
chirpxiv Jul 4, 2024
46f1bb7
2nd dye channel support
chirpxiv Jul 6, 2024
1147a3f
implement facewear/glasses
chirpxiv Jul 6, 2024
d297efa
Weather fixes
chirpxiv Jul 6, 2024
094e287
cleanup
chirpxiv Jul 6, 2024
84c40e8
more stable proj matrix
chirpxiv Jul 6, 2024
16e567f
categorize bones
chirpxiv Jul 6, 2024
6a055f8
correct clipping plane calculations
chirpxiv Jul 6, 2024
417c259
name bones
chirpxiv Jul 6, 2024
191d544
correct drawdata customize offset
chirpxiv Jul 6, 2024
7ff89db
Hook camera pre-update
chirpxiv Jul 7, 2024
4d174ad
fix freecam
chirpxiv Jul 7, 2024
361e36c
Rework click target hooks
chirpxiv Jul 7, 2024
3ab7ce1
update hat toggle
chirpxiv Jul 7, 2024
1f6aa37
correct DemiEquip offset
chirpxiv Jul 7, 2024
cc471f4
Update GLib
chirpxiv Jul 7, 2024
db94fe4
bump API level + assembly version
chirpxiv Jul 7, 2024
ffec017
hook kinedriver/havok controller
chirpxiv Jul 7, 2024
a1b3d7c
Merge pull request #142 from ktisis-tools/main-dt
chirpxiv Jul 7, 2024
fd62486
Update repo.json for v0.2.23
Jul 7, 2024
7a9a2f7
Update repo.json
chirpxiv Jul 7, 2024
7f4b0bc
Update EventNpc + equipment parser
chirpxiv Jul 7, 2024
6657ad7
update NpcEquipment
chirpxiv Jul 7, 2024
fbbb39e
version bump
chirpxiv Jul 7, 2024
5ed4373
Update repo.json for v0.2.24
Jul 7, 2024
dbeb89e
Update repo.json
chirpxiv Jul 10, 2024
323f623
Update repo.json
chirpxiv Jul 10, 2024
3f8c0f2
dynamic resolution fix
chirpxiv Jul 17, 2024
948370d
Update repo.json for v0.2.25
Jul 17, 2024
0ad900e
Update repo.json
chirpxiv Jul 17, 2024
79bdc07
update BNpc index
chirpxiv Aug 2, 2024
dd92285
Update repo.json for v0.2.26
Aug 2, 2024
88c1af7
Update repo.json
chirpxiv Aug 2, 2024
190212a
Update repo.json
chirpxiv Oct 1, 2024
6befd90
Update repo.json
chirpxiv Oct 26, 2024
b43a66b
goatcorp/dalamud-docs@19aadfe
chirpxiv Nov 15, 2024
dfaff77
replace obsolete method
chirpxiv Nov 20, 2024
ee2d5b3
update sigs
chirpxiv Nov 20, 2024
b1d0dd5
update offsets
chirpxiv Nov 20, 2024
3fb326d
fix ActorModel offsets
chirpxiv Nov 20, 2024
cc10f17
lumina pt 2
chirpxiv Nov 20, 2024
009f6a0
npc imports
chirpxiv Nov 20, 2024
c380078
gaze
chirpxiv Nov 20, 2024
15876be
???
chirpxiv Nov 20, 2024
8d3640e
fix camera
chirpxiv Nov 20, 2024
024ff10
fix time
chirpxiv Nov 20, 2024
cda5d11
version bump
chirpxiv Nov 20, 2024
ae7735c
Target stg for release
chirpxiv Nov 20, 2024
78aeea4
Update repo.json for v0.2.27
Nov 20, 2024
87b3518
Update repo.json
chirpxiv Nov 20, 2024
53aef7a
Update repo.json
chirpxiv Nov 20, 2024
fb57b94
Update GLib
chirpxiv Mar 27, 2025
dfa32a8
update deps
chirpxiv Mar 27, 2025
e23ff58
version bump
chirpxiv Mar 27, 2025
adf9374
Update ActorChangeEquip sig
chirpxiv Mar 27, 2025
b411e2d
update offsets
chirpxiv Mar 27, 2025
f470ffa
cleanup print debugging
chirpxiv Mar 27, 2025
321ff49
Update BNPC hash
chirpxiv Mar 27, 2025
e14bcb5
update BNPC index
chirpxiv Mar 27, 2025
ab40e17
update workflows
chirpxiv Mar 27, 2025
6cd2caa
update dotnet-version
chirpxiv Mar 27, 2025
3a146b9
remove stg tests?
chirpxiv Mar 27, 2025
456b9a6
yet another version bump
chirpxiv Mar 27, 2025
f905944
assembly name
chirpxiv Mar 27, 2025
2f2ddba
filter empty rows from glasses selection
chirpxiv Mar 27, 2025
ea84615
Update repo.json for v0.2.28
Mar 27, 2025
6d7c898
Update repo.json
chirpxiv Mar 27, 2025
8c1f474
Update repo.json
chirpxiv Mar 28, 2025
abe609c
DAPI13
chirpxiv Aug 8, 2025
8d1ede7
update discord invite
chirpxiv Aug 8, 2025
e49a781
use stg
chirpxiv Aug 8, 2025
99df279
Update repo.json for v0.2.29
Aug 8, 2025
f0c6cd3
Update repo.json
chirpxiv Aug 8, 2025
5a523f3
Update repo.json
chirpxiv Aug 10, 2025
6ea17c8
Update repo.json
chirpxiv Aug 22, 2025
e8542ce
Update repo.json
chirpxiv Aug 22, 2025
995b62b
Update repo.json
chirpxiv Aug 25, 2025
e37ce7a
Update README.md
chirpxiv Aug 27, 2025
8d9361b
Update repo.json
Cazzar Sep 12, 2025
f78c1fd
Update repo.json (Testing v0.3.11)
Cazzar Oct 2, 2025
3490285
Version Bump - V0.3.12
Cazzar Oct 26, 2025
5874719
Update repo.json - v0.3.13
sleepybnuuy Nov 26, 2025
6d50f0d
Update repo.json
sleepybnuuy Nov 26, 2025
d0078e9
Update repo.json
sleepybnuuy Nov 26, 2025
065a60e
[Testing] v0.3.13.3 Release
Cazzar Nov 27, 2025
7a70969
Bump version to force any updates
Cazzar Nov 27, 2025
c32e4d6
[Testing] v0.3.14
Cazzar Dec 7, 2025
6901893
[WIP] Updates for 7.4 [skip-ci]
Cazzar Dec 19, 2025
3213ac8
revert that change [skip-ci]
Cazzar Dec 19, 2025
7074f2c
Update GLib
chirpxiv Dec 20, 2025
09ddbd9
Update CharaMakeType
chirpxiv Dec 20, 2025
184840a
update DrawData offset
chirpxiv Dec 20, 2025
a58b0eb
Merge pull request #259 from chirpxiv/7.4-update
Cazzar Dec 20, 2025
654169c
Update .net versions for builds & restrict release to only run for 0.2x
Cazzar Dec 20, 2025
2cd5df3
Merge pull request #260 from ktisis-tools/7.4-update
Cazzar Dec 20, 2025
1a61963
Update repo.json for v0.2.30
Dec 20, 2025
580c889
[Testing] v0.3.15
Cazzar Dec 20, 2025
70962ed
[Testing] v0.3.16
Cazzar Jan 28, 2026
aa3ec7b
Hotfix.
Cazzar Jan 28, 2026
b36a128
v0.3.16 Hotfix [Testing]
Cazzar Jan 29, 2026
ace0908
03.16.3 update
sleepybnuuy Feb 19, 2026
bc3e0f6
0.3.16.4
sleepybnuuy Feb 19, 2026
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
12 changes: 5 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

# Only run this workflow when a tag is pushed when the tag starts with "v".
# Only run this workflow when a tag is pushed when the tag starts with "v0.2.".
on:
push:
tags:
- 'v*'
- 'v0.2.*'

# So we can use the GitHub API to create releases with the run token.
permissions:
Expand All @@ -35,11 +35,11 @@ jobs:
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 7.0.x
dotnet-version: 10.0.x

- name: Download Dalamud Library
run: |
wget https://goatcorp.github.io/dalamud-distrib/latest.zip -O /tmp/dalamud.zip
wget https://goatcorp.github.io/dalamud-distrib/stg/latest.zip -O /tmp/dalamud.zip
unzip /tmp/dalamud.zip -d /tmp/dalamud

- name: Restore Dependencies
Expand All @@ -66,7 +66,7 @@ jobs:
fail_on_unmatched_files: true # If the files arent found, fail the workflow and abort the release.

- name: Upload Artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: Release Artifacts
path: |
Expand All @@ -82,9 +82,7 @@ jobs:

sed -i repo.json -E \
-e 's#"AssemblyVersion": "([0-9]*\.){2,3}[0-9]*"#"AssemblyVersion": "'"$release_version"'"#g' \
-e 's#"TestingAssemblyVersion": "([0-9]*\.){2,3}[0-9]*"#"TestingAssemblyVersion": "'"$release_version"'"#' \
-e 's#"DownloadLinkInstall": "[^"]*"#"DownloadLinkInstall": "'"$repo_url/releases/download/${{ github.ref_name }}/latest.zip"'"#g' \
-e 's#"DownloadLinkTesting": "[^"]*"#"DownloadLinkTesting": "'"$repo_url/releases/download/${{ github.ref_name }}/latest.zip"'"#g' \
-e 's#"DownloadLinkUpdate": "[^"]*"#"DownloadLinkUpdate": "'"$repo_url/releases/download/${{ github.ref_name }}/latest.zip"'"#g'

git add repo.json
Expand Down
10 changes: 6 additions & 4 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,10 @@ jobs:
working-directory: Ktisis/
shell: bash
strategy:
fail-fast: false
matrix:
dotnet-version: [7.0.x] # Can add multiple .NET versions here to test against (For example, testing a new version of .NET before it's released)
dalamud-version: ["latest"] # Can add multiple Dalamud branches here to test against (For example, testing against Dalamud staging)
dotnet-version: [10.0.x] # Can add multiple .NET versions here to test against (For example, testing a new version of .NET before it's released)
dalamud-version: [""] # Can add multiple Dalamud branches here to test against - empty string means live latest.
env:
DALAMUD_HOME: /tmp/dalamud
IsCI: true
Expand All @@ -43,7 +44,8 @@ jobs:

- name: Download Dalamud Library
run: |
wget https://goatcorp.github.io/dalamud-distrib/${{ matrix.dalamud-version }}.zip -O /tmp/dalamud.zip
dalamud_version="${{ matrix.dalamud-version }}"
wget https://goatcorp.github.io/dalamud-distrib/${dalamud_version}${dalamud_version:+/}latest.zip -O /tmp/dalamud.zip
unzip /tmp/dalamud.zip -d /tmp/dalamud

- name: Restore Dependencies
Expand All @@ -56,7 +58,7 @@ jobs:
run: dotnet build -c Release --no-restore --nologo

- name: Upload Artifacts
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: Build Artifacts
path: Ktisis/bin/
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "GLib"]
path = GLib
url = git@github.com:ktisis-tools/GLib.git
1 change: 1 addition & 0 deletions GLib
Submodule GLib added at e6286c
8 changes: 8 additions & 0 deletions Ktisis.sln
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
.editorconfig = .editorconfig
EndProjectSection
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "GLib", "GLib\GLib\GLib.csproj", "{2267C775-9220-4EF5-B146-4FBC5B7499D8}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Expand All @@ -22,6 +24,12 @@ Global
{13C812E9-0D42-4B95-8646-40EEBF30636F}.Release|x64.Build.0 = Release|x64
{13C812E9-0D42-4B95-8646-40EEBF30636F}.External|x64.ActiveCfg = External|x64
{13C812E9-0D42-4B95-8646-40EEBF30636F}.External|x64.Build.0 = External|x64
{2267C775-9220-4EF5-B146-4FBC5B7499D8}.Debug|x64.ActiveCfg = Debug|Any CPU
{2267C775-9220-4EF5-B146-4FBC5B7499D8}.Debug|x64.Build.0 = Debug|Any CPU
{2267C775-9220-4EF5-B146-4FBC5B7499D8}.Release|x64.ActiveCfg = Release|Any CPU
{2267C775-9220-4EF5-B146-4FBC5B7499D8}.Release|x64.Build.0 = Release|Any CPU
{2267C775-9220-4EF5-B146-4FBC5B7499D8}.External|x64.ActiveCfg = Debug|Any CPU
{2267C775-9220-4EF5-B146-4FBC5B7499D8}.External|x64.Build.0 = Debug|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
32 changes: 26 additions & 6 deletions Ktisis/Camera/CameraService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
using System.Collections.Generic;
using System.Collections.ObjectModel;

using Dalamud.Logging;
using Dalamud.Game.ClientState.Objects.Types;

using FFXIVClientStructs.FFXIV.Client.Graphics.Scene;
Expand All @@ -29,7 +28,7 @@ internal static class CameraService {

var camera = GetCameraByAddress((nint)active);
if (camera == null && Override != null) {
PluginLog.Warning("Lost track of active camera! Attempting to reset.");
Ktisis.Log.Warning("Lost track of active camera! Attempting to reset.");
Reset();
camera = GetCameraByAddress((nint)Services.Camera->Camera);
}
Expand Down Expand Up @@ -83,7 +82,7 @@ internal unsafe static void RemoveCamera(KtisisCamera cam) {
return pos;
}

internal static GameObject? GetTargetLock(nint addr) {
internal static IGameObject? GetTargetLock(nint addr) {
if (!Ktisis.IsInGPose || GetCameraByAddress(addr) is not KtisisCamera camera)
return null;

Expand Down Expand Up @@ -133,6 +132,7 @@ private static void CheckFreecam(KtisisCamera? other = null) {
// CameraManager wrappers

internal unsafe static void Reset() {
Ktisis.Log.Debug("Resetting camera");
CheckFreecam();
Override = null;
SetCamera(Services.Camera->Camera);
Expand All @@ -141,12 +141,14 @@ internal unsafe static void Reset() {
private unsafe static void SetCamera(GameCamera* camera) {
if (camera == null) return;
var mgr = CameraManager.Instance();
mgr->CameraArraySpan[0] = &camera->CameraBase.SceneCamera;
mgr->Cameras[0] = &camera->CameraBase.SceneCamera;
}

// Overrides

internal unsafe static void SetOverride(KtisisCamera camera) {
Ktisis.Log.Debug($"Setting camera to {camera.Name}");

CheckFreecam(camera);

if (camera.IsNative || !camera.IsValid()) {
Expand All @@ -164,6 +166,21 @@ internal static void Init() {
CameraHooks.Init();
EventManager.OnGPoseChange += OnGPoseChange;
}

internal static void ChangeCameraIndex(int offset) {
var camera = GetActiveCamera();
if (camera == null)
return;

if (GetFreecam() == camera)
return;

var newIndex = (Cameras.FindIndex(tofind => tofind == camera) + offset) % Cameras.Count;
if (newIndex < 0) // loop back to start.
newIndex = Cameras.Count - 1;

SetOverride(Cameras[newIndex]);
}

internal static void Dispose() {
EventManager.OnGPoseChange -= OnGPoseChange;
Expand All @@ -182,6 +199,9 @@ private unsafe static void OnGPoseChange(bool state) {
var active = (GPoseCamera*)Services.Camera->GetActiveCamera();
if (active != null) {
active->DistanceMax = 20;
active->DistanceMin = 1.5f;
active->YMax = -1.5f;
active->YMin = 1.5f;
active->Distance = Math.Clamp(active->Distance, 0, 20);
}
}
Expand All @@ -199,12 +219,12 @@ private unsafe static void PrepareCameraList() {
}

private unsafe static void DisposeCameras() {
PluginLog.Debug("Disposing cameras...");
Ktisis.Log.Debug("Disposing cameras...");
if (Override != null)
Reset();
foreach (var cam in Cameras)
cam.Dispose();
Cameras.Clear();
}
}
}
}
2 changes: 1 addition & 1 deletion Ktisis/Camera/KtisisCamera.cs
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ public unsafe static KtisisCamera Spawn(GameCamera* clone = null) {
public void SetPositionLock(Vector3? pos) => CameraEdit.Position = pos;
public void SetOffset(Vector3? off) => CameraEdit.Offset = off;

internal GameObject? GetOrbitTarget() {
internal IGameObject? GetOrbitTarget() {
if (!Ktisis.IsInGPose) return null;
return CameraEdit.Orbit != null ? Services.ObjectTable.FirstOrDefault(
actor => actor.ObjectIndex == CameraEdit.Orbit
Expand Down
3 changes: 2 additions & 1 deletion Ktisis/Camera/WorkCamera.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
using SceneCamera = FFXIVClientStructs.FFXIV.Client.Graphics.Scene.Camera;

using Ktisis.Helpers;
using Ktisis.Interface;
using Ktisis.Structs.Input;

namespace Ktisis.Camera {
Expand Down Expand Up @@ -60,7 +61,7 @@ internal unsafe void UpdateControl(MouseState* mouseState, KeyboardState* keySta
}

MoveSpeed = DefaultSpeed;
if (keyState != null) {
if (keyState != null && !Input.IsChatInputActive()) {
if (Ktisis.Configuration.FreecamFast.IsActive(keyState))
MoveSpeed *= Ktisis.Configuration.FreecamShiftMuli;
else if (Ktisis.Configuration.FreecamSlow.IsActive(keyState))
Expand Down
25 changes: 17 additions & 8 deletions Ktisis/Configuration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@
using System.Linq;
using System.Numerics;
using System.Collections.Generic;

using ImGuizmoNET;
using System.IO;

using Dalamud;
using Dalamud.Configuration;
using Dalamud.Game;
using Dalamud.Game.ClientState.Keys;
using Dalamud.Bindings.ImGuizmo;

using Ktisis.Interface;
using Ktisis.Localization;
Expand Down Expand Up @@ -65,6 +66,14 @@ public class Configuration : IPluginConfiguration {
public float SkeletonLineOpacityWhileUsing { get; set; } = 0.15F;
public float SkeletonDotRadius { get; set; } = 3.0F;

//AutoSave
public bool EnableAutoSave { get; set; } = false;
public int AutoSaveInterval { get; set; } = 60;
public int AutoSaveCount { get; set; } = 5;
public string AutoSavePath { get; set; } = Path.Combine(Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments), "Ktisis", "PoseAutoBackup");
public string AutoSaveFormat { get; set; } = "AutoSave - %Date% %Time%";
public bool ClearAutoSavesOnExit { get; set; } = false;

// References
// The reference Key creates a uniqueness constraint for imgui window IDs for each reference.
public Dictionary<int, ReferenceInfo> References { get; set; } = new();
Expand Down Expand Up @@ -108,8 +117,8 @@ public bool IsBoneCategoryVisible(Category category) {

// Gizmo

public MODE GizmoMode { get; set; } = MODE.LOCAL;
public OPERATION GizmoOp { get; set; } = OPERATION.ROTATE;
public ImGuizmoMode GizmoMode { get; set; } = ImGuizmoMode.Local;
public ImGuizmoOperation GizmoOp { get; set; } = ImGuizmoOperation.Rotate;

public SiblingLink SiblingLink { get; set; } = SiblingLink.None;

Expand Down Expand Up @@ -138,15 +147,15 @@ public bool IsBoneCategoryVisible(Category category) {
public bool EnableParenting { get; set; } = true;

public bool LinkedGaze { get; set; } = true;

public bool ShowToolbar { get; set; } = false;

public Dictionary<string, string> SavedDirPaths { get; set; } = new();

// Camera

public float FreecamMoveSpeed { get; set; } = 0.1f;

public float FreecamShiftMuli { get; set; } = 2.5f;
public float FreecamCtrlMuli { get; set; } = 0.25f;
public float FreecamUpDownMuli { get; set; } = 1f;
Expand All @@ -159,7 +168,7 @@ public bool IsBoneCategoryVisible(Category category) {
public Keybind FreecamRight { get; set; } = new(VirtualKey.D);
public Keybind FreecamUp { get; set; } = new(VirtualKey.SPACE);
public Keybind FreecamDown { get; set; } = new(VirtualKey.Q);

public Keybind FreecamFast { get; set; } = new(VirtualKey.SHIFT);
public Keybind FreecamSlow { get; set; } = new(VirtualKey.CONTROL);

Expand Down
67 changes: 67 additions & 0 deletions Ktisis/Data/Excel/BattleNpc.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
using Lumina.Excel;
using Lumina.Excel.Sheets;

using Ktisis.Data.Npc;
using Ktisis.Structs.Actor;
using Ktisis.Structs.Extensions;
using Lumina.Text.ReadOnly;

namespace Ktisis.Data.Excel {
[Sheet("BNpcBase", columnHash: 0xD5D82616)]
public struct BattleNpc(ExcelPage page, uint offset, uint row) : IExcelRow<BattleNpc>, INpcBase {
// Excel
public ExcelPage ExcelPage => page;
public uint RowOffset => offset;
public uint RowId => row;

public float Scale { get; set; }
public RowRef<ModelChara> ModelChara { get; set; }
private RowRef<BNpcCustomizeSheet> CustomizeSheet { get; set; }
private RowRef<NpcEquipment> NpcEquipment { get; set; }

public static BattleNpc Create(ExcelPage page, uint offset, uint row) {
return new BattleNpc(page, offset, row) {
Scale = page.ReadColumn<float>(4, offset),
ModelChara = page.ReadRowRef<ModelChara>(5, offset),
CustomizeSheet = page.ReadRowRef<BNpcCustomizeSheet>(6, offset),
NpcEquipment = page.ReadRowRef<NpcEquipment>(7, offset)
};
}

// INpcBase

public string Name { get; set; } = string.Empty;

public ushort GetModelId()
=> (ushort)this.ModelChara.RowId;

public Customize? GetCustomize()
=> this.CustomizeSheet.RowId != 0 ? this.CustomizeSheet.Value.Customize : null;

public Equipment? GetEquipment()
=> this.NpcEquipment.Value.Equipment;

public WeaponEquip? GetMainHand()
=> this.NpcEquipment.Value.MainHand;

public WeaponEquip? GetOffHand()
=> this.NpcEquipment.Value.OffHand;

// Customize Sheet

[Sheet("BNpcCustomize", columnHash: 0x18f060d4)]
private struct BNpcCustomizeSheet(ExcelPage page, uint offset, uint row) : IExcelRow<BNpcCustomizeSheet> {
public ExcelPage ExcelPage => page;
public uint RowOffset => offset;
public uint RowId => row;

public Customize Customize { get; set; }

public static BNpcCustomizeSheet Create(ExcelPage page, uint offset, uint row) {
return new BNpcCustomizeSheet(page, offset, row) {
Customize = page.ReadCustomize(0, offset)
};
}
}
}
}
Loading