Jump to content

Photo

Creation Kit Fragments aren't working properly

creation kit fragments scripting bugs

  • Please log in to reply
4 replies to this topic

#1
fredricmourath

fredricmourath

    Journeyman

  • Members
  • Pip
  • 41 posts

Hey, everyone! If you'd like to quickly help without reading this entire post, I would love it if someone who uses for example Notepad++ to write Papyrus could take the file in the Google Drive-link below and send back a readable text file or image or something to me, so that I can debug it properly, as the CK's error messages aren't giving me enough information. I haven't been able to get Notepad++ working with Papyrus myself. If you have the time though, I'd really apreciate it if you'd read the entire post, in case you have any insight into my problem.

 

https://drive.google...iew?usp=sharing

 

So, where to even start? I'm making a quest mod, and I have written a script (we'll call it the Scavenger script) to make some enemies aggro at a certain point, and in the Quest Stages tab I've written a bunch of Papyrus fragments. At some point, the compiler started throwing up this error:

 

 

Papyrus Compiler Version 2.8.0.4 for Fallout 4
Copyright © ZeniMax Media. All rights reserved.
Starting 1 compile threads for 1 files...
Compiling "Fragments:Quests:QF_FieldDayQuest_0100CF18"...
C:\Users\fredr\AppData\Local\Temp\PapyrusTemp\Fragments\Quests\QF_FieldDayQuest_0100CF18.psc(130,22): cannot name a variable or property the same as a known type or script
No output generated for Fragments:Quests:QF_FieldDayQuest_0100CF18, compilation failed.
 
Batch compile of 1 files finished. 0 succeeded, 1 failed.
Failed on Fragments:Quests:QF_FieldDayQuest_0100CF18
 
 
This happened while I was changing some completely unrelated things in the Scavenger script. Everything had worked perfectly before, it had compiled everything smoothly, and I wasn't changing any names of any variables or properties. Just to make sure, I still changed all my property names to more distinct names, but the problem persisted. The error seems to be in the script-file which holds all of the given quest's Papyrus Fragments. I've been over all of my fragments, both in the Quest data tab and in the Scenes, over and over again and found nothing that could cause this error. I even deleted the Scavenger script and all references to it in the quest stage fragments, and the error still happened. So I decided to try to open the fragment script that the CK was pointing to, but obviously most of the letters are messed up when you open it with a text editor. Still, some letters were intact, and I could see the OLD names of my functions, from before I changed them to try to make them more unque.
 
 
Again, these functions never caused any problems at first, but they're called MakeHostile and MakeFriendly, so I thought maybe they conflicted with some known type or script. The point is, the script file that the CK was complaining about seems to be bugged, or hasn't been updated to reflect what I've actually written in the fragments in the CK. I tried deleting it from the Scripts-folder in the directory, but nothing changes. As you can see, the error message is pointing to some Temp-folder in AppData, and when I open that folder it is always completely empty.
 
So, yeah. What do I do? Has anyone run into this before? Is there anyway I can force the CK to create a new fragment script for my quest? If no one knows any solution, I'd still be very appreciative if someone could run the file I linked to through Notepad++ or something and either send me an image or a text file or something, if possible with proper line spacing so that I can use the error message to find the source of the problem, but I really don't know what's possible. Either way, any help is much appreciated!


#2
IsharaMeradin

IsharaMeradin

    The Pale Redguard

  • Members
  • PipPipPipPipPip
  • 10,438 posts

Notepad++ is incapable of reading PEX files.  The PEX would need to be converted into a PSC before Notepad++ (or any other text editor) could view it.

Champollion can convert PEX files into a readable and re-usable PSC file.  However, the format will be a little bit different than the original PSC.

 

It should be noted that if you are having an issue compiling a script (including fragments), any existing PEX file associated will not reflect the recent changes.  This is due to the fact that when the compiler fails, it does not create the PEX file at all.

 

In order for anyone to assist, you will need to post the compiler error as well as the PSC file.  If the PSC file is too huge or it is certain that the issue lies within a specific event or fragment block, then post that.

 

Without seeing the PSC code, I would have to guess that you might have a syntax error and the compiler is misinterpreting a call to a function or property on another script as a separate variable or property local to the script being compiled.  But that is just a guess and in no way the only means to produce such a compiler error.



#3
SKK50

SKK50

    Institutum delenda est

  • Premium Member
  • 5,782 posts

Another reason why script fragments are pure ass to maintain. 

 

Create Stage functions in your main quest script and just call them (as long as there are no long WHILE or WAIT blocking calls). 

Old: MyQuestName.SetStage(20)

New: (MyQuestName as MyQuestNameScript).Stage20() 

Then you can delete the quest stage fragment script(s) and be more happy. 

 

 

This random advice is from maintaining half a million lines of papyrus.



#4
fredricmourath

fredricmourath

    Journeyman

  • Members
  • Pip
  • 41 posts

Notepad++ is incapable of reading PEX files.  The PEX would need to be converted into a PSC before Notepad++ (or any other text editor) could view it.

Champollion can convert PEX files into a readable and re-usable PSC file.  However, the format will be a little bit different than the original PSC.

 

It should be noted that if you are having an issue compiling a script (including fragments), any existing PEX file associated will not reflect the recent changes.  This is due to the fact that when the compiler fails, it does not create the PEX file at all.

 

In order for anyone to assist, you will need to post the compiler error as well as the PSC file.  If the PSC file is too huge or it is certain that the issue lies within a specific event or fragment block, then post that.

 

Without seeing the PSC code, I would have to guess that you might have a syntax error and the compiler is misinterpreting a call to a function or property on another script as a separate variable or property local to the script being compiled.  But that is just a guess and in no way the only means to produce such a compiler error.

 

Thanks so much for the response and the advice!

 

I think I solved it, and the implications for the CK are so stupid that I figured I'd post it here in case anyone else runs into this.

 

Appearently, in my confusion while trying to understand some Actor functions, I created a Scriptable Object-reference I shouldn't have with a name it shouldn't have had in the Properties. Stupid of me, I know, but the problem is that the CK doesn't allow you to delete any properties in the Properties window, so I figured if I just left it unfilled it'd be fine. Otherwise, you'd figure they'd let you delete them, right? Anyway, I guess I kind of forgot it was there. I wasn't using it anywhere, but its existence meant that the Quest Stages Fragments script couldn't compile. Since the actual script was hidden from me, I couldn't figure it out last night. This morning though, I realized the problem might lie with some unused property, so I went to the quest stages tab and clicked the Properties button, and lo and behold - the goddamn button wasn't working. This usually resolves itself when I restart the program, but it didn't this time. The only other way I know how to resolve it is to compile a fragment, and now you see the problem. A property made me unable to compile, and I couldn't access the properties without compiling first. I usually defend the CK but this has got to be some of the supidest s*** I've ever seen. It gives me a whole new level of appreciation for Unity. Anyway, I realized I'd forgotten to check out the Advanced tab above the papyrus fragment, and I was able to access the hidden script from there by pressing Edit. I deleted the problematic property from there, and other than some alias properties defaulting for some reason, everything seems to be working now (as far as I can tell). I could compile without any errors and the property in question is no longer in the list in the Proprties window. So yeah, that's the end of that, I hope. Sorry for the long text, I guess I just had to vent a little.

 

TLDR:

 

I had a Property in the Quest Stages fragments which shared a name with some known type or script (meaning something already defined and commonly used by the CK). Despite being unfilled it caused a compiler error, and it had to be deleted, which can be done through the Advanced tab above the fragment box and then Edit Script. In my case all the properties were at the very bottom of the script (which seems counterintuitive but ok Bethesda).

 

The CK takes no prisoners and offers no forgiveness. Submit to its will and pray for mercy.



#5
fredricmourath

fredricmourath

    Journeyman

  • Members
  • Pip
  • 41 posts

Another reason why script fragments are pure ass to maintain. 

 

Create Stage functions in your main quest script and just call them (as long as there are no long WHILE or WAIT blocking calls). 

Old: MyQuestName.SetStage(20)

New: (MyQuestName as MyQuestNameScript).Stage20() 

Then you can delete the quest stage fragment script(s) and be more happy. 

 

 

This random advice is from maintaining half a million lines of papyrus.

 

That's good advice, I think I'll try to stay away from fragments when I can, haha. Thanks!







Also tagged with one or more of these keywords: creation kit, fragments, scripting, bugs

IPB skins by Skinbox
Page loaded in: 1.014 seconds