Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 183 184 [185]

Author Topic: Text Will Be Text - dfhack plugin  (Read 804783 times)

tnuhnivad

  • Bay Watcher
  • <dorf> has been possessed!
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #2760 on: May 20, 2024, 06:30:26 am »


The black screen bug on the main map with TWBT when exiting some menus such as Status (z) or Stockpile settings (s) seems to have been around for years, especially when calculation FPS dips down to or below graphics FPS.

This is the autohotkey script I use to deal with it. It basically sends "F12" a short time after you press ESC (1/10 of a sec), which forces a redraw of the main window just after the game exits the menu.

;---begin code---

#UseHook
#MaxHotkeysPerInterval 200

~Esc::
sleep, 100
Send {F12}
return

;---end code---

Has anyone found an updated way to handle this? This solution works but I'd rather not have to use a 3rd party program. I love my multi lvl ASCII 47.05 but this black screen issue is driving me nuts. Doesn't happn with TWBT_Legacy but, that cause some other issues for me.

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
Code: [Select]
install-twbt-refresh
exit & save

Thank you! I will definitely give this a try!
Logged

tnuhnivad

  • Bay Watcher
  • <dorf> has been possessed!
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #2761 on: May 23, 2024, 07:25:03 am »

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):
Code: [Select]
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
Code: [Select]
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!
« Last Edit: May 23, 2024, 07:30:41 am by tnuhnivad »
Logged

alexchandel

  • Bay Watcher
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #2762 on: November 26, 2024, 11:33:34 pm »

What's the current status of TWBT on v0.50.* and its classic ascii graphics mode? There's no mention of 0.50 in the repo, and no commits in several years.  Is there a procedure to get it working?
Logged

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: Text Will Be Text - dfhack plugin
« Reply #2763 on: November 27, 2024, 11:00:00 am »

What's the current status of TWBT on v0.50.* and its classic ascii graphics mode? There's no mention of 0.50 in the repo, and no commits in several years.  Is there a procedure to get it working?
TWBT is completely unsupported in version 50.xx, having been effectively replaced by the new graphics mode in the Premium version. Yes, this technically means you have to pay for the game if you want that functionality.
Logged
P.S. If you don't get this note, let me know and I'll write you another.
It's amazing how dwarves can make a stack of bones completely waterproof and magmaproof.
It's amazing how they can make an entire floodgate out of the bones of 2 cats.

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #2764 on: November 28, 2024, 12:31:59 am »

What's the current status of TWBT on v0.50.* and its classic ascii graphics mode? There's no mention of 0.50 in the repo, and no commits in several years.  Is there a procedure to get it working?
TWBT is completely unsupported in version 50.xx, having been effectively replaced by the new graphics mode in the Premium version. Yes, this technically means you have to pay for the game if you want that functionality.

The graphics code is completely[/i] identical between the free and paid versions, you can turn graphics on and use them just fine in classic. The main problem is that nobody's made a graphics set, and, yeah, as of right now, it's a lot of work for not much reward.

alexchandel

  • Bay Watcher
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #2765 on: November 30, 2024, 08:46:09 pm »

What's the current status of TWBT on v0.50.* and its classic ascii graphics mode? There's no mention of 0.50 in the repo, and no commits in several years.  Is there a procedure to get it working?
TWBT is completely unsupported in version 50.xx, having been effectively replaced by the new graphics mode in the Premium version. Yes, this technically means you have to pay for the game if you want that functionality.

The graphics code is completely[/i] identical between the free and paid versions, you can turn graphics on and use them just fine in classic. The main problem is that nobody's made a graphics set, and, yeah, as of right now, it's a lot of work for not much reward.

Meaning that no one has made an ASCII-style graphics set for the Premium version that would bring the ASCII tileset appearance to the new graphics mode's TWBT-replacing features?
Logged

DPh Kraken

  • Bay Watcher
  • [PRONOUN:she:her:herself][PRONOUN:it:its:itself]
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #2766 on: December 03, 2024, 01:20:48 pm »

I'm working on one. Rumrusher just sent over files for supporting the interface.

http://www.bay12forums.com/smf/index.php?topic=182777.0
https://github.com/ATP-Kraken/DF-PseudoASCII
Logged
[CHEESE_PLANT] and [CHEESE_GRAPHICS] biggest fan
My mods:
Language & symbolsMiscellanyGraphics resourcesPseudo-ASCII
Pages: 1 ... 183 184 [185]