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

API for third party code to manage mods and file replacements #5

Open
2 of 9 tasks
NotAdam opened this issue Sep 2, 2020 · 8 comments
Open
2 of 9 tasks

API for third party code to manage mods and file replacements #5

NotAdam opened this issue Sep 2, 2020 · 8 comments
Labels
enhancement New feature or request proposal

Comments

@NotAdam
Copy link
Contributor

NotAdam commented Sep 2, 2020

Ideally other plugins can also register their own replacements if Penumbra exists, though this is likely dependant on the Dalamud rewrite where we should have a better think about how this could work, but ideally we can support the following scenarios:

  • Replace a file with a globally lower priority than any user modpacks
    • for example, this would only replace a file if a user modpack didn't replace it
  • Replace a file with a higher priority than modpacks

current plan

  • basic http api
  • retrieve mods and their files
  • create new mods
  • add files/delete files from a mod
  • manage mod priorities
  • manage conflicts
  • delete mods
  • export mods
  • add non-mod related file replacements (eg, testing file edits from an external program such as vfxeditor/umbra)
@NotAdam NotAdam added enhancement New feature or request proposal labels Sep 2, 2020
@NotAdam NotAdam changed the title API for other dalamud plugins to add their own resource substitutions API for third party code to manage mods and file replacements Jan 14, 2021
@AncientAzem
Copy link
Contributor

So I noticed the basic HTTP api is checked off in this list. Out of sheer curiosity what is the extend of that API?

@NotAdam
Copy link
Contributor Author

NotAdam commented Aug 22, 2021

literally nothing of use lol

@AncientAzem
Copy link
Contributor

That's what I thought but was curious none the less 😅

@y2-ss
Copy link

y2-ss commented Sep 10, 2021

While it's not specifically related to mod/file management, would supporting character redraws events (sending/receiving) be in the scope for the API?

@Ottermandias
Copy link
Collaborator

It's not part of the HTTP API (because I have no idea where Adam was going with that and thus there wasn't any progress made on that :D) but it is part of the extracted API I did for Glamourer, and part of the IPC-API in API4. So queuing redraws from another plugin would be possible from API4 on. Firing IPC events when redrawing would also be easily addable.
What's your goal here?

@y2-ss
Copy link

y2-ss commented Sep 10, 2021

I'm working on a plugin that changes customization and orientation values of Players for role-playing purposes, and some of these values changes, like position, rotation, and scale, are lost when Penumbra redraws characters. Right now my plugin only applies these by just a manual command, but being able to apply them after a Penumbra redraw would be a goal.

@Ottermandias
Copy link
Collaborator

Regarding applying customization values, check out Glamourer on my repos.
I can probably add a IPC listener to the plugin that gets fired when a redraw is started or finalized. Probably easiest to add what you want if you ping me in discord. Though I'm mostly unavailable the next few days.

@AncientAzem
Copy link
Contributor

AncientAzem commented Oct 10, 2021

Hey there! If this isn't something that someone is actively working on I would love to start working on it bit by bit. I've spent some time poking around the codebase and it's something I am willing to take a stab at.

Edit: This probably isn't much but I decided to poke around a bit for fun this afternoon and expanded the existing HTTP API with some more functionality. It's all over in https://github.com/DevJinnial/Penumbra/tree/web-api-expansion if anyone wanted to take a look. Didn't want to submit a PR yet since I am still working on it but thought I would update this message with it.

Sebane1 pushed a commit to Sebane1/Penumbra that referenced this issue Sep 22, 2023
^ This is the 1st commit message:

Add support for the DalamudSubstitutionProvider for textures.

^ The commit message xivdev#2 will be skipped:

^ Cleanup.

^ The commit message xivdev#3 will be skipped:

^ Add drag & drop to texture import.

^ The commit message xivdev#4 will be skipped:

^ 0.7.3.0

^ The commit message xivdev#5 will be skipped:

^ [CI] Updating repo.json for 0.7.3.0

^ The commit message xivdev#6 will be skipped:

^ Temporarily not use dalamud function because it is not available in release yet.

^ The commit message xivdev#7 will be skipped:

^ [CI] Updating repo.json for 0.7.3.1

^ The commit message xivdev#8 will be skipped:

^ Add Asset Compiler tab
^
^ Add Loose Texture Compiler Core
^
^ Submodule changes
^
^ Correct text
^
^ Add custom path function.
^
^ Refactor name to asset compiler
^
^ Right align buttons. Store project files outside of the folder of the currently selected mod.
^
^ Add Simple Mode
^
^ Fix issue with simple mode not clearing itself.
^
^ Update constructors
^
^ Add modifier keys to filepicker clearing buttons.
^
^ Submodule changes
^
^ Minor cleanup
^
^ Adjust event names
^
^ Fix project persistence.
^
^ Add a cap to how many texture sets can exist.
^
^ Only save project if asset compiler tab is actually used.
^
^ Submodule updates
^
^ Remove incomplete class.
^
^ Add Drag And Drop, add bulk name replacement.

# The commit message xivdev#9 will be skipped:

# Attempt to fix some texture errors.

# The commit message xivdev#10 will be skipped:

# Get penumbra to compile again.

# The commit message xivdev#11 will be skipped:

# Submodule update

# The commit message xivdev#12 will be skipped:

# Disable UI for textures when converting.

# The commit message xivdev#13 will be skipped:

# Update DirectXTex/OtterTex

# The commit message xivdev#14 will be skipped:

# Keep the texture alive during write.

# The commit message xivdev#15 will be skipped:

# [CI] Updating repo.json for 0.7.3.2

# The commit message xivdev#16 will be skipped:

# Explain comment.

# The commit message xivdev#17 will be skipped:

# Add some unnamed mounts to actor identification.

# The commit message xivdev#18 will be skipped:

# Material editor: improve color accuracy

# The commit message xivdev#19 will be skipped:

# Material editor: live-preview changes

# The commit message xivdev#20 will be skipped:

# Material editor 2099

# The commit message xivdev#21 will be skipped:

# Material editor: better color constants

# The commit message xivdev#22 will be skipped:

# Update GameData

# The commit message xivdev#23 will be skipped:

# Material editor: Allow negatives again with R²G²B²
#
# There seems to be people using it.

# The commit message xivdev#24 will be skipped:

# Material editor: tweak colorset highlighting
#
# Make the frequency framerate-independent, set it to 1 Hz, and decrease the dynamic range.
#
# Thanks @StoiaCode for feedback!

# The commit message xivdev#25 will be skipped:

# Material editor: tear down previewers bound to a CharacterBase that goes away

# The commit message xivdev#26 will be skipped:

# Add a few texture manipulation tools.

# The commit message xivdev#27 will be skipped:

# Small cleanup, auto-formatting.

# The commit message xivdev#28 will be skipped:

# Textures: Un-merge save buttons, make ignore unselectable

# The commit message xivdev#29 will be skipped:

# Textures: Renumber CombineOps.
#
# Positive values in this enum also double as indices into the labels and tooltip arrays.
#
# (confirmed skill issue moment)

# The commit message xivdev#30 will be skipped:

# Textures: Automatic resizing

# The commit message xivdev#31 will be skipped:

# Textures: Add a matrix preset that drops alpha

# The commit message xivdev#32 will be skipped:

# Textures: PR xivdev#327 feedback

# The commit message xivdev#33 will be skipped:

# Textures: PR xivdev#327 feedback

# The commit message xivdev#34 will be skipped:

# Textures: Refactor resizing code

# The commit message xivdev#35 will be skipped:

# Textures: Simplify away _targetPixels

# The commit message xivdev#36 will be skipped:

# Slight restructuring.

# The commit message xivdev#37 will be skipped:

#  Skin Fixer (fixes modding of skin.shpk)

# The commit message xivdev#38 will be skipped:

# Skin Fixer: Make resolving skin.shpk for new draw objects async

# The commit message xivdev#39 will be skipped:

# Skin Fixer: Fix potential ref leak + add SRH
#
# `SafeResourceHandle` wraps a `ResourceHandle*` with auto `IncRef` / `DecRef`, to further help prevent leaks.

# The commit message xivdev#40 will be skipped:

# Use better event in SkinFixer and some cleanup.

# The commit message xivdev#41 will be skipped:

# Remove Finalize from FileEditor.

# The commit message xivdev#42 will be skipped:

# Some formatting in Materials.Shpk.

# The commit message xivdev#43 will be skipped:

# Small cleanup in ResolveContext.

# The commit message xivdev#44 will be skipped:

# Auto-formatting and some cleanup.

# The commit message xivdev#45 will be skipped:

# Restructure Live Preview.

# The commit message xivdev#46 will be skipped:

# Fix slash direction in material path.

# The commit message xivdev#47 will be skipped:

# [CI] Updating repo.json for testing_0.7.3.3

# The commit message xivdev#48 will be skipped:

# Fix newtonsoft not playing well with records with strings.

# The commit message xivdev#49 will be skipped:

# Cleanup

# The commit message xivdev#50 will be skipped:

# Check for drawObject != null before invoking draw object created event.

# The commit message xivdev#51 will be skipped:

# Fix variant gamepath.

# The commit message xivdev#52 will be skipped:

# Material editor: use a SafeHandle for texture swapping

# The commit message #53 will be skipped:

# Material editor: Customizable highlight color

# The commit message xivdev#54 will be skipped:

# Material editor: Vector field spacing

# The commit message xivdev#55 will be skipped:

# Fix compiler warning

# The commit message xivdev#56 will be skipped:

# [CI] Updating repo.json for testing_0.7.3.4

# The commit message xivdev#57 will be skipped:

# Resource Tree: Improve mtrl and sklb support

# The commit message xivdev#58 will be skipped:

# Resource Tree: Deduplicate nodes, add skp

# The commit message xivdev#59 will be skipped:

# Resource Tree: Add ChangedItem-like icons, make UI prettier

# The commit message xivdev#60 will be skipped:

# Resource Tree: Make skp child of sklb

# The commit message xivdev#61 will be skipped:

# Resource Tree: Fix shared model fold state

# The commit message xivdev#62 will be skipped:

# Some auto-formatting and ROS iteration for lookups.

# The commit message #63 will be skipped:

# Resource Tree: Use `/`s for game actual paths

# The commit message xivdev#64 will be skipped:

# Skin Fixer: Switch to a passive approach.
#
# Do not load skin.shpk for ourselves as it causes a race condition.
# Instead, inspect the materials' ShPk names.

# The commit message xivdev#65 will be skipped:

# Some formatting, use ConcurrentSet explicitly for clarity.

# The commit message xivdev#66 will be skipped:

# [CI] Updating repo.json for testing_0.7.3.5

# The commit message xivdev#67 will be skipped:

# Add Emotes to Changed Items.

# The commit message xivdev#68 will be skipped:

# [CI] Updating repo.json for testing_0.7.3.6

# The commit message xivdev#69 will be skipped:

# Fix changed item flags for emotes.

# The commit message #70 will be skipped:

# Update GameData for new parsing.

# The commit message xivdev#71 will be skipped:

# Fix CS update creating ambiguous reference.

# The commit message xivdev#72 will be skipped:

# Add Player and Interface to quick select collections and rework their tooltips and names slightly.

# The commit message xivdev#73 will be skipped:

# [CI] Updating repo.json for testing_0.7.3.7

# The commit message xivdev#74 will be skipped:

# Allow drag & drop of multiple mods or folders with Control.

# The commit message xivdev#75 will be skipped:

# [CI] Updating repo.json for testing_0.7.3.8

# The commit message xivdev#76 will be skipped:

# Fix click check for selectables.

# The commit message xivdev#77 will be skipped:

# [CI] Updating repo.json for testing_0.7.3.9

# The commit message xivdev#78 will be skipped:

# Add Filesystem Compression as a toggle and button. Also some auto-formatting.

# The commit message xivdev#79 will be skipped:

# [CI] Updating repo.json for testing_0.7.3.10

# The commit message xivdev#80 will be skipped:

# Add Compacting to API AddMod.

# The commit message xivdev#81 will be skipped:

# Add key checks to restoring from backup or deleting backups.

# The commit message xivdev#82 will be skipped:

# Material Editor: Split ColorTable apart from ColorSet

# The commit message xivdev#83 will be skipped:

# GameData Commit.

# The commit message xivdev#84 will be skipped:

# Auto Formatting.

# The commit message xivdev#85 will be skipped:

# Use System global usings.

# The commit message xivdev#86 will be skipped:

# Make line endings explicit in editorconfig and share in sub projects, also apply editorconfig everywhere and move some namespaces.

# The commit message xivdev#87 will be skipped:

# ResourceTree improvements + IPC
#
# - Moves ResourceType enum out of GameData as discussed on Discord ;
# - Adds new color coding for local player and non-networked objects on On-Screen ;
# - Adds ResourceTree-related IPC ;
# - Fixes xivdev#342.

# The commit message xivdev#88 will be skipped:

# ResourceTree IPC: Remove mergeSameCollection.

# The commit message xivdev#89 will be skipped:

# ResourceTree: Avoid enumerating the whole object table in some cases

# The commit message #90 will be skipped:

# Move IPC Arguments around.

# The commit message xivdev#91 will be skipped:

# Rename ResourceType file.

# The commit message xivdev#92 will be skipped:

# Remove enums folder from csproj?!

# The commit message xivdev#93 will be skipped:

# Fix params bug.

# The commit message #94 will be skipped:

# Api nuget version.

# The commit message xivdev#95 will be skipped:

# Add load state to resource watcher.

# The commit message xivdev#96 will be skipped:

# [CI] Updating repo.json for testing_0.7.3.11

# The commit message xivdev#97 will be skipped:

# Add CalculateHeight Hook

# The commit message xivdev#98 will be skipped:

# ResourceTree: Reverse-resolve in bulk

# The commit message xivdev#99 will be skipped:

# Remove some allocations from resource tree.

# The commit message xivdev#100 will be skipped:

# Update OtterGui.

# The commit message xivdev#101 will be skipped:

# Fix ambiguous reference for no fucking reason.

# The commit message xivdev#102 will be skipped:

# [CI] Updating repo.json for testing_0.7.3.12

# The commit message xivdev#103 will be skipped:

# Add automatic restore from backup for sort_order and active_collections for now.

# The commit message xivdev#104 will be skipped:

# Material Editor: Extend live preview.

# The commit message xivdev#105 will be skipped:

# Optimize ResourceTree somewhat.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request proposal
Projects
None yet
Development

No branches or pull requests

4 participants