Bay 12 Games Forum

Please login or register.

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

Author Topic: DFHack 0.34.11 r3  (Read 1042973 times)

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: DFHack 0.34.11 r3
« Reply #3705 on: May 10, 2013, 06:35:43 pm »

Sutremaine: DwarfMonitor.dll, see falconnes utilitiy plugins. http://www.bay12forums.com/smf/index.php?topic=119575.0
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 :::

Rumrusher

  • Bay Watcher
  • current project : searching...
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3706 on: May 11, 2013, 02:53:37 pm »

welp, looks like freenode just up and died, is there another way to get access to dfhack chat?
so testing the marry script and found that line 60 can't write field histfig_hf_spousest.anon1 due to it's not found...
« Last Edit: May 11, 2013, 02:57:34 pm 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

Sutremaine

  • Bay Watcher
  • [ETHIC:ATROCITY: PERSONAL_MATTER]
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3707 on: May 11, 2013, 04:35:04 pm »

Sutremaine: DwarfMonitor.dll, see falconnes utilitiy plugins. http://www.bay12forums.com/smf/index.php?topic=119575.0
Ooh, that's a nice set of plugins. 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.

TDarksword

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3708 on: May 11, 2013, 06:44:57 pm »

Is it possible to use DFhack to change which civilisation of a race is your trading partner?
Logged

drayath

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3709 on: May 12, 2013, 09:33:00 am »

Bug Report:

Registering for the JOB_COMPLETED event seem to behaviour incorrectly for repeated jobs, in that while the job is on repeat the callback method is not called.

Testing with autosyndrome (with some logging added)

Registers with
    EventManager::EventHandler handle(processJob, 5);
    EventManager::registerListener(EventManager::EventType::JOB_COMPLETED, handle, plugin_self);

Print statement as the first line of processJob(...) is only appears to be called when a none-repeating job completes.
Logged
Drayath's Gem Splitting Workshop - Split large gems and gem trinkets into numbers of small gems.
Drayath's Seed Brewery - Convert bags of spare seeds into useful booze.

expwnent

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3710 on: May 12, 2013, 09:53:57 am »

Thanks! I'll fix that for the next version.
Logged

drayath

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3711 on: May 12, 2013, 11:16:49 am »

While i remeber here are some unk_XXX's that i have identified in the syndrome classes.

Spoiler (click to show/hide)
Logged
Drayath's Gem Splitting Workshop - Split large gems and gem trinkets into numbers of small gems.
Drayath's Seed Brewery - Convert bags of spare seeds into useful booze.

Urist Da Vinci

  • Bay Watcher
  • [NATURAL_SKILL: ENGINEER:4]
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3712 on: May 12, 2013, 12:06:03 pm »

This lua script dumps a list of the extracts that the player's civ can bring in trade
Code: (lua script) [Select]
local my_entity=df.historical_entity.find(df.global.ui.civ_id)

printall(my_entity.resources.misc_mat.extracts.mat_type)
print(" ")
printall(my_entity.resources.misc_mat.extracts.mat_index)

Example output:
Spoiler: hidden for length (click to show/hide)

I can't figure out how to:
a) Identify the materials, given the type and index
b) Delete items from the list, to prevent civs from bringing blood, ichor, etc. but allow "nice" extracts such as milk

Ideally, a script would purge all entities in the world from being able to bring blood, ichor, etc.

drayath

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3713 on: May 12, 2013, 12:29:09 pm »

Try having a look at the \hack\ruby\material.rb file

Converts a material type and material id to a token (unless you find a better solution might need to either convert it to lua or write your script in ruby)

E.g. material = df.decode_mat(id, type )
Logged
Drayath's Gem Splitting Workshop - Split large gems and gem trinkets into numbers of small gems.
Drayath's Seed Brewery - Convert bags of spare seeds into useful booze.

Urist Da Vinci

  • Bay Watcher
  • [NATURAL_SKILL: ENGINEER:4]
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3714 on: May 12, 2013, 01:02:54 pm »

Try having a look at the \hack\ruby\material.rb file

Converts a material type and material id to a token (unless you find a better solution might need to either convert it to lua or write your script in ruby)

E.g. material = df.decode_mat(id, type )

OK so now I have my original lua script:
Code: (lua script) [Select]
local my_entity=df.historical_entity.find(df.global.ui.civ_id)

printall(my_entity.resources.misc_mat.extracts.mat_type)
print(" ")
printall(my_entity.resources.misc_mat.extracts.mat_index)

and a ruby script which I manually edit to get the material ID:
Code: [Select]
puts df.decode_mat(422,43)If I use 422,43 I get PLANT_MAT:POD_SWEET:EXTRACT
If I use (43,558) or some of the other (type,index) values from my first list, I get things like CREATURE_MAT:BOBCAT:BLOOD

I don't know ruby (yet), so I don't get how to find and delete all of the BLOOD items.

expwnent

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3715 on: May 12, 2013, 01:17:04 pm »

https://github.com/expwnent/dfhack/blob/f92e859f499105abfbb40d008189bc36e88323f5/Readme.rst#mod-interaction

I have (finally) written the documentation for the NEXT version of autoSyndrome/syndromeTrigger. The rules are slightly different from the way they are now, but they make more sense this way and should only require minimal changes. The main changes: boiling temperature is now ignored, you need to have a \AUTO_SYNDROME tag, and instead of \WORKER_ONLY, there's \ALLOW_NONWORKER_TARGETS, which does the opposite of what \WORKER_ONLY did (it makes more sense for worker only to be the default).

The short version: autoSyndrome allows you to instantly attach syndromes to units with custom building reactions. syndromeTrigger lets you trigger commands or do true transformations whenever a unit becomes afflicted with a syndrome, regardless of the cause of the syndrome. It should work whether it's from "natural causes", an interaction, autoSyndrome, and hopefully even for itemsyndrome.

edit: also, both autoSyndrome and syndromeTrigger are disabled by default to help FPS for those who don't need it. It is recommended that if you want to use them you add the following to your dfhack.init file:

Code: [Select]
autoSyndrome enable
syndromeTrigger enable
« Last Edit: May 12, 2013, 01:22:30 pm by expwnent »
Logged

scriver

  • Bay Watcher
  • City streets ain't got much pity
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3716 on: May 12, 2013, 02:26:45 pm »

So, since I can't find any clear answer anywhere. Is there currently any way to change the number of embarking dwarf with this?
Logged
Love, scriver~

drayath

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3717 on: May 12, 2013, 03:03:30 pm »

https://github.com/expwnent/dfhack/blob/f92e859f499105abfbb40d008189bc36e88323f5/Readme.rst#mod-interaction

I have (finally) written the documentation for the NEXT version of autoSyndrome/syndromeTrigger. The rules are slightly different from the way they are now, but they make more sense this way and should only require minimal changes. The main changes: boiling temperature is now ignored, you need to have a \AUTO_SYNDROME tag, and instead of \WORKER_ONLY, there's \ALLOW_NONWORKER_TARGETS, which does the opposite of what \WORKER_ONLY did (it makes more sense for worker only to be the default).

Could i make a request for a tag to:
A) Tell it to not apply the syndrome if it is already present.
B) Tell it to reset the duration on the syndrome if it already exists, rrather than applying a second copy, or using the above option to block it entirly

I am just testing something with the existing code
Spoiler (click to show/hide)
Logged
Drayath's Gem Splitting Workshop - Split large gems and gem trinkets into numbers of small gems.
Drayath's Seed Brewery - Convert bags of spare seeds into useful booze.

expwnent

  • Bay Watcher
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3718 on: May 12, 2013, 03:54:13 pm »

Sounds simple enough. I can add that.
Logged

Urist Da Vinci

  • Bay Watcher
  • [NATURAL_SKILL: ENGINEER:4]
    • View Profile
Re: DFHack 0.34.11 r3
« Reply #3719 on: May 12, 2013, 08:46:49 pm »

SUCCESS! I managed to make the dwarf caravan come without bringing any blood barrels - actually it only brought alcohol and dwarven syrup since I resized the vector of the extract trade data to 1 and the syrup was the first entry. The data change persists across saving, quitting, and loading the game.

The concept works, but I need a way to only remove the entries that are for BLOOD, ICHOR, and GOO. Maybe there is a way to remove entries and make the list shorter? I know if you set the values in the list to -1, you will get "liquid" barrels.

If this was implemented as a DFHack tweak, it would be irreversible once done, not something you could toggle on and off.
Pages: 1 ... 246 247 [248] 249 250 ... 373