The scripts in this WAD use world variables to track some of the player's stats, for example, the state of his "aural translator". It uses two variables for this purpose: TRANA_STAT and TRANA_CHARG. Defined in D2KIncl.acs, lines 172 and 174:
Code: Select all
world int 1:TRANA_CHARG; // Aural translator charge - 20 min
...
world int 3:TRANA_STAT; // Aural translator status - 1 owned and working, 2 needs charge
Code: Select all
Script 1 OPEN
{
...
trana_stat = 1;
trana_charg = 1240; // granularity is 10 seconds
...
}
Code: Select all
if (TranA_Stat == 0) // no translator
{
// msgNormal("Can't understand anything. Maybe you need a translator.");
print(s:"Can't understand anything. Maybe you need a translator.");
}
I have failed to find any place in the code where the value of TRANA_STAT is explicitly set to 0. I have made a WAD with a script which logs the values of the TRANA_STAT and TRANA_CHARG variables to the console every 5 tics, and it seems they are indeed reset to 0 as soon as the game is loaded. Thus, I conclude that it is an engine bug.
As I have already mentioned, I couldn't reproduce this issue in a clean environment. I made a test map with a world variable in its scripts file, and then added a library which accessed and changed this variable. But the value is preserved after reloading in all of my tests. There must be something in the Daedalus scripts which somehow breaks the normal behavior.
I am attaching the WAD with the logging script in case it might be needed for testing.
P.S. TeamTNT website seems to be down for unknown reasons but you can get the Daedalus ACS source files from the Web Archive in case you don't have them. Link