Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 10 11 [12] 13 14 ... 244

Author Topic: DFHack 50.14-r1.1  (Read 889256 times)

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.05-r2
« Reply #165 on: July 13, 2017, 08:45:47 am »

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.

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: DFHack 0.43.05-r2
« Reply #166 on: July 14, 2017, 02:24:45 pm »

r2 is up!
Thanks to everyone involved for their hard work!

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.05-r2
« Reply #167 on: July 20, 2017, 03:11:50 pm »

It looks like the change to allow Ruby scripts from separate paths can break Ruby scripts if the folder they're in has an apostrophe in its name. This is due to some highly "unusual" (read: dumb) code that loads Ruby scripts, which I was working on fixing anyway. It's not a trivial fix by any means, though, so here is a script that patches DFHack to allow single quotes in path names (but will break with double quotes). It must be run once, and once only, to work, and should ideally be run before anything is loaded to avoid error messages (and so nothing is lost in case it crashes).
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.

Altaree

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.05-r2
« Reply #168 on: July 21, 2017, 08:26:17 am »

It looks like the change to allow Ruby scripts from separate paths can break Ruby scripts if the folder they're in has an apostrophe in its name.

I would call this a feature. Folder names with spaces or other odd characters need to be submerged in magma.
Logged
Dan Pearson:
This is a game which calculates the volume of blood in every creature it generates so it knows how much alcohol it would have to consume to get drunk, an update which, remarkably, ended up covering people's fortresses in cat vomit.

hertggf

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.05-r2
« Reply #169 on: July 21, 2017, 01:07:17 pm »

In the dfusion lua console, is there some context where dfhack.gui.getSelectedItem() works in adventure mode?  The only way I've figured out to get a pointer to an item is to pick something up and use
Code: [Select]
item=u.inventory[#u.inventory-1].itemBut of course that only works if you can pick it up.

Any suggestions or, failing that, better workarounds?
Logged

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.05-r2
« Reply #170 on: July 21, 2017, 01:16:12 pm »

DFusion has been removed for over a year now. Are you talking about the built-in Lua console you open with "lua"?

If you select an item (with 'a' through 'e'), it opens another screen, which really ought to support getSelectedItem() but doesn't, so I'll add support for that. It doesn't look like it's possible to add support for the main adventure mode screen, though, since it can list up to 5 items at once and there isn't a cursor you can use to distinguish between them.

(Also, you can use "item" as a read-only alias for "dfhack.gui.getSelectedItem()" in the Lua interpreter.)

Edit: okay, the reason getSelectedItem() doesn't work in viewscreen_itemst (the one you can get to with a/b/c/d/e) is because it returns the highlighted contained item there (i.e. the one selected in the list for bins/barrels/bags). I'm going to add support for the text viewer screen you can get to by pressing "v" instead.
« Last Edit: July 21, 2017, 01:23:07 pm 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.

hertggf

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.05-r2
« Reply #171 on: July 21, 2017, 02:36:22 pm »

Excellent, thank you.  While we're on the topic it would be great if some of the ease of use features from fort mode could be adapted to adventure mode, especially filtering for item lists and maybe putting what's in your hands at the top of the inventory screen instead of the bottom.

Is there a discussion forum for dfhack or you guys just use irc?   Maybe I could contribute.
Logged

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.05-r2
« Reply #172 on: July 21, 2017, 04:03:55 pm »

The search plugin is fairly easy to extend, although it would require a bit more effort to support in adventure mode because most things there are shoved into one screen (searches are tied to specific screens, so you couldn't unconditionally enable a search option like you can in fortress mode).

Most discussion happens on IRC and in this thread. There was talk of making a DFHack subforum here a couple years ago, but it never happened.
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.

hertggf

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.05-r2
« Reply #173 on: July 21, 2017, 05:07:15 pm »

Some possibilities might be to add a hotkey when (l)ooking that opens a screen with an item list of whatever was under the cursor.  Then you could search, look, pick up, maybe even throw and interact with them directly from there (being able to read books without picking them up first would be a godsend)
And in the (i)nventory screen add hotkeys to drop, interact, throw, eat, remove, wear, etc rather than opening a new screen for every type of interaction.
Logged

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.05-r2
« Reply #174 on: July 21, 2017, 05:18:50 pm »

The issue tracker is also a good place to put suggestions (at least specific ones like that) so they don't get buried as easily.
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.

Max™

  • Bay Watcher
  • [CULL:SQUARE]
    • View Profile
Re: DFHack 0.43.05-r2
« Reply #175 on: July 21, 2017, 08:58:39 pm »

Yeah, enabling search in adventure mode is a pain, I toyed with it for a bit, also travis is maddening but I guess I gotta poke at it since I got firefox updated and shit now.
Logged

Bumber

  • Bay Watcher
  • REMOVE KOBOLD
    • View Profile
Re: DFHack 0.43.05-r2
« Reply #176 on: July 22, 2017, 05:39:49 pm »

It looks like the change to allow Ruby scripts from separate paths can break Ruby scripts if the folder they're in has an apostrophe in its name.

I would call this a feature. Folder names with spaces or other odd characters need to be submerged in magma.
Apostrophes aren't that odd, given their use in possessives. I'd say non-English characters are more an issue, and they aren't going away anytime soon.

The following characters are forbidden for Windows folder names:
\ / : * ? " < > |

Linux only forbids / and \0.
« Last Edit: July 22, 2017, 05:51:59 pm by Bumber »
Logged
Reading his name would trigger it. Thinking of him would trigger it. No other circumstances would trigger it- it was strictly related to the concept of Bill Clinton entering the conscious mind.

THE xTROLL FUR SOCKx RUSE WAS A........... DISTACTION        the carp HAVE the wagon

A wizard has turned you into a wagon. This was inevitable (Y/y)?

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.05-r2
« Reply #177 on: July 22, 2017, 06:16:34 pm »

It looks like the change to allow Ruby scripts from separate paths can break Ruby scripts if the folder they're in has an apostrophe in its name.

I would call this a feature. Folder names with spaces or other odd characters need to be submerged in magma.
Apostrophes aren't that odd, given their use in possessives. I'd say non-English characters are more an issue, and they aren't going away anytime soon.

The following characters are forbidden for Windows folder names:
\ / : * ? " < > |

Linux only forbids / and \0.
Well, if double quotes are forbidden anyway, I suppose my script is more useful than I thought.

Also, another possible solution would be to add hack/scripts to script-paths.txt. However, I don't want to encourage that, because I don't know if it'll interfere with other paths in hard-to-predict ways, so I don't want people leaving it in there indefinitely.
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.

Uzu Bash

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.05-r2
« Reply #178 on: July 26, 2017, 06:52:26 am »

How do you terminate a hung script? Or any script for that matter; that would be useful to know even if it's working as designed.
Logged

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.05-r2
« Reply #179 on: July 26, 2017, 06:58:01 am »

You can stop Lua scripts by running kill-lua. Use dfhack-run to run it if you can't use the DFHack console.
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.
Pages: 1 ... 10 11 [12] 13 14 ... 244