Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 326 327 [328] 329 330 ... 373

Author Topic: DFHack 0.34.11 r3  (Read 1388814 times)

smjjames

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4905 on: November 30, 2013, 05:25:05 pm »

What exactly did you type? Was it "stripcaged all" or something more targeted? And what do you mean by "it doesn't work"? Does it not dump any items, or does it only dump some items?

I tried both, just stripcaged and stripcaged all, and it only dumps weapons and the bags that thieves have. Haven't gotten any soldiers in the traps yet though, so I don't know about things other than thieves.

I tested "stripcaged all" on a pair of goblin crossbowmen that were caught in cage traps, and got the following results:

Dumped:
Crossbows
Quivers
Bolts that were embedded in a wound

Not Dumped:
Clothing
Armor
Bolts in the quiver

Using DFHack r4
EDIT: and there is no visible change between the code in the .rb file from r3 to r4. Haven't tested r3 behavior.

THANK YOU for confirming what I was trying to tell you guys. Doing it the old fashioned way works fine at least.

For some reason, the version says r3, but since Urist Da Vinci says that this is r4 and I'm seeing the same behavior, I guess I'm using r4. However, the behavior is exactly the same as Urist Da Vinci saw, the clothes don't get dumped, but the weapons (and bags apparently) do. Also, I'm using LNP r41, which is still the latest right now.

I'll see if it dumps corpses in cages and things left in there from animal training when I get the chance.

Also, I used stripcaged all the time in the previous r3 version and I can tell you. It used to have a few options like stripcaged all, stripcaged items and a few others. The behavior in the old r3 is what the description says, when I do stripcaged all, it dumps everything inside the cages, corpses, weapons, clothes, armor, stuff from taming, everything. Previously it would give the list of options if you just type stripcaged, but now it doesn't.
Logged

PeridexisErrant

  • Bay Watcher
  • Dai stihó, Hrasht.
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4906 on: November 30, 2013, 05:33:25 pm »

My pack is still using r3.
Logged
I maintain the DF Starter Pack - over a million downloads and still counting!
 Donations here.

smjjames

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4907 on: November 30, 2013, 05:43:28 pm »

My pack is still using r3.

Really? Strange, the stripcaged command was working fine a couple LNP revisions back, r38. That at least gives a bit of a timeline.
« Last Edit: November 30, 2013, 06:03:27 pm by smjjames »
Logged

Urist Da Vinci

  • Bay Watcher
  • [NATURAL_SKILL: ENGINEER:4]
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4908 on: November 30, 2013, 06:37:14 pm »

...

Also, I used stripcaged all the time in the previous r3 version and I can tell you. It used to have a few options like stripcaged all, stripcaged items and a few others. The behavior in the old r3 is what the description says, when I do stripcaged all, it dumps everything inside the cages, corpses, weapons, clothes, armor, stuff from taming, everything. Previously it would give the list of options if you just type stripcaged, but now it doesn't.

This is the content of the ruby script from R4:
Code: [Select]
# mark stuff inside of cages for dumping.

def plural(nr, name)
# '1 cage' / '4 cages'
"#{nr} #{name}#{'s' if nr > 1}"
end

def cage_dump_items(list)
count = 0
count_cage = 0
list.each { |cage|
pre_count = count
cage.general_refs.each { |ref|
next unless ref.kind_of?(DFHack::GeneralRefContainsItemst)
next if ref.item_tg.flags.dump
count += 1
ref.item_tg.flags.dump = true
}
count_cage += 1 if pre_count != count
}

puts "Dumped #{plural(count, 'item')} in #{plural(count_cage, 'cage')}"
end

def cage_dump_armor(list)
count = 0
count_cage = 0
list.each { |cage|
pre_count = count
cage.general_refs.each { |ref|
next unless ref.kind_of?(DFHack::GeneralRefContainsUnitst)
ref.unit_tg.inventory.each { |it|
next if it.mode != :Worn
next if it.item.flags.dump
count += 1
it.item.flags.dump = true
}
}
count_cage += 1 if pre_count != count
}

puts "Dumped #{plural(count, 'armor piece')} in #{plural(count_cage, 'cage')}"
end

def cage_dump_weapons(list)
count = 0
count_cage = 0
list.each { |cage|
pre_count = count
cage.general_refs.each { |ref|
next unless ref.kind_of?(DFHack::GeneralRefContainsUnitst)
ref.unit_tg.inventory.each { |it|
next if it.mode != :Weapon
next if it.item.flags.dump
count += 1
it.item.flags.dump = true
}
}
count_cage += 1 if pre_count != count
}

puts "Dumped #{plural(count, 'weapon')} in #{plural(count_cage, 'cage')}"
end

def cage_dump_all(list)
count = 0
count_cage = 0
list.each { |cage|
pre_count = count
cage.general_refs.each { |ref|
case ref
when DFHack::GeneralRefContainsItemst
next if ref.item_tg.flags.dump
count += 1
ref.item_tg.flags.dump = true
when DFHack::GeneralRefContainsUnitst
ref.unit_tg.inventory.each { |it|
next if it.item.flags.dump
count += 1
it.item.flags.dump = true
}
end
}
count_cage += 1 if pre_count != count
}

puts "Dumped #{plural(count, 'item')} in #{plural(count_cage, 'cage')}"
end


def cage_dump_list(list)
count_total = Hash.new(0)
empty_cages = 0
list.each { |cage|
count = Hash.new(0)

cage.general_refs.each { |ref|
case ref
when DFHack::GeneralRefContainsItemst
count[ref.item_tg._rtti_classname] += 1
when DFHack::GeneralRefContainsUnitst
ref.unit_tg.inventory.each { |it|
count[it.item._rtti_classname] += 1
}
# TODO vermin ?
else
puts "unhandled ref #{ref.inspect}" if $DEBUG
end
}

type = case cage
       when DFHack::ItemCagest; 'Cage'
       when DFHack::ItemAnimaltrapst; 'Animal trap'
       else cage._rtti_classname
       end

if count.empty?
empty_cages += 1
else
puts "#{type} ##{cage.id}: ", count.sort_by { |k, v| v }.map { |k, v| " #{v} #{k}" }
end

count.each { |k, v| count_total[k] += v }
}

if list.length > 2
puts '', "Total: ", count_total.sort_by { |k, v| v }.map { |k, v| " #{v} #{k}" }
puts "with #{plural(empty_cages, 'empty cage')}"
end
end


# handle magic script arguments
here_only = $script_args.delete 'here'
if here_only
it = df.item_find
list = [it]
if not it.kind_of?(DFHack::ItemCagest) and not it.kind_of?(DFHack::ItemAnimaltrapst)
list = df.world.items.other[:ANY_CAGE_OR_TRAP].find_all { |i| df.at_cursor?(i) }
end
if list.empty?
puts 'Please select a cage'
throw :script_finished
end

elsif ids = $script_args.find_all { |arg| arg =~ /^\d+$/ } and ids.first
list = []
ids.each { |id|
$script_args.delete id
if not it = df.item_find(id.to_i)
puts "Invalid item id #{id}"
elsif not it.kind_of?(DFHack::ItemCagest) and not it.kind_of?(DFHack::ItemAnimaltrapst)
puts "Item ##{id} is not a cage"
list << it
else
list << it
end
}
if list.empty?
puts 'Please use a valid cage id'
throw :script_finished
end

else
list = df.world.items.other[:ANY_CAGE_OR_TRAP]
end


# act
case $script_args[0]
when /^it/i
cage_dump_items(list)
when /^arm/i
cage_dump_armor(list)
when /^wea/i
cage_dump_weapons(list)
when 'all'
cage_dump_all(list)
when 'list'
cage_dump_list(list)
else
puts <<EOS
Marks items inside all cages for dumping.
Add 'here' to dump stuff only for selected cage.
Add a cage id to dump stuff for this cage only.

See 'autodump' to actually dump stuff.

Usage:
  stripcaged items
    dump items directly in cages (eg seeds after training)
 
  stripcaged [armor|weapons] here
    dump armor or weapons of caged creatures in selected cage

  stripcaged all 28 29
    dump every item in cage id 28 and 29, along with every item worn by creatures in there too
 
  stripcaged list
    show content of the cages

EOS

end

NONE of the argument options work, and they all produce the same result. Did something change in how the arguments are read or passed?

smjjames

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4909 on: November 30, 2013, 08:16:46 pm »

*snip*
NONE of the argument options work, and they all produce the same result. Did something change in how the arguments are read or passed?

Wish I knew, all of the options are there in that code, but it's not working for some reason. I still have the zip for LNP r38 (and r23 if we need one further back), so I'll get the ruby code from there.

While grabbing the code, I noticed that while r41 was neatly formatted in notepad, the others weren't formatted neatly. I don't know if that means anything, might not.

Edit: Did a visual comparison of r41 and r38 and I'm not seeing any differences. Maybe there is something else interfering?

r41 to use as a starting point.
Code: [Select]
# mark stuff inside of cages for dumping.

def plural(nr, name)
# '1 cage' / '4 cages'
"#{nr} #{name}#{'s' if nr > 1}"
end

def cage_dump_items(list)
count = 0
count_cage = 0
list.each { |cage|
pre_count = count
cage.general_refs.each { |ref|
next unless ref.kind_of?(DFHack::GeneralRefContainsItemst)
next if ref.item_tg.flags.dump
count += 1
ref.item_tg.flags.dump = true
}
count_cage += 1 if pre_count != count
}

puts "Dumped #{plural(count, 'item')} in #{plural(count_cage, 'cage')}"
end

def cage_dump_armor(list)
count = 0
count_cage = 0
list.each { |cage|
pre_count = count
cage.general_refs.each { |ref|
next unless ref.kind_of?(DFHack::GeneralRefContainsUnitst)
ref.unit_tg.inventory.each { |it|
next if it.mode != :Worn
next if it.item.flags.dump
count += 1
it.item.flags.dump = true
}
}
count_cage += 1 if pre_count != count
}

puts "Dumped #{plural(count, 'armor piece')} in #{plural(count_cage, 'cage')}"
end

def cage_dump_weapons(list)
count = 0
count_cage = 0
list.each { |cage|
pre_count = count
cage.general_refs.each { |ref|
next unless ref.kind_of?(DFHack::GeneralRefContainsUnitst)
ref.unit_tg.inventory.each { |it|
next if it.mode != :Weapon
next if it.item.flags.dump
count += 1
it.item.flags.dump = true
}
}
count_cage += 1 if pre_count != count
}

puts "Dumped #{plural(count, 'weapon')} in #{plural(count_cage, 'cage')}"
end

def cage_dump_all(list)
count = 0
count_cage = 0
list.each { |cage|
pre_count = count
cage.general_refs.each { |ref|
case ref
when DFHack::GeneralRefContainsItemst
next if ref.item_tg.flags.dump
count += 1
ref.item_tg.flags.dump = true
when DFHack::GeneralRefContainsUnitst
ref.unit_tg.inventory.each { |it|
next if it.item.flags.dump
count += 1
it.item.flags.dump = true
}
end
}
count_cage += 1 if pre_count != count
}

puts "Dumped #{plural(count, 'item')} in #{plural(count_cage, 'cage')}"
end


def cage_dump_list(list)
count_total = Hash.new(0)
empty_cages = 0
list.each { |cage|
count = Hash.new(0)

cage.general_refs.each { |ref|
case ref
when DFHack::GeneralRefContainsItemst
count[ref.item_tg._rtti_classname] += 1
when DFHack::GeneralRefContainsUnitst
ref.unit_tg.inventory.each { |it|
count[it.item._rtti_classname] += 1
}
# TODO vermin ?
else
puts "unhandled ref #{ref.inspect}" if $DEBUG
end
}

type = case cage
       when DFHack::ItemCagest; 'Cage'
       when DFHack::ItemAnimaltrapst; 'Animal trap'
       else cage._rtti_classname
       end

if count.empty?
empty_cages += 1
else
puts "#{type} ##{cage.id}: ", count.sort_by { |k, v| v }.map { |k, v| " #{v} #{k}" }
end

count.each { |k, v| count_total[k] += v }
}

if list.length > 2
puts '', "Total: ", count_total.sort_by { |k, v| v }.map { |k, v| " #{v} #{k}" }
puts "with #{plural(empty_cages, 'empty cage')}"
end
end


# handle magic script arguments
here_only = $script_args.delete 'here'
if here_only
it = df.item_find
list = [it]
if not it.kind_of?(DFHack::ItemCagest) and not it.kind_of?(DFHack::ItemAnimaltrapst)
list = df.world.items.other[:ANY_CAGE_OR_TRAP].find_all { |i| df.at_cursor?(i) }
end
if list.empty?
puts 'Please select a cage'
throw :script_finished
end

elsif ids = $script_args.find_all { |arg| arg =~ /^\d+$/ } and ids.first
list = []
ids.each { |id|
$script_args.delete id
if not it = df.item_find(id.to_i)
puts "Invalid item id #{id}"
elsif not it.kind_of?(DFHack::ItemCagest) and not it.kind_of?(DFHack::ItemAnimaltrapst)
puts "Item ##{id} is not a cage"
list << it
else
list << it
end
}
if list.empty?
puts 'Please use a valid cage id'
throw :script_finished
end

else
list = df.world.items.other[:ANY_CAGE_OR_TRAP]
end


# act
case $script_args[0]
when /^it/i
cage_dump_items(list)
when /^arm/i
cage_dump_armor(list)
when /^wea/i
cage_dump_weapons(list)
when 'all'
cage_dump_all(list)
when 'list'
cage_dump_list(list)
else
puts <<EOS
Marks items inside all cages for dumping.
Add 'here' to dump stuff only for selected cage.
Add a cage id to dump stuff for this cage only.

See 'autodump' to actually dump stuff.

Usage:
  stripcaged items
    dump items directly in cages (eg seeds after training)
 
  stripcaged [armor|weapons] here
    dump armor or weapons of caged creatures in selected cage

  stripcaged all 28 29
    dump every item in cage id 28 and 29, along with every item worn by creatures in there too
 
  stripcaged list
    show content of the cages

EOS

end

LNP r38, it worked here.
Code: [Select]
# mark stuff inside of cages for dumping.

def plural(nr, name)
# '1 cage' / '4 cages'
"#{nr} #{name}#{'s' if nr > 1}"
end

def cage_dump_items(list)
count = 0
count_cage = 0
list.each { |cage|
pre_count = count
cage.general_refs.each { |ref|
next unless ref.kind_of?(DFHack::GeneralRefContainsItemst)
next if ref.item_tg.flags.dump
count += 1
ref.item_tg.flags.dump = true
}
count_cage += 1 if pre_count != count
}

puts "Dumped #{plural(count, 'item')} in #{plural(count_cage, 'cage')}"
end

def cage_dump_armor(list)
count = 0
count_cage = 0
list.each { |cage|
pre_count = count
cage.general_refs.each { |ref|
next unless ref.kind_of?(DFHack::GeneralRefContainsUnitst)
ref.unit_tg.inventory.each { |it|
next if it.mode != :Worn
next if it.item.flags.dump
count += 1
it.item.flags.dump = true
}
}
count_cage += 1 if pre_count != count
}

puts "Dumped #{plural(count, 'armor piece')} in #{plural(count_cage, 'cage')}"
end

def cage_dump_weapons(list)
count = 0
count_cage = 0
list.each { |cage|
pre_count = count
cage.general_refs.each { |ref|
next unless ref.kind_of?(DFHack::GeneralRefContainsUnitst)
ref.unit_tg.inventory.each { |it|
next if it.mode != :Weapon
next if it.item.flags.dump
count += 1
it.item.flags.dump = true
}
}
count_cage += 1 if pre_count != count
}

puts "Dumped #{plural(count, 'weapon')} in #{plural(count_cage, 'cage')}"
end

def cage_dump_all(list)
count = 0
count_cage = 0
list.each { |cage|
pre_count = count
cage.general_refs.each { |ref|
case ref
when DFHack::GeneralRefContainsItemst
next if ref.item_tg.flags.dump
count += 1
ref.item_tg.flags.dump = true
when DFHack::GeneralRefContainsUnitst
ref.unit_tg.inventory.each { |it|
next if it.item.flags.dump
count += 1
it.item.flags.dump = true
}
end
}
count_cage += 1 if pre_count != count
}

puts "Dumped #{plural(count, 'item')} in #{plural(count_cage, 'cage')}"
end


def cage_dump_list(list)
count_total = Hash.new(0)
empty_cages = 0
list.each { |cage|
count = Hash.new(0)

cage.general_refs.each { |ref|
case ref
when DFHack::GeneralRefContainsItemst
count[ref.item_tg._rtti_classname] += 1
when DFHack::GeneralRefContainsUnitst
ref.unit_tg.inventory.each { |it|
count[it.item._rtti_classname] += 1
}
# TODO vermin ?
else
puts "unhandled ref #{ref.inspect}" if $DEBUG
end
}

type = case cage
       when DFHack::ItemCagest; 'Cage'
       when DFHack::ItemAnimaltrapst; 'Animal trap'
       else cage._rtti_classname
       end

if count.empty?
empty_cages += 1
else
puts "#{type} ##{cage.id}: ", count.sort_by { |k, v| v }.map { |k, v| " #{v} #{k}" }
end

count.each { |k, v| count_total[k] += v }
}

if list.length > 2
puts '', "Total: ", count_total.sort_by { |k, v| v }.map { |k, v| " #{v} #{k}" }
puts "with #{plural(empty_cages, 'empty cage')}"
end
end


# handle magic script arguments
here_only = $script_args.delete 'here'
if here_only
it = df.item_find
list = [it]
if not it.kind_of?(DFHack::ItemCagest) and not it.kind_of?(DFHack::ItemAnimaltrapst)
list = df.world.items.other[:ANY_CAGE_OR_TRAP].find_all { |i| df.at_cursor?(i) }
end
if list.empty?
puts 'Please select a cage'
throw :script_finished
end

elsif ids = $script_args.find_all { |arg| arg =~ /^\d+$/ } and ids.first
list = []
ids.each { |id|
$script_args.delete id
if not it = df.item_find(id.to_i)
puts "Invalid item id #{id}"
elsif not it.kind_of?(DFHack::ItemCagest) and not it.kind_of?(DFHack::ItemAnimaltrapst)
puts "Item ##{id} is not a cage"
list << it
else
list << it
end
}
if list.empty?
puts 'Please use a valid cage id'
throw :script_finished
end

else
list = df.world.items.other[:ANY_CAGE_OR_TRAP]
end


# act
case $script_args[0]
when /^it/i
cage_dump_items(list)
when /^arm/i
cage_dump_armor(list)
when /^wea/i
cage_dump_weapons(list)
when 'all'
cage_dump_all(list)
when 'list'
cage_dump_list(list)
else
puts <<EOS
Marks items inside all cages for dumping.
Add 'here' to dump stuff only for selected cage.
Add a cage id to dump stuff for this cage only.

See 'autodump' to actually dump stuff.

Usage:
  stripcaged items
    dump items directly in cages (eg seeds after training)
 
  stripcaged [armor|weapons] here
    dump armor or weapons of caged creatures in selected cage

  stripcaged all 28 29
    dump every item in cage id 28 and 29, along with every item worn by creatures in there too
 
  stripcaged list
    show content of the cages

EOS

end

LNP r23, probably not neccesary, but I guess having one much further back can help to double check against.
Code: [Select]
# mark stuff inside of cages for dumping.

def plural(nr, name)
# '1 cage' / '4 cages'
"#{nr} #{name}#{'s' if nr > 1}"
end

def cage_dump_items(list)
count = 0
count_cage = 0
list.each { |cage|
pre_count = count
cage.general_refs.each { |ref|
next unless ref.kind_of?(DFHack::GeneralRefContainsItemst)
next if ref.item_tg.flags.dump
count += 1
ref.item_tg.flags.dump = true
}
count_cage += 1 if pre_count != count
}

puts "Dumped #{plural(count, 'item')} in #{plural(count_cage, 'cage')}"
end

def cage_dump_armor(list)
count = 0
count_cage = 0
list.each { |cage|
pre_count = count
cage.general_refs.each { |ref|
next unless ref.kind_of?(DFHack::GeneralRefContainsUnitst)
ref.unit_tg.inventory.each { |it|
next if it.mode != :Worn
next if it.item.flags.dump
count += 1
it.item.flags.dump = true
}
}
count_cage += 1 if pre_count != count
}

puts "Dumped #{plural(count, 'armor piece')} in #{plural(count_cage, 'cage')}"
end

def cage_dump_weapons(list)
count = 0
count_cage = 0
list.each { |cage|
pre_count = count
cage.general_refs.each { |ref|
next unless ref.kind_of?(DFHack::GeneralRefContainsUnitst)
ref.unit_tg.inventory.each { |it|
next if it.mode != :Weapon
next if it.item.flags.dump
count += 1
it.item.flags.dump = true
}
}
count_cage += 1 if pre_count != count
}

puts "Dumped #{plural(count, 'weapon')} in #{plural(count_cage, 'cage')}"
end

def cage_dump_all(list)
count = 0
count_cage = 0
list.each { |cage|
pre_count = count
cage.general_refs.each { |ref|
case ref
when DFHack::GeneralRefContainsItemst
next if ref.item_tg.flags.dump
count += 1
ref.item_tg.flags.dump = true
when DFHack::GeneralRefContainsUnitst
ref.unit_tg.inventory.each { |it|
next if it.item.flags.dump
count += 1
it.item.flags.dump = true
}
end
}
count_cage += 1 if pre_count != count
}

puts "Dumped #{plural(count, 'item')} in #{plural(count_cage, 'cage')}"
end


def cage_dump_list(list)
count_total = Hash.new(0)
empty_cages = 0
list.each { |cage|
count = Hash.new(0)

cage.general_refs.each { |ref|
case ref
when DFHack::GeneralRefContainsItemst
count[ref.item_tg._rtti_classname] += 1
when DFHack::GeneralRefContainsUnitst
ref.unit_tg.inventory.each { |it|
count[it.item._rtti_classname] += 1
}
# TODO vermin ?
else
puts "unhandled ref #{ref.inspect}" if $DEBUG
end
}

type = case cage
       when DFHack::ItemCagest; 'Cage'
       when DFHack::ItemAnimaltrapst; 'Animal trap'
       else cage._rtti_classname
       end

if count.empty?
empty_cages += 1
else
puts "#{type} ##{cage.id}: ", count.sort_by { |k, v| v }.map { |k, v| " #{v} #{k}" }
end

count.each { |k, v| count_total[k] += v }
}

if list.length > 2
puts '', "Total: ", count_total.sort_by { |k, v| v }.map { |k, v| " #{v} #{k}" }
puts "with #{plural(empty_cages, 'empty cage')}"
end
end


# handle magic script arguments
here_only = $script_args.delete 'here'
if here_only
it = df.item_find
list = [it]
if not it.kind_of?(DFHack::ItemCagest) and not it.kind_of?(DFHack::ItemAnimaltrapst)
list = df.world.items.other[:ANY_CAGE_OR_TRAP].find_all { |i| df.at_cursor?(i) }
end
if list.empty?
puts 'Please select a cage'
throw :script_finished
end

elsif ids = $script_args.find_all { |arg| arg =~ /^\d+$/ } and ids.first
list = []
ids.each { |id|
$script_args.delete id
if not it = df.item_find(id.to_i)
puts "Invalid item id #{id}"
elsif not it.kind_of?(DFHack::ItemCagest) and not it.kind_of?(DFHack::ItemAnimaltrapst)
puts "Item ##{id} is not a cage"
list << it
else
list << it
end
}
if list.empty?
puts 'Please use a valid cage id'
throw :script_finished
end

else
list = df.world.items.other[:ANY_CAGE_OR_TRAP]
end


# act
case $script_args[0]
when /^it/i
cage_dump_items(list)
when /^arm/i
cage_dump_armor(list)
when /^wea/i
cage_dump_weapons(list)
when 'all'
cage_dump_all(list)
when 'list'
cage_dump_list(list)
else
puts <<EOS
Marks items inside all cages for dumping.
Add 'here' to dump stuff only for selected cage.
Add a cage id to dump stuff for this cage only.

See 'autodump' to actually dump stuff.

Usage:
  stripcaged items
    dump items directly in cages (eg seeds after training)
 
  stripcaged [armor|weapons] here
    dump armor or weapons of caged creatures in selected cage

  stripcaged all 28 29
    dump every item in cage id 28 and 29, along with every item worn by creatures in there too
 
  stripcaged list
    show content of the cages

EOS

end
« Last Edit: November 30, 2013, 08:38:50 pm by smjjames »
Logged

Urist Da Vinci

  • Bay Watcher
  • [NATURAL_SKILL: ENGINEER:4]
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4910 on: November 30, 2013, 09:39:38 pm »

*snip*
NONE of the argument options work, and they all produce the same result. Did something change in how the arguments are read or passed?

Wish I knew, all of the options are there in that code, but it's not working for some reason. I still have the zip for LNP r38 (and r23 if we need one further back), so I'll get the ruby code from there.

While grabbing the code, I noticed that while r41 was neatly formatted in notepad, the others weren't formatted neatly. I don't know if that means anything, might not.

Edit: Did a visual comparison of r41 and r38 and I'm not seeing any differences. Maybe there is something else interfering?

r41 to use as a starting point.
...
LNP r38, it worked here.
...
LNP r23, probably not neccesary, but I guess having one much further back can help to double check against.
...

The script hasn't changed from "LNP r23" onwards, so perhaps the thing that reads/interprets the script is different now?

If I knew how to code in Ruby, I would write a test script that would just print (echo) all the arguments that were passed to the function.

PeridexisErrant

  • Bay Watcher
  • Dai stihó, Hrasht.
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4911 on: November 30, 2013, 10:08:05 pm »

The pack has used r3 all the way through, and I don't remember ever updating the script - it would be in the changelog if I had. The only change I can think of is that I set up dfterm3, which iirc has some extra stuff for the binary?
Logged
I maintain the DF Starter Pack - over a million downloads and still counting!
 Donations here.

Urist Da Vinci

  • Bay Watcher
  • [NATURAL_SKILL: ENGINEER:4]
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4912 on: November 30, 2013, 10:45:15 pm »

Red herring - typing "stripcaged" calls the stripcaged.plug.dll plugin located in "\hack\plugins" and NOT the stripcaged.rb script.

If I move the offending plugin to a backup folder, THEN the .rb script is called and works properly.  8)

What is the purpose of that plugin?

smjjames

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4913 on: November 30, 2013, 11:35:49 pm »

Red herring - typing "stripcaged" calls the stripcaged.plug.dll plugin located in "\hack\plugins" and NOT the stripcaged.rb script.

If I move the offending plugin to a backup folder, THEN the .rb script is called and works properly.  8)

What is the purpose of that plugin?

Is it something found only in the LNP or is it in the main DFhack download?
Logged

BlackFlyme

  • Bay Watcher
  • BlackFlyme cancels Work: Interrupted by bird.
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4914 on: November 30, 2013, 11:45:31 pm »

Red herring - typing "stripcaged" calls the stripcaged.plug.dll plugin located in "\hack\plugins" and NOT the stripcaged.rb script.

If I move the offending plugin to a backup folder, THEN the .rb script is called and works properly.  8)

What is the purpose of that plugin?

Is it something found only in the LNP or is it in the main DFhack download?

I just DL'd DFHack, and it looks like stripcaged.plug.dll is not present. The only things that start with st are steam-engine, stockpiles, and stonesense.

Stripcaged.rb is present in the scripts folder.

E: For clarification, I downloaded version R3 from the first page of this thread.
« Last Edit: December 01, 2013, 01:11:07 am by BlackFlyme »
Logged

smjjames

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4915 on: November 30, 2013, 11:52:20 pm »

Maybe something that got left by accident while compiling the LNP r41?
Logged

Urist Da Vinci

  • Bay Watcher
  • [NATURAL_SKILL: ENGINEER:4]
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4916 on: December 01, 2013, 01:04:57 am »

It is present in the dfhack-0.34.11-r4-Windows.7z "zip" file that I downloaded on 5 November 2013.

IIRC at the time, R4 was "unofficial", but people started to upgrade to it anyways, and then an "official" R4 was released.

smjjames

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4917 on: December 01, 2013, 01:34:35 am »

It is present in the dfhack-0.34.11-r4-Windows.7z "zip" file that I downloaded on 5 November 2013.

IIRC at the time, R4 was "unofficial", but people started to upgrade to it anyways, and then an "official" R4 was released.

Yeah, I looked at the r38 folder and there is no stripcaged.plug.dll while the file is in r41, so I guess Peridexis downloaded r4 without realizing it?.

As for what the plugin does, doing stripcaged now outputs what specific items were dumped, which it didn't before. Well, it did, but it didn't say whether they were shoes, large daggers, etc. Since the ruby code is unchanged, maybe that is what the plugin is for?

Can I go and remove it into a backup folder for now or wait on that?

Edit: Went and moved it to a backup folder. Without the plugin, it just says x number of items removed from y number of cages. Knowing just what specifically was dumped is a nice little feature, but I'd rather have it be functional.
« Last Edit: December 01, 2013, 12:03:33 pm by smjjames »
Logged

Thundercraft

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #4918 on: December 02, 2013, 02:48:38 am »

I recently read a discussion on the DF 2012v0.34 question and answer thread that relates somewhat to the functionality of DFHack commands autodump and changeitem:

How do I get my dwarves to store an artifact large gem and an artifact gem flask? I'd like to get them out of the farming area.

Unfortunately you can't. Stockpiles can only store small cut gems. All other things made of gemstone are not stockpile-able, they simply aren't options in the stockpile materials lists.

Hm, is there a way I can move them via DFhack?

There might be a script that would work, but I don't know of one. The only thing I can think of would be autodump, but since you can't mark an artifact for dumping, autodump won't be usable.

You might be able to use changeitem to change the artifact material to something that can be stockpiled, then change it back once it is put away, but I have never used changeitem on an artifact, so I have no idea of any potential problems with that.

This relates to 0004430: Large gems not moved to stockpile. It's not just artifacts.

It seems a shame to have such things just clutter up a workshop simply because there is no way to move them. Artifacts can not be traded. But ordinary large gems can be moved to a Trade Depot. However, even then, they will be stuck there forever:

DF2012:Trade depot > Bugs
Quote
Large gems, once selected to be traded, will remain at the Depot forever. This bug occurs because no stockpile accepts large gems, and is not specific to the Depot.

Question 1: Will using changeitem to change the material of artifact mess it up?

Question 2: How difficult would it be to add functionality to autodump to allow moving items that can not be selected for dumping?

I was thinking of an autodump function similar to autodump-destroy-here that works on items under the cursor. Perhaps it works on items under cursor, then prompts you to move the cursor to another location where you want them moved to? Or maybe have items under cursor instantly moved to the nearest square in the nearest garbage dump zone?
Logged

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: DFHack 0.34.11 r3
« Reply #4919 on: December 02, 2013, 11:53:54 am »

Will using changeitem to change the material of artifact mess it up?
Not that I can see - beyond the item itself, the artifact doesn't appear to keep track of what it's made of.

The only possible problem I can think of would be of art images depicting the creation of the artifact (i.e. they might continue to depict the original material), though I don't have time to verify whether or not that would even happen.
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.
Pages: 1 ... 326 327 [328] 329 330 ... 373