Additional Effect on Items
Posted: Wed Oct 16, 2013 11:06 pm
This may be the wrong place to do this but I have a question.
Given that hard-coded items for additional effects makes me CRINGE. I'm looking to rewrite the additional effect system on weapons|items to make it more modular. I've already reworked a lot of the logic but I got to thinking, would it be better to script the logic instead of hardcoding? For example, like a lua call to onAdditionalEffect call for the item.lua in scripts/globals/items for each individual item or just having a mod flag like EFFECT_DEFENSE_DOWN, that runs logic for defense down on additional hit. Hardcoded leaves less flexibility... I also know there is already an additional effect in the item_weapon object but its not used. I dunno, like most code, there are ten different ways to write the same thing. Scripts, however, would be the most modular and flexible. Hardcoded item mods would be second best. And the options degrade there into hard-coding the very items themselves, which as I said, makes me feel sick. What would the project prefer in terms of submission?
Let me know, I'll write it.
Given that hard-coded items for additional effects makes me CRINGE. I'm looking to rewrite the additional effect system on weapons|items to make it more modular. I've already reworked a lot of the logic but I got to thinking, would it be better to script the logic instead of hardcoding? For example, like a lua call to onAdditionalEffect call for the item.lua in scripts/globals/items for each individual item or just having a mod flag like EFFECT_DEFENSE_DOWN, that runs logic for defense down on additional hit. Hardcoded leaves less flexibility... I also know there is already an additional effect in the item_weapon object but its not used. I dunno, like most code, there are ten different ways to write the same thing. Scripts, however, would be the most modular and flexible. Hardcoded item mods would be second best. And the options degrade there into hard-coding the very items themselves, which as I said, makes me feel sick. What would the project prefer in terms of submission?
Let me know, I'll write it.