Open MajorCooke opened 1 year ago
0.10 is taking long enough already so I don't think this is going in the next version, but I'll think about it. I'd rather have a lump-based approach (rather than a service class) so that mods that are entirely DECORATE-based can easily add GB compatibility hooks, even if that does sacrifice some flexibility.
The BONSAIRC lump already exists for weapon compatibility tweaking, so I think the question here is less "should I add monster XP tweakables" (I think that sounds like a good idea regardless) and more "should I add that feature to BONSAIRC or should I replace BONSAIRC with a new ZJSON-based format".
JSON format is a highly configurable way to implement custom readable objects/arrays/properties, designed for ease of use and implementation. ZJSON has been developed for ZScript which could be useful for, say, defining how much experience monsters give on death/damage.
Alternatively, making use of Service class can work as well, it'd simply require a bit of templating with the service class itself to minimize efforts by those that wish to add things in. I wrote an example. (Not tested, there might be a few errors to correct before it starts up, was just a quick WIP.)
All that's needed for modders is just to copy/paste the
PlaceHolder_BonsaiXPService
class into their own mods, rename the prefix and add the monster classes according to the syntax ofmons[]
. You simply incorporate the functions/BonsaiXPRecord
I provided and modify your XP giving to your system.I'm well aware the system is based on damage dealt instead of on death, but having on death would be nice.