Jump to content


Photo

Timer is set but not running


  • Please log in to reply
40 replies to this topic

#21 Vlad

Vlad
  • Member
  • 576 posts

Posted 15 November 2015 - 12:49 AM

I've browsed this document quite far, but found only one useful thing - fixing AddKit(). Now I can add kit to Keldorn in the game, as previously it didn't work. But frankly, the rest is either useless or insignificant for an end user. So, just because of AddKit(), I doubt I'll mess with EXE.

#22 Roxanne

Roxanne

    Modder

  • Member
  • 3564 posts

Posted 15 November 2015 - 02:00 AM

Timer test conducted with various bgmain.exe versions

 

With help from Lollorian and Vlad I was able to run a test with timers set in an area script and using different bgmain.exe files.

 

Here are the results

 

Test setup - unmodded BG2 game, area0602 (Irenicus Dungeon), with the following added to ar0602,bcs

 

IF
    Global("Timertest1","Global",0)
    InParty("Imoen")                    >>>> Note In my unmodded game the Imoen appearing here has DV Imoen NOT Imoen2
THEN
    RESPONSE #100
        SetGlobal("Timertest1","Global",1)
        RealSetGlobalTimer("06Time1","Global",100)     One Minute on the clock
END

IF
    Global("Timertest2","Global",0)                   This block was added out of curiosity, I never saw times set locally in the area work
    InParty("Imoen")
THEN
    RESPONSE #100
        SetGlobal("Timertest2","Global",1)
        RealSetGlobalTimer("06Time2","ar0602",200)      120 seconds on the clock
END

IF
    Global("Timertest3","Global",0)
    InParty("Imoen")
THEN
    RESPONSE #100
        SetGlobal("Timertest3","Global",1)
        SetGlobalTimer("06Time3","Global",100)      90 seconds on the clock
END

IF
    Global("Timertest1","Global",1)
    RealGlobalTimerExpired("06Time1","Global")
THEN
    RESPONSE #100
        SetGlobal("Timertest1","Global",2)
        ActionOverride(Player1,DisplayStringWait(Myself,4445))          Some random text depending on your dialogue talk
END

IF
    Global("Timertest2","Global",1)
    RealGlobalTimerExpired("06Time2","ar0602")
THEN
    RESPONSE #100
        SetGlobal("Timertest2","Global",2)
        ActionOverride(Player1,DisplayStringWait(Myself,4447))     Some random text depending on your dialogue talk
END

IF
    Global("Timertest3","Global",1)
    GlobalTimerExpired("06Time3","Global")
THEN
    RESPONSE #100
        SetGlobal("Timertest3","Global",2)
        ActionOverride(Player1,DisplayStringWait(Myself,4449))    Some random text depending on your dialogue talk
END

 

Test1

Run with my own unmodded bgmain.exe (but tweaked for NoCD). Starting new game wait until Imoen joins, wait some minutes and observe.

Result - the text strings from block 1, 2, 3 were displayed after 60 resp 90/120 seconds

 

Test2

Replaced bgmain.exe with the one used by Vlad when reporting his issues. Same test as above

Result - Identical to Test 1

 

Test3

Run in a completely modded BGT install (expert selection, all you can possibly grab consistently). BGmain.exe modded by Tobex, NoCD, InfinityAnimations 1PP, (more?).

Result - Identical to Test 1

 

Global result

Timers set in area script regardless of method used (RealGlobal. Global, set locally to area) are working - the issue reported seems to be unrelated to bgmain.exe (or any specific mod). The issue must be something that Vlad is using and I do not, so it seems.

 

PS - This is the log for the full modded installation used in Test3


Edited by Roxanne, 15 November 2015 - 05:34 AM.

The Sandrah Saga

another piece of *buggy, cheesy, unbalanced junk*

 


#23 Vlad

Vlad
  • Member
  • 576 posts

Posted 15 November 2015 - 04:55 AM

What about others who mentioned the same problem here?

 

By the way, how you can do that:

 

RealSetGlobalTimer("06Time2","ar0602",FORTY_MINUTES)

 

FORTY_MINUTES is not accepted by the engine (at least I get the scripting error). First, the corresponding time IDS file (don't remember its name) doesn't contain this value, and second (may be more important), Real timers receive only values, not strings. At least, the compiler says that.

 

[EDIT] I feel like we're modding different games. I have uploaded my BGII - SoA folder (2.49 GB) to my Google drive. It's a clean GOG installation, if you want to try. 


Edited by Vlad, 15 November 2015 - 05:00 AM.


#24 Roxanne

Roxanne

    Modder

  • Member
  • 3564 posts

Posted 15 November 2015 - 05:28 AM

What about others who mentioned the same problem here?

 

By the way, how you can do that:

 

RealSetGlobalTimer("06Time2","ar0602",FORTY_MINUTES)

Right - This is how the NI translates the compile taking the value from its GTIMES.ids (I copied from there for the post, however it is not what the game was using) - my inputs where 100 and 200 e.g. RealSetGlobalTimer("06Time2","ar0602",200)

I have edited the post.

FORTY_MINUTES is not accepted by the engine (at least I get the scripting error). First, the corresponding time IDS file (don't remember its name) doesn't contain this value, and second (may be more important), Real timers receive only values, not strings. At least, the compiler says that.

 

[EDIT] I feel like we're modding different games. I have uploaded my BGII - SoA folder (2.49 GB) to my Google drive. It's a clean GOG installation, if you want to try. 


Edited by Roxanne, 15 November 2015 - 05:35 AM.

The Sandrah Saga

another piece of *buggy, cheesy, unbalanced junk*

 


#25 The Imp

The Imp

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

  • Member
  • 4714 posts

Posted 15 November 2015 - 10:56 AM

Right - This is how the NI translates the compile taking the value from its GTIMES.ids (I copied from there for the post, however it is not what the game was using) - my inputs where 100 and 200 e.g. RealSetGlobalTimer("06Time2","ar0602",200)
I have edited the post.

Yeah, that only proves that you had a modified game. Nothing else.
As the gtimes.ids was modified... making this:

Test setup - unmodded BG2 game,

INVALID. :new_bottom:


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.


#26 Roxanne

Roxanne

    Modder

  • Member
  • 3564 posts

Posted 15 November 2015 - 11:00 AM

Right - This is how the NI translates the compile taking the value from its GTIMES.ids (I copied from there for the post, however it is not what the game was using) - my inputs where 100 and 200 e.g. RealSetGlobalTimer("06Time2","ar0602",200)
I have edited the post.

Yeah, that only proves that you had a modified game. Nothing else.
As the gtimes.ids was modified... making this:

Test setup - unmodded BG2 game,

INVALID. :new_bottom:

No - I open NI (per default it opens in a modded game, last used by NI), I then open an external file ar0602,bcs from where I ran the test>>> NI uses the translation from the source I opened it, not from where the opened file is located - try yourself.


The Sandrah Saga

another piece of *buggy, cheesy, unbalanced junk*

 


#27 Vlad

Vlad
  • Member
  • 576 posts

Posted 15 November 2015 - 12:26 PM

Why unmodded without nocd patch crashes my game?



#28 Roxanne

Roxanne

    Modder

  • Member
  • 3564 posts

Posted 15 November 2015 - 12:43 PM

Why unmodded without nocd patch crashes my game?

I do not know - the unmodded was a backup in that folder that I have since 2001. I never used and never checked it. I was just assuming it was the backup from the nocd patch because it has the same change date on it. When I use it, it comes up asking for insertion of the disc. When I insert the iso file into my virtual drive it starts the game without crash.

Probably another indication that the installations are different by more than just the exe files??


The Sandrah Saga

another piece of *buggy, cheesy, unbalanced junk*

 


#29 Vlad

Vlad
  • Member
  • 576 posts

Posted 15 November 2015 - 02:21 PM

I have another issue now, which I have never had before as most of my NPCs added in the mods have their own custom made kits. Probably, I should open the new topic but let's make it here for a while. Now when I add new innate spells to kits of GA_SPIN type to the CLAB file (the new spells, which should appear in custom slots with level progression), I'm getting the line in the window saying that my NPC gains this spell when he reaches a new level, but the spell itself doesn't appear in the innate slots. It looks like the number of these spells are now limited by the engine, which never happened before.


Edited by Vlad, 15 November 2015 - 02:22 PM.


#30 Roxanne

Roxanne

    Modder

  • Member
  • 3564 posts

Posted 15 November 2015 - 02:31 PM

I have another issue now, which I have never had before as most of my NPCs added in the mods have their own custom made kits. Probably, I should open the new topic but let's make it here for a while. Now when I add new innate spells to kits of GA_SPIN type to the CLAB file (the new spells, which should appear in custom slots with level progression), I'm getting the line in the window saying that my NPC gains this spell when he reaches a new level, but the spell itself doesn't appear in the innate slots. It looks like the number of these spells are now limited by the engine, which never happened before.

Again, different over here with my install. All innate abilities for my NPC (also with a custom kit) appear and at higher levels the selection becomes scrollable if not all of them can be displayed simultaneously anymore - same for the PC when he gains all the Bhaal abilities and then the extras in ToB. I have never reached a limit here,


The Sandrah Saga

another piece of *buggy, cheesy, unbalanced junk*

 


#31 Fiann of the Silver Hand

Fiann of the Silver Hand
  • Member
  • 286 posts

Posted 15 November 2015 - 10:25 PM

Is it possible you simply have a corrupt exe from GOG?

#32 Vlad

Vlad
  • Member
  • 576 posts

Posted 16 November 2015 - 12:14 AM

"Corrupt" exe sounds drastic.  :lol:



#33 Fiann of the Silver Hand

Fiann of the Silver Hand
  • Member
  • 286 posts

Posted 16 November 2015 - 12:39 AM

It took a bribe.

I'm going to assume if we swap exes, there's no legal issues. If you don't want to re-d/l the GOG install, I can pm you my clean exe.

#34 Roxanne

Roxanne

    Modder

  • Member
  • 3564 posts

Posted 16 November 2015 - 01:25 AM

It took a bribe.

I'm going to assume if we swap exes, there's no legal issues. If you don't want to re-d/l the GOG install, I can pm you my clean exe.

I did the swap with Vlad and was able to run my unmodded BG2 game with his exe. It was possible to test the timer issue (it works with my game even when using Vlad's exe) - the kit issue of course cannot be tested in an unmodded game and I cannot get Vlad's exe to work on a modded game I have.

I am not expert enough to decide whether the issues are due to exe alone or more is amiss/different.


The Sandrah Saga

another piece of *buggy, cheesy, unbalanced junk*

 


#35 Vlad

Vlad
  • Member
  • 576 posts

Posted 16 November 2015 - 01:27 AM

Thank you, as we have already found it's not an EXE issue. The "corrupt" exe is just crashing the game, nothing else.  :)



#36 Fiann of the Silver Hand

Fiann of the Silver Hand
  • Member
  • 286 posts

Posted 16 November 2015 - 05:21 PM

Good enough.

As a note, weird things can happen with ARxxxx as the location of a variable. Let's say you have this as the script for AR0700:
 
 
IF
  !GlobalTimerNotExpired("blahtimer","AR0700")
THEN
  RESPONSE #100
    SetGlobalTimer("blahtimer","AR0700",300)
    DisplayStringHead(Player1,22187)
    Continue()
END

But, let's say the above script is assigned to AR1400. Because the location doesn't match, it would run continuously (while in that area). Combine this with what I mentioned earlier about an area timer script continuing to run one final time after leaving said area, and you can get the messed up spawning as previously reported. I would search other scripts for references to the area(s) where the timers seem to not be working, or not working properly.

Edited by Fiann of the Silver Hand, 16 November 2015 - 05:23 PM.


#37 Vlad

Vlad
  • Member
  • 576 posts

Posted 05 December 2015 - 10:09 AM

Seems it's the problem with script compiler in the latest NI version. Could someone check?



#38 The Imp

The Imp

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

  • Member
  • 4714 posts

Posted 05 December 2015 - 10:16 AM

Seems it's the problem with script compiler in the latest NI version. Could someone check?

You are using one of the "v1.36" snapshots, correct ? And not the 2004 version.


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.


#39 Vlad

Vlad
  • Member
  • 576 posts

Posted 05 December 2015 - 02:23 PM

Yes, I've used it until now.



#40 Krevett

Krevett
  • Member
  • 4 posts

Posted 06 December 2015 - 02:56 AM

I found the problem and got my timers running for my version. It's indeed a NI issue! In my case, IWD in BG2 was not recognized as a BG2 game by NI. By adding the "baldur.exe" file to my root directory, NI now recognize the game as BG2 and the scripts are working as they should!

I don't know if it's the same issue for Vlad but be sure to check wich game NI is checking before compiling your script.

 

Edit: I'm using the latest snapshot of NI v1.36 20151112


Edited by Krevett, 06 December 2015 - 02:58 AM.