Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 93 94 [95] 96 97 ... 244

Author Topic: DFHack 50.14-r1.1  (Read 893006 times)

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.12-r1
« Reply #1410 on: August 18, 2018, 09:20:27 am »

Are you sure you're using a clean installation? Can you upload your stderr.log?
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.

Saiko Kila

  • Bay Watcher
  • Dwarven alchemist
    • View Profile
Re: DFHack 0.44.12-r1
« Reply #1411 on: August 18, 2018, 09:51:16 am »

I've got something like this as stderr.log :
Spoiler (click to show/hide)

This is a clean installation, just contents of df_44_12_win32.zip overwritten with contents of dfhack-0.44.12-r1-Windows-32.zip.
Logged

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.12-r1
« Reply #1412 on: August 18, 2018, 11:30:04 am »

Ah, it's because the vtable-address-finding script failed for viewscreen_storesst. Can you enter the z->stocks screen, then search for "viewscreen_storesst" near the end of stderr.log?

For reference, in symbols.xml, this is the problem:
Code: [Select]
        <!-- CONFLICT vtable-address name='viewscreen_storesst' value='0x1e4c23c or 0x1e4b994 or 0xf694f8'/ -->
It should be something like
Code: [Select]
        <vtable-address name='viewscreen_storesst' value='0xSOMETHING'/>
and stderr.log should contain the appropriate line to replace it - please let us know what this is.
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.

Saiko Kila

  • Bay Watcher
  • Dwarven alchemist
    • View Profile
Re: DFHack 0.44.12-r1
« Reply #1413 on: August 18, 2018, 12:01:41 pm »

Yes, the line is
Code: [Select]
<vtable-address name='viewscreen_storesst' value='0xf694f8'/>
When I replaced the line in symbols.xml then plugins apparently work.
Logged

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.12-r1
« Reply #1414 on: August 18, 2018, 12:44:03 pm »

What does "apparently" mean? Does the search option show up in the stocks screen, and does the "e"xtended stocks screen work? If so, then they work, as far as I'm concerned.
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.

Saiko Kila

  • Bay Watcher
  • Dwarven alchemist
    • View Profile
Re: DFHack 0.44.12-r1
« Reply #1415 on: August 18, 2018, 01:22:52 pm »

What does "apparently" mean? Does the search option show up in the stocks screen, and does the "e"xtended stocks screen work? If so, then they work, as far as I'm concerned.

Apparently means I have never used stocks plugin, so don't know how it works. It's just that there is no error in console anymore.
Logged

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.12-r1
« Reply #1416 on: August 18, 2018, 01:23:58 pm »

Ok, then can you check the things I asked about (z->stocks->'s'earch and 'e'xtended view)? If those don't crash, then it's fine.
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.

Fleeting Frames

  • Bay Watcher
  • Spooky cart at distance
    • View Profile
Re: DFHack 0.44.12-r1
« Reply #1417 on: August 18, 2018, 03:27:26 pm »

@lethosor: Thanks noting run_script, didn't know of/had forgotten it.

And yeah, intended to mean loading with script_environment (in this context, most of what you'd load would lack the module comment), then executing functions therein - good to clarify and note failure conditions (that I didn't consider, having not used so far for this purpose).

Saiko Kila

  • Bay Watcher
  • Dwarven alchemist
    • View Profile
Re: DFHack 0.44.12-r1
« Reply #1418 on: August 18, 2018, 03:52:59 pm »

Ok, then can you check the things I asked about (z->stocks->'s'earch and 'e'xtended view)? If those don't crash, then it's fine.

Search plugin definitely works, and pressing "e" (or CTRL+SHIFT+Z) invokes extended view.
Logged

Rumrusher

  • Bay Watcher
  • current project : searching...
    • View Profile
Re: DFHack 0.44.12-r1
« Reply #1419 on: August 19, 2018, 02:52:22 am »

Is there a script to 'T'ravel through mountains?


Doesn't really allow for escaping from the mountains if you're in there, it's more of a 'now I can cross through a mountain in a straight line, or cross a river or cut through a town or city that block access off. there's a "warp me to a different spot" script but uhh kinda tricky to pull off constantly given the new quest log making you have to press Q-M to get free access to the map instead of being able to warp to the hotspot or point of interest.
Logged
I thought I would I had never hear my daughter's escapades from some boy...
DAMN YOU RUMRUSHER!!!!!!!!
"body swapping and YOU!"
Adventure in baby making!Adv Homes

Kat

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.12-r1
« Reply #1420 on: August 19, 2018, 03:04:05 am »

how well is dwarfvet working now ? been a while since I used it, but it had a tendency to crash if enabled.
Logged

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFHack 0.44.12-r1
« Reply #1421 on: August 19, 2018, 05:14:11 am »

not sure how useful this might be, but

Code: [Select]
utils=require('utils')

validArgs = utils.invert({
 'reaction',
 'skill',
 'level'
})

args = utils.processArgs({...}, validArgs)

if not (args.skill and args.reaction and args.level) then qerror("Must have -level, -reaction and -skill arguments!") end

require('plugins.eventful').onReactionComplete[skillRequirement..args.reaction]=function(reaction,reaction_product,unit,input_items,input_reagents,output_items,call_native)
    if dfhack.units.getEffectiveSkill(unit,df.job_skill[args.skill])<=tonumber(args.level) then
        call_native.value=false
        dfhack.gui.makeAnnouncement('CANCEL_JOB',{D_DISPLAY=true},unit.pos,dfhack.TranslateName(dfhack.units.getVisibleName(unit)..' cancels '..reaction.name..': not skilled enough.',COLOR_RED,true))
    end
end

should make there be a minimum skill level for a given reaction to go through, that's about it, simple enough, easy syntax i hope, though i could be misunderstanding what "reaction" is referring to

Kat

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.12-r1
« Reply #1422 on: August 19, 2018, 06:40:37 am »

Also, I saw there's a "cannibalism" script now, to unmark things as having "dead_dwarf" so that they can be butchered. Works in fortress mode, looking at a corpse's detail, which is fine for megabeasts and such, but with goblins, it's a bit less convenient, as there are many corpses to go through. Is it possible to make it so that it would work with all items under the cursor ?
Logged

Roses

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.12-r1
« Reply #1423 on: August 22, 2018, 02:22:22 pm »

Question about script_environment. I currently use it quite extensively to call functions from scripts and from other functions and it works great, but I am wondering what information the functions that I call have access to. For example if I had a lua file set up like
Code: (functions.lua) [Select]
somevalue = 0
function blahblah()
 -- Do something with the function
end
and call it from a script like
Code: (somescript.lua) [Select]
-- Script stuff
dfhack.script_environment('functions').blahblah()
-- More script stuff
will the function blahblah know what the value of somevalue is?

EDIT: Another question, I am almost positive the answer is no, but are there keyword arguments (such as in python) in lua or should I use tables if I want to simulate keyword arguments?
« Last Edit: August 22, 2018, 02:33:26 pm by Roses »
Logged

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.44.12-r1
« Reply #1424 on: August 22, 2018, 02:33:27 pm »

Absolutely. blahblah() always has access to its containing environment regardless of where it's called from.
Note that in the example you gave, re-running functions.lua (e.g. if you ran it at the command prompt) would reset somevalue to 0 ("somevalue = somevalue or 0" would avoid that). script_environment() usually won't reset that, but it might if the script file is modified. run_script() is what the DFHack console actually uses to run Lua scripts, I think, so it should always reset that.
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.
Pages: 1 ... 93 94 [95] 96 97 ... 244