PDA

View Full Version : Adding new fields to items



gnujak
August 11th, 2018, 18:00
I want to add some new fields to items for a homebrew addition to dnd 5e ruleset. I figured out how to add them in the record_item.xml but I'm having problems with them displaying on every item now. I want them to only show when that item has those properties filled. For instance if you don't have the weight property filled in on an item it doesn't show weight but if you have it filled in it shows on the item window. Any suggestions?

Trenloe
August 11th, 2018, 18:04
Look at the LUA script file attached to the item record in XML. This will have code that sets the fields invisible if there is no data in them. You'll need to add the new controls to this code.

gnujak
August 11th, 2018, 20:37
Thanks, I can't believe I missed that script. I was looking in the scripts sub folder not the campaign/scripts.