Welcome to the Modders team, mate!
Good catch on this one too. I had been wondering why this happened and found it really quite annoying whenever I get round to playing.
Sure, it doesn't do much harm and can be easily reset. But that doesn't make it
right.
I've got no clue why that code is there. Doesn't seem to be doing anything sensible as far as I can tell.
Probably a left-over from the old system where both R and G could be used for speeding up and slowing down. Before I simplified it.
Removing the entire section seems to work fine:
Code:
/* if(IsPerkIntoList("TimeSpeed"))
{
// NK basetime 05-04-25 -->
ref PChar = GetMainCharacter();
float basetime = 1.0;
if(CheckAttribute(PChar,"basetime")) basetime = stf(PChar.basetime);
SetTimeScale(sti(PChar.basetime));
// NK <--
}*/
That maintains the same timescale you had before the interface opened. If wanted, we could change this to always reset to normal timescale upon closing an interface.
While I was at it, I have been able to address various other strange timescale events. This is what is being done now:
- Timescale stays active, INCLUDING the icon on
location reloads
This allows you to keep doing fast running across an island without having to re-enable the Time Compression after each reload.
- Timescale is reset to 1.0 on
closing dialogs
This is to allow you some time if, for example, the dialog triggered an enemy attack.
- Timescale is reset to 1.0 on reloads to sea; this INCLUDES reloads to other islands using DirectSail and (probably) also any DirectEncounters
Again, this allows you the chance to assess the situation you find yourself in.
- Timescale is reset to 1.0 every time you encounter anything drifting in the water.
This allows you to use Time Compression while still maintaining the chance to avoid any mines or logs in the water.
- Timescale is reset to 1.0 on every Load Game to allow you to "get your bearings again".
Imagine being on 30x compression, then saving while in/near a fight/battle.
Next time you load, you'd otherwise get blown to bits before you even know what's going on.
- Already previously done: Timescale is reset to 1.0 when boarding initiates.
Can anyone think of any other timescale-related things that should be taken care of to prevent confusion/frustration/unnecessary button mashing?
All the above will be in a future modpack update; at the moment I have no unmodified PROGRAM folder accessible to WinMerge against though.