Quick Questions, Quick Answers Thread #5

Post » Sat Nov 17, 2012 10:36 am

I'm having a problem adding an int property to my script. I want the property to get the count of the number of Venison that a player has, then the script will pick a reward item from a level list based on that count.

When I attempt to add a new int property the script attempts to compile and fails, saying there is "no viable alternative at Input Int"

Edit: Well without making a property within the property window, it created three instances of it within the script. I deleted all but 2 and now it states my variable is undefined, although I already set it to = the itemcount of the venison in the player inventory.

Edit2:Weird, must've been a bug, or a naming problem. I accidentally closed my window and the script detached itself from my quest and all of the properties reverted to default values. I reattached the script and properties and also added an int property, but this time I named it PlayerMeatCount (last time I was naming it just MeatCount). The CK then created two int properties, one which was named PlayerMeatCount and the other named MeatCount. In the code it appeared that PlayerMeatCount is set by default to 0 and the code has no mention of MeatCount except as being established as a property. Just wondering what's going on here.

Also, my branch created in my dialogue view detached itself from my quest, yet I can still find it in player dialogue and the branch name is still in use. Anyway to find it/fix it so I can actually see and edit it in the dialogue view.
User avatar
Kellymarie Heppell
 
Posts: 3456
Joined: Mon Jul 24, 2006 4:37 am

Post » Fri Nov 16, 2012 9:11 pm

I'm trying to create a Frenzy Rune spell. I've got the spell and spell tome in game and I'm able to cast it. Unfortunately it doesn't seem to trigger the frenzy effect on the target. I copied the Frost Rune 'magic effect', renamed and edited it for my spell, but I can't get it to work on the target at all. Any help or advice would be greatly appreciated.

I've been having a sort of similar problem where I can cast a spell and see my hands move, but the script and visuals from the effect don't kick in. I suspect if I change the magnitude from 0 to 1 or back from 1 to 0 it seems to sometimes start working again. Might want to make sure duration isn't 0 too.

Otherwise, are you sure your effect works? When you're testing it try to always use a clean save.
User avatar
Latino HeaT
 
Posts: 3402
Joined: Thu Nov 08, 2007 6:21 pm

Post » Sat Nov 17, 2012 4:11 am

Okay so in addition to my above question.....

Okay having some confusion with dialogue. I have a topic that can only be initiated with a specific actor, the topic text is "I have returned from the hunt". Now I don't want the NPC to say anything, but I want the dialogue to move to a series of prompts determined by conditionals( basically a series of checks, similar to the FavorJobsMineOre quest). I also give the actor different response texts depending on the prompt. Now here are my questions....

1. It seems as though the only way to check to make sure the FormID of the actor is for the actor I want, is to do so in each new prompt/response text window. This seems inefficient and wrong because I don't see the MineOre quest even checking to make sure it has the right actor.
2. Are prompts even what I want in this case? Could someone give me a proper breakdown? The CK Wiki doesn't quite cover prompts to a tee.

Edit: Perhaps I should clear this up as to the reason I am actually asking these questions.

Basically I want the topic text to always appear as an choice when talking to the actor. If the player meets the conditionals I want it to open the prompts through the topic text or, if the conditionals are not met I want to have a dialogue choice to come back later or ask what type of meats the actor will accept.

Right now, if the character doesn't meet the conditionals of the prompt then the topic text just isn't there. Do I need to make a topic text without a prompt to act as a base case? Then just link it to the prompted boxes?

I want it to go like this "I have returned from the hunt"
-> if player has the required items then conditionals are met and the associated prompt choice appears, lets say the player has Venison-> "I would like to trade Venison for supplies"-> Now the NPC responds, "Thanks, looks like you could use a few more of these".

-> or if the player does not have any of the items required for the prompts conditionals to be met two dialogue prompts appear instead-> "What kind of meat are you looking for" or "I'll come back later".

I'm just not really sure because the CK Wiki and tutorials covers this area very briefly.
User avatar
Margarita Diaz
 
Posts: 3511
Joined: Sun Aug 12, 2007 2:01 pm

Post » Sat Nov 17, 2012 11:40 am

#16) Shouts subcategory appearance in the Magic menu: It's probably hardcoded, like how BOOKS doesn't show as a category in the inventory menu until the player has a book.
...
Thank you! I thought it was hard coded too. So, how can I act on this, by adding a condition to the appearance of this submenu in the magic menu?
Anyone..?
User avatar
Roy Harris
 
Posts: 3463
Joined: Tue Sep 11, 2007 8:58 pm

Post » Sat Nov 17, 2012 11:47 am

http://www.creationkit.com/OnObjectEquipped_-_Actor This will run every time you eat an ingredient or food item (because you must equip the object in order to do so).

Having trouble getting that one to work. I can't even get a simple messagebox to pop up. I think being in the menu (MenuMode) is interfering with the script running.
This has not worked (Attached to the SpiderEgg ingredient in the Creation Kit):
Scriptname grIngAlcScript extends ObjectReference  Event OnObjectEquipped()	debug.messagebox ("You ate a spider egg!")endEvent

Neither has the copied/pasted version straight from the wiki:
Event OnObjectEquipped(Form akBaseObject, ObjectReference akReference)  if akBaseObject as Ingredient	Debug.Messagebox ("You ate a spider egg!")  endIfendEvent

Oddly though, they both compile...no errors. Yet still nothing happens when the Spider Egg is eaten. Still stuck I guess.
User avatar
Alycia Leann grace
 
Posts: 3539
Joined: Tue Jun 26, 2007 10:07 pm

Post » Sat Nov 17, 2012 1:15 am

Having trouble getting that one to work. I can't even get a simple messagebox to pop up. I think being in the menu (MenuMode) is interfering with the script running.
This has not worked (Attached to the SpiderEgg ingredient in the Creation Kit):
Scriptname grIngAlcScript extends ObjectReference  Event OnObjectEquipped()	debug.messagebox ("You ate a spider egg!")endEvent

Neither has the copied/pasted version straight from the wiki:
Event OnObjectEquipped(Form akBaseObject, ObjectReference akReference)  if akBaseObject as Ingredient	Debug.Messagebox ("You ate a spider egg!")  endIfendEvent

Oddly though, they both compile...no errors. Yet still nothing happens when the Spider Egg is eaten. Still stuck I guess.

Have you made a messagebox property and attached your new messagebox (from the object window) to it?
User avatar
Richard Thompson
 
Posts: 3302
Joined: Mon Jun 04, 2007 3:49 am

Post » Sat Nov 17, 2012 12:08 am

Okay I got the dialogue sorted out but for some reason the conditions aren't being met. My conditions to give player the option to trade venison are GetItemCount >= 3( I have three in my inventory) and HasKeyWord MeatVenison (which I have created and attached to FoodVenison). Even though both conditions are met, the topic choice does not appear, instead reverting to my base case.

I don't think I need to post my code seeing as how it isn't even supposed to run until the dialogue line is completed. Since the topic doesn't appear, I can't select and thus can't even tell if the code is working or not.
User avatar
Robert Jackson
 
Posts: 3385
Joined: Tue Nov 20, 2007 12:39 am

Post » Sat Nov 17, 2012 1:11 pm

Okay I got the dialogue sorted out but for some reason the conditions aren't being met. My conditions to give player the option to trade venison are GetItemCount >= 3( I have three in my inventory) and HasKeyWord MeatVenison (which I have created and attached to FoodVenison). Even though both conditions are met, the topic choice does not appear, instead reverting to my base case.

I don't think I need to post my code seeing as how it isn't even supposed to run until the dialogue line is completed. Since the topic doesn't appear, I can't select and thus can't even tell if the code is working or not.

Is the condition set to Run On Target? In the condition box at the bottom you can select the target that the condition looks at. So Subject is on the person you are talking to. Target is on the Player.

Example:

GetIsID = ActorName, to make a dialogue topic work on only one actor, would be Run On Subject.
GetItemCount, to check how many the player has, would be Run On Target.
User avatar
Vivien
 
Posts: 3530
Joined: Fri Apr 13, 2007 2:47 pm

Post » Sat Nov 17, 2012 8:48 am

Yep, I've got both the haskeyword check and the GetItemCount check set to run on target. I had the HasKeyword check set to subject before your post. I'm checking to see if that fixed anything.

Edit: Okay so I even attached a check to my base case so that it would only appear if the GetItemCount of FoodVenison was < 3 . This time the topic text didn't appear for either the trade venison or base case topic.
User avatar
Racheal Robertson
 
Posts: 3370
Joined: Thu Aug 16, 2007 6:03 pm

Post » Fri Nov 16, 2012 11:32 pm

Yep, I've got both the haskeyword check and the GetItemCount check set to run on target. I had the HasKeyword check set to subject before your post. I'm checking to see if that fixed anything.

Edit: Okay so I even attached a check to my base case so that it would only appear if the GetItemCount of FoodVenison was < 3 . This time the topic text didn't appear for either the trade venison or base case topic.

What are your conditions and their settings mate?
User avatar
Scott Clemmons
 
Posts: 3333
Joined: Sun Sep 16, 2007 5:35 pm

Post » Sat Nov 17, 2012 1:54 am

Target: T
Function Name: GetItemCount
Function Info: Potion 'FoodVenison'
Comp: >=
Value: 3
AND

Target:T
Function Name: HasKeyword
Function Info: Keyword: 'MeatVenison'
Comp: ==
Value = http://forums.bethsoft.com/topic/1395667-quick-questions-quick-answers-thread-5/1.0

These are the conditions for just the venison but the same is repeated for all other trade options (they don't work either).
The conditions for the base case is just that the GetItemCount of each meat type is less than the accepted amount.

ie. One of the conditions is GetItemCount < 3.
User avatar
OnlyDumazzapplyhere
 
Posts: 3445
Joined: Wed Jan 24, 2007 12:43 am

Post » Sat Nov 17, 2012 12:18 am

Target: T
Function Name: GetItemCount
Function Info: Potion 'FoodVenison'
Comp: >=
Value: 3
AND

Target:T
Function Name: HasKeyword
Function Info: Keyword: 'MeatVenison'
Comp: ==
Value = http://forums.bethsoft.com/topic/1395667-quick-questions-quick-answers-thread-5/1.0

These are the conditions for just the venison but the same is repeated for all other trade options (they don't work either).
The conditions for the base case is just that the GetItemCount of each meat type is less than the accepted amount.

ie. One of the conditions is GetItemCount < 3.

Ok the second condition, HasKeyword... you're saying that the target has the keyword MeatVenison, which I don't think the player has :wink:

So my perks to increase animal damage, the condition for it is Subject HasKeyword == Animal.
User avatar
Aaron Clark
 
Posts: 3439
Joined: Fri Oct 26, 2007 2:23 pm

Post » Fri Nov 16, 2012 11:46 pm

Ok the second condition, HasKeyword... you're saying that the target has the keyword MeatVenison, which I don't think the player has :wink:

So my perks to increase animal damage, the condition for it is Subject HasKeyword == Animal.

Ah hah! You're very right. As I told you before, I translated a lot of this from that FavorJobsMineOre. I didn't quite understand what many of the properties and conditions were but I put them in anyway.

When I read the TradeOre condition HasKeyword: MinerIron as the player having an item that has the keyword MinerIron. Instead of it being the keyword attached to the NPC so that the right prompt would appear. It's been this single condition that has caused the problems. The dialogue prompt for selling Iron only appears if the npc being spoken to has the MinerIron keyword.

I'm going to remove that condition and test it out. Thanks for helping me reach that ah-ha! moment.
User avatar
Leilene Nessel
 
Posts: 3428
Joined: Sun Apr 15, 2007 2:11 am

Post » Sat Nov 17, 2012 1:39 pm

Ah hah! You're very right. As I told you before, I translated a lot of this from that FavorJobsMineOre. I didn't quite understand what many of the properties and conditions were but I put them in anyway.

When I read the TradeOre condition HasKeyword: MinerIron as the player having an item that has the keyword MinerIron. Instead of it being the keyword attached to the NPC so that the right prompt would appear. It's been this single condition that has caused the problems. The dialogue prompt for selling Iron only appears if the npc being spoken to has the MinerIron keyword.

I'm going to remove that condition and test it out. Thanks for helping me reach that ah-ha! moment.

You're welcome mate always a pleasure :)
User avatar
Bellismydesi
 
Posts: 3360
Joined: Sun Jun 18, 2006 7:25 am

Post » Sat Nov 17, 2012 8:47 am

Well, this is a really basic question I guess. If I want to select a vanilla texture for something (a tintmask in this case), do I actually have to unpack the .bsa it's in to select the file? Or can I point it to the texture while it's still in the .bsa somehow?
User avatar
carly mcdonough
 
Posts: 3402
Joined: Fri Jul 28, 2006 3:23 am

Post » Sat Nov 17, 2012 3:15 am

Well, this is a really basic question I guess. If I want to select a vanilla texture for something (a tintmask in this case), do I actually have to unpack the .bsa it's in to select the file? Or can I point it to the texture while it's still in the .bsa somehow?

If you make a new item I think so. Duplicating and then editing the details it shouldn't.
User avatar
Imy Davies
 
Posts: 3479
Joined: Fri Jul 14, 2006 6:42 pm

Post » Sat Nov 17, 2012 1:52 am

Okay now that I realize I was using the Keyword condition wrong I think my script may be borked. So I am starting over.

My issue, I need the script to have a parameter on which meat type is being traded.

Ill post what code I've got to see if someone can assist

Scriptname ORCJobsHuntMeatScript extends QuestInt Property PlayerMeatCounter  AutoGlobalVariable Property VenisonCount  AutoFormList Property MeatList  AutoPotion Property Venison  AutoLeveledItem Property VenisonReward3  AutoKeyword Property MeatVenison  AutoFunction TradeVenison()  ;Count the # of venison	PlayerMeatCounter = Game.GetPlayer().GetItemCount(Venison)  	;	If PlayerMeatCounter >= 3		Game.GetPlayer().AddItem(VenisonReward3,1)		Game.GetPlayer().RemoveItem(Venison,PlayerMeatCounter)	EndIfEndFunction

Edit: Oh and even though the dialogue conditionals are met I still can't get the dialogue option to pop up. I did remove the keyword condition as well.

Edit2: Nevermind! For some reason the condition reset to default. It works! The NPC took 3 venison and gave me an single item from my leveled list in return! However, I still need a way to make it more portable, my guess is it would involve adding a parameter to the function that would check for the Keyword of the meat and then match the keyword parameter to the meat type and basing my ifs off of that. Then in each individual fragment (depending on the topic) I would add the meat or the keyword as a property and pass it through the parameter in the fragment.
User avatar
Agnieszka Bak
 
Posts: 3540
Joined: Fri Jun 16, 2006 4:15 pm

Post » Sat Nov 17, 2012 11:43 am

Have you made a messagebox property and attached your new messagebox (from the object window) to it?

I didn't think that was necessary if using debug.messagebox. At least it wasn't for the Hello World tutorial, idk. Can't hurt to try.
User avatar
Enie van Bied
 
Posts: 3350
Joined: Sun Apr 22, 2007 11:47 pm

Post » Sat Nov 17, 2012 11:18 am

I didn't think that was necessary if using debug.messagebox. At least it wasn't for the Hello World tutorial, idk. Can't hurt to try.

You don't need a Property to use a Debug messagebox.

What are you attaching the scripts in question to? In order for them to work as intended, you need to attach them to the Player in some manner (Aliases are best).
User avatar
Shelby Huffman
 
Posts: 3454
Joined: Wed Aug 08, 2007 11:06 am

Post » Sat Nov 17, 2012 8:37 am

Quick Question:
Can I make an object in the creation kit use game data for names? example: [player-name]'s boots
User avatar
Eddie Howe
 
Posts: 3448
Joined: Sat Jun 30, 2007 6:06 am

Post » Fri Nov 16, 2012 11:36 pm

Quick Question:
Can I make an object in the creation kit use game data for names? example: [player-name]'s boots
Text substitution ... but you can't use it to name items (only in books and quest text) :(

http://www.creationkit.com/Text_Replacement
User avatar
Jennifer May
 
Posts: 3376
Joined: Thu Aug 16, 2007 3:51 pm

Post » Fri Nov 16, 2012 9:43 pm

Anyone have a good way to use gender dependent forms of address other than those listed on the wiki?

I have a salesman that I'd like to call the PC "Sir" or "Madam" depending on gender. I can make two identical topics with the replies all conditional on player six ... but I'd sooner not if possible
User avatar
Holli Dillon
 
Posts: 3397
Joined: Wed Jun 21, 2006 4:54 am

Post » Sat Nov 17, 2012 7:34 am

Anyone have a good way to use gender dependent forms of address other than those listed on the wiki?

I have a salesman that I'd like to call the PC "Sir" or "Madam" depending on gender. I can make two identical topics with the replies all conditional on player six ... but I'd sooner not if possible
I never found a way to script dialogue, doc - I wanted to do a similar thing.

Text substitution would also not work

(if you do find a way, let us all know :wink:)


Edit:
Actually ... You could have a Story Manager Event http://www.creationkit.com/Actor_Hello_Event ... player or other npc ... that forces the Say command http://www.creationkit.com/Say_-_ObjectReference?

(tbh, I think two lines is easier!)
User avatar
Tiffany Carter
 
Posts: 3454
Joined: Wed Jul 19, 2006 4:05 am

Post » Sat Nov 17, 2012 8:04 am

So I made a book to try out some of the formatting to see if I can do everything correctly. And I'm having trouble with Bold and Italics lol.
This is what is in the Book Text field...

Raylon

Raylon

Raylon

Hand Written

All three Raylons show up but are all the same (granted I have no idea if the third one is how you bold and italicize). The HandwrittenFont one does work.
User avatar
GRAEME
 
Posts: 3363
Joined: Sat May 19, 2007 2:48 am

Post » Sat Nov 17, 2012 10:33 am

I've never tried to use or (or anything like that), Only the fonts (which all work, afaik)

I would imagine you have to do:

User avatar
Dalley hussain
 
Posts: 3480
Joined: Sun Jun 18, 2006 2:45 am

PreviousNext

Return to V - Skyrim