Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 9 10 [11] 12 13 ... 373

Author Topic: DFHack 0.34.11 r3  (Read 1456694 times)

peterix

  • Bay Watcher
    • View Profile
    • Dethware
Re: DFHack 0.31.25 r6 (current)
« Reply #150 on: October 02, 2011, 09:23:01 pm »

I noticed the occupancy structure has three bits reserved for "building" and that you'd noted it should be an enumeration.  The current version of my plugin just checks to see if that field is non-zero, but it would be nice to know what each of those values actually means.  Is more research required to find the meaning of each value, or has it just not come up yet?
I probably messed with it, wrote down some notes and then got distracted by something random... all I have is a guess: it's for pathfinding and collision detection. For example a retracting bridge could either act as 'empty space', in which case the normal map tile geometry is used, or 'floor', overriding the default. Same applies to workshops having floor/wall/empty tiles - you can cover the magma with the floor or wall tiles of a magma furnace.

A good test for this would be to set the bits on some empty space tiles and see if you can get dwarves to walk on invisible bridges :D
« Last Edit: October 02, 2011, 09:24:32 pm by peterix »
Logged

rampaging-poet

  • Bay Watcher
    • View Profile
Re: DFHack 0.31.25 r6 (current)
« Reply #151 on: October 03, 2011, 01:48:30 am »

I built a quick plugin to fiddle with the building bits.  I didn't have a retracting bridge or pit to test with, but I tried a number of other things.  These are the values I found:

Code: [Select]
000: No building whatsoever. Used for normal floors, walls, empty space, and constructions.
001: Not found in my tests.
010: Most passable buildings and stockpiles.  Levers, armor stands, chairs, etc. Also used for empty space drawbridges land on.
011: Gem windows, raised drawbridges, and forbidden doors.
100: Not found in my tests.
101: Used for open drawbridges, closed hatches and... the trade depot?
110: Impassible portions of workshops, statues.
111: Vertical bars, non-forbidden doors.

While it took some time to isolate dwarves (my fortress has too many possible paths), I was eventually able to block some dwarves in by painting invisible statues (110) over normal floor.  I tried to get them to path through walls by marking them as doors, trade depots, and passable buildings, but the pathfinding algorithm was not fooled.  I didn't have enough open space to perform a real test in my current fortress, but I might set up a test embark to fool around with in a couple days.
« Last Edit: October 03, 2011, 02:00:06 am by rampaging-poet »
Logged
Lame excuse? 'Having a drink instead' is the dwarfiest reason to not get something done, short of accidentally flooding your home with magma. Or intentionally flooding your home with magma.

Angel Of Death

  • Bay Watcher
  • Karl Groucho?
    • View Profile
Re: DFHack 0.31.25 r6 (current)
« Reply #152 on: October 08, 2011, 04:20:59 pm »

Where do I download the other parts, like DFmode?
Logged
99 percent of internet users add useless, pulled out of arse statistics to their sig. If you are the 1%, please, for the love of Armok, don't put any useless shit like this in your sig.
Hidden signature messages are fun!

i874236951

  • Bay Watcher
    • View Profile
Re: DFHack 0.31.25 r6 (current)
« Reply #153 on: October 08, 2011, 05:32:40 pm »

Where do I download the other parts, like DFmode?

Try the command "mode set" ;D
Logged

rampaging-poet

  • Bay Watcher
    • View Profile
Re: DFHack 0.31.25 r6 (current)
« Reply #154 on: October 13, 2011, 09:46:11 pm »

Alright, I forked the project and committed the first draft of the plugin.  The fork can be found here.  The filltraffic plugin has two commands. The first is the filltraffic command, which flood-fills from the cursor and lets you decide whether to stop on buildings or not.  The second is tiletraffic, which currently just sets the entire map to one traffic level but will eventually check each tile for user-specified criteria before filling.

My quick building occupancy plugin is also included under plugin/devel, but I'm not certain it got listed as a developer plugin correctly as it doesn't seem to be in the Visual Studio project.

Also, should I send you pull requests every time I push to my fork, or only when I've completed a major feature?  I'm new to open-source coding, so I'm unsure of the etiquette involved.  I know better than to send obviously non-functional/broken code, but what other conditions apply?
Logged
Lame excuse? 'Having a drink instead' is the dwarfiest reason to not get something done, short of accidentally flooding your home with magma. Or intentionally flooding your home with magma.

PWRFLSTRGN

  • Bay Watcher
    • View Profile
Re: DFHack 0.31.25 r6 (current)
« Reply #155 on: October 13, 2011, 11:48:21 pm »

Any chance there's a mac version of this somewhere? I just drained all the floodwater out of my fort and this mud is driving me crazy...
Logged

peterix

  • Bay Watcher
    • View Profile
    • Dethware
Re: DFHack 0.31.25 r6 (current)
« Reply #156 on: October 14, 2011, 08:32:55 am »

Alright, I forked the project and committed the first draft of the plugin.  The fork can be found here.  The filltraffic plugin has two commands. The first is the filltraffic command, which flood-fills from the cursor and lets you decide whether to stop on buildings or not.  The second is tiletraffic, which currently just sets the entire map to one traffic level but will eventually check each tile for user-specified criteria before filling.
Awesome.  :)
My quick building occupancy plugin is also included under plugin/devel, but I'm not certain it got listed as a developer plugin correctly as it doesn't seem to be in the Visual Studio project.
The devel stuff won't compile by default - you have to enable that in cmake/cmake-gui. Should be the BUILD_DEV_PLUGINS option.
Also, should I send you pull requests every time I push to my fork, or only when I've completed a major feature?  I'm new to open-source coding, so I'm unsure of the etiquette involved.  I know better than to send obviously non-functional/broken code, but what other conditions apply?
Well, do what makes sense to you. Sending pull requests when your code is ready is good, because github will show all the changes and attach an equivalent of a forum thread to each line of code. It's good for reviewing stuff.
You can tell me in any other way as well (IRC, e-mail, etc.). As long as I know that the code is ready for merging, it's fine.


Any chance there's a mac version of this somewhere? I just drained all the floodwater out of my fort and this mud is driving me crazy...
I'm fairly certain there is no working mac version around. I might consider making one, if I get my hands on a *real* mac machine. I tried building a hackintosh, but ended up with something that crashes halfway through the installation. OSX can't handle my ghetto setup :)

Another possibility is a mac developer showing up and doing all the work instead.

Main problem is getting all the memory offsets right... let's just say the dudes who tried didn't last long enough to make the mac versions usable. So, you might find some code in the github repository, but it's been all obsoleted by now.

PWRFLSTRGN

  • Bay Watcher
    • View Profile
Re: DFHack 0.31.25 r6 (current)
« Reply #157 on: October 14, 2011, 02:01:00 pm »

Thanks for the reply!  I'm seriously starting to doubt my PC grudge. I was duped by Justin long and my own hipster tendencies. My next box is going to do a lot more than look good haha.
Logged

mithosaurion

  • Bay Watcher
    • View Profile
Re: DFHack 0.31.25 r6 (current)
« Reply #158 on: October 14, 2011, 09:24:06 pm »

ok... I am new to this and don't really know what I am doing.  But PLEASE help me.  How do I get dfhack to work? What application do I run?  all of the folders (in the windows version anyway) are xml files png images and the like, I can find no program to actually activate.
Logged

Yoink

  • Bay Watcher
    • View Profile
Re: DFHack 0.31.25 r6 (current)
« Reply #159 on: October 14, 2011, 10:42:47 pm »

I was just wondering the same thing, funnily enough. The OP needs a guide on how to actually use it...
Logged
Booze is Life for Yoink

To deprive him of Drink is to steal divinity from God.
you need to reconsider your life
If there's any cause worth dying for, it's memes.

Rose

  • Bay Watcher
  • Resident Elf
    • View Profile
Re: DFHack 0.31.25 r6 (current)
« Reply #160 on: October 14, 2011, 11:24:56 pm »

pretty sure it at least says somewhere that you're supposed to copy it all to the DF folder and then run DF.
Logged

Yoink

  • Bay Watcher
    • View Profile
Re: DFHack 0.31.25 r6 (current)
« Reply #161 on: October 14, 2011, 11:26:23 pm »

Yeah but, I tried that and it sure didn't work for me. :(
Logged
Booze is Life for Yoink

To deprive him of Drink is to steal divinity from God.
you need to reconsider your life
If there's any cause worth dying for, it's memes.

Rose

  • Bay Watcher
  • Resident Elf
    • View Profile
Re: DFHack 0.31.25 r6 (current)
« Reply #162 on: October 14, 2011, 11:28:28 pm »

if you did it right, you should have had to overwrite SDL.dll, and when you open DF, a console will open.
Logged

mithosaurion

  • Bay Watcher
    • View Profile
Re: DFHack 0.31.25 r6 (current)
« Reply #163 on: October 14, 2011, 11:29:12 pm »

ok, after copying to the Dwarf fortress file and running the program... what then?  How do I actually use it while playing?  is there a key i have to press or something?  I do not want to be annoying but some step by step instructions or some pictures would be nice.
 
Logged

Rose

  • Bay Watcher
  • Resident Elf
    • View Profile
Re: DFHack 0.31.25 r6 (current)
« Reply #164 on: October 14, 2011, 11:32:01 pm »

do you see a console that opens up with DF?

if so, type help
Logged
Pages: 1 ... 9 10 [11] 12 13 ... 373