Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: dfhack/assign-preferences, possible token related bug/issue  (Read 56 times)

Shandra

  • Bay Watcher
    • View Profile
dfhack/assign-preferences, possible token related bug/issue
« on: November 04, 2025, 11:41:40 pm »

I am unsure how and where would be the right place to report this issue, so I am falling back (after searching with my limitited search-fu for my problem) to posting here:

I am trying to assign some material preferences via dfhack/assign-preferences and encountered problems whenever the token string incorporates spaces. Replacing the space(s) with an underscore just results in a "WARNING: <token> does not seem to be a valid material token. Skipping...", tokens from the raws which are incorporating underscores (e.g.: INORGANIC:QUARTZ_ROSE) are fine, but ones like INORGANIC:GREEN JADE are failing, even when entered as INORGANIC:GREEN_JADE.

Adding within dfhacks assign-preferences.lua script in (53.02-r1) within the LIKEMATERIAL function after Line 74 <LIKEMATERIAL = function(token)> the command/line <token = token:gsub("++"," ")> {I used ++ as a separator, as I am unaware of this sequence within the token definitions of the raws) seem to be working (just a quick check with INORGANIC:GREEN++JADE, no real tests otherwise).

So, back to my question: How and Where would be the best place to report this as an issue?
« Last Edit: November 04, 2025, 11:52:57 pm by Shandra »
Logged

Ziusudra

  • Bay Watcher
    • View Profile
Re: dfhack/assign-preferences, possible token related bug/issue
« Reply #1 on: November 04, 2025, 11:54:21 pm »

The best place is https://github.com/DFHack/dfhack/issues

There's a support channel on the discord: https://discord.com/channels/793331351645323264/807444467140788254

You can enclose tokens with spaces in quotes for them to work.

The online documentation can be quite useful https://docs.dfhack.org/en/stable/docs/Introduction.html#getting-help
« Last Edit: November 04, 2025, 11:57:04 pm by Ziusudra »
Logged
Ironblood didn't use an axe because he needed it. He used it to be kind. And right now he wasn't being kind.

Shandra

  • Bay Watcher
    • View Profile
Re: dfhack/assign-preferences, possible token related bug/issue
« Reply #2 on: November 05, 2025, 12:10:56 am »

Thanx!
I was unsure about the github tracker (some projects prefer to be asked first on some forum) and will be posting there, but for/instead of the discord -IMHO-> Well, i am just to old (school) for this mobile/messenger like kind of chat.

& just FYI: I tried putting the token in quotes ( ',´ and ") for the INORGANIC:Part1 Part2 string, but to no avail -> I am always getting a "error parsing arg 3: JADE" whence doing so :/
Logged