Gom Jabbar Posted October 29, 2008 Share Posted October 29, 2008 Sorry for such a basic question, but can you explain how Continue() is processed in a BG1 AI script ? If the following script is applied to one of PCs in BG1 (standard install Version 1.1.4315 without any mod) // Block1 IF See([ANYONE]) THEN RESPONSE #100 DisplayString(Myself,1001) Continue() END // Block2 IF True() THEN RESPONSE #100 DisplayString(Myself,1002) END //Block3 IF True() THEN RESPONSE #100 DisplayString(Myself,1003) END I get String 1001 then String 1002 and finally String 1003 and that sequence loops as long as the script is active. I thought the Block3 'd never been executed because the Block2 is always true. I expected Block2 to be parsed after executing Block1(because of continue()) and then the script restarts. But it seems that the Continue() action makes the script execute every next block with a valid trigger until the last one before restarting. Can you confirm that Continue() works in that way for BG1 ? Do I get the same behavior if that AI script runs in BG2 or BG1:TotSC ? Link to comment
Echon Posted October 29, 2008 Share Posted October 29, 2008 I get the same result but as you said, I would never expect it to reach the third block. I do not know why it it behaves this way. Link to comment
Gom Jabbar Posted October 30, 2008 Author Share Posted October 30, 2008 Thanks for your prompt reply. Did you test it on BG1, BG1:TotSC or BG2 ? Of course, it is a just an example to instance this issue and I get the same behaviour with more complex triggers and scripts. Link to comment
Gom Jabbar Posted October 31, 2008 Author Share Posted October 31, 2008 I'm shocked. All the more strange since the game uses Continue() in its own scripts for NPC ! I noticed this as I was trying and making a thief a little smarter for fun. I’m not very experienced in scripting but making an advanced AI for BG1 sounds like a challenge because of many restrictions (unmanageable ModaleStales, a lot of missing functions, matters to handle inventory, etc ). If the Continue() bug is confirmed, it’s a severe limitation on the scripts for BG1 Link to comment
Echon Posted October 31, 2008 Share Posted October 31, 2008 BG:TotSC, of course. If not, my finding would not really be useful. Link to comment
Avenger Posted November 4, 2008 Share Posted November 4, 2008 BG1 works as reported. (displays all 3 if the first block has continue, displays only the first, if the continue was removed). BG2 works as expected. (displays only 1001/1002 with continue in first block) Doh, this means, i have to add some external compatibility flag to simulate this difference. Link to comment
Guest Guest_Marupal_* Posted November 6, 2008 Share Posted November 6, 2008 Doh, this means, i have to add some external compatibility flag to simulate this difference. Ouch! That seems like an awful lot of work just to duplicate a bug. It seems more than likely that this was something that slipped by the BG1 team because none of the scripts in BG1 fell prey to any ill effects from this flaw. I haven't seen any mention of problems from this with the BGT group. I'd be willing to go through the scripts in the original game files to see if it even makes a difference. I'd be willing to bet a few others would as well to save you the effort of simulating errors. Link to comment
Avenger Posted November 6, 2008 Share Posted November 6, 2008 Yeah, it would be good to know if any of the official BG1 scripts depend on this bug. Probably not, and i hope no one 'uses' it. On 'use' i mean even involuntary dependence. I know the Dragonlance TC was dependent on some quirks due to sloppy coding which was made obvious by gemrb Link to comment
erik Posted November 9, 2008 Share Posted November 9, 2008 Non-expanded IWD1 also works sanely / BG2-like. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.