Jump to content

Compiling Scripts


Recommended Posts

The compilation is recursive.   While it will not actually recompile dependent scripts, it will still check for their dependencies.    That is, 

If your script  references "Ingredient", you need Ingredient.psc.    

Ingredient  extends Form,  so you will also need Form.psc

Form has functions that take Actor parameters, so you need Actor.psc

Actor references Spell and ActorBase among others, so you need Spell.psc and ActorBase.psc

And so on and so forth.

SKSE includes extended versions of scripts such as Actor, Form, Spell etc,  but it will not include the basic object type scripts such as EquipSlot or HeadPart which it does not touch - so you need to get those scripts from the supplied Scripts.rar

Link to comment
Share on other sites

7 hours ago, PeterMartyr said:

it is still stating you have not unpacked the Scripts properly...

No, it's really not.

It's telling us that the psc scripts which ARE there are broken or inappropriate for 1.9.32.

As I said days ago, this is my directory structure:

C:\Steam\steamapps\common\Skyrim\Data\Scripts\Source

C:\Steam\steamapps\common\Skyrim\Papyrus Compiler

 

After my previous post I copied the SKSE scripts to Source, in case skse_1_07_03_installer.exe had not done it automatically, and now I get this error:

Starting 1 compile threads for 1 files...
Compiling "_shb_SUN_SilverWepSCRIPT"...


...\Source\ObjectReference.psc(3,0): mismatched input 'int' expecting SCRIPTNAME
...\Source\ObjectReference.psc(0,0): error while attempting to read script ObjectReference: Object reference not set to an instance of an object.
...\Source\Perk.psc(2,0): mismatched input 'int' expecting SCRIPTNAME
...\Source\Perk.psc(0,0): error while attempting to read script perk: Object reference not set to an instance of an object.
...\Source\_shb_SUN_SilverWepSCRIPT.psc(3,14): unknown type perk
...\Source\Actor.psc(3,0): missing SCRIPTNAME at 'Form'
...\Source\Actor.psc(3,5): required (...)+ loop did not match anything at input 'Function'
...\Source\Actor.psc(0,0): filename does not match script name: form
...\Source\Actor.psc(3,0): missing SCRIPTNAME at 'Form'
...\Source\Actor.psc(3,5): required (...)+ loop did not match anything at input 'Function'
...\Source\Actor.psc(0,0): filename does not match script name: form
...\Source\Actor.psc(3,0): missing SCRIPTNAME at 'Form'
...\Source\Actor.psc(3,5): required (...)+ loop did not match anything at input 'Function'
...\Source\Actor.psc(0,0): filename does not match script name: form
...\Source\_shb_SUN_SilverWepSCRIPT.psc(6,19): AddPerk is not a function or does not exist
...\Source\Quest.psc(3,0): missing SCRIPTNAME at 'Quest'
...\Source\Quest.psc(3,6): required (...)+ loop did not match anything at input 'Function'
...\Source\ObjectReference.psc(3,0): mismatched input 'int' expecting SCRIPTNAME
...\Source\ObjectReference.psc(0,0): error while attempting to read script objectreference: Object reference not set to an instance of an object.
...\Source\Debug.psc(52,44): unknown type objectreference
...\Source\ObjectReference.psc(3,0): mismatched input 'int' expecting SCRIPTNAME
...\Source\ObjectReference.psc(0,0): error while attempting to read script objectreference: Object reference not set to an instance of an object.
...\Source\Debug.psc(112,41): unknown type objectreference
...\Source\Actor.psc(3,0): missing SCRIPTNAME at 'Form'
...\Source\Actor.psc(3,5): required (...)+ loop did not match anything at input 'Function'
...\Source\Actor.psc(0,0): filename does not match script name: form
...\Source\Actor.psc(3,0): missing SCRIPTNAME at 'Form'
...\Source\Actor.psc(3,5): required (...)+ loop did not match anything at input 'Function'
...\Source\Actor.psc(0,0): filename does not match script name: form
...\Source\Actor.psc(3,0): missing SCRIPTNAME at 'Form'
...\Source\Actor.psc(3,5): required (...)+ loop did not match anything at input 'Function'
...\Source\Actor.psc(0,0): filename does not match script name: form
...\Source\_shb_SUN_SilverWepSCRIPT.psc(11,19): RemovePerk is not a function or does not exist
No output generated for _shb_SUN_SilverWepSCRIPT.psc, compilation failed.

Batch compile of 1 files finished. 0 succeeded, 1 failed.
Failed on _shb_SUN_SilverWepSCRIPT.psc

 

The compiled _shb_SUN_SilverWepSCRIPT.pex script is dated 17/12/2013, and back then I had none of these problems. The script just compiled nicely, Papyrus Script Manger opened in a few seconds rather than not at all and Compile Papyrus Scripts didn't take 15 minutes to open.

Clearly, the CK is not functioning the same way as it did in 2013/14, despite the fact that I have made no changes to anything. Well, I did move all the DLC scripts to Source following your advice, which I never did before as those psc files are not needed. All that did was make the Compile Papyrus Scripts take 15 minutes to open.

Maybe it is expecting the All-in-One Skyrim LE, rather than the original 1.9.32 and separate DLCs? Or, knowing Bethesda, it thinks I am running SSE! 😄

Any ideas?

 

Cheers!

 

 

 

 

 

Link to comment
Share on other sites

7 hours ago, scorrp10 said:

If your script  references "Ingredient", you need Ingredient.psc.    

Ingredient  extends Form,  so you will also need Form.psc

Form has functions that take Actor parameters, so you need Actor.psc

Yes, as I said earlier, those are all there but now I am getting different error messages when the compiling fails.

 

Link to comment
Share on other sites

7 hours ago, xkkmEl said:

Your script references a spell

No, it does not, actually. Please look at the "_shb_SUN_SilverWepSCRIPT" and error messages above. Forget the potion script, it's irrelevant, although that does not reference any spells, either.

 

7 hours ago, xkkmEl said:

I do not know why you believe compiling scripts worked in the past...

I do not "believe". I KNOW, because the "_shb_SUN_SilverWepSCRIPT.psc" script compiled on 17/12/2013, the pex still works in-game and now the psc will not compile, although I have changed nothing except by following the advice here. I've made several mods, with simple to fairly complex scripts, and they all compiled and worked perfectly. They used to be in my sig, but the new format of Nexus seems to have changed my profile and removed my sig. I've never made a bsa, though.

I also checked the full back up of the entire Steam directory on another drive, dated 15/07/2015, EG

J:\Elder Scrolls\Skyrim BAK_15-07-15\Steam\SteamApps\Common\Skyrim\Data\Scripts\Source

And guess what?

I never moved the DLC psc files to SOURCE then, either, at any time between February, 2012, and this week.

"But why not!?" they cry, clutching their pearls!  😄

Because we never needed to and I do not make any use of those files in my mods. But now the compiler takes 15 minutes to open and still fails every time, but for different reasons.

 

7 hours ago, xkkmEl said:

error messages may be difficult to interpret as they may be based on erroneous compiler decision

Well, I can believe that, as something about the CK no longer functions now as it did in 2012/13/14.

 

8 hours ago, xkkmEl said:

Until you get all of the core dependencies covered, you won't be able to compile anything.

Tried it, didn't work. So I think the only thing I can do is delete the CK completely and start again. I have backups of my mods, psc and pex files. Re-installing all my third party mods will be a real pain, though, it could take more than a week if I have to trace them and download them.

 

8 hours ago, xkkmEl said:

Also, compiling and running are two different things.

How could it run if it won't compile?  🤔

Yes, the "_shb_SUN_SilverWepSCRIPT.psc" script compiled on 17/12/2013 and the pex still works in-game, but I cannot compile new scripts to learn recipes from my new Alchemy Recipe Books. I cannot even compile scripts I have compiled before, almost 11 years ago, despite nothing being changed by ME. It must be the version of the CK I have, which IS for Skyrim LE.

 

8 hours ago, xkkmEl said:

No source scripts are needed to run the game, which is why the sources files are packed in a *.rar file by default.

Which is why I never moved the DLC psc files to SOURCE. I don't use them, but I've made five or six mods using scripts just fine.

 

8 hours ago, xkkmEl said:

These dependency webs, and more specifically that they include large numbers of seemingly arbitrary elements, is a common feature of modern programming languages, and a common source of frustration for programmers, even experienced ones (you just want to know if a spell is hostile, and suddenly the compiler forces you to deal with equipslot, when you neither know nor care about equipslots).

Well, I certainly believe that!

Thanks for taking the time for a detailed reply, I do appreciate it. I did learn something, but not how to fix the problem without a full re-install of the CK. 😞

 

Link to comment
Share on other sites

try this, create a new mod with Skyrim has a master, FYI open the Kit with skyrim selected but with no active plugin. we will make a Hello World Mod..

step one Save As  plugin as HelloWorld    😂😂😂(Hee-Hee)

duplicate a quest and remove all scripts, close and reopen

any issues, just close the quest and reopen it OK, the kit is buggy

create a new quest Script in the last tab on the right called it HelloWorldScript OK 😆

open the script and cut and paste this code 

ScriptName HelloWorldScript Extends Quest

Event OnInit()
    Debug.Messagebox("Hello World")
EndEvent

does it compile?

close and open make sure the script is attached, the kit is buggy.

if not add existing script and search for HelloWorldScript, and attach it

close and open again cos the kit is buggy to make sure it is attached 

save and start the game, did it say "Hello World"

Plus make sure the script name matches the file name OK?

Good luck

Link to comment
Share on other sites

13 minutes ago, PeterMartyr said:

we will make a Hello World Mod..

LOL!

From the Wiki?

Really?

OK, I'll give it a go.

 

 

Link to comment
Share on other sites

OK, that didn't work at all. I duplicated the Achievements quest.

When I tried to add a Script I got this:

image.png.96b482d222113b5177a78d9ba5372ee4.png

 

^^So what does that mean?

Then when I tried to add HelloWorldScript I got this:

Starting 1 compile threads for 1 files...
Compiling "HelloWorldScript"...


C:\Steam\steamapps\common\skyrim\Data\Scripts\Source\Quest.psc(3,0): missing SCRIPTNAME at 'Quest'
C:\Steam\steamapps\common\skyrim\Data\Scripts\Source\Quest.psc(3,6): required (...)+ loop did not match anything at input 'Function'
No output generated for HelloWorldScript, compilation failed.

Batch compile of 1 files finished. 0 succeeded, 1 failed.
Failed on HelloWorldScript

 

Then when I tried again it said the script already existed, but it is not there.

So I deleted the name "Achievements" of the script in the Quest Data tab and tried again, and it again said the HelloWorldScript already exists.

But it doesn't, although HelloWorldScript.psc exists in SOURCE but contains only

ScriptName HelloWorldScript Extends Quest

 

So I pasted the rest code into that and tried again.

It will be 15 minutes before the Compiler will open, and I bet it will fail again.

I'll keep you posted.

Link to comment
Share on other sites

OK, after manually pasting the code into HelloWorldScript.psc, and waiting more than 15 minutes for the compiler to open, I got this error.

Starting 1 compile threads for 1 files...
Compiling "HelloWorldScript"...

...\Source\Quest.psc(3,0): missing SCRIPTNAME at 'Quest'
...\Source\Quest.psc(3,6): required (...)+ loop did not match anything at input 'Function'
...\Source\Quest.psc(3,0): missing SCRIPTNAME at 'Quest'
...\Source\Quest.psc(3,6): required (...)+ loop did not match anything at input 'Function'
...\Source\ObjectReference.psc(3,0): mismatched input 'int' expecting SCRIPTNAME
...\Source\ObjectReference.psc(0,0): error while attempting to read script objectreference: Object reference not set to an instance of an object.
...\Source\Debug.psc(52,44): unknown type objectreference
...\Source\ObjectReference.psc(3,0): mismatched input 'int' expecting SCRIPTNAME
...\Source\ObjectReference.psc(0,0): error while attempting to read script objectreference: Object reference not set to an instance of an object.
...\Source\Debug.psc(112,41): unknown type objectreference

No output generated for HelloWorldScript.psc, compilation failed.

Batch compile of 1 files finished. 0 succeeded, 1 failed.
Failed on HelloWorldScript.psc

 

Why?

And why is it trying to open a SkyUI script from inside a bsa?

I have ALWAYS used SkyUI, and this NEVER happened in 2012/13/14.

 

Cheers!

Link to comment
Share on other sites

About this mod

You last downloaded a file from this mod on 23 Nov 2015

From my Nexus SkyUI page.

Version        Downloaded    Date uploaded              File size    Unique DLs    Total DLs
SkyUI_2_2    24-Nov-12       02 Mar 2012, 5:23PM    1.1MB        727.3k           1.7M
SkyUI_3_1    30-Mar-13       08 Jan 2013, 2:01PM    1.2MB        311.9k            883k
SkyUI_3_4    19-Mar-13       14 Mar 2013, 3:37PM    1.3MB        378.8k           904k
SkyUI_4_0    15-Jun-13       15 Jun 2013, 1:09AM    1.3MB        120.8k            160.2k
SkyUI_4_1    25-Dec-14       09 Jun 2014, 3:42PM    1.3MB        1.6M                3.2M
SkyUI_5_1    23-Nov-15       18 Aug 2015, 2:54PM    1.3MB        4.7M             14.8M
 

So, why is the CK trying to open a SkyUI script from inside the SkyUI.bsa?

Why should that HelloWorldScript.psc you posted even be TRYING to use a SkyUI script in the first place? Like my own scripts, it is trying to access things that are just not needed and not referenced in the script?

Should I revert to an older version? Their favourites thing is borked, the Map Search has never worked for me and I use Categorised Favourites err... Categorized Favorites Menu anyway. And I always have to disable "errors" due to my coloured map marker swf.

EG here is one of my Categorized Favorites screenshots (excuse the American misspelling 🤣 )

image.thumb.jpeg.74c20f38c1629c3ebeac92dbdb697164.jpeg

It's a lot less blurry in-game.

 

Cheers!

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...