SilentDragon on 16/9/2019 at 09:25
Is it possible for Ais to actively heal themselves and/or each other in TG and T2?
For example, Fire elementals and shadows are healed by fire attacks, so would it be possible to modify their behaviour so they would attack themselves/each other if one has lost health?
And could this property of being healed by one's element from the elementals be copied onto other groups like hammers and mages.
Or would it be possible to add a separate heling attack?
This is all just rough theory but all are welcome to help better conceptualize this idea.
Unna Oertdottir on 16/9/2019 at 11:16
Of course it's possible. Healing is damage, too, but the other way around. For example a standard healing potion "damages" the frobber by -1.
Some Source & Receptron setup can do this. Acquaint yourself with DromEd and you can make it.
nicked on 16/9/2019 at 12:20
Yeah it's possible to use a Stim & Receptron setup for AI healing. A fire elemental simply has a Receptron for a Fire Stim that says "Damage me by minus value". It's easy enough to use a custom healing stim on any AI. If you wanted a healing attack, you can just apply that healing stim to any attack - e.g. make a healing sword that has HealingStim instead of Slash.
Making the AI actively heal each other should be doable but is likely to be a lot more complex. Off the top of my head, you would probably need to set up the AIs to add an AIWatchObj link to each other if they went below x number of hit points (probably hijacking the existing system that causes them to flee). Then the resulting action would be to do a casting animation or something and stim the wounded AI with the healing stim.
SilentDragon on 16/9/2019 at 12:28
Thank you for the input. (Btw I am a novice at DromED, and it broke recently)
My main goal with this is to "upgrade" the Hammerite priests by also giving them the ability to heal their allies.
But the main problem is how will the ai knows to target an ally with a healing attack when that one has taken damage and take their focus off their current action (patroling, etc). And how will the patient know that he should seek medical attention and not just wander into a random direction?
One of my ideas is that the Hammertites should be healed by priest attacks, but when somebody gets healed won't that make a lot of noise and alert people all around the map?
SilentDragon on 16/9/2019 at 12:34
Quote Posted by nicked
Making the AI actively heal each other should be doable but is likely to be a lot more complex. Off the top of my head, you would probably need to set up the AIs to add an AIWatchObj link to each other if they went below x number of hit points (probably hijacking the existing system that causes them to flee). Then the resulting action would be to do a casting animation or something and stim the wounded AI with the healing stim.
Good idea.
One of my problems is that i do not know how moddable the ai is and if not one whould have to change the base thief ai files for that to ever work.
Unna Oertdottir on 16/9/2019 at 12:51
There's a NVScript that can watch the HP
Code:
[h=1]NVHPTrigger[/h]
Sends TurnOn when an object's hit points drop to or below the value specified by <kbd>NVHitPoints</kbd>. If the hit points raise above that value again, then TurnOff is sent.
SilentDragon on 16/9/2019 at 13:11
Is it possible to give ai priorities? For example: 1.Self-preservation 2.Attacing 3.Healing
Unna Oertdottir on 16/9/2019 at 13:19
Attack is always the first priority for a team bad member. Healing was also implemented (QuaffHeal, gen.osm).
What do you mean by self preservation?
SilentDragon on 16/9/2019 at 13:56
Self-preservation as in running away when in danger (example: being lined up with a bow) or on low health.
(I presume you mean bad team member?)
Unna Oertdottir on 16/9/2019 at 14:05
AIs will run away
-if they are damaged/have low hit points
-Bystanders (servants, aristocrats)
But they need a Flee Point to run away.