From 5e14c2a178de68148705add977ad8a8d9431d080 Mon Sep 17 00:00:00 2001 From: cosmo Date: Sun, 26 Apr 2026 18:43:24 +0200 Subject: [PATCH] migrate virtual augments to native Daggerheart weapon features and remove legacy injection logic --- module.json | 13 --- packs/000003.log | Bin 11552 -> 0 bytes packs/CURRENT | 1 - packs/LOCK | 0 packs/LOG | 1 - packs/MANIFEST-000002 | Bin 50 -> 0 bytes packs/ikonis-features.json | 12 --- packs/ikonis-features/000003.log | Bin 155006 -> 0 bytes packs/ikonis-features/CURRENT | 1 - packs/ikonis-features/LOCK | 0 packs/ikonis-features/LOG | 1 - packs/ikonis-features/MANIFEST-000002 | Bin 50 -> 0 bytes scripts/ikonis-data.js | 139 +++++++++----------------- scripts/ikonis-sheet.js | 28 +++--- scripts/main.js | 3 + 15 files changed, 62 insertions(+), 137 deletions(-) delete mode 100644 packs/000003.log delete mode 100644 packs/CURRENT delete mode 100644 packs/LOCK delete mode 100644 packs/LOG delete mode 100644 packs/MANIFEST-000002 delete mode 100644 packs/ikonis-features.json delete mode 100644 packs/ikonis-features/000003.log delete mode 100644 packs/ikonis-features/CURRENT delete mode 100644 packs/ikonis-features/LOCK delete mode 100644 packs/ikonis-features/LOG delete mode 100644 packs/ikonis-features/MANIFEST-000002 diff --git a/module.json b/module.json index ea9925c..4977959 100644 --- a/module.json +++ b/module.json @@ -42,18 +42,5 @@ "name": "English", "path": "lang/en.json" } - ], - "packs": [ - { - "name": "ikonis-features", - "label": "Ikonis Features", - "path": "packs/ikonis-features", - "type": "Item", - "system": "daggerheart", - "ownership": { - "PLAYER": "OBSERVER", - "ASSISTANT": "OWNER" - } - } ] } \ No newline at end of file diff --git a/packs/000003.log b/packs/000003.log deleted file mode 100644 index eaab53ff586b5e847362c6ef37d70991d145089b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 11552 zcmeHN%WfP+6m?s%Awj^BwJU8S@I3A;RC{wTirbm_jtyZAA>Em7q;vD=yUJ6b*g@R^ZTo> z$2Dy%{84|kkEW<3j+k1R!_Q>)-tE;YqlL|twZE^l5W@~Z6;ySZNlcVNa?ev~i(u(< z0vS)J3F&xKD4$!|x%$5q}QVKb) zNiBLj`Zf#`rTju>}T&Kp2O)WALKy}*St`O5T+b8KAQu8{S9DJSzW_1$5!1Otea2ZD>d|s|<&J(p! zgei2k5Mj7xgGsf~7R`2t$_8ckRDHDs%nc&6S+o}?==*&R1gIRNwJOg0X)54w9gMl9jOrFLK8v@$skmKFb3GY zhC3V)rm*tgq3;iuE>&C<<#5+$Kxz>c`5gSV`d`sP4?`vd1GpI)o((6Ma#=5qEIdmH z=EUcNgka9+#Blx3FPkqXwaHTv%&!-MV8YXFn)@~pX*l4jbFYcvAVShLm-#B*K9qoN zERiO$6%BC;0k-VK;|VQAjGWLCkjxpY219A7RLJBKTDk43OOH|93xZ+^aD7Z(bx{9@DP&pl7Tt&Bq~d^&jh# zug0}&J#{-_x_k4EKHGFkjcRfC;ksS@Yar6%Dt^4>$$_S%#YDwFXB8h1n#-1E^Ml|U z6^;nLIkWu59~0Vp!(#F{z|!l!Px5|!_35pAxw_2n9#6%Ox9Z?DQSlRzMcp?Z=MGF+ zPoa>3TZO}&e^fXk>lx_1-zMJs2ob-}8-NabDQ{&jmOpq>-r1t)){Q2{)#uAHi z4`}#(pRgU_p30#o8h-HNAkpxHZ5Z(-@sadWF3#pgui?idu!LTYx+CuMO$oi6#iO4W zwddb}g#Y2G=;hT#pqEI&57c_l@FVdaWO)bky@v#QE*mQ4Lj;;=_{r5WsD0|?(+D(! lVW*x#u~hmWH2j2?;ALv(EnuX}4Sl+l&{F&%?U}qq{SOFJ4xj)4 diff --git a/packs/CURRENT b/packs/CURRENT deleted file mode 100644 index 1a84852..0000000 --- a/packs/CURRENT +++ /dev/null @@ -1 +0,0 @@ -MANIFEST-000002 diff --git a/packs/LOCK b/packs/LOCK deleted file mode 100644 index e69de29..0000000 diff --git a/packs/LOG b/packs/LOG deleted file mode 100644 index c51a2fd..0000000 --- a/packs/LOG +++ /dev/null @@ -1 +0,0 @@ -2026/04/26-14:45:07.673032 146fb55fe6c0 Delete type=3 #1 diff --git a/packs/MANIFEST-000002 b/packs/MANIFEST-000002 deleted file mode 100644 index bbbc585686bcbcc33686059c69d80b7b4e1291cd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 50 zcmWIhx#Ncn10$nUPHI_dPD+xVQ)NkNd1i5{bAE0?Vo_pAe$kRS-TOEg7@3$k8JJmE F7y#sj5K{mE diff --git a/packs/ikonis-features.json b/packs/ikonis-features.json deleted file mode 100644 index 9f8c377..0000000 --- a/packs/ikonis-features.json +++ /dev/null @@ -1,12 +0,0 @@ -[ - { "name": "Kinetic Amplifier", "type": "feature", "img": "icons/magic/force/projectile-orb-blue.webp", "system": { "description": "

+1 Damage on Melee attacks.

", "attribution": { "source": "Ikonis Tech" } } }, - { "name": "Thermal Core", "type": "feature", "img": "icons/magic/fire/orb-magma.webp", "system": { "description": "

Deals Fire damage instead of Physical.

", "attribution": { "source": "Ikonis Tech" } } }, - { "name": "Static Coil", "type": "feature", "img": "icons/magic/lightning/bolt-blue.webp", "system": { "description": "

Targets hit are Dazed.

", "attribution": { "source": "Ikonis Tech" } } }, - { "name": "Reactive Plating", "type": "feature", "img": "icons/equipment/chest/breastplate-metal-scaled-silver.webp", "system": { "description": "

+1 Armor while equipped.

", "attribution": { "source": "Ikonis Tech" } } }, - { "name": "Long-Range Optics", "type": "feature", "img": "icons/tools/navigation/spyglass-brass.webp", "system": { "description": "

Increases Range by 1 step.

", "attribution": { "source": "Ikonis Tech" } } }, - { "name": "Precision Chip", "type": "feature", "img": "icons/commodities/tech/circuit-board.webp", "system": { "description": "

+1 to Crit range.

", "attribution": { "source": "Ikonis Tech" } } }, - { "name": "Burst Module", "type": "feature", "img": "icons/magic/fire/explosion-fireball-medium-red-orange.webp", "system": { "description": "

Can target 2 enemies (Half damage).

", "attribution": { "source": "Ikonis Tech" } } }, - { "name": "Siphon Link", "type": "feature", "img": "icons/magic/unholy/strike-body-life-drain-red.webp", "system": { "description": "

Recover 1 Hope on kill.

", "attribution": { "source": "Ikonis Tech" } } }, - { "name": "Gravity Plate", "type": "feature", "img": "icons/magic/air/vortex-wind-blue.webp", "system": { "description": "

Weapon is Heavy (more damage).

", "attribution": { "source": "Ikonis Tech" } } }, - { "name": "Ikonis Bond", "type": "feature", "img": "icons/magic/symbols/rune-sigil-blue-white.webp", "system": { "description": "

This weapon is bonded to your biological signature.

", "attribution": { "source": "Ikonis Tech" } } } -] diff --git a/packs/ikonis-features/000003.log b/packs/ikonis-features/000003.log deleted file mode 100644 index 44878fca125a3a8a5616bd2a4710a0d1276fd23c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 155006 zcmeHwdwe5zb#KP8706A}hQiI|LwoB?D7_S0mNe3gwB!ctwY_V5*WO)wAKuL-8B0G& zvzBJG^YAmvBZY>9EK8EMX-I)W$R&Z&Kq-Y!NJ7eol25p#^aH&lywY$tJQB!lE-kOy z2JZRIQ<{-x$Cfpg>|g#!V$F=6XTIm0?>Xmtz8aZ%_;eRVooD=m|4UtVxuBx5a`}QJ z9cD99Y-MV3aQtXx^!webw8)ncy@MW-#2m`eeYCn(sOqKRl69?#0~YoXkXfPcz3 z$8m{xD#ImWDW;DuOF1Dg)H|5$qv14^erR^-=RFQ?@(Kn?6E)|IzYNH9Uj?TbkXdb>B_WRn zbkyw6%95h!M(MT2Y>^iW$V8-^Ci5mlx&ac9M#g6jBYe*y5d-BajYNK~1n6!7pZRVV z1+^%M2k`m$Bk*zo0ff;-Nl}Foen@{Rc%+OR+;!ku%UjGMwNcc!f9>cjRYv2Mf6l;q0#VSQ2&lK2;b+Vukn+Jgee8=6*UhZN!Bc=YKX-7y=XdYZ!VGZ)x6J~l6jg0iF69S4Vi z=&STR!m$^ICnNagb2t(=kr6*$DPqU6gBAcE1-?X|0wbyhQ4b87PlSWnw)O|Bw5kWK z5Ku#$Img>B!uX5F@NGc9@zGT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kl4pRaR-EH(`}Q8WCVkXs&;; z2>B{$L};Nly1yZ&(@cnZDzEs&I|o4<{clV|tUGMzM!M*XymL^S-#5ze<$cT~I~zyX?HiRX0aa>!f598*+kYL=N0&(9WRcb^8vz_I$vbZTn_$N zgFZThIn@i0TpOHhjtMVtZR=f5&>*KbWB`qlmCAEG^voGeFvef-by*JxqM!=AiX|t^ mQ-~VthKw2dyQFxMWj0}52g!e6$5VhwLr=s^@}G?ug#Z7Pd+B%p diff --git a/packs/ikonis-features/CURRENT b/packs/ikonis-features/CURRENT deleted file mode 100644 index 1a84852..0000000 --- a/packs/ikonis-features/CURRENT +++ /dev/null @@ -1 +0,0 @@ -MANIFEST-000002 diff --git a/packs/ikonis-features/LOCK b/packs/ikonis-features/LOCK deleted file mode 100644 index e69de29..0000000 diff --git a/packs/ikonis-features/LOG b/packs/ikonis-features/LOG deleted file mode 100644 index 5ba48f5..0000000 --- a/packs/ikonis-features/LOG +++ /dev/null @@ -1 +0,0 @@ -2026/04/26-17:05:00.760293 146f67fff6c0 Delete type=3 #1 diff --git a/packs/ikonis-features/MANIFEST-000002 b/packs/ikonis-features/MANIFEST-000002 deleted file mode 100644 index bbbc585686bcbcc33686059c69d80b7b4e1291cd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 50 zcmWIhx#Ncn10$nUPHI_dPD+xVQ)NkNd1i5{bAE0?Vo_pAe$kRS-TOEg7@3$k8JJmE F7y#sj5K{mE diff --git a/scripts/ikonis-data.js b/scripts/ikonis-data.js index ee320c5..6d20a30 100644 --- a/scripts/ikonis-data.js +++ b/scripts/ikonis-data.js @@ -128,112 +128,65 @@ export function patchIkonisLogic() { } /** - * Internal helper to generate and cache virtual features for an actor. - * Safe to call multiple times; uses a cache to keep it fast. + * Synchronizes Ikonis Augments into the Daggerheart Homebrew settings. + * This makes them "Real" Weapon Features to the system. */ -function _injectIkonisFeatures(actor) { - if (!actor || actor._isIkonisInjecting) return []; - - // Initialize the cache if it doesn't exist - if (!actor._ikonisCache) actor._ikonisCache = new Map(); - - const ikonisFeatures = []; - actor._isIkonisInjecting = true; - - try { - const weapons = actor.items.filter(i => i.type === 'weapon'); - const allAugs = getAugments(); +export async function syncIkonisToHomebrew() { + if (!game.user.isGM) return; - for (const item of weapons) { - const isEquipped = item.system.equipped; - const installedIds = item.getFlag('dh-ikonis', 'installedAugments') || []; - const bondedUuid = item.getFlag('dh-ikonis', 'bondedFeatureUuid'); + const MODULE_ID = 'dh-ikonis'; + const homebrewKey = game.settings.settings.has('daggerheart.Homebrew') ? 'Homebrew' : 'homebrew'; + const homebrew = game.settings.get('daggerheart', homebrewKey); + + if (!homebrew.itemFeatures) homebrew.itemFeatures = { weaponFeatures: {}, armorFeatures: {} }; + if (!homebrew.itemFeatures.weaponFeatures) homebrew.itemFeatures.weaponFeatures = {}; - const processFeature = (uuid, type) => { - if (!uuid) return; - - // Extract original feature ID from UUID to build our virtual ID - const featureId = uuid.split('.').pop(); - const virtualId = `ikonis-${item.id}-${featureId}`; + let updates = false; + const allAugments = getAugments(); - // Check cache first - if (actor._ikonisCache.has(virtualId)) { - if (isEquipped) ikonisFeatures.push(actor._ikonisCache.get(virtualId)); - return; + for (const aug of allAugments) { + const feature = _featureCache.get(aug.featureUuid) || await fromUuid(aug.featureUuid); + if (feature && !homebrew.itemFeatures.weaponFeatures[aug.id]) { + console.log(`DH-Ikonis | Registering ${aug.name} as native weapon feature...`); + + // Format actions for the system's Homebrew model + const actions = {}; + if (feature.system.actions) { + for (const [id, action] of Object.entries(feature.system.actions)) { + actions[id] = action.toObject(); } - - // Resolve original and clone - const feature = _featureCache.get(uuid) || fromUuidSync(uuid); - if (feature) { - const featureClone = feature.clone({ parent: actor }, { keepId: true }); - featureClone.system.type = "ikonis"; - Object.defineProperty(featureClone, "id", { value: virtualId, enumerable: true }); - - actor._ikonisCache.set(virtualId, featureClone); - if (isEquipped) ikonisFeatures.push(featureClone); - } - }; - - if (bondedUuid) processFeature(bondedUuid, "bonded"); - for (const id of installedIds) { - const aug = allAugs.find(a => String(a.id) === String(id)); - if (aug?.featureUuid) processFeature(aug.featureUuid, "augment"); } + + homebrew.itemFeatures.weaponFeatures[aug.id] = { + name: aug.name, + img: aug.img || feature.img, + description: feature.system.description, + actions: actions, + effects: Array.from(feature.effects || []).map(e => e.toObject()) + }; + updates = true; } - } catch (err) { - console.error("DH-Ikonis | Error during feature injection:", err); - } finally { - actor._isIkonisInjecting = false; } - - return ikonisFeatures; + + if (updates) { + await game.settings.set('daggerheart', homebrewKey, homebrew); + console.log("DH-Ikonis | Homebrew settings synchronized."); + } } /** - * Patches the Character Data Model to show features in the UI lists. + * Patches the system's weapon data preparation to handle slot counts. + */ +export function patchIkonisLogic() { + // We no longer need to patch Actor.allApplicableEffects + // because the system handles native weapon features automatically. +} + +/** + * Placeholder for character patching - no longer needed for virtual items */ export function patchDhCharacter(DhCharacter) { - console.log("DH-Ikonis | Applying DhCharacter.sheetLists patch..."); - - const descriptor = Object.getOwnPropertyDescriptor(DhCharacter.prototype, 'sheetLists'); - if (!descriptor) { - console.error("DH-Ikonis | FAILED to find sheetLists descriptor on DhCharacter prototype!"); - return; - } - - const originalSheetLists = descriptor.get; - Object.defineProperty(DhCharacter.prototype, 'sheetLists', { - get: function() { - const lists = originalSheetLists.call(this); // This is an Array - if (!this.parent || !Array.isArray(lists)) return lists; - - const ikonisFeatures = _injectIkonisFeatures(this.parent); - - if (ikonisFeatures.length > 0) { - // Add our custom category to the end of the lists array - lists.push({ - title: "Ikonis Augments", - type: "ikonis", - values: ikonisFeatures - }); - } - - return lists; - }, - configurable: true - }); - - // Patch getEmbeddedDocument to resolve our virtual features - const originalGetEmbedded = Actor.prototype.getEmbeddedDocument; - Actor.prototype.getEmbeddedDocument = function(embeddedName, id, options) { - if (embeddedName === "Item" && typeof id === "string" && id.startsWith("ikonis-")) { - if (!this._ikonisCache?.has(id) && !this._isIkonisInjecting) { - _injectIkonisFeatures(this); - } - return this._ikonisCache?.get(id); - } - return originalGetEmbedded.call(this, embeddedName, id, options); - }; + // Injection is deprecated in favor of native weapon features } export function patchDHWeapon() { diff --git a/scripts/ikonis-sheet.js b/scripts/ikonis-sheet.js index ff2d2c0..03b59f3 100644 --- a/scripts/ikonis-sheet.js +++ b/scripts/ikonis-sheet.js @@ -44,18 +44,15 @@ export function patchIkonisSheet() { const doc = this.document; if (!doc) return context; - const installedIds = doc.getFlag('dh-ikonis', 'installedAugments') || []; + const weaponFeatures = doc.system.weaponFeatures || []; const allAugmentsList = getAugments() || []; const processedAugments = []; - for (const id of installedIds) { + for (const featureRef of weaponFeatures) { + const id = featureRef.value; const base = allAugmentsList.find(a => String(a.id) === String(id)); if (!base) continue; const aug = { ...base, installed: true }; - if (aug.featureUuid) { - const item = await getAttachedFeature(aug.featureUuid); - if (item) aug.feature = { name: item.name, img: item.img, uuid: item.uuid }; - } processedAugments.push(aug); } @@ -97,17 +94,18 @@ export function patchIkonisSheet() { // 5. Add custom methods Weapon.prototype._onAddAugment = async function(event, target) { - const installedIds = this.document.getFlag('dh-ikonis', 'installedAugments') || []; + const weaponFeatures = this.document.system.weaponFeatures || []; const allAugments = getAugments(); - const validInstalled = installedIds.filter(id => allAugments.some(a => String(a.id) === String(id))); + // Filter out native features that aren't Ikonis augments if needed, + // but for now we'll just count total weapon features against slots const maxSlots = getSlotCount(this.document); - if (validInstalled.length >= maxSlots) { + if (weaponFeatures.length >= maxSlots) { ui.notifications.warn(`No more augment slots available! (Max: ${maxSlots})`); return; } - const available = allAugments.filter(a => !validInstalled.includes(String(a.id))); + const available = allAugments.filter(a => !weaponFeatures.some(f => f.value === a.id)); const content = `
    @@ -163,16 +161,16 @@ export function patchIkonisSheet() { }); if (res && res !== "cancel") { - const newIds = [...validInstalled, String(res)]; - await this.document.update({ "flags.dh-ikonis.installedAugments": newIds }); + const newFeatures = [...weaponFeatures, { value: res }]; + await this.document.update({ "system.weaponFeatures": newFeatures }); this.render(true); } }; Weapon.prototype._onRemoveAugment = async function(event, target) { - const installedIds = this.document.getFlag('dh-ikonis', 'installedAugments') || []; - const newIds = installedIds.filter(id => id !== String(target.dataset.id)); - await this.document.update({ "flags.dh-ikonis.installedAugments": newIds }); + const weaponFeatures = this.document.system.weaponFeatures || []; + const newFeatures = weaponFeatures.filter(f => f.value !== String(target.dataset.id)); + await this.document.update({ "system.weaponFeatures": newFeatures }); this.render(true); }; diff --git a/scripts/main.js b/scripts/main.js index b80d5f2..45a31fd 100644 --- a/scripts/main.js +++ b/scripts/main.js @@ -120,6 +120,9 @@ Hooks.once('ready', async () => { if (game.settings.get(MODULE_ID, "enableCurrencyOverride")) { await overrideCurrency(); } + + // Sync to Native Homebrew + await syncIkonisToHomebrew(); } await loadIkonisFeatures();