Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 311 312 [313] 314 315 ... 360

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

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.03-r1
« Reply #4680 on: September 14, 2016, 02:08:50 pm »

Everything in the local map, as far as I can tell, uses the same coordinate system.

Anyway, I'm not sure you understood the issue. The issue is that TechnoScrabble is creating an item, whose coordinates after creation are (36, 60, 103). After unpausing, the item moves to (36, 60, 76) in the same coordinate system.

TechnoScrabble: this is probably a dumb question, but are you sure you aren't creating these items in midair or over open space?
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.

TechnoScrabble

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.03-r1
« Reply #4681 on: September 14, 2016, 04:14:38 pm »

It wasn't x/y/z = -30000 was it? That's the default cursor location when it isn't present, I discovered that when I ran launch without a target the first time, since I aimed it at the cursor to give a speed/direction control via in-game methods, this meant I hurled myself at the lower northwest corner of the map at light speed and blew up.

Nope!

[DFHack]# createitem BLOCKS INORGANIC:OLIVINE 50
[DFHack]# gui/gm-editor
[DFHack]# :lua ~df.item.find(13001).pos
<coord: 0x08fe4f04>
x                        = 36
y                        = 60
z                        = 103

EDIT: That's the position BEFORE it moves. Afterwards, it becomes:
x                        = 36
y                        = 60
z                        = 76

So it falls a bunch of Z-levels and stops. After it falls no further, what happens if you set its position back to the surface? Note that just adjusting the Z value for an item's position is not the correct way to move items because it leaves other flags and data structures un-updated, but works for this one experiment. I just want to see if it starts falling again after you bring it to the surface.

It brings me to the position, but doesn't reveal it (it might even be solid stone), so I can't select the olivine blocks with the cursor to use gm-editor on them again.

EDIT: My first concern was that, too, but they disappear no matter what tile I spawn them in.

EDIT EDIT: Spawning the item a few z-levels above where I want it makes it fall down and stay there, it seems. Maybe it was registering the floor as air, and falling to the unrevealed caverns?
« Last Edit: September 14, 2016, 04:17:45 pm by TechnoScrabble »
Logged

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.03-r1
« Reply #4682 on: September 14, 2016, 08:29:35 pm »

Have you tried checking with "reveal"? You can save and then load the save from scratch (and exit with "die" afterward) if you want to be really safe, since running "unreveal" after unpausing can cause issues sometimes.

Also, could you try following the item (k-F) right after creating it to see what exactly happens? Check the z-level indicator on the side of the screen to see if it's falling, teleporting, etc.

createitem just creates items at the feet of units (or in buildings, I guess, but using it with units is most common). It doesn't care what the terrain there is, and it has no idea, so it can't possibly, say, forget that ground is there and let the item fall through it.
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.

flyteofheart

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.03-r1
« Reply #4683 on: September 18, 2016, 01:35:51 am »

Having some issues with fix/dead-units

I had undead attack of all dwarf corpses and for some reason they are all stuck in the dead units list even after running the script. Its causing some problems in my super old fort. Its all named dwarf corpses which is I think the problem? "Omuvulo, Dwarf Hammerdwarf Corpse". Is there any way I could set it to just totally clear the dead list? Will that cause problems?

edit:

Nevermind, edited the Lua to this:

http://www.bay12forums.com/smf/index.php?topic=91166.msg4339870#msg4339870

fixed it. maybe consider making this default? either way my problem is solved :D

------------------------------------------------------------

Another issue though:

In the pref-adjust script, ( https://dfhack.readthedocs.io/en/stable/docs/_auto/base.html#pref-adjust )

It says it does all this stuff in the documentation but it actually only changes it to this

https://i.imgur.com/ImKOGIE.png

it doesnt give them a food preference. It only gives them a drink preference. This is an issue because drinking a preferred drink does NOT fix their focus for "not having a decent meal" which is the entire reason anyone would use this script in the first place.

Ideally it would do what it says it does in the documentation, giving them a wide array of food and furniture preferences so that we can use what we have and preventing them from getting "same old booze" thoughts if they always go for the dwarven wine.

https://dfhack.readthedocs.io/en/stable/docs/_auto/base.html#prefchange

The Prefchange script documentation encourages you to adjust it as you see fit, but does not really give you any way to do so via the console. I assume its asking you to go edit the script itself? Which is fine but I sorta wish there was a tutorial for that.
« Last Edit: September 18, 2016, 01:13:23 pm by flyteofheart »
Logged
Encrusted with fried bread and menacing with spikes of coconuts
living the dream

Max™

  • Bay Watcher
  • [CULL:SQUARE]
    • View Profile
Re: DFHack 0.43.03-r1
« Reply #4684 on: September 18, 2016, 09:09:10 pm »

Yeah, prefchange I wrote to clear the annoying food needs but I haven't redone those to deal with the need changes yet. To get rid of the food thoughts you'd want to prefchange c to clear them, but then if they mood you get random stuff, I wrote it mostly for mooding anyways. I intend to rewrite a lot of scripts to work with the new structures and such but last time I tried to get a dev build working it wouldn't even compile so I haven't messed with it much more than that.
Logged

flyteofheart

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.03-r1
« Reply #4685 on: September 19, 2016, 01:29:16 am »

Ill try to figure it out myself for a bit. Thanks for replying, I don't know what we would do without DFhack haha. I didnt expect to get the original writer of the pref-change script.

I don't know what im doing but I figure I can edit the lua and try to get them to prefer to consume plump helmets at the least.

Actually is there any kind of info about what values do what in the scripts? I can copy things from other sections but that takes forever. Like what are the IDs you guys use for items and whatnot? something in the wiki?
« Last Edit: September 19, 2016, 01:32:23 am by flyteofheart »
Logged
Encrusted with fried bread and menacing with spikes of coconuts
living the dream

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFHack 0.43.03-r1
« Reply #4686 on: September 19, 2016, 01:47:39 am »

You basically have to go through the raws to figure out IDs. I've memorized one or two, but the value of that is extremely limited--any changes to the raws will break them. The only ones I can think of off the top of my head are: toads are creature ID 0; dwarves are creature ID 465 (may not be true anymore); iron is inorganic 0. I would not use those, I'd do a proper search.

Zammer990

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.03-r1
« Reply #4687 on: September 19, 2016, 08:15:55 am »

Anyone know how to input commands do dfhack's console through SSH; I have the game running on a linux server wit ascii printout, and dfhack's in-game menus etc. are working fine, but I can't find a way to input commands. Mostly I want to do workflow so I can make the game mostly run autonomously
Logged
If your animals aren't expendable, you could always station a dwarf or two out there?

Hesperid

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.03-r1
« Reply #4688 on: September 19, 2016, 08:46:23 am »

DFhack comes with a console program specifically for this: dfhack-run.

Just use your alternate tty to browse into your dfhack folder while your dfhacked game is running, and type ./dfhack-run <command>
Logged

Zammer990

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.03-r1
« Reply #4689 on: September 19, 2016, 09:02:06 am »

DFhack comes with a console program specifically for this: dfhack-run.

Just use your alternate tty to browse into your dfhack folder while your dfhacked game is running, and type ./dfhack-run <command>
ty :)
Logged
If your animals aren't expendable, you could always station a dwarf or two out there?

flyteofheart

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.03-r1
« Reply #4690 on: September 19, 2016, 05:43:36 pm »

Can someone ELI5 why half the scripts are in Lua and half in Ruby? What can one do that the other cant in the dfhack scripts?
Logged
Encrusted with fried bread and menacing with spikes of coconuts
living the dream

Max™

  • Bay Watcher
  • [CULL:SQUARE]
    • View Profile
Re: DFHack 0.43.03-r1
« Reply #4691 on: September 19, 2016, 05:49:32 pm »

Some of it is preference, some of it is happenstance, I don't know as many people writing in ruby since lua got incorporated into dfhack, but from what I can tell (which may be totally wrong!) ruby was in a similar position as a friendlier script language.
Logged

flyteofheart

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.03-r1
« Reply #4692 on: September 19, 2016, 07:13:03 pm »

we shall see if im able to figure either of those out LOL. All i know is 1 semester of python, 3 years ago

thanks.
Logged
Encrusted with fried bread and menacing with spikes of coconuts
living the dream

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.03-r1
« Reply #4693 on: September 19, 2016, 07:15:54 pm »

More of the DFHack API is exposed to Lua than to Ruby, generally. I also wouldn't call Ruby friendlier, myself, but it could be easier if you know it well and don't know Lua.
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.

jecowa

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.03-r1
« Reply #4694 on: September 19, 2016, 07:21:34 pm »

I think LUA is easier because I already have experience with it from ComputerCraft. All I know about Ruby is that it has a 'Rails' library.
Logged
Pages: 1 ... 311 312 [313] 314 315 ... 360