Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 93 94 [95] 96 97 ... 185

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

mifki

  • Bay Watcher
  • works secretly...
    • View Profile
    • mifki
Re: Text Will Be Text - dfhack plugin
« Reply #1410 on: January 08, 2015, 08:59:26 am »

Even simpler way is to enable live (or whatever it's called) mode in mouse query so that it will show description of a tile under cursor. Then you can even use that string included in quotes instead of aforementioned tile type constants.

Eg.

[OVERRIDE:88:T:"stone stair up/down":3:88]

Obsidian Soul

  • Bay Watcher
  • ...and the severed part sails off in an arc!
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #1411 on: January 08, 2015, 09:22:02 am »

Ahk. Will do. Thanks :)

Oh, and I'm referring to the list in the TWBT readme.

How about the map tiles though?

mifki

  • Bay Watcher
  • works secretly...
    • View Profile
    • mifki
Re: Text Will Be Text - dfhack plugin
« Reply #1412 on: January 08, 2015, 09:32:42 am »

Ahk. Will do. Thanks :)

Oh, and I'm referring to the list in the TWBT readme.

How about the map tiles though?

TWBT doesn't affect world/mini map (that's what you call map, right?).

lethosor

  • Bay Watcher
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #1413 on: January 08, 2015, 01:36:18 pm »

Any ideas on the stable-cursor problem? I didn't see anywhere where df::global::cursor is being modified, but window_x (/y/z) is modified in a few places in dwarfmode.hpp, which could affect the cursor.

Edit:
Stable Cursor isn't working for me with DF 40.23 + DFHack 40.23-r1 + TwbT 5.40 (linux)

I copied the 4 plug.so files to /hack/plugins and ran the game. Everything seems to work as intended except for Stable Cursor.

What can I do to fix my problem?

Edit 2: Ah, Gui::getViewportPos() is where the problem occurs - it returns df::coord(*df::global::window_x, *df::global::window_y, *df::global::window_z), so modifying any of those three globals will break stable-cursor.
« Last Edit: January 08, 2015, 01:41:56 pm by lethosor »
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.

LeoCean

  • Bay Watcher
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #1414 on: January 09, 2015, 03:26:04 am »

Transferred from my thread

Some questions, I'm having trouble figuring out what Tile Types (df/tiletype.h) refer to. Is there anywhere where they are explained more in detail? For example what do the following tiles refer to?

FeatureBoulder, TreeCapFloor1, FrozenRamp, GrassDarkFloor1, Grass2StairD, SemiMoltenRock, TreeRootSloping, Waterfall, SoilWetFloor2, StoneWallWorn1

Additionally, water tiles don't seem to be listed, as well as several other things like smoke, sea foam, and levers Am I also correct in assuming that RiverE, RiverN, etc. and BrookE, BrookN, etc. refer to map tiles? Where are the map tiles defined, as well? Can they be overridden or do they still need to be merged with the main tileset? I'm referring to tiles like Moon, Highwood forest, Necromancer's tower, Elven forest retreat, Shrines, Hills, etc.

FeatureBoulder, TreeCapFloor1, FrozenRamp, GrassDarkFloor1, Grass2StairD, SemiMoltenRock, TreeRootSloping, Waterfall, SoilWetFloor2, StoneWallWorn1         RiverE, RiverN, etc. and BrookE, BrookN, etc. refer to map tiles?

These are ingame tiles, not on the world map. Really you should just consider if the river or brook is going north it'd use RiverN for example, idk if that actually exists though but i do know that's what it'd be for. The other ones you asked about are pretty straight forward to the frozenRamp would be a ramp in the frozen biome featureboulder is the one in the main tileset that is called boulder (not the mined rock, just the boulder on the surface) For the grass you will notice in the raws they should use 4 different tiles there's light grass and dark grass and 2 kinds of each I believe, it's been awhile and I haven't actually edited those things for twbt someone else has though. You may find some info you are looking for here http://www.bay12forums.com/smf/index.php?topic=144270.0.

As for the map tiles you ask about here's a link http://dwarffortresswiki.org/index.php/DF2014:Map_legend, you can change some of those things but they need to be changed from the main tileset or I guess if someone were to use a font tileset it may work, I guess it'd be best if Toady added the ability to have another tileset for the map since you'd either need the main or text tilesets to have those edited tiles. It's possibly something dfhack could manage and twbt through it.

That wiki entry is only relevant for the acii version though some of that is changeable in the raws. He's calling embark map tiles map tiles I'd assume mifki.
Logged

Obsidian Soul

  • Bay Watcher
  • ...and the severed part sails off in an arc!
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #1415 on: January 09, 2015, 05:05:31 am »

Thank you, LeoCean. And yes, it does seem like there actually is more options for variation than current tiles (both ascii and graphics) suggest.

On another note, where do I find out where the subtypes are listed? Meph seems to have a full list of all the weapons and clothing, for example. But I wonder where these were obtained. The raws? Mousequery, even on using "probe" on DFHack, don't seem to list items (just the underlying tiletype).

And yes, already knew about the previous functionality of the [world and embark] map tiles. I was hoping TWBT also separated them from the text. Since it hasn't, it's definitely on my wishlist for mifki/toady. :P

Also another on my wishlist : separate overrides for engraved walls and floors. :)
« Last Edit: January 09, 2015, 05:23:01 am by Obsidian Soul »
Logged

scamtank

  • Bay Watcher
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #1416 on: January 09, 2015, 05:21:31 am »

Check the readme.
Logged

Obsidian Soul

  • Bay Watcher
  • ...and the severed part sails off in an arc!
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #1417 on: January 09, 2015, 05:25:22 am »

Already did. Subtypes are not described in the readme. I'm referring to this parameter:

[OVERRIDE:Tile:Kind:Id:Type:Subtype:Tileset:NewTile:NewFg:NewBg]

mifki

  • Bay Watcher
  • works secretly...
    • View Profile
    • mifki
Re: Text Will Be Text - dfhack plugin
« Reply #1418 on: January 09, 2015, 06:02:43 am »

In Lua

Code: [Select]
[lua]# ~df.global.world.raws.itemdefs
<world_raws.T_itemdefs: 0x019a5ccc>
all                    = <vector<itemdef*>: 0x019a5ccc>
weapons                = <vector<itemdef_weaponst*>: 0x019a5cd8>
trapcomps              = <vector<itemdef_trapcompst*>: 0x019a5ce4>
toys                    = <vector<itemdef_toyst*>: 0x019a5cf0>
tools                  = <vector<itemdef_toolst*>: 0x019a5cfc>
tools_by_type          = <vector<itemdef_toolst*>[]: 0x019a5d08>
instruments            = <vector<itemdef_instrumentst*>: 0x019a5dd4>
armor                  = <vector<itemdef_armorst*>: 0x019a5de0>
ammo                    = <vector<itemdef_ammost*>: 0x019a5dec>
siege_ammo              = <vector<itemdef_siegeammost*>: 0x019a5df8>
gloves                  = <vector<itemdef_glovesst*>: 0x019a5e04>
shoes                  = <vector<itemdef_shoesst*>: 0x019a5e10>
shields                = <vector<itemdef_shieldst*>: 0x019a5e1c>
helms                  = <vector<itemdef_helmst*>: 0x019a5e28>
pants                  = <vector<itemdef_pantsst*>: 0x019a5e34>
food                    = <vector<itemdef_foodst*>: 0x019a5e40>
[lua]# ~df.global.world.raws.itemdefs.toys
<vector<itemdef_toyst*>: 0x019a5cf0>
0                      = <itemdef_toyst: 0x0f617eb0>
1                      = <itemdef_toyst: 0x0f7805c0>
2                      = <itemdef_toyst: 0x0f780640>
3                      = <itemdef_toyst: 0x0dc148e0>
4                      = <itemdef_toyst: 0x0f7848e0>
[lua]# ~df.global.world.raws.itemdefs.toys[2]
<itemdef_toyst: 0x0f780640>
id                      = ITEM_TOY_HAMMER
subtype                = 2
base_flags              = <BitArray<>: 0x0f78064c>
source_hfid            = -1
raw_strings            = <vector<string*>: 0x0f780658>
name                    = toy hammer
name_plural            = toy hammers
flags                  = <BitArray<>: 0x0f78066c>

And so on. But subtypes depends on the order things defined in raws, so later I'll make it accept names instead of subtype numbers, otherwise it probably will cause problems with mods.

Obsidian Soul

  • Bay Watcher
  • ...and the severed part sails off in an arc!
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #1419 on: January 09, 2015, 06:30:06 am »

Ok that's way beyond my depth.  :-[ I did some digging though, and based on what you wrote on the order of definition, this is what I found on the raws:
Code: [Select]
item_toy

[OBJECT:ITEM]

[ITEM_TOY:ITEM_TOY_PUZZLEBOX]
[NAME:puzzlebox:puzzleboxes]
[HARD_MAT]

[ITEM_TOY:ITEM_TOY_BOAT]
[NAME:toy boat:toy boats]
[HARD_MAT]

[ITEM_TOY:ITEM_TOY_HAMMER]
[NAME:toy hammer:toy hammers]
[HARD_MAT]

[ITEM_TOY:ITEM_TOY_AXE]
[NAME:toy axe:toy axes]
[HARD_MAT]

[ITEM_TOY:ITEM_TOY_MINIFORGE]
[NAME:mini-forge:mini-forges]
[HARD_MAT]

So I'm guessing the concept is the same then? With the subtype number for toys therefore being:
0: Puzzlebox
1: Toy Boat
2: Toy Hammer
3: Toy Axe
4: Miniforge

?

mifki

  • Bay Watcher
  • works secretly...
    • View Profile
    • mifki
Re: Text Will Be Text - dfhack plugin
« Reply #1420 on: January 09, 2015, 06:54:46 am »

Yep.

For me it's just easier to start lua console ('lua' command) and then '~df.global.world.raws.itemdefs.toys[NUMBER]' (or armor, weapons, etc.) and see what that subtype means than to count definitions in raws.

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Text Will Be Text - dfhack plugin
« Reply #1421 on: January 09, 2015, 06:55:29 am »

Thats correct.

I already have a working override file you can use, its included in the LNP or here: http://www.bay12forums.com/smf/index.php?topic=139579.msg5398400#msg5398400

All you need to do is replace the tileset and put the tiles in the same places.
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 :::

Obsidian Soul

  • Bay Watcher
  • ...and the severed part sails off in an arc!
    • View Profile
Re: Text Will Be Text - dfhack plugin
« Reply #1422 on: January 09, 2015, 07:27:41 am »

<- barely has any idea what lua means LOL (completely not a coder). But I'll make it work. :) Thanks

Meph, yep. Already examining those and Spacefox's overrides. :) Thanks for those. (btw, where in the raws are items defined, e.g. crowns, jugs, flasks, etc.?)

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: Text Will Be Text - dfhack plugin
« Reply #1423 on: January 09, 2015, 07:37:02 am »

Lua is a language. And a file ending, mostly for dfhack scripts.

crowns are a subtype of crafts, which are hardcoded and not accessable in the raws. You can create them in reactions with CRAFTS:CROWN but thats it, there is no file with them in it. Same for jugs, flasks... coins, mugs, backpacks, quivers, bags, and all the furniture. Its not in the raws.
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 #1424 on: January 09, 2015, 12:14:01 pm »

Regarding subtype,  each item is numbered within its type in the order the game loads them.  So, the first TOOLS item has subtype 0, the second one has Subtype 1.

There is a program that will get a list of all the subtypes for each type at http://dffd.wimbli.com/file.php?id=9086
As a warning, the files have to follow a specific naming convention for the tools to work, so it may not work for all mods.
Pages: 1 ... 93 94 [95] 96 97 ... 185