Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 85 86 [87] 88 89 ... 360

Author Topic: DFHack 0.43.03-r1  (Read 1079070 times)

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.13-r1
« Reply #1290 on: November 02, 2014, 05:20:59 pm »

Add embark points in the advanced worldgen options of vanilla DF.

I don't think that's what StagnantSoul is looking for:
How would I add embark points with dfhack? I need more than 10k


Quote

I hope this is ok, I managed to get a .14 version compiled by removing the manipulator and strangemood plugins, and following Lethosor's instructions. I didnt even try to compile other stuff like stonesense or isoworld.

Its for windows, and I am running an i5 if that matters, I am so ignorant on the specifics of who this may work for, i figured i would better mention it.

If this upsets anyone, I will happily take down the link, just let me know!

But reveal (and cleanall) seems to work, and thats what i need to save my dying thirsty colony, so I thought i would share it.  Thanks to the DFHack team and Quietust branch, they did the hard work, I just(barely) managed to compile something that is probably buggy and will wipe you fort, so test with a backup first people......
http://www.mediafire.com/download/nj5bd7l24efges5/dfhack-0.40.14-r0-Windows.zip
If you had to remove manipulator and strangemood, you're doing something wrong - those plugins should work if you use the develop branch of DFHack/dfhack (since all 0.40.14 development has now been merged into it). Quietust's develop branch appears to include the changes necessary for these plugins to compile as well (although DFHack:develop is more up-to-date).



dwarves.rb - type "dwarves #" at the embark selector/map before you embark. It will raise your starting dwarves to the number you entered.

Code: [Select]
# patch start dwarf count

nr = $script_args[0].to_i

raise 'too low' if nr < 7

addr = df.get_global_address('start_dwarf_count')
df.memory_patch(addr, [nr].pack('L'))

points.lua - type "points #" at the embark selector/map before you embark. It will raise your embark points to that number.
Code: [Select]
df.global.world.worldgen.worldgen_parms.embark_points=tonumber(...)

The dwarf count one is outdated though, but I do know of a working one. For 40.13 anyways. Or you can use cheat engine to modify any of the points in that menu.
That "dwarves" script is exactly the same as the "startdwarf" script included with DFHack since at least 0.34.11-r3, which certainly works (assuming you have the start_dwarf_count offset in symbols.xml).
Edit: Of course, it's a ruby script, not a lua script.
« Last Edit: November 02, 2014, 05:40:49 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.

sv-esk

  • Bay Watcher
  • sorry for my bad english
    • View Profile
Re: DFHack 0.40.13-r1
« Reply #1291 on: November 03, 2014, 08:40:54 am »

If you had to remove manipulator and strangemood, you're doing something wrong
It was  'stress_level'  errors. Yesterday I tried to compile and had these errors too:
..\..\..\plugins\strangemood.cpp(637): error C2039: 'stress_level' : is not a member of 'df::unit_personality'
__
Today I compiled it without errors(stonesense disabled). And many tools seems to work fine.
It might be very buggy. Use at your own risk for testing and fooling around with a fortress you don't care about much:
http://www.mediafire.com/download/c1mntxtnq06vzk1/dfhack-0.40.14-r0-Windows-3.11.zip(edit: outdated)
« Last Edit: November 06, 2014, 03:40:33 am by sv-esk »
Logged

Sappho

  • Bay Watcher
  • AKA Aira; Legendary Female Gamer
    • View Profile
    • Aira Plays Games
Re: DFHack 0.40.13-r1
« Reply #1292 on: November 03, 2014, 09:41:40 am »

Using 40.13 with the latest version of DFHack, I'm getting error messages with adventure mode commands. It won't let me bodyswap or use advtools. I get the message that it's not a recognized command. Are these commands broken? Is there anything I can do?

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: DFHack 0.40.13-r1
« Reply #1293 on: November 03, 2014, 10:53:21 am »

Using 40.13 with the latest version of DFHack, I'm getting error messages with adventure mode commands. It won't let me bodyswap or use advtools. I get the message that it's not a recognized command. Are these commands broken? Is there anything I can do?
Those commands were disabled in version 0.40 because they use variables whose locations are no longer known, and we didn't have time to fix them.
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.

Sappho

  • Bay Watcher
  • AKA Aira; Legendary Female Gamer
    • View Profile
    • Aira Plays Games
Re: DFHack 0.40.13-r1
« Reply #1294 on: November 03, 2014, 01:20:32 pm »

:C

So the Readme is really out of date... Thanks for answering, anyway. Is that likely to change?

necrotic

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.13-r1
« Reply #1295 on: November 03, 2014, 02:48:02 pm »

If you had to remove manipulator and strangemood, you're doing something wrong
It was  'stress_level'  errors. Yesterday I tried to compile and had these errors too:
..\..\..\plugins\strangemood.cpp(637): error C2039: 'stress_level' : is not a member of 'df::unit_personality'
__
Today I compiled it without errors(stonesense disabled). And many tools seems to work fine.
It might be very buggy. Use at your own risk for testing and fooling around with a fortress you don't care about much:
http://www.mediafire.com/download/c1mntxtnq06vzk1/dfhack-0.40.14-r0-Windows-3.11.zip

Weird, I built it on OSX last night and had no issues with manipulator or strangemood when building. And manipulator worked great in-game.
Logged

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.13-r1
« Reply #1296 on: November 03, 2014, 02:59:43 pm »

If you had to remove manipulator and strangemood, you're doing something wrong
It was  'stress_level'  errors. Yesterday I tried to compile and had these errors too:
..\..\..\plugins\strangemood.cpp(637): error C2039: 'stress_level' : is not a member of 'df::unit_personality'
__
Today I compiled it without errors(stonesense disabled). And many tools seems to work fine.
It might be very buggy. Use at your own risk for testing and fooling around with a fortress you don't care about much:
http://www.mediafire.com/download/c1mntxtnq06vzk1/dfhack-0.40.14-r0-Windows-3.11.zip
Oh, you need to update the library/xml submodule with "git submodule update". Git doesn't automatically check out new versions of submodules, even when the parent repo (dfhack) points to them (although it will often fetch new submodule commits to make it easier to check them out later). This is useful for developers, since it allows us to work on df-structures and dfhack separately (without the risk of losing submodule content when the dfhack repo is updated), but it can be confusing if you're only trying to compile a branch that requires different submodule commits. You should always run "git status" after changing branches, then "git submodule update" if any submodules are listed.
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.

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: DFHack 0.40.13-r1
« Reply #1297 on: November 04, 2014, 10:57:43 am »

Is there some simple way to detect if a tile has been touched by (or submerged in) magma?  I'm trying to hack in a property for an unmined mineral, but I'm sure a solution would be applicable in lots of other areas as well.

The complicated way would be to:

1. Locate all specks of the mineral when the map is loaded.  Somehow store that information so that it persists for the session.
2. Every N ticks, check each speck to make sure it's still unmined.  Remove mined ones from the list of specks.
3. Check the tiles surrounding each speck for magma.  Could be 6, 18 or 26 tiles depending on how diagonals are handled.
4. If magma is found in the right place, remove the tile, spawn a creature in its place, and make an appropriate announcement.
Logged
Just got back, updating:
(0.42 & 0.43) The Earth Strikes Back! v2.15 - Pay attention...  It's a mine!  It's-a not yours!
(0.42 & 0.43) Appearance Tweaks v1.03 - Tease those hippies about their pointy ears.
(0.42 & 0.43) Accessibility Utility v1.04 - Console tools to navigate the map

expwnent

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.13-r1
« Reply #1298 on: November 04, 2014, 11:25:58 am »

There are some temperature update flags you could look at to avoid checking most map tile blocks. You could also keep track of dig job completions to find mined tiles.
Logged

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: DFHack 0.40.13-r1
« Reply #1299 on: November 04, 2014, 12:03:10 pm »

There are some temperature update flags you could look at to avoid checking most map tile blocks. You could also keep track of dig job completions to find mined tiles.
The temperature update might help, but since I don't want to run this every tick, maybe check the actual temperature instead?  "Warm stone" is 10075, so if the temperature is >= 10075 then that's pretty good evidence of magma.

Ideally, I could spawn a persistent structure for each mineral type (there are 24 distinct special minerals, but they won't all exist on the same map) that contains:

  • Mineral type (if a tile doesn't match, it's reverted to a layer stone because it was mined out)
  • Linked list of specks (they are all single-tile clusters)
  • When to run the check (allows staggering the checks)
  • Script to execute if speck is warm

Though unlikely to happen in a real game, the structure should deconstruct itself gracefully if the last speck is removed from the list.

The initial scan that sets up the structures will be in charge of spacing out the checks over N ticks.  Not sure if last two digits of the time or last byte of the time (255 slices) would be more appropriate.  I think updating this once per load is reasonable.

I'm not aware of any way to keep a persistent list in a script, so actually building it would need to wait for my new machine to create a DFHack plug-in.
Logged
Just got back, updating:
(0.42 & 0.43) The Earth Strikes Back! v2.15 - Pay attention...  It's a mine!  It's-a not yours!
(0.42 & 0.43) Appearance Tweaks v1.03 - Tease those hippies about their pointy ears.
(0.42 & 0.43) Accessibility Utility v1.04 - Console tools to navigate the map

Badger Storm

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.13-r1
« Reply #1300 on: November 04, 2014, 04:58:04 pm »

Has anyone else tried the above compiled version on OSX yet?  I miss DFHack but I don't feel confident in testing it out for myself.
Logged

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.13-r1
« Reply #1301 on: November 04, 2014, 05:04:24 pm »

The build sv-esk posted is Windows-only.
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.

Kazimuth

  • Bay Watcher
  • [ARTIFICIAL_HIVEABLE]
    • View Profile
    • github
Re: DFHack 0.40.13-r1
« Reply #1302 on: November 04, 2014, 06:05:22 pm »

I have a DFHack API question: what's the difference between Maps::getBlock and Maps::getTileBlock? The only change I can see is that getTileBlock right-shifts its x and y indices by 4...
Also, how long will the return values of these functions be valid? They're just pointers into df::world.map.map_blocks, right? Will that ever shift its entries around?
Logged
I'm not sure this was a good idea

mifki

  • Bay Watcher
  • works secretly...
    • View Profile
    • mifki
Re: DFHack 0.40.13-r1
« Reply #1303 on: November 04, 2014, 06:39:30 pm »

Quiver base value should be 20 instead of 10 in getItemBaseValue(), isn't it?

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.13-r1
« Reply #1304 on: November 04, 2014, 07:00:37 pm »

I have a DFHack API question: what's the difference between Maps::getBlock and Maps::getTileBlock? The only change I can see is that getTileBlock right-shifts its x and y indices by 4...
Going by that information, getTileBlock takes the coordinates of an individual tile, while getBlock takes the position of a (16x16 tile) map block.
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.
Pages: 1 ... 85 86 [87] 88 89 ... 360