Adding in new items

I’m trying to add in a claymore (the sword) that can function like a flashlight, as in I can activate it and make light, but couldn’t figure it out. I know more or less how to make items, I have made a new suit of power armor, but when I made the claymore and tried to play the game crashed.

Can someone make me an item that can function like a flashlight?

…Why would you want a sword that functioned like a flashlight. Its all in taste, I suppose. You can do it with the Catamodder, just make a new item in melee and give it the flashlight function when activated.

Find all the places that flashlight is located, copy it, then change the pasted text to say something like claymore. You will have to copy at least 2 places (flashlight on and flashlight off).