Starfield
0 of 0

File information

Last updated

Original upload

Created by

SKKmods

Uploaded by

SKKmods

Virus scan

Safe to use

Tags for this mod

46 comments

  1. SKKmods
    SKKmods
    • premium
    • 1,326 kudos
    Locked
    Sticky
    ********************************************************************************
    CHAMPOLLION and CAPRICA issues.

    I am not the author or maintainer of either product, just a very early adopter.
    If you have product issues, post defect reports on the relevant GITHUB
    site linked in the main description.
    ********************************************************************************
  2. vivecgod
    vivecgod
    • supporter
    • 31 kudos
    Hi there :) Thank you SKK50 for such a fast move regarding Papyrus scripts support in Starfield !

    I used to script it a lot by the past years, including with SKSE & F4SE added features, thus that's not the first time I am installing and setting Notepad++ for it... However, now, when I either run the compilation from N++, or from the .cmd file, everything just starts fine, but it then always ends with that  error msg : 

    ios_base::failbit set: iostream stream error
     ( I tried with various simple renamed copies of vanilla .psc files such as testblockactivationscript.psc for exemple ) 

    Please, anyone has an idea of what I could have been doing wrong here ?

    P.S.
    As for the record, I am using a recently installed Win11x64 ( I have been on win7x64 since ten years & still on it until the very last days of last month ) - I don't think it is related to that, but I prefer to mention it, just in case... It still could be related to some authorization process to write in folders or IDK ?

    ********************************************************** EDIT & ANSWER :
    Hell, I found why it was faulty on my board and how to fix it... Sorry for your time, comrades ; Sharing with you my experience here :

    When run as an administrator out of Notepad++, the CapricaCompile.cmd file, instead of that stream error above, was still buggy in the end, but was first indicating Caprica was working from an internal Windows folder, which was kind of unexpected ! ( I am using last Caprica v0.3.0 )
    Indeed, here is exactly what I had in the console ( I removed the @echo off at the top of the batch file in order to get some more informations, first ):
    Adding current working directory to import list: C:\Windows\System32
    Adding import directory: G:\Starfield\___TOOLS\Papyrus\Scripts\Source\Base
    Importing files...
    An error occurred while trying to iterate the files in 'C:\Windows\System32\WebThreatDefSvc\*'!
    Import failed!
    ( I might also add here "Caprica.exe" has been added to my env. vars in windows system infos, otherwise it wasn't found... )

    Then, to avoid Caprica to weirdly start in "Windows\System32\WebThreatDefSvc\...", at the very top of my "G:\Starfield\___TOOLS\Papyrus\Scripts\Source\Vivec\CapricaCompile.cmd" file, between @echo off & rem [email protected] September 2023 I just added this :
    G:
    cd\
    cd Starfield\___TOOLS\Papyrus\scripts\Source\Vivec
    Well, it's ugly, yes, but, now... IT JUST WORKS !!!
    1. SKKmods
      SKKmods
      • premium
      • 1,326 kudos
      Sounds like: 

      Best to maintain the standard Fallout4 paths unless we hear different.
    2. IoIcake
      IoIcake
      • premium
      • 0 kudos
      Hi all, trying to get into scripting so apologies for the noob question. I followed all the Caprica instructions and am getting:

      'Caprica.exe' is not recognized as an internal or external command, operable program or batch file.
      Unfortunately, my file structure is nonstandard - I am not in :C\Program Files...
      I should be using the correct version of Caprica (v3).
      I tried adding Caprica as an environment variable in Windows, but maybe I am doing it wrong? Could someone help me figure out how to fix this? Thanks!

      EDIT: I figured it out, posting here for others

      Under System Variables (in Environment Variables), edit PATH and add the full path to the parent directory of Caprica.exe, e.g., SCRIPTPATH
    3. Djlegends
      Djlegends
      • supporter
      • 13 kudos
      Doesnt work sadlly
    4. SKKmods
      SKKmods
      • premium
      • 1,326 kudos
      Still working fine here with default pathing.
  3. TennesseeTuxedo
    TennesseeTuxedo
    • premium
    • 3 kudos
    Thank you for this!!  I think the instructions for compiling are more geared toward if you are making new scripts from scratch.  I am modifying a vanilla game script and had placed the modded script in my "USER" folder like the example and was getting errors because the chain of scripts it extended from weren't there.  Assuming I am following the folder structure prescribed in the directions, what is best practice for modding game scripts?  Do you copy all the game scripts from your "IMPORT" folder (where it CHAMPOLLION decompiled them all) to your 'USER" folder or do modify game files directly in the "IMPORT" folder?  I back up all the .psc's immediately to zips do I can get them back if quickly if I mess them up in the "IMPORT" folder.
    1. SKKmods
      SKKmods
      • premium
      • 1,326 kudos
      As long as the IMPORT folder points at the folder full of decompiled source scripts to link the dependencies, you can put your hacked version wherever you want to best suit how you manage information.

      Keeping it in the original source folder does not seem like a grand idea for debug, conflict and regression management, but people organsie information in many and varied ways.
  4. Korodic
    Korodic
    • premium
    • 557 kudos
    edited to nvm. Thank you :)
  5. lighthousejack
    lighthousejack
    • supporter
    • 3 kudos
    Just dropped in to say that you rule. Very much appreciated.
    1. SKKmods
      SKKmods
      • premium
      • 1,326 kudos
      Its my pleasure !
  6. vexthecollector
    vexthecollector
    • premium
    • 19 kudos
    Somehow this is not working for me, and unsure why. I think my code is wrong, but can't see a direct issue.

    Error:
    Compiling MBS_selector.psc
    ios_base::failbit set: iostream stream error
    Spoiler:  
    Show

    scriptName MBS_selector extends ObjectReference
    ;-- Variables ---------------------------------------
    ;-- Properties --------------------------------------
    ;-- Functions --
    Function SelectMission()
        int iSelection = MBS_MissionBoardSelector.Show()
        If iSelection == 0
            MissionBoardConsole_Constellation.Activate()
        EndIf
    EndFunction
    ;-- State -------------------------------------------
    State busy
      Event OnActivate(ObjectReference akActionRef)
        ; Empty function
      EndEvent
    EndState
    ;-- State -------------------------------------------
    Auto State default
      Event OnActivate(ObjectReference akActionRef)
        If akActionRef == Game.GetPlayer() as ObjectReference ; #DEBUG_LINE_NO:36
          Self.GotoState("busy") ; #DEBUG_LINE_NO:37
          If AccessConditions == None || AccessConditions.IsTrue(Game.GetPlayer() as ObjectReference, Self as ObjectReference) ; #DEBUG_LINE_NO:39
            SelectMission()
          ElseIf AccessFailureMessage
            AccessFailureMessage.Show(0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0) ; #DEBUG_LINE_NO:46
          EndIf
          Self.GotoState("default") ; #DEBUG_LINE_NO:48
        EndIf
      EndEvent
    EndState

    1. vexthecollector
      vexthecollector
      • premium
      • 19 kudos
      Figured it out.
      Despite being able to set a scriptpath and Caprica saying "Hey, I am looking for your script there", it won't work unless caprica is right next to the psc file.
    2. SKKmods
      SKKmods
      • premium
      • 1,326 kudos
      yes:

      (3) Put Caprica.exe  master build >= 6378296518 v0.3.0 in SCRIPTPATH folder

  7. sp0ckrates
    sp0ckrates
    • supporter
    • 155 kudos
    So sorry if this is a stupid question. 😳 Does anyone know why I'm getting this error in the command prompt?

    Fatal Error: Unable to resolve type 'Quest'!

    (I'm trying to make a modified copy of an existing pex after creating the psc.)
    1. SKKmods
      SKKmods
      • premium
      • 1,326 kudos
      If you are  looking for help with code compile errors you will need to be far more specific.

      Copy/Paste the actual error and the actual code that is causing the error.
    2. ghostfc3s
      ghostfc3s
      • member
      • 519 kudos
      you need to setup the cmd import for all your decompiled source code

      set IMPORT=C:\Program Files (x86)\Steam\steamapps\common\Starfield\Data\Scripts\Source\Base

      For me it looks like this set IMPORT=E:\SteamLibrary\steamapps\common\Starfield\Data\StarfieldBaseScripts\scripts\Decompiled
  8. plm000
    plm000
    • member
    • 1 kudos
    nothing gets compiled, decompilation works

    ?? am i supposed to decop\mpile ALL starfields scripts as pex ? just to edit one?
    1. SKKmods
      SKKmods
      • premium
      • 1,326 kudos
      Yes that is how compilers work.
  9. phinix
    phinix
    • premium
    • 234 kudos
    EDIT: Never mind, I searched the de-compiled game code for examples and saw how Bethesda has changed the syntax for some classic functions that were giving me grief. :)
    1. SKKmods
      SKKmods
      • premium
      • 1,326 kudos
      useful CMD file:

      set /p SEARCHSTRING="Starfield script search string: "
      cd "C:\Program Files (x86)\Steam\steamapps\common\Starfield\Data\Scripts\Source\Base"
      findstr.exe /i /s /n /c:"%SEARCHSTRING%" *.psc
  10. 07qwerty07
    07qwerty07
    • member
    • 2 kudos
    Cannot compile SKK_CellChangeScript.psc

    I get the error SKK_CellChangeScript.psc (1, 42:54): Fatal Error: Unable to resolve type 'ScriptObject'!

    UPD. Looks like I needed to decompile all Starfield scripts first and write a path to them as IMPORT
    1. SKKmods
      SKKmods
      • premium
      • 1,326 kudos
      You need to follow all the steps ... thats why I wrote them.
  11. claydegruchy
    claydegruchy
    • member
    • 3 kudos
    Flag file 404, no longer in the same repo or deleted?
    1. marvis999
      marvis999
      • member
      • 0 kudos
      Remove the flags argument from CapricaCompile.cmd. The author of Caprica added them directly to the .exe it seems:
       caprica.exe --game starfield --import "%IMPORT%" --flags "%FLAGS%" --output "%OUTPUT%" "%SCRIPTFILE%"

      Also if you copied SKK's script below (Thank you, SKK!) you may get a compilation error because of an unusual character in front of "DatumRef.Delete()". Just a heads-up.