Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 239 240 [241] 242 243 ... 373

Author Topic: DFHack 0.34.11 r3  (Read 1404534 times)

armeggedonCounselor

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3600 on: April 17, 2013, 07:06:09 pm »

The first post says that superdwarf can be used in Adventure Mode. How do I use it? Does my adventurer have to be a dwarf?
you should be able to place the cursor on the adventurer.

Using 'l'ook? Or do I need to use something else?
Logged
Quote from: Stargrasper
It's an incredibly useful technique that will crash the computer if you aren't careful with it.
That really describes any programming.

Rumrusher

  • Bay Watcher
  • current project : searching...
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3601 on: April 17, 2013, 07:43:45 pm »

The first post says that superdwarf can be used in Adventure Mode. How do I use it? Does my adventurer have to be a dwarf?
you should be able to place the cursor on the adventurer.

Using 'l'ook? Or do I need to use something else?
look or talk

edit: okay so I just got spawnunit to work in r3, though it's the one warmist made originally and not his more recent version but at least now I can do something else.
oh and known quirks with spawnunit:
spawning more than 1 unit at a time will crash the game when you unload the area. the names don't match up when you talk to ungbuga. while you can attack ungbuga you might not land a hit so best not provoke ungbuga unless you have some firebreath or syndrome base attack to do damage. the script currently spawns a peasant who doesn't attack any one.
« Last Edit: April 18, 2013, 07:07:13 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

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: DFHack 0.34.11 r3
« Reply #3602 on: April 19, 2013, 06:01:35 pm »

That sounds great. :)

What narihil/deon/me would be using this ingame for is running a reaction in a workshop that spawns a creature on it. I could get as far is making a workshop, creating a rock that triggers autosyndrome, and the syndrome runs "\command \spawnunit". That way the dwarf runs the script in fortress mode. It only needs to know the location of the workshop or dwarf, and some kind of input for the creature id. "spawnunit cat" and "spawnunit goblin", something like that.

Quote
spawning more than 1 unit at a time will crash the game when you unload the area.
This sounds like a serious obstacle ^^
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 :::

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3603 on: April 19, 2013, 06:51:21 pm »

Well, spawning units is really, really hard.

Rumrusher

  • Bay Watcher
  • current project : searching...
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3604 on: April 20, 2013, 12:13:44 am »

Well, spawning units is really, really hard.
well that's only for adventure mode, fort mode perfectly fine with spawning that many units... spawning that many units in fort mode in unison will make it impossible to save right away. though I don't know what causes that to happen. best bet is adventure mode spawn one then unload the area then spawn another.
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

Kurik Amudnil

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3605 on: April 20, 2013, 04:05:23 am »

I have made an adaptation of unsuspend.rb and autounsuspend.rb for the purposes of fixing handedness on gloves created through custom reactions.

fixhandedness.rb
Spoiler (click to show/hide)

autofixhandedness.rb
Spoiler (click to show/hide)

I set the auto check to 100 ticks and I think it can be set longer 2400 ticks for once every 2 dwarf days as I don't expect custom reaction gloves to be created frequently. 

*edited to increase the auto ticks, give start/stop feedback, to have a help string in the dfhack console's script listing, and improve the comments.
« Last Edit: April 25, 2013, 02:30:17 pm by Kurik Amudnil »
Logged

xcorps

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3606 on: April 20, 2013, 09:25:26 am »

The link in the OP is down, anyone have an alternate source for downloading?
Logged

gchristopher

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3607 on: April 20, 2013, 04:50:05 pm »

Is anyone aware of how the game determines what map edges tiles are eligible for diplomats/traders/migrants and whether it can be changed?

It looks like the initial position of the embark wagon determines map edge eligibility. Does the game record the initial position of the wagon somewhere? The building record seems to be removed when the wagon is deconstructed.

Does the game dynamically figure out where the wagon should have appeared each time if processes a migrant, caravan or diplomat event? Can you trick it at that point by changing the surface tile types beforehand to create a new set of path-eligible map edges? (Actually, that's easily testable. I'll try it.)

edit: Modifying the map tiletypes to change which map area connects to the original wagon location updates world.map.map_blocks.walkable, but does not affect where caravans and liasons appear. Maybe that indicates the map edge is somehow flagged?

Is it a flag stored somewhere per-tile? I'm pretty sure it's not any data under df.global.world.map. Editing bap_blocks.walkable doesn't change it. Maybe it's in memory that dfhack doesn't index?
I still haven't had any luck finding something in the lua-addressable dfhack interface that relates to where visitors can appear.

Does anyone have an evidence of the accessible edge tiles varying by civilization?
Logged

Kurik Amudnil

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3608 on: April 20, 2013, 04:59:21 pm »

Is anyone aware of how the game determines what map edges tiles are eligible for diplomats/traders/migrants and whether it can be changed?

It looks like the initial position of the embark wagon determines map edge eligibility. Does the game record the initial position of the wagon somewhere? The building record seems to be removed when the wagon is deconstructed.

Does the game dynamically figure out where the wagon should have appeared each time if processes a migrant, caravan or diplomat event? Can you trick it at that point by changing the surface tile types beforehand to create a new set of path-eligible map edges? (Actually, that's easily testable. I'll try it.)

edit: Modifying the map tiletypes to change which map area connects to the original wagon location updates world.map.map_blocks.walkable, but does not affect where caravans and liasons appear. Maybe that indicates the map edge is somehow flagged?

Is it a flag stored somewhere per-tile? I'm pretty sure it's not any data under df.global.world.map. Editing bap_blocks.walkable doesn't change it. Maybe it's in memory that dfhack doesn't index?
I still haven't had any luck finding something in the lua-addressable dfhack interface that relates to where visitors can appear.

Does anyone have an evidence of the accessible edge tiles varying by civilization?

 I had a fort where I made a covered road from the map edge to my depot by way of raised bridges on the side and constructed floors above it at the edge before it went underground.  After some forgotten beasts made a mess of things I reclaimed and that section of covered edge was no longer a valid spawning point for caravans (and probably others) even after deconstructing the floor above.  If I knew were to look I could try to see if there is data value involved.  I suppose another reclaim after uncovering those edge tiles might fix it too,  but the other reclaim bugs I had made that fort rather disappointing.

gchristopher

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3609 on: April 21, 2013, 12:40:27 am »

I had a fort where I made a covered road from the map edge to my depot by way of raised bridges on the side and constructed floors above it at the edge before it went underground.  After some forgotten beasts made a mess of things I reclaimed and that section of covered edge was no longer a valid spawning point for caravans (and probably others) even after deconstructing the floor above.  If I knew were to look I could try to see if there is data value involved.  I suppose another reclaim after uncovering those edge tiles might fix it too,  but the other reclaim bugs I had made that fort rather disappointing.
That would be consistent with it being re-calculated on each embark, then stored with the site data for the duration of that embark.

Oh hey! I found a likely data sequence in world.sav that matches this theory!

Bastardizing the bt hex edit format from the world parsing thread, something like this, where they're all 16 bit integers.

short count_x;
short x_coords[count_x];
short count_y;
short y_coords[count_y];
short count_z;
short z_coords[count_z];

Where all the count_.'s are the same, and the resulting coordinates appear to match the edge tiles. I can see gaps in the sequence where trees are growing on the map edge. I'll try editing this section and see if my caravan moves around.

Um, this might not relate to dfhack anymore, except to maybe help identify how the migrant/caravan/diplomat-eligible tiles might appear in memory. Please tell me if it should move to another thread.

Edit: Success! :) The visitor-eligible tiles are definitely determined at embark, and stored in a static set of coordinates that can be edited to change where they may appear. That doesn't completely rule out other sets of coordinates for other civilizations.
« Last Edit: April 21, 2013, 12:54:01 am by gchristopher »
Logged

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: DFHack 0.34.11 r3
« Reply #3610 on: April 21, 2013, 07:37:00 am »

The values you found were probably ui.map_edge.* (or possibly ui.unk_mapedge_[xyz].
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.

gchristopher

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3611 on: April 21, 2013, 02:52:47 pm »

The values you found were probably ui.map_edge.* (or possibly ui.unk_mapedge_[xyz].
Yep. The values appear to match df.global.ui.map_edge.surface_[xyz].

That's probably what controls the locations for diplomats, caravans and migrants.

Thanks!

I wonder what would happen if you added non-edge coordinates to the list? Build a microcline box around the spot and make a diplomat TARDIS?
Logged

BriseRotule

  • Escaped Lunatic
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3612 on: April 22, 2013, 04:26:59 am »

So looking at generating combat log outside of the reports screen menus ifoudn a link between
unit->reports.log[0] and the world->reports structure. Those int32 in the first structure are id for the second. That way i'm able to regenerate the reports menu.I can't check it right now, but i think the vector unit->reports.log[1], unit->reports.log[2] might be linked to sparring session and something (have to investigate further).

I think this is usefull and should be mentionned in the xml file as comment to put in the headers, who should i contact once my work is done on those fields ?
Logged

ag

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3613 on: April 22, 2013, 06:41:50 am »

I think this is usefull and should be mentionned in the xml file as comment to put in the headers, who should i contact once my work is done on those fields ?

It's all already known...

https://github.com/peterix/df-structures/blob/master/df.units.xml#L230
Logged

BriseRotule

  • Escaped Lunatic
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3614 on: April 22, 2013, 06:58:20 am »

I'm talking about :
Code: [Select]
<compound name='reports'>
    <static-array name='log' count='3' index-enum='unit_report_type'>
        <stl-vector type-name='int32_t' ref-target='report'/>
     </static-array>

     -- Garbage when the matching vector is empty:
     <static-array type-name='int32_t' name='last_year' count='3' index-enum='unit_report_type'/>
     <static-array type-name='int32_t' name='last_year_tick' count='3' index-enum='unit_report_type'/>
</compound>
And in fact the 3 vector probably are for combat/sparring/hunting. should have looked at the xml files.
« Last Edit: April 22, 2013, 07:00:23 am by BriseRotule »
Logged
Pages: 1 ... 239 240 [241] 242 243 ... 373