Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 176 177 [178] 179 180 ... 373

Author Topic: DFHack 0.34.11 r3  (Read 1452697 times)

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #2655 on: December 21, 2012, 12:23:25 am »

- snipped -

Well, adding new commands is different from what I meant. I dont want to give the player more dfhack options, I want to give the dwarves more dfhack options ;) I dont want to overburden a player with more commands and hotkeys, I would just mod in workshops and reactions. The player would still play the game as usual.

It is the same with the ammo GUI in shooters. If it is on the gun, it is part of the game, if it is in a GUI, it is outside the actual game. I'd rather have a dwarf running to a workshop called "great horn of war/alarm siren/giant bell" and sound the alarm, then have a player type ctrl+alt+s to run "siren".

But reading what you wrote... you think something like: "item equiped" would work in a script?
Dwarf equips "gauntlets of ogre strength", script raises strength of this dwarf.
Dwarf equips "flamethrower of flamy doom", script adds firebreath to this dwarf.

That would be... one of the most innovative modding capabilities I have ever seen ^^
[/quote]
About gui in shooters- thats why i started this plugin (btw called "eventful"). So that all dfhack (or most of it) could be controled from inside df (aka non-cheating).  Also expwnent (i think) was working of triggers on death, job start, job end, siege etc...
Unfortunetly I still haven't found a good way to script equiped/unequiped thing, i'll try a few more ideas...

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: DFHack 0.34.11 r2
« Reply #2656 on: December 21, 2012, 04:53:01 am »

Understood :)

To come back to my questions. Could anyone be so kind and do a plugin that:
1. Runs siren command by a reaction, similar to add_spatter ?
2. Create a script that makes announcements based on item created ?
3. Create a magma-aquifer. (not place magma source, but make a specific inorganic mat be a magma source be default)

Just a simple: this is easy, that part is hard, this one impossible, might take a day, might take a week, something like that. :)

I did figure out the steam engine myself by now, wrote a custom design for it that works.
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 :::

Caldfir

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #2657 on: December 21, 2012, 05:02:29 am »

ok, fixed up the colors and followed some advice to change the way the screen is getting read, which is giving better control over the line endings: 
Spoiler: dwarf (click to show/hide)
Spoiler: history (click to show/hide)

still no ability to dump bunches of dwarves or items at a time, but it doesn't overwrite your earlier changes in the file it saves this stuff in, so you can just go down the list, running the script a bunch of times until you get all the ones you want

edit: put it on DFFD: http://dffd.wimbli.com/file.php?id=7245
« Last Edit: December 21, 2012, 07:38:28 pm by Caldfir »
Logged
where is up?

Rose

  • Bay Watcher
  • Resident Elf
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #2658 on: December 21, 2012, 05:31:21 am »

ok, fixed up the colors and followed some advice to change the way the screen is getting read, which is giving better control over the line endings: 
Spoiler: dwarf (click to show/hide)
Spoiler: history (click to show/hide)

still no ability to dump bunches of dwarves or items at a time, but it doesn't overwrite your earlier changes in the file it saves this stuff in, so you can just go down the list, running the script a bunch of times until you get all the ones you want
Notepad++ converts the characters in there easy enough. you just have to manually set it to OEM-US, then convert it to UTF-8
Logged

Cobbler89

  • Bay Watcher
  • Cobbler cancels celebrate Caesar: mending soles
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #2659 on: December 21, 2012, 08:44:48 pm »

Is there a way to set the direction of a ramp -- as viewed by probe? Tiletypes doesn't seem to support it. I can't find the lua stuff to read/write that data for a tile, though I'm sure it must be in there and I've been using this technique to explore (pro tip to anyone new to the lua options exposed through dfhack).

I somehow messed up a river ramp -- or at least, I think I did -- and am trying to use dfhack to fix it. So far I've got it to be just like the other river ramps again except for the direction. First time using dfhack extensively -- not so much that I think "hacking" a game with no competitors and no high scores is inherently wrong, but I tend to prefer the vanilla experience and don't really want to use hacks to get stuff done unless it's something I A) kinda need and B) don't have another way to accomplish (for example, I've used drybuckets or whatever it was back when the bucket water bug plagued my fortresses, and I might apply clean judiciously if I felt it mattered -- is there a way to clean the map, but only the tile under the cursor?)... not that I mind if anyone else likes to, obviously... Anyway, this just happens to be one such thing, correcting a mistake that affects something that game doesn't give you much way to revert (unlike, well, a lot of the stuff in DF that can be reverted or at least rerandomized). But it's the first time I've really wanted to do that, so I'm a little flummoxed how to get all the details.

It would be nice, by the way, to have a version of tiletypes/probe that set tiletypes to match the results of a probe. I'd code it myself if I knew how...
Logged
Quote from: Mr S
You've struck embedded links. Praise the data miners!
Quote from: Strong Bad
The magma is seeping under the door.

Quote from: offspring
Quote from: Cobbler89
I have an idea. Let's play a game where you win by being as quiet as possible.
I get it, it's one of those games where losing is fun!
I spend most of your dimension's time outside of your dimension. I can't guarantee followup or followthrough on any comments, ideas, or plans.

tahujdt

  • Bay Watcher
  • The token conservative
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #2660 on: December 21, 2012, 09:18:05 pm »

A great feature for OCD overseers like me would be to add a script where, if activated, would assign laors to migrants in the order they come on the map. Like, give the first two guys mining, the next five masonry, the next two farming, and so on. Also, could you nickname them based on that? Because I name all of my planters "Planter", and it would be cool if the script could do that. 
Logged
DFBT the Dwarf: The only community podcast for Dwarf Fortress!
Tahu-R-TOA-1, Troubleshooter
Quote
I suggest that we add a clause permitting the keelhauling of anyone who suggests a plan involving "zombify the crew".
Quote from: MNII
Friend Computer, can you repair the known universe, please?

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: DFHack 0.34.11 r2
« Reply #2661 on: December 22, 2012, 12:34:36 am »

Is there a way to set the direction of a ramp -- as viewed by probe?
Ramps do not have a direction - the "direction" you're seeing with river ramps is a property of the river, not the ramp, and all it seems to do is control the direction in which contaminants are pushed when they end up in the water (i.e. so the blood runs downstream).
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.

expwnent

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #2662 on: December 22, 2012, 12:36:15 am »

Meph: I might have something similar to what you're talking about. I'm working on (and mostly done with) a plugin to make boiling rock syndromes apply instantaneously rather than relying on the game to sometimes make them breathe them in and sometimes not. I just tweaked it so that you can call dfhack commands using syndrome classes.

Here's the short version: you make a reaction that produces some rock. The rock has a syndrome. The syndrome has syndrome classes. When the reaction is triggered, the plugin scans for a reaction class called "command". If it finds one, it considers all remaining syndrome classes to be part of a dfhack command. The first subsequent one is a command, and each one after, if any, is an argument.

Early testing is promising. It should work both with scripts and by directly calling plugins.
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: DFHack 0.34.11 r2
« Reply #2663 on: December 22, 2012, 12:39:51 am »

That would instantly fix one of the biggest problem deon, narhiril and I have... balancing the boiling rocks syndromes that might hit 100%, might hit 10% of the time.

Sounds awesome :) dfhack is really getting ahead :)
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 :::

Urist Da Vinci

  • Bay Watcher
  • [NATURAL_SKILL: ENGINEER:4]
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #2664 on: December 22, 2012, 11:37:34 am »

1. When during a tick does DFHack execute code? I assume that if the game is paused, code is executed "between" ticks, but if you try to run commands while the game isn't paused? Mostly I am trying to figure out if all creatures and mechanisms have had a chance to act on the time that a script is run.

2. Is it possible, and how would I run arbitrary code on a once-per-tick or once-every-X-ticks basis? My purpose here is to output data-over-time on fort mode things, and perhaps to autopause the game when an event of interest happens. Another utility would be to collect statistics over a period of time, and tell the player if their fort has some kind of inefficiency. I've always wanted utilities like Dwarf Therapist to tell me if a particular dwarf is under-used or useless in my fort, based on how much of the time they are working instead of idling/eating/drinking/sleeping/partying.

expwnent

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #2665 on: December 22, 2012, 11:59:44 am »

1. DFHack runs once per frame (as opposed to once per tick).

2. Actually, that's something else I was working on. My eventManager branch, once it works, will be able to do that sort of thing efficiently for C++. Right now though, you'd just have to check if something interesting has happened on every frame, either in lua or C++, or ruby maybe.
Logged

Cobbler89

  • Bay Watcher
  • Cobbler cancels celebrate Caesar: mending soles
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #2666 on: December 22, 2012, 03:42:52 pm »

Is there a way to set the direction of a ramp -- as viewed by probe?
Ramps do not have a direction - the "direction" you're seeing with river ramps is a property of the river, not the ramp, and all it seems to do is control the direction in which contaminants are pushed when they end up in the water (i.e. so the blood runs downstream).

Aaaah, good to know.

...Still curious if it can be set -- clearly this tile should match all the other river tiles here...

ETA: I posted and got a gateway timeout, so I hit refresh and told the browser yes, try resending the info (because I'd rather clean up a double-post than having to rewrite it)... and got the usual "a reply has been posted while you were working on yours" message -- about my own reply that posted. I just ninja'd myself!!
« Last Edit: December 22, 2012, 03:45:00 pm by Cobbler89 »
Logged
Quote from: Mr S
You've struck embedded links. Praise the data miners!
Quote from: Strong Bad
The magma is seeping under the door.

Quote from: offspring
Quote from: Cobbler89
I have an idea. Let's play a game where you win by being as quiet as possible.
I get it, it's one of those games where losing is fun!
I spend most of your dimension's time outside of your dimension. I can't guarantee followup or followthrough on any comments, ideas, or plans.

Urist Da Vinci

  • Bay Watcher
  • [NATURAL_SKILL: ENGINEER:4]
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #2667 on: December 22, 2012, 04:47:16 pm »

1. DFHack runs once per frame (as opposed to once per tick).

2. Actually, that's something else I was working on. My eventManager branch, once it works, will be able to do that sort of thing efficiently for C++. Right now though, you'd just have to check if something interesting has happened on every frame, either in lua or C++, or ruby maybe.

What's our terminology here? When I said "tick", I meant that, for example, it takes 10 ticks for a dwarf to walk 1 tile, and 100 ticks for a bridge to raise. It's also called "steps".

I guess you are trying to say that DFHack depends on the "graphical frame refresh rate", which would make sense considering that DFHack is a wrapper for sdl.dll.

How would you check for events on every frame then? The lua scripts that I have written in the past all take place within a single frame, and I guess the script has to end before DF can resume.

ag

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #2668 on: December 22, 2012, 04:56:17 pm »

No, it is simulation frames. Even when the game is paused, it does 100 (or whatever your fps setting is) frames, but in pause mode they don't actually advance anything. You can see that on a laggy fort your fps indicator goes up to exactly 100 or whatever your setting is when paused.

With the new interface screens and virtual method hooks there can also be callbacks directly from the game code at various points.
Logged

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: DFHack 0.34.11 r2
« Reply #2669 on: December 22, 2012, 05:01:18 pm »

Excuse me, I came up with another questions.

in the add_spatter raws it says:
COVERED = liquid, GLAZED = solid, BANDS = paste, SPIKES = powder

The reaction itself uses a liquid and covered. Can I assume that I could rewrite the reaction, use glazed and a solid inorganic mat (metals with syndromes) to coat things, and it would still work? Lets say I have uranium, a metal with a syndrome, and I take an ironsword, glaze it with uranium, will the uranium syndrome affect creatures hit by this sword ?

Or do I have to use a liquid and have it enter the enemies blood ?
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 :::
Pages: 1 ... 176 177 [178] 179 180 ... 373