Fixing a mod artifact item

Hey, got an item here, and it’s supposed to have an internal power supply that’s charged up by it’s own internal Joint Torsion Ratchet. It’s also supposed to apply a few debuffs when off and on, and the invisibility buff when it is on. Hoping someone can tell me how to get it working correctly, here’s the JSON:

  {
"id": "acs_74_stealth_cloak_off",
"type": "TOOL_ARMOR",
"name": { "str": "ACS-74 stealth cloak" },
"description": "An experimental cloak that uses a highly sophisticated network of cameras and LEDs to render the user fully invisible.  It is powered by built-in torsion ratchets.  Due to particularities of its construction, it is very difficult to move in, hampering wearer's strength, dexterity and movement speed.",
"weight": "1556 g",
"volume": "3 L",
"price": 8400000,
"to_hit": -1,
"phase": "solid",
"material": [ "superalloy", "plastic" ],
"symbol": "[",
"color": "light_gray",
"covers": [ "torso", "head", "arm_l", "arm_r", "leg_l", "leg_r" ],
"coverage": 75,
"encumbrance": 15,
"warmth": 15,
"material_thickness": 1,
"environmental_protection": 4,
"max_charges": 100,
"initial_charges": 5,
"artifact_data": { "charge_type": "ARTC_TIME", "effects_worn": [ "AEP_STR_DOWN", "AEP_DEX_DOWN", "AEP_SPEED_DOWN" ] },
"use_action": { "active": true, "need_charges": 1, "need_charges_msg": "The stored energy has run dry.", "menu_text": "Activate Cloaking", "target": "acs_74_stealth_cloak_on", "msg": "You turn on your cloak.", "type": "transform" },
"flags": [ "OVERSIZE", "HOOD", "WATERPROOF", "OUTER", "VARSIZE" ]

},

Let me know!

artifact_data doesn’t do anything anymore, you’l need to update it to relic_data. doc here https://github.com/CleverRaven/Cataclysm-DDA/blob/54596a7b83c8a6084a69d8eb395c8fc049ceeb07/doc/ARTIFACTS.md

I see, it looks like the newer system doesn’t allow for an item anything like this. That’s unfortunate.

I’m not sure about the “own internal Joint Torsion Ratchet”, but I’d assume that for the artifact effects you could add the relic_data as it can be found on artifact in the save file, like

"relic_data": {
  "passive_effects": [ ... ]
  },

and add probably the debug invisibility mutation to it.

Let me see if I can find the right values and write something up quickly.

Edit:
Before I went to test my code, I’ve actually decided to look up the item id, in so I can try it directly with the on/off settings. Turns out, there’s already a version that does use relic_data.
So… instead of my version, here’s the item you’re looking for and the related effect of it.

Yeah, that’s the one I’m trying to fix, it doesn’t work.

I’ve just downloaded the newest version of the Mod-Compilation and tested it in experimental build 0.E-10973, spawning in the cloak and wearing it applies the stats debuff and the invisibility fine (my character can walk right past a zombie and it can’t see me)…

The only thing that changed was that it no longer has to be activated to work and is basically “always on”.

Since it does for me… Explain. What doesn’t work?

Interesting as it did none of that for me, I’ll check what version I’m on when I get off work I guess.

@Grimm_Spector, any news on that front? Were you able to get it to do what it’s supposed to?