#creating proficient items
1 messages ยท Page 1 of 1 (latest)
@gentle bane can you show us what methods you're using to create said items?
if it fits, pasting the whole macro in here would be helpful ๐
That is an example (bit updated) from the Midi-SRD sample Item Spiritual Weapon, that creates a Summoned Item on the actor's inventory.
Before it would give it proficiency automatically.
More specifically js await tactor.createEmbeddedDocuments("Item", [ { "name": "Summoned Spiritual Weapon", "type": "weapon", "data": { "equipped": true, "identified": true, "activation": { "type": "bonus", }, "target": { "value": 1, "width": null, "type": "creature" }, /* "range": { "value": 5, "units": "ft" },*/ "ability": args[2], "actionType": "msak", "attackBonus": "0", "chatFlavor": "", "critical": null, "damage": { "parts": [ [ `${damage}d8+@mod`, "force" ] ], }, "weaponType": "simpleM", "proficient": true }, "flags": { "DAESRD": { "SpiritualWeapon": target.actor.id } }, "img": `${image}`, "effects" : [] }] );
the line "proficient": true used to do the trick, but not anymore
So this is called via a DAE macro.ItemMacro so it might not be the most straightforward case of programmatically creating an item, but I guess the main creation part should be the same
if you can stand a warpgate macro, this demonstrates this issue as a standalone macro.
const updates = {
embedded: { Item: {
"Proficient Weapon": {
type:"weapon",
proficient: "true",
},
"Non-Proficient Weapon": {
type:"weapon",
proficient: "false"
}
}
}
}
warpgate.mutate(token.document, updates)
I think the problem is that proficient gets completely overridden now:
https://gitlab.com/foundrynet/dnd5e/-/blob/master/module/item/entity.js#L1646
An implementation of the Dungeons & Dragons 5th Edition game system for Foundry Virtual Tabletop (http://foundryvtt.com). This work is permitted under the Open...
This actor isn't proficient in simple weapons I take it?
Ah I see. Indeed not proficient in simple weapons.
that makes sense
Thanks.
for the fun of it @gentle bane try this without "weaponType": "simpleM",
that appears to be the schema default
the above warpgate script creates simple weapons
does the warpgate way suffer the same fate?
it does, yea, the above script produces both weapons as proficient or not depending on the actor's proficiencies
NPCs are always proficient, PCs are conditional
k
give this your ๐ s
https://gitlab.com/foundrynet/dnd5e/-/issues/1349
Without works
wait waaaaat
give me a moment to double check it
So commenting out the line "weaponType": "simpleM", in the first I provided, it respects the "proficient": true and by default chooses the Simple Melee as weapon type.
I have to say that I havent slept much and might be doing something really wrong, so let me try that 10 more times!!!
what actor are you putting it on?
check that they do not have simple weapon proficiency
i just tried on a sorcerer (no simple weapons prof) and the above image was generated
You are right!!! Sorry
fml I was just trying on the actor I changed to be prof in Simple weapons after Calego asked me about that...
On my defence I will just say again what I said before:
I have to say that I havent slept much and might be doing something really wrong, so let me try that 10 more times!!!
(goes to hide...)
alright, issue created, we'll get to it when we get to it. thanks for raising this ๐