Food Recipes that need to be learned first

Post » Tue Jun 19, 2012 6:57 pm

I want to have a secret recipe for a type of food. (specifically beer for my brewery) At the moment I have created the recipe in the CK but it shows up in the game straight away.

Is there any way to add the recipe to the food crafting menu after picking up a note for example?
User avatar
daniel royle
 
Posts: 3439
Joined: Thu May 17, 2007 8:44 am

Post » Tue Jun 19, 2012 8:23 am

have the recipe note trigger a quest onRead

it doesnt have to be a physical "quest" for the player. you just need a quest object to hold your data


example:

Event OnRead()
BeerQuest.SetStage(10)
EndEvent



and on your recipe put a condition:

GetStage BeerQuest 10 == 1
User avatar
Samantha Pattison
 
Posts: 3407
Joined: Sat Oct 28, 2006 8:19 pm

Post » Tue Jun 19, 2012 8:39 pm

Very handy, thanks for the quick reply.
User avatar
Louise Andrew
 
Posts: 3333
Joined: Mon Nov 27, 2006 8:01 am

Post » Tue Jun 19, 2012 11:39 pm

I'm having a little trouble setting this up. Specifically the Quest Object as I only have a very basic experience of it so far.

I've set up a new quest with the following settings in the first tab

http://i.imgur.com/Z7ZCW.png

There are 3 stages 0, 10 and 20. I've altered nothing else in the quest.

The rest if fine as far as I can work out.

I have the note set up using the defaultOnReadSetQuestStage script with its properties linking to my quest and stage 20

Scriptname DefaultOnReadSetQuestStage extends ReferenceAlias  int Property myStage  Auto  Quest Property myQuest  Auto  event onRead()    myQuest.setStage(myStage)endEvent

The actual recipe is also set up although I'm a little unsure if it's correct.

There are 2 stage based condition functions, one is GetStage (this only allows me to enter the quest) the other is GetStageDone (which will allow me to enter the quest and the stage.)

At the moment it's set to getStageDone myBeerQuest 10 == 1

I've tested it in game. I'm unable to make the recipe by default which is a start but I read the note and nothing happens.
User avatar
Jimmie Allen
 
Posts: 3358
Joined: Sun Oct 14, 2007 6:39 am

Post » Tue Jun 19, 2012 11:48 pm

I've just tried the quest tutorial in the CK wiki but it doesn't help much. Is there anything similar in game I can rip apart to see how it works?
User avatar
Laura Samson
 
Posts: 3337
Joined: Wed Aug 29, 2007 6:36 pm

Post » Tue Jun 19, 2012 7:47 pm

after you read the note, open up the console and type getstage nameofyourquest

and see what value it returns. if it returns 0 something is wrong with your quest setup


also on your quest stages, make sure you have at least an EMPTY entry in the log entry. the quest stage might not register if there is nothing. right click in the log entry box and select New.


one other thing i would suggest is to have your condition use GetStage instead of GetStageDone. and set the value to > 0 instead of == 1
User avatar
Mylizards Dot com
 
Posts: 3379
Joined: Fri May 04, 2007 1:59 pm

Post » Tue Jun 19, 2012 9:06 pm

Thanks for your help on this Amethyst. Your advice worked perfectly along with changing the script used to the "defaultOnReadSetQuestStageNotAlias" version. I'll probably customise it a bit so the player gets a message informing them they have learned it.

Now then... on to making a new type of crafting station :P
User avatar
Luis Reyma
 
Posts: 3361
Joined: Fri Nov 02, 2007 11:10 am

Post » Tue Jun 19, 2012 12:07 pm

I want to have a secret recipe for a type of food. (specifically beer for my brewery) At the moment I have created the recipe in the CK but it shows up in the game straight away.

Is there any way to add the recipe to the food crafting menu after picking up a note for example?

As an alternative, (and posting here really for those who don't want it as part of a quest), you can set as a condition in the recipe that checks for an item in your inventory.

In essence this works as follows:

Your character picks up an item, eg a note detailing the recipe, named MySecretRecipe.
The Constructible Object recipe then has the following condition

S GetItemCount MySecretRecipe >= 1

Once this item is in your inventory the recipe becomes available. The downside is if you remove the item you also lose the ability to craft that item
User avatar
Sammie LM
 
Posts: 3424
Joined: Thu Nov 30, 2006 1:59 pm

Post » Tue Jun 19, 2012 3:46 pm

Thanks for your help on this Amethyst. Your advice worked perfectly along with changing the script used to the "defaultOnReadSetQuestStageNotAlias" version. I'll probably customise it a bit so the player gets a message informing them they have learned it.

Now then... on to making a new type of crafting station :tongue:

you can use the built-in message system (either as a text prompt at the top of the screen, or a pop-up message box).

check out the Hello World scripting tutorial on the wiki. but don't use the debug.messagebox in game, follow the tutorial to the part where they show you how to make a proper message prompt to be used in game.


also you dont need to make a new script for this, just type it into the papyrus fragment section of the quest stage you want it to appear on.
User avatar
Tanya
 
Posts: 3358
Joined: Fri Feb 16, 2007 6:01 am

Post » Tue Jun 19, 2012 6:51 pm

I'm really struggling to get a papyrus message fragment to work in the quest stage has anyone got a working example?

I tried



Event OnInit()
Debug.Notification("Hello, World!")
EndEvent
User avatar
Ross Thomas
 
Posts: 3371
Joined: Sat Jul 21, 2007 12:06 am

Post » Tue Jun 19, 2012 7:47 pm

I was barking up the wrong tree. All it needed was

Debug.MessageBox("You have learned a new recipe")
in the quest stage papyrus fragment.

However I have no idea how to go about calling a nice message top left still ><
User avatar
Rex Help
 
Posts: 3380
Joined: Mon Jun 18, 2007 6:52 pm

Post » Tue Jun 19, 2012 8:27 am

I was barking up the wrong tree. All it needed was

Debug.MessageBox("You have learned a new recipe")
in the quest stage papyrus fragment.

However I have no idea how to go about calling a nice message top left still ><

I think if you change MessageBox to Notification, that will pop the message in the top LH corner
User avatar
Andrew Tarango
 
Posts: 3454
Joined: Wed Oct 17, 2007 10:07 am

Post » Tue Jun 19, 2012 2:35 pm

http://www.creationkit.com/Bethesda_Tutorial_Papyrus_Introduction_to_Properties_and_Functions
User avatar
Nikki Lawrence
 
Posts: 3317
Joined: Sat Jul 01, 2006 2:27 am


Return to V - Skyrim