Jump to content

Editing / compiling script in CE?


Fredas

Recommended Posts

Let me rephrase that: I am looking for the most straightforward way possible for editing a script in CE outside of the context of its associated.. whatever (perk fragment, quest, whatever it may or may not be attached to).  This goal is inspired by the fact that I want to edit a particular script in a particular mod, but can't pin down just where exactly the script is being used in said mod, and as far as I know this isn't something one can simply ask CE to show them.  It's also important that I am able to compile the script after my edits, since this is my primary means of determining whether or not said edits are even valid code.

 

Link to comment
Guest GuyWhoAbruptlyDisappeared

Let me rephrase that: I am looking for the most straightforward way possible for editing a script in CE outside of the context of its associated.. whatever (perk fragment, quest, whatever it may or may not be attached to).  This goal is inspired by the fact that I want to edit a particular script in a particular mod, but can't pin down just where exactly the script is being used in said mod, and as far as I know this isn't something one can simply ask CE to show them.  It's also important that I am able to compile the script after my edits, since this is my primary means of determining whether or not said edits are even valid code.

 

Correct me if I'm wrong here, guys.

 

The scripts should be on the list of scripts (Gameplay -> Papyrus Script Manager -> Show Hidden). More than likely, if it's a fragment script, it will have a generic name, such as TIF_0300AD71. If you do not have the source .psc files for the mod, you probably won't be able to edit the script at all. If you do have the source files, you should be able to just read and edit whatever script you're looking for.

 

I don't know if this is any help or not. If I'm being condescending it's not intentional.

Link to comment

If you know the script name and have it's source form (.psc)

 

It'll probably be easier to just edit it outside of the ck, The nexus actually has a papyrus script editor as well. (never tried it but I'm sure it's probably pretty good)

Though I just use Sublime Text and a custom build function to re-compile.

Link to comment

If you want to know where a script is being used, open the Papyrus Script Manager in the Gameplay dropdown in the main menu. Find the script you are looking for, right click on it and select Use Info and it will give you a list of the places it is used. Double click on the item and it will take you directly to it.

Link to comment

It'll probably be easier to just edit it outside of the ck, The nexus actually has a papyrus script editor as well. (never tried it but I'm sure it's probably pretty good)

Though I just use Sublime Text and a custom build function to re-compile.

 

Editing outside the CK is actually something I sometimes do with my own mods since the CK occasionally seems to sort of "stuck" being unable to compile perfectly valid scripts - even scripts with no edits since the last compile.  I still have to jump back into CK to compile the result, though.

 

If you want to know where a script is being used, open the Papyrus Script Manager in the Gameplay dropdown in the main menu. Find the script you are looking for, right click on it and select Use Info and it will give you a list of the places it is used. Double click on the item and it will take you directly to it.

 

Okay, that's something I hadn't known about.  Useful info.  Now it seems that the script is being referenced in a way that is not only somewhat unusual (to me) but also apparently of no use if I want to jump in and edit the script myself:

 

alias _mindAliasPlayer on quest _mindQuest

 

Opening said quest, which I had located beforehand, reveals no scripts loaded under the quest tag.

 

The issue here is that if, say, I try editing the script at all - say by temporarily adding it to a quest or whatever - CK won't compile because it is "unable to find script".  The pex and psc are definitely there.  I'm sure what CK is really complaining about is the fact that I'm trying to edit the script out of its proper context, so the very first line ("Scriptname _mindScript extends ReferenceAlias") is automatically invalid.  .. Told you this was newbie territory. ;p

Link to comment

 

Editing outside the CK is actually something I sometimes do with my own mods since the CK occasionally seems to sort of "stuck" being unable to compile perfectly valid scripts - even scripts with no edits since the last compile.  I still have to jump back into CK to compile the result, though.

 

You can setup a windows .bat script or any of the other many script types to just compile via cmd using the papyruscompiler.exe. (Command Line utility)

 

I find that faster than loading up the CK everytime :(

 

Also, the debug messages get streamed back to your IDE/editor so it's a lot nicer for a 'programmer' flow at least for me. But all I have done is 'light' script edits so I can't say for certain how helpful it is or if the CK has more fully fledged IDE features like links to data elements and such.

Link to comment

You were correct.  I hadn't even known that a script could be tucked away like that.

 

Unfortunately, it seems I was incorrect in assessing that the lack of a successful compile had to do with not finding the script in its correct location.  I still get this:

Starting 1 compile threads for 1 files...
Compiling "_mindScript"...
<unknown>(0,0): unable to locate script _mindScript
No output generated for _mindScript, compilation failed.
 
Batch compile of 1 files finished. 0 succeeded, 1 failed.
Failed on _mindScript

CK under MO seems not to like MO's virtualization in this case.  (Again, the script files are definitely where they need to be.)  CK is satisfied if it can find the _mindScript script in the native Skyrim directories, but then I get this:

 

 

 

C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\Scripts\Source\_mindscript.psc(225,16): UpdateTimer is not a function or does not exist
C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\Scripts\Source\_mindscript.psc(284,13): unknown type _mindconfig
C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\Scripts\Source\_mindscript.psc(285,15): _mindconfig is not a known user-defined type
C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\Scripts\Source\_mindscript.psc(285,24): cannot compare a none to a int (cast missing or types unrelated)
C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\Scripts\Source\_mindscript.psc(289,20): _mindconfig is not a known user-defined type
C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\Scripts\Source\_mindscript.psc(289,2): type mismatch while assigning to a int (cast missing or types unrelated)
C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\Scripts\Source\_mindscript.psc(400,21): unknown type _mindconfig
C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\Scripts\Source\_mindscript.psc(401,20): cannot convert to unknown type _mindconfig
C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\Scripts\Source\_mindscript.psc(401,20): cannot cast a quest to a _mindconfig, types are incompatible
C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\Scripts\Source\_mindscript.psc(1139,13): unknown type _mindconfig
C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\Scripts\Source\_mindscript.psc(1188,10): _mindconfig is not a known user-defined type
C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\Scripts\Source\_mindscript.psc(1191,13): _mindconfig is not a known user-defined type
C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\Scripts\Source\_mindscript.psc(1624,13): unknown type _mindconfig
C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\Scripts\Source\_mindscript.psc(1629,8): _mindconfig is not a known user-defined type
C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\Scripts\Source\_mindscript.psc(1635,39): _mindconfig is not a known user-defined type
C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\Scripts\Source\_mindscript.psc(1646,39): _mindconfig is not a known user-defined type
C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\Scripts\Source\_mindscript.psc(1657,39): _mindconfig is not a known user-defined type
C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\Scripts\Source\_mindscript.psc(1668,39): _mindconfig is not a known user-defined type
C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\Scripts\Source\_mindscript.psc(1678,38): _mindconfig is not a known user-defined type
C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\Scripts\Source\_mindscript.psc(2016,7): UpdateTimer is not a function or does not exist
C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\Scripts\Source\_mindscript.psc(2168,13): unknown type _mindconfig
C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\Scripts\Source\_mindscript.psc(2174,22): _mindconfig is not a known user-defined type
C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\Scripts\Source\_mindscript.psc(2174,2): type mismatch while assigning to a float (cast missing or types unrelated)
C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\Scripts\Source\_mindscript.psc(2177,17): _mindconfig is not a known user-defined type
C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\Scripts\Source\_mindscript.psc(2177,2): type mismatch while assigning to a float (cast missing or types unrelated)
C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\Scripts\Source\_mindscript.psc(2180,20): _mindconfig is not a known user-defined type
C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\Scripts\Source\_mindscript.psc(2180,2): type mismatch while assigning to a float (cast missing or types unrelated)
C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\Scripts\Source\_mindscript.psc(2183,37): _mindconfig is not a known user-defined type
C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\Scripts\Source\_mindscript.psc(2188,9): _mindconfig is not a known user-defined type
C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\Scripts\Source\_mindscript.psc(2340,13): unknown type _mindconfig
C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\Scripts\Source\_mindscript.psc(2346,22): _mindconfig is not a known user-defined type
C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\Scripts\Source\_mindscript.psc(2346,2): type mismatch while assigning to a float (cast missing or types unrelated)
C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\Scripts\Source\_mindscript.psc(2349,17): _mindconfig is not a known user-defined type
C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\Scripts\Source\_mindscript.psc(2349,2): type mismatch while assigning to a float (cast missing or types unrelated)
C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\Scripts\Source\_mindscript.psc(2352,20): _mindconfig is not a known user-defined type
C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\Scripts\Source\_mindscript.psc(2352,2): type mismatch while assigning to a float (cast missing or types unrelated)
C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\Scripts\Source\_mindscript.psc(2358,9): _mindconfig is not a known user-defined type
C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\Scripts\Source\_mindscript.psc(2421,9): _mindconfig is not a known user-defined type
C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\Scripts\Source\_mindscript.psc(2481,13): unknown type _mindconfig
C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\Scripts\Source\_mindscript.psc(2492,14): _mindconfig is not a known user-defined type
C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\Scripts\Source\_mindscript.psc(2492,3): type mismatch while assigning to a float (cast missing or types unrelated)
C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\Scripts\Source\_mindscript.psc(2497,14): _mindconfig is not a known user-defined type
C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\Scripts\Source\_mindscript.psc(2497,3): type mismatch while assigning to a float (cast missing or types unrelated)
C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\Scripts\Source\_mindscript.psc(2502,14): _mindconfig is not a known user-defined type
C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\Scripts\Source\_mindscript.psc(2502,3): type mismatch while assigning to a float (cast missing or types unrelated)
C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\Scripts\Source\_mindscript.psc(2508,10): _mindconfig is not a known user-defined type
C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\Scripts\Source\_mindscript.psc(2508,37): _mindconfig is not a known user-defined type
C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\Scripts\Source\_mindscript.psc(2622,13): _mindconfig is not a known user-defined type
C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\Scripts\Source\_mindscript.psc(2622,2): type mismatch while assigning to a float (cast missing or types unrelated)
C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\Scripts\Source\_mindscript.psc(2627,13): _mindconfig is not a known user-defined type
C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\Scripts\Source\_mindscript.psc(2627,2): type mismatch while assigning to a float (cast missing or types unrelated)
C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\Scripts\Source\_mindscript.psc(2632,13): _mindconfig is not a known user-defined type
C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\Scripts\Source\_mindscript.psc(2632,2): type mismatch while assigning to a float (cast missing or types unrelated)
C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\Scripts\Source\_mindscript.psc(2638,27): _mindconfig is not a known user-defined type
C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\Scripts\Source\_mindscript.psc(2638,55): _mindconfig is not a known user-defined type
C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\Scripts\Source\_mindscript.psc(2703,9): _mindconfig is not a known user-defined type
C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\Scripts\Source\_mindscript.psc(2741,14): _mindconfig is not a known user-defined type
C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\Scripts\Source\_mindscript.psc(2741,3): type mismatch while assigning to a float (cast missing or types unrelated)
C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\Scripts\Source\_mindscript.psc(2746,14): _mindconfig is not a known user-defined type
C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\Scripts\Source\_mindscript.psc(2746,3): type mismatch while assigning to a float (cast missing or types unrelated)
C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\Scripts\Source\_mindscript.psc(2751,14): _mindconfig is not a known user-defined type
C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\Scripts\Source\_mindscript.psc(2751,3): type mismatch while assigning to a float (cast missing or types unrelated)

 

 

 

PapyrusCompiler.exe gives pretty much the same litany of complaints if I straight up try to compile the script with it.

 
All I want to do is throw in a SendModEvent.  This headache feels out of proportion. ;p
 
Link to comment

I went ahead and did what CK seemed to want, and extracted the whole BSA from the mod into Skyrim's data dir.  After doing so, CK is a lot happier trying to compile the _mindScript script (with no edits from me; just a straight compile of what's already been compiled successfully).  But it still trips up here:

Starting 1 compile threads for 1 files...
Compiling "_mindScript"...
C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\Scripts\Source\_mindscript.psc(225,16): UpdateTimer is not a function or does not exist
C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\Scripts\Source\_mindscript.psc(2016,7): UpdateTimer is not a function or does not exist
No output generated for _mindScript, compilation failed.
 
Batch compile of 1 files finished. 0 succeeded, 1 failed.
Failed on _mindScript

UpdateTimer certainly isn't to be found in the script itself, and evidently isn't any kind of global function.  Google doesn't know what it is.  But CK isn't going to compile anything until I do something about it.

 
Link to comment

I went ahead and did what CK seemed to want, and extracted the whole BSA from the mod into Skyrim's data dir.  After doing so, CK is a lot happier trying to compile the _mindScript script (with no edits from me; just a straight compile of what's already been compiled successfully).  But it still trips up here:



Starting 1 compile threads for 1 files...
Compiling "_mindScript"...
C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\Scripts\Source\_mindscript.psc(225,16): UpdateTimer is not a function or does not exist
C:\Program Files (x86)\Steam\steamapps\common\Skyrim\Data\Scripts\Source\_mindscript.psc(2016,7): UpdateTimer is not a function or does not exist
No output generated for _mindScript, compilation failed.
 
Batch compile of 1 files finished. 0 succeeded, 1 failed.
Failed on _mindScript

UpdateTimer certainly isn't to be found in the script itself, and evidently isn't any kind of global function.  Google doesn't know what it is.  But CK isn't going to compile anything until I do something about it.

 

It may be a custom function that is defined in another script with the mod. Is there something else in front of the command (xxxxxx.mindscript)? If so, find out what the first part referrers to (should be in the properties) and look there. If you can find it you can copy the function into yours.

Link to comment

It may be a custom function that is defined in another script with the mod. Is there something else in front of the command (xxxxxx.mindscript)? If so, find out what the first part referrers to (should be in the properties) and look there. If you can find it you can copy the function into yours.

 

More digging around has revealed that the problem seems to be two different things:

 

1) Compiling anything with CK under Mod Organizer does not work at all unless CK can find every script it wants in Skyrim's native data directory.  Why this distinction matters at all, I couldn't tell you.

 

2) UpdateTimer, according to this link I found, is supposed to be part of SexLab's sslThreadController.psc.  But it manifestly is not.  Given this, I have to wonder how Puppetmaster manages to work, calling as it does a nonexistent function (whose disappearance is itself a big question mark).

 

Problem #2 would appear to be the reason why I cannot get the thing to compile.  Given the circumstances, I question whether it will ever be possible to make an edit to this script.  A horribly inelegant "solution" might be to copy the UpdateTimer function that was for whatever reason eliminated from sslThreadController, and paste it into Puppetmaster's _mindScript, along with its variables.  I can't even begin to guess how that will shake things up, since the mod doesn't seem "broken" for all that it depends on a missing function.

 

Link to comment

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

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

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. For more information, see our Privacy Policy & Terms of Use