Skip to content

[BUG] Guard Spawns Via Trapped Containers (0824)

KeithSKeithS Member Posts: 623
edited September 2012 in Fixed
Current Behaviour
When caught stealing from a container guards are summoned. Many of these spawn locations are illogical such as spawning directly beside the container or in the bathroom or some other obscure location.

Expected Behaviour
These should be adjusted to match all other guard summons: either the entrance or the stairs depending on the area you are in.

Files altered: Files altered: ar3357, ar3309, ar4805, ar4905, ar0500, ar0512, ar0513, ar0514, ar1501, ar1502, ar1503, ar1504, ar3336, ar0006, ar0007, ar0009, ar0010, ar0011, ar0012, ar0015, ar0016, ar0018, ar0020, ar0021, ar0108, ar0110, ar0116, ar0130, ar0143, ar0155, ar0156, ar0158, ar0160, ar0166, ar0170, ar0303, ar0606, ar0608, ar0611, ar0618, ar0707, ar0711, ar0717, ar0810, ar1103, ar1111, ar1205, ar1207, ar1304, ar1315, ar1006


Fixed in: v0626+

Originally found and fixed in: BG1Fixpack
http://forum.baldursgate.com/discussion/858
Post edited by Bhryaen on

Comments

  • BhryaenBhryaen Member Posts: 2,874
    Ooh, this could be a fun one. @Balquo are you already on this?
  • BalquoBalquo Member, Developer Posts: 2,746
    I'm not actually. Still working on the initiate scripts working during hostile. I'd probably do this after if it is still here.
  • BalquoBalquo Member, Developer Posts: 2,746
    I'm working on this now.
  • BalquoBalquo Member, Developer Posts: 2,746
    edited July 2012
    @KeithS The following are not fixed:
    ar0166 Container 1 - x530 y180
    Container 2 - x530 y180
    Container 3 - x530 y180
    Container 4 - x530 y180
    Container 5 - x530 y180
    Container 6 - x530 y180

    ar0618 Container 3 - x373 y241

    ar0810 Container 4 - x570 y444

    ar1304 Container 1 - x493 y469
    Otherwise all good.
  • KeithSKeithS Member Posts: 623
    @Balquo Understood. Added to the list.
  • KeithSKeithS Member Posts: 623
    Should be good to go for the next version.
  • BalquoBalquo Member, Developer Posts: 2,746
    edited July 2012
    @KeithS One last one. The Nashkel Garrison guard spawns can be almost inside a bed. Adjust containers to match Container 1 coordinates as that was the only one that got it right.
    ar4810 Container 2 - x278 y534
    Container 3 - x278 y534
    Container 4 - x278 y534
    Container 5 - x278 y534
    Container 6 - x278 y534
  • BalquoBalquo Member, Developer Posts: 2,746
    edited August 2012
    @KeithS Still not all fixed: These remain:
    ar0166 Container 5 - x530 y180
    Container 6 - x530 y180
    ar4810 Container 1 - x278 y534
    Container 2 - x278 y534
    Container 3 - x278 y534
    Container 4 - x278 y534
    Container 5 - x278 y534
    Container 6 - x278 y534
    Here is the WeiDU as that may be easier for you.
    COPY_EXISTING ar0166.are override 
    ar4810.are override
    READ_LONG 0x70 con_off
    READ_SHORT 0x74 con_cnt
    FOR (i = 0; i < con_cnt; i += 1) BEGIN
    READ_SHORT (i * 0xc0 + con_off + 0x34) xoff
    READ_SHORT (i * 0xc0 + con_off + 0x36) yoff
    PATCH_IF (xoff = 497) AND (yoff = 166) BEGIN // Container 5 & 6 Trap (ar0166)
    WRITE_SHORT (i * 0xc0 + con_off + 0x34) 530
    WRITE_SHORT (i * 0xc0 + con_off + 0x36) 180
    END
    PATCH_IF (xoff = 259) AND (yoff = 521) BEGIN // Container 1 Trap (ar4810)
    WRITE_SHORT (i * 0xc0 + con_off + 0x34) 278
    WRITE_SHORT (i * 0xc0 + con_off + 0x36) 534
    END
    PATCH_IF (xoff = 235) AND (yoff = 512) BEGIN // Container 2 Trap (ar4810)
    WRITE_SHORT (i * 0xc0 + con_off + 0x34) 278
    WRITE_SHORT (i * 0xc0 + con_off + 0x36) 534
    END
    PATCH_IF (xoff = 231) AND (yoff = 515) BEGIN // Container 3 Trap (ar4810)
    WRITE_SHORT (i * 0xc0 + con_off + 0x34) 278
    WRITE_SHORT (i * 0xc0 + con_off + 0x36) 534
    END
    PATCH_IF (xoff = 240) AND (yoff = 528) BEGIN // Container 4 Trap (ar4810)
    WRITE_SHORT (i * 0xc0 + con_off + 0x34) 278
    WRITE_SHORT (i * 0xc0 + con_off + 0x36) 534
    END
    PATCH_IF (xoff = 243) AND (yoff = 527) BEGIN // Container 5 Trap (ar4810)
    WRITE_SHORT (i * 0xc0 + con_off + 0x34) 278
    WRITE_SHORT (i * 0xc0 + con_off + 0x36) 534
    END
    PATCH_IF (xoff = 241) AND (yoff = 529) BEGIN // Container 6 Trap (ar4810)
    WRITE_SHORT (i * 0xc0 + con_off + 0x34) 278
    WRITE_SHORT (i * 0xc0 + con_off + 0x36) 534
    END
    END
    BUT_ONLY
    Post edited by Balquo on
  • KeithSKeithS Member Posts: 623
    @Balquo Okie, changes made. Thanks for the asssist :)
  • BhryaenBhryaen Member Posts: 2,874
    Ugh, another long list... OK:

    Confirmed Fixed for all:


    AR3357- Guards entered at front door
    AR3309- Guard entered at front door
    AR4805- Guards entered at stairs
    AR4905- Guards entered at the door
    AR0006- Guards entered at front door
    AR0007- (only sleeping NPCs around, so spawned NOBL10) Guards entered at stairs
    AR0009- (only sleeping NPCs around, so spawned NOBL10) Guards entered at stairs
    AR0010- (only Drelik who goes hostile, so spawned NOBL10) Guards entered at front door
    AR0011- (had to unlock and pilfer chest before Jardak got to me to get trigger) Guard entered at stairs
    AR0012- Guard entered at front door
    AR0015- (No initial reaction from Girl to unlocking the only locked chest right in front of her, but finally reacted when she wasn't even present.) Guards entered at stairs
    AR0016- (Chest wasn't even locked, but...) Guards entered at front door
    AR0018- (A third cabinet at 425,131 was locked, but didn't get guards called.) Guards entered at front door
    AR0020- Guards entered at front door
    AR0021- (No NPC around, so spawned NOBL10) Guards entered at stairs
    AR0108- Guards entered at eastern stairs (Not better at front door? Neither one is in view of the thief, of course.)
    AR0110- Guards entered at stairs for all three
    AR0116- Guards entered at front door
    AR0130- (The telescope one?) Guards entered at front door
    AR0143- Guards entered at front door
    AR0155- Guards entered at front door (Note that Containers 2 & 3 are just regular bookcases...)
    AR0156- Guards entered at stairs (chest was unlocked)
    AR0158- Guards entered at stairs
    AR0160- (only sleeping NPCs around, so spawned NOBL10) Guards entered at stairs
    AR0166- Guards entered at stairs for both (and also for two others in area not mentioned)
    AR0170- Guards entered at stairs
    AR0303- Guards entered at stairs (though no guards for locked chest at 95, 339)
    AR0606- Guards entered at stairs
    AR0608- Guards entered at stairs
    AR0611- Guard entered at stairs (also a locked chest (Container 2) with nice treasure which gets no guard summons)
    AR0618- (NI doesn't list a Container 4... and there's only a couple sleeping folks there... However, after spawning NOBL10 and looting Container 3...) Guards spawned at stairs
    AR0707- Guards entered at front door (though container was unlocked)
    AR0711- Guards entered at front door (though container was unlocked and there were two other unlocked containers with goodies in the room which didn't cause a guard spawn...)
    AR0717- Guards entered at front door
    AR0810- (Container 3 at 298, 347 is an empty barrel. It's next to the mechant, but still. And it brings no summoned guards. However the bookcase at 603, 416 (Container 4) had a gem in it and did trigger guards.) Guards entered at front door
    AR1103- Guard entered at front door for all three (though Containers 2 & 3 were simple bookshelves)
    AR1111- (Only Sunin there to witness theft, so it's possible (I did it) to get guards summoned and then fight guards and Sunin. Maybe better to remove guard summons?) Guards entered at front door.
    AR1205- Guards entered at front door
    AR1207- (No one around to see looting Container 3, so spawned NOBL10.) Guards enterd at front door.
    AR1304- Guard entered at front door
    AR1315- Guards entered at stairs
    AR1006- Guard entered at front door


    NOTES:
    *grumble* The coordinates noted in the pdf were for the trap, not the container... *grumble*

    Often the guards spawned at the front door or stairs out of sight of the thief... which was actually quite cool. :-) But... I mean... not even just one guard spawn from the bathroom anymore? Spoil sport...
  • SethDavisSethDavis Member Posts: 1,812
    @Bhryaen - Completely off topic, but your comment just made me realize that I don't think I've seen a bathroom anywhere in this game yet. And I'm pretty sure there were none in Neverwinter Nights.... The implications of this oversight in level design are terrifying!
  • CuvCuv Member, Developer Posts: 2,535
    @SethDavis There are toilets in Nalia's Keep... you find a magic ring in one:P
  • SethDavisSethDavis Member Posts: 1,812
    @Cuv - Ah, ok then. I can stop panicking now.
  • BhryaenBhryaen Member Posts: 2,874
    @SethDavis
    Try some of the upstairs of the homes in BG City. ;-) @Balquo probably knows the areas by heart hehe
  • BalquoBalquo Member, Developer Posts: 2,746
    Unfortunately I don't haha... or maybe I am fortunate that I don't remember such things :P Anyway, many of the homes in BG/Beregost have bathrooms.
  • BalquoBalquo Member, Developer Posts: 2,746
    I'm moving this into Found and Fixed based on KeithS above post.
  • BalquoBalquo Member, Developer Posts: 2,746
    edited August 2012
    @KeithS AR0166 is fixed but AR4810 still has a problem with container 5 but I've no idea why as the code should work. Anyway, here is the code again with a new fix that I just found while testing another fix.
    COPY_EXISTING ar0617.are override 
    ar4810.are override
    READ_LONG 0x70 con_off
    READ_SHORT 0x74 con_cnt
    FOR (i = 0; i < con_cnt; i += 1) BEGIN
    READ_SHORT (i * 0xc0 + con_off + 0x34) xoff
    READ_SHORT (i * 0xc0 + con_off + 0x36) yoff
    PATCH_IF (xoff = 302) AND (yoff = 309) BEGIN // Container 1 Trap (ar0617)
    WRITE_SHORT (i * 0xc0 + con_off + 0x34) 484
    WRITE_SHORT (i * 0xc0 + con_off + 0x36) 455
    END
    PATCH_IF (xoff = 243) AND (yoff = 527) BEGIN // Container 5 Trap (ar4810)
    WRITE_SHORT (i * 0xc0 + con_off + 0x34) 278
    WRITE_SHORT (i * 0xc0 + con_off + 0x36) 534
    END
    END
    BUT_ONLY
  • SethDavisSethDavis Member Posts: 1,812
    Potentially fixed - @Balquo's new fix has been applied. Was the problem with container 5 very noticeable? It looks good now anyway.

    [NOTE] For a good time unlock all of the chests in AR410 with your party consisting of a single level one thief then run around the room opening chests. Then begin the epic battle of the bhaalspawn vs 26 guards.
  • BalquoBalquo Member, Developer Posts: 2,746
    It would have been fine as the guard spawns at the door but one of the guards looks as if it is inside one of the beds.
  • BalquoBalquo Member, Developer Posts: 2,746
    edited August 2012
    @SethDavis @KeithS
    Here is one more but I've no idea how to get this to work in weidu so I'll just attach the file for now. When I try in weidu they all change - how can you specify to change only the last 4 to FLAMEN2?

    Anyway... when you speak to Glanmarie in AR0143 you may get guards summons. They will summon beside her on the stairs but since 5 guards spawn some of them also spawn in the side room. Not only that but they are all initiate guards so once they see you all 5 will try to talk to you at the same time. I changed this and made them spawn at the front door.

    I changed
    CreateCreature("FLAMEN",[0.0],0)
    CreateCreature("FLAMEN",[0.0],0)
    CreateCreature("FLAMEN",[0.0],0)
    CreateCreature("FLAMEN",[0.0],0)
    CreateCreature("FLAMEN",[0.0],0)
    to
    CreateCreature("FLAMEN",[633.480],5)
    CreateCreature("FLAMEN2",[633.480],5)
    CreateCreature("FLAMEN2",[633.480],5)
    CreateCreature("FLAMEN2",[633.480],5)
    CreateCreature("FLAMEN2",[633.480],5)
  • SethDavisSethDavis Member Posts: 1,812
    @Balquo - It's a bit clunky, but this seems to work
    COPY_EXISTING ~GLANMA.DLG~ ~override~
    DECOMPILE_DLG_TO_D
    REPLACE_TEXTUALLY EXACT_MATCH
    ~CreateCreature("FLAMEN",[0.0],0)
    CreateCreature("FLAMEN",[0.0],0)
    CreateCreature("FLAMEN",[0.0],0)
    CreateCreature("FLAMEN",[0.0],0)
    CreateCreature("FLAMEN",[0.0],0)~
    ~CreateCreature("FLAMEN",[633.480],5)
    CreateCreature("FLAMEN2",[633.480],5)
    CreateCreature("FLAMEN2",[633.480],5)
    CreateCreature("FLAMEN2",[633.480],5)
    CreateCreature("FLAMEN2",[633.480],5)~
    COMPILE_D_TO_DLG
    So long as you meant for it to apply to all of the instances where this dlg spawns guards?
  • BalquoBalquo Member, Developer Posts: 2,746
    @SethDavis Ah perfect and yes, you should change all the instances.

    I could have sworn I read somewhere not to use replace_textually on dialogue files... but it seems to work fine :)
  • SethDavisSethDavis Member Posts: 1,812
    @Balquo - I hope you didn't, I've been using it everywhere >.< lol
  • WispWisp Member Posts: 1,102
    No, it is fine.
  • BalquoBalquo Member, Developer Posts: 2,746
    Confirmed fixed for ar0617, ar4810 and glanma.
  • BhryaenBhryaen Member Posts: 2,874
    Confirmed Fixed:

    AR0617- one spawned at front door
    AR4810- three spawned at front door with all 6 chests in the room... all facing the door they came in :-/
    AR0143- very surprised to find guards arriving after having simply spoken to her given that she says nothing of calling the guards... but they showed up all at the front door.
  • BalquoBalquo Member, Developer Posts: 2,746
    @Bhryaen Yeah, nothing can really be done about the facing guards. They are all spawned via a script and that script is used in multiple areas. I requested in the modding thread if we can change the facing direction in the container as you can set the position there so why not the facing direction?
Sign In or Register to comment.