Chronepsys Posted February 17, 2023 Author Share Posted February 17, 2023 Well, After searching and viewing some tuto, i understand that i should use a compiler like VSC and teach him that i use the skse library.Which it seem not possible only with ck. I will look in that way. Thank you so much for your help and kindness. Link to comment Share on other sites More sharing options...
scorrp10 Posted February 17, 2023 Share Posted February 17, 2023 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 More sharing options...
IsharaMeradin Posted February 17, 2023 Share Posted February 17, 2023 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 More sharing options...
Chronepsys Posted February 17, 2023 Author Share Posted February 17, 2023 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 More sharing options...
scorrp10 Posted February 18, 2023 Share Posted February 18, 2023 When I mention 'have to copy source', it means that mod has source (.psc) files at Data/scripts/source - and you need to copy them to Data/source/scripts for them to become visible to CK. Link to comment Share on other sites More sharing options...
RichWebster Posted February 18, 2023 Share Posted February 18, 2023 Important to point out that the reason it's not compiling isn't because of the UI.psc file being missing from the Source folder. It's the UI.pex file missing from the Scripts folder. Link to comment Share on other sites More sharing options...
IsharaMeradin Posted February 18, 2023 Share Posted February 18, 2023 Instead of all this speculating back and forth, why not post the exact code being compiled and the exact compiler error? Also specify what type of record the code is being attached to (i.e. quest, object, actor, dialog topic info, magic effect, perk, etc) Link to comment Share on other sites More sharing options...
Chronepsys Posted February 19, 2023 Author Share Posted February 19, 2023 (edited) 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 February 19, 2023 by Chronepsys Link to comment Share on other sites More sharing options...
Chronepsys Posted February 19, 2023 Author Share Posted February 19, 2023 And here is the error : C:\...\_SCE_OpenMap.psc(7,2): variable UI is undefinedC:\...\_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 More sharing options...
IsharaMeradin Posted February 19, 2023 Share Posted February 19, 2023 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 More sharing options...
Recommended Posts