TTLG|Thief|Bioshock|System Shock|Deus Ex|Mobile
Page 1 of 2 12 LastLast
Results 1 to 25 of 35

Thread: Ai healing in theory

  1. #1
    New Member
    Registered: Oct 2018
    Location: Germany

    Ai healing in theory

    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.

  2. #2
    Dˇttirin klŠ­ist oft mˇ­ur m÷ttli
    Registered: Apr 2015
    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.

  3. #3
    Member
    Registered: Jan 2006
    Location: On the tip of your tongue.
    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.

  4. #4
    New Member
    Registered: Oct 2018
    Location: Germany
    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?
    Last edited by SilentDragon; 16th Sep 2019 at 08:51.

  5. #5
    New Member
    Registered: Oct 2018
    Location: Germany
    Quote Originally Posted by nicked View Post
    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.
    Last edited by SilentDragon; 16th Sep 2019 at 08:51.

  6. #6
    Dˇttirin klŠ­ist oft mˇ­ur m÷ttli
    Registered: Apr 2015
    There's a NVScript that can watch the HP


    Code:
    NVHPTrigger Sends TurnOn when an object's hit points drop to or below the value specified by NVHitPoints. If the hit points raise above that value again, then TurnOff is sent.

  7. #7
    New Member
    Registered: Oct 2018
    Location: Germany
    Is it possible to give ai priorities? For example: 1.Self-preservation 2.Attacing 3.Healing

  8. #8
    Dˇttirin klŠ­ist oft mˇ­ur m÷ttli
    Registered: Apr 2015
    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?

  9. #9
    New Member
    Registered: Oct 2018
    Location: Germany
    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?)

  10. #10
    Dˇttirin klŠ­ist oft mˇ­ur m÷ttli
    Registered: Apr 2015
    AIs will run away
    -if they are damaged/have low hit points
    -Bystanders (servants, aristocrats)

    But they need a Flee Point to run away.

  11. #11
    New Member
    Registered: Oct 2018
    Location: Germany
    Ah ok, but from what I have seen from T2 ai, every time I am chased, climb to a spot where the ai can not damage me they just stand there ready to attack. But the moment I pull out my bow and pull back the string the ai will flee, even if I have not damaged them. Maybe this behaviour is rare or should it be impossible?

    Could this flee point be a specific ally or type of ally (as in healers)?

  12. #12
    Dˇttirin klŠ­ist oft mˇ­ur m÷ttli
    Registered: Apr 2015
    That's correct. You can set up different flee conditions (Ability Settings). I described is the default settings.

  13. #13
    New Member
    Registered: Oct 2018
    Location: Germany
    Can I force allies to attack each other with healing magic and can (for example hammerpriests) target themselves wit such an attack?


    And it should be possible for AIs to buff themselves?

  14. #14
    Dˇttirin klŠ­ist oft mˇ­ur m÷ttli
    Registered: Apr 2015
    A stim can add or remove metaproperties. AI team can be part of a metaproperty. Different teams will fight each other.

  15. #15
    New Member
    Registered: Oct 2018
    Location: Germany
    Quote Originally Posted by Unna Oertdottir View Post
    A stim can add or remove metaproperties. AI team can be part of a metaproperty. Different teams will fight each other.
    But how can I tell the AI only to use healing attacks and not a fireball? I know some AIs will only use certain attacks when the player is a certain distance away from them (the fire archer on "Life on the Party" is an example).

  16. #16
    Dˇttirin klŠ­ist oft mˇ­ur m÷ttli
    Registered: Apr 2015
    You can set up or create AIWatchobj links to AIs (which can also be a part a of a metaproperty). If a AI with low hit points comes close to a "healer", he can be healed.
    A fireball can be a tool to damage and to heal, too.

  17. #17
    New Member
    Registered: Oct 2018
    Location: Germany
    Quote Originally Posted by Unna Oertdottir View Post
    A fireball can be a tool to damage and to heal, too.
    But can the AI decide whether they want the fireball to heal or damage or is it on the receiver if the attack is damaging (fire mage trying to heal an air mage for example). Or could the fire mage swtith to a healing orb?

  18. #18
    Dˇttirin klŠ­ist oft mˇ­ur m÷ttli
    Registered: Apr 2015
    I don't think that's possible. A AI (a spellcaster) has only a single AIProjectile link. But an AI can pretend to something by executing a motion.
    Let's assume you set up an AIWatchobj link. This will tell the AI to go to the other AI and emit something - a sfx effect. The "healing" effect is the stim set by radius then. The other AI has a receptron for the stim and will be "healed" by the stim.

  19. #19
    New Member
    Registered: Oct 2018
    Location: Germany
    Quote Originally Posted by Unna Oertdottir View Post
    I don't think that's possible. A AI (a spellcaster) has only a single AIProjectile link. But an AI can pretend to something by executing a motion.
    Let's assume you set up an AIWatchobj link. This will tell the AI to go to the other AI and emit something - a sfx effect. The "healing" effect is the stim set by radius then. The other AI has a receptron for the stim and will be "healed" by the stim.
    Good idea. But from what I have seen in FMs Mages sometimes used multiple different attacks (Shotgun, single projectile, slow mega fireball, etc). A good example would be the secret optional mage boss fight in "The whistling of the Gears" does this still mean they only have one link?

    (AIProjectile link represents the method of attack and how and when to use it, correct?)
    Last edited by SilentDragon; 16th Sep 2019 at 12:43.

  20. #20
    Dˇttirin klŠ­ist oft mˇ­ur m÷ttli
    Registered: Apr 2015
    Must be a trickster or something then. You're correct, they have more projectile links.
    I have no idea how to set projectile preferences.

  21. #21
    New Member
    Registered: Oct 2018
    Location: Germany
    Quote Originally Posted by Unna Oertdottir View Post
    Must be a trickster or something then. You're correct, they have more projectile links.
    I have no idea how to set projectile preferences.
    Interesting, I did not know that.
    And I have multiple questions:
    Could one mod the AI to bypass this restriction?
    Do only mages/spellcasters have this restriction?
    What about that archer on the OM "Life on the Party", he frequently uses fire arrows when I am far away (I have read it is a 20% chance when you are a certain distance away) and normal arrows in close combat, does this mean archers can have multiple links?
    Last edited by SilentDragon; 16th Sep 2019 at 13:07.

  22. #22
    Dˇttirin klŠ­ist oft mˇ­ur m÷ttli
    Registered: Apr 2015
    To a certain amount, the firing preferences can be controlled in the AIProjectile link itself, mostly distance, fire rate and the line.
    But a spellcaster wouldn't know "it's time for a healing spell now".
    There used to be a spell tutorial/demo. It has a healing spellcaster
    https://www.ttlg.com/forums/showthread.php?t=57483

    It's not available any more. But I found it on my HDD

    http://www.mediafire.com/file/61h40a...pells.zip/file
    Last edited by Unna Oertdottir; 16th Sep 2019 at 13:47.

  23. #23
    New Member
    Registered: Oct 2018
    Location: Germany
    Quote Originally Posted by Unna Oertdottir View Post
    To a certain amount, the firing preferences can be controlled in the AIProjectile link itself, mostly distance, fire rate and the line.
    But a spellcaster wouldn't know "it's time for a healing spell now".
    There used to be a spell tutorial. It has a healing spellcaster
    https://www.ttlg.com/forums/showthread.php?t=57483

    It's not available any more. But I found it on my HDD

    http://www.mediafire.com/file/61h40a...pells.zip/file
    Wow, thanks a lot for this info and for sharing this tutorial. I think you maybe should make a separate thread for that file.


    "But a spellcaster wouldn't know "it's time for a healing spell now"." Could the AI not check the HP of an ally and when it is not 100% any more it would switch to healing spell? Or one could link the AIs together and if one takes damage the healer would switch to healing spell for that damaged AI?

  24. #24
    Dˇttirin klŠ­ist oft mˇ­ur m÷ttli
    Registered: Apr 2015
    I don't know how this can work. But the healer could emit a sfx which can look like a "spell". Controlled by a AIWatchobjLink or a conversation.

  25. #25
    New Member
    Registered: Oct 2018
    Location: Germany
    A good workaround idea, the SFX could be combined with a voice line for greater effect.

    But is attack-type-switching impossible for mages, priests, etc? Even when they know what to target?

Page 1 of 2 12 LastLast

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •