Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 3 4 [5] 6

Author Topic: Exponent's For Each Tile - A Flexible Map Alteration Tool (v0.6 beta release)  (Read 10704 times)

Exponent

  • Bay Watcher
    • View Profile

I have a question: Is it possible to un-mine and un-reveal a tile using this? For example, I wish to 'fill in' various gem cutouts that I have mined along a pathway. Normally, I would do this with walls, but that "looks funny".

If I could somewhat get the tile to revert to an unmined/unrevealed state (I.E. Black) that would be awesome and would make my OCD so very, very happy.

I can't guarantee perfect functionality (i.e., can't guarantee that it won't cause the game to do funny things and/or crash later on), but I do know that I have successfully turned a dug-out square back into a normal rock wall.  Particularly useful if you want to keep mining out the same adamantine or diamond square over and over.  Although for your purposes, it might not be what you want, because it will actually revert to its previous state, which is that it will contain gems.  I never did get around to figuring out how to deal with the fancier geological data so that you could actually change a rock type precisely the way you wanted to.
Logged

Sinergistic

  • Bay Watcher
    • View Profile

I have a question: Is it possible to un-mine and un-reveal a tile using this? For example, I wish to 'fill in' various gem cutouts that I have mined along a pathway. Normally, I would do this with walls, but that "looks funny".

If I could somewhat get the tile to revert to an unmined/unrevealed state (I.E. Black) that would be awesome and would make my OCD so very, very happy.

I can't guarantee perfect functionality (i.e., can't guarantee that it won't cause the game to do funny things and/or crash later on), but I do know that I have successfully turned a dug-out square back into a normal rock wall.  Particularly useful if you want to keep mining out the same adamantine or diamond square over and over.  Although for your purposes, it might not be what you want, because it will actually revert to its previous state, which is that it will contain gems.  I never did get around to figuring out how to deal with the fancier geological data so that you could actually change a rock type precisely the way you wanted to.

Hmm, not sure what would 'annoy' me more, really. Gems in the walls, or small randomly mined out and filled in sections in my halls.

Bookmarking this thread in case you ever do figure it out ^_^
Logged

Sinergistic

  • Bay Watcher
    • View Profile

I took the plunge and got it all set up.

Can you not make sand? I wish to acquire a sand plot for glass making, but all I can see is 'make dry/dead/live grass'.

Other than that, the tool is very well done.
Logged

Exponent

  • Bay Watcher
    • View Profile

I took the plunge and got it all set up.

Can you not make sand? I wish to acquire a sand plot for glass making, but all I can see is 'make dry/dead/live grass'.

Other than that, the tool is very well done.
Indicating that a tile is made of sand is unfortunately much more complicated than indicating that it has grass or something else on it.  I believe there has been some success, perhaps with the 3Dwarf visualizer, in this regard, and with items perhaps as well, but I haven't gotten involved to find out the details.  Considering that this For Each Tile tool really was the work of a fey mood, I'm sort of out of it now, and since the new version will most likely change everything when it comes out, it's really easy to not worry about the more complicated things right now.

Maybe when the new version comes out, I'll see how motivated I am, and if I'm not sufficiently motivated, I'll probably consider releasing the source.
Logged

Sinergistic

  • Bay Watcher
    • View Profile

I took the plunge and got it all set up.

Can you not make sand? I wish to acquire a sand plot for glass making, but all I can see is 'make dry/dead/live grass'.

Other than that, the tool is very well done.
Indicating that a tile is made of sand is unfortunately much more complicated than indicating that it has grass or something else on it.  I believe there has been some success, perhaps with the 3Dwarf visualizer, in this regard, and with items perhaps as well, but I haven't gotten involved to find out the details.  Considering that this For Each Tile tool really was the work of a fey mood, I'm sort of out of it now, and since the new version will most likely change everything when it comes out, it's really easy to not worry about the more complicated things right now.

Maybe when the new version comes out, I'll see how motivated I am, and if I'm not sufficiently motivated, I'll probably consider releasing the source.

It's all good, I wasn't criticizing, sorry if it came off like that. When I said the tool was well done, I meant it.  ;D

Back to genning then ^_^
Logged

Ivefan

  • Bay Watcher
    • View Profile

Any chance to add a function to turn constructions into smoothed rock? Would be fun to engrave stuff you build.
Operations:
Code: [Select]
choose(get_raw_type = 493, set_raw_type(43), nop);
choose(get_raw_type = 495, set_raw_type(79), nop);
choose(get_raw_type >= 496 and get_raw_type <= 514, set_raw_type(get_raw_type - 189), nop);
Tried to use this but the material changed. Jet and silver became Andersite and the rest i tried on turned into siltstone. what can be done to prevent this?
Logged

Exponent

  • Bay Watcher
    • View Profile

Any chance to add a function to turn constructions into smoothed rock? Would be fun to engrave stuff you build.
Operations:
Code: [Select]
choose(get_raw_type = 493, set_raw_type(43), nop);
choose(get_raw_type = 495, set_raw_type(79), nop);
choose(get_raw_type >= 496 and get_raw_type <= 514, set_raw_type(get_raw_type - 189), nop);
Tried to use this but the material changed. Jet and silver became Andersite and the rest i tried on turned into siltstone. what can be done to prevent this?

I can't easily confirm it at the moment, but I suspect that the material change is somewhat inevitable.  Especially with a material that is never a natural stone (such as silver, the non-ore variety).  The script above simply takes something marked as a constructed wall and turns into something marked as a natural stone wall.  My guess as to what the game then does is this:  Since the tile is now a natural stone wall, the game no looks for the constructed material to find out what it is made of.  Instead, it looks at the geologic strata data, to find out what type of stone would be in this square naturally, assuming it isn't empty (which it isn't).

Or maybe it does something worse.  Either way, to make the construction engraveable, the game must think that the tile is natural stone.  And if the game thinks the tile is natural stone, it is going to look up the tile's material differently than if it thought it were constructed.  So until things change in the game, or someone comes up with an ingenious way to coerce the game to do what is desired, I would say that this material change is unavoidable.  Sorry.  :-/
Logged

Ivefan

  • Bay Watcher
    • View Profile

Is it not possible to before the change check for the material and after the change apply it?
The tiles i tried on was originaly clay tiles with no andersite or siltstone nearby and the silver was not intended to be changed, it was just something i tried on to see if the same occured.
Logged

Exponent

  • Bay Watcher
    • View Profile

Is it not possible to before the change check for the material and after the change apply it?
The tiles i tried on was originaly clay tiles with no andersite or siltstone nearby and the silver was not intended to be changed, it was just something i tried on to see if the same occured.

Not presently.  I personally haven't the slightest clue how to determine the exact material.  And if I could, I speculatively doubt that any attempt to change the material would fail anyway.  Maybe the new version, with the updates to materials and how they're handled, would make it easier, but for now, I'm pretty sure that natural stone and constructed walls figure out their materials differently.

Either that, or I'm just pessimistic and looking for excuses for why I shouldn't update my program...   :-\  It's been a while since I looked at the code (it doesn't compile at the moment!), and I have other projects I'm working on currently that excite me.
Logged

Ivefan

  • Bay Watcher
    • View Profile

Pity, thought there might have been a get_mat_type or something.
Oh well, I'll have to abandon my hopes for my engraved catacombs made of Jet
Logged

lastofthelight

  • Bay Watcher
    • View Profile

I don't understand. I saw your above post regarding values, and I saw the wiki page (almost none of which I understand) - what do I have to input, and where do I have to input it, into the program to get it to use the area functions?

(I wanted to create a river, but all I got was some muddy, non-water filled river sources, so I'm going to try and make some water on an area instead)
Logged

Exponent

  • Bay Watcher
    • View Profile

I don't understand. I saw your above post regarding values, and I saw the wiki page (almost none of which I understand) - what do I have to input, and where do I have to input it, into the program to get it to use the area functions?

(I wanted to create a river, but all I got was some muddy, non-water filled river sources, so I'm going to try and make some water on an area instead)

Sorry for the horrifically incomplete documentation.  I got distracted with other stuff.

If you already have successfully created a muddy river source, then you're almost there.  If I remember correctly, all you need to do now is "activate" the river source by altering something next to the river source that would force a recalculation of liquid flows.  Building a wall next to a river source, and then unbuilding it should work.  Or building a floodgate next to a river source, linking it to a lever, and then toggling it should work also.
Logged

lastofthelight

  • Bay Watcher
    • View Profile

Sweet! Thanks.
Logged

Randominality

  • Bay Watcher
  • [ETHIC:EAT]
    • View Profile

is there a way to create a waterfall tile or a river tile such as those  you find in underground rivers?
Logged
Oh Gordon Freeman, what medical procedure can't you educate alien war machines about?

Blacky

  • Bay Watcher
    • View Profile

The button is grayed out if the program doesn't have all the information it needs to execute the current operation.  Did you grab all the addresses off of the wiki page?  in_viewport requires the following:

<address name="menu_state" value="0x01386260" />
<snip>
I might be dumb, but I don't understand where we're supposed to enter those values.

I tried the Exponent.DwarfFortress.Tools.ForEachTile.xml file, no success.

Edit: I also tried \Dwarf Fortress\mod tweak\versions\0.28.181.40d\core.general.xml still no luck.
« Last Edit: January 10, 2009, 04:42:30 am by Blacky »
Logged
Pages: 1 ... 3 4 [5] 6