Quick Questions, Quick Answers Thread #8

Post » Mon Nov 19, 2012 7:20 am

http://www.gamesas.com/topic/1348211-the-quick-ck-questions-thread/ | http://www.gamesas.com/topic/1353350-quick-ck-questions-thread-2/ | http://www.gamesas.com/topic/1365336-quick-questions-quick-answers-the-3rd/ | http://www.gamesas.com/topic/1373468-quick-questions-quick-answers-thread-4/ | http://www.gamesas.com/topic/1395667-quick-questions-quick-answers-thread-5/ | http://www.gamesas.com/topic/1406245-quick-questions-quick-answers-thread-6/ | http://www.gamesas.com/topic/1411305-quick-questions-quick-answers-thread-7/


Have a quick question? Need a quick answer? If you have not had any luck with the http://www.creationkit.com/Main_Page, post away and hopefully someone will have the answer(s) you seek.
User avatar
lydia nekongo
 
Posts: 3403
Joined: Wed Jul 19, 2006 1:04 pm

Post » Mon Nov 19, 2012 2:53 pm

Thank you so much Thomas for your thorough answer! :smile:

http://www.gamesas.com/topic/1411305-quick-questions-quick-answers-thread-7/page__view__findpost__p__21608172
User avatar
Ryan Lutz
 
Posts: 3465
Joined: Sun Sep 09, 2007 12:39 pm

Post » Mon Nov 19, 2012 10:53 am

What is the ini edit for forcing skyrim to draw objects near to the camera?

For example when in 3rd person and free camera mode, if I were to zoom in on the player's (or any actor's) face when I get reasonably close it turns invisible. I see in most ENB post screens of the camera very close to certain objects. How do they achieve this?
User avatar
ShOrty
 
Posts: 3392
Joined: Sun Jul 02, 2006 8:15 pm

Post » Mon Nov 19, 2012 2:42 pm

ok, so i made my object a "Quest Object" and now i want to clear the alias after 3 days upon recieving the object, i need to apply the script on the alias section or the object script? and how do i make a ref to the alias?
User avatar
Nany Smith
 
Posts: 3419
Joined: Sat Mar 17, 2007 5:36 pm

Post » Mon Nov 19, 2012 7:17 am

ok, so i made my object a "Quest Object" and now i want to clear the alias after 3 days upon recieving the object, i need to apply the script on the alias section or the object script? and how do i make a ref to the alias?
Fill the alias with http://www.creationkit.com/ForceRefTo_-_ReferenceAlias (necessitates also flagging it "Optional") and, in the ReferenceAlias script:

Spoiler
ScriptName EggScript Extends ReferenceAliasActor Property PlayerREF AutoEvent OnContainerChanged(ObjectReference akNewContainer, ObjectReference akOldContainer)	If akNewContainer == PlayerREF		GoToState("Incubating")		Debug.Notification("Incubating")		Hatch()	EndIfEndEventState Incubating	Event OnContainerChanged(ObjectReference akNewContainer, ObjectReference akOldContainer)		Debug.Notification("Container changed while incubating") ; This is unlikely, but can happen	EndEventEndStateFunction Hatch()	Utility.WaitGameTime(72.0)	Debug.Notification("Tweet tweet")	Clear()EndFunction
User avatar
Abi Emily
 
Posts: 3435
Joined: Wed Aug 09, 2006 7:59 am

Post » Mon Nov 19, 2012 10:07 am

Fill the alias with http://www.creationkit.com/ForceRefTo_-_ReferenceAlias (necessitates also flagging it "Optional") and, in the ReferenceAlias script:
Spoiler
ScriptName EggScript Extends ReferenceAlias Actor Property PlayerREF Auto Event OnContainerChanged(ObjectReference akNewContainer, ObjectReference akOldContainer) If akNewContainer == PlayerREF GoToState("Incubating") Debug.Notification("Incubating") Hatch() EndIf EndEvent State Incubating Event OnContainerChanged(ObjectReference akNewContainer, ObjectReference akOldContainer) Debug.Notification("Container changed while incubating") ; This is unlikely, but can happen EndEvent EndState Function Hatch() Utility.WaitGameTime(72.0) Debug.Notification("Tweet tweet") Clear() EndFunction

inside the alias made an alias refering to an object(the egg) tickeed quest object and optional, and changed the script a bit to something like this

Spoiler
Scriptname ChickenEggAlias extends ReferenceAlias {Clear Chicken quest object alias}Actor Property PlayerREF AutoEvent OnContainerChanged(ObjectReference akNewContainer, ObjectReference akOldContainer)	    If akNewContainer == PlayerREF			    Hatch()	    EndIfEndEventFunction Hatch()	    Utility.WaitGameTime(72.0)	    Clear()EndFunction

but the thing is that i can still drop the egg, am i doing something wrong?
User avatar
jessica breen
 
Posts: 3524
Joined: Thu Aug 03, 2006 1:04 am

Post » Mon Nov 19, 2012 5:18 pm

Hmm. My egg cannot be dropped, regardless of whether reated 'At' or 'In' a player alias. Not sure why your egg can be dropped...
User avatar
Rachie Stout
 
Posts: 3480
Joined: Sun Jun 25, 2006 2:19 pm

Post » Mon Nov 19, 2012 8:06 am

Hmm. My egg cannot be dropped, regardless of whether reated 'At' or 'In' a player alias. Not sure why your egg can be dropped...

thanks for quicck reply, heres a shot of the window , see anything out of place or wrong? :S

http://i1093.photobucket.com/albums/i437/necrogaz/Untitled_zps1b2a8daa.png
User avatar
lilmissparty
 
Posts: 3469
Joined: Sun Jul 23, 2006 7:51 pm

Post » Mon Nov 19, 2012 9:28 am

Created At None. The egg needs to be created at or in another alias, like a player alias.
User avatar
Charlotte Henderson
 
Posts: 3337
Joined: Wed Oct 11, 2006 12:37 pm

Post » Mon Nov 19, 2012 4:32 pm

Created At None. The egg needs to be created at or in another alias, like a player alias.

i didnt got that part on the tutorial, what does that do?
User avatar
Trish
 
Posts: 3332
Joined: Fri Feb 23, 2007 9:00 am

Post » Mon Nov 19, 2012 8:55 pm

You're not experimenting with the right egg, somehow, which is why you can drop it. Make another reference alias preceding the egg alias to create the egg at. That egg will not be dropable until three days later when the alias is cleared.
User avatar
CYCO JO-NATE
 
Posts: 3431
Joined: Fri Sep 21, 2007 12:41 pm

Post » Mon Nov 19, 2012 6:06 pm

now i added an aias to the quest of an actor referin to the player and added script to check for eggs under ingredients and if i have 1 or more then proceed to next stage of the quest, but for some reason it wont check, nothing happnes, this is the script in the alias

Spoiler
Scriptname Checkforegg extends ReferenceAlias {Checks for egg in inv}Ingredient Property Egg autoQuest Property pet  Auto Event OnInit()if (Game.GetPlayer().GetItemCount (Egg) >= 1)done()endifendeventEvent OnItemAdded (Form akBaseItem, int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer)if akBaseItem == Egg && aiItemCount >= 1  done()endifendeventFunction done ()pet.SetObjectiveDisplayed(30)pet.SetStage(30)endfunction


Sorry for making so many question but im pretty new to this and its the first time that i attempt to make a mod :)
User avatar
kyle pinchen
 
Posts: 3475
Joined: Thu May 17, 2007 9:01 pm

Post » Mon Nov 19, 2012 7:41 pm

Try:
Spoiler
ScriptName CheckForEgg Extends ReferenceAlias ; Attached to PlayerAlias{Checks for egg in inv}Actor Property PlayerREF Auto ; Much less expensive than GetPlayerIngredient Property Egg AutoQuest Property Pet AutoEvent OnInit()	AddInventoryEventFilter(Egg)	Utility.Wait(3.0) ; Wait for aliases to be filled or the egg will not be there as this alias is filled first	If PlayerREF.GetItemCount(Egg) ; No space necessary after function/event names. >= is also unnecessary.		Done()	EndIfEndEventEvent OnItemAdded(Form akBaseItem, Int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer)	If akBaseItem == Egg ; Code below will not fire if aiItemCount is 0 and it will never be < 0 		Done()	EndIfEndeventFunction Done()	Pet.SetObjectiveDisplayed(30)	Pet.SetStage(30)Endfunction
Just make sure all your properties are filled. I'm sure an OnContainerChanged event from the egg's script will fire when the egg is created if neither of those checks work.
User avatar
Andrew Tarango
 
Posts: 3454
Joined: Wed Oct 17, 2007 10:07 am

Post » Mon Nov 19, 2012 12:05 pm

Try:
Spoiler
ScriptName CheckForEgg Extends ReferenceAlias ; Attached to PlayerAlias{Checks for egg in inv}Actor Property PlayerREF Auto ; Much less expensive than GetPlayerIngredient Property Egg AutoQuest Property Pet AutoEvent OnInit()	AddInventoryEventFilter(Egg)	Utility.Wait(3.0) ; Wait for aliases to be filled or the egg will not be there as this alias is filled first	If PlayerREF.GetItemCount(Egg) ; No space necessary after function/event names. >= is also unnecessary.		Done()	EndIfEndEventEvent OnItemAdded(Form akBaseItem, Int aiItemCount, ObjectReference akItemReference, ObjectReference akSourceContainer)	If akBaseItem == Egg ; Code below will not fire if aiItemCount is 0 and it will never be < 0		Done()	EndIfEndeventFunction Done()	Pet.SetObjectiveDisplayed(30)	Pet.SetStage(30)Endfunction
Just make sure all your properties are filled. I'm sure an OnContainerChanged event from the egg's script will fire when the egg is created if neither of those checks work.

this one for checking that i have a normal egg, the quest its meant to be as follows

Talk to npc
She request a Chicken egg (the ingridient)
once i have the egg i have to go to deliver the egg to the npc
the NPC will trade my chicken egg for a hatchable egg
after 3 days the egg will hatch and spawn a chicken wich we have to tal to to complete the quest

Edit:

Here are a couple of photos for better understanding

http://i1093.photobucket.com/albums/i437/necrogaz/Untitled1_zps62e68762.png
http://i1093.photobucket.com/albums/i437/necrogaz/Untitled2_zpsa0d1f121.png
User avatar
Laura Elizabeth
 
Posts: 3454
Joined: Wed Oct 11, 2006 7:34 pm

Post » Mon Nov 19, 2012 3:01 pm

Hi,
I've got two problems:

1) I'm trying to get rid of the main quest line. I somehow managed this by removing the automatic start of MQ103 (Bleak Falls Barrow) in MQ102, but I can't get rid of the last scene, the one where, after giving us the reward for reporting the dragon attack on Helgen, Balgruuf invites us to meet Farengar. He says his line "There is another thing you could do for me. Suitable for someone of your particular talents, perhaps.", gets up and go to Farengar. I'd like to get rid of that bit of scene that has become useless. Do you have any idea how I can do that? I cannot find this scene in the "dialogue" and "scenes" tabs of the MQ102 form.

2) I'd like the player not to absorb dragons souls. I've already got an explanation about how soul absorption works (here: http://www.gamesas.com/topic/1411305-quick-questions-quick-answers-thread-7/page__st__180__p__21608172#entry21608172) but I cannot figure out how to change the scripts so that absorption doesn't happen. :(

Thank you very much for your help! :smile:
User avatar
Emma louise Wendelk
 
Posts: 3385
Joined: Sat Dec 09, 2006 9:31 pm

Post » Mon Nov 19, 2012 5:43 pm

Sorry to repeat the same question, but I didn't get an answer in the last thread: can the CK clean a plugin? I've read marking a reference as 'Ignored', saving and reloading should work, but after reloading every change is still there. Also, the Object Window says I changed some refs, but those changes do not appear in the Details window. What gives?
User avatar
BaNK.RoLL
 
Posts: 3451
Joined: Sun Nov 18, 2007 3:55 pm

Post » Mon Nov 19, 2012 6:58 pm

Did you make any other changes in the CK after you hit the Ignore button? I find it only actually updates the file if I go into a cell, move something, save and exit with the bits Ignored that I want gone. The next time I load the file, they are indeed gone.

My problem is that I can't view/edit scripts. If I try to open them in Scrit Manager (i.e. within the CK, I get some error message about not being able to open some .psc external program. If I try to open them with Notepad through the Data folder, I just get a string of gibberish - like if you try to open a Word file in Notepad. You do get some text, but a load of other stuff thrown in to make it incomprehensible.
User avatar
мistrєss
 
Posts: 3168
Joined: Thu Dec 14, 2006 3:13 am

Post » Mon Nov 19, 2012 9:19 pm

How can I run the GetIsPlayableRace function inside a script? It works very well as a dialogue/package condition, but I need something similar in a script to filter things like chickens, cows and wolves...

I just can't get it to work, is it possible at all?
User avatar
Charlotte Henderson
 
Posts: 3337
Joined: Wed Oct 11, 2006 12:37 pm

Post » Mon Nov 19, 2012 9:27 am

Pscs are your scripts, and they're in the Scripts\Source folder. Pex files are compiled scripts, which means they're gibberish to us.
User avatar
josie treuberg
 
Posts: 3572
Joined: Wed Feb 07, 2007 7:56 am

Post » Mon Nov 19, 2012 5:57 pm

No, GetIsPlayableRace is a condition function, not a Papyrus function. You could use a formlist of the playable races and see if GetRace() returns something in it.
User avatar
Chloe Mayo
 
Posts: 3404
Joined: Wed Jun 21, 2006 11:59 pm

Post » Mon Nov 19, 2012 3:21 pm

Thanks, Ingenue. I will try your suggestion then.

Another question...

My mod is dependent on a spell that catches references with LOS around it and manages what it finds in a FormList. I'm firing this spell inside a script compiled only for this purpose. The cast function is inside an OnUpdate event that fires each 0.1 seconds...

Can this be problematic? I don't notice any lag, but I have a good PC... This won't cause save file bloating or any similar horrors, right?

Just in case you wonder what is inside the effect script:
Spoiler
Actor Property PlayerRef  AutoFormList Property HasLOSFormList  Auto  Armor Property CooldownItem  Auto Actor PlayerActor IndexHolderEvent OnEffectStart(actor Target, actor Caster)Player = Game.GetPlayer()If Target != Player && Target.HasLOS(Caster) && Target.GetItemCount(CooldownItem) == 0 ;&& Target.(GetBaseObject() as actor).GetIsPlayableRace()	Debug.Notification("I detect LOS...")	If HasLOSFormList.HasForm(Target) != True		Debug.Notification("I'm adding a form to the FormList")		HasLOSFormList.AddForm(Target)	EndIfEndIfif HasLOSFormList.GetSize() != 0	CleanFormList()endifEndEventint function CleanFormList()	int i = 0	while (i < HasLOSFormList.GetSize())		IndexHolder = (HasLOSFormList.GetAt(i) as ObjectReference) as actor		if !IndexHolder.HasLOS(Player)			HasLOSFormList.RemoveAddedForm(IndexHolder)		endif		i += 1	endwhileendFunction
User avatar
Ysabelle
 
Posts: 3413
Joined: Sat Jul 08, 2006 5:58 pm

Post » Mon Nov 19, 2012 9:19 am

The cast function is inside an OnUpdate event that fires each 0.1 seconds...

Can this be problematic? I don't notice any lag, but I have a good PC... This won't cause save file bloating or any similar horrors, right?

0.1? I'd say that could definitely be a problem, and cause file bloat if you're using RegisterForUpdate() rather than RegisterForSingleUpdate(). Formlists aren't the fastest thing around, either.
User avatar
Laura Shipley
 
Posts: 3564
Joined: Thu Oct 26, 2006 4:47 am

Post » Mon Nov 19, 2012 8:26 am

Spoiler
Actor Property PlayerRef  AutoFormList Property HasLOSFormList  Auto  Armor Property CooldownItem  AutoActor PlayerActor IndexHolderEvent OnEffectStart(actor Target, actor Caster)Player = Game.GetPlayer()If Target != Player && Target.HasLOS(Caster) && Target.GetItemCount(CooldownItem) == 0 ;&& Target.(GetBaseObject() as actor).GetIsPlayableRace()	Debug.Notification("I detect LOS...")	If HasLOSFormList.HasForm(Target) != True		Debug.Notification("I'm adding a form to the FormList")		HasLOSFormList.AddForm(Target)	EndIfEndIfif HasLOSFormList.GetSize() != 0	CleanFormList()endifEndEventint function CleanFormList()	int i = 0	while (i < HasLOSFormList.GetSize())		IndexHolder = (HasLOSFormList.GetAt(i) as ObjectReference) as actor		if !IndexHolder.HasLOS(Player)			HasLOSFormList.RemoveAddedForm(IndexHolder)		endif		i += 1	endwhileendFunction
Try updating (single updates only) at 0.25 intervals? Running that ten times a second is bound to be overkill. Also, try:
Spoiler
Actor Property PlayerREF AutoFormList Property HasLOSFormList AutoArmor Property CooldownItem AutoEvent OnEffectStart(Actor akTarget, Actor akCaster)	If akTarget.GetItemCount(CooldownItem)	ElseIf akTarget == PlayerREF ; PlayerREF suffices		If akTarget.HasLOS(akCaster)			Debug.Notification("I detect LOS...")			If !HasLOSFormList.HasForm(akTarget) ; != True				Debug.Notification("I'm adding a form to the FormList")				HasLOSFormList.AddForm(akTarget)			EndIf		EndIf	EndIf	If HasLOSFormList.GetSize() ; != 0 ; <-- Not needed and adds unnecessary 'expense'		CleanFormList(HasLOSFormList, PlayerREF)	EndIfEndEventInt Function CleanFormList(FormList akFLST, Actor akBeholder) Global	Int iIndex = akFLST.GetSize()	While iIndex > 0		iIndex -= 1		Actor kActor = akFLST.GetAt(iIndex) As Actor ; Actor was added to FLST, so no other casting is necessary		If !kActor.HasLOS(akBeholder)			akFLST.RemoveAddedForm(kActor)		EndIf	EndWhileEndFunction
It'll be substantially less 'expensive'/resource consumptive.
User avatar
Jade MacSpade
 
Posts: 3432
Joined: Thu Jul 20, 2006 9:53 pm

Post » Mon Nov 19, 2012 1:16 pm

Wow! Thanks a lot to both of you! And good that I found out soon about the too fast interval and RegisterForUpdate issues...

I will try this right away. A lot of nifty tricks I'm learning here! :)

And while I'm at it, and you both seem in the mood to help newbies, is there anywhere a tutorial about creating interrupt packages? (The wiki one doesn't seem newbie proof) I need one to check if armor in a specific slot is equipped or not, and let the surrounding NPC's react to it by stopping and watching. I got the package done, but I'm not sure I defined it correctly as an interrupt package (have it selected as an Spectator interrupt override). I need all NPC's to have acces to it, but don't know how to do this. Also, are the interrupt overrides predefined? Can a Spectator Package only run if there is combat???
User avatar
Laura Mclean
 
Posts: 3471
Joined: Mon Oct 30, 2006 12:15 pm

Post » Mon Nov 19, 2012 7:46 pm

Pscs are your scripts, and they're in the Scripts\Source folder. Pex files are compiled scripts, which means they're gibberish to us.

Oh, thanks!

I was looking for BYOH_TIF__0100B0B3, which apparently is the one prompted by dialogue to furnish your house in Hearthfire, but I can't find it in that folder. I can find other scripts such as the workbench script, but just not that one. Any ideas?
User avatar
Gen Daley
 
Posts: 3315
Joined: Sat Jul 08, 2006 3:36 pm

Next

Return to V - Skyrim