Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: [DFHack] item-trigger crashes  (Read 2141 times)

expwnent

  • Bay Watcher
    • View Profile
[DFHack] item-trigger crashes
« on: December 07, 2014, 05:29:28 am »

I'm getting reports that item-trigger crashes after unpausing in fort mode but I can't reproduce the error. I would appreciate it if more people could test it and post their results along with what OS they are using.

It seems to be still present even in DFHack 0.40.19-r1.
Logged

Rogue Yun

  • Bay Watcher
  • Beware of the Carp
    • View Profile
Re: [DFHack] item-trigger crashes
« Reply #1 on: December 07, 2014, 11:20:19 am »

What is a simple way to test it? I don't know what item-trigger is.
Logged

.:Simple Mood 16x16 ASCII:.
Keep it Simple. Keep it Safe.

UnicodingUnicorn

  • Bay Watcher
  • Competent at Incompetency.
    • View Profile
Re: [DFHack] item-trigger crashes
« Reply #2 on: December 14, 2014, 04:19:13 am »

What is a simple way to test it? I don't know what item-trigger is.
item-trigger is a script under modtools meant to trigger other scripts when a specific item is equipped. A simple way to test it would to be to create an onLoad.init file under the raws folder, enter the line modtools/item-trigger -itemType <insert raw name of an item> -onEquip -command [ devel/print-args "equipped" ], replacing the placeholder with the appropriate name. Next, gen a new world, embark on Fortress Mode, and then unpause. If it crashes, you have the same bug. If it does not and prints equipped into the DFHack console, it works properly.
Logged
I do stuff, I guess

Rogue Yun

  • Bay Watcher
  • Beware of the Carp
    • View Profile
Re: [DFHack] item-trigger crashes
« Reply #3 on: December 14, 2014, 11:03:14 am »

I replaced <insert raw name of an item> with ARMOR:ITEM_ARMOR_CLOAK. I hope that was right >.>
Code: (onLoad.init) [Select]
modtools/item-trigger -itemType ARMOR:ITEM_ARMOR_CLOAK -onEquip -command [ devel/print-args "equipped" ]

I get this error message on the "choose an embark location" screen:


The game loads. On load after I unpause it seems to rapidly loop an error, crashing the game.


I hope that was helpful. If I did something wrong let me know and I'll try it again.
Logged

.:Simple Mood 16x16 ASCII:.
Keep it Simple. Keep it Safe.

Putnam

  • Bay Watcher
  • DAT WIZARD
    • View Profile
Re: [DFHack] item-trigger crashes
« Reply #4 on: December 14, 2014, 04:37:25 pm »

The error was your thing being malformed, I think you may just want ITEM_ARMOR_CLOAK.

Also, it's a problem with the entire event, not just item-trigger, IIRC.

expwnent

  • Bay Watcher
    • View Profile
Re: [DFHack] item-trigger crashes
« Reply #5 on: January 15, 2015, 05:57:10 pm »

Here is an attempt to fix the bug for 0.40.23. Let me know if it works or not if you test it.
Logged

Roses

  • Bay Watcher
    • View Profile
Re: [DFHack] item-trigger crashes
« Reply #6 on: January 15, 2015, 08:20:02 pm »

Did a quick test in arena mode, everything seems to be working. Not getting any crashes and the command is running. I will test in fort mode sometime tonight or tomorrow, but it looks like it is fixed :)
Logged

expwnent

  • Bay Watcher
    • View Profile
Re: [DFHack] item-trigger crashes
« Reply #7 on: January 15, 2015, 08:50:59 pm »

Awesome! Thank you for testing.
Logged

Roses

  • Bay Watcher
    • View Profile
Re: [DFHack] item-trigger crashes
« Reply #8 on: January 21, 2015, 04:59:02 pm »

I was unable to get it to crash in any mode. I would say the problem is fixed, but maybe others are still getting crashes?
Logged