Crafting over-time?

Post » Tue Jun 19, 2012 5:02 pm

I'm trying to make craftable item requiring time to craft for a bakery mod i'm working on.

For example,

If I decide to make a bread on a certain cooking pot. I want this cooking pot to be unavailable for the next 15-30min ingame to simulate the time it would really take to make a bread.

I tried scripting on the Cookingpot itself but to no avail.
It would be much easier If I could add script directly on the cooking recipe but from what I can see it's impossible.

Anyway, any suggestion?
User avatar
Baby K(:
 
Posts: 3395
Joined: Thu Nov 09, 2006 9:07 pm

Post » Tue Jun 19, 2012 10:29 pm

Hmm the problem I see is that as you say you cannot apply scripts to recipes. Nor you can get any feedback on the selected recipe in scripts applied to the cooking pot.

The closest you could achieve is blocking the pot for the same amount of time regardless of the used recipe. In the OnActivate() Event registerForSingleUpdate() using the desired amount of waiting time (mind you though that registerforupdate takes realtime seconds as parameter). Then use blockActivation() to make the Cookingpot unusable. In the OnUpdate() event simply use blockActivation(false) to make the pot usable again.
User avatar
ImmaTakeYour
 
Posts: 3383
Joined: Mon Sep 03, 2007 12:45 pm

Post » Wed Jun 20, 2012 5:20 am

The closest you could achieve is blocking the pot for the same amount of time regardless of the used recipe. In the OnActivate() Event registerForSingleUpdate() using the desired amount of waiting time (mind you though that registerforupdate takes realtime seconds as parameter). Then use blockActivation() to make the Cookingpot unusable. In the OnUpdate() event simply use blockActivation(false) to make the pot usable again.

Yea that seems like it would work, but it would be easy to simply stack on ingredients and craft them all in one shot.

I think I will try to apply this code without using the cooking pot, instead I will try to use an activator with a MessageBox menu. This way, hopefully, I can have more scripting freedom.

Ty for the feedback.
User avatar
sharon
 
Posts: 3449
Joined: Wed Nov 22, 2006 4:59 am

Post » Wed Jun 20, 2012 1:28 am

Perhaps you could do something simialr to the atronach forge? but add in a time delay as well. Then haeva cook book, much more RP!
User avatar
tegan fiamengo
 
Posts: 3455
Joined: Mon Jan 29, 2007 9:53 am

Post » Tue Jun 19, 2012 4:19 pm

If you want vanilla crafting interfaces, you could have the recipe produce a token with a script that fires when added to inventory.
User avatar
Alina loves Alexandra
 
Posts: 3456
Joined: Mon Jan 01, 2007 7:55 pm


Return to V - Skyrim