Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: The new "details" menu and modding - The greatest fail of 42.x  (Read 1081 times)

milo christiansen

  • Bay Watcher
  • Something generic here
    • View Profile

Yay! A menu that allows you to specify art images and materials for jobs! Be still my heart!

...

Except it doesn't work.

Oh it works OK for vanilla jobs, but it is an utter failure when it comes to reactions. The problems are two fold:

a) The material selections are based on the item type of the input item not the material. This means that reaction classes do not work at all (I haven't tested material reaction products, but I doubt they work either).
b) No matter what the produced item is you cannot set an art image for reactions.

Would it be possible to override this menu with DFHack? Is Toady planning on fixing it so it actually works? Right now if your mod uses any kind of special reaction based industry this more-or-less destroys it.

EDIT: Bug report over here
« Last Edit: March 14, 2016, 12:33:09 pm by milo christiansen »
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

Bogus

  • Bay Watcher
    • View Profile
Re: The new "details" menu and modding - The greatest fail of 42.x
« Reply #1 on: March 14, 2016, 10:35:37 am »

there already exists a script which lets you select job materials and items, after you issued the job. it does largely the same thing as the new builtin one, except it doesnt handle images and it doesnt seem to respect reaction classes etc (?). im not sure if you can read reaction classes and the like from the items in a job struct for builtin reactions.

other than that, i still have this kind-of-working script to replace shop menus. it can handle material and item selections based on a number of criteria, including reaction classes and reaction products. it does not currently know about art images so i can only guess that it might work if you write the code for that.
Logged

milo christiansen

  • Bay Watcher
  • Something generic here
    • View Profile
Re: The new "details" menu and modding - The greatest fail of 42.x
« Reply #2 on: March 14, 2016, 10:52:21 am »

Oh, I know about both of those. The problem is that neither one works any better right now.

Frankly I dont care about builtin reactions, the existing menu works OK for them.

DFHack job-material works great for selecting a material, but that doesn't help with art images. Trying to roll my own replacement for the whole workshop sidebar is way overkill, but if Toady doesn't fix his POS I may have to...

Is it possible to override a single control to redirect to your own menu? That would make writing a replacement menu much more feasible.
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

Bogus

  • Bay Watcher
    • View Profile
Re: The new "details" menu and modding - The greatest fail of 42.x
« Reply #3 on: March 14, 2016, 10:57:54 am »

you can remove and possibly replace single reactions or menu items, but you cant run custom code from there afaik. you may be able to replace the entire job details submenu tho (if its anything like the "Addjob" menu)

other than that, replacing whole menus has the advantage that you can run code at any time when navigating the menu. you can run your material selection before you add the job, much like the vanilla blacksmith.
« Last Edit: March 14, 2016, 11:02:54 am by Bogus »
Logged

milo christiansen

  • Bay Watcher
  • Something generic here
    • View Profile
Re: The new "details" menu and modding - The greatest fail of 42.x
« Reply #4 on: March 14, 2016, 11:01:45 am »

I'm not talking about the buttons in the reactions list, I am talking about the "details (d)" button in the job list. It probably isn't possible, which means that replacing the entire job list menu would be the only way, sigh...
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

Bogus

  • Bay Watcher
    • View Profile
Re: The new "details" menu and modding - The greatest fail of 42.x
« Reply #5 on: March 14, 2016, 11:06:51 am »

yes i changed my above post. the question is if there exists a gui focus for the details menu, if so, you very likely can replace it, with a bit of hackery to catch that focus.

im using this to poll the focus state after entering a workshop menu and then run my custom menu when the "Addjob" focus is active:

Spoiler (click to show/hide)
Logged

milo christiansen

  • Bay Watcher
  • Something generic here
    • View Profile
Re: The new "details" menu and modding - The greatest fail of 42.x
« Reply #6 on: March 14, 2016, 11:10:41 am »

That may be useful, thanks! I'll hve to see what I can do when I get home...

Toady should still fix the vanilla menu though. I am surely not the only person whose mod is screwed over by this.

EDIT: I just posted this on the bug tracker, so maybe something will come of that... I'm not holding my breath though.
« Last Edit: March 14, 2016, 11:42:59 am by milo christiansen »
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

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: The new "details" menu and modding - The greatest fail of 42.x
« Reply #7 on: March 14, 2016, 04:50:42 pm »

I was sad seeing this breaking mods. Here's hope Toady pays attention to it :).
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: The new "details" menu and modding - The greatest fail of 42.x
« Reply #8 on: March 15, 2016, 09:39:46 am »

Sorry, how exactly does this break existing mods?
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 :::

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: The new "details" menu and modding - The greatest fail of 42.x
« Reply #9 on: March 15, 2016, 05:20:00 pm »

You can have a reaction taking some item from specific material. However the game will let you select a different material based on the item type instead.

You can trust people not abusing this, but it is still broken.
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository

Meph

  • Bay Watcher
    • View Profile
    • worldbicyclist
Re: The new "details" menu and modding - The greatest fail of 42.x
« Reply #10 on: March 17, 2016, 05:11:28 am »

Ah, so if I want a platinum figurine for some ritual, the reaction would accept any figurine, if the player selects another material?
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 :::

milo christiansen

  • Bay Watcher
  • Something generic here
    • View Profile
Re: The new "details" menu and modding - The greatest fail of 42.x
« Reply #11 on: March 17, 2016, 12:12:42 pm »

Maybe not for figurines, but for bars, logs, boulders, etc? Definitely.
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

Grimlocke

  • Bay Watcher
  • *kobold noises*
    • View Profile
Re: The new "details" menu and modding - The greatest fail of 42.x
« Reply #12 on: March 22, 2016, 04:02:53 am »

You could add an item reaction product to each material to make sure the reaction puts out a nothing if that material is not used.
Logged
I make Grimlocke's History & Realism Mods. Its got poleaxes, sturdy joints and bloomeries. Now compatible with DF Revised!