Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 75 76 [77] 78 79 ... 185

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

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: Text Will Be Text - dfhack plugin
« Reply #1140 on: October 02, 2014, 09:23:04 am »

1. On load, scan through all of the DESCRIPTOR_COLOR objects and associate them with their closest display color based on the current color scheme.
DF itself already does that for you when it parses the raws (because it uses STATE_COLOR for spatters and flows), so all you need to do is look at the the "color" and "bold" fields in descriptor_color.
Logged
P.S. If you don't get this note, let me know and I'll write you another.
It's amazing how dwarves can make a stack of bones completely waterproof and magmaproof.
It's amazing how they can make an entire floodgate out of the bones of 2 cats.

muppet9876

  • Bay Watcher
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #1141 on: October 02, 2014, 10:16:58 am »

If anyone is wanting a map font, this is my effort I've been fiddling with for the last week (mashup of other peoples work, HaterSkater, Phoebus, IronHand, all those people that did the dwarves/elves/goblins and possibly more ;)).


Tileset and batch file for easier usage (TODAY!) with the Windows Starter Pack.

P.S. Before anyone mentions it, I really should have done the legend while I was doing it. Just can't summon the patience up to make one ... yet. The wiki will tell you what the colours mean. Maybe they're pictorial enough to make sense to you. :D
Logged

LeoCean

  • Bay Watcher
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #1142 on: October 02, 2014, 01:50:33 pm »

I've had a number of people ask about tiles for the world map (in worldgen and embark).  If this could be a standard tile set defined in overrides.txt, that would be awesome - just drop in a specialist set once developed, or use a square text set, and default to the text tiles if it's not set.

Yeah, I saw people complained about text world map. Ok let it be the next thing to do. The only problem I'm afraid to tell you is that world map tiles will have the size of text tiles, so not square. Can't do anything about it. Otherwise it's quite simple.

That's awesome!  Shame about the size and shape, but thinking back it always was that way.  I guess tile artists will have to be creative  ;D

Tried now and can certainly say that graphics tileset squashed to the size of curses font looks like shit. So two options here - either use a different, more squary font as default text font. Or dynamically change text tile size to square on these several screens with world maps because there's not much text on them anyway. Or wait until someone makes a nice rectangular world map tileset, but I'm not sure that can be done.

There's a 16x16 cursefont are you saying the only font you can use is that 128x192 or the  160x192? The default installation comes with the 256x256 curse font set that is the same size as regular tile sets. Is the map tileset override even ready to be tested on 5.19?

@muppet I could live with the text before I could live with that map font you just shown, personal taste and all.
Logged

Max™

  • Bay Watcher
  • [CULL:SQUARE]
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #1143 on: October 03, 2014, 08:51:37 am »

Well, like others I was in the "love the spacefox dorfs, wish the font was bigger" boat.

I ended up hacking together the most unruly mishmash of parts, as twbt by itself didn't want to work right, and then I had a fluke where spacefox worked right and it even let me use the bisasam derived fonts I prefer, but when I tried to reload it just kept spitting out the uh, LD_PRELOAD env stuff.

On a hunch I tried to use the LNP and it worked fine, but getting it to use twbt as I desired was a pain.

I finally ended up switching pieces over step by step until I found that one of the init.txt's in the spacefox set wasn't changed right, so I just removed that entirely and left the spacefox dwarves in, loaded up dfhack with the ./dfhack instead of using the .startlnp script, and bladow!
Spoiler (click to show/hide)
That is like super duper ultra mega zoomed in, as that little bit of screenshot there was most of a 1920x1080 window, and the whole time my font size/style stayed the crisp easy to read bisasam 24x24 I love so much.

Now I get to share the adorable spacefox dorfs with the gf while telling her what awful horrible things have been happening to them due to my actions, hurray!

Oooh, I bet that multilevel thing will work too, hadn't even checked because the first map I loaded was that extreme cliff/river embark someone was looking for from the cookbook thread a couple pages back. Hard to see if multilevel works when the difference from the embark level to the bottom of the cliff is like 26 z straight down. :D

Anyways, love you folks, I'mma go grin as my cute little military dorfs hack up ...oooh, I bet the goblin overrides worked too!
Logged

LeoCean

  • Bay Watcher
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #1144 on: October 03, 2014, 01:36:14 pm »

I've really no idea what you just said but twbt tilesize 18 18 lets you change the tilesize through twbt to whatever you want no matter the size of your screen. I wouldn't go over twbt tilesize 32 32 though, spacefox should be ok going that high without needing to be edited.

As for the init if it wasn't loading twbt it's because the print mode wasn't set to :TWBT or TWBT_LEGACY. Unless it's a version before 40.13r3 then it needed :STANDARD.
« Last Edit: October 03, 2014, 01:39:59 pm by LeoCean »
Logged

Max™

  • Bay Watcher
  • [CULL:SQUARE]
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #1145 on: October 03, 2014, 10:54:17 pm »

I was trying to get a Bisasam tileset with the normal fonts and one I had swapped in some rocks and objects for the ores and stuff, but I had no luck getting twbt to work for me.

I decided to see if I could get the lazy newb pack working since I saw it said that it was working well on linux with some of the new versions, 5.19 and such, and I got it working with spacefox which was nice, but I'm not used to looking at the phoebus tiles so that was more of a tease than anything else.

I tried to just use the Bisasam tilesets while launching with the startlnp and was pleasantly surprised to see it not only did the awesome twbt thing, but it also kept the spacefox dwarf overrides.  It got buggy though so I tried just pulling the df_linux folder out of the lnp as it was and callooh callay, I chortled in my joy, finally able to partake in the wonderful twbt experience!

You are right that the spacefox dwarf tiles zoom fine, it was just a habit from trying to get one tileset for everything to try and get it looking good zoomed or out.
Logged

Rydel

  • Bay Watcher
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #1147 on: October 07, 2014, 05:46:03 pm »

I'm a bit confused with overriding plants.  It looks like PLANT:PLANT should cover single tile plants, and PLANT:LEAVES should cover leaves, but what about other growths?
HEART, FLOWERS, FRUIT, POD, BUDS, and BULB aren't listed in items_other_id.h  How do I override them?
Does subtype only count plants that have that specific growth, or all plants?
For different growth stages, I assume I'd override the different tiles each stage uses with the same Id, Type, and Subtype, correct?

Thanks in advance. Sorry for the sheer number of questions.

deepholedwarf

  • Escaped Lunatic
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #1148 on: October 07, 2014, 06:21:45 pm »

Does anyone know of a twbt version compiled with gcc 4.8.3 or older? I can only find one compiled with 4.9.0. I installed the gcc-snapshot package, but I can't get twbt.plug.so to see it. It keeps coming up with /usr/lib/i386-linux-gnu/libstdc++.so.6, which is libstdc++.so.6.0.19. I tried putting the path to the snapshot lib directory in LD_LIBRARY_PATH, both at the beginning and the end, but apparently that is not how it works.

Failing that, do I need the dfhack source to compile twbt? Just running make on what I got from https://github.com/mifki/df-twbt/archive/master.zip gives this:

Code: [Select]
troll:df-twbt-master$ make
c++ -std=c++0x twbt.cpp -o dist/0.34.11-r5/twbt.plug.so -DDFHACK_VERSION=\"0.34.11-r5\" -DDF_`echo 0.34.11-r5 | sed -e s/-r.*// -e s/\\\\.//g` -DTWBT_VER=\""5.xx"\" -I"/home/jbabcock/src/df-twbt-master/library/include" -I"/home/jbabcock/src/df-twbt-master/library/proto" -I"/home/jbabcock/src/df-twbt-master/depends/protobuf" -I"/home/jbabcock/src/df-twbt-master/depends/lua/include" -m32 -DLINUX_BUILD -O3 -L"/home/jbabcock/src/df-twbt-master/build/library" -ldfhack -shared
twbt.cpp:40:18: fatal error: Core.h: No such file or directory
 #include "Core.h"
                  ^
compilation terminated.
make: *** [dist/0.34.11-r5/twbt.plug.so] Error 1
Logged

LeoCean

  • Bay Watcher
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #1149 on: October 07, 2014, 06:52:33 pm »

You'd just compile it with what is in the source file on the site not dfhack as I understand it. There is already a linux build though if you look at the development builds on the first page.
Logged

mifki

  • Bay Watcher
  • works secretly...
    • View Profile
    • mifki
Re: Text Will Be Text - dfhack plugin
« Reply #1150 on: October 07, 2014, 06:56:33 pm »

Does anyone know of a twbt version compiled with gcc 4.8.3 or older? I can only find one compiled with 4.9.0. I installed the gcc-snapshot package, but I can't get twbt.plug.so to see it. It keeps coming up with /usr/lib/i386-linux-gnu/libstdc++.so.6, which is libstdc++.so.6.0.19. I tried putting the path to the snapshot lib directory in LD_LIBRARY_PATH, both at the beginning and the end, but apparently that is not how it works.

Yes, you need dfhack to compile it.
What distro/version do you have?

I think I can include a binary built with 4.5.4 in my packages as well, I'll try it soon.

lethosor

  • Bay Watcher
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #1151 on: October 07, 2014, 06:58:44 pm »

You'd just compile it with what is in the source file on the site not dfhack as I understand it. There is already a linux build though if you look at the development builds on the first page.
That Linux build is built with GCC 4.9 and requires GCC 4.9 libraries. Some Linux distros (notably Ubuntu) do not have GCC 4.9 available in their package managers.
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.

mifki

  • Bay Watcher
  • works secretly...
    • View Profile
    • mifki
Re: Text Will Be Text - dfhack plugin
« Reply #1152 on: October 07, 2014, 07:08:32 pm »

I'm a bit confused with overriding plants.  It looks like PLANT:PLANT should cover single tile plants, and PLANT:LEAVES should cover leaves, but what about other growths?
HEART, FLOWERS, FRUIT, POD, BUDS, and BULB aren't listed in items_other_id.h  How do I override them?
Does subtype only count plants that have that specific growth, or all plants?
For different growth stages, I assume I'd override the different tiles each stage uses with the same Id, Type, and Subtype, correct?

Thanks in advance. Sorry for the sheer number of questions.

I personally don't know. There are definitely no LEAVES in 0.40 (but there's PLANT_GROWTH) item type. Probably plants need additional support in the plugin. You can figure out and I'll add it then.

mifki

  • Bay Watcher
  • works secretly...
    • View Profile
    • mifki
Re: Text Will Be Text - dfhack plugin
« Reply #1153 on: October 07, 2014, 07:21:15 pm »

You'd just compile it with what is in the source file on the site not dfhack as I understand it. There is already a linux build though if you look at the development builds on the first page.
That Linux build is built with GCC 4.9 and requires GCC 4.9 libraries. Some Linux distros (notably Ubuntu) do not have GCC 4.9 available in their package managers.

On Ubuntu it's easy to fix
Code: [Select]
sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install g++-4.9

Rydel

  • Bay Watcher
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #1154 on: October 07, 2014, 08:21:44 pm »

I personally don't know. There are definitely no LEAVES in 0.40 (but there's PLANT_GROWTH) item type. Probably plants need additional support in the plugin. You can figure out and I'll add it then.

It looks like all plant growths use use Id: PLANT, Type: PLANT_GROWTH, sUBTYPE: NONE, and then use the materiel to determine but the plant it is from and the type of growth.
For instance:
Purple Amaranth Leaves are Type: PLANT_GROWTH, Subtype: NONE, Material: PLANT:PURPLE_AMARANTH:LEAF
'Quarry Bush Leaves are Type: PLANT_GROWTH, Subtype: NONE, Material: PLANT:BUSH_QUARRY:LEAF
Blueberries are Type: PLANT_GROWTH, Subtype: NONE, Material: PLANT:BLUEBERRY:FRUIT

I assume the ID is PLANT, but dfhack's changeitem info doesn't list that part.

So, it looks like you'd need the ability to specify the material in order to change the graphics for Fruits, Pods, Leaves, etc.
« Last Edit: October 07, 2014, 09:14:43 pm by Rydel »
Logged
Pages: 1 ... 75 76 [77] 78 79 ... 185