Jump to content

Quick Questions, Quick Answers


Mattiewagg

Recommended Posts

For my first mod I wanted to make a mod similar to Cannabis Skyrim by MadNuttah and Virakotxa. I made an effect with an image space modifier and added it to an item, but when the item is eaten the ISM doesn't activate.

Link to comment
Share on other sites

  • Replies 2.6k
  • Created
  • Last Reply

Top Posters In This Topic

Determine a stage of a quest on a fragment of that quest:

If GetOwningQuest().GetStage() == 30
  ;do something
EndIf

However, once you use SetStage(30) you are on stage 30 and the previous stage is done.

 

 

******************

Regarding the part copied from a post I made before...

Basically, the quest fragment script needs to exist before properties and code that uses properties can be added to it.

 

If you have not created any fragments for that quest yet, then there is no existing script and you need to have the CK create it. In order to do this, add a commented line or just a semi-colon ( :wink: and then compile. That causes the CK to create the script and make it possible for you to add properties and any code that uses those properties.

 

Should the quest fragment script already exist (there is only one per quest, all quest stage fragments are merged into a single script file), you can go ahead and add properties and/or code as needed.

 

OK, I was so hoping you would reply back to this, you have helped me in the past.

 

So the part where you say "should the quest fragment script already exist..." it does ( I think) , if I open the quest and the tabs show Quest data, Quest Stages, Quest Ogjectives and so on at the end is a tab "Scripts" with the following:

Scriptname QF_NGIJMeetingLealaQuest_040E24D8 Extends Quest Hidden

;place holder text
;BEGIN FRAGMENT CODE - Do not edit anything between this and the end comment
;NEXT FRAGMENT INDEX 4
Scriptname QF_NGIJMeetingLealaQuest_040E24D8 Extends Quest Hidden

;BEGIN FRAGMENT Fragment_1
Function Fragment_1()
;BEGIN CODE
SetStage(30)
;END CODE
EndFunction
;END FRAGMENT

;BEGIN FRAGMENT Fragment_0
Function Fragment_0()
;BEGIN CODE
SetStage(1)
;END CODE
EndFunction
;END FRAGMENT

;END FRAGMENT CODE - Do not edit anything between this and the begin comment

  

ObjectReference Property NGIJ_Leala  Auto  

ObjectReference Property NGIJ_LealaLeaveXmarker  Auto  

ObjectReference Property NGIJ_AfterMarker  Auto  

ObjectReference Property NGIJ_BeforeMarker  Auto   

So I think this is what you were saying should be there. Question I have (help I need) is How do I get this code to work

NGIJ_AfterMarker.Enable()
Utility.Wait(0.5)
Utility.Wait(0.5)
NGIJ_BeforeMarker.Disable()
Utility.Wait(0.8)
NGIJ_Leala.MoveTo(NGIJ_LealaLeaveXmarker) 

What I am attempting do do is

NGIJ_Aftermarker.Enable() -- this is linked to different lights which start disable (turn them On)

wait

wait

NGIJ_Beforemarker.Disable() -- turn off old lights

wait

NGIJ_Leala.MoveTo(NGIJ_LealaLeaveXmarker) -- have the follower move to an Xmarker (which I do have setup) , I actually want her to walk up the stairs and out the door... But I can't seem to get any movement.

 

And I am assuming that any script (this script, but corrected) should be added at the end of the script after the ObjectReference Property NGIJ_BeforeMarker Auto ?

 

 

Your help is greatly appreciated. :wink:

 

UPDATE: so I did this:

Scriptname QF_NGIJMeetingLealaQuest_040E24D8 Extends Quest Hidden

;place holder text
;BEGIN FRAGMENT CODE - Do not edit anything between this and the end comment
;NEXT FRAGMENT INDEX 4


;BEGIN FRAGMENT Fragment_1
Function Fragment_1()
;BEGIN CODE
SetStage(30)
;END CODE
EndFunction
;END FRAGMENT

;BEGIN FRAGMENT Fragment_0
Function Fragment_0()
;BEGIN CODE
SetStage(1)
;END CODE
EndFunction
;END FRAGMENT

;END FRAGMENT CODE - Do not edit anything between this and the begin comment
;line25
  

ObjectReference Property NGIJ_Leala  Auto  

ObjectReference Property NGIJ_LealaLeaveXmarker  Auto  

ObjectReference Property NGIJ_AfterMarker  Auto  

ObjectReference Property NGIJ_BeforeMarker  Auto  

If GetOwningQuest().GetStage() == 30
	NGIJ_AfterMarker.Enable()
  	Utility.Wait(0.5)
  	Utility.Wait(0.5)
  	NGIJ_BeforeMarker.Disable()
  	Utility.Wait(0.8)
  	NGIJ_Leala.MoveTo(NGIJ_LealaLeaveXmarker)
	Debug.MessageBox("You have entered  stage 30 !")
EndIf


And Get this error:

Starting 1 compile threads for 1 files...
Compiling "QF_NGIJMeetingLealaQuest_040E24D8"...
E:\GAMES\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\QF_NGIJMeetingLealaQuest_040E24D8.psc(36,0): missing EOF at 'If'
No output generated for QF_NGIJMeetingLealaQuest_040E24D8, compilation failed.
Link to comment
Share on other sites

@flyddon

 

When working with fragments (quest, topic, package, etc) you need to insert all your code within the appropriate fragment box. You tried to edit the full script instead. Even if you were successful in adding an appropriate event, it would not be used.

 

You need to decide at which stage you want that code to run and add it to that fragment box. If it is after dialog, you may want to consider adding it to the topic info rather than to the quest stages. That tho is trial and error to get the end result you want.

 

I actually haven't done much scripting with fragments, just enough to know that they must be handled differently than when editing/writing a full script.

Link to comment
Share on other sites

 

And Get this error:

Starting 1 compile threads for 1 files...
Compiling "QF_NGIJMeetingLealaQuest_040E24D8"...
E:\GAMES\Steam\steamapps\common\skyrim\Data\Scripts\Source\temp\QF_NGIJMeetingLealaQuest_040E24D8.psc(36,0): missing EOF at 'If'
No output generated for QF_NGIJMeetingLealaQuest_040E24D8, compilation failed.

 

 

Thats easy, you havn't put if... endif inside an Event or a Function. Code has to be contained inside one of those or it won't compile. Floating code not attached to anything doesn't do anything and the compiler will throw it out as an error.

 

n.b. from what I understand from that script you want to enable a certain set of markers when the quest reaches stage 30, yes?

 

In that case you'd add the code to the quest at stage 30. So open the quest stage box, assuming you've already created that stage, then enter

NGIJ_AfterMarker.Enable()
Utility.Wait(0.5)
Utility.Wait(0.5)
NGIJ_BeforeMarker.Disable()
Utility.Wait(0.8)
NGIJ_Leala.MoveTo(NGIJ_LealaLeaveXmarker)
Debug.MessageBox("You have entered stage 30 !"

That will add the code to the quest script and not the papyrus fragment. Fragments are for setting stages and other small things, the main quest functions should happen on the main quest script.

 

Secondly why are you using two half second waits?

Utility.Wait(0.5)
Utiltiy.Wait(0.5)

?

 

If you want to the script to pause for 1 second then a single

Utiltity.Wait(1.0)

will do.

Link to comment
Share on other sites

@IsharaMeradin

 

ok I think I am placing it where and how you say to , but still get an error.

 

http://i256.photobucket.com/albums/hh166/NAKED_GI_JOE/scriptcrap_zpsfc53vpen.png

 

Stage 20 set's the stage to 30 All I want is in stage 30 for her to move!

 

Also @SoupDragon if you could be so kind as to show me a simple event script for this.... cause I am not see how to create an event for this.

Link to comment
Share on other sites

ok So I am going to blame everything on CK !

 

You see the above screen shot and the error, well it worked. (almost) I ignored the error and saved , then X out then click OK. Then exited the quest all together, then went back in, went to the Scripts tab , edited the script (doing nothing) and saved and it was successful. And the first two before and After markers worked !!

 

I do not understand it but it worked.

 

Now I just need to figured out the correct script/code to make the NPC/follower leave or move.

 

 

UPDATE: I think I will try AI PACKAGE to get her to move or leave.

 

UPDATE to the UPDATE: I was able to use AI PACKAGE to get her to move, however DO NOT fill in the Owner Quest window, for some reason if you do it odes not work.

Link to comment
Share on other sites

hi, i have created a unique dialogue line for a npc, but i want it to only display when he is following the player, adding the "GetInFaction" = CurrentPlayerFaction as a condition doesn't seem to work, can anyone with some little explain what i'm missing?

Edited by TheBxushis
Link to comment
Share on other sites

Why do all these special horse mods needs to be summoned?



Does anyone also know a horse mod or more that doesn't need to be summond? Such as Flameable, Skeleton or Demon horse. As I want them in my herd with Convinent horses.


Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.

×
×
  • Create New...