GetEntityRegenTimer, DidAttack, TookDamage, DamageFlash
Posted: Sat May 13, 2017 2:39 pm
DamageFlash would flash the screen like a player just took damage, to allow for other warnings, like for mods that add food or water or other hazards. Add a color tint would be great as well. (Green is hunger, blue is oxygen, red is damage). Also could be used for an indicator when the entity has shields, which normally suppresses the warning.
Regen Timer - When did this entity last take damage/fire a weapon/built-in weapon. (Read-write) (Need access to regen rate and delay stats in Prototype)
The regen timer would let us interact with regeneration, having some events/constant actions interupt regeneration, or cause it to resume faster. If you set it to the future, it will delay, even if the entity normally has constant regeneration.
event for damage. (Include source, target, damage dealt (read-write), armor of target(Or just use the prototype data), Weapon (As item, equipment, or entity), and ammo (weapon), script (mod-name? Key?)
Register damage, and allow custom mitigation or damage models. Make an entity take damage to it's power supply, or move when it takes damage, or something. Direct damage to adjacent entities instead. Or, allow modules that alter effective armor, like a gas-mask to reduce poison damage. Maybe EMP draining modular shields instead of health damage. Custom damage filter (only deals damage to inserters? Belts are immune? Damage ignores shields?
Event For Attacks (Source, Target, projectile entity, Weapon, ammo)
Allow for custom attack effects, like a custom projectile/effect on attack/impact. Makes it easiser for scripts to interact.
Don't worry about the expensive nature of having these call events. Its the modder's responsibility to use the events efficiently.
Regen Timer - When did this entity last take damage/fire a weapon/built-in weapon. (Read-write) (Need access to regen rate and delay stats in Prototype)
The regen timer would let us interact with regeneration, having some events/constant actions interupt regeneration, or cause it to resume faster. If you set it to the future, it will delay, even if the entity normally has constant regeneration.
event for damage. (Include source, target, damage dealt (read-write), armor of target(Or just use the prototype data), Weapon (As item, equipment, or entity), and ammo (weapon), script (mod-name? Key?)
Register damage, and allow custom mitigation or damage models. Make an entity take damage to it's power supply, or move when it takes damage, or something. Direct damage to adjacent entities instead. Or, allow modules that alter effective armor, like a gas-mask to reduce poison damage. Maybe EMP draining modular shields instead of health damage. Custom damage filter (only deals damage to inserters? Belts are immune? Damage ignores shields?
Event For Attacks (Source, Target, projectile entity, Weapon, ammo)
Allow for custom attack effects, like a custom projectile/effect on attack/impact. Makes it easiser for scripts to interact.
Don't worry about the expensive nature of having these call events. Its the modder's responsibility to use the events efficiently.