Replies: 1 comment
-
Pre-v50, text descriptions were in a standard location. Now, the text is scattered around the game.main_interface structure. For example, the unit description is in df.global.game.main_interface.view_sheets.unit_health_raw_str[0].value Try bringing up the panel that shows the text you want to copy, then poke around gui/gm-editor to find the text. Once you have that string, it is not difficult to export it so you can get it out of DF. I think we need a better general solution. We do have the capability to read text off of the rendered screen. It would be fairly easy to let you draw a box around the text you want to copy and then copy it to the clipboard or export it to a markdown file. |
Beta Was this translation helpful? Give feedback.
-
DF gives these nice descriptions of poetry styles and poems, in a character's Skills > Knowledge tab. I want to get that text to export to somewhere.
However if we try to directly access those poetry styles on current_soul object, it's just refs. If we find the actual styles somewhere under df.global.x.y.poetry_styles (forget the exact path) we see many properties of a struct, but not a textual description. There must be some function that takes this poetry_style as input and gives back the text to show on-screen. Anyone know what it is?
Ideally we could just grab the already-generated text from whatever tab and list item of poetry (or musical style, or dance style) is currently being displayed in DF's UI.
However the transition to v50 seems to have broken the ability to directly access this text. For example, the markdown export script fails with an error now on v50.
I wasn't expecting it to be such a pain in the arse just to access DF's currently-displayed UI pane's text property. I'm guessing this is still on the to-do list to tackle...?
Or is there something I'm missing? (Total noob to DFHack, here, but experienced software engineer.)
Thanks
Beta Was this translation helpful? Give feedback.
All reactions