Pvt Pirate: sorry, I should have been nicer about that.
e) Mephs lite + curses 800x600 font // Phoebus + curses 800x600 font
f) TWBT always on testing turning it off, but i think i remember it not changing a thing.
I'd appreciate it if you could test without TWBT
and test with just the 800x600 font (i.e. set everything to use the 800x600 font, or maybe just all the same font - no separate text/map tiles). The potential issue with square tiles is that they take up more space than rectangular tiles, so fewer of them can fit on the screen. This could cause issues because the "20th tile from the top" could be close to the bottom of the screen in the map view, but not at all close in the menu view, if that makes sense.
It's also possible that TWBT is interfering with mousequery even when the tilesets are all the same size, which is why I suggest disabling it entirely too.
When lethosor asked for the dll/so/dylib, he meant that you should provide the one that matches your platform - DFHack uses .dll files for plugins on Windows, .so files on Linux, and .dylib files on MacOS.
Yup. I couldn't remember which platform you were using, so I included all the possible extensions.
Basic learner's question. Looking through lua script examples from DFHack, I'm confused by this point: when should a global variable be used instead of a local variable?
By "local variables" do you mean ones declared inside a function, or ones declared with the "local" keyword anywhere (including outside a function)?
Anything declared without the "local" keyword ends up in the global namespace for that script, even if it's only declared inside functions. This can cause all sorts of fun bugs, so you should always use the "local" keyword when doing that (unless you
really want a global, see below). Globals also persist across runs of the same script, which allows them to store persistent state in memory until DF exits. They can also be accessed by other scripts if needed.
Anything with the "local" keyword is limited to the scope where it's declared, or any nested scopes (let me know if that doesn't make sense and I can give some examples). If it's in the main body of a script (outside of any function), it
won't persist across runs of the script, unlike globals, and it can't be accessed by other scripts (it's essentially destroyed after the script finishes running, just like any local variable inside a function).
@Prismatic: Almost never.
Most cases of global variables being used are probably bugs. A global variable clutters the Lua global variable space. <snip - this was a good point, see above>. Also note that you'd probably want to use a very specific variable name for that case to avoid two scripts using the same one accidentally.
No, each script has its own completely separate environment where its globals live. Globals in one script are (almost) entirely separate from those in another. That's why reqscript() and dfhack.script_environment() exist. Granted, there are a few special ones that are shared between scripts (df, dfhack, and the built-in functions, and maybe something else I'm forgetting), but scripts cannot create their own globals that are shared across all scripts.
Granted, globals are generally not a good idea, but when you need them, you don't have to give them unique names to prevent clashes with other scripts.
Q: Can you make a Guest that is 'ready to leave' a permanent resident of the fortress? maybe with tweak makeown?
in the description of makeown, it says to "select the creature", is that using 'k' or 'v'?
thanks for the help and thanks for all the work on dfhack!
PS: It is a wild boar woman fighter
"tweak makeown" predates visitors/guests by many years, so I wouldn't expect it to work, although I don't think I've tried. It's definitely something I've wanted to work, though.
As for how to use it: it uses DFHack's standard unit-selection API, which allows selecting a unit with 'v', 'k' (although you also have to make sure the unit is actually selected in the sidebar for this to work), and pretty much anywhere else you can select a unit in-game, like the 'u' menu. Most things that ask you for a unit, item, building, etc. should use a standard API for it. If you find a tool that doesn't allow you to select a unit/building/whatever in a place where other tools do allow it, that's probably a bug, so feel free to report it.