Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 27 28 [29]

Author Topic: DFHack 0.43.05-r2  (Read 18585 times)

Japa

  • Bay Watcher
  • Spoopy time!
    • View Profile
Re: DFHack 0.43.05-r2
« Reply #420 on: November 05, 2017, 10:02:13 am »

Has anybody reverse engineered what happens in adventure mode when you press a movement key?

Is it possible to cause the adventurer to move only by modifying the structures?

milo christiansen

  • Bay Watcher
  • Something generic here
    • View Profile
Re: DFHack 0.43.05-r2
« Reply #421 on: November 05, 2017, 04:04:06 pm »

Well, it may not fit your needs, but I'm pretty sure it is possible to fake input events in-game via Lua.
Logged
Rubble 8 - The most powerful modding suite in existence!
After all, coke is for furnaces, not for snorting.
You're not true dwarven royalty unless you own the complete 'Signature Collection' baby-bone bedroom set from NOKEAS

Japa

  • Bay Watcher
  • Spoopy time!
    • View Profile
Re: DFHack 0.43.05-r2
« Reply #422 on: November 05, 2017, 07:49:19 pm »

That much I know, and that's fine for simple movement, but climbing, for example, has multiple menus to sort through, which means I can't just tell my adventurer to climb north-east in one go.

PatrikLundell

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.05-r2
« Reply #423 on: November 06, 2017, 06:08:45 am »

A DF Structure question: Is it known what the df.world-data.xml:world_region.tree_tile_* fields are used for and the logic for how they're populated?
As far as I can see each biome type present in the region gets one index, but all biomes of the same type in all regions seem to get the same selection of trees in _1 and _2 (with _good, _evil, and _savage have that tree present or not depending on the region's evilness/if that biome within the region has any savage tiles. In both cases the trees actually have to be valid for the region, excluding e.g. mountains and oceans), regardless of whether they're actually present in the selection of plants available in the region or not.
For instance, temperate freshwater marsh gets willow trees in both the _1 and _2 tile despite there being quite a few different trees that grow in such biomes.

I'm both looking for the logic behind how the trees for these fields are selected (to be able to replicate it without simple hard coding, which doesn't fare well in the face of modding or updates), as well as what the fields are used for (if anything: I wouldn't be surprised if they're not actually used).
Logged

Rumrusher

  • Bay Watcher
  • current project : searching...
    • View Profile
Re: DFHack 0.43.05-r2
« Reply #424 on: November 06, 2017, 06:53:16 am »

That much I know, and that's fine for simple movement, but climbing, for example, has multiple menus to sort through, which means I can't just tell my adventurer to climb north-east in one go.
from my dabble into this mess it seems like the whole thing is tied to careful movement options and that seems to have no data in gm-editor.
the my best bet is to see what happens if you could copy and paste different adventure movement options to a table and save them for inputing them back into the ui_advmode's actions list.
Logged
I thought I would I had never hear my daughter's escapades from some boy...
DAMN YOU RUMRUSHER!!!!!!!!
"body swapping and YOU!"
Adventure in baby making!Adv Homes

Aranador

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.05-r2
« Reply #425 on: November 07, 2017, 06:39:40 pm »

Is there a DFHack tool that will allow you to 'reroll' your starting seven?

IE - you are looking to make a generational fort, and want an even mix of male/female, but you get to the skill select screen and notice that the game has coughed up 7 females.  Instead of exiting out, and re-entering and selecting your site and doing all the busy work, you could just hit a key and reroll the seven initial dwarves.

Is there such a thing?
Logged

mifki

  • Bay Watcher
  • works secretly...
    • View Profile
    • mifki
Re: DFHack 0.43.05-r2
« Reply #426 on: November 07, 2017, 06:49:41 pm »

Is there a DFHack tool that will allow you to 'reroll' your starting seven?

IE - you are looking to make a generational fort, and want an even mix of male/female, but you get to the skill select screen and notice that the game has coughed up 7 females.  Instead of exiting out, and re-entering and selecting your site and doing all the busy work, you could just hit a key and reroll the seven initial dwarves.

Is there such a thing?

In DFHack console:

Code: [Select]
lua "dfhack.gui.getCurViewscreen().parent.breakdown_level=df.interface_breakdown_types.NONE  dfhack.gui.getCurViewscreen().breakdown_level=df.interface_breakdown_types.STOPSCREEN"

Max™

  • Bay Watcher
  • [CULL:SQUARE]
    • View Profile
Re: DFHack 0.43.05-r2
« Reply #427 on: November 14, 2017, 01:44:41 pm »

I'm talking about changing the entities' names as displayed on the world map pre embark, which means changing the multi part language based names (and I suspect these entities do not have any simple string "name" field to modify anyway). The fallback would indeed be to re-implement some version of the native naming screens, but it's not my favorite wheel to reinvent.
Feel free to grab anything useful from here: https://github.com/maxthyme/scripts/blob/master/names.lua though I don't see any reason why it wouldn't be possible to make it check for the embark screen > currently displayed region/etc name and use that for the target. I'd try to do it myself but I'm in a woodcrafty mode, not a luahackery mode.
Logged
Engraved here is a rendition of an image of the Dwarf Fortress learning curve. All craftsdwarfship is of the highest quality. It depicts an obsidian overhang which menaces with spikes of obsidian and tears. Carved on the overhang is an image of Toady One and the players. The players are curled up in a fetal position. Toady One is laughing. The players are burning.
The VectorCurses+1 tileset strikes the square set and the severed part sails off in an arc!

PatrikLundell

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.05-r2
« Reply #428 on: November 14, 2017, 03:01:06 pm »

I'm talking about changing the entities' names as displayed on the world map pre embark, which means changing the multi part language based names (and I suspect these entities do not have any simple string "name" field to modify anyway). The fallback would indeed be to re-implement some version of the native naming screens, but it's not my favorite wheel to reinvent.
Feel free to grab anything useful from here: https://github.com/maxthyme/scripts/blob/master/names.lua though I don't see any reason why it wouldn't be possible to make it check for the embark screen > currently displayed region/etc name and use that for the target. I'd try to do it myself but I'm in a woodcrafty mode, not a luahackery mode.

Thanks for the answer. It looks like the script is your version of a names.lua provided with DFHack, and a further guess is that both of them are intended for adventure mode, as they fail in fortress mode. I'll look at it to see what I can get out of it, although I've worked around my immediate issue by generating random names based on fixed templates without allowing the user to change the name.
And keep on with the wood crafting: it's probably healthier than lua hacking anyway.
Logged

Max™

  • Bay Watcher
  • [CULL:SQUARE]
    • View Profile
Re: DFHack 0.43.05-r2
« Reply #429 on: November 14, 2017, 03:05:48 pm »

Hmmm, that one there I thought was fixed from the problems it was having in fort mode.
Logged
Engraved here is a rendition of an image of the Dwarf Fortress learning curve. All craftsdwarfship is of the highest quality. It depicts an obsidian overhang which menaces with spikes of obsidian and tears. Carved on the overhang is an image of Toady One and the players. The players are curled up in a fetal position. Toady One is laughing. The players are burning.
The VectorCurses+1 tileset strikes the square set and the severed part sails off in an arc!

PatrikLundell

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.05-r2
« Reply #430 on: November 15, 2017, 05:57:24 am »

@MaxTM: The problem lies at line 59, where the script checks for a screen I assume is an adventure mode one. Replacing the line with "else" brought up the naming UI for a unit in fortress mode. To get it to work properly I assume there should be a check whether the screen is the original one or the one used in fortress mode. I assume fortress mode usage could also make use of units/items selected (i.e.'v' for units) rather than just looked at, but that's just icing.

Anyway, thanks for pointing me in this direction.
Logged
Pages: 1 ... 27 28 [29]