1
Utilities and 3rd Party Applications / Re: DFHack 50.11-r2
« on: October 31, 2023, 05:13:53 pm »Custom tokens - I see that custom tokens are now supported by DFHack, which is very nice. I had previously done this using curly brackets and parsing the raws when the game was started (see examples below). Looking through the custom-raw-tokens.lua code it seem that multi-line tokens aren't a thing though, is this correct? No problem if it is, I can just change my stuff to be a single line(s) as needed.
Hi, yea, custom-raw-tokens' dev (wolfboyft) here. I'm glad you like it! It's been a while since I made it, I don't really remember the reasonings behind everything, but yeah, it does indeed only support single line tokens, and only once in an instance of item subtype or whatever. It's just a search for the first instance of a token, returning the token's extra info. It's basically just for simple key:value(s) stuff, not working with/like the raw parsing state machine, like vanilla tokens often do. It's not super gorgeous in how it does it either, in that multiple instances of a tag don't raise errors (iirc), etc. Multi-line tokens would be pretty cool, though. I can't think off the top of my head how they would work, but I've forgotten a lot so...
Glad to see some interest! Good luck with your projects.
