Advice Requested: Making a Spell Trigger a Crafting Menu

Post » Tue Nov 20, 2012 9:15 am

Working on a mod that adds a more advanced transmutation spell. As designed, upon casting the spell the player would enter a "Create Item" crafting menu, which would then display several recipes for transmuting ingots of all kinds into lead, and then lead ingots back into any other type of ingot.

I just started this project today, and so far so good. I've created a custom workbench that and the recipes in question and the actual crafting works just fine. Of course, that's the easy part. More challenging, is how to get the spell to lead directly into this interface. Naturally, this will be scripted, where upon the spell being cast a script will trigger. What exactly the script should do is another matter.

1. If I have a dummy workbench hidden in the world, can a script cause a player to interact with it from anywhere?
2. If not, I presume I'll have to move the dummy workbench to the player via the script, then put it away again once the crafting window is closed?
3. Is there anything I'm missing here?

The mod will also likely include a "Smelt Minerals" spell using similar techniques. The last spell I'd want to include is a "Extract Minerals" spell which could be cast on ore deposits, but that's a stretch goal.
User avatar
Mylizards Dot com
 
Posts: 3379
Joined: Fri May 04, 2007 1:59 pm

Post » Tue Nov 20, 2012 7:21 pm

If you just want to have the crafting menu open up, then you can do, in essence, what I do in my portable alchemy mod.

1. Create a new interior cell
2. Add the workbench you need into that cell
3. Create a script that activates that specific workbench
4. Attach the script to the magic effect

If you cast the spell while you are in the same cell as the workbench, then you will move to it and activate it as if you walked up to it and activated it. If you are not in the same cell as the workbench and cast the spell, then you will simply get the crafting menu (hence the need to isolate the workbench in a cell that you never enter unless using the coc command).
User avatar
Emma
 
Posts: 3287
Joined: Mon Aug 28, 2006 12:51 am

Post » Tue Nov 20, 2012 8:43 am

If you just want to have the crafting menu open up, then you can do, in essence, what I do in my portable alchemy mod.

1. Create a new interior cell
2. Add the workbench you need into that cell
3. Create a script that activates that specific workbench
4. Attach the script to the magic effect

If you cast the spell while you are in the same cell as the workbench, then you will move to it and activate it as if you walked up to it and activated it. If you are not in the same cell as the workbench and cast the spell, then you will simply get the crafting menu (hence the need to isolate the workbench in a cell that you never enter unless using the coc command).

That's exactly how I was hoping it would work, thanks.
User avatar
Carlos Vazquez
 
Posts: 3407
Joined: Sat Aug 25, 2007 10:19 am

Post » Tue Nov 20, 2012 6:03 pm

And to follow up, it's working great. The smelting spell should be easy to make as well (since I don't even need a new kind of workbench or recipes). All that's left is to work on the mineral extraction spell, which is a whole other thing. Still need to look in to how ore deposits work and if it's even possible to detect when they're hit by spells (I remember it being an issue for someone trying to create an "open lock" spell that it wasn't possible to detect when a spell hit a door). Anyway, I'll likely post a new thread for advice on that front. Thanks again MrJack.
User avatar
Dan Stevens
 
Posts: 3429
Joined: Thu Jun 14, 2007 5:00 pm


Return to V - Skyrim