Bay 12 Games Forum

Dwarf Fortress => DF Modding => Topic started by: Rayeneth on January 09, 2015, 11:01:48 pm

Title: Disabling Default Workshops
Post by: Rayeneth on January 09, 2015, 11:01:48 pm
Good evening, modders. I was wondering if it is yet possible to disable default workshops, or somehow remove them from build menus? I am creating a full conversion style mod and they really break the flow.

Thanks.
Title: Re: Disabling Default Workshops
Post by: Putnam on January 10, 2015, 12:38:34 am
no, except with DFHack
Title: Re: Disabling Default Workshops
Post by: Rayeneth on January 10, 2015, 05:19:14 am
How with DFhack? Does it have to be active? Or can I run it once to disable it?
Title: Re: Disabling Default Workshops
Post by: Putnam on January 10, 2015, 03:10:14 pm
Code: [Select]
local eventful=require('plugins.eventful')
eventful.removeNative(shop_name) < repeat this until they're all gone

You can run that script once per load, I would put it in onLoad.init.

But DFHack has to be active to use DFHack scripts, yeah.
Title: Re: Disabling Default Workshops
Post by: Meph on January 10, 2015, 03:16:49 pm
 :o
Title: Re: Disabling Default Workshops
Post by: Teneb on January 10, 2015, 04:09:01 pm
:o
I am not one to use emotes. So I will just quote Meph.

Do we have a list of all the workshop names as they appear in DF's files?
Title: Re: Disabling Default Workshops
Post by: Meph on January 10, 2015, 04:17:08 pm
I was just at a loss for words. Thats huge to TCs and deon should be told. ^^
Title: Re: Disabling Default Workshops
Post by: Putnam on January 10, 2015, 05:16:33 pm
dammit i thought you all knew

seriously it's all here... (https://github.com/DFHack/dfhack/blob/master/Lua%20API.rst)
Title: Re: Disabling Default Workshops
Post by: Roses on January 10, 2015, 05:24:15 pm
Yep, that combined with addReactionToShop(reaction_name,shop_name) is amazing.

That being said, I have only managed to find a couple of the default shop names through trial and error. Is there a list somewhere?
Title: Re: Disabling Default Workshops
Post by: Meph on January 10, 2015, 06:47:03 pm
Wow, its in some randomly named github link.  ;) How should people know?  I read the readme, its not mentioned at all. (I just checked to make sure that I'm not blind, but the dfhack main thread doesnt even link to the page you linked to. So... people really cant know about it. What would compell them to click on one of many links on the github project page thats titled "Lua API.rst"?)

Sorry for ranting a bit. ;)
Title: Re: Disabling Default Workshops
Post by: Putnam on January 10, 2015, 06:53:09 pm
The Lua API is kind of how all the programmatic super-modders (a term I just made up) do their thing.
Title: Re: Disabling Default Workshops
Post by: Deon on January 10, 2015, 07:26:53 pm
And is there a list of workshop names? LEATHERWORKS is not something that's mentioned on wiki.
Title: Re: Disabling Default Workshops
Post by: Meph on January 10, 2015, 07:45:19 pm
I can only assume that its the ingame names?
Title: Re: Disabling Default Workshops
Post by: Deon on January 10, 2015, 07:57:29 pm
That would be cool, if there's no answer I will just try it myself and see if it works.
Thank you very much for the info, guys.
Title: Re: Disabling Default Workshops
Post by: scamtank on January 23, 2015, 04:54:26 am
Yo I found them. Common sense dictated that eventful.lua would know what kind of hooks to look for and what do you know. (https://github.com/DFHack/dfhack/blob/ee822181472d7087e5a203f409dcbf2cd6f19344/plugins/lua/eventful.lua)
Title: Re: Disabling Default Workshops
Post by: milo christiansen on January 27, 2015, 07:12:00 pm
That doesn't remove the shop from the build menu, it only removes all the hardcoded reactions.