Writing Scripts outside of Creation Kit [Episode 5]

Поделиться
HTML-код
  • Опубликовано: 28 сен 2024
  • In this episode, we learn how to work on Skyrim mod scripts outside of the creation kit. We'll use Visual Studio Code but we'll learn Pyro and PapyrusCompiler.exe as we go along. Happy Modding!
    Papyrus Project File Template (.ppj) gist.github.co...
    VS Code Extension for Papyrus marketplace.vi...
    Pyro GitHub github.com/fir...
    Pyro Documentation wiki.fireundub...
    CreationKit .ppj Documentation (Fallout4) www.creationki...
    Suggest an episode! forms.gle/FCFF...
    Intro music: www.bensound.c...
    Mouse cursor: www.deviantart...
    Background image: pixabay.com/it... by Stefan Keller (PD)
    Firefox theme: addons.mozilla...
    Skyrim Dragon Font: fontstruct.com... by gfhjk50 (CC-BY-SA)
    Yoster Code Font: www.1001fonts....

Комментарии • 49

  • @mandoo5260
    @mandoo5260 2 года назад +13

    24:24 download pyro
    28:47 project(.ppj)
    30:45 change import directory & run pyro
    33:05 Download VSCode & extensions
    36:58 Trust the directories
    38:04 create ppj
    42:38 source\script -> script\source
    43:18 update pyro, skyrimse.ppj, tasks.json
    I didn't time stamp the command prompt parts... I gotta watch that part again lol

  • @skeletoering
    @skeletoering 2 года назад

    Thank you so much MP! I love and appreciate all the thought you put into this! It is so helpful to understand what each thing does and the reason for it even if I am eventually bypassing it. You rock!!!

  • @Lotsofleaves
    @Lotsofleaves Год назад

    Hello, thank you for your excellent tutorials! These are so comprehensive and also a little entertaining to boot.
    I'm running into an issue getting the base game scripts to appear in VScode and it's really burning my brains!

    • @Lotsofleaves
      @Lotsofleaves Год назад

      So after trouble shooting, I narrowed it down to the CreationKitCustom.ini being in the game directory. I tried cutting that ini down to just the two essential settings you mentioned prior, but the problem persists as long as it ini is there.
      As well, my creation kit doesnt seem to have trouble loading multiple master files even without the custom ini.
      Thoughts?

    • @ozhinz
      @ozhinz 5 месяцев назад

      @@Lotsofleaves i also have this issue

  • @FeralFibreFarm
    @FeralFibreFarm 2 года назад +4

    FYI, Pyro has now been deleted from NEXUS :(

    • @SkyrimScripting
      @SkyrimScripting  2 года назад +1

      That's so goofy, thanks for letting me & viewers know. Link to Pyro: github.com/fireundubh/pyro

  • @Pino1536
    @Pino1536 4 месяца назад

    Is there a tool that simple compile the source? I nearly work only with xEdit (much saver and cleaner) and its bad to every open the ck and its plugins only to compile a script.

  • @kevvincent8850
    @kevvincent8850 3 года назад +1

    Hi just to let you know i got it working , after alot of trial and error i searched on the net and downloaded VSCode SkyrimSE Papyrus Project Template which is on the nexusmods forum installed that into my skyrim games folder, deleted the .ppj in the c drive the opened the .ppj in the d drive copied the template as before tried it but kept getting an error so i copied the .ppj form d to c and went through what you showed in the video and when i came to build it built with no errors i will continue following your videos and see how it goes hopefully i wont get anymore errors. Thanks for your Help and keep doing the videos there awesome learning a lot!! Oh i forgot i have both .ppj files and .vscode on both drives but its working ?

    • @SkyrimScripting
      @SkyrimScripting  3 года назад

      Yay 🎉
      I'm so glad! Always feel free to comment on a video and let me know if there's anything else you'd like to see. I recommend my Beginner Basics series which is my favorite playlist so far: ruclips.net/p/PLektTyeQhBZdV_qI4uQcbOSBJ_QemyhsR
      Good luck & Happy Modding!

  • @cliveruffle6016
    @cliveruffle6016 3 года назад

    Ah - cool got this all working yay! Thanks! One final quick question, please. In the final VSCode PPJ I altered the game scripts source path to my G drive and this works fine. Do I need to do anything about your GitHub code lines 14,16 and 18 in my PPJ? These are the variables, ModName, Mods Folder and Imports folder. Do I need to path these? For example I changed the Mods Folder value to G [Your Mods Folder]. Thanks!

    • @SkyrimScripting
      @SkyrimScripting  3 года назад +1

      ModName: You'll want to set this when you finish a mod and want to generate .bsa file(s) and compress everything into a .zip. Mods Folder: not required, you might find that you want this to be set to your MO2 Mods folder so you can import scripts from mods. Imports Folder: don't need this at all, I should remove it to not confuse people!
      Long story short: at the start, you don't need to set *any* of these. You'll basically know when you need them. For example, the phrase "import scripts from mods" might not make sense right now. But, at some point, you'll say to yourself "I need to import scripts from that mod!" - at which point, those variables become more useful :)

    • @cliveruffle6016
      @cliveruffle6016 3 года назад

      @@SkyrimScripting Thank you! All good now and on to the next steps! :)

  • @cliveruffle6016
    @cliveruffle6016 3 года назад

    I'm doing well with this video - thanks! One issue:: at 39:52 your Workspace shows .vscode and Skyrim SE links. On mine these are missing.
    I have set up a separate folder for building my mods. I built a "Hello World" mod in it, and copied it to MO2's Mods folder when done. So I directed VSCode to my Build Folder, and it created the stuff in that folder.
    Do you recommend I build each mod in MO2's mods folder instead? Does each mod created require its own PPJ?
    Thanks!

    • @SkyrimScripting
      @SkyrimScripting  3 года назад +2

      Hi @Clive Ruffle! Good question. You'll definitely want to store every mod in its own separate folder. And those folders with your mods should, Yes, be inside of MO2's configured Mods directory. My steps when making a mod: (a) Open MO2 (b) Right-click "Create empty mod" (c) Open VSCode, click the Papyrus extension, "Generate Skyrim Special Edition Project Files", choose the folder which MO2 just created for my new mod. I keep a separate directory of mods which I"m not *actively* working on and I drag/drop my mod folders into that separate directory *if I don't want they to show up in MO2 any longer*. Or sometimes I just delete the folders of mods I'm not actively working on, because I backup the files in GitHub for each mod so I can safely delete the actual mod folder on my HDD at any time. (I keep my whole MO2 Mods folder on Dropbox, though, just in case ~ I really don't like losing work that I did!)
      Does that help @Clive Ruffle? Sorry if you already know all of the things that I mentioned! The .ppj isn't *just* used to compile the mod. It's *also* used to archive the mod's contents into a .bsa and compress all of the mod contents into a .zip file when you're ready to distribute your mod on a website. The .ppj contains configuration for (a) the name of your mod (b) which files to put into a .bsa, if any (c) which files to put into the final .zip for distribution. PPJ files are intended to be in each mod's separate folder.
      You can tweak the .ppj template in C:\Users\\.vscode\extensions\joelday.papyrus-lang-vscode-2.23.1
      esources\sse\ however you like so VSCode generates your personal template for you inside your new projects' folders.
      I quickly learned early on that you should really write all of your mods in folders inside of your MO2 Mods folder, so, C:\\ModA and C:\\ModB.The downside is that, if you have lots of mods installed using the same MO2 instance, whenever you open Creation Kit/SSEdit it shows ALL of your mods - not just the ones you're working on. And it can be a little annoying with hundreds of mods.
      If you haven't already, you might want to consider having an MO2 instance just for Mod *authoring* . Just keep the mods you're authoring in that instance, nothing else (or only a very minimal set of mods). And you can switch back to your game playing instance easily whenever you want to switching from *authoring* to *playing*
      Hope at least some of this was useful! Please let me know if you have more questions. Happy Modding!

    • @cliveruffle6016
      @cliveruffle6016 3 года назад

      @@SkyrimScripting That's all very clear thank you! And it's a good idea having an MO2 authoring instance. Many thanks for your time!

  • @barzo9034
    @barzo9034 3 года назад

    after i set up VS as you show , redirecting the various file to my game folder , i hit shift+ctrl+b to compile this :
    Scriptname HelloModScript2 extends Quest
    {Script for HelloModScript2 Mod}
    Event OnInit()
    Debug.MessageBox("We compiled this using VS Code , ahah ")
    EndEvent
    and i get these 3 wierd problems
    [skyrimse]: unable to locate script Quest
    [skyrimse]: variable Debug is undefined
    [skyrimse]: none is not a known user-defined type
    and if i try to run Pyro outside with the first method ( trough CMD ) it also wont compile , and it will give an error wich i can no more make happend because it seems that after i installed and set up VS , windows10 wont let me compile trough CMD saying "its impossible to run this app on this PC"
    like wtf , i dont get it
    EDIT: i actually made the error manifest , the one with Pyro trough CMD , but cant still compile "normally" without Pyro trough CMD , the error is :
    [ERRO] Cannot proceed without compiler path

    • @SkyrimScripting
      @SkyrimScripting  3 года назад

      You'll get "unable to locate Script Quest" with either Pyro or VS Code if the path to the Skyrim Special Edition scripts isn't correct.
      Look under in the .ppj, is there an C:\Program Files .... \Skyrim Special Edition\Data\Scripts\Source ?
      1. Is the folder path correct? The folder exists?
      2. If the folder exists, does it contain files like Quest.psc and Debug.psc etc?
      Creation Kit comes with scripts.zip which contains like 13,910 scripts and the Papyrus Project File needs to have an to the right directory with all those files

    • @barzo9034
      @barzo9034 3 года назад

      @@SkyrimScripting damn am i stoopid , i checked 4 times before sending the first message but yhea , the path was right but it was missing Scripts\Source , so now i dont get the "problems" anymore but instead i get
      [ERRO] Cannot create process because: %1 non è un'applicazione di Win32 valida
      (its italian for "Win32 its not a valid application")
      i also retried to compile trough CMD with Pyro but i get the same
      [ERRO] Cannot proceed without compiler path
      maybe i should point to it , but how
      i also tried to make a new mod and make a new script to it in CK , but no.. neither this am i more allowed to do , it gives me this error
      Papyrus Errors
      Compile Results :
      Unable to launch compiler
      anyway thanks for any help you are able to offer , i hope to continue these episodes wich i am liking so far

    • @barzo9034
      @barzo9034 3 года назад

      so apparently my post didnt "went trough" , i solved my problem the day after the first post , the "missing" post was much more detailed but basically the errors were occurring because somehow my CK files got corrupted , all i did to fix this was launching the CK reparation tool inside the Bethesda Launcher .

    • @SkyrimScripting
      @SkyrimScripting  3 года назад

      @@barzo9034 Yay, I'm glad to hear it! Thanks for getting back to us and sharing! I hope you're enjoying your modding. Always feel free to let me know if there's content you'd like to see! I've been a bit too busy making mods & streaming mod making on Twitch recently to post to the RUclips, but I have a RUclips series planned and I'll be back to releasing regular content soon :)

  • @kevvincent8850
    @kevvincent8850 3 года назад

    Hi how do you do this if your skyrim se is on another drive, as i am getting and error when i try the build for ppj file i have changed it too the correct path on both the files but i am still getting and error. Great tutorials by the way !!

    • @SkyrimScripting
      @SkyrimScripting  3 года назад +1

      I ran into the same problems! Try this:
      So your know how your Skyrim SE/Data folder has that Scripts/Source or Source/Scripts folder with the 13,000+ .psc scripts?
      Copy it onto your C:\ drive somewhere.
      Now update the .ppj so it has an C:\...wherever you put the Scripts\Source
      Let me know if that works! When I ran into the same issues, I legit reformatted and moved Steam and Skyrim onto my C:\
      Let me know if you're still getting the error. If you *are* still getting the error, try this...
      - Make C:\Whatever\Skyrim
      - Copy SkyrimSE.exe into it (this probably isn't actually required, but you can do it in case VS Code is trying to detect if Skyrim is installed in this folder)
      - Move the scripts into it, so you end up with C:\Whatever\Skyrim\Data\Scripts\Source or C:\Whatever\Skyrim \Data\Source\Scripts with the .psc files
      Now update the .vscode/tasks.json gamePath to point to your "C:\\Whatever" (don't forget that file uses \\) and update your in the ppj
      Let me know if that works!

    • @SkyrimScripting
      @SkyrimScripting  3 года назад

      Oh, hey! I was looking into this and found an issue [0]
      Before you do all that, maybe try this. In VS Code (if that's what you're setting up), go into File > Preferences > Settings and then search for Skyrim. You'll see a Papyrus > Skyrim Special Edition: Install Path configuration option **. Try changing that to be the place on the other drive where you have Skyrim installed!
      ** Make sure to edit the Special Edition config option not the LE one
      [0]: github.com/joelday/papyrus-lang/issues/38

    • @donnahollis3845
      @donnahollis3845 3 года назад

      This is the error i am getting i have tried both ways and still get the same error??
      @@SkyrimScripting > Executing task in folder HelloMod: c:\Users\kev95\.vscode\extensions\joelday.papyrus-lang-vscode-2.23.1\pyro\pyro.exe --input-path skyrimse.ppj --game-path D:\Games\Steam Library\steamapps\common\Skyrim Special Edition\ <
      2021-08-15 17:19:22,539 [INFO] Using working directory: "D:\Games\Steam Library\steamapps\common\Skyrim\Mods\HelloMod"
      2021-08-15 17:19:22,539 [INFO] Using input path: "D:\Games\Steam Library\steamapps\common\Skyrim\Mods\HelloMod\skyrimse.ppj"
      Traceback (most recent call last):
      File "c:\Users\kev95\VSCODE~1\EXTENS~1\JOELDA~1.1\pyro\__main__.py", line 128, in
      File "c:\Users\kev95\VSCODE~1\EXTENS~1\JOELDA~1.1\pyro\pyro\Application.py", line 111, in run
      File "c:\Users\kev95\VSCODE~1\EXTENS~1\JOELDA~1.1\pyro\pyro\PapyrusProject.py", line 70, in __init__
      File "src\lxml\etree.pyx", line 3521, in lxml.etree.parse
      File "src\lxml\parser.pxi", line 1876, in lxml.etree._parseDocument
      File "src\lxml\parser.pxi", line 1896, in lxml.etree._parseMemoryDocument
      File "src\lxml\parser.pxi", line 1777, in lxml.etree._parseDoc
      File "src\lxml\parser.pxi", line 1082, in lxml.etree._BaseParser._parseUnicodeDoc
      File "src\lxml\parser.pxi", line 615, in lxml.etree._ParserContext._handleParseResultDoc
      File "src\lxml\parser.pxi", line 725, in lxml.etree._handleParseResult
      File "src\lxml\parser.pxi", line 654, in lxml.etree._raiseParseError
      File "", line 23
      lxml.etree.XMLSyntaxError: expected '>', line 23, column 13
      The terminal process "c:\Users\kev95\.vscode\extensions\joelday.papyrus-lang-vscode-2.23.1\pyro\pyro.exe '--input-path', 'skyrimse.ppj', '--game-path', 'D:\Games\Steam Library\steamapps\common\Skyrim Special Edition\'" terminated with exit code: 1.
      Was you getting the same error ??

    • @SkyrimScripting
      @SkyrimScripting  3 года назад

      Could I see the content of your .ppj?
      Take a close look at it, looks like there's an XML syntax error. Make sure that every has a closing and stuff like that :)

    • @SkyrimScripting
      @SkyrimScripting  3 года назад

      "lxml.etree.XMLSyntaxError: expected '>'" --- maybe you have an

  • @kevvincent8850
    @kevvincent8850 3 года назад

    Sorry was signed into my friends account by mistake so the last comment was meant to be from me thanks ?

  • @timputtock2017
    @timputtock2017 2 года назад

    Struggling. When i make the text document Hellomod.ppj it doesn't ask me to change so it saves it as a text doc. Then when i'm in command prompt and i'm searching for hellomod.ppj it comes up as hellomod.ppj.txt. How do i override the .txt file and have it save as a ppj?

    • @timputtock2017
      @timputtock2017 2 года назад

      OK I figured it out. all working. Thanks

  • @Santrasa1
    @Santrasa1 2 года назад +1

    I think something has changed with Pyro over last year, I got error "Failed to validate XML Schema". I didn't know how to solve it. But if there is someone else battling with this, I did notice that you can continue with the tutorial if you just use an older version of Pyro, I used the one dated 23 Jun 2021 and it seemed to work okey.

  • @festro1000
    @festro1000 7 месяцев назад

    Sorry to necro, but is there a way to automate setting the name of the mod in the .ppj file to the name of the folder you select when generating the project file @45:57?

  • @nahson5907
    @nahson5907 2 года назад +1

    I would believe you live in Gotham city with all those sirens haha

  • @cubaindy6700
    @cubaindy6700 9 месяцев назад +1

    best explainer of things and holder of hands ever

  • @iuryneto6424
    @iuryneto6424 Год назад

    I am getting the message (Fallout 4 is not installed in the configured Game Folder), but if I click (Run Build Task) runs normal terminal window, could it help me?
    I got it, it must have been some mistake of mine, I just reinstalled and followed to the letter all the steps of the video, thanks for making all this content available to us!

  • @moduntilitbreaks
    @moduntilitbreaks 2 года назад

    Awesome video, ton of knowledge i can't imagine solving all those thing by myself.

  • @NetraAmorosi
    @NetraAmorosi 2 года назад

    @29:36 - Alternatively you can Right-Click on raw and save link.

  • @aoi7910
    @aoi7910 2 года назад

    In 23:08 I think you can give it a folder you just have to put \*.* in the end of the directory so it knows to do all the files inside it

  • @alessagillespie3748
    @alessagillespie3748 Год назад

    You are absolutely amazing! Thank you!

  • @jijijiro
    @jijijiro 2 года назад

    for some reason there’s no ‘skyrim se’ or ‘creation kit’ icons in the papyrus project explorer for me, it’s just completely blank. not sure what’s gone wrong there

    • @PineappleForScale
      @PineappleForScale Год назад

      Same thing happened to me and turned out that the extension was not able to read creationkitcustom.ini correctly for some reason. So what I did was delete it, create a new blank creationkitcustom.ini and paste only this
      [Papyrus]
      sScriptSourceFolder = ".\Data\Scripts\Source"
      and saved. Then I opened the ppj file and made sure it was Scripts\Source everywhere and not the other way round. After that I relaunched vscode and all the creation kit psc files were listed.

  • @Isulduur
    @Isulduur 2 года назад

    Your videos are great!!!

  • @cliveruffle6016
    @cliveruffle6016 3 года назад

    My final question here (sorry for bothering you...).
    In VSCode I've my Workspace set to my regular game in MO2. I'd also like a workspace (in the workspace list, or a completely new workspace) pointing at my MO2 Mod Authoring profile. (The Authoring is currently a different MO2 profile, not a complete new instance of MO2.) How best do I do that please? I've been fiddling about with VSCode but can't see how to arrange this. Thanks!

    • @SkyrimScripting
      @SkyrimScripting  3 года назад +1

      If you are using VSCode workspaces and you have _two_ directories with workspace subdirectories which you want to show in VS Code, my recommendation is to either: (a) use *both* Workspace Explorer *and* a second Workspace explorer-like VSCode extension and point them at the 2 different folders (b) look around and see if something like Workspace Explorer exists but which supports multiple subdirectories.
      "Workspace Explorer" has been working for me *but* - like you - I actually have multiple folders on my computer with subdirectories of workspaces & I don't like that I can't configure multiple (as far as I can tell) using Workspace Explorer. I also wish that Workspace explorer *only* showed folders which are _actually_ workspaces, not regular subdirectories too. I don't want it to show me ALL the mods in my MO2 folder, I only want to see the one's I'm working on 😢
      I haven't looked for a better solution *yet*, but maybe you'll find it! I stuck with Workspace Explorer only because it works "well enough* to let me very quickly browse most of my mods and open them very quickly.
      Does that help at all? Feel free to keep asking questions, it's all good! You can also hop on over to a new Discord I recently made (link can be found on my NexusMods and GitHub profile pages). But the questions help over people who stumble upon the video! 👍

    • @cliveruffle6016
      @cliveruffle6016 3 года назад

      @@SkyrimScripting Thank you for your time is responding. That's all useful to know. VSCode does look amazing compared to most efforts I have tried so I won't be changing from it. Thanks! I really appreciate the support!

  • @dvunkannon
    @dvunkannon 2 года назад

    HI, I'm loving this series. I have a problem, though. I started making a custom voiced follower mod by following some popular tutorials (mainly Joseph Russell's RUclips series) just using the CK, so I now have a bunch of files for the mod in my Data directory and subdirectories. What is the best way to move over to the style you're showing here? There's an esp, dialogue view XML files. scripts, nif, dds, the whole nine yards. Any advice appreciated!

    • @whickus
      @whickus 2 года назад +1

      Hopefully you've figured this out by now but in case you haven't, here's some advice. The most direct way to package your mod is to create an empty mod in MO2. You can then find this folder in the directory where you've told MO2 to store its installed mods. Or just right-click the mod in MO2 and choose "Open in Explorer". Let's call it "David's Follower", for instance.
      Then copy all of the files that you created for the mod into that folder, making sure to preserve the folder architecture. For instance, if you created textures for your mod and they currently reside in "Data\textures\David's Follower" you'll want to create a "textures\David's Follower" folder inside of the "David's Follower" folder that is found in your MO2 mods and place those textures there.
      You basically just treat the individual MO2 mod folders as the Data folder. The top level of each mod folder is seen as the Data folder by MO2.

    • @dvunkannon
      @dvunkannon 2 года назад

      @@whickus Thank you. I guessed that would be the set of things I would have to do. I have not returned to this since I asked the question, just continued on as before. With your advice, maybe now is the time to switch over. Thanks again!