Skip to content

Backstabbing script

Hi! I'm playing a Shadowdancer and I was wondering if there's a script somewhere that let's him hide in shadows and then backstab and enemy, then do it again, and again, and again, without me having to micromanage him. While looking for this, I realized there isn't even a script for regular backstabbing (Thief aggressive just makes the thief attack, not backstab). Is there any such script? I found a command for backstabbing in order to create my own script, but it seems to be broken (as told by many people on the internet). Thanks in advance!

Comments

  • KuronaKurona Member Posts: 881
    edited September 2017
    You can't really do this.

    Party members need to target the enemy's back in order to backstab and I don't think it's possible to detect accurately by script. Enemies go around this by dropping the facing requirement entirely - they effectively facestab you. There is a mod to remove the facing condition for party members too, which could mimic this in theory but it needs TobEx and therefore doesn't work for the EE.

    That being said, the thief class is one that really needs micromanagement to be useful, even if you could auto-backstab anything. Even a Shadowdancer isn't permanently hidden, and emerging from the shadows at the wrong moment could have dire consequences.
    semiticgoddess
  • semiticgoddesssemiticgoddess Member Posts: 14,903
    I'm not familiar with scripting, but ostensibly you could set a script to give the thief the Assassination opcode whenever he or she was invisible.
    KuronaJuliusBorisov
  • EggHuevoEggHuevo Member Posts: 69

    I'm not familiar with scripting, but ostensibly you could set a script to give the thief the Assassination opcode whenever he or she was invisible.

    You are probably right! I don't know anything about scripting, either... I wish a charitable soul sees this and decides to help me :smiley:
  • KuronaKurona Member Posts: 881
    edited September 2017
    So I thought @semiticgod had a point and decided to test it. It seems to work but keep in mind I haven't scripted anything for the IE in years and have very little time to test.

    @EggHuevo
    I modified the "thief aggressive" script for testing purposes. Download the attachment, paste the KRN#ASN.SPL and KRN#ASR.SPL files in your BG override folder and the thief1.BS file in your script folder (make a backup of the original just in case).
    It should give a hidden assassination effect to any thief with this AI every time they're invisible and remove it when they're visible. There are a few problems though:
    1. If the player takes control of the thief to attack, they'll also be able to facestab.
    2. If you disable party AI there's a possibility the effect stay forever (until you enable the AI again).
    I don't know what I can do about it though :/

    So test it further and tell me what you think. Also if someone more knowledgeable than me could take a look this would be cool.
    JuliusBorisov
  • The user and all related content has been deleted.
  • EggHuevoEggHuevo Member Posts: 69
    Kurona said:

    So I thought @semiticgod had a point and decided to test it. It seems to work but keep in mind I haven't scripted anything for the IE in years and have very little time to test.

    @EggHuevo
    I modified the "thief aggressive" script for testing purposes. Download the attachment, paste the KRN#ASN.SPL and KRN#ASR.SPL files in your BG override folder and the thief1.BS file in your script folder (make a backup of the original just in case).
    It should give a hidden assassination effect to any thief with this AI every time they're invisible and remove it when they're visible. There are a few problems though:
    1. If the player takes control of the thief to attack, they'll also be able to facestab.
    2. If you disable party AI there's a possibility the effect stay forever (until you enable the AI again).
    I don't know what I can do about it though :/

    So test it further and tell me what you think. Also if someone more knowledgeable than me could take a look this would be cool.

    Thanks a lot, man! It works as intended. Can you make it so he: hides in shadows (even with and enemy present, I intend to use with a shadowdancer), then attacks and enemy, then hides in shadows again, and so on? Exactly what enemy thieves do in BG2 (only they manage it with invisibility potions).
  • KuronaKurona Member Posts: 881
    Try it with this one then.
  • EggHuevoEggHuevo Member Posts: 69
    Kurona said:

    Try it with this one then.

    Now he definitely hides in shadows in front of the enemy, and then attack them. But only once. I have to manually disengage him from attacking over and over, and only then he hides again. My intention was to make him hide, attack, stop attacking, hide, attack, and so on.

    Still, it's a great improvement. I'm probably asking for too much, lol. I wish I had your talents, man, thanks for your help so far :smile:
  • EggHuevoEggHuevo Member Posts: 69
    EggHuevo said:

    Kurona said:

    Try it with this one then.

    Now he definitely hides in shadows in front of the enemy, and then attack them. But only once. I have to manually disengage him from attacking over and over, and only then he hides again. My intention was to make him hide, attack, stop attacking, hide, attack, and so on.

    Still, it's a great improvement. I'm probably asking for too much, lol. I wish I had your talents, man, thanks for your help so far :smile:
    Oh! I think i "know" how to do it. Isn't there a way to make a character "wander around" a bit? Just making him move a step, would cause him to cease attacking and then hide again, and attack again...
  • KuronaKurona Member Posts: 881
    edited September 2017
    They do hide again when I test :open_mouth:

    Well, no matter. I tried to make the script more precise and yet again it does work when I try it so idk. Try this version and tell me.
    EggHuevo said:

    I wish I had your talents, man, thanks for your help so far :smile:

    Hah I know almost nothing about IE scripting. I did some stuff 5 years ago or so and this wasn't even about AI. It's just generic programming knowledge and my browser tabs open on the IESDP.

    EggHuevo
  • EggHuevoEggHuevo Member Posts: 69
    edited September 2017
    Kurona said:


    Hah I know almost nothing about IE scripting. I did some stuff 5 years ago or so and this wasn't even about AI. It's just generic programming knowledge and my browser tabs open on the IESDP.

    Still, it's impressive. Even more so that you're willing to take time from your life to help a stranger. I tested it again, it works perfectly. You know, I'm an idiot. I was expecting him to attack, hide, attack, hide... BUT I FORGOT YOU CAN ONLY HIDE ONCE EVERY 6 SECONDS, LOL. It works perfectly, you're a genius. You have my thanks!

    Edit: one last question. Does this work for BG2?
  • KuronaKurona Member Posts: 881
    edited September 2017
    EggHuevo said:

    Edit: one last question. Does this work for BG2?

    I tested everything on a ToB game so it should.
    EggHuevo said:

    You know, I'm an idiot. I was expecting him to attack, hide, attack, hide... BUT I FORGOT YOU CAN ONLY HIDE ONCE EVERY 6 SECONDS, LOL. It works perfectly, you're a genius. You have my thanks!

    Yeah I used a 6 second timer because of this or else the AI wouldn't care and just break all the rules. Well technically it already breaks one since it facestabs.
    Permidion_Starktbone1ArcnNKD
  • Permidion_StarkPermidion_Stark Member Posts: 4,861
    @Kurona
    If you don't get one of those special badges for being a helpful guy for doing this there is no justice in the Realms.
    tbone1EggHuevo
  • suysuy Member Posts: 30
    A bit late, but I'd like to reply that thanks to @semiticgoddess 's idea in this post, I implemented the backstabbing from any angle in a little mod that I called All The Things Revised. Eventually it'll have a mod page in a more visible place, but so far it's attached in a forum post in Gibberlings3: Reliable, useful, and easy backstabs? Turns out it's possible. In that forum post I discuss other little components that the mod has and that has helped me a lot to embrace and enjoy backstabs.

    Cheers!
Sign In or Register to comment.