Edit crafting menus: Possible?

Post » Sun Nov 18, 2012 5:58 am

I have been skimming through the quests and story manager sections looking for a way to modify the crafting menus slightly. Basically, I want to script a menu to pop up when you activate certain crafting stations. Depending on what you choose, they will either activate as normal, or activate the same menu structure, only have crafting perform a different function (with different requirements) for that crafting session.

It seems maybe like something that would need to be fully scripted, but I would really prefer to keep the default crafting menus and 3rd person animations.

Looking at some of the default furniture object settings for crafting tables, they have certain special keywords, and the setting "Workbench Data" seems to indicate which menu will appear. I am just wondering if it is possible at all to duplicate and modify the functionality of one of those menus.
User avatar
Averielle Garcia
 
Posts: 3491
Joined: Fri Aug 24, 2007 3:41 pm

Post » Sun Nov 18, 2012 12:34 am

I'd like to know if this kind of thing is possible as well. My current approach is to use custom containers with custom scripts attached to them and it isn't the most efficient approach.

I've been successful in making a custom crafting system of sorts while retaining the animation from the vanilla alchemy crafting system.
User avatar
CHANONE
 
Posts: 3377
Joined: Fri Mar 30, 2007 10:04 am

Post » Sun Nov 18, 2012 1:26 pm

Sounds like we're working on the same thing! I'll let you know if I make any progress on alternatives but that is essentially the exact same approach I've taken.
User avatar
KiiSsez jdgaf Benzler
 
Posts: 3546
Joined: Fri Mar 16, 2007 7:10 am

Post » Sun Nov 18, 2012 9:05 am

this would be possible using a script.

if i'm understanding this right, you're looking to do something like:

User activates a smithing object, has a menu choice to either forge normal equipment or forge very specific equipment, then depending on their choice the appropriate crafting menu commences and the animation continues as normal for that crafting station.


there are many ways to do this but this is what I would do:

1. to start out, create a custom crafting keyword, go to the Keyword section in the object window and create a new entry (can be anything like MyCustomForgingKeyword).

2. create your custom forge furniture. basically all this is, is a regular forge (you can duplicate one) that uses a different workbench keyword as the vanilla forge. so let's say you have a set of weapons that can ONLY be crafted at this special forge. for your weapon's Constructible Object recipe you can use your custom keyword and use the dropdown to select that keyword.

for crafting furniture there are a handful of keywords that are important to define:
(your custom keyword) will flag this furniture as a crafting station for any recipe that uses this keyword (you can have more than one so that the crafting station picks up multiple recipe types - which is how the skyforge works)
animation keywords like IsBlacksmithForge will flag this furniture to play that designated animation (this is a native hard-coded function of the game engine)
there are a few others that you can use to flag for either dialogue events or AI packages, but for now let's focus on those 2

3. create a menu pop up by going to the Message section of the object window and create new. Define however number of choice buttons you need. in this example i'm going to use a menu with 2 buttons, one for normal crafting and one for special crafting. so my message box says something like "Select the crafting type:" under message text and in the menu buttons i would create 2 entries and name them Special (index 0) and Standard (index 1).

4. drag and drop both a vanilla crafting forge and your visually identical custom forge into the same space so that they overlap one another in the exact coordinates. set the vanilla forge reference to Initially Disabled

5. you will need to attach a simple script to your custom forge. something like this should work:
Spoiler
ObjectReference Property CraftStation1  Auto ; one of these properties for each crafting stationMessage Property CraftMenu  Auto ; your pop up menu; The message choices were defined like this: 0 = Special, 1 = StandardEvent OnCellAttach()   RegisterForSingleUpdate(0.1) ; upon entring the cell, immediately queues the update to prepare the furniture for useEndEventEvent OnActivate(ObjectReference akActionRef)If (akActionRef == Game.GetPlayer()) ; make sure this system only works for the player and not a sandboxing NPC  Int Selection = CraftMenu.Show() ; calls and saves the user input for the menu choice  If (Selection = 0) ; the number according to the selection will be shown as the index in your message you created (under the Menu Button window)   BlockActivation(False) ; unblocks this furniture so that the script can allow it to function normally again   Activate(akActionRef) ; forces the furniture to activate normally  ElseIf (Selection = 1)   DisableNoWait() ; disables the current Special crafting bench   Craftstation1.Enable() ; enables the vanilla crafting bench   CraftStation1.Activate(akActionRef)  EndIf  RegisterForSingleUpdate(0.1) ; queues an update while the user is in crafting menuEndIfEndEventEvent OnUpdate()   BlockActivation() ; allows your crafting furniture to display a menu without immediately sending the player into the crafting menuEndEvent

6. Fill the properties. CraftingStation1 in this case is the vanilla forge reference you dropped down. the CraftMenu is the message pop up you created earlier

save it and test it out in game
User avatar
Jonny
 
Posts: 3508
Joined: Wed Jul 18, 2007 9:04 am

Post » Sun Nov 18, 2012 12:50 pm

Thanks AD, that's some good information to go by.

The problem I am having is I want to do this with Alchemy. So, rather than a fixed materials list I wanted to be able to have it create non-potion items the same way normal alchemy creates potions.

Basically, I want to be able to use ANY ingredient with a certain effect known by the player as an ingredient for a recipe that requires that EFFECT as an ingredient.

Sadly I can't see any way to check if the player knows a certain level of effects on an ingredient through scripts, or a way to use effects as required ingredients, allowing any item to be used which has that required effect (and is known by the player.)
User avatar
Dawn Porter
 
Posts: 3449
Joined: Sun Jun 18, 2006 11:17 am

Post » Sun Nov 18, 2012 2:26 am

yeah, unfortunately the alchemy crafting archetype functionality is hard coded, like the tempering benches and enchanting etc.

potentially, you might be able to create this, but it would require a rather huge script, and not-as-user-friendly interface (basically a more in-depth version of the atronach forge). what you are talking about is possible though, just not as easy as using the existing crafting archetypes (you have to build it entirely from scratch like how the atronach forge is)

however, if you can pull this off, just this functionality alone would be an incredible mod on its own.
User avatar
Star Dunkels Macmillan
 
Posts: 3421
Joined: Thu Aug 31, 2006 4:00 pm


Return to V - Skyrim