Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 16 17 [18] 19 20 ... 185

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

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #255 on: June 23, 2014, 10:08:37 am »

a bug report: "unload twbt" crashes. I think you need to get a lock on df to change vtables. The init part happens before df had time to do anything. Or at least that's my guess.
Probably you don't do the "protect/unprotect" dance on unload.
« Last Edit: June 23, 2014, 10:41:01 am by Warmist »
Logged

WillowLuman

  • Bay Watcher
  • They/Them Life is weird
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #256 on: June 23, 2014, 11:56:58 am »

PTW and download.
Logged
Dwarf Souls: Prepare to Mine
Keep Me Safe - A Girl and Her Computer (Illustrated Game)
Darkest Garden - Illustrated game. - What mysteries lie in the abandoned dark?

GavJ

  • Bay Watcher
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #257 on: June 23, 2014, 03:13:09 pm »

This thread contains some of the most exciting developments since I started playing DF. Amazing work, mifki.
It is kind of sad that the most exciting developments are simply being able to display different materials and items with different symbols... and viewing the map...

But it's still true. I agree. Awesome stuff.

*pokes Toady in the ribs in the direction of a room full of people willing to collaborate directly on graphics*
(not that other updates aren't awesome, but this basic stuff is just SO limiting and SUCH low hanging fruit, it is frustrating how we could do 5x as much cool stuff as this without hacking in indirectly)
« Last Edit: June 23, 2014, 03:15:05 pm by GavJ »
Logged
Cauliflower Labs – Geologically realistic world generator devblog

Dwarf fortress in 50 words: You start with seven alcoholic, manic-depressive dwarves. You build a fortress in the wilderness where EVERYTHING tries to kill you, including your own dwarves. Usually, your chief imports are immigrants, beer, and optimism. Your chief exports are misery, limestone violins, forest fires, elf tallow soap, and carved kitten bone.

Sergarr

  • Bay Watcher
  • (9) airheaded baka (9)
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #258 on: June 25, 2014, 05:57:08 am »

This thread contains some of the most exciting developments since I started playing DF. Amazing work, mifki.
It is kind of sad that the most exciting developments are simply being able to display different materials and items with different symbols... and viewing the map...

But it's still true. I agree. Awesome stuff.

*pokes Toady in the ribs in the direction of a room full of people willing to collaborate directly on graphics*
(not that other updates aren't awesome, but this basic stuff is just SO limiting and SUCH low hanging fruit, it is frustrating how we could do 5x as much cool stuff as this without hacking in indirectly)

You know that SDL that is currently displaying graphics is not written by Toady? It was the other person who since then has disappeared. He was also planning to add these features in 2010.
Logged
._.

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Text Will Be Text - dfhack plugin
« Reply #259 on: June 25, 2014, 06:48:35 am »

That was Baughn and he did not disappear. In fact he offered to write a new graphics engine for DF a few months ago, but he needs source code access (obviously, otherwise you cant code on it), and (obviously again), Toady did not give access.
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 :::

mifki

  • Bay Watcher
  • works secretly...
    • View Profile
    • mifki
Re: Text Will Be Text - dfhack plugin
« Reply #260 on: June 25, 2014, 07:11:48 am »

The problem is that anyway you can't implement much better graphics with what is currently being passed to the rendering code, i.e. without access to game internals (what we do through dfhack), or complete rewrite of how game interacts with rendering code, like lxnt proposed. And Toady definitely isn't going to do that.

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Text Will Be Text - dfhack plugin
« Reply #261 on: June 25, 2014, 07:39:04 am »

I am perfectly fine with the changes you are doing at the moment. :)

Especially non-square text (will make playing without more ttf feasable), the multi-z-level viewing (finally people dont embark on flat lands only) and the override tiles for custom workshops. These three are certainly the most versatile. 

A override for creatures based on caste level would open up lots of new options for modders as well.
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 :::

Footkerchief

  • Bay Watcher
  • The Juffo-Wup is strong in this place.
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #262 on: June 25, 2014, 09:06:54 am »

That was Baughn and he did not disappear. In fact he offered to write a new graphics engine for DF a few months ago, but he needs source code access (obviously, otherwise you cant code on it), and (obviously again), Toady did not give access.

Was there a thread I missed?
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Text Will Be Text - dfhack plugin
« Reply #263 on: June 25, 2014, 10:01:06 am »

Oh mighty Footkerchief, it sadly has been PM's/IRC only. No thread to link to.
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 :::

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #264 on: June 25, 2014, 03:24:21 pm »

That was Baughn and he did not disappear. In fact he offered to write a new graphics engine for DF a few months ago, but he needs source code access (obviously, otherwise you cant code on it), and (obviously again), Toady did not give access.

Was there a thread I missed?
I think we can categorically exclude that possibility, O finder of quotes-within-quotes-that-use-completely-different-words-to-describe-a-topic.
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 #265 on: June 25, 2014, 07:52:01 pm »

I am perfectly fine with the changes you are doing at the moment. :)

Especially non-square text (will make playing without more ttf feasable), the multi-z-level viewing (finally people dont embark on flat lands only) and the override tiles for custom workshops. These three are certainly the most versatile. 

A override for creatures based on caste level would open up lots of new options for modders as well.

I'm not completely happy with this solution though.

I'll now add support for overrides based on tile types (and there's lot of them) and designations, and this will allow to override virtually everything. And I suppose you'll happily do this:) But that just doesn't seem right (mostly from the performance point of view of course) - first to render screen, then to re-render parts again for lower levels, then to apply overrides...

There's a known function (i.e. its address) that does map rendering (and it seems nothing else, but not sure). And Warmist has [incomplete] map rendering code in his offscreen module. It worth trying to combine these two things, but it's a very big work to implement our own map rendering to look like the original.

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #266 on: June 25, 2014, 10:37:20 pm »

Okay now I feel dumb... I put the .h files where all the other .h files were, and put the .dll file (with its .so sibling) where all the other .dll files are, but twbt doesn't show up when I ls inside DFHack.  I can load twbt without error, but nothing happens.

Probably missing something really really basic about DFHack.
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 #267 on: June 25, 2014, 10:41:01 pm »

Okay now I feel dumb... I put the .h files where all the other .h files were, and put the .dll file (with its .so sibling) where all the other .dll files are, but twbt doesn't show up when I ls inside DFHack.  I can load twbt without error, but nothing happens.

Probably missing something really really basic about DFHack.

See this post http://www.bay12forums.com/smf/index.php?topic=138754.msg5339685;topicseen#msg5339685 for the basic functionality. If you want overrides, copy overrides.txt to data/init folder and see instructions inside. You don't need to copy .h files anywhere.

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Text Will Be Text - dfhack plugin
« Reply #268 on: June 26, 2014, 12:19:17 am »

You download the file and unpack.
You copy any 2 tilesets of your choice from somewhere else into data/art.
You copy overrides.txt into data/init.
You copy twbt.plugin.dll into hack/plugins.
You open data/init and set PRINTMODE to STANDARD.
You find the four entries for tilesets in the init file:
Code: [Select]
[FONT:]
[FULLFONT:]
[GRAPHICS_FONT:]
[GRAPHICS_FULLFONT:]
You add the tileset name you want to use for text to the first two.
You add the tileset name you want to use for graphics to the last two.

Example:
You download Phoebus for graphics and Obsidian Soul for text. Make sure the names in the init fit the names of the .png or .bmp files in data/art, like this:
Code: [Select]
[FONT:Obsidian_16x16.png]
[FULLFONT:Obsidian_16x16.png]
[GRAPHICS_FONT:Phoebus_16x16.png]
[GRAPHICS_FULLFONT:Phoebus_16x16.png]

Now you have text and graphics, but not yet item graphics. You have not yet used the overrides.txt. For this you need to make a new tileset yourself (or use tiles from other pixel artists), and make a third tileset, which you can name as you want. Lets assume that we only have one tile in that new tileset, a bin. And that you want to override the bin ingame, which is an 'X' with this new graphic.

You open a paint program, lets say Photoshop or Gimp.
You make a 16x16 tile png, 256pixel times 256pixels for a 16x16 pixel tileset with 16x16 tiles. The 16 tiles is a hardcoded limit, you need to do this. The pixels can be anything. If you want to make a 16x16 tile tileset with 24x24 pixels per tile, simply make a 384x384 png. Or a small 8x8 set would result in a 64x64 pixel png.

Once you have this file, you take the tile on the top-left, which is tile 0. The one next to it is tile 1, tile 2 and so on, till tile 255 at the very end. Note that it starts counting with 0, so you are always one number short.

Now you make a beautiful masterpiece of a pixelated bin on that top-left spot. It should be 16x16 pixels, because thats what both Phoebus and Obsidian use for their sets. If you make it larger or smaller, it will still work, but look blurry ingame.

Now you save the file, calling it "Override Tileset - Example1.png", which can be any name you want. You put it into data/art.

You open overrides.txt in your data/init folder, and add this line:
Code: [Select]
[TILESET:Override Tileset - Example1.png:Override Tileset - Example1.png]
Now it finds the new tileset. But it still needs to know what tile to overwrite with what, and especially only doing that for bins. That works with a second line, which looks like this: [OVERRIDE:Tile:Kind:Id:Type:Subtype:Tileset:NewTile]

OVERRIDE is the command, it will replace the tile with a tile.
Tile is the tilenumber of the item you want to replace. Bins use Tile '88'.
Kind is I, which stands for Item. Currently it only acceps I for item and B, for building.
Id is found in the item_type.h, which is just an info dump to help you find the right ids. In that case BIN
Type follows the same idea, items_other_id.txt shows you that in that case, its BIN as well.
Subtype you dont have for bins, so its nothing. Empty.
Tileset is the number of the tilesets you want to use. Obsidian is your text one, its 0. Phoebus is your graphics one, its 1, "Override Tileset - Example 1" is the third set you entered, so its 2. Again, counting starts at 0. You can add as many as you like.
NewTile is the new graphic tile the bin should take, in that case 0, because we used the top-left tile for it.

All in all that gives us:
Code: [Select]
[OVERRIDE:88:I:BIN:BIN::2:0]
Now open DF while using Printmode:STANDARD and you are good to go.  :)
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 :::

SalmonGod

  • Bay Watcher
  • Nyarrr
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #269 on: June 26, 2014, 12:30:08 am »

Now you make a beautiful masterpiece of a pixelated bin on that top-left spot. It should be 16x16 pixels, because thats what both Phoebus and Obsidian use for their sets. If you make it larger or smaller, it will still work, but look blurry ingame.

But you can use a 24x24 tileset, and then avoid blurriness with 24x24 graphics tiles, right?
Logged
In the land of twilight, under the moon
We dance for the idiots
As the end will come so soon
In the land of twilight

Maybe people should love for the sake of loving, and not with all of these optimization conditions.
Pages: 1 ... 16 17 [18] 19 20 ... 185