Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 157 158 [159] 160 161 ... 185

Author Topic: Text Will Be Text - dfhack plugin  (Read 800861 times)

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Text Will Be Text - dfhack plugin
« Reply #2370 on: January 06, 2018, 10:13:48 am »

Ok, I'll leave the vermin with a dark-gray background for how.

The UNK_V42_2 did work, it was just an inverted tile using the background color... so it appeared solid black. DF sometimes does this, with bookcases, track stops, display cases. I solved it by forcing a different color. All good.

Btw, you could consider adding the print-twbt-override script in your download. It's extremely useful, there would have been zero chance to otherwise find out about UNK_V42_2. Or the traps... because I just found out that you can override individual trap types. Which is A: fantastic and B: no one has done that yet.



:)
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

Amostubal

  • Bay Watcher
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #2371 on: January 06, 2018, 11:18:14 pm »

Mifki, about the workshops... is there any chance to override their tiles based on x/y position?

I had a similar issue, me and bear had... one of the ways around it was just to kick out all of the shops that you can writr your own reactions for with dfhack and implement custom buildings for it, rather easy for races where you already want to control all of the productions.  Easiest to replace was the smelter... anyways design the building with every x,y having its own tile (i used 1-9) than override the custom workshop with the tiles you want, making workshops into artwork.
Logged
Legendary Dwarf Fortress
Legendary Discord Group
"...peering into the darkness behind the curtains, evokes visions of pixies being chased by dragons while eating cupcakes made of coral iced with liquid fire while their hearts burn out with unknown plant substances..." - a quote from the diaries of Amostubal

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Text Will Be Text - dfhack plugin
« Reply #2372 on: January 07, 2018, 04:00:15 am »

Mifki, about the workshops... is there any chance to override their tiles based on x/y position?

I had a similar issue, me and bear had... one of the ways around it was just to kick out all of the shops that you can writr your own reactions for with dfhack and implement custom buildings for it, rather easy for races where you already want to control all of the productions.  Easiest to replace was the smelter... anyways design the building with every x,y having its own tile (i used 1-9) than override the custom workshop with the tiles you want, making workshops into artwork.
If you do that, you lose the ability to "m" melt items.
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

milo christiansen

  • Bay Watcher
  • Something generic here
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #2373 on: January 07, 2018, 12:26:57 pm »

No you don't! I have a DFHack item melting library written and tested. The main reason I made it was to solve melt exploits once and for all, for example melting individual coins always produces 1/500th of a bar, but it works great for furnace replacement mods too.

See Libs/Melt Item
Logged
Rubble 8 - The most powerful modding suite in existence!
After all, coke is for furnaces, not for snorting.
You're not true dwarven royalty unless you own the complete 'Signature Collection' baby-bone bedroom set from NOKEAS

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Text Will Be Text - dfhack plugin
« Reply #2374 on: January 08, 2018, 12:20:00 pm »

Hey mifki, quick question: Any good idea how to do multiple instruments? Being able to override trap-types gave me that idea.

There are 4 instrument types: Keyboard, Wind, Stringed and Percussion. The IDs are procedually generated. The outputs of print-twbt-override are:
Code: [Select]
I:INSTRUMENT_STATIONARY:INSTRUMENT:#:
B:UNK_V42_3:Instrument::

First one is the item, with a number for the sub-type. I saw that go up to at least 85 in my test-fort.
Second one is the constructed instrument. A subtype for that I can't figure out.

I could either do 4 sprites for the 4 types, or a random assortment that is applied to the procedually generated ones without actually fitting the description, but it would at least add nice visuals to the game.
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

Isher

  • Bay Watcher
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #2375 on: January 08, 2018, 02:03:45 pm »

(Sorry to bother you if this is pie-in-the-sky BS.)

Using Meph's tileset, I adjusted my dfhack init to include:

multilevel 15
multilevel shadowcolor 0 0 0 0.6
multilevel fogcolor 0.1 0.1 0.3
multilevel fogdensity 0.25 0 1

Shadows might be too dark for some and the fog is denser (fogcolor is vanilla) but I can always tell which level is which (I guess not being used to it I was having a hard time on adventure mode) and I also get the full 15 levels.

So thanks to you both (mifki for TWBT and Meph for the integration), I love being able to see lower levels and if I go high enough it's sortof 2.5D Dwarf Fortress. Tried stonesense overlay instead and it isn't super usable and I don't really like how it looks (I keep the visualizer up still on the side, I don't mean to denigrate it).

I've looked through the source code but I'm out of my depth, and I'm curious:

Is it theoretically possible to see levels that are higher than the current one, while allowing clickthrough to the current one of course? (with extreme transparency perhaps). I'm thinking just sortof a suggestion as to what is above the current level. I understand that in some mountain forts that many extra layers would combine to make certain areas unviewable so it'd probably need to be limited to a certain number of layers, but it would be nice to be able to see sortof a full view of what is going on.

I have some examples below. Actually trying to use this might be a pain in the ass, but I think if some translucency could be achieved (better than what I can do overlaying images in GIMP, I was trying to lighten the overlay along with having the opacity lowered but that would mess up the whole picture, and my TWBT shadow settings on the overlays make this a little too dark to work) we might be able to have a sort of 2.5D DF.

Below I've posted the original start I'm using, then overlaid transparent versions of several levels (enough to reach the top of the trees) over the regular view, using 25%, 37.5%, and 50% opacity:

Spoiler (click to show/hide)
Logged

jecowa

  • Bay Watcher
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #2376 on: January 08, 2018, 09:00:34 pm »

(Sorry to bother you if this is pie-in-the-sky BS.)

Using Meph's tileset, I adjusted my dfhack init to include:

multilevel 15
multilevel shadowcolor 0 0 0 0.6
multilevel fogcolor 0.1 0.1 0.3
multilevel fogdensity 0.25 0 1

Shadows might be too dark for some and the fog is denser (fogcolor is vanilla) but I can always tell which level is which (I guess not being used to it I was having a hard time on adventure mode) and I also get the full 15 levels.

Those look like pretty good settings. Do you know what the fogdensity numbers do exactly? I'm guessing the first number is either the fog density on the level below the active level, or it's the max fog density on the bottom layer. Maybe "start" is the fog level on the active level? And step is the number of levels you have to look down to see the maximum fog density?

I have some examples below. Actually trying to use this might be a pain in the ass, but I think if some translucency could be achieved (better than what I can do overlaying images in GIMP, I was trying to lighten the overlay along with having the opacity lowered but that would mess up the whole picture, and my TWBT shadow settings on the overlays make this a little too dark to work) we might be able to have a sort of 2.5D DF.

Multi-level rendering also took some getting used to. Seeing how wide the branches above are could be nice. And being able to see the land over the chasms would be nice too.

Below I've posted the original start I'm using, then overlaid transparent versions of several levels (enough to reach the top of the trees) over the regular view, using 25%, 37.5%, and 50% opacity:

Spoiler (click to show/hide)
I'm wondering if it might be easier to distinguish layers above from layers below if the layers above used white for the shadow and fog colors.
Logged

Isher

  • Bay Watcher
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #2377 on: January 08, 2018, 09:42:17 pm »


Those look like pretty good settings. Do you know what the fogdensity numbers do exactly? I'm guessing the first number is either the fog density on the level below the active level, or it's the max fog density on the bottom layer. Maybe "start" is the fog level on the active level? And step is the number of levels you have to look down to see the maximum fog density?

I think the first is the general density, the second is the fog level that it starts out at (0 for the first layer so no fog) and the last is the strength of intensity added to each step. 0.25 makes the fog denser, but you can lower the last value to have less variation between layers or increase it for more variation. I just wanted it to be more dense so I don't get as confused when trying to traverse layers.

Quote
I'm wondering if it might be easier to distinguish layers above from layers below if the layers above used white for the shadow and fog colors.

I wanted to try to convey that by lightening the layers I was adding but without spending an hour masking the tree layer it made the whole picture lighter so I just put it up as is. But yeah, I'd like to see some sort of clear-translucent vibe going for the layers above you, almost like the wireframe you'd get for some games when looking through a house or whatever. If it's at all possible I'd love to see mifki give it a shot if he's interested. If not, well, I've finally got the dfhack files in the right place still got to build DFHack on Windows so maybe a year from now I might figure something out.
« Last Edit: January 08, 2018, 10:06:47 pm by Isher »
Logged

Isher

  • Bay Watcher
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #2378 on: January 09, 2018, 07:57:41 pm »

Core.h is part of DFHack. You would have to clone DFHack too and point the solution file to it somehow.

I've moved files around and installed nuget packages and yadda yadda and I think if I can just point to my built DFHack (instead of moving its built files into the TWBT folder like a neanderthal) it'll solve some of this "wrong protobuf" version and all the other crazy hell that is raining down on my ability to build TWBT. I've pointed to dfhack-version.lib and SDL.lib correctly but still with the Core.h file missing and etc. Can anyone steer me in the right direction (pointing the twbt file to DFHack)?
Logged

mifki

  • Bay Watcher
  • works secretly...
    • View Profile
    • mifki
Re: Text Will Be Text - dfhack plugin
« Reply #2379 on: January 09, 2018, 08:11:19 pm »

There's build-windows.bat file in which you can just set path to dfhack and its version.

Isher

  • Bay Watcher
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #2380 on: January 10, 2018, 12:03:24 am »

There's build-windows.bat file in which you can just set path to dfhack and its version.

Ah, yep, thanks, got the vcxproj file set up with the paths and everything is good, I should have at least figured that out from the variables in the vxcproj file, sorry to trouble you.

Since you know way more about this than me, do you think it is possible (if I were to somehow gain the knowledge to do this on my own without bothering you) to render levels above you while having clickthrough to the current level?

The more I look at memory patching the more I realize that I have little hope of achieving this without being a huge pain the ass with more questions, but I'm willing to silently slog through it if it's possible.
Logged

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #2381 on: January 10, 2018, 01:42:35 am »

There's build-windows.bat file in which you can just set path to dfhack and its version.

Ah, yep, thanks, got the vcxproj file set up with the paths and everything is good, I should have at least figured that out from the variables in the vxcproj file, sorry to trouble you.

Since you know way more about this than me, do you think it is possible (if I were to somehow gain the knowledge to do this on my own without bothering you) to render levels above you while having clickthrough to the current level?

The more I look at memory patching the more I realize that I have little hope of achieving this without being a huge pain the ass with more questions, but I'm willing to silently slog through it if it's possible.

It's really simple It could be done like this:
  • You need to do something when game wants to render the game view, for that we use vmethod interposing: e.g. This gets called (instead) when fort-mode view is rendering
  • Set window to where you want to render (e.g. in this case z+1)
  • In that function you need to call "df-render-map" function, which mifki found.
  • Read the screen and save it(?)
  • Call original vmethod to perform "real" render
  • do something with saved screen (e.g. somehow blend the tiles?)
Another example with rendering (in dfhack tree) here

Sorry if it's not twbt-like i've looked into that code quite long ago and can't quickly find relevant examples.
« Last Edit: January 10, 2018, 01:45:41 am by Warmist »
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Text Will Be Text - dfhack plugin
« Reply #2382 on: January 10, 2018, 02:16:57 am »

Warmist, now all we need is rendermax in twbt for fancy lighting. Do it! :P
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #2383 on: January 10, 2018, 02:27:37 am »

Warmist, now all we need is rendermax in twbt for fancy lighting. Do it! :P
I've tried to understand why it did not work, and what needed to be done to work and failed :|

Also currently i have mutilated the rendermax to make a opencl powered monstrosity (which worked btw) but then wanted MORE and now too lazy to put it back together...

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Text Will Be Text - dfhack plugin
« Reply #2384 on: January 10, 2018, 02:41:55 am »

Did you post the source code somewhere? Maybe someone else might pick it up.
Logged
::: ☼Meph Tileset☼☼Map Tileset☼- 32x graphic sets with TWBT :::
::: ☼MASTERWORK DF☼ - A comprehensive mod pack now on Patreon - 250.000+ downloads and counting :::
::: WorldBicyclist.com - Follow my bike tours around the world - 148 countries visited :::
Pages: 1 ... 157 158 [159] 160 161 ... 185