Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 101 102 [103] 104 105 ... 185

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

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #1530 on: March 05, 2015, 09:24:17 am »

About the workshops... Hmm i wonder if there will be no problems with my "building-hacks" plugin. It allows you to replace rendering, including animated shops.

Urist McGoombaBrother

  • Bay Watcher
  • Trust the plump helmet! ♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠♠
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #1531 on: March 05, 2015, 11:27:42 am »

you can just drop whatever image files you want, no need to squeeze them into a single tileset image).

This. +1 from me. Absolute awesome work, especially when it works out as intended. Many thx for your effort.

Got some questions.

1) Is adding additional tiles also possible for stones/gems?

2) I created a sample file (16x16) for an unmined stone structure. How will I have to name this and where to put it in future versions of TWBT?

   

3) In the door example from you I found five different types of Gray. In the standard phoebus tileset there are a lot more. Some tiles even contain colours like red, green, etc. What effect do they have? How is defined for which parts of the tile the foreground or background colour of the underlying material is taken? How do you define transparency?

4) How to amend the material in the raw file to actual reference to the new tile? Here is an example of the material Arsenopyrite, I modded in. How to change it the way to use the a.m. custom new sample tile instead of tile [TILE:156]? Maybe [TILE:STONE_STRUCTURE_1.png]?

Spoiler (click to show/hide)

5) Will this be stonesense compatible?
« Last Edit: March 05, 2015, 11:32:31 am by Urist McGoombaBrother »
Logged

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #1532 on: March 05, 2015, 12:17:35 pm »

For a creature graphic, the image can be "as is" or be colored by profession.  Tileset images are similar in that the gray-scale pixels take on the color of the material.  Both use the alpha channel to let background colors show through (for a creature, the "background" is the flashing status color)

My suggestion was to allow both without using a configuration file off to the side.

custom_foo_0.png is used as-is without any color manipulation.  Transparent pixels show the floor.
custom_foo_1.png is laid on top, tinted by material 1.  Transparent pixels show layer 0.
custom_foo_2.png is laid on top, tinted by material 2.  Transparent pixels show layer 1.

And so on.  Some error-handling needed like different-sized images, and just use "white" if the artist calls for a higher-number material than was in the building.

Then the whole things is handed off to the multilevel renderer to get it fogged/shaded properly.
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: Text Will Be Text - dfhack plugin
« Reply #1533 on: March 05, 2015, 03:40:05 pm »

custom_foo_0.png is used as-is without any color manipulation.  Transparent pixels show the floor.
custom_foo_1.png is laid on top, tinted by material 1.  Transparent pixels show layer 0.
custom_foo_2.png is laid on top, tinted by material 2.  Transparent pixels show layer 1.

Yep, I'll probably end up with something like this. But still there are problems.

Materials have two colours - background and foreground, and ideally I need to make use of both of them somehow..

Erendir

  • Bay Watcher
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #1534 on: March 07, 2015, 07:14:59 am »

there isn't /that/ many buildings that use multiple materials, though. Off the top of my head, it'd only be useful for blacksmith and wells
In vanilla, but I wouldn't want to make assumptions about mods.  In my particular mod the custom buildings are made from three blocks of the same material, but others' might be more complicated and like to see that reflected on the screen.

Well I was talking about a different thing. In vanilla buildings some of the tiles have fixed colours, some have material colours and some are transparent, right? There must be a way to specify this for custom graphics. On the other hand I don't want to lose the ability to just copy image of entire workshop and it will work without any any additional configuration.

you could always interpret some specific colours as something else.
Like, pure green = 00FF00 would be material colour, and blue = 0000FF transparent. Add more as needed :)
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Text Will Be Text - dfhack plugin
« Reply #1535 on: March 07, 2015, 08:19:22 am »

Just wanted to say that it is nice seeing you still further developing this. :)
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 :::

Rydel

  • Bay Watcher
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #1536 on: March 07, 2015, 10:53:15 am »

you could always interpret some specific colours as something else.
Like, pure green = 00FF00 would be material colour, and blue = 0000FF transparent. Add more as needed :)

It's the game able to shade those colors?  Then just having a pure color for it wouldn't work.
Multiple Layers would probably works best
Layer 0 is as-is
Layer 1 is material 1 background
Layer 2 is material 1 foreground
Layer 3 is material 2 background
Layer 4 is material 2 foreground

This would allow as-is colors, both the foreground and background colors of both materials, and proper transparency.
The layers should probably be together by material instead of foreground/background so graphics that only care about one material can just omit layers 3 and 4

PeridexisErrant

  • Bay Watcher
  • Dai stihó, Hrasht.
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #1537 on: March 07, 2015, 05:57:15 pm »

I'd use a slightly different naming schema for clarity:

-0, -1bg, -1fg, -2bg, -2fg

Order of layering is fairly clear, as well as what each image is
Logged
I maintain the DF Starter Pack - over a million downloads and still counting!
 Donations here.

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #1538 on: March 07, 2015, 07:23:19 pm »

I like that idea, just wish that there was a FOSS-compatible format that supported layers so you could compose everything in one window.  As it is, I think you'd need to use GIMP or Illustrator, and manually export each layer as its own image.
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

Rydel

  • Bay Watcher
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #1539 on: March 07, 2015, 07:30:43 pm »

I think MNG supports layers and uses the same libpng license as PNG - In fact, they're by the same group and all png files double as valid MNG files.

http://www.libpng.org/pub/mng/mngdocs.html

mifki

  • Bay Watcher
  • works secretly...
    • View Profile
    • mifki
Re: Text Will Be Text - dfhack plugin
« Reply #1540 on: March 07, 2015, 08:01:37 pm »

Just wanted to say that it is nice seeing you still further developing this. :)

I thought you'd be one of the people interested in custom graphics for vanilla buildings and could tell what features you want - transparent/empty tiles, multiple materials, etc.


Also, by the way, in vanilla many buildings (including workshops) for some reason use only foreground colour and don't use background. Fg and bg colours are used only for limited number of buildings. It would be cool to support them for everything, but I'm not sure whether two colours per material are actually required and will be useful, or they exist only because of the limitations of vanilla tilesets and for ascii mode.

Thinking further, it would be cooler to support not just colours, but patterns for materials - and transparent pixels will be filled with that pattern, which may be one solid colour, two colours or anything else. IRL materials have either single "foreground" colour, or some multicolour pattern, eg. minerals. The only problem is that tiles are rather small so in reality it might not look as good as it sounds.

Max™

  • Bay Watcher
  • [CULL:SQUARE]
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #1541 on: March 07, 2015, 09:41:18 pm »

I like that idea, just wish that there was a FOSS-compatible format that supported layers so you could compose everything in one window.  As it is, I think you'd need to use GIMP or Illustrator, and manually export each layer as its own image.
Was gonna say, pretty sure GIMP can export a layered png, just forgot what the lib was called, mng as mifki pointed out.
Logged

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #1542 on: March 08, 2015, 01:06:17 pm »

If it's not going to add any new library dependencies, and can be created with the tools people are already using, then it sounds like an awesome solution.  Just never saw a layered export in GIMP2, but then again that program has lots of features I never used.
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: Text Will Be Text - dfhack plugin
« Reply #1543 on: March 08, 2015, 08:26:53 pm »

I don't think using some exotic file format is a good idea. Exporting layers to individual files is a trivial procedure (select-copy-switch to another file-paste), and there are actions (built-in and 3rd party) for Photoshop to do that automatically, and probably for other apps as well.

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #1544 on: March 08, 2015, 08:49:14 pm »

I don't think using some exotic file format is a good idea. Exporting layers to individual files is a trivial procedure (select-copy-switch to another file-paste), and there are actions (built-in and 3rd party) for Photoshop to do that automatically, and probably for other apps as well.
If png and mng are supported by the same library it might (just might) be trivial to support both.

In any case, I can definitely foresee artists adding a "topcoat" image by giving it a layer number higher than any material actually used in the building.  So long as that is handled gracefully (tinting with default material color of white is the same as not tinting at all, right?) then everyone will be happy.
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
Pages: 1 ... 101 102 [103] 104 105 ... 185