Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 179 180 [181] 182

Author Topic: DFHack 0.47.04-r3  (Read 371262 times)

PatrikLundell

  • Bay Watcher
    • View Profile
Re: DFHack 0.47.04-r3
« Reply #2700 on: November 18, 2020, 07:13:49 am »

The other good reason I can think of is testing. If the script author isn't interested in adventure mode there is very little incentive to test the script in it (or to deal with complaints about it not working in adventure mode).
Logged

MC

  • Bay Watcher
    • View Profile
Re: DFHack 0.47.04-r3
« Reply #2701 on: November 18, 2020, 08:39:45 am »

Sounds reasonable. Just wanted to make sure there wasn't some arcane reasoning I was missing. Thanks!
Logged
This is a terrible mod. All crashmanship is of the highest quality. This object is adorned with hanging rings of notification spam. This object menaces with spikes of llama wool. On the item is an image of a large oval dwarf flesh cabochan in elf bone. The artwork relates to the attack of an unknown creature on an unknown creature in a time before time. It was inevitable.

Evans

  • Bay Watcher
    • View Profile
Re: DFHack 0.47.04-r3
« Reply #2702 on: November 19, 2020, 09:51:00 am »

We've only included timestream.lua since 0.47.04-r3, which is currently the latest version. It is a heavily modified version of a script originally by IndigoFenix, though - were you using that? I didn't think it worked in 0.47.04 as-is. If not, where did you get timestream.lua from previously?

We could try adding that feature, but since I'm not aware of it being intentionally removed, I'm not really sure where to look. Are you asking for something like "-rate 0.25" to work? From looking through the code briefly, I think that should work as-is (at least, I don't see anything actively preventing it from working).
-rate 0.25 resets to default fps instead, making game to run at 1x speed.
Code: [Select]
        if rate ~= 1 then
            last_frame = df.global.world.frame_counter
            --if rate > 0 then            -- Won't behave well with unit simulation
            if rate > 1 and not simulating_desired_fps then
                print('timestream: Time running at x'..rate..".")
            else
                print('timestream: Time running dynamically to simulate '..desired_fps..' FPS.')
                if rate ~= 0 then
                    print('timestream: Rate setting ignored.')
                end

I'm using some older version, but it works very well - at least at slowing calendar, I'm sure other things may be affected in funny way.


Anyway, I'm having crashes in DF by totally different reasons now:
Class not in symbols.xml: 'viewscreen_unitlaborsst': vtable = 0x7fedc200ff0

This happens when I try to manage labour and enable herbalist job for my dwarves.
File search points to \Dwarf Fortress\hack\plugins\manipulator.plug.dll

I have dfhack-0.47.04-r3-Windows-64bit now.
« Last Edit: November 19, 2020, 10:11:56 am by Evans »
Logged
getlost.lua # How to get rid of tavern guests
function getlost ()
   local unit = dfhack.gui.getSelectedUnit (true)
   unit.flags1.forest = true
end
getlost ()

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.47.04-r3
« Reply #2703 on: November 19, 2020, 01:08:31 pm »

-rate 0.25 resets to default fps instead, making game to run at 1x speed.
Okay, I see the relevant code now, although it's right after the snippet you posted - if you comment out the "rate = 1" line (add "--" to the beginning of it), does that do what you want?
Quote
I'm using some older version, but it works very well
If my suggestion doesn't work, it would be very helpful to know where you got this older version from (or to have a copy of it).

Quote
Anyway, I'm having crashes in DF by totally different reasons now:
Class not in symbols.xml: 'viewscreen_unitlaborsst': vtable = 0x7fedc200ff0
The message you pasted is a harmless diagnostic message that is not related to the crash. It's in stderr.log because it's occasionally useful for development. Is there any way we could make it clearer that it is not an error? Would having something like "INFO:" prepended make it clearer?

Quote
This happens when I try to manage labour and enable herbalist job for my dwarves.
I'm having trouble reproducing this. I was able to enable herbalism on around 100 dwarves across two forts with no crash.
Does it happen exactly when you press "Enter" with herbalism selected for a dwarf, or at some later time? Are you able to reproduce it consistently? Does it only occur for specific dwarves? Are you using any mods?
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.

Evans

  • Bay Watcher
    • View Profile
Re: DFHack 0.47.04-r3
« Reply #2704 on: November 20, 2020, 03:43:27 am »

-rate 0.25 resets to default fps instead, making game to run at 1x speed.
Okay, I see the relevant code now, although it's right after the snippet you posted - if you comment out the "rate = 1" line (add "--" to the beginning of it), does that do what you want?
I'll give it a go.


Quote
Quote
I'm using some older version, but it works very well
If my suggestion doesn't work, it would be very helpful to know where you got this older version from (or to have a copy of it).
Mkay. I'm sure I got it from *somewhere* near the original author. If the above does not work, I'll post my ancient script here.


Quote
I'm having trouble reproducing this. I was able to enable herbalism on around 100 dwarves across two forts with no crash.
Does it happen exactly when you press "Enter" with herbalism selected for a dwarf, or at some later time? Are you able to reproduce it consistently? Does it only occur for specific dwarves? Are you using any mods?
Mods were most likely conflict source. I've refreshed DFhack from the latest release and now all the problems are gone.
For the moment anyway.

Thank you for your answers. I'll take a look at timestream.
Logged
getlost.lua # How to get rid of tavern guests
function getlost ()
   local unit = dfhack.gui.getSelectedUnit (true)
   unit.flags1.forest = true
end
getlost ()

Evans

  • Bay Watcher
    • View Profile
Re: DFHack 0.47.04-r3
« Reply #2705 on: November 20, 2020, 04:44:14 am »

commenting that line out does not seem to be doing anything.

I don't think it will help you much, but here is what is inside my ancient timestream.lua:
Spoiler (click to show/hide)
Logged
getlost.lua # How to get rid of tavern guests
function getlost ()
   local unit = dfhack.gui.getSelectedUnit (true)
   unit.flags1.forest = true
end
getlost ()

Ramiel.

  • Bay Watcher
    • View Profile
Re: DFHack 0.47.04-r3
« Reply #2706 on: November 21, 2020, 07:29:55 pm »

Hey, just wanted to throw out real quick that I just got dfhack-run.exe reported as a trojan like several others recently.  I see it's happened to multiple users now, such as here and here.  Using dfhack 0.47.04-r2, downloaded and installed directly from github on 8/30, run several times since then with no issues but only today it registered as a Trojan. I didn't even run Dwarf Fortress, just opened the folder containing it. Microsoft Security Essentials (on Win7) detected it as "MSIL/Stealer.RS!MTB". Microsoft's page on the file was made/updated on Sept 23.
I'm sure it's just a false positive, and I'll just be adding it as an exception in my system, but I thought I'd give my experience as an extra data point, give what info I have in case developers want to look into why this is happening/how to stop it.  Either way keep up the fantastic work you guys do, it's so very appreciated.
Logged

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.47.04-r3
« Reply #2707 on: November 21, 2020, 08:38:15 pm »

There isn't much we can do about that, unfortunately. dfhack-run itself hasn't changed very much in recent years, so this is almost certainly an issue with antivirus definitions.

I would be curious to know if 0.47.04-r3 also triggers the same detection, though. If it does, and 0.47.03-beta1 does not, then it could be related to the color change from March. Otherwise, my reasoning above would still apply.
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.

Evans

  • Bay Watcher
    • View Profile
Re: DFHack 0.47.04-r3
« Reply #2708 on: November 22, 2020, 10:56:45 am »

Scripting question.

I'm trying to restore ancient cage-thrower script into working order.
I'm java guys myself, and LUA was always incredibly weird for me, but after scouring through dozen lua files and some mods, I have finally managed to (almost) restore this script.

Here is how it looks like now (I might refactor it later):
Spoiler (click to show/hide)
Now the gun shots nets, they hit the target and put it in the cages just fine.

But I'm getting this error here:
Quote
hack/scripts/cageammo.lua:74: Cannot read field unit.relations: not found.

Say waaat?

How do I access relations now? How do I change 'following' flag?

And finally - is there a list of these fields for different objects somewhere?
Logged
getlost.lua # How to get rid of tavern guests
function getlost ()
   local unit = dfhack.gui.getSelectedUnit (true)
   unit.flags1.forest = true
end
getlost ()

PatrikLundell

  • Bay Watcher
    • View Profile
Re: DFHack 0.47.04-r3
« Reply #2709 on: November 22, 2020, 11:21:09 am »

All the fields known by the DFHack community are documented as XML files, and yes, I think the relations thing has changed over the years.

In addition to using the XML files, you can also use gui/gm-editor to look at structures (which is often easier). For the unit structure, select any unit in a fortress (probably works in adventure mode as well) and invoke gui/gm-editor from the DFHack terminal. This allows you to browse the structure, and thus see what the current one looks like.
Logged

Evans

  • Bay Watcher
    • View Profile
Re: DFHack 0.47.04-r3
« Reply #2710 on: November 22, 2020, 12:58:26 pm »

All the fields known by the DFHack community are documented as XML files, and yes, I think the relations thing has changed over the years.
Where would these xml files? I can only see symbols and some files in stonesense folder.

Quote
In addition to using the XML files, you can also use gui/gm-editor to look at structures (which is often easier). For the unit structure, select any unit in a fortress (probably works in adventure mode as well) and invoke gui/gm-editor from the DFHack terminal. This allows you to browse the structure, and thus see what the current one looks like.
Thanks. I have ocd when it comes to dealing with problems in the code. To the point, where I can sit for two days straight doing nothing else. But I'm learning to deal with it by asking other people. Kind of works ;)

Anyway.
The field following is there, but its nil and does not seem to be do anything.
After fixing the code, it seems like it is doing nothing now, but LUA keeps executing and now this:
Code: [Select]
unit_ref = df.general_ref_contains_unitst:new()
unit_ref.unit_id = unit.id
cage.general_refs:insert('#',unit_ref)
...causes everybody interested to follow the caged creature.

I'll comment it out and see if it works (previously as execution broke earlier, this block wasn't executing and at least my hunter ignored caged animal).

If I get this all working I'll upload whole this as a standalone package for anyone interested.



Edit:
...and they no longer follow the cage with an animal, but now game does not know how to get to this animal either.
Any quick way to clear their interest?
« Last Edit: November 22, 2020, 01:18:01 pm by Evans »
Logged
getlost.lua # How to get rid of tavern guests
function getlost ()
   local unit = dfhack.gui.getSelectedUnit (true)
   unit.flags1.forest = true
end
getlost ()

PatrikLundell

  • Bay Watcher
    • View Profile
Re: DFHack 0.47.04-r3
« Reply #2711 on: November 22, 2020, 05:27:51 pm »

The XML files are on github, in one of the DFHack projects you'd download if you wanted to develop code.
Logged

mross

  • Bay Watcher
    • View Profile
Re: DFHack 0.47.04-r3
« Reply #2712 on: November 22, 2020, 05:40:08 pm »

what does the second column in the auto cut gems menu represent? documentation doesn't say anything about it
Logged

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.47.04-r3
« Reply #2713 on: November 22, 2020, 05:59:57 pm »

what does the second column in the auto cut gems menu represent? documentation doesn't say anything about it
Could you clarify which screen you're talking about or provide a screenshot?
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.

mross

  • Bay Watcher
    • View Profile
Re: DFHack 0.47.04-r3
« Reply #2714 on: November 22, 2020, 06:03:00 pm »

what does the second column in the auto cut gems menu represent? documentation doesn't say anything about it
Could you clarify which screen you're talking about or provide a screenshot?

« Last Edit: November 22, 2020, 06:13:23 pm by mross »
Logged
Pages: 1 ... 179 180 [181] 182