Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 248 249 [250] 251 252 ... 373

Author Topic: DFHack 0.34.11 r3  (Read 1043668 times)

PeridexisErrant

  • Bay Watcher
  • Dai stihˇ, Hrasht.
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3735 on: May 15, 2013, 06:22:01 am »

How difficult would it be to add an option for the init file for the game and hack windows?  For example - starting the DF window maximised and on top, so that I wouldn't have to shuffle and resize each time but could just get straight into the game. 

I ask because to the pack for newbs in my sig, where an option that makes it clear which window to use first would be rather useful - as part of a general program which includes the LNP gui enabling minimized/maximized launch, the game would fill the screen with soundsense and dfhack minimized.  (utilities can now auto-launch with the latest LNP)

Is this possible?  Not going to happen?  Coming in a specific timeframe?


ps - PTW an awesome tool
Logged
I maintain the DF Starter Pack - over a million downloads and still counting!
 Donations here.

Sutremaine

  • Bay Watcher
  • [ETHIC:ATROCITY: PERSONAL_MATTER]
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3736 on: May 15, 2013, 08:24:37 am »

the above script prevents all civilizations in the world from bringing blood, ichor, and "liquid" barrels in caravans. If used before embark (at the screen where you choose your site location), it prevents you from being able to embark with barrels of blood, considerably shortening the extracts list.
How do you use it? I've got blooddel.lua in the plugins folder, but I can't tell if it's done anything because I don't have a trade agreement to look at. I've looked at the lua section of the readme, but while I can run the file I can't do anything with it.
Logged
I am trying to make chickens lay bees as eggs. So far it only produces a single "Tame Small Creature" when a hen lays bees.
Honestly at the time, I didn't see what could go wrong with crowding 80 military Dwarves into a small room with a necromancer for the purpose of making bacon.

scamtank

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3737 on: May 15, 2013, 10:41:48 am »

How do you use it? I've got blooddel.lua in the plugins folder, but I can't tell if it's done anything because I don't have a trade agreement to look at. I've looked at the lua section of the readme, but while I can run the file I can't do anything with it.

No, you put it in the \hack\scripts folder. Then you can run the command "blooddel" while you're hanging around in the site selection screen. If it worked, your embark preparations menu should have nothing but syrup, milk and poison available in the Extracts category.
Logged

Kurik Amudnil

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3738 on: May 15, 2013, 12:06:38 pm »

also found unit.flags1.zombie .  I don't know how I missed that one before, but strangely these "Corpse" are flags1.zombie == false.
on another note:  unit.flags3.unk21 == missing

That zombie flag is obsolete and not used any more. Also, if you mean discovered/not discovered death, it is stored in a completely different object.

its good to know that flags1.zombie is obsolete.

As for flags3.unk21, it appears to only be true when a person is missing such as when my miner burned to death channeling a magma hole.  Yes it probably parallels discovered/not discovered death.  At the moment, said miner is the only missing unit in my fort, and is the only unit in units.all that has unk21 == true.

*edit:  i suppose I am jumping to conclusions since it just occurred to me that it might represent being on fire instead

**edit:  setting units on fire didn't do it, at least not right away, but units in the smoke cloud seem to be getting the flag after a time.  Some wounded/bleeding, some not.  Will need to see if the flag gets set when walking through miasma or other cloud
« Last Edit: May 15, 2013, 01:08:23 pm by Kurik Amudnil »
Logged

Mr S

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3739 on: May 15, 2013, 01:13:45 pm »

If a creature is lost in a cloud of smoke and not seen for X time, are they counted as missing?

Also, the flames are by tissue/object, not the entire entity.  The dorfs in question eventually die of blood loss currently.
Logged

Sutremaine

  • Bay Watcher
  • [ETHIC:ATROCITY: PERSONAL_MATTER]
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3740 on: May 15, 2013, 02:31:21 pm »

No, you put it in the \hack\scripts folder. Then you can run the command "blooddel" while you're hanging around in the site selection screen.
Cool, thanks.
Logged
I am trying to make chickens lay bees as eggs. So far it only produces a single "Tame Small Creature" when a hen lays bees.
Honestly at the time, I didn't see what could go wrong with crowding 80 military Dwarves into a small room with a necromancer for the purpose of making bacon.

Kurik Amudnil

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3741 on: May 15, 2013, 03:29:06 pm »

If a creature is lost in a cloud of smoke and not seen for X time, are they counted as missing?

Also, the flames are by tissue/object, not the entire entity.  The dorfs in question eventually die of blood loss currently.

I believe that a unit can only go missing if they die without a witness.  I would like to verify that though.

Urist Da Vinci

  • Bay Watcher
  • [NATURAL_SKILL: ENGINEER:4]
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3742 on: May 16, 2013, 12:19:04 am »

OK, so I changed the dwarven civ to only have elves as wagon-pullers by editing the relevant vector, and the caravan just arrived being pulled by elves. I didn't have to give the elves any of the tokens that normally causes this. Other amusing things are probably possible by editing the list of resources that a civilization can bring to your fort.

gchristopher

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r2
« Reply #3743 on: May 16, 2013, 12:20:05 am »

Question about makeown:

I used it on a dwarven caravan guard, but he's not listed as a citizen or member of anything (no blue text in his description). I can force him into a squad using DT and he'll follow station orders, but he won't go and train or put on a uniform, or in fact any clothes at all. He was wearing them at one point, but then dropped everything when I forced him into a squad. Removing him from the squad via DT doesn't make him wear anything either.

Is there any way of making him a full member of the fortress, or does makeown only work for making civilians?
We were trying to make this work over in the ☼Masterwork Succession Fortress: Exultationhexxed☼ game, because migration never started beyond the hardcoded waves. 

Here's my current attempt to supplement tweak makeown by creating a new historical figure record. It's still clearly incomplete.

Code: [Select]
function find_entity(id)
  for ii = 0,#df.global.world.entities.all - 1 do
    if df.global.world.entities.all[ii].id == id then
      return ii
    end
  end
  return -1
end

function create_hist_fig(unit)
  if unit.flags1.important_historical_figure == true then
    print("Already a historical figure.")
    return
  end
 
  new_fig_id = df.global.hist_figure_next_id

  new_hist_fig = df.historical_figure:new()
  new_hist_fig.profession = unit.profession
  new_hist_fig.race = unit.race
  new_hist_fig.caste = unit.caste
  new_hist_fig.sex = unit.sex
  new_hist_fig.appeared_year = unit.relations.birth_year
  new_hist_fig.born_year = unit.relations.birth_year
  new_hist_fig.born_seconds = unit.relations.birth_time
  new_hist_fig.curse_year = unit.relations.curse_year
  new_hist_fig.curse_seconds = unit.relations.curse_time
  new_hist_fig.anon_1 = unit.relations.anon_2
  new_hist_fig.anon_2 = unit.relations.anon_3
  new_hist_fig.old_year = unit.relations.old_year
  new_hist_fig.old_seconds = unit.relations.old_time
  new_hist_fig.died_year = -1
  new_hist_fig.died_seconds = 1
  new_hist_fig.name:assign(unit.name)
  new_hist_fig.civ_id = unit.civ_id
  new_hist_fig.population_id  = unit.population_id
  new_hist_fig.breed_id = -1
  new_hist_fig.unit_id = unit.id
  new_hist_fig.id = new_fig_id
 
  civ_link = df.histfig_entity_link_memberst:new()
  civ_link.entity_id = df.global.ui.civ_id
  civ_link.link_strength =  100
 
  fort_link = df.histfig_entity_link_memberst:new()
  fort_link.entity_id = df.global.ui.group_id
  fort_link.link_strength =  100
 
  new_hist_fig.entity_links:insert('#', civ_link)
  new_hist_fig.entity_links:insert('#', fort_link)
 
  df.global.world.history.figures:insert('#', new_hist_fig)
  df.global.hist_figure_next_id = df.global.hist_figure_next_id + 1
 
  unit.flags1.important_historical_figure = true
  unit.flags2.important_historical_figure = true
  unit.hist_figure_id = new_fig_id
  unit.hist_figure_id2 = new_fig_id
 
  newhist_loc = df.global.world.history.figures[#df.global.world.history.figures - 1]
 
  df.global.ui.main.fortress_entity.histfig_ids:insert('#', new_fig_id)
  df.global.ui.main.fortress_entity.hist_figures:insert('#', newhist_loc)
 
  civ_index = find_entity(df.global.ui.main.fortress_entity.entity_links[0].target)
  df.global.world.entities.all[civ_index].histfig_ids:insert('#', new_fig_id)
  df.global.world.entities.all[civ_index].hist_figures:insert('#', newhist_loc)
end

unit = dfhack.gui.getSelectedUnit()
create_hist_fig(unit)
The guards, when converted, will:
- show up in Dwarf Therapist (because their histfig's are listed for the fortress entity)
- can set and will obey labor preferences
- claim bedrooms
- have strange moods
- join squads (not lead them)
- equip uniforms and weapons as soldiers
- go to training
- obey squad orders to attack, move, etc.

The game doesn't seem to break, and in particular, it will keep creating more historical entities without complaint. (Thanks, Ag!)

The biggest problem is noble assignments and squad leadership. They show up in the list to be made a noble, but once you exit the window, the position remains unfilled.

I think that's an improvement over just tweak makeown, but doesn't do everything necessary to truly add the dwarf to the fortress.
Logged

scriver

  • Bay Watcher
  • City streets ain't got much pity
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3744 on: May 16, 2013, 04:20:02 am »

or use this: https://github.com/jjyg/dfhack/blob/master/scripts/startdwarf.rb
(paste it into startdwarf.rb in scripts dir)

Thanks, I'll try that.
Logged
Love, scriver~

Urist Da Vinci

  • Bay Watcher
  • [NATURAL_SKILL: ENGINEER:4]
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3745 on: May 16, 2013, 09:38:20 pm »

There was some interest in a lua script that would make the player's civ (dwarven civ) bring barrels of clean water. This also allows you to embark with barrels of water[5]. Dwarves WON'T drink the water directly from the barrel, so modders have to write a reaction for a workshop (say, the still) which transfers the water from the barrels to buckets. Possibly useful for some harsh embarks.

Code: [Select]
local my_entity=df.historical_entity.find(df.global.ui.civ_id)
my_entity.resources.misc_mat.extracts.mat_type:insert(#my_entity.resources.misc_mat.extracts.mat_type,6)
my_entity.resources.misc_mat.extracts.mat_index:insert(#my_entity.resources.misc_mat.extracts.mat_index,0)

Attempting to embark with barrels of magma didn't work, as all I got were barrels full of cold solid material. It appears that all embark materials appear at room temperature.

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: DFHack 0.34.11 r3
« Reply #3746 on: May 16, 2013, 10:25:43 pm »

Urist Da Vinci: I once tried adding poisonous giant mushrooms to the first cavern. You cant distinguish them from the other giant mushroom trees, but when felled they generated an evaporating log that had a slightly-harmful syndrome attached.

In short, cutting mushrooms in the caverns had a little danger attached to it.

The problem I encountered is that the wagon, any wooden embark item, and any wooden caravan item has a chance to consist of this wood. The caravan appears on the map, the wood evaporates, caravans is affected and turns around. Or you wagon deconstructs at embark, same for barrels holding your booze.

Question: Can your script remove this specific wood from a civs embark/trading, so that I can add poisonous mushrooms back into the caverns?
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 :::

Hommit

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3747 on: May 17, 2013, 08:37:52 am »

can someone make script (or point me to tutorial and example) to make hotkey actions on gem stockpile to allow|forbid only certain types of gems according to their value (Ornamental/Semi-Precious/Precious/Rare according to http://dwarffortresswiki.org/index.php/DF2012:Gem) ?
(not really sire if belongs here, point me if i wrong plz, thx)
Logged

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: DFHack 0.34.11 r3
« Reply #3748 on: May 17, 2013, 10:01:36 am »

There isn't actually any in-game designation for ornamental/semi/precious/rare - all you have is the material value, which is enough for the stock raws (all ornamental gems are value 2-10, semi-precious are value 15-30, precious are value 40, and rare are value 60).

Those categories actually existed back in the old 2D versions (0.23.130.23a and earlier), where they were used to determine how deep into the mountain they were placed and were also the only way to restrict stockpiling of them (i.e. it was impossible to have a stockpile which only stored rock crystals - no matter what, you would also get turquoises, aventurines, and rose quartzes).
« Last Edit: May 17, 2013, 10:04:25 am by Quietust »
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.

Hommit

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3749 on: May 17, 2013, 12:37:49 pm »

So there isn't any easy way to designate stockpile to certain value-types of gems? this is really sucks(
Logged
Pages: 1 ... 248 249 [250] 251 252 ... 373