Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 ... 301 302 [303] 304 305 ... 360

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

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.03-r1
« Reply #4530 on: July 26, 2016, 11:17:53 am »

I have a feeling once this updates something will break
Not quite sure what this is supposed to mean.
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.

scourge728

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.03-r1
« Reply #4531 on: July 26, 2016, 01:32:29 pm »

something like the website or the download thing idk it was a dumb joke to start with

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.03-r1
« Reply #4532 on: July 26, 2016, 02:35:23 pm »

Oh, I thought you meant something in DFHack (which is already pretty broken). We host downloads on GitHub now, so hopefully that doesn't go down because of us. :)
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.

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: DFHack 0.43.03-r1
« Reply #4533 on: July 26, 2016, 03:12:14 pm »

Oh, I thought you meant something in DFHack (which is already pretty broken). We host downloads on GitHub now, so hopefully that doesn't go down because of us. :)
"Thank you for calling Infrastructure Services, I'm showing an alarm in the server room HVAC.  Are you calling about that?"
"Yeah... looks like it's snowing frozen elf blood in there."
Logged
Just got back, updating:
(0.42 & 0.43) The Earth Strikes Back! v2.15 - Pay attention...  It's a mine!  It's-a not yours!
(0.42 & 0.43) Appearance Tweaks v1.03 - Tease those hippies about their pointy ears.
(0.42 & 0.43) Accessibility Utility v1.04 - Console tools to navigate the map

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: DFHack 0.43.03-r1
« Reply #4534 on: July 26, 2016, 04:08:44 pm »

Oh, I thought you meant something in DFHack (which is already pretty broken). We host downloads on GitHub now, so hopefully that doesn't go down because of us. :)

Yeah, you're very unlikely to hit extremes like that lol. This is the most extreme thing I've seen happen when it comes to Github-as-CDN and that's a hilariously ludicrous edge case involving over 16,000 subdirectories and content distribution being done primarily through shallow git clone. It's seriously doubtful that anything you do with zips and tarballs will get you in trouble, heh.
« Last Edit: July 26, 2016, 04:11:46 pm by Putnam »
Logged

Roses

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.03-r1
« Reply #4535 on: July 26, 2016, 09:26:40 pm »

Question about dfhack.timeout(). The whole callback function thing kind of confuses me, will something like this work?
Code: [Select]
dfhack.timeout(ticks+1,'ticks',dfhack.script_environment('functions/event').queueCheck(id,'WEEKLY',true))I can't open DF on this computer so I can't test it out. Do I instead need
Code: [Select]
dfhack.timeout(ticks+1,'ticks',function ()
                                  dfhack.script_environment('functions/event').queueCheck(id,'WEEKLY',true)
                                end)
?
Logged

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.03-r1
« Reply #4536 on: July 26, 2016, 09:40:48 pm »

You should definitely use the second instead of the first. The first will call "dfhack.script_environment('functions/event').queueCheck(id,'WEEKLY',true)" exactly once, then pass whatever that returns to dfhack.timeout, which will then try to call it as a function and probably fail.

Also, I'm not quite sure why you're passing ticks+1 as the first argument - that argument is basically "number of ticks later" in this case, so you may as well make ticks whatever you want and use that as the first argument instead (unless I'm misunderstanding something).
« Last Edit: July 26, 2016, 09:42:32 pm by lethosor »
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.

Roses

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.03-r1
« Reply #4537 on: July 27, 2016, 09:21:54 am »

You should definitely use the second instead of the first. The first will call "dfhack.script_environment('functions/event').queueCheck(id,'WEEKLY',true)" exactly once, then pass whatever that returns to dfhack.timeout, which will then try to call it as a function and probably fail.

Also, I'm not quite sure why you're passing ticks+1 as the first argument - that argument is basically "number of ticks later" in this case, so you may as well make ticks whatever you want and use that as the first argument instead (unless I'm misunderstanding something).

Thanks, ticks is defined earlier in the code (number of ticks before next week in this case) and is used for another timeout call, I wanted this one to happen the tick after the other one.
Logged

Dirst

  • Bay Watcher
  • [EASILY_DISTRA
    • View Profile
Re: DFHack 0.43.03-r1
« Reply #4538 on: July 27, 2016, 09:38:47 am »

Just out of curiosity, has anyone looked into how boogeymen, demons and normal animal clusters get spawned by the game?  The current version of create-unit uses a trick mifki figured out to use Arena Mode momentarily, but there is still some instability which says to me that at least some of the data structures used in Fort Mode are uninitialized.

Boogeymen appear out of nowhere; animals and demons appear out of nowhere but pulling from abstract populations.  The Starting Seven and the initial migrants might call the same function, or might be completely different because they're built from the ground up to be citizens.  Getting access to that method from DFHack would be the holy grail of spawning creatures, or even just the constructor for a unit would ensure that we don't miss something that might have evaded DF Structures.
Logged
Just got back, updating:
(0.42 & 0.43) The Earth Strikes Back! v2.15 - Pay attention...  It's a mine!  It's-a not yours!
(0.42 & 0.43) Appearance Tweaks v1.03 - Tease those hippies about their pointy ears.
(0.42 & 0.43) Accessibility Utility v1.04 - Console tools to navigate the map

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: DFHack 0.43.03-r1
« Reply #4539 on: July 27, 2016, 09:59:52 am »

I have a question. Can I somehow set a required class, creature or caste for transform-unit? Like "run reaction, transform unit only if its caste X".

In older version that was possible because it used the DF interaction system, with SYN_AFFECTED_CREATURE.

I would use a workaround by using add-syndrome to add a self-targetted interaction, but creatures in DF2016 dont use interactions outside of combat anymore. :/

EDIT:
Oh, and this crashes the game:
Code: [Select]
modtools/reaction-trigger -reactionName MUTATE_RAT -allowNonworkerTargets -command [ modtools/transform-unit -unit \\TARGET_ID -race RAT_GIANT -caste MALE -suppressAnnouncement ] ]
It should target a creature pastured on a workshop and turn it into a giant rat. The creature itself is fine, I can buy giant rats at embark, the game has no issues with them in usual circumstances.
« Last Edit: July 27, 2016, 11:55:22 am by Meph »
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 :::

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.03-r1
« Reply #4540 on: July 27, 2016, 01:20:03 pm »

Is that crashing when you run modtools/reaction-trigger or when modtools/transform-unit gets run?

Just out of curiosity, has anyone looked into how boogeymen, demons and normal animal clusters get spawned by the game?  The current version of create-unit uses a trick mifki figured out to use Arena Mode momentarily, but there is still some instability which says to me that at least some of the data structures used in Fort Mode are uninitialized.

Boogeymen appear out of nowhere; animals and demons appear out of nowhere but pulling from abstract populations.  The Starting Seven and the initial migrants might call the same function, or might be completely different because they're built from the ground up to be citizens.  Getting access to that method from DFHack would be the holy grail of spawning creatures, or even just the constructor for a unit would ensure that we don't miss something that might have evaded DF Structures.
What kind of instability?

There probably aren't entirely separate constructors for citizens and non-citizens. There's probably some method(s) DF uses to turn units into citizens, but unit doesn't have any virtual methods, so finding those methods would require a lot more disassembly and manual searching for each build of DF.
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.

milo christiansen

  • Bay Watcher
  • Something generic here
    • View Profile
Re: DFHack 0.43.03-r1
« Reply #4541 on: July 27, 2016, 01:20:35 pm »

Just FYI: In the prepared meal ingredient struct, unk10 (I think it was unk10) is the ingredient quality. A few seconds with the gm editor and a prepared meal will confirm which it was exactly.
Logged
Rubble 8 - The most powerful modding suite in existence!
After all, coke is for furnaces, not for snorting.
You're not true dwarven royalty unless you own the complete 'Signature Collection' baby-bone bedroom set from NOKEAS

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: DFHack 0.43.03-r1
« Reply #4542 on: July 27, 2016, 01:48:01 pm »

Lethosor:
Quote
Is that crashing when you run modtools/reaction-trigger or when modtools/transform-unit gets run?
Neither. I can run both.

It crashes when I use transform-unit with reaction-trigger AND -allowNonworkerTargets. Aka when the worker that does the reaction is not the creature that is transformed.
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 :::

lethosor

  • Bay Watcher
    • View Profile
Re: DFHack 0.43.03-r1
« Reply #4543 on: July 27, 2016, 02:14:06 pm »

Neither. I can run both.
I'm confused. Is DF actually crashing?

Maybe I should be clearer: Does the crash occur immediately when you run the entire command, or does it occur when (as a result of running that command) modtools/reaction-trigger gets called (not directly by you) at a later point in time?

I'm not really that familiar with the modding scripts, but if you think it should be possible to prevent the crash, a minimal save with a reaction and call to reaction-trigger that triggers the crash would be helpful. I can't guarantee that we'll get to it quickly, though, because of the 0.43.05 updates and all.
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.

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: DFHack 0.43.03-r1
« Reply #4544 on: July 27, 2016, 02:21:25 pm »

Neither. I can run both.
I'm confused. Is DF actually crashing?

Maybe I should be clearer: Does the crash occur immediately when you run the entire command, or does it occur when (as a result of running that command) modtools/reaction-trigger gets called (not directly by you) at a later point in time?
DF crashes to desktop.

I dont know how to distinguish between the two options you mention.

I tried using add-syndrome as a workaround, but no dice so far.
Code: [Select]
modtools/reaction-trigger -reactionName MUTATE_RAT_TO_GIANT -allowNonworkerTargets -command [ modtools/add-syndrome -syndrome "transform_rat_giant" -target \\TARGET_ID ]
Code: [Select]
[SYNDROME]
[SYN_NAME:transform_rat_giant]
[SYN_AFFECTED_CREATURE:SKAVEN_RAT:ALL]
[CE_BODY_TRANSFORMATION:START:0][CE:CREATURE:WOLFRAT:MALE]

The thing I'm trying to do is run a script through a reaction that targets a pet pastured on the workshop. In the past I've been doing a lot with this... you can feed pets, armor them, train their combat skills, transform them... but after the dfhack update from 34.11 to future version I've never been able to replicate this.

I'll create a save for you to test.
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 ... 301 302 [303] 304 305 ... 360