Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 225 226 [227] 228 229 ... 373

Author Topic: DFHack 0.34.11 r3  (Read 1457652 times)

addictgamer

  • Bay Watcher
  • Penguin Developer
    • View Profile
    • Github
Re: DFHack 0.34.11 r3
« Reply #3390 on: March 22, 2013, 07:27:18 pm »

Well... spending a couple of minutes reading the readme.rst which comes with dfhack might have saved you some headaches. I would suggest you take a look at the sourcecode for "tweak makeown" which forces a selected unit to become a member of your fort's civilization.
Oops. I'll take a look at that and see if I can learn something.

One thing I can tell you for sure from looking at your script is that you need fix the ownership for clothes if you try to confiscate dwarves from caravans.  If you don't they will strip naked, get bad thoughts from being naked and in the worst case go insane because of that - which I think might be happening for you from reading the post. Inside the tweak plugin there is the function "fix_clothing_ownership()" which you should look at for that.
Ah, that'd probably explain it. I'll take a look at that.

Confiscating non-dwarves kinda works, but DF will treat them as semi-pets. IIRC you can assign jobs to them (if the race supports those kind of jobs), but you won't be able to give them bedrooms etc. I don't know if there is any way to overcome this limitation, I don't think there is because probably the player's race might be hardcoded to be the only one which you can fully control in fortress mode and being able to assign jobs to non-dwarves (or non-player-race creatures) is already pretty astounding.
I'm pretty sure companion would work around this, but I'm unable to test it (unless I completely missed a Linux port of companion).
Logged
I'm patiently waiting for the ability to mine and construct palaces in adventure mode.
Barony. A 3D, multiplayer roguelike I am developing.

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3391 on: March 22, 2013, 09:09:14 pm »

Oy. The lua implementation for DFHack not having unpack(table) is kinda bothering me. Got a working implementation running, but it kinda bothered me at first.
« Last Edit: March 22, 2013, 09:12:21 pm by Putnam »
Logged

RockBiterSon

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3392 on: March 23, 2013, 01:49:51 am »

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

So if I understand, this creates a three by three tile site meant to be used as a workshop. Once the workshop is created you can retire your adventurer in it? And he'll still be there when you play dwarf mode?
Logged

Warmist

  • Bay Watcher
  • Master of unfinished jobs
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3393 on: March 23, 2013, 02:23:07 am »

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

So if I understand, this creates a three by three tile site meant to be used as a workshop. Once the workshop is created you can retire your adventurer in it? And he'll still be there when you play dwarf mode?
Yes it will be there forever. And yes you can retire there.

ag

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3394 on: March 23, 2013, 02:56:20 am »

Oy. The lua implementation for DFHack not having unpack(table) is kinda bothering me. Got a working implementation running, but it kinda bothered me at first.

You mean table.unpack? http://www.lua.org/manual/5.2/manual.html#pdf-table.unpack
Logged

Heimdall86

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3395 on: March 23, 2013, 03:16:07 am »

Could one of you amazingly talented modders make a gui for tiletypes like you did with liquids. I would love to be able to change any tile at will like i can with obsidian in the liquids function.
Logged

Timeless Bob

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3396 on: March 23, 2013, 05:24:53 am »

Here's an interesting thought for dwarven economy: Being able to become a wagon in adventurer mode. 

Crazy right? 

Suppose using advfort a character were able to build a wagon using 3 logs and 2 "pet" horses/cows/ect...  then using forcing a character swap, that character becomes the wagon + horses with their former body and whomever they've convinced to travel with them as caravan gaurds.  The wagon-creature is able to haul all sorts of crap but has only the usual "hoof of death kung fu" that wagons usually have in fort mode.  A wagon that gets killed (ie, the horses/camels/ect... are dead) is "scuttled" and produces three logs of wood once more.  Wagons could end up with awesome names, which would make Legends mode a bit... different... too.

Ok, so that all seems a bit reasonable, but here's the next part which might be harder to do:
The wagon decides to retire at a hamlet or something - the wagon "dies", the adventurer pops back into his/her original body and that civ gains the inventory of that wagon as part of their trade goods.  Seeing as how using dfhack, fortresses can be made to live on past abandonment, this means that they can in effect trade with each other by having adventurer wagons pick stuff up at one fortress and "sell" it to the civ of another fortress.  If those trade-goods are then able to be resold to the fortress in fort mode, they've just become a link in a caravan trade economy. Trading coins would be useful again and kobold/bandit attacks would make more sense as caravan thieves.

Thoughts?
Logged
L33tsp34k does to English what Picasso did to faces.

Dwarfopoly
The Luckiest Tourist EVER
Bloodlines of the Forii

Rumrusher

  • Bay Watcher
  • current project : searching...
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3397 on: March 23, 2013, 06:18:04 am »

Here's an interesting thought for dwarven economy: Being able to become a wagon in adventurer mode. 

Crazy right? 

Suppose using advfort a character were able to build a wagon using 3 logs and 2 "pet" horses/cows/ect...  then using forcing a character swap, that character becomes the wagon + horses with their former body and whomever they've convinced to travel with them as caravan gaurds.  The wagon-creature is able to haul all sorts of crap but has only the usual "hoof of death kung fu" that wagons usually have in fort mode.  A wagon that gets killed (ie, the horses/camels/ect... are dead) is "scuttled" and produces three logs of wood once more.  Wagons could end up with awesome names, which would make Legends mode a bit... different... too.

Ok, so that all seems a bit reasonable, but here's the next part which might be harder to do:
The wagon decides to retire at a hamlet or something - the wagon "dies", the adventurer pops back into his/her original body and that civ gains the inventory of that wagon as part of their trade goods.  Seeing as how using dfhack, fortresses can be made to live on past abandonment, this means that they can in effect trade with each other by having adventurer wagons pick stuff up at one fortress and "sell" it to the civ of another fortress.  If those trade-goods are then able to be resold to the fortress in fort mode, they've just become a link in a caravan trade economy. Trading coins would be useful again and kobold/bandit attacks would make more sense as caravan thieves.

Thoughts?
I did this way back with a so called wagon mode
Code: [Select]
function scuttle(unit)
if unit==nil then
unit=getCreatureAtPos(getxyz())
end
if unit.flags3.scuttle==false then
unit.flags3.scuttle=true
end
entry=getline()
unit.flags1.dead=false
unit.flags2.killed=false
end
menu:add("wagon",scuttle)
where you take a companion (or anyone) and turn them into a wagon (they will die then you have to reflip the dead flag to revive them). over time we found ways to deal with the issue of a non moving unit via learning how to drag creatures in adventure mode. also setting up a caravan by dumping items and what not. I successfully completed the ability to act as a caravan back in 2012 though what was of it is a tamed horse companion a random animal(this could be replaced with a created unit) turn into a wagon, and making the horse the drag the wagon through Dragger and draggee Id links. though fast traveling will break the dragger and draggee links it was a close to great simulation. though after that I kinda gave up on working on wagons due to I done all I could with the project.
though this bit about trading goods seems like a good idea to work on though. only to jump the hurdle that is do shops even keep record of the stuff you sold them or do they just vanish and pick up a new name? oh and trading coins will never be usefull with the huge wealth exchange dropping worth of a coin to 1 uristbuck when you take it to another area.

here's 3 different types of CORPSE EXPLOSION spells have fun including them since most of them are test of the flow mechanics.


Code: [Select]
{name="corpse piece explosion",f=function (unit_list,pos)
  local items={}
  for _,checked_item in pairs(df.global.world.items.all) do --actually you could iterate over only corpse pieces... But i'm too lazy
    if df.item_corpsepiecest:is_instance(checked_item) and checked_item.flags.on_ground then --add/remove more checks before then if you want to explode not ALL the corpses
      table.insert(items,checked_item) --add to the list of target items
    end
  end

if #items==0 then
print"no corpses"
else
  for k,v in pairs(items) do
  upos=copyall(v.pos)
  dfhack.timeout(100,"ticks",function() dfhack.maps.spawnFlow(upos,6,6,6,50000) end) --this spawns dragonfire after 100 ticks(you could change "100" to e.g. "math.random(0,1000)" for random timeouts)
  end
  end
      return true
end},
{name="corpse explosion",f=function (unit_list,pos,item_list)
  local items={}
  for _,checked_item in pairs(df.global.world.items.other.ANY_CORPSE) do --actually you could iterate over only corpse pieces... But i'm too lazy
    if checked_item.flags.on_ground then --add/remove more checks before then if you want to explode not ALL the corpses
      table.insert(items,checked_item) --add to the list of target items
    end
  end
if #items==0 then
    print"no corpses"
else
local Corp={}
local Corp=getcorpse(df.global.world.items.other.ANY_CORPSE)
  for k,v in pairs(Corp) do
local   upos=copyall(v.pos)
  print(k.."test")
  dfhack.timeout(10,"ticks",function() dfhack.maps.spawnFlow(upos,4,2,2,50000) end) --this spawns dragonfire after 100 ticks(you could change "100" to e.g. "math.random(0,1000)" for random timeouts)
  dfhack.timeout(50,"ticks",function() dfhack.maps.spawnFlow(upos,3,2,11,50000) end) --this spawns dragonfire after 100 ticks(you could change "100" to e.g. "math.random(0,1000)" for random timeouts)
  dfhack.timeout(60,"ticks",function() dfhack.maps.spawnFlow(upos,3,2,11,50000) end) --this spawns dragonfire after 100 ticks(you could change "100" to e.g. "math.random(0,1000)" for random timeouts)
  dfhack.timeout(70,"ticks",function() dfhack.maps.spawnFlow(upos,3,2,11,50000) end) --this spawns dragonfire after 100 ticks(you could change "100" to e.g. "math.random(0,1000)" for random timeouts)
  dfhack.timeout(80,"ticks",function() dfhack.maps.spawnFlow(upos,3,2,11,50000) end) --this spawns dragonfire after 100 ticks(you could change "100" to e.g. "math.random(0,1000)" for random timeouts)
  end
  end
        return true
end},
{name="Mega Corpse-Explosion",f=function (unit_list)
  local items={}
  for _,checked_item in pairs(df.global.world.items.other.ANY_CORPSE) do --actually you could iterate over only corpse pieces... But i'm too lazy
    if checked_item.flags.on_ground then --add/remove more checks before then if you want to explode not ALL the corpses
      table.insert(items,checked_item) --add to the list of target items
    end
  end
if #items==0 then
    print"no corpses"
else
local Corp={}
local Corp=getcorpse(df.global.world.items.other.ANY_CORPSE)
  for k,v in pairs(Corp) do
local   upos=copyall(v.pos)
  print(k.."test")
  dfhack.timeout(10,"ticks",function() dfhack.maps.spawnFlow(upos,4,2,2,50000) end) --this spawns dragonfire after 100 ticks(you could change "100" to e.g. "math.random(0,1000)" for random timeouts)
  dfhack.timeout(50,"ticks",function() dfhack.maps.spawnFlow(upos,3,2,11,50000) end) --this spawns dragonfire after 100 ticks(you could change "100" to e.g. "math.random(0,1000)" for random timeouts)
  dfhack.timeout(60,"ticks",function() dfhack.maps.spawnFlow(upos,3,2,11,50000) end) --this spawns dragonfire after 100 ticks(you could change "100" to e.g. "math.random(0,1000)" for random timeouts)
  dfhack.timeout(70,"ticks",function() dfhack.maps.spawnFlow(upos,9,2,11,50000) end) --this spawns dragonfire after 100 ticks(you could change "100" to e.g. "math.random(0,1000)" for random timeouts)
  dfhack.timeout(70,"ticks",function() dfhack.maps.spawnFlow(upos,10,2,11,50000) end) --this spawns dragonfire after 100 ticks(you could change "100" to e.g. "math.random(0,1000)" for random timeouts)
  dfhack.timeout(70,"ticks",function() dfhack.maps.spawnFlow(upos,11,2,11,50000) end) --this spawns dragonfire after 100 ticks(you could change "100" to e.g. "math.random(0,1000)" for random timeouts)
  dfhack.timeout(70,"ticks",function() dfhack.maps.spawnFlow(upos,12,2,11,50000) end) --this spawns dragonfire after 100 ticks(you could change "100" to e.g. "math.random(0,1000)" for random timeouts)
  dfhack.timeout(70,"ticks",function() dfhack.maps.spawnFlow(upos,8,2,11,50000) end) --this spawns dragonfire after 100 ticks(you could change "100" to e.g. "math.random(0,1000)" for random timeouts)
  dfhack.timeout(10,"ticks",function() dfhack.maps.spawnFlow(upos,8,2,11,50000) end) --this spawns dragonfire after 100 ticks(you could change "100" to e.g. "math.random(0,1000)" for random timeouts)
  dfhack.timeout(15,"ticks",function() dfhack.maps.spawnFlow(upos,8,2,10,50000) end) --this spawns dragonfire after 100 ticks(you could change "100" to e.g. "math.random(0,1000)" for random timeouts)
  dfhack.timeout(20,"ticks",function() dfhack.maps.spawnFlow(upos,8,3,14,50000) end) --this spawns dragonfire after 100 ticks(you could change "100" to e.g. "math.random(0,1000)" for random timeouts)
  dfhack.timeout(25,"ticks",function() dfhack.maps.spawnFlow(upos,8,4,16,50000) end) --this spawns dragonfire after 100 ticks(you could change "100" to e.g. "math.random(0,1000)" for random timeouts)
  dfhack.timeout(30,"ticks",function() dfhack.maps.spawnFlow(upos,8,5,18,50000) end) --this spawns dragonfire after 100 ticks(you could change "100" to e.g. "math.random(0,1000)" for random timeouts)
  dfhack.timeout(90,"ticks",function() dfhack.maps.spawnFlow(upos,13,5,18,50000) end) --this spawns dragonfire after 100 ticks(you could change "100" to e.g. "math.random(0,1000)" for random timeouts)
  dfhack.timeout(90,"ticks",function() dfhack.maps.spawnFlow(upos,15,5,18,50000) end) --this spawns dragonfire after 100 ticks(you could change "100" to e.g. "math.random(0,1000)" for random timeouts)
  dfhack.timeout(80,"ticks",function() dfhack.maps.spawnFlow(upos,7,2,11,50000) end) --this spawns dragonfire after 100 ticks(you could change "100" to e.g. "math.random(0,1000)" for random timeouts)
  end
  end
        return true
end},

« Last Edit: March 23, 2013, 07:14:44 am by Rumrusher »
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

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: DFHack 0.34.11 r3
« Reply #3398 on: March 23, 2013, 10:54:27 am »

I have a quick question about truetransform.

If I transformed a creature A using truetransform into creature B... can I still transform creature B into creature C for a short time, using a normal transformation, with START:0:END:1000 ? Can a truetransformed creature still be normally targeted by transformations that dont use truetransform?
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 :::

expwnent

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3399 on: March 23, 2013, 01:05:58 pm »

I have a quick question about truetransform.

If I transformed a creature A using truetransform into creature B... can I still transform creature B into creature C for a short time, using a normal transformation, with START:0:END:1000 ? Can a truetransformed creature still be normally targeted by transformations that dont use truetransform?

Yes. Once the true transformation completes, it will be just like they had always been whatever they transformed into.
Logged

Lycaeon

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3400 on: March 23, 2013, 01:14:24 pm »

There's a bug with the autosyndrome plugin in which the reaction will affect one creature other than the worker if it's also in the workshop, even with \WORKER_ONLY appended to the material. I've mitigated this with SYN_AFFECTED_CREATURE, but it's impossible to make a syndrome that only affects the worker otherwise.

Here's the code for an example inorganic material I used (IS_STONE and 9000 boiling point is in the material template).

Code: [Select]
[INORGANIC:DESIGNATE_HEALING]
[USE_MATERIAL_TEMPLATE:LIGHT3_TEMPLATE]
[PREFIX:NONE]
[SYNDROME]
[SYN_CLASS:\WORKER_ONLY]
[SYN_NAME:designator]
[SYN_AFFECTED_CREATURE:PONY_STABLE:ALL]
[CE_SPEED_CHANGE:SPEED_PERC:1:START:0:END:600]
[CE_CAN_DO_INTERACTION:START:0:END:600]
[CDI:INTERACTION:DESIGNATE_HEALING]
[CDI:ADV_NAME:designate patient]
[CDI:TARGET:A:LINE_OF_SIGHT]
[CDI:TARGET_RANGE:A:5]
[CDI:MAX_TARGET_NUMBER:A:1]
[CDI:TARGET_VERB:are designated for healing:is designated for healing]
[CDI:WAIT_PERIOD:900]
[CDI:FREE_ACTION]

Also, the DFhack command window often displays Line 284: Couldn’t find unit -1. It's not in red, and so far doesn't seem to have an effect on gameplay, but it spams the window.

Thank you expwnent for your excellent plugins. Trutransformation is also awesome! :D
« Last Edit: March 23, 2013, 01:16:32 pm by Lycaeon »
Logged
“I want to calm the storm, but the war is in your eyes.
How can I shield you from the horror and the lies?
When all that once held meaning is shattered, ruined, bleeding
And the whispers in the darkness tell me we won’t survive?”

Timeless Bob

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3401 on: March 23, 2013, 01:17:34 pm »

I suppose that not relying on the shops at all, but just copying the list of wagon stuff into a quick file then sticking it into the inventory of trader's goods once they hit the Depot might be a work-around (to get past the "I can't carry that much" problem).  Make it a workshop reaction using the Depot as a workshop, for instance.  (By the way, I don't know what's possible or impossible, so this is all in "wouldn't this be neat" territory.)

Of course, if your Depot also uploaded a list of items a trader was removing during fort mode and saved the game at the point that they left, that could be used as a departure point for a new adventurer and wagon who would need to bear a copy of that inventory elsewhere.  Might be another nice way to tie the fort and adventure mode systems together.
« Last Edit: March 23, 2013, 01:20:02 pm by Timeless Bob »
Logged
L33tsp34k does to English what Picasso did to faces.

Dwarfopoly
The Luckiest Tourist EVER
Bloodlines of the Forii

expwnent

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3402 on: March 23, 2013, 03:02:42 pm »

There's a bug with the autosyndrome plugin in which the reaction will affect one creature other than the worker if it's also in the workshop, even with \WORKER_ONLY appended to the material. I've mitigated this with SYN_AFFECTED_CREATURE, but it's impossible to make a syndrome that only affects the worker otherwise.

Here's the code for an example inorganic material I used (IS_STONE and 9000 boiling point is in the material template).

Code: [Select]
[INORGANIC:DESIGNATE_HEALING]
[USE_MATERIAL_TEMPLATE:LIGHT3_TEMPLATE]
[PREFIX:NONE]
[SYNDROME]
[SYN_CLASS:\WORKER_ONLY]
[SYN_NAME:designator]
[SYN_AFFECTED_CREATURE:PONY_STABLE:ALL]
[CE_SPEED_CHANGE:SPEED_PERC:1:START:0:END:600]
[CE_CAN_DO_INTERACTION:START:0:END:600]
[CDI:INTERACTION:DESIGNATE_HEALING]
[CDI:ADV_NAME:designate patient]
[CDI:TARGET:A:LINE_OF_SIGHT]
[CDI:TARGET_RANGE:A:5]
[CDI:MAX_TARGET_NUMBER:A:1]
[CDI:TARGET_VERB:are designated for healing:is designated for healing]
[CDI:WAIT_PERIOD:900]
[CDI:FREE_ACTION]

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

This will be fixed in the next version.

Also, the DFhack command window often displays Line 284: Couldn’t find unit -1. It's not in red, and so far doesn't seem to have an effect on gameplay, but it spams the window.

I'm pretty sure I already fixed this for the next release. Does it say a file name?
Logged

Lycaeon

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3403 on: March 23, 2013, 03:14:16 pm »

It mentioned the autosyndrome plugin and the DFhack file, but nothing else.

Thanks! :) When can we expect the new version?
Logged
“I want to calm the storm, but the war is in your eyes.
How can I shield you from the horror and the lies?
When all that once held meaning is shattered, ruined, bleeding
And the whispers in the darkness tell me we won’t survive?”

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: DFHack 0.34.11 r3
« Reply #3404 on: March 23, 2013, 04:23:02 pm »

@expwnent: That is very, very good news. Otherwise I would have hade to rewrite ~300 transformations. ^^ But it seems that all is good. The modding can commence. Thank you. :)
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 ... 225 226 [227] 228 229 ... 373