Skip to content

#18113 AR4100 and AR5400 script blocks should have proper boundaries

ErgErg Member Posts: 1,756
edited December 2015 in BG:EE Bugs (v1.3)
This bug affects modders using, for example, EXTEND_BOTTOM to append code to AR5400.BCS or AR4100.BCS, but could also potentially affect new official content modifying those area scripts.

Current Behaviour: additional code added at the bottom of AR5400.BCS or AR4100.BCS is not executed.

Replacing the following code (there are 2 instances for each script, for a total of 4 instances)
THEN
RESPONSE #100
TriggerActivation(something)
END
with
THEN
RESPONSE #100
TriggerActivation(something)
Continue()
END
fix the issue.
Post edited by AlexT on
Gate70

Comments

  • DeeDee Member Posts: 10,447
    Can you upload a WeiDU script that reproduces the issue, so that we could see the behavior (and then compare it after the fix is applied)?

    For modding-related issues we'll need some way to see what the physical effects are in-game when those mods are applied.
    CrevsDaak
  • ErgErg Member Posts: 1,756
    No problem, I'll prepare a dummy mod to illustrate the problem and upload it as soon as it is ready.
  • ErgErg Member Posts: 1,756
    edited September 2014
    I'm uploading two WeiDU mods. The first illustrate the bug, the second illustrate that it can be fixed by adding the Continue() command as explained in my previous post.

    The mods only show that for AR5400, but it would be the same for area AR4100.

    The first mod adds code at the bottom of AR5400.BCS that should display the string "done" over the head of the main character as soon as he enters area AR5400.

    The second mod adds both the additional code and the missing Continue() commands.

    Repro steps for the first mod:

    1) install the mod TestBug1
    2) start a new game with the Abdel pregen
    3) C:MoveToArea("AR5400")
    4) the string "done" will not be displayed because the additional code is not executed

    Repro steps for the second mod:

    1) install the mod TestBug2
    2) start a new game with the Abdel pregen
    3) C:MoveToArea("AR5400")
    4) the string "done" will be displayed as expected

    Edit: actually the string "done" can't be seen over the head of the main character, because MoveToArea places him in the upper left corner of the map, but that's not a problem as the string should also be visible in the dialogue window.

    image
    Post edited by Erg on
    Dee
  • ErgErg Member Posts: 1,756
    CamDawg said:

    Argh, no, we need to stop those blocks infinitely looping instead of band-aiding them with Continue()s.

    Thanks @CamDawg, your solution is much better.

    I will replace Continue() with do_once variables as temporary fix in one of my mods, until the issue is officially addressed.
  • Avenger_teambgAvenger_teambg Member, Developer Posts: 5,862
    edited September 2014
    CamDawg said:

    Argh, no, we need to stop those blocks infinitely looping instead of band-aiding them with Continue()s.

    Yes! A continue would just fix the mod. But we are here to fix the game.
    A continuously triggering area script block SLOOOOWS the game down.
    We should absolutely treat these cases, and not specifically because of mods, but because the official content is crippled as well.

    Any continuously firing scripts should be treated as lag causing bugs (B or C depending on severity).
    AnduinCrevsDaak
  • ErgErg Member Posts: 1,756

    A continuously triggering area script block SLOOOOWS the game down.

    Any continuously firing scripts should be treated as lag causing bugs (B or C depending on severity).

    I would say no more than C, considering that this is a vanilla BG1 bug and in 15+ years no one ever noticed before.

    I've only found out about this, because it breaks the spawning script in EasyTutu, but the slowdown is not noticeable, at least on my machine, and the previous one, and the one before that, etc... As I said 15+ years :)

    But, I guess you have to deal with iPads and phones too now, so, I don't know, maybe there the slowdown becomes noticeable.
Sign In or Register to comment.