Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 124 125 [126] 127 128 ... 243

Author Topic: DFHack 50.13-r1  (Read 809805 times)

Fleeting Frames

  • Bay Watcher
  • Spooky cart at distance
    • View Profile
Re: DFHack 0.44.12-r2
« Reply #1875 on: October 03, 2019, 09:33:38 pm »

I guess it may be theoretically possible, but nobody has put it into practice yet as far as I know.

DerMeister

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.12-r2
« Reply #1876 on: October 03, 2019, 11:56:15 pm »

I guess it may be theoretically possible, but nobody has put it into practice yet as far as I know.
So I request this script.
Logged

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: DFHack 0.44.12-r2
« Reply #1877 on: October 04, 2019, 02:45:38 am »

I guess it may be theoretically possible, but nobody has put it into practice yet as far as I know. everyone is scared of how it will be weaponized.

There, fixed it for ya :D

Fleeting Frames

  • Bay Watcher
  • Spooky cart at distance
    • View Profile
Re: DFHack 0.44.12-r2
« Reply #1878 on: October 07, 2019, 01:15:07 pm »

Just a headsup, but farm plots with planted seeds report wrong extents in r1 at least (and some previous versions of DF).

Couldn't find correct numbers for _displace atm (trying random numbers is crashy), but looking at the seeds' locations should work as workaround if necessary. Though this probably messes with dfhack.buildings.checkFreeTiles if someone were to call it in the middle of a seeded farmplot.

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.12-r2
« Reply #1879 on: October 07, 2019, 01:21:42 pm »

How are you determining that they're wrong? Extents are reported by DF, not DFHack, at least as far as I know.
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.

Fleeting Frames

  • Bay Watcher
  • Spooky cart at distance
    • View Profile
Re: DFHack 0.44.12-r2
« Reply #1880 on: October 07, 2019, 01:34:29 pm »

The impossibly incorrect values, mainly. Here's an example for 31x1 farm plot:
Code: [Select]
[DFHack]# :lua local bld = dfhack.gui.getSelectedBuilding() printall(bld.room) print(dfhack.buildings.countExtentTiles(bld.room,0))
extents                = nil
x                      = -390889336
y                      = 0
width                  = 0
height                  = 0
0
« Last Edit: October 07, 2019, 01:55:13 pm by Fleeting Frames »
Logged

Rose

  • Bay Watcher
  • Resident Elf
    • View Profile
Re: DFHack 0.44.12-r2
« Reply #1881 on: October 07, 2019, 01:37:55 pm »

I believe extents only exist if the farm plot has holes in it.
Logged

Fleeting Frames

  • Bay Watcher
  • Spooky cart at distance
    • View Profile
Re: DFHack 0.44.12-r2
« Reply #1882 on: October 07, 2019, 01:52:09 pm »

Hm, few tests suggest that indeed. Though those farm plots appear to report the correct coordinates, unlike the seeded rectangle plots. (A quick one-seed planting tests suggests that complex shapes do still report correct coords/extents when planted).

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.12-r2
« Reply #1883 on: October 07, 2019, 02:50:32 pm »

The impossibly incorrect values, mainly. Here's an example for 31x1 farm plot:
Code: [Select]
[DFHack]# :lua local bld = dfhack.gui.getSelectedBuilding() printall(bld.room) print(dfhack.buildings.countExtentTiles(bld.room,0))
extents                = nil
x                      = -390889336
y                      = 0
width                  = 0
height                  = 0
0
The large negative value is most likely an uninitialized value, not anything meaningful.
As for countExtentTiles returning 0, that's what it's supposed to do when "extents" is nil/null: https://github.com/DFHack/dfhack/blob/8a1979b8a7aecee299c0d74720ee37eeaef9fee5/library/modules/Buildings.cpp#L667-L668
Passing width*height instead of 0 as the default value (the second parameter) would probably be a sensible behavior.
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.

scriver

  • Bay Watcher
  • City streets ain't got much pity
    • View Profile
Re: DFHack 0.44.12-r2
« Reply #1884 on: October 10, 2019, 01:02:42 pm »

I'm not sure if I've done something wrong but the startdwarf comand doesn't seem to be working for me.

It returns the following:
Code: [Select]
[DFHack]# startdwarf 10
E: Encoding::ConverterNotFoundError: code converter not found (ASCII-8BIT to UTF-8)
 eval:2:in `load'
 eval:2:in `block in <main>'
 eval:2:in `catch'
 eval:2:in `<main>'
Logged
Love, scriver~

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.12-r2
« Reply #1885 on: October 10, 2019, 01:11:55 pm »

Wow, that's a new one. What's your system language? Do other Ruby scripts work, like "source"?
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.

scriver

  • Bay Watcher
  • City streets ain't got much pity
    • View Profile
Re: DFHack 0.44.12-r2
« Reply #1886 on: October 10, 2019, 01:39:33 pm »

I'm not savvy enough to know what system language refers to specifically but I'm on windows (10), if that helps. I downloaded the dfhack version for Windows 64-bit

Also there's also a bunch of error when I start up DF, which I forgot to mention. I don't know if these are related either but here's what it says:
Code: [Select]
E: Encoding::ConverterNotFoundError: code converter not found (ASCII-8BIT to UTF-8)
 eval:1:in `require'
 eval:1:in `<main>'
E: NoMethodError: undefined method `onstatechange' for DFHack:Module
 eval:1:in `<main>'
E: NoMethodError: undefined method `onstatechange' for DFHack:Module
 eval:1:in `<main>'
DFHack is ready. Have a nice day!
DFHack version 0.44.12-r2 (release) on x86_64
Type in '?' or 'help' for general help, 'ls' to see all commands.
E: NoMethodError: undefined method `onstatechange' for DFHack:Module
 eval:1:in `<main>'
E: NoMethodError: undefined method `onstatechange' for DFHack:Module
 eval:1:in `<main>'
[DFHack]#   

Attempting to run "source" or "source add magma 7" results in the same answer as "setdwarf".
Logged
Love, scriver~

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.12-r2
« Reply #1887 on: October 10, 2019, 03:38:52 pm »

Is your computer set to English or something else?
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.

scriver

  • Bay Watcher
  • City streets ain't got much pity
    • View Profile
Re: DFHack 0.44.12-r2
« Reply #1888 on: October 10, 2019, 03:52:16 pm »

Oh! Swedish.
Logged
Love, scriver~

scriver

  • Bay Watcher
  • City streets ain't got much pity
    • View Profile
Re: DFHack 0.44.12-r2
« Reply #1889 on: October 12, 2019, 08:57:11 am »

Update: Moving the DF folder from D: to C: drive solved the issue.

While I don't mind since I was going to put it on C: anyway, I still have no idea why. I'm going to assume it is because D: is the grumpy drive and C: is the happy one.
Logged
Love, scriver~
Pages: 1 ... 124 125 [126] 127 128 ... 243