Skip to content

Main character walks 2 steps then turns around, keeps repeating (BUG)

Does anyone know how to solve this bug?


  • jmerryjmerry Member Posts: 2,945
    Sounds like a "stutter bug" - there's a script that's telling the protagonist to do something, only they can't. Which means that the conditions for that script are still fulfilled, so it tells them to do it again. And again. And again...

    How does one fix the bug? Well, to start with, finding out what script is at fault and why the action can't just be completed is a big help. To which end you have provided absolutely no information.
  • Albatr055Albatr055 Member Posts: 28
    The script I have for my main character is "None".
  • jmerryjmerry Member Posts: 2,945
    That's your combat script. It's not the only script that affects the player's actions.

    I think we can safely say that it's not the script at fault here; as it contains no commands whatsoever, it's not telling your character to do anything.

    The information that would help in this situation involves the context - where you were and what else was going on when this happened. And that's where I bow out, as I don't have SoD myself.
  • jmerryjmerry Member Posts: 2,945
    edited October 2021
    [I meant to add this on to the previous post as an edit. Instead, I made it a new post. So here. Have a standalone example.]

    There's a common variant of stutter bugs based on dialogue - a character has something to say, only they say the wrong thing which doesn't close out the condition that set it up. For example, here's one I just ran into in the main BGEE campaign (2.6, no relevant mods):

    Setup: Sneak up behind Mulahey and backstab him, dealing over half his hit points in one blow.
    Result: Mulahey talks, giving his initial lines. I bluff him. And then he repeats that line about Tazok being unfair over and over...
    The dialogue in that chunk of the combat log takes place over a round. Maybe less.
    How did I get out of this one? My character hid again so he couldn't initiate dialogue, and stabbed him for the rest of his life total.
    If he's dead, he can't say anything.

    The exact details here (not for everybody; script minutia):
    Mulahey starts neutral. His script MULAHEY.bcs tells him to walk over and talk to a PC when he sees one. Then, if the "CDMulahey" variable is greater than zero, he doesn't do that again.

    Mulahey then talks to a PC again when his health drops below half; a nonzero value for the "TalkedToMulahey" variable shuts this one off.

    Then, if CDMulahey is 1 or 4 and he's attacked, he initiates dialogue and increments CDMulahey. If CDMulahey is 2 or 5, he just initiates dialogue.

    We also have to look at the dialogue and other scripts in the area to see how these variables work. Here's the dialogue:
    - His initial conversation (highest priority other than charmed dialogue, CDMulahey = 0) sets CDMulahey to 1 if you bluff him or 3 if you don't. In the latter case, he goes hostile and calls minions.
    - If CDMulahey is 1, he says that "Tazok is unfair" line and goes neutral.
    - If CDMulahey is 2, he calls for minions and goes hostile. CDMulahey becomes 3.
    - If CDMulahey is 4, he thanks you for your mercy and goes neutral.
    - If CDMulahey is 5, he goes hostile again and calls for more minions. CDMulahey becomes 6.
    - If none of the above apply and he's below half health (lowest priority dialogue), he offers surrender. This sets the TalkedToMulahey variable to 1. If you accept the surrender, CDMulahey becomes 4 and he goes neutral. If you don't, CDMulahey becomes 6.

    Next, scripts. There's only one other script that matters for Mulahey's behavior, and that's the script on the chest. If CDMulahey is 1 or 4, add 1 to it. Which makes him talk to you if he's still alive, forcing the chest closed.

    So, what happened here? I knocked Mulahey down to below half health and became visible, causing him to have two reasons to talk. That's fine; he talks. And the highest priority dialogue that applies is his opener. I bluff him, and CDMulahey becomes 1.
    But now, we're in a state that wasn't planned for; CDMulahey is 1, a "not hostile" value. And he's below half health, so he wants to initiate dialogue. He does ... and the dialogue that comes out is "Tazok is unfair". Which doesn't set "TalkedToMulahey", so he still wants to talk. The script repeats.
    Normally, the "Tazok is unfair" line should only come up if you initiate conversation with him..

    Having looked into this one, I can see how to fix it. The command that makes him talk to you when under half health should also set CDMulahey to 3, instead of assuming that it's there already. No more repeats that way.
    So that's what a dialogue stutter bug looks like. In a simple case. It can get a lot more complicated, especially with party members. And it's usually easier to figure these things out when the character is actually saying something every second, because we can look up their dialogue and what that line's conditions are. If they're not saying anything ... it might be a non-dialogue action, or it might be that there just isn't a line of dialogue with currently valid conditions.
  • JuliusBorisovJuliusBorisov Member, Administrator, Moderator, Developer Posts: 22,495
Sign In or Register to comment.