Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 171 172 [173] 174 175 ... 243

Author Topic: DFHack 50.12-r3  (Read 807984 times)

nezclaw

  • Bay Watcher
  • i should really migrate my saves...
    • View Profile
Re: DFHack 0.47.04-r2
« Reply #2580 on: September 21, 2020, 07:10:07 pm »

i installed it manually, i didn't feel like running a -Syu yet. i can find libdfhack.so, and the scripts and plugins folders have things in them.
Installing things manually on Arch is usually a bad idea especially with DF being installed as a package. The DF package installs things to /opt/dwarffortess and includes a script to make sure everthing is linked in ~/.dwarffortress and that the game is run with the correct working directory. The dfhack package works the same way and makes sure dfhack can find all its and DF's files.
yeah, i figured it was gonna be something like that. i'll run a -Syu when mom goes to bed and grab it that way. (our internet is Not Great)
Logged
Dawnthunder: It menaces with spikes of tetanus
After the fire had burned down all of the wooden next boxes on the surface, Mottled Petrel was reluctant to replace them with more wooden nest boxes. Instead, he placed the remaining store of wooden nest boxes in the dormitory for any aspiring koopa mothers.

The nest boxes were immediately overrun by helmet snakes.

nezclaw

  • Bay Watcher
  • i should really migrate my saves...
    • View Profile
Re: DFHack 0.47.04-r2
« Reply #2581 on: September 21, 2020, 07:19:25 pm »

Logged
Dawnthunder: It menaces with spikes of tetanus
After the fire had burned down all of the wooden next boxes on the surface, Mottled Petrel was reluctant to replace them with more wooden nest boxes. Instead, he placed the remaining store of wooden nest boxes in the dormitory for any aspiring koopa mothers.

The nest boxes were immediately overrun by helmet snakes.

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.47.04-r2
« Reply #2582 on: September 21, 2020, 11:17:20 pm »

Oh, I didn't realize you had installed DF as a package - I figured it was also installed manually. Yeah, mixing the two approaches is generally not a good idea (I should have realized when you mentioned that your system updates DF, but I guess I assumed you would have installed DF separately too). Thanks for catching that, Ziusudra! If there's an easy way for me to get my hands on the launcher script that the Arch package uses, I'll try to make DFHack give a better error when this sort of thing happens.
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.

Ziusudra

  • Bay Watcher
    • View Profile
Logged
Ironblood didn't use an axe because he needed it. He used it to be kind. And right now he wasn't being kind.

nezclaw

  • Bay Watcher
  • i should really migrate my saves...
    • View Profile
Re: DFHack 0.47.04-r2
« Reply #2584 on: September 22, 2020, 12:17:40 am »

it's giving me 'target not found' when i try to install dfhack as a package ugh i'll have to bother my brother about it tomorrow. i should probably change my OS to something less complicated but idk how to do that either so ::)
Logged
Dawnthunder: It menaces with spikes of tetanus
After the fire had burned down all of the wooden next boxes on the surface, Mottled Petrel was reluctant to replace them with more wooden nest boxes. Instead, he placed the remaining store of wooden nest boxes in the dormitory for any aspiring koopa mothers.

The nest boxes were immediately overrun by helmet snakes.

Ziusudra

  • Bay Watcher
    • View Profile
Re: DFHack 0.47.04-r2
« Reply #2585 on: September 22, 2020, 01:12:07 am »

it's giving me 'target not found' when i try to install dfhack as a package ugh i'll have to bother my brother about it tomorrow. i should probably change my OS to something less complicated but idk how to do that either so ::)
Yeah, dfhack is in the AUR, not the official repositories. Another option is to install DF manually to a directory in your home directory and install dfhack to there.
Logged
Ironblood didn't use an axe because he needed it. He used it to be kind. And right now he wasn't being kind.

nezclaw

  • Bay Watcher
  • i should really migrate my saves...
    • View Profile
Re: DFHack 0.47.04-r2
« Reply #2586 on: September 22, 2020, 04:09:36 pm »

it's giving me 'target not found' when i try to install dfhack as a package ugh i'll have to bother my brother about it tomorrow. i should probably change my OS to something less complicated but idk how to do that either so ::)
Yeah, dfhack is in the AUR, not the official repositories. Another option is to install DF manually to a directory in your home directory and install dfhack to there.
at that point i'd be better off just installing the latest LNP
Logged
Dawnthunder: It menaces with spikes of tetanus
After the fire had burned down all of the wooden next boxes on the surface, Mottled Petrel was reluctant to replace them with more wooden nest boxes. Instead, he placed the remaining store of wooden nest boxes in the dormitory for any aspiring koopa mothers.

The nest boxes were immediately overrun by helmet snakes.

joostheger

  • Bay Watcher
    • View Profile
Re: DFHack 0.47.04-r2
« Reply #2587 on: September 25, 2020, 06:16:39 am »

I noticed that dfhack has a new "unretire-anyone" script. It sounds pretty crazy, since you could unretire necromancers or werebeast or something. Has anybody experimented with it?

I'm the author of that particular script, so I'd say I've experimented with it quite a bit. It enables you to play adventure mode as any living (or undead) historical figure with the exception of deities (as they currently lack physical manifestations). This includes necromancers, werewolves, fortress citizens, random villagers, nobles, important animals, forgotten beasts, various other monstrosities, and anyone else mentioned in Legends mode (as well as a number of unlisted individuals who wouldn't have done anything noteworthy yet). People will interact with you as appropriate, and you should have access to whatever powers and knowledge the figure possesses (as well as their limitations; it turns out that cats aren't very good at opening doors). That said, be aware that this won't give you a whole lot of additional functionality beyond that which the game normally provides; playing as a monarch, for example, won't enable you to do anything especially significant with your status at present.
you could probably get deities if you give them a nemesis id which just fully gives them a unit when they load in so with a few pokes and prods you could probably play as any historical figure in the game. which from what I can tell form testing legit gives them a body based off their historical figure descriptions.
which means a cat god will look like a cat, and a goblin god will look like a goblin.

Can you play as a ghost or reanimated person?
Logged

Atomic Chicken

  • Bay Watcher
    • View Profile
Re: DFHack 0.47.04-r2
« Reply #2588 on: September 25, 2020, 07:25:24 am »

Can you play as a ghost or reanimated person?

Yeah, I believe I had tested both ghosts and undead at some point (in fact, I distinctly recall fixing the way their names are displayed on the selection list), but it's been a while now. It should be possible so long as such a person exists as a historical figure in your world. I don't think that ghosts manifest during world generation, so you'd probably need to produce one during fortress mode first.

It's also possible to turn any adventurer into a ghost via the "ghostly" command, in case you're not aware of it.

Note that there's currently an issue with attempting to fly as a ghostly non-flying creature, whereby your adventurer gets stuck in mid-air, unable to be controlled.
Logged
As mentioned in the previous turn, the most exciting field of battle this year will be in the Arstotzkan capitol, with plenty of close-quarter fighting and siege warfare.  Arstotzka, accordingly, spent their design phase developing a high-altitude tactical bomber. 

Rumrusher

  • Bay Watcher
  • current project : searching...
    • View Profile
Re: DFHack 0.47.04-r2
« Reply #2589 on: September 26, 2020, 01:29:34 am »

Can you play as a ghost or reanimated person?

Yeah, I believe I had tested both ghosts and undead at some point (in fact, I distinctly recall fixing the way their names are displayed on the selection list), but it's been a while now. It should be possible so long as such a person exists as a historical figure in your world. I don't think that ghosts manifest during world generation, so you'd probably need to produce one during fortress mode first.

It's also possible to turn any adventurer into a ghost via the "ghostly" command, in case you're not aware of it.

Note that there's currently an issue with attempting to fly as a ghostly non-flying creature, whereby your adventurer gets stuck in mid-air, unable to be controlled.

which can be solved by toggling the flier enemy caste flag on the adventurer
so making a script to flip on ghostly would pretty much require toggling that on and off if you want ghost flight to not soft lock you.

edit: hmm got an idea on an adventure mode script that takes the currency that players would get from starting a new game and converting it into points for when they retire. would require writing a script that changes the point value for character creation, and probably have a function that fills up the equipment and pet page.
thinking about this more and it's probably more possible to convert the inventory into the equipment screen and see if you can sell them for points.


edit: ok so I poke around the big deal with animal token visitors not having any labors and it seems to be the entity links for the creature historical figure is missing a few bits of data that the other normal citizens have.

like the animal token acquired units are just citizens of a site but not members of the group or members of the entity so the solution to fix that with dfhack would just be giving them entity links tied to the main fort's civ... or copy and paste some other fort resident's entity links over to the one that doesn't have them.

this discovery at least means one could make a script that gives labors to those who don't have them.


Code: ('animaltokencivpatch.lua') [Select]
for k,v in pairs(df.global.world.units.active) do
local HF=df.global.world.history.figures
if v.hist_figure_id==-1 then break else
for c,q in pairs(HF[v.hist_figure_id].entity_links) do
if q.entity_id==df.global.ui.civ_id and v.population_id==-1 and q.entity_id~=df.global.ui.group_id then
print(v.hist_figure_id)
HF[v.hist_figure_id].entity_links:insert("#",{new=df.histfig_entity_link_memberst})
HF[v.hist_figure_id].entity_links[c].entity_id=df.global.ui.group_id
HF[v.hist_figure_id].entity_links[c].link_strength=100
end
end
end
end
--this script should add labors to different race migrants that arrived from animal token entity modding

edit: I realize a major flaw with this script... it works on migrants that got historical figures, but if they don't have any this doesn't work.
« Last Edit: September 29, 2020, 01:19:57 pm by Rumrusher »
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

PatrikLundell

  • Bay Watcher
    • View Profile
Re: DFHack 0.47.04-r2
« Reply #2590 on: October 01, 2020, 11:24:05 am »

Script to detect equipment corruption, attempting to fix equipment that's not assigned.

Spoiler (click to show/hide)

Based on Toady's answer in FotF, but the script's testing has been limited to verifying that a corrupt entry doesn't reappear.
Note that the script doesn't try to fix corrupt assigned equipment I've seen that in a save), as that likely requires additional handling to deal with the unit to which the equipment has been assigned.
Logged

Roses

  • Bay Watcher
    • View Profile
Re: DFHack 0.47.04-r2
« Reply #2591 on: October 01, 2020, 01:36:58 pm »

So here is a question I thought of recently. How difficult would it be to create fake entries for the built-in buildings and reactions? What I mean is, the custom building information can be accessed like;
Code: [Select]
[lua]# ~df.global.world.raws.buildings.all[0]
<building_def_workshopst: 0000025F649D4010>
code                     = SOAP_MAKER
id                       = 0
name                     = Soap Maker's Workshop
building_type            = 13
building_subtype         = 23
name_color               = <int16_t[]: 0000025F649D4068>
tile                     = <uint8_t[31][31][]: 0000025F649D406E>
tile_color               = <uint8_t[31][31][4][]: 0000025F649D4F72>
tile_block               = <uint8_t[31][]: 0000025F649D7C7E>
build_key                = 150
needs_magma              = false
build_items              = <vector<building_def_item*>[2]: 0000025F649D8048>
dim_x                    = 3
dim_y                    = 3
workloc_x                = 1
workloc_y                = 1
build_labors             = <vector<unit_labor>[1]: 0000025F649D8070>
labor_description        = Soap Making
build_stages             = 3

but there isn't a similar structure for the Leatherworker. It would be great if there was a way to access the information for the built-in stuff the same way I can with the custom ones. I know they would need to be hand built, but I'm just wondering if it would even be possible, and if possible how much work it would be.
Logged

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.47.04-r2
« Reply #2592 on: October 01, 2020, 03:02:48 pm »

Script to detect equipment corruption, attempting to fix equipment that's not assigned.
...
Based on Toady's answer in FotF, but the script's testing has been limited to verifying that a corrupt entry doesn't reappear.
Note that the script doesn't try to fix corrupt assigned equipment I've seen that in a save), as that likely requires additional handling to deal with the unit to which the equipment has been assigned.
I'd say it's worth including, maybe under "devel/" if it doesn't actually fix things, or under "fix/" if it does.

Note that your loops that are erasing items from vectors have a bug that will skip consecutive items (e.g. erasing item 3 will move item 4 into item 3's spot, causing it to be skipped by the loop, even if it should be erased). Some scripts deal with this by iterating over vectors in reverse order - not sure if there's a utility function to do this.

So here is a question I thought of recently. How difficult would it be to create fake entries for the built-in buildings and reactions? What I mean is, the custom building information can be accessed like;
...
but there isn't a similar structure for the Leatherworker. It would be great if there was a way to access the information for the built-in stuff the same way I can with the custom ones. I know they would need to be hand built, but I'm just wondering if it would even be possible, and if possible how much work it would be.
You're referring to the craftdwarf's workshop in this case, right?
You should be able to create a building_def_workshopst instance with "df.building_def_workshopst:new()" and assign its fields to whatever values you want; putting this instance in world.raws.buildings.all will likely cause all sorts of issues, though. Figuring out the right values for every field could also be hard. I know Quietust has reverse-engineered raws for some built-in materials, like amber, but not workshops to my knowledge. Maybe you could get some of the right values from a built workshop, but other than that, I'm not sure.

Is there anything in particular that you need this information for? There may be another way to get at the relevant portions of it.
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.

Roses

  • Bay Watcher
    • View Profile
Re: DFHack 0.47.04-r2
« Reply #2593 on: October 01, 2020, 03:23:47 pm »

So here is a question I thought of recently. How difficult would it be to create fake entries for the built-in buildings and reactions? What I mean is, the custom building information can be accessed like;
...
but there isn't a similar structure for the Leatherworker. It would be great if there was a way to access the information for the built-in stuff the same way I can with the custom ones. I know they would need to be hand built, but I'm just wondering if it would even be possible, and if possible how much work it would be.
You're referring to the craftdwarf's workshop in this case, right?
You should be able to create a building_def_workshopst instance with "df.building_def_workshopst:new()" and assign its fields to whatever values you want; putting this instance in world.raws.buildings.all will likely cause all sorts of issues, though. Figuring out the right values for every field could also be hard. I know Quietust has reverse-engineered raws for some built-in materials, like amber, but not workshops to my knowledge. Maybe you could get some of the right values from a built workshop, but other than that, I'm not sure.

Is there anything in particular that you need this information for? There may be another way to get at the relevant portions of it.

Yes, that is one of the built-in buildings I would like to be able to create an entry for. Just creating a building_def_workshopst instance would be more than enough, I wouldn't need them to the in the world.raws.buildings.all. This is more of a "would be nice to have" type QoL thing than anything else. Right now I just have scripts that check for custom vs. built-in buildings/reactions and then does different stuff for them. Having these structures would just simplify that, but it sounds basically how I expected it to be, possible but hard.

It is kind of strange though, you would think that the built-in buildings/reactions/materials etc... would still need to have a similar structure to the custom ones that the game accesses. I guess they are probably just stored in a different area that isn't mapped or isn't accessible.
Logged

PatrikLundell

  • Bay Watcher
    • View Profile
Re: DFHack 0.47.04-r2
« Reply #2594 on: October 01, 2020, 03:28:55 pm »

Yes, I was aware that there was a risk of the iterator skipping elements, but decided to get something out there quickly rather than polishing it.
Iterating in reverse isn't hard to do, so that will be a task for tomorrow.

I've verified that removing a bugged entry from an unassigned list caused the list to remain clean a month or so later, but since my test save originally took quite some time to crash it's a bit tricky to say when it's fine and won't crash.

Dealing with corrupted assigned equipment would require a fair bit of investigation, I think, as it would have to find and remove all references from both directions, of which I guess you'd always have squad (somewhere in the structures, but I don't know where) for military equipment and usually soldier, while civilian uniforms (if they can get corrupted) always would have the dorf, but are there anything else that would need to be dealt with?
Logged
Pages: 1 ... 171 172 [173] 174 175 ... 243