Simple Bard / Jester AI Script?
Oxford_Guy
Member Posts: 3,729
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!
0
Comments
Still need a useful minimal bard script, though.
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.
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
This: http://forum.baldursgate.com/discussion/15417/request-for-xzar-mod
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
http://forum.baldursgate.com/discussion/11375/bp-series-party-ai-scripts-for-bgee-non-weidu-available
http://www.shsforums.net/topic/55587-bp-series-party-ai-scripts-for-bgee-non-weidu/
// 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
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.