Bay 12 Games Forum

Please login or register.

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

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

PatrikLundell

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.12-r2
« Reply #1890 on: October 12, 2019, 12:23:42 pm »

Did you just move the DF folder to a different partition/drive, or did you also change the path? If the path had some Swedish characters in it I could understand a failure to interpret a full path (but I don't see any need to use anything but relative ones).

Furthermore, if your PC is configured with an "OS partition/disk" there typically isn't room for a lot of other stuff on it (such as DF saves, which can get fairly large).
Logged

scriver

  • Bay Watcher
  • City streets ain't got much pity
    • View Profile
Re: DFHack 0.44.12-r2
« Reply #1891 on: October 12, 2019, 12:47:26 pm »

Yeah, there are letters of the Swedish variety in the old address, but not in the new. That could be it!
Logged
Love, scriver~

Clément

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.12-r2
« Reply #1892 on: October 14, 2019, 05:16:45 am »

A quick question about DF structures documentation. In the Enum type definition section, it is written "Every attribute must be declared at the top level of the enum". Isn't it supposed to be "at the top of the enum" instead (or more precisely before any enum-item element)? Mentioning the top level in this context feels strange and all enum attributes being defined before use makes it easier to parse.
Logged

Rumrusher

  • Bay Watcher
  • current project : searching...
    • View Profile
Re: DFHack 0.44.12-r2
« Reply #1893 on: October 15, 2019, 02:15:26 am »

screwing around with gm-editor I realize it's possible to just capture a ruin with dfhack. though I haven't got around to writing a script for this, but it opens up to expansion after say a site got totaled or you razed it by accident and want to move folks in afterwards, or want to capture caves and other sites.
Logged
I thought I would I had never hear my daughter's escapades from some boy...
DAMN YOU RUMRUSHER!!!!!!!!
"body swapping and YOU!"
Adventure in baby making!Adv Homes

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: DFHack 0.44.12-r2
« Reply #1894 on: October 15, 2019, 05:57:21 am »

A quick question about DF structures documentation. In the Enum type definition section, it is written "Every attribute must be declared at the top level of the enum". Isn't it supposed to be "at the top of the enum" instead (or more precisely before any enum-item element)? Mentioning the top level in this context feels strange and all enum attributes being defined before use makes it easier to parse.

I don't think it matters as afaik we are using xml-lib for parsing. If you are saying for human parsing then yes, it would be useful.

For exact answer you probably need to read: here however i can't read it :D

Clément

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.12-r2
« Reply #1895 on: October 15, 2019, 09:00:27 am »

It is not about the library. In my own parser I'd prefer to read all the children of enum-type in order. I hope that when I come across an enum-item, all the enum-attr it references have already been parsed. It is the case with the current state of the xmls, but I don't know if it will stay that way. The documentation is not clear about that. "top level" usually means root/document node in the context of XML. Was it supposed to be only "top"? Or does mean its that enum-attr should be a direct child of enum-type? But it is weird to insist on that when it is not specified for other elements.

Enum.pm uses "findnodes('child::enum-attr')" and "findnodes('child::enum-item')", so I guess it does not rely on one being before the other.
Logged

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.12-r2
« Reply #1896 on: October 15, 2019, 05:12:54 pm »

I think "top level" is correct (df-structures codegen does multiple passes, and the findnodes() calls you pointed out definitely suggest that the placement ). Maybe someone tried to put a <enum-attr> inside a <enum-item> at some point (rather than an <item-attr>) and that broke things badly enough to warrant a specific mention in the docs. <enum-attr>s should be at the top of their <enum-type> for consistency, though.

At any rate, if you're parsing df-structures, I would highly recommend using a proper XML parser (if you aren't already) and taking a look at library/include/df/codegen.out.xml, which is supposed to be easier for tools to parse than the source XML files (but it does require running codegen).
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.

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.12-r2
« Reply #1897 on: October 15, 2019, 05:18:47 pm »

Yeah, there are letters of the Swedish variety in the old address, but not in the new. That could be it!
Yeah, the Ruby plugin has a somewhat sketchy way of loading scripts, which has broken with single quotes before. However, that should have been fixed as of this change.
If you still have your broken installation, can you try running these two commands and paste their output here?
Code: [Select]
lua print(dfhack.internal.getScriptPaths())

Code: [Select]
lua print(dfhack.filesystem.getcwd())
(feel free to remove any personal info from this one)
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.

PatrikLundell

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.12-r2
« Reply #1898 on: October 16, 2019, 03:53:06 am »

Changing "Games" to "Gämes" in my path to DF causes the LNP launcher to fail to launch.

Code: [Select]
lua print(dfhack.internal.GetScriptPaths()[1])(the original command just gave a table, and
  • returned "nil") results in

"D:\Gõmes\Dwarf Fortress\Dwarf Fortress 44_12 Starter Pack r05\Dwarf Fortress 0.44.12/raw/scripts"

and the second command resulted in
"D:\Gõmes\Dwarf Fortress\Dwarf Fortress 44_12 Starter Pack r05\Dwarf Fortress 0.44.12"

Note that I'm unable to copy/paste from the DFHack window, so there may be typing errors above. However, it can be noted that the "ä" character was mangled into "õ" (I think that's it: it's somewhat hard for my poor eyes to determine the mangled character exactly, but it's not "ö", but definitely "a" -> "o" translation of the character being decorated).

Presumably the script interprets the non ASCII character in the path differently than the OS does.
Logged

vettlingr

  • Bay Watcher
  • Þjóðalfur
    • View Profile
Re: DFHack 0.44.12-r2
« Reply #1899 on: October 16, 2019, 06:41:07 am »

I tested it on Mac too.

path:
Applications\Älgstubben\Bäverdammen\Järvträsket\Lazy Mac Pack v0.44.12 dfhack-r2/Dwarf Fortress 0.44.12/

I can confirm that LNP won´t launch when there are common Swedish words in the path.

scriver

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

I don't know if it matters for me to respond as well, but three data points is better than two right?

My original, faulty path was "D:\Gustav\detsomfallitfrånträden\övrigt\DF\df_44_12_win". As you can see I manage to score all three Swedish letters in there. In alphabetic order, even. Go me.

Running the commands you asked:
Code: [Select]
[DFHack]# lua print(dfhack.internal.getScriptPaths())
table: 0000026AE1010560

Code: [Select]
[DFHack]# lua print(dfhack.filesystem.getcwd())
D:\Gustav\detsomfallitfrÕntrõden\÷vrigt\DF\df_44_12_win

Õ appears to be an O with a ~ over it.

å=Õ
ä=õ
ö=÷

I don't if you want to know what symbols they become, just continuing off of Lundell's musings, but anyway to get all the capital letters as well I moved the DF map to "D:\...\DF\Å\Ä\Ö\df_44_12_win

Code: [Select]
[DFHack]# lua print(dfhack.filesystem.getcwd())
D:\...\DF\┼\─\Í\df_44_12_win

Å=┼
Ä=─
Ö=Í
Logged
Love, scriver~

brolol.404

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.12-r2
« Reply #1901 on: October 16, 2019, 12:08:46 pm »

This command isn't working for me:

Code: [Select]
dfhack.run_command("modtools/force -eventType NightCreature")
The script is running (as the print command works), but nothing is happening for that line.

I am trying to get a random werecreature to spawn in fortress mode. Am I missing something in that code?

Clément

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.12-r2
« Reply #1902 on: October 16, 2019, 03:11:41 pm »

The encoding issue looks like a conversion from cp1252 to cp850 (or something similar). But why this kind of code page would be used on a modern system?

Edit: It seems windows console uses cp850, so it could be a simple display error (read the path from syscalls as cp1252 and displays it in the cp850 console without converting). The other loading errors may be unrelated.
« Last Edit: October 16, 2019, 03:50:30 pm by Clément »
Logged

DerMeister

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.12-r2
« Reply #1903 on: October 16, 2019, 04:30:02 pm »

Request plugin that make sapients milkable in fortress mode when goblin ethics.
Logged

Bumber

  • Bay Watcher
  • REMOVE KOBOLD
    • View Profile
Re: DFHack 0.44.12-r2
« Reply #1904 on: October 16, 2019, 11:56:44 pm »

Request plugin that make sapients milkable in fortress mode when goblin ethics.
http://www.bay12forums.com/smf/index.php?topic=121451.0
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)?
Pages: 1 ... 125 126 [127] 128 129 ... 244