Jump to content

Recommended Posts

Posted

Hi,

 

Several years ago, I was successful to rename a script's name to a different one. But, I totally forgot how I did it.

 

I tried to rename .psc and .pex files to the new name that I want to use.

However, the Creation Kit couldn't compile it.

That script works with several other scripts and quests.

 

I googled for it.

 

Someone said:

"

Go to your psc. script file in the data folder.

Rename the script as you would rename any file by right click on it and click rename in the side menu.

Open the script.

Change the script name in the first line after where it says "Scriptname" to the same name you chose above. Save and Close.

Open CK and your mod where you will apply the script and choose the Gameplay Tap.

Choose Papyrus Script Manager.

Click to highlight the script you renamed, then right click and click on compile."

 

I tried that method. However, it didn't work. The Creation Kit couldn't compile.

 

If you can help me anyway, I'll appreciate.

 

 

Posted
32 minutes ago, phalancks said:

What is the compilation error?

 

It can't compile with the other scripts and the quest that work with that script.

 

Posted

Okay, but what's the compilation error?

 

If there are other scripts that rely on the script you renamed, you'll have to update them too. And probably update all the references to that script in the plugin as well. Like if it's a quest script you'll have to update the quest record to use the new script.

Posted (edited)
1 hour ago, phalancks said:

Okay, but what's the compilation error?

 

If there are other scripts that rely on the script you renamed, you'll have to update them too. And probably update all the references to that script in the plugin as well. Like if it's a quest script you'll have to update the quest record to use the new script.

 

You probably right.

 

I didn't update the other scripts and the quest. That can cause the problem.

 

That can cause the problem.

 

Thank you for your information.

 

 

Edited by nehaberlan
Posted
17 hours ago, phalancks said:

Okay, but what's the compilation error?

 

If there are other scripts that rely on the script you renamed, you'll have to update them too. And probably update all the references to that script in the plugin as well. Like if it's a quest script you'll have to update the quest record to use the new script.

 

What you're saying sounds reasonable. However, I understand nothing.

What you mean by saying "update"?

Which parts do I have to change in the other scripts and the quests.

 

In what order do I have to do not to get any compiling error?

 

 

Posted
20 hours ago, phalancks said:

Okay, but what's the compilation error?

 

If there are other scripts that rely on the script you renamed, you'll have to update them too. And probably update all the references to that script in the plugin as well. Like if it's a quest script you'll have to update the quest record to use the new script.

 

 

Maybe, you would like to check the scripts.

 

 

SexLab has to be installed first.

Scripts.7z

 

There are 4 scripts.

ControlQuestScript

dressingControlQuestScript

HerBonersJacuzziUndressScript

redressTriggerScript

 

There is a quest named "ControllerQuest".

 

When you attach the correct scripts to a trigger box, the PC/NPCs get undress and/or redress by using SexLab scripts.

 

The quest has a script named "dressingControlQuestScript".

 

UnequipAll Trigger that I use for getting naked uses "HerBonersJacuzziUndressScript".

 

It has two properties:

dressingControlQuestScript

TargetRef that is the Trigger Box.

 

ReequipAll Trigger that make PC/NPC redress has two scripts:

ControlQuestScript

redressTriggerScript

 

redressTriggerScript has two properties:

dressingControlQuestScript

TargetRef that is the ReEquipAllTrigger Box.

 

Please, don't ask me how they work, or which one is what for. Because, I have no idea.

The person, who prepared these scripts for me, explained me how I can make them work in my mod. I was successful to change few scripts' names also.

Right now, I don't remember anything how I did them.

 

I want to change the name of the script "HerBonersJacuzziUndressScript" to "Cozy_JacuzziUndressScript.pex" and "Cozy_JacuzziUndressScript.psc".

When I tried that, I got compiling error because of the other scripts and the related quest couldn't recognize it or vice versa.

 

Posted (edited)
11 hours ago, nehaberlan said:

What you mean by saying "update"?

 

If you change the file name:

MyScript.pex -> MyAwesomeScript.pex

 

Then also change the source name:

MyScript.psc -> MyAwesomeScript.psc

 

And the Scriptname name in the source at the top:

Scriptname MyAwesomeScript ...

 

And all references to MyScript in *ALL* scripts that use it:

MyAwesomeScript Property MyScriptRef ... # Property referencing MyAwesomeScript
...
MyAwesomeScript ref # Field of type MyAwesomeScript
...
MyAwesomeScript.MyFunction(...) # Global function in MyAwesomeScript
...
MyAwesomeScript Function SomeOtherFunction(...) # Function returning a MyAwesomeScript reference
...
Function SomeOtherFunction(MyAwesomeScript ref, ...) # Function taking a MyAwesomeScript reference as input

 

And all references to MyScript in *ALL* plugins that use it:

Go through all VMAD fields in relevant records and update the scriptname. The part after Scriptname may specify where this script is used, whether its a quest, a magic effect or something else. You can narrow down the number of records you have to search by knowing this. There's also a built-in script in xEdit for finding used scripts. Run it to make sure the old script name is no longer mentioned anywhere.

Edited by traison
Posted
13 hours ago, traison said:

 

If you change the file name:

MyScript.pex -> MyAwesomeScript.pex

 

Then also change the source name:

MyScript.psc -> MyAwesomeScript.psc

 

And the Scriptname name in the source at the top:

Scriptname MyAwesomeScript ...

 

And all references to MyScript in *ALL* scripts that use it:

MyAwesomeScript Property MyScriptRef ... # Property referencing MyAwesomeScript
...
MyAwesomeScript ref # Field of type MyAwesomeScript
...
MyAwesomeScript.MyFunction(...) # Global function in MyAwesomeScript
...
MyAwesomeScript Function SomeOtherFunction(...) # Function returning a MyAwesomeScript reference
...
Function SomeOtherFunction(MyAwesomeScript ref, ...) # Function taking a MyAwesomeScript reference as input

 

And all references to MyScript in *ALL* plugins that use it:

Go through all VMAD fields in relevant records and update the scriptname. The part after Scriptname may specify where this script is used, whether its a quest, a magic effect or something else. You can narrow down the number of records you have to search by knowing this. There's also a built-in script in xEdit for finding used scripts. Run it to make sure the old script name is no longer mentioned anywhere.

 

As you know, I'm just a rookie.

You made me confused again.

:)

 

By trial/error, I'll try to figure out.

 

Thank you.

 

Posted
15 hours ago, traison said:

 

If you change the file name:

MyScript.pex -> MyAwesomeScript.pex

 

Then also change the source name:

MyScript.psc -> MyAwesomeScript.psc

 

And the Scriptname name in the source at the top:

Scriptname MyAwesomeScript ...

 

And all references to MyScript in *ALL* scripts that use it:

MyAwesomeScript Property MyScriptRef ... # Property referencing MyAwesomeScript
...
MyAwesomeScript ref # Field of type MyAwesomeScript
...
MyAwesomeScript.MyFunction(...) # Global function in MyAwesomeScript
...
MyAwesomeScript Function SomeOtherFunction(...) # Function returning a MyAwesomeScript reference
...
Function SomeOtherFunction(MyAwesomeScript ref, ...) # Function taking a MyAwesomeScript reference as input

 

And all references to MyScript in *ALL* plugins that use it:

Go through all VMAD fields in relevant records and update the scriptname. The part after Scriptname may specify where this script is used, whether its a quest, a magic effect or something else. You can narrow down the number of records you have to search by knowing this. There's also a built-in script in xEdit for finding used scripts. Run it to make sure the old script name is no longer mentioned anywhere.

 

I tried what you said.

 

I changed the .pex and .psc files.

Scriptname to the new one.

 

I checked and renamed all the files in the xEdit. I changed them to the new name.

I couldn't find anything about "built-in script" in the xEdit. Where is it?

 

In the Creation Kit, my script's name is Cozy_JacuzziUndressScript right now.

However, it can't find its properties. So, It doesn't work.

 I got this error message:



Starting 1 compile threads for 1 files...
Compiling "Cozy_JacuzziUndressScript"...
D:\Steam\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\dressingControlQuestScript.psc(10,25): unknown type sexlabframework
D:\Steam\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\dressingControlQuestScript.psc(28,21): sexlabframework is not a known user-defined type
D:\Steam\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\dressingControlQuestScript.psc(30,21): sexlabframework is not a known user-defined type
D:\Steam\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\dressingControlQuestScript.psc(32,21): sexlabframework is not a known user-defined type
D:\Steam\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\dressingControlQuestScript.psc(34,21): sexlabframework is not a known user-defined type
D:\Steam\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\dressingControlQuestScript.psc(44,11): sexlabframework is not a known user-defined type
D:\Steam\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\dressingControlQuestScript.psc(46,11): sexlabframework is not a known user-defined type
D:\Steam\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\dressingControlQuestScript.psc(48,11): sexlabframework is not a known user-defined type
D:\Steam\steamapps\common\Skyrim Special Edition\Data\Source\Scripts\dressingControlQuestScript.psc(50,11): sexlabframework is not a known user-defined type
No output generated for Cozy_JacuzziUndressScript, compilation failed.

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

 

dressingControlQuestScript is a sexlab script, and there is nothing about "JacuzziUndressScript".

So, there is nothing to change in the "dressingControlQuestScript".

 

Posted
Just now, nehaberlan said:

I couldn't find anything about "built-in script" in the xEdit. Where is it?

  1. Right click a plugin.
  2. Apply script.
  3. Filter for "scripts", pick the "List used scripts" one.
Just now, nehaberlan said:

However, it can't find its properties. So, It doesn't work.

 

That looks more like you're missing the SexLabFramework.psc file from SL.

Posted (edited)
2 hours ago, traison said:

 

That looks more like you're missing the SexLabFramework.psc file from SL.

 

The original, old script "HerBonersJacuzziUndressScript" finds it.

However, the new one "Cozy_JacuzziUndressScript" can't.

 

I send you some screenshots.

The first ones are from the original script:

 

 


JacuzziUnEquipAllTrigger.jpg.ca167a7ddd51439d911bef7cc0d4b69a.jpg

HerBonersJacuzziUndressScript-Properties.jpg.0563bc93495c173b5d05224fc054d88b.jpg

 
 

 

 

These are from the new script:

 

 


JacuzziUnEquipAllTrigger-Cozy.jpg.d08fb5ee072ce84e302b0e56c218662a.jpg

ScriptLoadError.jpg.05a5950e9f453af870ca094b19624753.jpg

Cozy_JacuzziUndressScript-Properties.jpg.de887278b11bbeb41f67f8902f048199.jpg
 

 

 

Edited by nehaberlan
Posted (edited)
2 hours ago, traison said:
  1. Right click a plugin.
  2. Apply script.
  3. Filter for "scripts", pick the "List used scripts" one.

 

That looks more like you're missing the SexLabFramework.psc file from SL.

 

I don't think there is nothing that I miss from SexLab.

The problem should be something else.

Both of them have same scripts.

Only difference is their names.

Cozy_JacuzziUndressScript:

  Hide contents

 


Scriptname Cozy_JacuzziUndressScript extends TRIGGER  

dressingControlQuestScript Property dressingControlQuest Auto

Event OnTriggerEnter(ObjectReference ref)
  Actor a = ref as Actor
  if a
    dressingControlQuest.doStrip(a)
  endIf
EndEvent
 

 

 

HerBonersJacuzziUndressScript:

  Hide contents

 


Scriptname HerBonersJacuzziUndressScript extends TRIGGER  

dressingControlQuestScript Property dressingControlQuest Auto

Event OnTriggerEnter(ObjectReference ref)
  Actor a = ref as Actor
  if a
    dressingControlQuest.doStrip(a)
  endIf
EndEvent
 

Edited by nehaberlan
Posted

The old one most likely works because its already compiled. If the CK was to attempt to recompile it, you'd get the same error. The error is in dressingControlQuestScript.psc on line 10 where it has a property of type SexLabFramework. Since it doesn't know what that is, the only explanation as I see it is that it can't find a file that defines it, meaning you're missing SexLabFramework.psc.

 

Remember that there's several standards for where script sources should be. Which one is used by the Papyrus compiler is defined in CreationKit.ini. You need to normalize all mods to use the folder defined in CreationKit.ini, in order to use their scripts when compiling i.e. you may have the file, but is it in the correct directory?

Posted (edited)
14 hours ago, traison said:

The old one most likely works because its already compiled. If the CK was to attempt to recompile it, you'd get the same error. The error is in dressingControlQuestScript.psc on line 10 where it has a property of type SexLabFramework. Since it doesn't know what that is, the only explanation as I see it is that it can't find a file that defines it, meaning you're missing SexLabFramework.psc.

 

Remember that there's several standards for where script sources should be. Which one is used by the Papyrus compiler is defined in CreationKit.ini. You need to normalize all mods to use the folder defined in CreationKit.ini, in order to use their scripts when compiling i.e. you may have the file, but is it in the correct directory?

 

I didn't understand what you said by saying "Which one is used by the Papyrus compiler is defined in CreationKit.ini".

What you mean by saying "You need to normalize all mods to use the folder defined in CreationKit.ini".

 

In LE, there is "SkyrimEditor.ini".

It has this:



[Papyrus]
bPerforceEnabled=0
iMaxAllocatedMemoryBytes=76800  ;75kb
iMaxMemoryPageSize=3096
iMinMemoryPageSize=128
sCompilerFolder="Papyrus Compiler\"
sScriptCompiledFolder="Data\Scripts\"
sScriptSourceFolder="Data\Scripts\Source"

 

In SE, there is "CreationKit.ini".

It has this:



[Papyrus]
bPerforceEnabled = 0
iMinMemoryPageSize = 128
iMaxMemoryPageSize = 512

 

Are you talking about this [Papyrus] settings?

 

If you ask all of the scripts are in the correct directories "Scripts" and "Sources" folder. Yes, they are. Otherwise, the original file and the mod wouldn't work.

 

Edited by nehaberlan
Posted
2 hours ago, nehaberlan said:

If you ask all of the scripts are in the correct directories "Scripts" and "Sources" folder. Yes, they are.

 

In that case all I can suggest is for you to use Process Monitor from Sysinternals (Microsoft). Filter for paths containing SexLabFramework.psc and try to compile your modified script. It will tell you where its expecting to find the file.

Posted
2 hours ago, traison said:

 

In that case all I can suggest is for you to use Process Monitor from Sysinternals (Microsoft). Filter for paths containing SexLabFramework.psc and try to compile your modified script. It will tell you where its expecting to find the file.

 

I have no idea about neither Process Monitor, nor Sysinternals. I made general search, and in the Windows folder. I couldn't find anything about them.

 

Posted
3 hours ago, traison said:

 

In that case all I can suggest is for you to use Process Monitor from Sysinternals (Microsoft). Filter for paths containing SexLabFramework.psc and try to compile your modified script. It will tell you where its expecting to find the file.

 

Just forget about Notepad++.

Forget about renaming the .pex and .psc files in Source and Scripts folders.

Forget about editing in xEdit.

 

Concentrate on the Creation Kit.

How to make renaming in the Creation Kit?

Because, this method doesn't work at all.

 

Who prepared me these scripts, explained me how to add these scripts, how to add them in my mod, taught me how to rename the script files.

As I remember, he didn't told me anything about this method.

I changed the name HerBonersJacuzziUndressScript from "UndressScript".

I made this changing to remember what was it for.

Unfortunately, I can't ask him anymore. Because, he's not in the LoversLab anymore.

Unfortunately, I've forgotten how I did it.

Unfortunately, there is no one, who's an expert and remembers that old method, and can explain that old method to me.

 

If I can't learn that old method, what would happen?

Nothing...

The scripts work perfectly.

I can use it with the original name. So, what...

 

I'm just trying to learn.

I learn, I forget. Sometimes, I remember...

It's how it works.

 

Until now, you've tried to help me a lot. I appreciate that.

Your helps sometimes have been helpful, sometimes not.

It's normal.

You have been the person, who's mostly answered my P.I.T.A. questions, and been helpful.

Thank you for that.

 

Cheers...

 

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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