Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 39 40 [41] 42 43 ... 185

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

mifki

  • Bay Watcher
  • works secretly...
    • View Profile
    • mifki
Re: Text Will Be Text - dfhack plugin
« Reply #600 on: July 29, 2014, 01:47:02 am »

Code: [Select]
[OVERRIDE:127:B:WORKSHOP_MECHANIC:Workshop::0:48]
[OVERRIDE:88:B:ARCHERY_TARGET:ArcheryTarget::0:48]

definitely work. Note that id and type are case-sensitive. However there's a problem indeed with overriding X and cursor, I'll fix that.

And about tiles displayed dark - overrides don't change colors so they should be displayed exactly as if they were original tiles, including being darker than you see in your graphics editor, according to tile colouring rules.

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Text Will Be Text - dfhack plugin
« Reply #601 on: July 31, 2014, 04:46:09 pm »

Just wanted to check in and ask about the custom workshop overrides. Are these possible by now? I saw the post about changing the tile on the mechanic, so maybe it works now?

Edit: Forget about it. I figured it out. Will post results shortly. The solution is [OVERRIDE:tile you want to have overwritten:B:workshop id as written in the raws:Workshop:this argument has to be empty:tileset number:new tile number]

Edit2: I am an exceedingly happy person now.


(these are 32x tiles, so they are compressed to 16x for the screenshot. They actually look twice as good uncrompressed.)
« Last Edit: July 31, 2014, 06:12:43 pm by Meph »
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 :::

Roses

  • Bay Watcher
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #602 on: July 31, 2014, 06:25:48 pm »

That is pretty amazing...
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Text Will Be Text - dfhack plugin
« Reply #603 on: July 31, 2014, 06:28:07 pm »

I will post an example with code in a bit. :)
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 #604 on: July 31, 2014, 06:33:03 pm »

Edit: Forget about it. I figured it out. Will post results shortly. The solution is [OVERRIDE:tile you want to have overwritten:B:workshop id as written in the raws:Workshop:this argument has to be empty:tileset number:new tile number]

As with Diton's case I doubt it works as expected. It should be able to understand only values from included .h files and not custom IDs from raws. It actually should ignore overrides with unrecognised values but currently main branch doesn't. So I think it works only because same tiles are not used in other workshops.

I'll try to implement proper support for custom buildings today or on the weekend.

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Text Will Be Text - dfhack plugin
« Reply #605 on: July 31, 2014, 06:35:00 pm »

Mifki. Its an ingame screenshot. It works.
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 #606 on: July 31, 2014, 06:38:11 pm »

Mifki. Its an ingame screenshot. It works.

I understand. Do you have the same tiles used in other workshops? What happens now is that it replaces specified tile in all buildings with Workshop type, just ignoring unrecognised id. Try using the same tile in two different workshops.

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Text Will Be Text - dfhack plugin
« Reply #607 on: July 31, 2014, 06:49:30 pm »

Oh.  :-[

I did notice that it overwrites other tiles with the same number in custom workshops, but I thought I could circumvent that by using unique tilenumbers for each building. I didnt realize it would affect vanilla workshops as well. I just tested, it does. Now I made myself sad.

I will still finish writing the example, because it will be helpful after this:
Quote
I'll try to implement proper support for custom buildings today or on the weekend.

I hope you can find a way to make this possible. :) And not only because I would look like a fool, after writing a PM to four modders asking if they want sprites for their workshops. :D
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 #608 on: July 31, 2014, 06:56:16 pm »

Oh.  :-[

I did notice that it overwrites other tiles with the same number in custom workshops, but I thought I could circumvent that by using unique tilenumbers for each building. I didnt realize it would affect vanilla workshops as well. I just tested, it does. Now I made myself sad.

I will still finish writing the example, because it will be helpful after this:
Quote
I'll try to implement proper support for custom buildings today or on the weekend.

When it's done you will use something like

WORKSHOP_CUSTOM:Workshop:YOUR_WORKSHOP_ID

Again I remind that this values are case-sensitive. I'll add a check to ignore or print a message in case of unrecognised values, but right now using wrong values may lead to unexpected things as you see, sorry about this.

Diton

  • Bay Watcher
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #609 on: July 31, 2014, 06:58:08 pm »

Can't wait for custom workshops, siege engines, and world map tiles to be added, once that's done it should be possible to have a unique tile for the vast majority of things in the game, with minimal quirks.
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Text Will Be Text - dfhack plugin
« Reply #610 on: July 31, 2014, 07:03:53 pm »

Here the examples.

I hope they help other people to set something like this up, after mifki did the changes he just described. Both sprites are taken from Warcraft II: Orcs vs. Humans, by Blizzard. Copyright & TM.

Add to entity:
Code: [Select]
[PERMITTED_BUILDING:BLACK_ALTAR_ORC]
[PERMITTED_BUILDING:TINKERER_ORCISH]

Add to any building file:
Code: [Select]
[BUILDING_WORKSHOP:BLACK_ALTAR_ORC]
[NAME:Black Altar]
[NAME_COLOR:7:0:1]
[BUILD_KEY:CUSTOM_SHIFT_X]
[DIM:4:4]
[WORK_LOCATION:2:2]
[BLOCK:1:0:0:0:0]
[BLOCK:2:0:0:0:0]
[BLOCK:3:0:0:0:0]
[BLOCK:4:0:0:0:0]
[TILE:0:1:11:12:32:32]
[TILE:0:2:27:28:32:32]
[TILE:0:3:32:32:32:32]
[TILE:0:4:32:32:32:32]
[COLOR:0:1:7:0:1:7:0:1:0:0:0:0:0:0]
[COLOR:0:2:7:0:1:7:0:1:0:0:0:0:0:0]
[COLOR:0:3:0:0:0:0:0:0:0:0:0:0:0:0]
[COLOR:0:4:0:0:0:0:0:0:0:0:0:0:0:0]
[TILE:1:1:32:32:32:32]
[TILE:1:2:32:32:32:32]
[TILE:1:3:32:32:32:32]
[TILE:1:4:32:32:32:32]
[COLOR:1:1:0:0:0:0:0:0:0:0:0:0:0:0]
[COLOR:1:2:0:0:0:0:0:0:0:0:0:0:0:0]
[COLOR:1:3:0:0:0:0:0:0:0:0:0:0:0:0]
[COLOR:1:4:0:0:0:0:0:0:0:0:0:0:0:0]
[TILE:2:1:32:32:32:32]
[TILE:2:2:32:32:32:32]
[TILE:2:3:32:32:32:32]
[TILE:2:4:32:32:32:32]
[COLOR:2:1:0:0:0:0:0:0:0:0:0:0:0:0]
[COLOR:2:2:0:0:0:0:0:0:0:0:0:0:0:0]
[COLOR:2:3:0:0:0:0:0:0:0:0:0:0:0:0]
[COLOR:2:4:0:0:0:0:0:0:0:0:0:0:0:0]
[TILE:3:1:0:1:2:3]
[TILE:3:2:4:5:6:7]
[TILE:3:3:8:9:10:11]
[TILE:3:4:12:13:14:15]
[COLOR:3:1:7:0:1:7:0:1:7:0:1:7:0:1]
[COLOR:3:2:7:0:1:7:0:1:7:0:1:7:0:1]
[COLOR:3:3:7:0:1:7:0:1:7:0:1:7:0:1]
[COLOR:3:4:7:0:1:7:0:1:7:0:1:7:0:1]

[BUILDING_WORKSHOP:TINKERER_ORCISH]
[NAME:Orcish Tinkerer]
[NAME_COLOR:7:0:1]
[BUILD_KEY:CUSTOM_SHIFT_Y]
[DIM:4:4]
[WORK_LOCATION:2:2]
[BLOCK:1:0:0:0:0]
[BLOCK:2:0:0:0:0]
[BLOCK:3:0:0:0:0]
[BLOCK:4:0:0:0:0]
[TILE:0:1:11:12:32:32]
[TILE:0:2:27:28:32:32]
[TILE:0:3:32:32:32:32]
[TILE:0:4:32:32:32:32]
[COLOR:0:1:7:0:1:7:0:1:0:0:0:0:0:0]
[COLOR:0:2:7:0:1:7:0:1:0:0:0:0:0:0]
[COLOR:0:3:0:0:0:0:0:0:0:0:0:0:0:0]
[COLOR:0:4:0:0:0:0:0:0:0:0:0:0:0:0]
[TILE:1:1:32:32:32:32]
[TILE:1:2:32:32:32:32]
[TILE:1:3:32:32:32:32]
[TILE:1:4:32:32:32:32]
[COLOR:1:1:0:0:0:0:0:0:0:0:0:0:0:0]
[COLOR:1:2:0:0:0:0:0:0:0:0:0:0:0:0]
[COLOR:1:3:0:0:0:0:0:0:0:0:0:0:0:0]
[COLOR:1:4:0:0:0:0:0:0:0:0:0:0:0:0]
[TILE:2:1:32:32:32:32]
[TILE:2:2:32:32:32:32]
[TILE:2:3:32:32:32:32]
[TILE:2:4:32:32:32:32]
[COLOR:2:1:0:0:0:0:0:0:0:0:0:0:0:0]
[COLOR:2:2:0:0:0:0:0:0:0:0:0:0:0:0]
[COLOR:2:3:0:0:0:0:0:0:0:0:0:0:0:0]
[COLOR:2:4:0:0:0:0:0:0:0:0:0:0:0:0]
[TILE:3:1:16:17:18:19]
[TILE:3:2:20:21:22:23]
[TILE:3:3:24:25:26:27]
[TILE:3:4:28:29:30:31]
[COLOR:3:1:7:0:1:7:0:1:7:0:1:7:0:1]
[COLOR:3:2:7:0:1:7:0:1:7:0:1:7:0:1]
[COLOR:3:3:7:0:1:7:0:1:7:0:1:7:0:1]
[COLOR:3:4:7:0:1:7:0:1:7:0:1:7:0:1]

The tileset, in my case the name is "MDF 24x - Overrides Buildings.png"


The entries in the overrides.txt. Mind that the "5" means that this is my fifth tileset in use. The number on your machine might very well differ.
Code: [Select]
[TILESET:MDF 24x - Overrides Buildings.png:MDF 24x - Overrides Buildings.png]

[OVERRIDE:0:B:BLACK_ALTAR_ORC:Workshop::5:0]
[OVERRIDE:1:B:BLACK_ALTAR_ORC:Workshop::5:1]
[OVERRIDE:2:B:BLACK_ALTAR_ORC:Workshop::5:2]
[OVERRIDE:3:B:BLACK_ALTAR_ORC:Workshop::5:3]
[OVERRIDE:4:B:BLACK_ALTAR_ORC:Workshop::5:16]
[OVERRIDE:5:B:BLACK_ALTAR_ORC:Workshop::5:17]
[OVERRIDE:6:B:BLACK_ALTAR_ORC:Workshop::5:18]
[OVERRIDE:7:B:BLACK_ALTAR_ORC:Workshop::5:19]
[OVERRIDE:8:B:BLACK_ALTAR_ORC:Workshop::5:32]
[OVERRIDE:9:B:BLACK_ALTAR_ORC:Workshop::5:33]
[OVERRIDE:10:B:BLACK_ALTAR_ORC:Workshop::5:34]
[OVERRIDE:11:B:BLACK_ALTAR_ORC:Workshop::5:35]
[OVERRIDE:12:B:BLACK_ALTAR_ORC:Workshop::5:48]
[OVERRIDE:13:B:BLACK_ALTAR_ORC:Workshop::5:49]
[OVERRIDE:14:B:BLACK_ALTAR_ORC:Workshop::5:50]
[OVERRIDE:15:B:BLACK_ALTAR_ORC:Workshop::5:51]

[OVERRIDE:16:B:TINKERER_ORCISH:Workshop::5:4]
[OVERRIDE:17:B:TINKERER_ORCISH:Workshop::5:5]
[OVERRIDE:18:B:TINKERER_ORCISH:Workshop::5:6]
[OVERRIDE:19:B:TINKERER_ORCISH:Workshop::5:7]
[OVERRIDE:20:B:TINKERER_ORCISH:Workshop::5:20]
[OVERRIDE:21:B:TINKERER_ORCISH:Workshop::5:21]
[OVERRIDE:22:B:TINKERER_ORCISH:Workshop::5:22]
[OVERRIDE:23:B:TINKERER_ORCISH:Workshop::5:23]
[OVERRIDE:24:B:TINKERER_ORCISH:Workshop::5:36]
[OVERRIDE:25:B:TINKERER_ORCISH:Workshop::5:37]
[OVERRIDE:26:B:TINKERER_ORCISH:Workshop::5:38]
[OVERRIDE:27:B:TINKERER_ORCISH:Workshop::5:39]
[OVERRIDE:28:B:TINKERER_ORCISH:Workshop::5:52]
[OVERRIDE:29:B:TINKERER_ORCISH:Workshop::5:53]
[OVERRIDE:30:B:TINKERER_ORCISH:Workshop::5:54]
[OVERRIDE:31:B:TINKERER_ORCISH:Workshop::5:55]

Note that the tiles are unique on both workshops, the tinkerer shares no tiles with the altar, otherwise it would get mixed up, as mifki described. Its not important anymore I guess, when he finishes the custom_id system.

The end result, ingame screenshot:


You can easily change the black background to fit the grass, or constructed floor. This is just a quick example.
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 :::

Lysabild

  • Bay Watcher
  • Eidora Terminus Imperii Romani
    • View Profile
    • My Steam!
Re: Text Will Be Text - dfhack plugin
« Reply #611 on: August 01, 2014, 12:25:51 am »

Warcraft 2 sprites<3 Still the worlds prettiest game ever.
Logged

mifki

  • Bay Watcher
  • works secretly...
    • View Profile
    • mifki
Re: Text Will Be Text - dfhack plugin
« Reply #612 on: August 01, 2014, 09:13:42 am »

Meph,
try version 3.32
see overrides.txt for correct syntax for custom buildings, it's not exactly as in your tutorial

yawa

  • Escaped Lunatic
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #613 on: August 01, 2014, 09:59:22 am »

This looks enormously exciting, but frankly, I am a moron, and all the set up required here is incredibly opaque to me. I followed the tutorial, but it didn't seem to have any effect.

I realize this is still early in development, but is there any way this could be streamlined and implemented in the DF starter pack down the line?
Logged

fricy

  • Bay Watcher
  • [DFHACK:ZEALOT]
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #614 on: August 01, 2014, 10:05:14 am »

Quote from: yawa link=4.msg5532007#msg5532007 date=1406905162
This looks enormously exciting, but frankly, I am a moron, and all the set up required here is incredibly opaque to me. I followed the tutorial, but it didn't seem to have any effect.

I realize this is still early in development, but is there any way this could be streamlined and implemented in the DF starter pack down the line?

Most of this is already implemented in the v34.11 starter packs, and will be in 40.x once we have dfhack.
Pages: 1 ... 39 40 [41] 42 43 ... 185