Skip to content

Simple Bard / Jester AI Script?

Hi - I'm looking for a simple Bard script (actually for a Jester) that will automatically sing bardsong constantly *even* when attacked in melee (a Jester may still want to carry on singing!), but which will stop and not interfere with explicit attack/spell orders (although would be great to have one that resumes bard song after I've made all my attacks for a round, but I don't know if that's possible). That's all I want it to do. Most of the other scripts I've seen do lots of other things I don't want to automate. Can anyone give some tips? Thanks!

Comments

  • KidCarnivalKidCarnival Member Posts: 3,747
    I'd be interested in such a script, too. Also a cleric script that does the same for Turn Undead, and thief for Search Traps. I remember there was a script like that in BG2 for thieves that did nothing but auto-turn on trap searching (at least it didn't do anything that bothered me), which was quite useful.
  • Oxford_GuyOxford_Guy Member Posts: 3,729
    @KidCarnival - I have just such a minimal trap-finding script, PM me if you want it and I can email it to you or something. I have this constantly activated in dungeons and spider areas and when looting chests.

    Still need a useful minimal bard script, though.
  • JamesJames Member Posts: 110
  • KidCarnivalKidCarnival Member Posts: 3,747
    @Oxford_Guy - Yeah, that's exactly what I had in mind. I have most traps memorized, but it's so much easier if they just show up when entering the room. I sent a pm.
  • Oxford_GuyOxford_Guy Member Posts: 3,729
    James said:
    But is it compatible with BGEE and/or does it install whole load of c***I don't need?
  • JamesJames Member Posts: 110
    Not sure about compatability and you can choose the options you want i only ever use the bard and thief script. I think @wisp is the mod owner
  • Oxford_GuyOxford_Guy Member Posts: 3,729
    James said:

    Not sure about compatability and you can choose the options you want i only ever use the bard and thief script. I think @wisp is the mod owner

    Thanks. Have you tried it with BGEE yourself?
  • JamesJames Member Posts: 110
    No I'm playing it on the ipad while I wait for my intel drivers to work on my laptop
  • Oxford_GuyOxford_Guy Member Posts: 3,729
    James said:

    No I'm playing it on the ipad while I wait for my intel drivers to work on my laptop

    Okay
  • KidCarnivalKidCarnival Member Posts: 3,747
    So there is hope then.
  • WispWisp Member Posts: 1,102
    aTweaks has not yet been updated for BGEE and most of the components will not (or should not) install.
  • JamesJames Member Posts: 110
    Thanks for the clarification @wisp does his include the bard script?
  • Oxford_GuyOxford_Guy Member Posts: 3,729
    Wisp said:

    aTweaks has not yet been updated for BGEE and most of the components will not (or should not) install.

    Have just tried to install it and none of the components will install, buy am wondering if I can manually install the Bard script?
  • WispWisp Member Posts: 1,102
    edited February 2013


    Have just tried to install it and none of the components will install, buy am wondering if I can manually install the Bard script?

    If you know how to compile scripts, you can compile the script "atweaks/baf/rr#brd01.baf", rename the resulting file rr#brd01.bcs into rr#brd01.bs and put it in the scripts folder. It will lack the in-game description and such, however.

    A better route would be to edit the TP2 file to permit installation on BGEE, but from where I am now, there would be a bit too much discovery involved in providing instructions for how to do that.
  • Oxford_GuyOxford_Guy Member Posts: 3,729
    Wisp said:


    Have just tried to install it and none of the components will install, buy am wondering if I can manually install the Bard script?

    If you know how to compile scripts, you can compile the script "atweaks/baf/rr#brd01.baf", rename the resulting file rr#brd01.bcs into rr#brd01.bs and put it in the scripts folder. It will lack the in-game description and such, however.
    Thanks, I might try that
  • Oxford_GuyOxford_Guy Member Posts: 3,729
    I'm going to see if I can make sense of the Scripting Guide here too: http://www.pocketplane.net/tutorials/simscript.html
  • KidCarnivalKidCarnival Member Posts: 3,747
    So will I, maybe one day I can make the Xzar mod I want. Gotta start somewhere.
  • Oxford_GuyOxford_Guy Member Posts: 3,729

    So will I, maybe one day I can make the Xzar mod I want. Gotta start somewhere.

    What do you want to do with him?
  • Oxford_GuyOxford_Guy Member Posts: 3,729
    edited February 2013
    Wisp said:


    Have just tried to install it and none of the components will install, buy am wondering if I can manually install the Bard script?

    If you know how to compile scripts, you can compile the script "atweaks/baf/rr#brd01.baf", rename the resulting file rr#brd01.bcs into rr#brd01.bs and put it in the scripts folder. It will lack the in-game description and such, however.

    BTW where can I find the BGEE script compiler? The Script Compiler directory is empty!

    EDIT: I have BG2 installed, can I use the Script compiler than comes with that? I've found a Windows front end to it here: http://www.sorcerers.net/Games/BG2/index_editors.php
  • KidCarnivalKidCarnival Member Posts: 3,747

    So will I, maybe one day I can make the Xzar mod I want. Gotta start somewhere.

    What do you want to do with him?

    This: http://forum.baldursgate.com/discussion/15417/request-for-xzar-mod

  • Oxford_GuyOxford_Guy Member Posts: 3,729
    @Wisp and @KidCarnival - okay I've managed to compile both the Simple Bard and Simple Thief scripts from aTweaks and they seem to work in-game. PM me if you want copies of them.

    I get rather weird feedback messages when toggling between modes (probably because the script is meant for BG2), though, so it's little difficult to tell what's going on - @Wisp - are you able to clarify?

    Bard Script
    -----------

    // Switch between constantly singing and singing only during combat(the "D" key toggles between modes)

    (the message you get when you select this toggles between "Just like all good people" / "Refuse if you wish". I think when you get the "Refuse if you wish" message it's toggling to the constantly singing mode)

    // Switch between attacking enemies and not attacking (the "V" key toggles between modes)

    (the message you get when you select this toggles between "Let Conscience be your guide" / "Aye we'll go wit'. Ye owe us fer our time, though" - I'm not sure which is which mode, though!)

    Other effects
    // Sing Battlesong whenever the character is idle (doesn't interrupt player input)
    // Sing Battlesong during combat and when enemies are nearby, but only if idle (doesn't interrupt player input)
    // Stop singing if there was no combat activity for at least 30 seconds and no enemies are nearby, but only if idle (doesn't interrupt player

    input)
    // Attack the nearest enemy but not while under the effects of Invisibility and/or Sanctuary

    Thief Script
    -----------

    Other effects
    // Switch between constantly searching for traps and hiding (the "D" key toggles between modes)

    (the message you get when you select this toggles between "We've precious little time, but it's best to travel accompanied" (when changing to hiding) / "Silly! Your friends are no concern of ours.Go as you wish by yourself. Hopefully you'll fare better than you have so far" (when changing to Find Traps)

    // Switch between attacking enemies and not attacking (the "V" key toggles between modes)

    (the message you get when you select this toggles between "Let Conscience be your guide" / "Aye we'll go wit'. Ye owe us fer our time, though" I'm not sure which is which mode, though!))

    // Search for traps whenever the character is idle (doesn't interrupt player input)
    // Attempt to hide in shadows once per round whenever the character is idle (doesn't interrupt player input)
    // Attack the nearest enemy but not while under the effects of Invisibility and/or Sanctuary
  • Oxford_GuyOxford_Guy Member Posts: 3,729

    @Wisp and @KidCarnival - okay I've managed to compile both the Simple Bard and Simple Thief scripts from aTweaks and they seem to work in-game. PM me if you want copies of them.

    I get rather weird feedback messages when toggling between modes (probably because the script is meant for BG2), though, so it's little difficult to tell what's going on - @Wisp - are you able to clarify?

    Bard Script
    -----------

    // Switch between constantly singing and singing only during combat(the "D" key toggles between modes)

    (the message you get when you select this toggles between "Just like all good people" / "Refuse if you wish". I think when you get the "Refuse if you wish" message it's toggling to the constantly singing mode)

    // Switch between attacking enemies and not attacking (the "V" key toggles between modes)

    (the message you get when you select this toggles between "Let Conscience be your guide" / "Aye we'll go wit'. Ye owe us fer our time, though" - I'm not sure which is which mode, though!)

    Other effects
    // Sing Battlesong whenever the character is idle (doesn't interrupt player input)
    // Sing Battlesong during combat and when enemies are nearby, but only if idle (doesn't interrupt player input)
    // Stop singing if there was no combat activity for at least 30 seconds and no enemies are nearby, but only if idle (doesn't interrupt player

    input)
    // Attack the nearest enemy but not while under the effects of Invisibility and/or Sanctuary

    Thief Script
    -----------

    Other effects
    // Switch between constantly searching for traps and hiding (the "D" key toggles between modes)

    (the message you get when you select this toggles between "We've precious little time, but it's best to travel accompanied" (when changing to hiding) / "Silly! Your friends are no concern of ours.Go as you wish by yourself. Hopefully you'll fare better than you have so far" (when changing to Find Traps)

    // Switch between attacking enemies and not attacking (the "V" key toggles between modes)

    (the message you get when you select this toggles between "Let Conscience be your guide" / "Aye we'll go wit'. Ye owe us fer our time, though" I'm not sure which is which mode, though!))

    // Search for traps whenever the character is idle (doesn't interrupt player input)
    // Attempt to hide in shadows once per round whenever the character is idle (doesn't interrupt player input)
    // Attack the nearest enemy but not while under the effects of Invisibility and/or Sanctuary

    Actually the Thief script seems to work, but the Bard script doesn't work properly with my Jester - both toggles for "D" seem to *stop* me singing, rather than *start* my character singing :-(
  • KidCarnivalKidCarnival Member Posts: 3,747
    Any chance for cleric, auto-turn on Turn Undead if hostile undead are sighted, not stopping to turn in battle?
  • Oxford_GuyOxford_Guy Member Posts: 3,729
    These scripts don't seem to do quite what I want a script for my Jester to do, the aTweaks one looks like it does what I want in theory, but doesn't seem to trigger the bard song :-(
  • Oxford_GuyOxford_Guy Member Posts: 3,729
    This is the current aTweaks Bard script, does anyone know why this doesn't seem to turn on bard song (in fact it seems to turn it off, if it's on!):

    // Title: Simple Bard script
    // Date Created: September 24, 2002
    // Created by: aVENGER
    // Note: doesn't require Detectable Spells


    // Switch between constantly singing and singing only during combat (the "D" key toggles between modes)

    IF
    Global("RR#BRDS","LOCALS",0)
    HotKey(D)
    THEN
    RESPONSE #100
    SetGlobal("RR#BRDS","LOCALS",1)
    DisplayStringHead(Myself,@233) // Singing constantly if idle
    END

    IF
    Global("RR#BRDS","LOCALS",1)
    HotKey(D)
    THEN
    RESPONSE #100
    SetGlobal("RR#BRDS","LOCALS",0)
    DisplayStringHead(Myself,@234) // Singing only during combat
    END


    // Switch between attacking enemies and not attacking (the "V" key toggles between modes)

    IF
    Global("RR#BRDA","LOCALS",0)
    HotKey(V)
    THEN
    RESPONSE #100
    SetGlobal("RR#BRDA","LOCALS",1)
    DisplayStringHead(Myself,@235) // Attacking enemies
    END

    IF
    Global("RR#BRDA","LOCALS",1)
    HotKey(V)
    THEN
    RESPONSE #100
    SetGlobal("RR#BRDA","LOCALS",0)
    DisplayStringHead(Myself,@236) // Not attacking enemies
    END


    // Sing Battlesong whenever the character is idle (doesn't interrupt player input)

    IF
    Global("RR#BRDA","LOCALS",0)
    Global("RR#BRDS","LOCALS",1)
    ActionListEmpty()
    Class(Myself,BARD_ALL)
    !ModalState(BATTLESONG)
    THEN
    RESPONSE #100
    BattleSong()
    END


    // Sing Battlesong during combat and when enemies are nearby, but only if idle (doesn't interrupt player input)

    IF
    Global("RR#BRDA","LOCALS",0)
    Global("RR#BRDS","LOCALS",0)
    ActionListEmpty()
    Class(Myself,BARD_ALL)
    !ModalState(BATTLESONG)
    OR(2)
    See([EVILCUTOFF])
    CombatCounterGT(0)
    THEN
    RESPONSE #100
    BattleSong()
    END


    // Stop singing if there was no combat activity for at least 30 seconds and no enemies are nearby, but only if idle (doesn't interrupt player input)

    IF
    Global("RR#BRDA","LOCALS",0)
    Global("RR#BRDS","LOCALS",0)
    ActionListEmpty()
    Class(Myself,BARD_ALL)
    ModalState(BATTLESONG)
    !See([EVILCUTOFF])
    CombatCounter(0)
    Delay(30)
    THEN
    RESPONSE #100
    ClearActions(Myself)
    END

    // Attack the nearest enemy but not while under the effects of Invisibility and/or Sanctuary

    IF
    Global("RR#BRDA","LOCALS",1)
    ActionListEmpty()
    Class(Myself,BARD_ALL)
    !StateCheck(Myself,STATE_INVISIBLE)
    CheckStatLT(Myself,1,SANCTUARY)
    See([EVILCUTOFF])
    !InParty([EVILCUTOFF])
    THEN
    RESPONSE #100
    AttackReevaluate([EVILCUTOFF],30)
    END
  • WispWisp Member Posts: 1,102
    @Oxford_Guy
    The incorrect text is due to the script using tra references. Either you would need to untraify the script, or compile it with WeiDU and the --transin option.
    As for your problems with the singing, be aware that pressing D does not make the bard sing (or stop singing). It places the bard in a state in which he or she will automatically sing under the right circumstances. Beyond that, I'm afraid I can't offer more support. You would just have to wait until aTweaks properly supports BGEE.
Sign In or Register to comment.