Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 112 113 [114] 115 116 ... 360

Author Topic: DFHack 0.43.03-r1  (Read 1122672 times)

Rose

  • Bay Watcher
  • Resident Elf
    • View Profile
Re: DFHack 0.40.19-r1
« Reply #1695 on: December 20, 2014, 12:43:56 am »

Stonesense uses those :P
Logged

Roses

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.19-r1
« Reply #1696 on: December 20, 2014, 03:08:43 am »

So just doing some preliminary testing (I know I have enough other stuff to do, but I get side tracked easily), it seems I can gather what information I want about a current screen using dfhack.gui.getCurFocus() and dfhack.gui.getCurViewscreen(). The descriptions for both units and items are listed as "textviewer", but if you check the parent viewscreen you will get either unit or item. Now my question is two-fold

1. Is it possible to just add text to the already existing screen? (i.e. Underneath "This is a pig tail fiber trousers. It is made of pig tail fiber." in the item description screen you could put your own text)
2. Is there an eventful command, or some other command, that runs every time the Viewscreen is changed? I want to be able to register that you are looking at the correct page.
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFHack 0.40.19-r1
« Reply #1697 on: December 20, 2014, 03:40:51 am »

1. I just tried, it's difficult at the very best. Imma keep trying.
2. There's the SC_VIEWSCREEN_CHANGED state change that can be used with dfhack.onStateChange.

EDIT: Oh, formatted_text.text seems to be a char[]. That makes it easier.

Inconvenient is that the junk values it's giving me when I put in high z for text[z] later suggest that I can get up to some serious trouble if I flub this. Oof.

But yeah, you can definitely edit the text in the text viewer.



I can't figure that blank space in the word "is", though. I can't change it to anything, either.
« Last Edit: December 20, 2014, 03:55:21 am by Putnam »
Logged

Roses

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.19-r1
« Reply #1698 on: December 20, 2014, 04:20:00 am »

1. I just tried, it's difficult at the very best. Imma keep trying.
2. There's the SC_VIEWSCREEN_CHANGED state change that can be used with dfhack.onStateChange.

EDIT: Oh, formatted_text.text seems to be a char[]. That makes it easier.

Inconvenient is that the junk values it's giving me when I put in high z for text[z] later suggest that I can get up to some serious trouble if I flub this. Oof.

But yeah, you can definitely edit the text in the text viewer.



I can't figure that blank space in the word "is", though. I can't change it to anything, either.

That's pretty funny.

But if it looks like it is going to be difficult, maybe the best thing would be to take the text from the default screen, duplicate it onto a custom screen, and then add whatever we want. Not sure I want to try and deal with formatting and stuff on the default screen, when it is so easy to make nice looking things with the custom screen.
Logged

myk

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.19-r1
« Reply #1699 on: December 20, 2014, 06:07:42 am »

Just a question (that I'm sure has been asked before .. I searched through the forum a bit, but I couldn't find a previous discussion): what is Toady's stance on exporting the symbols in the df binary that dfhack references?  Code-wise, it's a relatively small task (just add some macros and keywords, maybe tweak the build process).  The obvious benefit would be that dfhack (and other utils) wouldn't have to manage the offsets for each df version (symbols.xml).  dfhack would still need updates when symbols are added or deleted, but that is relatively rare compared to df releases.
Logged

expwnent

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.19-r1
« Reply #1700 on: December 20, 2014, 09:03:54 am »

His basic reason is that he doesn't want to have to implement backwards compatibility for any modding API.
Logged

myk

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.19-r1
« Reply #1701 on: December 20, 2014, 10:19:55 am »

While I understand the desire not to be responsible for a stable modding API, he could easily export symbols without the guarantee of backwards compatibility.  dfhack would still need to be manually updated when symbols change, but when they don't change (which, in all likelihood, will be the common case) dfhack will 'just work' with the newer df release.
Logged

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: DFHack 0.40.19-r1
« Reply #1702 on: December 20, 2014, 07:46:49 pm »

The GUI lua interface is pretty damn powerful.

Also, darn. Oh well, it was just a minor idea.
It depends on what you mean.  As for getting more than 16 colors on the screen, tileset graphics can already use arbitrary colors and TWBT/Rendermax both shade standard tiles.
As for coloring things by their named colors, that seems to be a lot more complicated.  Expanding the color palette in the raws (for example, specifying RGB values) might be impossible and is certainly infeasible.
Logged
Just got back, updating:
(0.42 & 0.43) The Earth Strikes Back! v2.15 - Pay attention...  It's a mine!  It's-a not yours!
(0.42 & 0.43) Appearance Tweaks v1.03 - Tease those hippies about their pointy ears.
(0.42 & 0.43) Accessibility Utility v1.04 - Console tools to navigate the map

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFHack 0.40.19-r1
« Reply #1703 on: December 20, 2014, 08:02:43 pm »

You can specify RGB values in the raws...

http://dwarffortresswiki.org/index.php/DF2014:Color#Color_tokens

You can make more of those arbitrarily.

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: DFHack 0.40.19-r1
« Reply #1704 on: December 20, 2014, 08:08:08 pm »

You can specify RGB values in the raws...

http://dwarffortresswiki.org/index.php/DF2014:Color#Color_tokens

You can make more of those arbitrarily.
Yes, but the question seemed to be about getting beyond a 16-display-color palette.  It'd be nice if tiles were shaded by their named colors, but that's beyond the reach of raw modding and not yet a feature or TWBT or Rendermax.  It is part of Stonesense, but that's not quite a game interface.
Logged
Just got back, updating:
(0.42 & 0.43) The Earth Strikes Back! v2.15 - Pay attention...  It's a mine!  It's-a not yours!
(0.42 & 0.43) Appearance Tweaks v1.03 - Tease those hippies about their pointy ears.
(0.42 & 0.43) Accessibility Utility v1.04 - Console tools to navigate the map

mifki

  • Bay Watcher
  • works secretly...
    • View Profile
    • mifki
Re: DFHack 0.40.19-r1
« Reply #1705 on: December 20, 2014, 08:44:00 pm »

As for coloring things by their named colors, that seems to be a lot more complicated.  Expanding the color palette in the raws (for example, specifying RGB values) might be impossible and is certainly infeasible.

It's very easy to support more values for colours specified in raws as fg:bg:br. As for colour tokens, I think I know how to do this, but I've asked several times for a gamesave with various objects (dyed items, spatter, right?) that should have colours specified with tokens but have approximated colours from 16-colour palette instead. I'm just not sure I know exactly what things are affected by this and not going to experiment without any help.

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFHack 0.40.19-r1
« Reply #1706 on: December 20, 2014, 08:53:54 pm »

You could always just download Fortbent, go into adventure mode and murder some trolls. They all have different blood colors.

ptb_ptb

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.19-r1
« Reply #1707 on: December 21, 2014, 03:56:28 pm »

[EDIT] Ignore me. Clarification in other thread being awaited.
« Last Edit: December 21, 2014, 04:03:56 pm by ptb_ptb »
Logged
()==[:::::::::::::>

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.19-r1
« Reply #1708 on: December 21, 2014, 04:06:02 pm »

What's the exact path of the missing file? As far as I can tell, advfort requires "dfhack.buildings" and "gui.buildings", which correspond to <DF>/hack/lua/dfhack/buildings.lua and <DF>/hack/lua/gui/buildings.lua, both of which are included. As far as I can tell, there is no "building.lua" included with DFHack.
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.

ptb_ptb

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.19-r1
« Reply #1709 on: December 21, 2014, 04:12:34 pm »

What's the exact path of the missing file? As far as I can tell, advfort requires "dfhack.buildings" and "gui.buildings", which correspond to <DF>/hack/lua/dfhack/buildings.lua and <DF>/hack/lua/gui/buildings.lua, both of which are included. As far as I can tell, there is no "building.lua" included with DFHack.

You're too fast for me. I deleted my post a short while back, but I guess you were already typing.
Logged
()==[:::::::::::::>
Pages: 1 ... 112 113 [114] 115 116 ... 360