Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

Neverwinter Nights: Enhanced Edition has been announced! Visit nwn.beamdog.com to pre-order, apply for the Head Start and check for details. NWN:EE FAQ is available.
Soundtracks for BG:EE, SoD, BG2:EE, IWD:EE, PST:EE are now available in the Beamdog store.
Attention, new and old users! Please read the new rules of conduct for the forums, and we hope you enjoy your stay!

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: 772
    edited September 9
    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.
    semiticgod
  • semiticgodsemiticgod Member, Moderator Posts: 7,061
    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: 62

    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: 772
    edited September 11
    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
  • subtledoctorsubtledoctor Member Posts: 7,831
    Fun fact regarding AI facestabs: if you use 3E Sneak Attack instead of backstabbing, you can sneak attack when not hidden. Combined with the lack of a positioning requirement for the AI, and the result is that enemy thieves get sneak attacks for every attack, all the time. :smiley:
  • EggHuevoEggHuevo Member Posts: 62
    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: 772
  • EggHuevoEggHuevo Member Posts: 62
    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: 62
    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: 772
    edited September 15
    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: 62
    edited September 15
    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: 772
    edited September 15
    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_Starktbone1
  • Permidion_StarkPermidion_Stark Member Posts: 3,192
    @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
Sign In or Register to comment.