Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 265 266 [267] 268 269 ... 360

Author Topic: DFHack 0.43.03-r1  (Read 1122920 times)

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r5
« Reply #3990 on: March 16, 2016, 10:07:27 pm »

"if script.env == _ENV" might work too. I don't know if there is a way, although I could easily expose "path" and "script" to scripts, say as "_PATH", "__path", "__path__", etc.. That obviously won't work in existing DFHack versions, though, so I'm not sure if adding that would be helpful for you currently. (That is a pretty good way to find the script's path, though.)
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.

TheFlame52

  • Bay Watcher
  • Certified geezer & only man to win 0.40.24
    • View Profile
Re: DFHack 0.40.24-r5
« Reply #3991 on: March 19, 2016, 02:35:24 pm »

Is there an updated tool for exporting generated raws?

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r5
« Reply #3992 on: March 19, 2016, 05:08:46 pm »

A DFHack tool or an external one?
If you're looking to edit generated raws, that's actually pretty easy to do in-game with DFHack (e.g. "gui/gm-editor df.global.world.raws"), although you should definitely make backups if you're trying 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.

expwnent

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r5
« Reply #3993 on: March 19, 2016, 06:28:03 pm »

I think he means things like forgotten beasts.
Logged

TheFlame52

  • Bay Watcher
  • Certified geezer & only man to win 0.40.24
    • View Profile
Re: DFHack 0.40.24-r5
« Reply #3994 on: March 19, 2016, 06:38:44 pm »

I just want to look at demon syndromes, but you have the right idea.

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r5
« Reply #3995 on: March 19, 2016, 06:54:00 pm »

I think he means things like forgotten beasts.
Yeah, that's what I meant. Assuming their raws are in world.raws, that would be a way of editing them in-game.

If you just want to export them, they're embedded somewhere in world.dat or world.sav. I'm not aware of tools that can decompress and extract raws from those files, but Andux's save tools might be able to. (They're Windows-only, as I recall, although I've been thinking of writing a cross-platform replacement in Go or something.)
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.

TheFlame52

  • Bay Watcher
  • Certified geezer & only man to win 0.40.24
    • View Profile
Re: DFHack 0.40.24-r5
« Reply #3996 on: March 19, 2016, 07:26:12 pm »

Andux hasn't updated those tools since 2012. What about export-generated-raws, which is what I used in 0.40?

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r5
« Reply #3997 on: March 19, 2016, 07:34:54 pm »

If it worked in 0.40, it should still work - I don't think the compressed raw format has changed at all. If it has, Andux is still around.
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.

TheFlame52

  • Bay Watcher
  • Certified geezer & only man to win 0.40.24
    • View Profile
Re: DFHack 0.40.24-r5
« Reply #3998 on: March 19, 2016, 08:28:37 pm »

I'll try it. I'm doing research for writing class and I want to see how a particular demon's poison works so I can write it accurately.

EDIT: I can't get it to work, it just crashes instantly after opening. All the files do. I'm on windows.
« Last Edit: March 19, 2016, 08:39:29 pm by TheFlame52 »
Logged

Greiger

  • Bay Watcher
  • Reptilian Illuminati member. Keep it secret.
    • View Profile
Re: DFHack 0.40.24-r5
« Reply #3999 on: March 20, 2016, 01:12:15 am »

Maybe I'm misunderstanding but I still seem to be able to see generated creature raws just by loading up world.sav in a text editor.  Only issue is that the save needs to be uncompressed, which I think you can do in an existing world by just setting the uncompressed saves init option, loading a world and then re-saving.

It's a little bit of a slog finding exactly the right creature, and it's not as nicely formatted as the actual raws, but they are there. 
If you try this method I would recommend copying some lines from the description and trying to do a find in the file.  the generated raws are all plain text in the file. including a [DESCRIPTION:x] flag.  So trying to find a relatively unique line from the description should locate it.

Oh and don't try to edit anything in that file, yer save will probably break.  Even though there is plain text in the file, most of it is still not text formatted, and at least in my experience text editors fail to format everything right after an edit.
« Last Edit: March 20, 2016, 01:19:52 am by Greiger »
Logged
Disclaimer: Not responsible for dwarven deaths from the use or misuse of this post.
Quote
I don't need friends!! I've got knives!!!

TheFlame52

  • Bay Watcher
  • Certified geezer & only man to win 0.40.24
    • View Profile
Re: DFHack 0.40.24-r5
« Reply #4000 on: March 20, 2016, 08:07:07 am »

I've never been able to, even on an uncompressed save.

Greiger

  • Bay Watcher
  • Reptilian Illuminati member. Keep it secret.
    • View Profile
Re: DFHack 0.40.24-r5
« Reply #4001 on: March 20, 2016, 11:06:05 am »

Odd maybe it's a feature of notepad++ then.  *tries* *successfully finds  forgotten beast raws using builtin windows notepad* what kind of text editor are you using?  If windows notepad can pull these up successfully I imagine anything can.

Heck it looks like it contains raws for the random instruments now too.

It's pretty much just a matter of ignoring the garbage data and imagining each tag in it's own line.

Code: ( an example of a forgotten beast, straight copy and pasted from basic windows notepad) [Select]
[CREATURE:FORGOTTEN_BEAST_1] [GENERATED] [FEATURE_BEAST] [ATTACK_TRIGGER:0:0:50000]7 [NAME:forgotten beast:forgotten beasts:forgotten beast]= [CASTE_NAME:forgotten beast:forgotten beasts:forgotten beast] [NO_GENDER] [CARNIVORE] [DIFFICULTY:10] [NATURAL_SKILL:WRESTLING:6] [NATURAL_SKILL:BITE:6] [NATURAL_SKILL:GRASP_STRIKE:6] [NATURAL_SKILL:STANCE_STRIKE:6] [NATURAL_SKILL:MELEE_COMBAT:6] [NATURAL_SKILL:DODGING:6]' [NATURAL_SKILL:SITUATIONAL_AWARENESS:6] [AMPHIBIOUS] [BIOME:SUBTERRANEAN_CHASM] [PETVALUE:2000] [GRASSTRAMPLE:20] [BUILDINGDESTROYER:2] [ALL_ACTIVE] [SWIMS_INNATE] [TRAPAVOID] [NOPAIN] [NOSTUN]
 [NONAUSEA] [NOFEAR] [NOEXERT] [NO_DIZZINESS] [NO_FEVERS] [LARGE_PREDATOR] [SPHERE:CAVERNS] [SPHERE:DISEASE] [BODY_SIZE:0:0:10000000] [CREATURE_TILE:83]Á [BODY:RCP_CEPHALOTHORAX:RCP_ABDOMEN:RCP_FIRST_SIMPLE_LEGS:RCP_SECOND_SIMPLE_LEGS:RCP_THIRD_SIMPLE_LEGS:RCP_PINCERS:RCP_3_TAILS:RCP_1_EYE:RCP_HEART:RCP_GUTS:RCP_BRAIN:RCP_MOUTH:RCP_TAIL_STINGER]% [BODY_DETAIL_PLAN:STANDARD_MATERIALS] [REMOVE_MATERIAL:HAIR] [REMOVE_MATERIAL:SKIN]. [USE_MATERIAL_TEMPLATE:CHITIN:CHITIN_TEMPLATE]# [BODY_DETAIL_PLAN:STANDARD_TISSUES] [REMOVE_TISSUE:HAIR] [REMOVE_TISSUE:SKIN], [USE_TISSUE_TEMPLATE:CHITIN:CHITIN_TEMPLATE]> [BODY_DETAIL_PLAN:EXOSKELETON_TISSUE_LAYERS:CHITIN:FAT:MUSCLE]* [BODY_DETAIL_PLAN:STANDARD_HEAD_POSITIONS]* [BODY_DETAIL_PLAN:HUMANOID_HEAD_POSITIONS]$ [BODY_DETAIL_PLAN:HUMANOID_RELSIZES], [USE_MATERIAL_TEMPLATE:SINEW:SINEW_TEMPLATE]& [TENDONS:LOCAL_CREATURE_MAT:SINEW:200]( [LIGAMENTS:LOCAL_CREATURE_MAT:SINEW:200] [HAS_NERVES] [HOMEOTHERM:10040] [SELECT_MATERIAL:CHITIN]# [STATE_COLOR:ALL_SOLID:BURNT_UMBER]
 [COLOR:6:0:0]- [SELECT_TISSUE_LAYER:HEART:BY_CATEGORY:HEART], [PLUS_TISSUE_LAYER:SCALE:BY_CATEGORY:THROAT] [TL_MAJOR_ARTERIES], [USE_MATERIAL_TEMPLATE:ICHOR:ICHOR_TEMPLATE]' [BLOOD:LOCAL_CREATURE_MAT:ICHOR:LIQUID] [CREATURE_CLASS:GENERAL_POISON]8 [USE_MATERIAL_TEMPLATE:POISON:CREATURE_EXTRACT_TEMPLATE] [ENTERS_BLOOD]
 [SYNDROME] [SYN_NAME:beast sickness]# [SYN_AFFECTED_CLASS:GENERAL_POISON]+ [SYN_IMMUNE_CREATURE:FORGOTTEN_BEAST_1:ALL] [SYN_INJECTED]
 [SYN_CONTACT]
 [SYN_INHALED] [SYN_INGESTED]N [CE_PAIN:SEV:100:PROB:100:START:782:PEAK:1962:END:3858:LOCALIZED:SIZE_DILUTES]g [CE_IMPAIR_FUNCTION:SEV:100:PROB:100:START:551:PEAK:972:END:3508:BP:BY_CATEGORY:ALL:BRAIN:SIZE_DILUTES]+ [ATTACK:PINCER:BODYPART:BY_CATEGORY:PINCER] [ATTACK_SKILL:GRASP_STRIKE] [ATTACK_VERB:snatch:snatches] [ATTACK_CONTACT_PERC:100] [ATTACK_PENETRATION_PERC:100]  [ATTACK_PREPARE_AND_RECOVER:2:2] [ATTACK_FLAG_EDGE] [ATTACK_PRIORITY:MAIN] [ATTACK_FLAG_CANLATCH] [ATTACK_FLAG_WITH]% [ATTACK:KICK:BODYPART:BY_TYPE:STANCE] [ATTACK_SKILL:STANCE_STRIKE] [ATTACK_VERB:kick:kicks] [ATTACK_CONTACT_PERC:100]  [ATTACK_PREPARE_AND_RECOVER:2:2] [ATTACK_FLAG_WITH] [ATTACK_PRIORITY:MAIN] [ATTACK_FLAG_BAD_MULTIATTACK]+ [ATTACK:STING:BODYPART:BY_CATEGORY:STINGER] [ATTACK_SKILL:STANCE_STRIKE] [ATTACK_VERB:sting:stings] [ATTACK_CONTACT_PERC:5] [ATTACK_PENETRATION_PERC:100]  [ATTACK_PREPARE_AND_RECOVER:2:2] [ATTACK_FLAG_EDGE] [ATTACK_PRIORITY:MAIN]G [SPECIALATTACK_INJECT_EXTRACT:LOCAL_CREATURE_MAT:POISON:LIQUID:100:100]( [ATTACK:BITE:BODYPART:BY_CATEGORY:MOUTH] [ATTACK_SKILL:BITE] [ATTACK_VERB:bite:bites] [ATTACK_CONTACT_PERC:100]  [ATTACK_PREPARE_AND_RECOVER:2:2] [ATTACK_PRIORITY:MAIN] [ATTACK_FLAG_CANLATCH]] [GAIT:SWIM:Maximum Swim Speed:725:10:3:2175:50:LAYERS_SLOW:STRENGTH:AGILITY:STEALTH_SLOWS:50]V [GAIT:SWIM:Faster Swim:1450:5:3:2175:10:LAYERS_SLOW:STRENGTH:AGILITY:STEALTH_SLOWS:20]V [GAIT:SWIM:Fast Swim:2175:NO_BUILD_UP:5:LAYERS_SLOW:STRENGTH:AGILITY:STEALTH_SLOWS:10]# [GAIT:SWIM:Swim:2900:NO_BUILD_UP:0]( [GAIT:SWIM:Slow Swim:3900:NO_BUILD_UP:0], [GAIT:SWIM:Creeping Swim:5900:NO_BUILD_UP:0]V [GAIT:WALK:Fastest Walk:225:10:3:675:50:LAYERS_SLOW:STRENGTH:AGILITY:STEALTH_SLOWS:50]T [GAIT:WALK:Faster Walk:450:5:3:675:10:LAYERS_SLOW:STRENGTH:AGILITY:STEALTH_SLOWS:20]U [GAIT:WALK:Fast Walk:675:NO_BUILD_UP:5:LAYERS_SLOW:STRENGTH:AGILITY:STEALTH_SLOWS:10]" [GAIT:WALK:Walk:900:NO_BUILD_UP:0]( [GAIT:WALK:Slow Walk:1900:NO_BUILD_UP:0]+ [GAIT:WALK:Slowest Walk:2900:NO_BUILD_UP:0]S [GAIT:CRAWL:Scramble:225:10:3:675:50:LAYERS_SLOW:STRENGTH:AGILITY:STEALTH_SLOWS:50]V [GAIT:CRAWL:Faster Crawl:450:5:3:675:10:LAYERS_SLOW:STRENGTH:AGILITY:STEALTH_SLOWS:20]W [GAIT:CRAWL:Fast Crawl:675:NO_BUILD_UP:5:LAYERS_SLOW:STRENGTH:AGILITY:STEALTH_SLOWS:10]$ [GAIT:CRAWL:Crawl:900:NO_BUILD_UP:0]* [GAIT:CRAWL:Slow Crawl:1900:NO_BUILD_UP:0]% [GAIT:CRAWL:Creep:2900:NO_BUILD_UP:0]S [GAIT:CLIMB:Scramble:225:10:3:675:50:LAYERS_SLOW:STRENGTH:AGILITY:STEALTH_SLOWS:50]V [GAIT:CLIMB:Faster Climb:450:5:3:675:10:LAYERS_SLOW:STRENGTH:AGILITY:STEALTH_SLOWS:20]W [GAIT:CLIMB:Fast Climb:675:NO_BUILD_UP:5:LAYERS_SLOW:STRENGTH:AGILITY:STEALTH_SLOWS:10]$ [GAIT:CLIMB:Climb:900:NO_BUILD_UP:0]* [GAIT:CLIMB:Slow Climb:1900:NO_BUILD_UP:0]% [GAIT:CLIMB:Creep:2900:NO_BUILD_UP:0]ž [DESCRIPTION:A great one-eyed scorpion.  It has three short tails and it is slavering.  Its burnt umber exoskeleton is leathery.  Beware its poisonous sting!]

Maybe that will help locate it if it was just a matter of not being able to find the stuff in the wall of tags note that the description is at the END of the entry.

EDIT: It seems posting that has disabled my quick modify button for this post. I pasted it with the garbage data between lines intact (though the forum seemed to have ignored them) but it might still be messing with the forum software.  Let me know if things on this page seem to break and I'll remove it.
« Last Edit: March 20, 2016, 11:19:21 am by Greiger »
Logged
Disclaimer: Not responsible for dwarven deaths from the use or misuse of this post.
Quote
I don't need friends!! I've got knives!!!

TheFlame52

  • Bay Watcher
  • Certified geezer & only man to win 0.40.24
    • View Profile
Re: DFHack 0.40.24-r5
« Reply #4002 on: March 20, 2016, 01:21:50 pm »

Alright, I'll give it another try.

kane_t

  • Bay Watcher
    • View Profile
Re: DFHack 0.40.24-r5
« Reply #4003 on: March 22, 2016, 09:53:25 am »

Has anybody figured out a way to manually create written quires in Fortress Mode?

I've done a little research myself:
  • df.written_content.find(id) can be used to find the contents of written books/quires
  • written-on quires have an itemimprovement_writingst in their item improvements vector
  • itemimprovement_writingst.anon_1 is a vector containing the int32 IDs for df.written_content.find(id), one for each page of the quire, presumably.

The wall I hit was that itemimprovement_writingst.anon_1 has the same name as an anonymous field in a base class, which is some type of number.  Because of this, I can't reference the vector field (Lua just only understands .anon_1 as the base class field), and the gm-editor won't let me insert primitive types (like int32), so there's no way for me to insert a new field into the vector.  Also, I'm not entirely sure where the written_content entries are stored.
« Last Edit: March 22, 2016, 09:59:02 am by kane_t »
Logged

TheFlame52

  • Bay Watcher
  • Certified geezer & only man to win 0.40.24
    • View Profile
Re: DFHack 0.40.24-r5
« Reply #4004 on: March 22, 2016, 04:50:17 pm »

I can't even decompress my save, even though I set compressed saves to no and made and retired an adventurer. What gives?
Pages: 1 ... 265 266 [267] 268 269 ... 360