• If you have a mod, tool or prefab, please use the Resources section. Click Mods at the top of the forums.

Adding "Create_item" property to existing item

RivVerta

Refugee
My first mod attempt is to police one's brass after firing a weapon. I'm starting with only the pistol and so far I've tried the modlet approach with:

<append xpath="/items/item[@name=gunPistol]/property[@class=Action0]">

<property name="Create_item" value="resourceBulletCasing"/>

</append>

As well as brute force just seeing if I can get things to work by adding to the game's items.xml the following line in the "gunPistol" item, "Action0" property.

<property name="Create_item" value="resourceBulletCasing"/>

When in game, neither of these approaches seems to do anything. Eventually, once this is working, I'd like to find a way to only collect X% of the spent casings. Maybe with "Create_item_count" (not sure). If anyone could point me in the direction of what I might be missing, or could just break the news to me that this isn't possible I would be grateful!!

Thanks for the time and help!!

 
My first mod attempt is to police one's brass after firing a weapon. I'm starting with only the pistol and so far I've tried the modlet approach with:
<append xpath="/items/item[@name=gunPistol]/property[@class=Action0]">

<property name="Create_item" value="resourceBulletCasing"/>

</append>

As well as brute force just seeing if I can get things to work by adding to the game's items.xml the following line in the "gunPistol" item, "Action0" property.

<property name="Create_item" value="resourceBulletCasing"/>

When in game, neither of these approaches seems to do anything. Eventually, once this is working, I'd like to find a way to only collect X% of the spent casings. Maybe with "Create_item_count" (not sure). If anyone could point me in the direction of what I might be missing, or could just break the news to me that this isn't possible I would be grateful!!

Thanks for the time and help!!
Look up an existing item that has create_item on it already and cross reference it

 
@stallionsden, thanks for the quick response. I forgot to say that I used a couple of items as reference, primarily the various items that give you a glass jar after use (E.g. drinkJarRiverWater) -- although I did go back and look for anything I could have missed originally [i could still be missing something]. It might be worth noting that everything else that uses "Create_item" is either an action of "Eat" or "OpenBundle". Is it possible that unless the action is either "Eat" or "OpenBundle" that "Create_item" is not used?

 
@RivVerta

It may not be best tip but look at darkness fall mod weapons mods. KhaineDB have implemented brass catcher as a weapon modification, works exactly as you would like. 50% basic version, 100% advanced. IF he used vanilla code it just may work :)

Enjoy!

 
@Lako,

Thanks!! That was a great tip. I looked at the brass catcher and although it worked really well unfortunately it isn't vanilla code. Although it did open my eyes to maybe trying to create a [in-game] weapon mod similar to the brass catcher in darkness falls. I doubt I'll have any luck but that's the next place I'm going to try.

 
Back
Top