Jump to content


aiqa

Member Since 30 Sep 2017
Offline Last Active Nov 02 2017 02:40 PM

Topics I've Started

Scripting practrices

07 October 2017 - 07:12 AM

In my previous (strongly modded) game I ended up with getting quite a bit of stutter. And after reading up on it and looking over my mods list I noticed I had quite a few script heavy mods that would not really miss (disadvantage of using BWS presets :whistling:).

 

I reinstalled without the mods I thought would be a problem and things are working a lot better for now.

However this did get me thinking about scripting limitations and practices, and how important certain things are.

So the easy thing to first check is the baldur.bcs script, since as I understand it that continuously runs.

 

So now to SOS.

I've noticed my baldur.bcs script is about 13000 lines, and when skimming over those most seem reasonable and at least have a delay or a variable before it starts doing things with items.

SOS however looks a bit weird in that regard.

First of all, SOS adds well over 3000 lines to baldur.bcs, which seems a bit excessive.

Then it has a ton of things like:

IF
	HasItem("CBHBSLZP",Player6)
	PartyHasItemIdentified("CBHBSLZP")
	Global("CbPlayer6Has_Soul_zapper","GLOBAL",0)
	!Global("CbPlayer1Has_Soul_zapper","GLOBAL",1)
	!Global("CbPlayer2Has_Soul_zapper","GLOBAL",1)
	!Global("CbPlayer3Has_Soul_zapper","GLOBAL",1)
	!Global("CbPlayer4Has_Soul_zapper","GLOBAL",1)
	!Global("CbPlayer5Has_Soul_zapper","GLOBAL",1)
THEN
	RESPONSE #100
		SetGlobal("CbPlayer6Has_Soul_zapper","GLOBAL",1)
END

 

To me it looks like that could really do with a Delay(10) or something.

So the question to the people that are a bit more versed in BG2 scripting, is that actually something that could cause stuttering or am I completely on the wrong path?

 

Also I am now still in the early stages of BG1, and I don't really remember those items at all since it's been a while I've last played BG.

Are they even really important in SOS.