From what I remember, GFPS actually can't drop below FPS, due to how they are synchronized (although the number displayed in the FPS counter is calculated differently and smoothed, so you might sometimes see cases where GFPS is 1 above FPS, for instance).
Anyway, it's good to know that low FPS could be a cause of this. I think a more robust fix would be to detect viewscreen changes with an onStateChange event handler (watching for SC_VIEWSCREEN_CHANGED), because it wouldn't require changing keybindings or using external utilities. Something like this might work, if I'm understanding the issue correctly (it assumes the issue occurs when switching back to the fortress mode screen):
dfhack.onStateChange.twbt_rerender = function(event)
if event == SC_VIEWSCREEN_CHANGED and df.viewscreen_dwarfmodest:is_instance(dfhack.gui.getCurViewscreen()) then
dfhack.timeout(5, 'frames', function()
dfhack.screen.zoom(df.zoom_commands.zoom_resetgrid)
end)
end
end
Copy the script lethosor wrote above into a lua file, I called it install-twbt-refresh.lua
Save to hack\scripts\install-twbt-refresh.lua
Open dfhack-config\init\onMapLoad.init
Add one line at the bottom
install-twbt-refresh
exit & save
Thank you so much, blitz4, for the explanation on implementing the code into a .lua! My apologies, sometimes the code talk goes right over my dome piece. I didn't realize that is what I needed to do with the code provided by lethosor. I actually decreased the frame delay to 1 frame and it feels perfect. This solved the black screening while using TWBT multi lvl view and returning to the world overview which drove me absolutely mad for the longest time!