xivdev / Penumbra

FINAL FANTASY XIV modding, but actually good this time
612 stars 117 forks source link

[Feature] Per-character VFX replacements via action reading #181

Open thetrueyoshifan opened 2 years ago

thetrueyoshifan commented 2 years ago

Apologies for my last issue; I was an idiot and did not read. You've probably gotten a lot of those, and I'm sorry I contributed to it.

I had an idea for how the per-character VFX replacement could potentially work, at least for some VFX. Assuming that there is a way to read players' actions before the VFX is loaded+drawn, you could theoretically catch each monitored character, and choose to set up a collection of VFX mods based on the collection defined by the monitored character. This could get very laggy, depending on the amount of operations needed (especially if you have a lot of mods), but it could potentially at least allow for the feature to work. The way I assume it would work is this:

This could also work for animations, although they might load completely differently; admittedly, I'm not too knowledgeable in how and when FFXIV loads resources for animations and VFX, although I'd like to be. This might also be a performance nightmare, but I'm sure there are optimizations that could be performed to at least make it somewhat reasonable. Limiting the actions that trigger Penumbra to class/role actions might help. I might try tackling this in a fork to see what I can do, and I'll PR it if I make any progress.

Ottermandias commented 2 years ago

The extreme revamp I am currently working on will possibly work with character-based animation. This works by connecting draw objects to game objects (the game only has game object -> draw object information), and then keeping tab of when draw objects request files (path requests for files are issued by draw objects). I don't have animation mods, so I haven't tested it, but .pap files go through the draw object at least, so that's a good guess. You can find compiled dlls of a earlier iteration on the current rework in the goat's place discord in the plugin-testing channel.