Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 127 128 [129] 130 131 ... 184

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

Pvt. Pirate

  • Bay Watcher
  • Dabbling Linux User
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #1920 on: April 13, 2016, 10:55:03 am »

i haven't had any issues with the designations, but with the buildings.
Logged
"dwarves are by definition alcohol powered parasitic beards, which will cling to small caveadapt humanoids." (Chaia)

Aussiemon

  • Bay Watcher
  • Well... now what?
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #1921 on: April 13, 2016, 11:36:30 am »

Damn, it appears that the save I uploaded had been autosaved over just before I copied the folder.

I was able to recreate the original bugged save, fortunately, and it still crashes frequently when trying to build shale block walls at the bottom of the moat. I've attached two more saves below.


Save 1 - (Original) Post-bug (disabling TWBT and proceeding past the crash point fixed the issue):
https://drive.google.com/open?id=0B2dQD-3xGxMtanVBUGk2V0pmVWc

Save 2 -  A bit before the point of crash (build shale block walls at bottom of moat and maybe try smoothing as well):
https://drive.google.com/open?id=0B2dQD-3xGxMtaVM2ZVFhV1NqMWM

Save 3 - Closer to the point of crash (proceed as above):
https://drive.google.com/open?id=0B2dQD-3xGxMtaEIyNGNBR3NqWXc

Package 1 - The complete Dwarf Fortress folder with DXDiag.txt, save 2, and save 3 included.
https://drive.google.com/open?id=0B2dQD-3xGxMtaGF0SzQtdVBOaE0
Logged
"Don't worry about the world coming to an end today. It's already tomorrow in Australia."
~ Charles Schultz

mifki

  • Bay Watcher
  • works secretly...
    • View Profile
    • mifki
Re: Text Will Be Text - dfhack plugin
« Reply #1922 on: April 14, 2016, 04:46:44 am »

Tried on two PCs today - does not crash! I'll keep trying...
What tileset/overrides are you using? Also, when disabling TWBT, are you setting print_mode to 2D or STANDARD - better set to STANDARD because 2D is too different. Maybe other plugins you're using interfering?

Pvt. Pirate

  • Bay Watcher
  • Dabbling Linux User
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #1923 on: April 14, 2016, 06:16:36 am »

so i'll try it woth standard and without any dfhack plugins. once with and once without dfhack enabled.
it could also be possible that this is caused by the mousecontrol plugin.
Logged
"dwarves are by definition alcohol powered parasitic beards, which will cling to small caveadapt humanoids." (Chaia)

mifki

  • Bay Watcher
  • works secretly...
    • View Profile
    • mifki
Re: Text Will Be Text - dfhack plugin
« Reply #1924 on: April 14, 2016, 06:20:21 am »

Can you try just dfhack+twbt, without other plugins (mousequery is ok)? You can temporarily move other .plug.dll files from hack/plugins to somewhere else and then put them back.

Aussiemon

  • Bay Watcher
  • Well... now what?
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #1925 on: April 14, 2016, 05:49:19 pm »

Can you try just dfhack+twbt, without other plugins (mousequery is ok)? You can temporarily move other .plug.dll files from hack/plugins to somewhere else and then put them back.

Just tried with all plugins disabled and moved, with the exception of twbt, mousequery, and automaterial. Crash occurred similarly, this time when trying to place a door. I used STANDARD print type previously, not 2D.
Logged
"Don't worry about the world coming to an end today. It's already tomorrow in Australia."
~ Charles Schultz

Pvt. Pirate

  • Bay Watcher
  • Dabbling Linux User
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #1926 on: April 14, 2016, 07:42:49 pm »

Can you try just dfhack+twbt, without other plugins (mousequery is ok)? You can temporarily move other .plug.dll files from hack/plugins to somewhere else and then put them back.
i currently use the LNP 0.42.06-r02 with TWBT+dfhack+"mouse controls" (is that called mousequery?)
that's where i got those crashes. the game runs at 20-30 fps most of the time and rarely gos down to or even below 10.
then out of nowhere when building walls, bridges, doors, tables etc. it crashes.
Logged
"dwarves are by definition alcohol powered parasitic beards, which will cling to small caveadapt humanoids." (Chaia)

Kebra

  • Bay Watcher
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #1927 on: April 16, 2016, 02:54:24 pm »

Is there anything we can do to give you more information?

I too face these crashes. It seems to happen more frequently when i build a lot fast. If it's related to doing commands fast or simply that i am building a lot; i don't know.

Are there logs i can find and give you? Some sort of verbose debug mode or similiar?

My eyes cry when playing with TWBT :)
Logged

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #1928 on: April 17, 2016, 06:49:18 pm »

Hi mifki, I have a question about some of the sorcery behind rendering the screen.  When I use

Code: [Select]
dm = require('gui.dwarfmode')
size_x = dm.getPanelLayout().map.width
size_y = dm.getPanelLayout().map.height

in most modes, I get the size of map panel in tiles.  But in TWBT mode the width seems to be much wider than the actual display, but otherwise acting normally (i.e., the reported width is higher when the minimap is suppressed).  My wild guess is that the reported width is the panel's width in text tiles.

I'm trying to get the coordinates of the center tile of the screen using something like

Code: [Select]
pos["x"] = df.global.window_x + math.floor(dm.getPanelLayout().map.width / 2)
pos["y"] = df.global.window_y + math.floor(dm.getPanelLayout().map.height / 2)
pos["z"] = df.global.window_z + df.global.world.map.region_z

but it's off in TWBT mode.  This might also be related to the odd centering behavior that others have noted.

Is there a spot accessible to Lua that reports if TWBT is active and the width of a TWBT map in tiles, or the widths of the graphics and text cells so that I can scale it myself?

Thanks, TWBT is an amazing tool, and I'd hate for my effort to not be compatible with it :(
Logged
Just got back, updating:
(0.42 & 0.43) The Earth Strikes Back! v2.15 - Pay attention...  It's a mine!  It's-a not yours!
(0.42 & 0.43) Appearance Tweaks v1.03 - Tease those hippies about their pointy ears.
(0.42 & 0.43) Accessibility Utility v1.04 - Console tools to navigate the map

PeridexisErrant

  • Bay Watcher
  • Dai stihó, Hrasht.
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #1929 on: April 17, 2016, 07:49:11 pm »

Any plans to release builds for the DFHack beta?
Logged
I maintain the DF Starter Pack - over a million downloads and still counting!
 Donations here.

lethosor

  • Bay Watcher
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #1930 on: April 17, 2016, 08:40:18 pm »

Any news on this? I would really like to address this at some point to stop TwbT from breaking so many other tools, and to avoid the need for the separate automaterial/mousequery/resume plugins. I may be able to help with this in a week or two, if you need help, but there's an example for at least one of the relevant hooks in plugins/devel/color-dfhack-text.cpp.

Hi mifki, I have a question about some of the sorcery behind rendering the screen.  When I use

Code: [Select]
dm = require('gui.dwarfmode')
size_x = dm.getPanelLayout().map.width
size_y = dm.getPanelLayout().map.height

in most modes, I get the size of map panel in tiles.  But in TWBT mode the width seems to be much wider than the actual display, but otherwise acting normally (i.e., the reported width is higher when the minimap is suppressed).  My wild guess is that the reported width is the panel's width in text tiles.

...

DFHack offers a way to hook into Gui::getDwarfmodeViewDims(), the C++ equivalent of getPanelLayout(). The problem here is twofold:
a) The Lua version calculates stuff itself, rather than calling the C++ function, which means it can't be hooked into.
b) TwbT doesn't actually hook into that function in the first place (it distributes a couple modified plugins instead)
I suspect that TwbT hooking in and making the Lua function delegate to the C++ function would solve the issue.

mifki: I'm kind of busy this week (hoping to get r1 done!), but feel free to stop by #dfhack or something and I can try to help with the hooks. As far as I remember, you'll only need to add a few functions to twbt.cpp, and that'll fix some issues with Lua scripts and eliminate the need to distribute automaterial/mousequery/resume. (There's an example in devel/color-dfhack-text.cpp if you want to play around with it - not sure if it provides an example of the getDwarfmodeViewDims() hook, but it should at least be similar.)
« Last Edit: May 20, 2016, 09:19:37 am by lethosor »
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.

mifki

  • Bay Watcher
  • works secretly...
    • View Profile
    • mifki
Re: Text Will Be Text - dfhack plugin
« Reply #1931 on: April 18, 2016, 02:05:15 am »

Any plans to release builds for the DFHack beta?

I'll test for a bit more tonight (still hasn't reproduced a single crash!), and will make a build then.

Lamandus

  • Bay Watcher
  • Novice Diagnostican
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #1932 on: April 20, 2016, 10:36:43 am »

Any plans to release builds for the DFHack beta?

I'll test for a bit more tonight (still hasn't reproduced a single crash!), and will make a build then.

Got any problems? Because tonight is over already ;)
Logged

Pvt. Pirate

  • Bay Watcher
  • Dabbling Linux User
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #1933 on: April 20, 2016, 10:54:26 am »

Any plans to release builds for the DFHack beta?

I'll test for a bit more tonight (still hasn't reproduced a single crash!), and will make a build then.

Got any problems? Because tonight is over already ;)
he didn't mention reporting back :P
Logged
"dwarves are by definition alcohol powered parasitic beards, which will cling to small caveadapt humanoids." (Chaia)
Pages: 1 ... 127 128 [129] 130 131 ... 184