#creating proficient items

1 messages ยท Page 1 of 1 (latest)

narrow girder
#

@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 ๐Ÿ™‚

gentle bane
#

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

stoic socket
#

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)
narrow girder
#

This actor isn't proficient in simple weapons I take it?

gentle bane
#

Ah I see. Indeed not proficient in simple weapons.

narrow girder
#

Hmmmm

#

alright i'll open a ticket about this

stoic socket
#

that makes sense

gentle bane
narrow girder
#

for the fun of it @gentle bane try this without "weaponType": "simpleM",

stoic socket
#

that appears to be the schema default

#

the above warpgate script creates simple weapons

narrow girder
#

does the warpgate way suffer the same fate?

stoic socket
#

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

narrow girder
#

k

narrow girder
gentle bane
#

give me a moment to double check it

stoic socket
#

i do not think it does

#

...ok, that's supposed to indicate its a "PC"

gentle bane
#

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!!!

stoic socket
#

what actor are you putting it on?

gentle bane
#

linked

stoic socket
#

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

gentle bane
#

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...)

narrow girder
#

alright, issue created, we'll get to it when we get to it. thanks for raising this ๐Ÿ™‚