Are you using the archer script or the default character script? I've never had that issue with the default script (they just engage nearby enemies with whatever weapon is on hand if they don't already have a target), but archer scripts are just retarded and useless.
I can confirm this is an issue. I have Imoen and Minsc with bows, and a mage with darts, they often walk right up to an enemy before using their ranged weapons.
I can't reproduce it but it does happen on occasion. Seems to most often happen when you have a character singly selected.
Character: Halfling Thief with a Ninjatō and a Short Bow, +1 Proficiency in each. Script: Custom (Default)
While training with Obe in Candlekeep, I equipped the Short Bow and tried to attack some Gibberlings. I fired one Arrow and then just stood there. I switched to the Ninjatō and advanced on the Gibberlings attacking in melee. I then repositioned my Halfling Thief, equipped the Short Bow and tried to attack again, but my Thief just stood there. For some reason, my Thief just didn't want to attack with his Short Bow.
After speaking with Binkos at (4537, 1825: AR2700) our party was attacked by a Wolf. My Thief and Imoen had their Short Bows equipped. They advanced on the Wolf until they were in melee range and began attacking with the Bows. I tried to reposition them, but they continued to run up to the Wolf and attack with their "melee Bows".
@perusoe I had a similar problem with Imoen (short bow) and Neera (sling). I went into the customize menu (button on lower right of Record screen) and changed their scripts from "default" to "ranged". I haven't had that problem since.
IF ActionListEmpty() AttackedBy([ANYONE],DEFAULT) See(LastAttackerOf(Myself)) OR(2) !Range(LastAttackerOf(Myself),5) !InWeaponRange(LastAttackerOf(Myself)) THEN RESPONSE #100 MoveToObject(LastAttackerOf(Myself)) END
I think this is the problematic part of agen.bs. If I am reading this correctly, the "or" section returns "true" if either the last person to attack you is more than 5 away or if the last person to attack you is outside your weapon range. If you are using a bow but the last person to attack you is more than 5 away but still inside the bow's range then you will move to that object to attack them...with your bow.
I am simply going to correct this script to fix that problem rather than wait for an official patch.
If you can post the fixed script, we would be grateful
And this will perhaps make the devs do their job a bit quicker ;-)
I would simply add
EquipMostDamagingMelee()
before the MoveToObject statement, which will stop that character from using a ranged weapon. As noted, if the character is supposed to use ranged then switch them to "arang".
Thank you everyone for your input! I'm glad to see that others feel that this is an issue of some concern and it is being addressed. :-D
@Komarr Thanks! I'll try that as a workaround, although I hope the Scripts are fixed. There are reasons why I prefer using the Custom (Default) Scripts.
@Aasimar069 Thanks for the info! I too look forward to seeing a posted fixed Script. ;-)
@Mathsorcerer Does BGEE have a Script Compiler or will the original BG/TotSC Script Compiler work? Or better still, can the Scripts from the original games be copied into BGEE and work properly?
@Avenger_teambg That's fine for a workaround, but I would prefer if any "broken" Scripts were fixed. ;-)
@Mathsorcerer The way I play, I have some characters that start out using a range weapon and then switch to a melee weapon when the enemy gets close enough. If my memory serves me correctly, I believe there's a Script that actually does that. In the original game, however, when I tried using that Script, the character would not always switch to the melee weapon at the appropriate time. This is just one of the reasons I started using the Custom (Default) Scripts and manually switch weapons for my characters.
@Perusoe, I have always used NearInfinity for scripting; any problems I have ever encountered have been only problems with what I wrote, not NI.
For a while, I had a script of my own that would use ranged weapons on enemies far away then switch to melee when they got within 7 spaces; it worked well enough and I see no reason it can't work again. Fortunately, BG:EE is using the SoA/ToB engine with many of the functions updated and fixed, so scripting should be more flexible and powerful than before.
...Fortunately, BG:EE is using the SoA/ToB engine with many of the functions updated and fixed, so scripting should be more flexible and powerful than before.
I've played around with some Scripting, including the Neverwinter Nights Toolset. Unfortunately, I'm not very good at it. (It also appears that BGEE is using some of the features from the Baldur's Gate II engine).
If I understand you, the Scripts from the original Baldur's Gate and Tales of the Sword Coast should work with BGEE. Is that correct?
They *should* work but I cannot guarantee that they will. I have been trying to edit spawn points in areas, a problem many people are encountering, but for some reason even when I increase the number of things that should spawn they do not--there must be some other code in charge of this but what it is I do not know right now. I can fix that with scripts--maybe--but I won't know until this weekend. It will be messy doing it that way, though.
@Mathsorcerer I installed the original BG the day before I purchased BGEE. I have not installed TotSC yet, because I wanted to finish BG first. I thought I'd look on my TotSC CD to see if I could find the Scripts, but it looks like I have to install first.
Then I looked in the BG installation Scripts folder. The Scripts are the same file format (.bs), but have different names. This indicates, at least to me, that the Scripts are different.
I'm considering making a backup copy of the BGEE Scripts and then replacing them with the BG Script files, just to see what happens. I don't know if I'll get to it tonight, but when I do, I'll post here as to my success (or failure).
Edit: By the way, thanks for your commitment to improving BGEE!
Okay, I couldn't resist. I had to try it. This is what I did:
Created a backup folder on my second hard drive and placed a copy of the BGEE Scripts there.
Deleted the Scripts from the BGEE installation Scripts folder.
Copied the Scripts from the original BG installation Scripts folder to the BGEE installation Scripts folder.
Ran BGEE and made sure my Halfling Thief had the Custom (Default) Script.
I started a new BGEE game and took my Thief to train with Obe in Candlekeep.
My Thief, equipped with his Short Bow, performed as expected! He stood his ground and continued to attack with his Short Bow until he and his temporary party members had killed all the Gibberlings.
I'm still not ready to install the original TotSC, but I might go ahead and install Baldur's Gate II, so I can get those Scripts and see if they'll work. I won't get to it until later tonight or tomorrow; time permitting.
If the BGII Scripts work, I won't mind sharing, if there's someway I can upload the Scripts for everyone to download. Otherwise, someone else with original copies of these games will have to do it. ;-)
Observed Behavior: I see this as a bug. My thief, even armed with ranged weapons, walks to enemies and gets attacked (they get the bonus from Imoen being armed with ranged). Selecting her behavior to ranged does not fix the problem; I had to turn of AI and it still happens.
Expected Behavior: Rogue stays put and uses arrows until enemy moves to rogue (or archer, I suppose).
@reedmilfam Yeah. And I agree that the ranged scrip doesnt do what I want. I usually swap around between ranged and melee for most characters. I have looked at the other scripts and they seem to be too detailed? Correct me if I am wrong.
I simply want my characters who are firing at range to keep firing once enemy number 1 is dead. Is there a way for someone with little computer knowledge to fix this manually?
It seems like my characters with ranged weapons, mostly Imoen because she is my primary ranged class keeps moving INTO melee range even with a ranged weapon equipped, plenty of ammo, and ai set to "ranged" or "default". I have to constantly keep moving them back out to range to avoid getting the melee penalty and getting gibbed. Should only move into melee range with a melee weapon equipped.
@Mathsorcerer Edit: By the way, thanks for your commitment to improving BGEE!
I do what I can. In fact, my suspicions worked better than I anticipated--I actually came up with a workaround for the "insufficient spawn creatures" by creating a "spawn point place holder" creature who runs a script that says "if I see a PC then I summon x creatures then destroy myself"...just in time to read that it will be fixed in the next (or an upcoming) patch.
We do owe BeamDog for putting out BG:EE and laying the groundwork but doing things like fixing bugs on my own rather makes the game feel like it is "mine", if you know what I mean. A few bugs here and there are, for me, not a problem--although I am doing more tweaking than playing I am still enjoying BG:EE immensely.
Once you get those installed, NearInfinity can extract the .bs files from their .bif folder easily enough. I seem to recall--eons ago, which is another way of saying "10 years ago"--I had a tool called Biff Extractor, which would pull everything out of a .bif and dump the files into a folder; I had every type of "normal" item to use as a base for creating new items in BG and IWD. I have ToB still installed on the other computer, so I can pull anything from there I might need. Someone else is using a DropBox for sharing portraits; I suppose that could be done for scripts...except I don't use DropBox or anything cloud-related. Old-fashioned Internet and e-mail is good enough for me.
I saw this too with Rashad he has a sling equipped and for some stupid reason he moves in close and then attacks with his sling rather than staying still and attacking at range- I have him on the basic script - i think is the first one on the list -NOT the ranged attack one... I suppose I could switch him to the ranged one but I recall from bg1 that I hated that as they seemed to be constantly moving back and forth to stay at range... although that was BG 1 so perhaps it is better with enhanced...
@Beowulf - I'm hoping this is on the fix list because it really hurts the fun factor. I'm busy enough without moving archers that moved TO melee range before engaging the enemy. Click fest instead of RPG at that point.
Yeah its VERY annoying to have to sometimes constantly move your ranged characters out of harms way. At this point i almost want to do an all melee group and say screw it. Takes a lot of fun out of it when your mage with a sling decides she wants to whisper sweet nothings to a ettercap. As happy as I am for this game and as much as I loved the original the bugs are finally starting to get to me.
Might have to wait a while before I finish playing it between this and the companion dialog loops...mainly rasaad. I had to force spawn a duplicate of rasaad simply because he wouldn't rejoin my group and kept getting stuck in the dialog loop. so now i have 2 rasaads in the world.
@Mathsorcerer Yeah, it seems the devs and modders are trying to stay on top of things. It just makes me have that much more respect for them. BGEE may be very buggy, but at least they're working hard to correct things. Don't feel bad if they "beat you to the punch". You're learning a lot about the game engine, which will put you in a good position to better help them when it's needed. I didn't have to extract the Script files I'm using. I just copied them from the original BG Script folder. I'm getting ready to install the original BG2. I'm going to use those Scripts and see if they work. It may be later today before I can let everyone know if they work. There's some websites that let you upload any kind of file, like image-hosting websites, only they're not restricted to image files. I may check into that if this forum doesn't allow attachments.
To everyone who missed my previous post above: If you have the original Baldur's Gate installed:
Backup your Baldur's Gate: Enhanced Edition Script files.
After you backup your Baldur's Gate: Enhanced Edition Script files, delete the Script files from the Baldur's Gate: Enhanced Edition installation Script folder.
Copy your original Baldur's Gate Script files into your Baldur's Gate: Enhanced Edition Script folder.
Run Baldur's Gate: Enhanced Edition, select your preferred Script and enjoy!
If you don't have the original games and Overhaul Games (or Beamdog) doesn't patch this soon, then you'll just have to wait until I can find a way (and a place) to upload the working Scripts for you. (Sorry, but I'm not a developer or programmer. I'm just a gamer, like you).
Comments
In the meantime the only advice I can offer is to not use scripts for ranged characters.
Thursday, December 6, 2012
Character: Halfling Thief with a Ninjatō and a Short Bow, +1 Proficiency in each. Script: Custom (Default)
ActionListEmpty()
AttackedBy([ANYONE],DEFAULT)
See(LastAttackerOf(Myself))
OR(2)
!Range(LastAttackerOf(Myself),5)
!InWeaponRange(LastAttackerOf(Myself))
THEN
RESPONSE #100
MoveToObject(LastAttackerOf(Myself))
END
I think this is the problematic part of agen.bs. If I am reading this correctly, the "or" section returns "true" if either the last person to attack you is more than 5 away or if the last person to attack you is outside your weapon range. If you are using a bow but the last person to attack you is more than 5 away but still inside the bow's range then you will move to that object to attack them...with your bow.
I am simply going to correct this script to fix that problem rather than wait for an official patch.
And this will perhaps make the devs do their job a bit quicker ;-)
EquipMostDamagingMelee()
before the MoveToObject statement, which will stop that character from using a ranged weapon. As noted, if the character is supposed to use ranged then switch them to "arang".
@Komarr Thanks! I'll try that as a workaround, although I hope the Scripts are fixed. There are reasons why I prefer using the Custom (Default) Scripts.
@Aasimar069 Thanks for the info! I too look forward to seeing a posted fixed Script. ;-)
@Mathsorcerer Does BGEE have a Script Compiler or will the original BG/TotSC Script Compiler work? Or better still, can the Scripts from the original games be copied into BGEE and work properly?
@Avenger_teambg That's fine for a workaround, but I would prefer if any "broken" Scripts were fixed. ;-)
@Mathsorcerer The way I play, I have some characters that start out using a range weapon and then switch to a melee weapon when the enemy gets close enough. If my memory serves me correctly, I believe there's a Script that actually does that. In the original game, however, when I tried using that Script, the character would not always switch to the melee weapon at the appropriate time. This is just one of the reasons I started using the Custom (Default) Scripts and manually switch weapons for my characters.
@tommy I agree!
The ranged script is really shitty.
Why ?
Because instead of firing arrows, the ranger moves away from the target and fires from afar.
If my warriors are drawing attention to the ennemies, there's no need for my archer to move away !
He can just be behind or 2 steps behind and shoot instead of switching to melee OR running away from the target.
Therefore, don't be lazy and fix the script !
Thanks.
For a while, I had a script of my own that would use ranged weapons on enemies far away then switch to melee when they got within 7 spaces; it worked well enough and I see no reason it can't work again. Fortunately, BG:EE is using the SoA/ToB engine with many of the functions updated and fixed, so scripting should be more flexible and powerful than before.
If I understand you, the Scripts from the original Baldur's Gate and Tales of the Sword Coast should work with BGEE. Is that correct?
Thanks for the info!
Then I looked in the BG installation Scripts folder. The Scripts are the same file format (.bs), but have different names. This indicates, at least to me, that the Scripts are different.
I'm considering making a backup copy of the BGEE Scripts and then replacing them with the BG Script files, just to see what happens. I don't know if I'll get to it tonight, but when I do, I'll post here as to my success (or failure).
Edit: By the way, thanks for your commitment to improving BGEE!
Okay, I couldn't resist. I had to try it. This is what I did:
- Created a backup folder on my second hard drive and placed a copy of the BGEE Scripts there.
- Deleted the Scripts from the BGEE installation Scripts folder.
- Copied the Scripts from the original BG installation Scripts folder to the BGEE installation Scripts folder.
- Ran BGEE and made sure my Halfling Thief had the Custom (Default) Script.
- I started a new BGEE game and took my Thief to train with Obe in Candlekeep.
My Thief, equipped with his Short Bow, performed as expected! He stood his ground and continued to attack with his Short Bow until he and his temporary party members had killed all the Gibberlings.I'm still not ready to install the original TotSC, but I might go ahead and install Baldur's Gate II, so I can get those Scripts and see if they'll work. I won't get to it until later tonight or tomorrow; time permitting.
If the BGII Scripts work, I won't mind sharing, if there's someway I can upload the Scripts for everyone to download. Otherwise, someone else with original copies of these games will have to do it. ;-)
Expected Behavior: Rogue stays put and uses arrows until enemy moves to rogue (or archer, I suppose).
What happened to this script?
I simply want my characters who are firing at range to keep firing once enemy number 1 is dead. Is there a way for someone with little computer knowledge to fix this manually?
Should only move into melee range with a melee weapon equipped.
http://forum.baldursgate.com/discussion/10675/archers-are-not-melee-fighters
We do owe BeamDog for putting out BG:EE and laying the groundwork but doing things like fixing bugs on my own rather makes the game feel like it is "mine", if you know what I mean. A few bugs here and there are, for me, not a problem--although I am doing more tweaking than playing I am still enjoying BG:EE immensely.
Once you get those installed, NearInfinity can extract the .bs files from their .bif folder easily enough. I seem to recall--eons ago, which is another way of saying "10 years ago"--I had a tool called Biff Extractor, which would pull everything out of a .bif and dump the files into a folder; I had every type of "normal" item to use as a base for creating new items in BG and IWD. I have ToB still installed on the other computer, so I can pull anything from there I might need. Someone else is using a DropBox for sharing portraits; I suppose that could be done for scripts...except I don't use DropBox or anything cloud-related. Old-fashioned Internet and e-mail is good enough for me.
Might have to wait a while before I finish playing it between this and the companion dialog loops...mainly rasaad. I had to force spawn a duplicate of rasaad simply because he wouldn't rejoin my group and kept getting stuck in the dialog loop. so now i have 2 rasaads in the world.
To everyone who missed my previous post above:
If you have the original Baldur's Gate installed:
- Backup your Baldur's Gate: Enhanced Edition Script files.
- After you backup your Baldur's Gate: Enhanced Edition Script files, delete the Script files from the Baldur's Gate: Enhanced Edition installation Script folder.
- Copy your original Baldur's Gate Script files into your Baldur's Gate: Enhanced Edition Script folder.
- Run Baldur's Gate: Enhanced Edition, select your preferred Script and enjoy!
If you don't have the original games and Overhaul Games (or Beamdog) doesn't patch this soon, then you'll just have to wait until I can find a way (and a place) to upload the working Scripts for you. (Sorry, but I'm not a developer or programmer. I'm just a gamer, like you).Ciao for now,
Justin Perusoe Darkwater