Jump to content

Looking to script an activator to open the quickmap


Chronepsys

Recommended Posts

You most certainly don't need to. I do a fair amount of scripting, and compile everything in CK just fine.

 

One big source(pun intended) of confusion with SSE CK is location of source code. Oldrim supposedly had it under Data/Scripts/Source. and that is how SKSE and a lot of other mods place it.

SSE CK compiler looks for source code under Data/Source/Scripts.

 

So, the .pex files that came with SKSE under Data/Scripts, need to go into Data/Scripts in your SSE folder.

The .psc files that came with SKSE under Data/Scripts/Source, need to go into Data/Source/Scripts in your SSE folder.

 

Generally, whenever you install a mod that extends scripting functionality, you need to check where its source is.

PapyrusUtil SE actually includes files for both paths.

UIExtensions has its scripts in a .bsa, and you need to copy the source.

If you want anything with MCM, you need to include SkyUI scripts: .pex files are in the SkyUI.bsa

Source: download zipped code at https://github.com/schlangster/skyui, you want files under dist/data/scripts/source in your data/source/scripts.

JContainers - source needs to be moved.

 

Skyrim's own original source code is in Scripts.zip under your Data folder. I generally do NOT recommend extracting the whole thing - only if you need very specific files.

VERY important: if you plan to mess with vanilla quests/dialogue trees etc, be very aware of USSEP. It overloads a TON of scripts. Often, if you extract and compile a vanilla script from Scripts.zip, things can break.

Always check if same script is overloaded by USSEP, and how.

Link to comment
Share on other sites

With MO / MO2, if your SKSE source scripts are inside a mod folder, you need to start the CK from within MO / MO2 otherwise it will fail to find the SKSE source scripts.

 

Compiling with an external tool like Notepad++ or Sublime Text is nice as you can point to multiple folder locations for the source files. However, that prevents one from being able to compile scripts utilizing such source files within the Creation Kit.

Link to comment
Share on other sites

Thanks for this.

 

I understand IsharaMeradin, i think.

 

I made a skse "mod" in MO2 in order to have its skse scripts and source in the MO2 data like i saw it from a tuto.

However, when scripting in ck from MO2, i can find the UI by activating the "Hidden" tick, but when compiling my script, it failed to locate this.

And trying to "import" doesn't solve the probblem.

 

Scorrp, I will take a look at the script/source and source/script as you say.

 

I saw that we must copy the "source" path somewhere but i do not understand where and/or how i have to do that.

 

Still looking at.

Link to comment
Share on other sites

Ok,

 

Here is the code for now:

Scriptname _SCE_OpenMap extends ObjectReference  
 
Event OnActivate(ObjectReference akActionRef)
 
If akActionRef == Game.GetPlayer()
 
UI.InvokeString("MapMenu", "_global.skse.OpenMenu", "MapMenu")
 
Endif
 
Endevent
Edited by Chronepsys
Link to comment
Share on other sites

And here is the error :

 

 

 

C:\...\_SCE_OpenMap.psc(7,2): variable UI is undefined
C:\...\_SCE_OpenMap.psc(7,5): none is not a known user-defined type

I want to attach this script to an activator with the CivilWarMap01 meshe in order to open the world map when using this map in the game.
Link to comment
Share on other sites

There is nothing wrong (syntax wise at least) with your script as posted. I was able to compile it using Sublime Text.

 

You will need to ensure that your source PSC files are in the correct location for the compiler to locate them. SSE CK uses "Data > Source > Scripts" as the default location.

Ensure that the scripts.zip file found in your Data folder has been extracted.

Ensure that the PSC files from SKSE are copied overtop or will override the Bethesda provided scripts.

If using MO2, ensure that the 'mod' containing the SKSE PSC files has the correct directory structure and is marked as active before launching the CK.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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