Adding new item template properties?
Posted: Thu May 06, 2021 12:39 am
Someone taught me that the Repair service can repair virtually all items, not just equipment. I took a look, and indeed, only arrows are filtered out.
https://github.com/Interkarma/daggerfal ... ow.cs#L803
For vanilla Daggerfall, this is not really an issue, since only equipment can have its condition reduced, and therefore everything else will always have full condition.
But with mods involved, I'm wondering if we shouldn't have a way to let mods disable the repair service.
At first, I thought of going into the ItemTemplate type and adding a new field, that mods could change in their ItemTemplates.json. However, I realized that the ItemTemplate fields are based strictly on the data in FALL.EXE. I wasn't sure adding new fields there would be the right approach.
Any ideas on how else you would do it? Maybe we could have extra fields in ItemHelper to go along with RegisterCustomItem and the rest, but I wouldn't want to add a new function there for every other item template property we might want to add in the future.
https://github.com/Interkarma/daggerfal ... ow.cs#L803
For vanilla Daggerfall, this is not really an issue, since only equipment can have its condition reduced, and therefore everything else will always have full condition.
But with mods involved, I'm wondering if we shouldn't have a way to let mods disable the repair service.
At first, I thought of going into the ItemTemplate type and adding a new field, that mods could change in their ItemTemplates.json. However, I realized that the ItemTemplate fields are based strictly on the data in FALL.EXE. I wasn't sure adding new fields there would be the right approach.
Any ideas on how else you would do it? Maybe we could have extra fields in ItemHelper to go along with RegisterCustomItem and the rest, but I wouldn't want to add a new function there for every other item template property we might want to add in the future.