Eranziel / foundryvtt-lancer

A Foundry VTT game system for LANCER RPG.
GNU General Public License v3.0
106 stars 64 forks source link

[REFACTOR] Macro Cleanup and De-duplication #374

Open mason-bially opened 2 years ago

mason-bially commented 2 years ago

This is a tracking issue for macro cleanup and de-duplication that can be done to improve macro code readability and understand-ability.

As an example of what this is aimed to fix:

Related issues:

mason-bially commented 2 years ago

I think most of the *MacroData interfaces could be moved into their relevant macro files. Most of them are never invoked outside of their prepare*Macro / roll*Macro pairs, and when they are those pairs are being imported anyway.

mason-bially commented 2 years ago

Okay so NPCs don't have activation chips. They have tags that say "quick action" (and tags can be dragged, though we should probably reject putting them on the hot bar).

mason-bially commented 2 years ago

So currently the prepareItemMacro leads to some weird behavior on the hot bar. Consider this scenario:

I think the last two cases are in need of massaging if the second is going to be an intended feature.

It's possible this is a scenario where automation settings might be useful in determining the outcome (re: automation feature off, always actor A, automation feature on, 4 different outcomes (of which 2 I imagine would be error messages)).

mason-bially commented 2 years ago

So where I am thinking is limiting the space of public macros to this:

In theory these should be all the public facing macros that would be required (e.g. generated hot bar macros, custom user macros, and token action HUD), besides some for like "full repair" and "short rest".

From there letting users access various pieces of the internal macro functionality (stabilize, take structure, take stress) can be more "internal and subject to change".

mason-bially commented 2 years ago

Work left to do since PR #375 got merged: