[ian-reeds-games] for Craig: scripting suggestions

  • From: Carlos Macintosh <sleepio1@xxxxxxxxxxx>
  • To: ian-reeds-games@xxxxxxxxxxxxx
  • Date: Sun, 22 Feb 2015 04:13:21 -0500

Hi, I have some scripting suggestions that would really extend the power of scripting without being of too much effort I think. 1: Give map, unit, effect, skill, item and point objects a Flags list that contains all normal flags on the unit as key-value pairs. I was thinking you could just grab the keys and values from the individual files themselves. It only has to be read-only so that I can act on what the flag contains. My idea is to create a damage reflection flag that reflects damage based on the skill used on it. Skills with stronger health_inflict flags would reflect more damage. But the possibilities are endless really. 2. add on_item_equipped and on_item_unequipped events that we could tie to scripts. This would allow items to grant permanent effects when equipped, then remove the effects when unequipped. It could also be used to mod maximums of each point such as a breastplate of constitution that gave +50 extra health. 3. Create a shared.removeEffect(unit u, tile t, effect e) function that searches for the effect e on unit u and tile t, and removes it, applying the effect_removed event of course. 4. Create a unit.damageUnit(unit u, int amount, damageType t) which would deal amount damage to unit u using damage type t, factoring in protections that target unit u has, and inflict mods that source unit u has. All of these will really be beneficial in my current map pack project. Please consider allowing the engine to support these flags!


Other related posts: