Jump to content


Photo

stutter bug


  • Please log in to reply
13 replies to this topic

#1 Bloodtitan

Bloodtitan
  • Member
  • 406 posts

Posted 13 August 2006 - 11:27 AM

hi,
upon reaching baldurs gate in my game, it all began to stutter. i do not and did not have any scripts running and all my bags had nearly no items. the game ran fine with absolutely no stuttering on the baldurs gate bridge, just as i entered the city, i got the lags.

it is no memory issue, restarting the game and loading a save just keeps the stuttering. i then did what is described at the end of this topic: http://www.shsforums...0123&hl=stutter but it did not help me at all

can having too much ammo in your quiver cause this ? i have some hundreds of reloads in the quiver for 2 chars - but how would that be related to entering baldurs gate ? i had that much ammo on the bridge too and it did not affect me.

Attached: WeiDU.log (renamed to .txt)

Attached Files



#2 Wardibald

Wardibald
  • Member
  • 55 posts

Posted 13 August 2006 - 11:30 PM

Hi,

For what it's worth:
I experienced stutter in BG, until that guy Hassan(I think, the drunken thief) in the thieves guild had talked to me about the iron throne, and went to the elfsong tavern.

This might not help you, but you never know.
Horum omnium fortissimi sunt Belgae - J. Caesar, De Bello Gallico

#3 Bloodtitan

Bloodtitan
  • Member
  • 406 posts

Posted 14 August 2006 - 01:05 AM

i'll try that, thanks.

EDIT: WOOHOO! take that, stutter demon! i banish thee and good riddance.

this worked, thanks a lot.

Edited by Bloodtitan, 14 August 2006 - 01:14 AM.


#4 radish_hoedown

radish_hoedown
  • Member
  • 201 posts

Posted 14 August 2006 - 09:11 AM

anyone know what continuous checks is Husam running? surely it must be quite a few to cause stutter?




edit: *whistles*

Edited by radish_hoedown, 14 August 2006 - 09:53 AM.


#5 Bloodtitan

Bloodtitan
  • Member
  • 406 posts

Posted 14 August 2006 - 09:33 AM

his name is Husam by the way.

#6 radish_hoedown

radish_hoedown
  • Member
  • 201 posts

Posted 14 August 2006 - 09:54 AM

yeah, husam... thats what i said... :whistling: ;)

#7 King Diamond

King Diamond

    Give Me Your Soul...Please

  • Modder
  • 1430 posts

Posted 14 August 2006 - 10:16 AM

Is it possible that BP puts too heavy scripts burden upon certain creatures?
For example, HUSAM2.CRE, instead of very short SHOUT and WTASIGHT (that take no more than 100 code lines in sum), receives BPTHFSHT (907 lines) and BPWTSIGT (964 lines) instead. And it's necessary to take in account that those scripts are just of secondary importance for that CRE.... :whistling: And if it's true for all actors of the area...... :wacko:

P.S. And what a nice code (at the end of BPWTSIGT):
IF
	 ActionListIsEmpty()
THEN
	 RESPONSE #100
		  AttackOneRound(LastSeenBy(Myself))
END

Is it ever being activated? ;) :D

Edited by King Diamond, 14 August 2006 - 10:21 AM.

(last update: 02-12-2008)
----------------------------------------------
SoS, v1.13
TDD, v1.12
TS-BP, v6.10
CtB, v1.11
RoT, v2.1
----------------------------------------------
BP Animations Scheme


#8 Wardibald

Wardibald
  • Member
  • 55 posts

Posted 17 August 2006 - 11:25 AM

Hi,

Apparently the dreaded stutter bug struck again in my game. It's bad enough to completely ruin my game experience.
I've had a bit of it in Athkatla, but nothing serious. Well, not in comparison with what's happening now anyway. My game is frozen half of the time every half second. It's that bad.

It kicked in at the druid grove map, around the time I killed some fellows in combat with trolls. I had hoped to find the culprit in that map, or at the grove itself, but I didn't. It also didn't stop when leaving the area.

My ambient sounds are at minimum and I don't think it's an item. It's got me baffled for now.

I know this can be a nasty problem to root out, but I could use some help now.
Horum omnium fortissimi sunt Belgae - J. Caesar, De Bello Gallico

#9 Himself

Himself

    CEO of the ENDLESS WAVES OF BAD DOGGIE

  • Member
  • 230 posts

Posted 17 August 2006 - 02:00 PM

Is it possible that BP puts too heavy scripts burden upon certain creatures?



wanna be the first to agree on that, if a script has more than the minimum that would be required for it to be accurate and do the job well.. I mean when the script starts getting too "cute" :wub: and wanting to cover way too much possibilities, I don't think its going in the right way ^_^ , speaking in a "lets not overwhelm the engine" perspective.

Edited by Himself, 17 August 2006 - 02:01 PM.

...to be isn't important, we're no longer than we're :)

#10 Wardibald

Wardibald
  • Member
  • 55 posts

Posted 18 August 2006 - 12:28 PM

Found the problem finally. It's the Rejiek Hidesman in trademeet quest. Once the skin dancer is dead, the stutter stopped.

At first I thought it was the brown dragon encounter in the grove, but then I realised I don't have that installed :doh:

Since apparently the Husam stutter was reproduced in another game, maybe this one will too :huh:
In any case, problem solved.
Horum omnium fortissimi sunt Belgae - J. Caesar, De Bello Gallico

#11 erebusant

erebusant

    It takes a village...

  • Modder
  • 2109 posts

Posted 18 August 2006 - 02:07 PM

Found the problem finally. It's the Rejiek Hidesman in trademeet quest. Once the skin dancer is dead, the stutter stopped.

At first I thought it was the brown dragon encounter in the grove, but then I realised I don't have that installed :doh:

Since apparently the Husam stutter was reproduced in another game, maybe this one will too :huh:
In any case, problem solved.



I guess the next step in tracking down the root to these specific stutter issues is trying to narrow it down totally. I've read about the Riejek/Skindancer quest causing a stutter and Robillard quest causing a stutter. Both of which went away upon quest completions,,,

It takes a village...


#12 erebusant

erebusant

    It takes a village...

  • Modder
  • 2109 posts

Posted 18 August 2006 - 03:24 PM

Will missing Continue()'s in area .BCS files be a culprit in the stuttering issue? Just a quick look at my override file at AR0020.bcs for example showed about 20 IF/THEN blocks without Continues.

It takes a village...


#13 Wardibald

Wardibald
  • Member
  • 55 posts

Posted 18 August 2006 - 05:20 PM

I regret to say I have no knowledge in the actual scripting department. I can only alter codes in NI if I get the most specific of instructions.

This stutter bug (almost) gave me no indication about where to look. In retrospect it probably started in the tanner house in the bridge district, but it was barely noticable then. I ran around with it for a reasonable amount of time, when I entered AR1900, where it suddenly got much worse. Naturally I thought the problem was in that area, but I couldn't find anything on the forums(with a search button not working for me half of the time, so I just thought I'd ask).

There was nothing in that map that I did, that would advance the Rejiek plot. I hadn't met the rakshasa there, I was only about half way.

If you'd suffer a remark "unfettered by any knowledge to the point", maybe that "continue()"-scripting needs a certain threshold to be passed, before it starts weighing on the engine?
Horum omnium fortissimi sunt Belgae - J. Caesar, De Bello Gallico

#14 Himself

Himself

    CEO of the ENDLESS WAVES OF BAD DOGGIE

  • Member
  • 230 posts

Posted 18 August 2006 - 09:50 PM

I think continue() is only mandatory when you add a OnCreation() to the IF.

What you can do knowing very little about script is messing around the sequence of the IFs, you can arrange so that the sequence runs better (by either moving the trigger(s) most likely to be invalid to the top and/or moving the trigger(s) that make the engine calculate more, to the botton), some scripts are, to put it nice, moronic wirtten, for example

IF
PartyHasItem("blabla1")
PartyHasItem("blabla2")
PartyHasItem("blabla3")
Global("blabla","Global",1)
Dead("Himself")

This will only ever be needed if Global blabla is 1 and Himself is dead, so there is no point in having item check on the top of the chain (other than making the engine work more), since the script will ignore the rest of the sequence as soon as one of the conditions is not valid, you should change it to

IF
Global("blabla","Global",1)
Dead("Himself")
PartyHasItem("blabla1")

Also, this is an example of a script that you should change:

IF
Global("blabla","Global",1)
Dead("Himself")
PartyHasItem("blabla1")
PartyHasItem("blabla2")
PartyHasItem("blabla3")
Then
Response #100
SetGlobal("emotears","Global",7)
END

This could cause stutter, not because its item related, but because it repeats itself, there are no conditions in the response to make the check invalid, even after its purpose has been fulfilled ("emotears","Global",7). So this check will keep running after the global blabla has been set to 1 and Himself is dead, until something actually changes the global blabla to a value different than 1. (it could take some time)

So you could make it like like

IF
Global("LessItemChecksPlz","Global",0) (or arXXXX)
Global("blabla","Global",1)
Dead("Himself")
PartyHasItem("blabla1")
PartyHasItem("blabla2")
PartyHasItem("blabla3")
Then
Response #100
SetGlobal("emotears","Global",1)
SetGlobal("LessItemChecksPlz","Global",1) (or arXXXX)
END

This way you make sure the check will only run successful once. (It is extremely unlike that scripts of this kind would need to run twice)

You could aslo try to change some combat scripts, though these are a little more complicated.

IF
ActionListEmpty()
Heard([ANYONE],ALERT_151)
Range(LastHeardBy(Myself),40)
!TargetUnreachable(LastHeardBy(Myself))
!Allegiance(Myself,ENEMY)
!HaveAnySpells()
!HasWeaponEquiped(Myself)
Class(Myself,INNOCENT)
THEN
RESPONSE #100
RunAwayFrom(LastHeardBy(Myself),6)
END

move the Class(Myself,INNOCENT) and !Allegiance(Myself,ENEMY) closer to the top, and the Range(LastHeardBy(Myself),40) and !TargetUnreachable(LastHeardBy(Myself)) to the bottom, this way you have saved the engine some work ^_^

If you start changing scripts this way, you can save the engine thousands of checks in the long run, but always backup everything, just in case something was not meant to be ;)

Edited by Himself, 19 August 2006 - 09:38 AM.

...to be isn't important, we're no longer than we're :)