Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 179 180 [181]

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

Fleeting Frames

  • Bay Watcher
  • Spooky cart at distance
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #2700 on: February 19, 2021, 06:10:35 pm »

Here's an update to this post back in 2018 july.

Nice!  Would you consider
  • Hosting the download at https://dffd.bay12games.com/ ?  It's dedicated hosting for DF, with no signup barriers and likely to outlast anything else the community uses  ;)
  • Are you interested in helping to port TwbT into the main DFHack repo?  With Mifki inactive, it would make maintainence and packaging a lot easier to have it all built and tested together.

Alas, I never got my registration confirmation for dffd (or mantis), so I can't. Otherwise would use it, yeah.

As for the second, haven't really looked into how precisely to do it for several reasons that ultimately boil down to no:

43.03 repo: Would take some time to figure out to have future compilation take more time and I dunno anybody who plays 4303 and would get new release either. Pain for no gain to anyone.

main repo: If speaking of the above version of TWBT, it'd be easier (but still an exercise) to lift the code for features, rewriting it in places, but it's still a fair bit of effort on top of the technical downsides as with previous. 

As the features as whole aren't 100% upsides either, especially with being about aesthetics, would probably have to add and test bunch of code for toggles. I'd also feel responsible to fix the known stability issues as well, tbh.

Still, I might do it if I would be actively using it and there was subsantial enough positive interest; it's not like these upload posts take 0 time either. Not sure, but I guess it could still take week+.

However as it is, though, already suffer enough from modder's curse. mikekchar inspired me a while ago to only code up stuff I'll personally actually proceed to use, as a way to limit the damnation. Not the worst ideas, I'd say, given my most popular DF creations have only been of use to handful of players.

lethosor

  • Bay Watcher
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #2701 on: February 19, 2021, 06:52:46 pm »

Regarding GitHub status: Thurin and BenLubar are working on getting CI set up on Thurin's fork. This would allow automated builds to happen more easily. Research would still need to be done semi-manually for new DF versions, but this would make updates for new DFHack versions significantly faster (it's the same system as df-ai and weblegends, if anyone is familiar with those). As a slightly-longer-term option, we might move Thurin's fork into the DFHack organization, or some other similar option.

Fleeting Frames: is the source code with your changes publicly available (I might have missed a link)? The download appears to be just 64-bit Linux binaries for 0.43.03, which are useful for that specific version+platform but obviously aren't portable. I can't make any promises about help from my end, but if we do end up with a more-actively-maintained TWBT fork, it could be nice to have the ability to get some of those changes merged in as well (if you're okay with that).
Logged
DFHack - Dwarf Manipulator (Lua) - DF Wiki talk

There was a typo in the siegers' campfire code. When the fires went out, so did the game.

Manadras

  • Escaped Lunatic
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #2702 on: February 20, 2021, 02:29:53 pm »

... Suddenly every time I pressed escape to exit menus, especially the Z menu, I get a black screen. The game is not frozen but the playing window turns pitch black. I can still see the rest of the game like the menu on the right, and the borders and such. And the game is running.

Same issue here, all the time. It doesn't happen if I set [PRINT_MODE:TWBT_LEGACY].

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---
« Last Edit: February 20, 2021, 02:40:27 pm by Manadras »
Logged

Fleeting Frames

  • Bay Watcher
  • Spooky cart at distance
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #2703 on: February 20, 2021, 06:52:12 pm »

Hm. That's interesting solution, though it doesn't seem like pressing F12 always works at 10 FPS. Could also use a keybinding command (if willing to change LEAVESCREEN key). Seems redraw_all 1 doesn't fix it, either. I've found entering/exiting a viewscreen layer again can fix it previously, however.

@lethosor: It is not. I'd have to decide about git one way or another (mainly dithering which name I'd want people to see it under), but that's (basically) why. There's neat xkcd comic about this :)
« Last Edit: February 20, 2021, 06:55:06 pm by Fleeting Frames »
Logged

lethosor

  • Bay Watcher
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #2704 on: February 20, 2021, 08:08:59 pm »

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



@lethosor: It is not. I'd have to decide about git one way or another (mainly dithering which name I'd want people to see it under), but that's (basically) why. There's neat xkcd comic about this :)
I would honestly suggest making a fork of TWBT, then (if you haven't yet) making a new branch off of the right commit and applying your changes there. GitHub has decent support for working with changes from multiple forks, which would make it easier for it to be merged upstream eventually, if desired.
Logged
DFHack - Dwarf Manipulator (Lua) - DF Wiki talk

There was a typo in the siegers' campfire code. When the fires went out, so did the game.

treehugger

  • Bay Watcher
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #2705 on: February 23, 2021, 09:35:21 am »

... Suddenly every time I pressed escape to exit menus, especially the Z menu, I get a black screen. The game is not frozen but the playing window turns pitch black. I can still see the rest of the game like the menu on the right, and the borders and such. And the game is running.

Same issue here, all the time. It doesn't happen if I set [PRINT_MODE:TWBT_LEGACY].

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---

Marvelous!! Thank you so much for this!
Logged
Pages: 1 ... 179 180 [181]