Bay 12 Games Forum

Please login or register.

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

Author Topic: DFHack 50.14-r1.1  (Read 893003 times)

Rose

  • Bay Watcher
  • Resident Elf
    • 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?
Logged

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

Rose

  • Bay Watcher
  • Resident Elf
    • 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.
Logged

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

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

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

Amostubal

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.05-r2
« Reply #431 on: November 21, 2017, 11:06:09 am »

Okay I have a script that forces the addition of buildings found in a file to an entity using change-build-menu. 

The issue is these buildings have reactions they need to operate and I need to be able to add these reactions also, in other words.

I want this script when enabled to add the buildings and the reactions for these buildings.

Any ideas which commands to do that with in DFHack through Lua?
Logged
Legendary Dwarf Fortress
Legendary Discord Group
"...peering into the darkness behind the curtains, evokes visions of pixies being chased by dragons while eating cupcakes made of coral iced with liquid fire while their hearts burn out with unknown plant substances..." - a quote from the diaries of Amostubal

milo christiansen

  • Bay Watcher
  • Something generic here
    • View Profile
Re: DFHack 0.43.05-r2
« Reply #432 on: November 21, 2017, 02:09:14 pm »

You can just add the reactions directly in the entity file... Unless you need go do it later to avoid worldgen issues.

If that is the case, then you will need to edit the correct entity in df.global.world.entities. If the historical entity doesn't have a proper fields (I didn't check, so it may not), then the lists in (*entity_raw).workshops will probably do the trick (found in df.global.world.raws.entities or (*historical_entity).entity_raw)

Be careful! The historical entities (but not the raw entities) are saved! Either way you need to make sure not to add duplicate entries.
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

Amostubal

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.05-r2
« Reply #433 on: November 21, 2017, 03:41:25 pm »

You can just add the reactions directly in the entity file... Unless you need go do it later to avoid worldgen issues.

If that is the case, then you will need to edit the correct entity in df.global.world.entities. If the historical entity doesn't have a proper fields (I didn't check, so it may not), then the lists in (*entity_raw).workshops will probably do the trick (found in df.global.world.raws.entities or (*historical_entity).entity_raw)

Be careful! The historical entities (but not the raw entities) are saved! Either way you need to make sure not to add duplicate entries.

yeah I found this in eventful documentation:
Code: [Select]
b=require "plugins.eventful"
b.addReactionToShop("TAN_A_HIDE","LEATHERWORKS")

going to try that when I get to the point of attempting... right now I'm still writting the main body of the script up to adding that in...  and if it all works I'll sennd it over to you Milo, as you may find it an interesting usage of your change-build-menu.
Logged
Legendary Dwarf Fortress
Legendary Discord Group
"...peering into the darkness behind the curtains, evokes visions of pixies being chased by dragons while eating cupcakes made of coral iced with liquid fire while their hearts burn out with unknown plant substances..." - a quote from the diaries of Amostubal

milo christiansen

  • Bay Watcher
  • Something generic here
    • View Profile
Re: DFHack 0.43.05-r2
« Reply #434 on: November 21, 2017, 04:47:26 pm »

IIRC, addReactionToShop either didn't work at all, or worked very poorly last time I tried to use it.

Some completely useless info on it not working here. Damn, I wish I could remember how and why it didn't work.

Edit: it may have been fixed at some point though, so if it works let me know. Can't have outdated info clogging the mind...
« Last Edit: November 21, 2017, 04:51:48 pm by milo christiansen »
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
Pages: 1 ... 27 28 [29] 30 31 ... 244