Jump to content


Photo

Timer is set but not running


  • Please log in to reply
40 replies to this topic

#1 Vlad

Vlad
  • Member
  • 577 posts

Posted 11 October 2015 - 09:10 AM

Have someone encountered a problem that a timer is set but not running during the game?



#2 The Imp

The Imp

    Not good, see EVIL is better. You'll LIVE.

  • Member
  • 5155 posts

Posted 11 October 2015 - 09:51 AM

Well it's hardly likely that if the timer is properly set that it's not running as texchnically when it's set, it's ran by comparing it to the current game time... as if you set the global timer to a index of x, it's the current time plus the x, and after that, the timer is always expired... that is, unless you reset it of course.

Yep, Jarno Mikkola. my Mega Mod FAQ. Use of the BWS, and how to use it(scroll down that post a bit). 
OK, desert dweller, welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand. Ouh, actually it was still snow then.. but anyways.


#3 Vlad

Vlad
  • Member
  • 577 posts

Posted 11 October 2015 - 01:13 PM

Another flying bug in IE.

 

BGT with Baldurdash and Keldorn's Romance, nothing else. New timers are set but not running.

 

[EDIT] Surprise: I found that this problem was known to Bioware. In addition to GlobalTimerExpired or !GlobalTimerNotExpired in some scripts they insert a very long Wait like Wait (40) as a backup. Now it turns to be that the timer set in these scripts doesn't run at all.


Edited by Vlad, 11 October 2015 - 01:31 PM.


#4 micbaldur

micbaldur

    Retired Perkele, Ultimate BWP player

  • Member
  • 1692 posts

Posted 11 October 2015 - 02:14 PM

Hello Vlad.

 

It seems that i encountered this global timer problem today. More info about my experince is here.


CHARNAMEs excellent adventures in the world of BWP expert-install here

 

Thanks to Leonardo Watson for making this possible


#5 Vlad

Vlad
  • Member
  • 577 posts

Posted 12 October 2015 - 09:51 AM

Yes, it's the same problem. You can make several saves in some intervals of time and see in NI that the timer is not running. Another check would be to put the timer as !Expired in the script, and you'll see that this behaviour changes. I'm now switching to using Wait(120) (or longer) in such situations when I need to spawn creatures after some time and with some conditions. Look in AMNTRP0x scripts.

 

I'll give an example:

 

IF
	Delay(10)
	Range([PC],20)
	!AreaCheck("AR0400")
	!AreaCheck("AR0900")
	!AreaCheck("AR0020")
	!StateCheck([PC],STATE_INVISIBLE)
	!StateCheck([PC],STATE_IMPROVEDINVISIBILITY)
	Global("VP_Guild_Attacked","GLOBAL",1)
	Global("VP_Summon_Thieves","GLOBAL",0)
	!GlobalTimerNotExpired("VP_Aran_VengeanceT","GLOBAL")
THEN
	RESPONSE #100
		SetGlobal("VP_Summon_Thieves","GLOBAL",1)
		SetGlobalTimer("VP_Aran_VengeanceT","GLOBAL",3600)
		Wait(3)
		DisplayString(Myself,61774) //  Prepare to be eviscerated, fool.
		CreateCreatureObject("STHIEF1",Myself,0,0,0) // Thief
		CreateCreatureObject("STHIEF2",Myself,0,0,0) // Thief
		Wait(120)
END

IF
	Delay(10)
	Range([PC],20)
	!AreaCheck("AR0400")
	!AreaCheck("AR0900")
	!AreaCheck("AR0020")
	!StateCheck([PC],STATE_INVISIBLE)
	!StateCheck([PC],STATE_IMPROVEDINVISIBILITY)
	!GlobalTimerNotExpired("VP_Aran_VengeanceT","GLOBAL")
	Global("VP_Guild_Attacked","GLOBAL",1)
THEN
	RESPONSE #100
		SetGlobalTimer("VP_Aran_VengeanceT","GLOBAL",3600)
		Wait(3)
		DisplayString(Myself,61774) //  Prepare to be eviscerated, fool.
		CreateCreatureObject("STHIEF1",Myself,0,0,0) // Thief
		CreateCreatureObject("STHIEF2",Myself,0,0,0) // Thief
		DisplayString(Myself,61778) //  You will suffer... oh, yes.
		CreateCreatureObject("STHIEF2",Myself,0,0,0) // Thief
		Wait(120)
END

IF
	Delay(10)
	Range([PC],20)
	!AreaCheck("AR0400")
	!AreaCheck("AR0900")
	!AreaCheck("AR0020")
	!StateCheck([PC],STATE_INVISIBLE)
	!StateCheck([PC],STATE_IMPROVEDINVISIBILITY)
	!GlobalTimerNotExpired("VP_Aran_VengeanceT","GLOBAL")
	Global("VP_Summon_Thieves","GLOBAL",0)
	Global("VP_Guild_Attacked","GLOBAL",1)
THEN
	RESPONSE #100
		SetGlobal("VP_Summon_Thieves","GLOBAL",1)
		SetGlobalTimer("VP_Aran_VengeanceT","GLOBAL",3600)
		Wait(3)
		DisplayString(Myself,61774) //  Prepare to be eviscerated, fool.
		CreateCreatureObject("STHIEF1",Myself,0,0,0) // Thief
		CreateCreatureObject("STHIEF2",Myself,0,0,0) // Thief
		Wait(120)
END

 

If I remove Wait(120), the thieves are not summoned any more. I've checked the timer, and it's not running at all.

 

[EDIT] Changing the number for ONE_DAY or other similar variable doesn't help either.


Edited by Vlad, 12 October 2015 - 10:07 AM.


#6 Vlad

Vlad
  • Member
  • 577 posts

Posted 12 November 2015 - 11:52 AM

Well, finally, I can conclude that no timers should be launched through area scripts. Timers set in area scripts never run. Full stop.



#7 Roxanne

Roxanne

    Modder

  • Member
  • 3564 posts

Posted 12 November 2015 - 12:19 PM

Well, finally, I can conclude that no timers should be launched through area scripts. Timers set in area scripts never run. Full stop.

I cannot confirm that.

I have just checked once again all the timers in this version of ar6600,bcs - they all work.

Attached File  AR6600.BAF   23.33K   401 downloads


The Sandrah Saga

another piece of *buggy, cheesy, unbalanced junk*

 


#8 Vlad

Vlad
  • Member
  • 577 posts

Posted 12 November 2015 - 03:26 PM

Well, then you have probably a different  version of exe.



#9 Fiann of the Silver Hand

Fiann of the Silver Hand
  • Member
  • 286 posts

Posted 12 November 2015 - 11:54 PM

On both the cd and GOG exe, I've had timers in dozens of ARE scripts work fine.  I could test on EE, but I don't think it matters here.
[EDIT] Surprise: I found that this problem was known to Bioware. In addition to GlobalTimerExpired or !GlobalTimerNotExpired in some scripts they insert a very long Wait like Wait (40) as a backup. Now it turns to be that the timer set in these scripts doesn't run at all.
Source?

Edited by Fiann of the Silver Hand, 12 November 2015 - 11:56 PM.


#10 Vlad

Vlad
  • Member
  • 577 posts

Posted 13 November 2015 - 12:49 AM

I'm not going to prove anything here. I've reported my own observations for those who encounter the similar problem. If you don't encounter this problem, then this topic is unrelated to you.



#11 Krevett

Krevett
  • Member
  • 4 posts

Posted 13 November 2015 - 01:07 AM

Hello I posted a problem in the following thread

 

http://www.shsforums...em/#entry582243

 

It seems to be related to this one as a timer is set but seems not to run. When looking through my saves with NI the local timer IS set on the creature but the !GlobalTimerNotExpired seems to return True anyway...



#12 Lollorian

Lollorian

    smiley addict

  • Member
  • 4150 posts

Posted 13 November 2015 - 01:11 AM

@Fiann: I think Vlad deduced it from looking at in-game scripts

 

@Vlad: Since this seems to be engine related and because theres no WeiDU.log for reference - are you using any engine tweaks? ToBEx? Taimon's hacks? The NoCD patch? InfinityAnimations? 1PP?


"I am the smiley addict, yellow and round, this is my grin :D when I'm usually around :P.
When there's trouble brewing, see me post, cuz it's usually a wall o' yellow and your eyes are toast!!!"

BWP GUIDE - BWP FIXES - impFAQ - NPC LIST - KIT LIST - AREA LIST

GitHub Links : BWP Fixpack | Lolfixer | BWP Trimpack | RezMod


#13 Krevett

Krevett
  • Member
  • 4 posts

Posted 13 November 2015 - 01:18 AM

I can add that in the following config the scripts Is working as expected

 

Weidu.log for BG stratagems install

 

Spoiler

 

In this one it is not working

 

Weidu.log for IWD in BG2 install

 

Spoiler

 

I know that the IWD in BG2 install hacks the .exe perhaps that cause the bug

But in my BGT install it works fine really disturbing ;)

 

Edit: IWD in BG2 was not installed from a clean install of BG2 but from a clean install of BGT (without stratagems installed) but it does not seems to cause any bug for playing the game


Edited by Krevett, 13 November 2015 - 01:20 AM.


#14 Roxanne

Roxanne

    Modder

  • Member
  • 3564 posts

Posted 13 November 2015 - 01:23 AM

@Fiann: I think Vlad deduced it from looking at in-game scripts

 

@Vlad: Since this seems to be engine related and because theres no WeiDU.log for reference - are you using any engine tweaks? ToBEx? Taimon's hacks? The NoCD patch? InfinityAnimations? 1PP?

The exe seems the source why it works for some but not for others. From the list above I have all but Taimon's hacks, also I do not have IWD in BG2.

All my timers work, area script or otherwise. So at least some candidates can be eliminated from the list of possible sources.


The Sandrah Saga

another piece of *buggy, cheesy, unbalanced junk*

 


#15 Vlad

Vlad
  • Member
  • 577 posts

Posted 13 November 2015 - 10:02 AM

I've checked on GOG installation + BDash-WeiDU 1.7 + Keldorn Romance 1.0b. Neither BDash, nor KR touch the exe. I've tried to run timers in major Athkatla areas and in custom areas of KR. Like Krevett said, the same issue. Maybe GOG?


Edited by Vlad, 13 November 2015 - 10:05 AM.


#16 Fiann of the Silver Hand

Fiann of the Silver Hand
  • Member
  • 286 posts

Posted 13 November 2015 - 09:05 PM

I'm not going to prove anything here. I've reported my own observations for those who encounter the similar problem. If you don't encounter this problem, then this topic is unrelated to you.
I'm not asking you to prove anything, but the source probably includes similar discussion to avoid redundancy here.

[edit] Tested with GOG + ToBExv26. Timers worked in different AREs. Curiously, the action of the timer I tested with would still execute one more time after leaving the scripted ARE.

Edited by Fiann of the Silver Hand, 13 November 2015 - 09:38 PM.


#17 Vlad

Vlad
  • Member
  • 577 posts

Posted 14 November 2015 - 06:12 AM

I have no idea what's ToBEx and what it does to EXE.



#18 The Imp

The Imp

    Not good, see EVIL is better. You'll LIVE.

  • Member
  • 5155 posts

Posted 14 November 2015 - 09:06 AM

I have no idea what's ToBEx and what it does to EXE.

It's Throne of Bhaal Extender, made by Ascension64's, in short:

 

TobEx (Throne of Bhaal Extender) is a dynamic link library (DLL) written in C++ that fixes game engine bugs and extends the game engine by modifying the virtual image of the Throne of Bhaal BGMain.exe in memory.

It's also used by multiple mods, for it's multiple features that can be enabled and disabled easily.

Unlike the Taimon's hacks, it does it virtually, which means that all the other BGMain.exe edits are retained, as there's no need to overwrite files, or any as much destructive acts.

 

There's no mention of, nor any thing that would hint it to modify the behavior of timers, that I can find.


Edited by The Imp, 14 November 2015 - 09:07 AM.

Yep, Jarno Mikkola. my Mega Mod FAQ. Use of the BWS, and how to use it(scroll down that post a bit). 
OK, desert dweller, welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand. Ouh, actually it was still snow then.. but anyways.


#19 Vlad

Vlad
  • Member
  • 577 posts

Posted 14 November 2015 - 04:17 PM

I understand what extras do, but I don't understand what the core part of ToBEx is doing to the game. My game runs very fast. I can easily switch between the full-screen game and other windows (other programs) just by clicking Windows button and I don't think modifying a virtual image would make it work better.



#20 The Imp

The Imp

    Not good, see EVIL is better. You'll LIVE.

  • Member
  • 5155 posts

Posted 14 November 2015 - 04:54 PM

Well, partly the archaic copyright the game is under is that you shouldn't mess with the bgmain.exe, this goes completely around that.

The core part is just the not in tests(as in, ~130 approved enhancements) portions of the code, things like allowing to get more debug info, more than 10 kits to be in one class selection screen, having more than 24 spells cast-able from a single spell level etc(the user interface is also enhanced to allow their viewing), enabling more opcodes and that sort of things. Nearly all the descriptions can be read from here, their usage can individually be enabled or disabled in the control (TobExCore).ini file, just like the additional optional components, but those are controlled by the other .ini file.

 

Those are the things I know off... there's others, that I have no clue. :)


Edited by The Imp, 14 November 2015 - 05:53 PM.

Yep, Jarno Mikkola. my Mega Mod FAQ. Use of the BWS, and how to use it(scroll down that post a bit). 
OK, desert dweller, welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand. Ouh, actually it was still snow then.. but anyways.