トレースログを減らす

環境構築

一部のModはトレースログにデバッグ用のメッセージを出力します。それをなくして自分が見たいものだけを出るようにする手順です。

一部のModはトレースログにデバッグ用のメッセージを出力します。それをなくして自分が見たいものだけが出るようにする手順です。

Wet and Cold

Modを検知している部分がバニラの関数を使っていて警告が出るのを避けられないので、SKSE64の関数に置き換えます。

_wetquestscript.pscのMaintenance関数の中で、if文にてGame.GetFormFromFileを使って判定しているところをすべてGame.GetModByNameに置き換えます。

_wetquestscript.psc (papyrus)

Function Maintenance()
    targ = PlayerRef
    Debug.Trace("")
    Debug.Trace("=====Wet and Cold is refreshing itself and searching for addons. Any errors below are harmless.=====")
    Debug.Trace("")

    WorldInterior = New Form[4]
    WorldInterior[0] = Blackreach as Form
    WorldInterior[1] = FallowstoneCaveWorldStart as Form

    If (SKSE.GetVersion() + SKSE.GetVersionMinor() * 0.01 + SKSE.GetVersionBeta() * 0.0001) > 0.0
        SKSE64Installed = True

        ;If Game.GetFormFromFile(0x00002345, "Complete Crafting Overhaul_Remade.esp")
        if Game.GetModByName("Complete Crafting Overhaul_Remade.esp") != 255
            Int CurrentCCORWiCValue = (Game.GetFormFromFile(0x000A0863, "Complete Crafting Overhaul_Remade.esp") as GlobalVariable).GetValue() as Int
            If CurrentCCORWiCValue == 1
                If CCORWiCValue == 0
                    WiCInstalled = False
                EndIf
                SetWiCCloaks("Complete Crafting Overhaul_Remade.esp")
            Else
                If CCORWiCValue == 1
                    WiCInstalled = False
                EndIf
                CheckWiCPlugins()
            EndIf
            CCORWiCValue = CurrentCCORWiCValue
            
            Int CurrentCCORCoSValue = (Game.GetFormFromFile(0x000AAA6A, "Complete Crafting Overhaul_Remade.esp") as GlobalVariable).GetValue() as Int
            If CurrentCCORCoSValue == 1
                If CCORCoSValue == 0
                    CoSInstalled = False
                EndIf
                SetCoSCloaks("Complete Crafting Overhaul_Remade.esp")
            Else
                If CCORCoSValue == 1
                    CoSInstalled = False
                EndIf
                CheckCoSPlugins()
            EndIf
            CCORCoSValue = CurrentCCORCoSValue
            CCORInstalled = True
        Else
            CheckMainCloakPlugins()
        EndIf

    Else
        If SKSE64Installed
            Debug.Notification(NoSKSEText)
        EndIf
        SKSE64Installed = False
    EndIf

    If Game.GetFormFromFile(0x00000802, "SkyUI_SE.esp") ;SkyUI
        targ.RemoveSpell(_WetOldConfigSpell)
        SkyInstalled = True
    Else
        targ.AddSpell(_WetOldConfigSpell, false)
        SkyInstalled = False
    EndIf

    DGCat = Game.GetFormFromFile(0x0000D0B6, "Dawnguard.esm")
    If Game.GetFormFromFile(0x00003C67, "Dawnguard.esm") ;Dawnguard, vale sabrecat
        If !DGInstalled
            DGColdWorld = New Form[1]
            DGColdWorld[0] = Game.GetFormFromFile(0x00000BB5, "Dawnguard.esm") ;Falmer Valley
            DGHuskies = New Form[4]
            DGHuskies[0] = Game.GetFormFromFile(0x00003D01, "Dawnguard.esm") ;Huskies
            DGHuskies[1] = Game.GetFormFromFile(0x00018B33, "Dawnguard.esm")
            DGHuskies[2] = Game.GetFormFromFile(0x000122B7, "Dawnguard.esm")
            DGHuskies[3] = Game.GetFormFromFile(0x00018B36, "Dawnguard.esm")
            DGSnowElf = Game.GetFormFromFile(0x0000377D, "Dawnguard.esm") ;Snow elf
        EndIf
        WorldInterior[2] = Game.GetFormFromFile(0x00004BEA, "Dawnguard.esm") ;Darkfall
        WorldInterior[3] = Game.GetFormFromFile(0x000048C7, "Dawnguard.esm") ;Ancestors Glade
        DGInstalled = True
    Else
        DGInstalled = False
    EndIf

    DBDragon = Game.GetFormFromFile(0x0002C88C, "Dragonborn.esm") ;Dragonborn, black dragon
    If !DBInstalled
        DBWerebear = Game.GetFormFromFile(0x0001E17B, "Dragonborn.esm") ;Werebear
        DBLurker = Game.GetFormFromFile(0x00014495, "Dragonborn.esm") ;Lurker
        DBBoar = Game.GetFormFromFile(0x00024038, "Dragonborn.esm") ;Boar
        DBMountedRiek = Game.GetFormFromFile(0x000179CF, "Dragonborn.esm") ;Mounted Riekling
        DBRiek = Game.GetFormFromFile(0x00017F44, "Dragonborn.esm") ;Riekling
        DBThirskRiek = Game.GetFormFromFile(0x0001A50A, "Dragonborn.esm") ;Thirsk Riekling
        DLC2LItemMiscVendorArmor75 = Game.GetFormFromFile(0x000374FC, "Dragonborn.esm") as LeveledItem
        ColdCoversOn = True
        DBInstalled = True
    EndIf

    ;If Game.GetFormFromFile(0x00000DA1, "Wyrmstooth.esp") ;Wyrmstooth
    if Game.GetModByName("Wyrmstooth.esp") != 255
        WTColdWorld = New Form[1]
        WTColdWorld[0] = Game.GetFormFromFile(0x00000D62, "Wyrmstooth.esp") ;Island
        WTInstalled = True
    Else
        WTInstalled = False
    EndIf

    ;If Game.GetFormFromFile(0x00024B64, "Frostfall.esp") ;Frostfall
    if Game.GetModByName("Frostfall.esp") != 255
        If !FFInstalled
            Debug.Notification(FFDripText)
            _WetDripPlayerToggle.SetValue(0)
        EndIf
        FFInstalled = True
    Else
        FFInstalled = False
    EndIf
    
    if Game.GetModByName("Campfire.esm") != 255
        _WetBPFurList = Game.GetFormFromFile(0x0002C274, "Campfire.esm") as FormList ;Campfire
    endif
    If _WetBPFurList
        CampfireInstalled = True
    Else
        CampfireInstalled = False
    EndIf

    if Game.GetModByName("iNeed.esp") != 255
        WaterskinList = Game.GetFormFromFile(0x00009479, "iNeed.esp") as FormList ;iNeed
    endif
    If WaterskinList
        WaterskinEquipSpell = Game.GetFormFromFile(0x0004B596, "iNeed.esp") as Spell
    EndIf

    ;If Game.GetFormFromFile(0x00000800, "getSnowy.esp") ;Get Snowy
    if Game.GetModByName("getSnowy.esp") != 255
        If !GetSnowyInstalled
            Debug.Notification(SnowyText)
            _WetSnowPlayerToggle.SetValue(0)
            _WetSnowActorToggle.SetValue(0)
        EndIf
        GetSnowyInstalled = True
    Else
        GetSnowyInstalled = False
    EndIf
    
    ;If Game.GetFormFromFile(0x00022FBA, "Immersive Citizens - AI Overhaul.esp") ;ICitizenAI
    if Game.GetModByName("Immersive Citizens - AI Overhaul.esp") != 255
        If !ICitizenAIInstalled
            Debug.Notification(ICitizenAIText)
            _WetGoHomeToggle.SetValue(0)
            _WetGoHomeRainAllQuest.Stop()
            _WetGoHomeRainQuest.Stop()
            _WetGoHomeBlizzQuest.Stop()
        EndIf
        ICitizenAIInstalled = True
    Else
        ICitizenAIInstalled = False
    EndIf

    ;If Game.GetFormFromFile(0x00000EFF, "EFFCore.esm") ;EFF
    if Game.GetModByName("EFFCore.esm") != 255
        EFFInstalled = True
    Else
        EFFInstalled = False
    EndIf
    
    ; Start Edits by AndrealphusVIII
    ;If Game.GetFormFromFile(0x000D3F2C, "BSHeartland.esm") ;Bruma
    if Game.GetModByName("BSHeartland.esm") != 255
        ColdBSHeartland = New Form[1]
        ColdBSHeartland[0] = Game.GetFormFromFile(0x000A764B, "BSHeartland.esm") ;Cyrodiil
        CountyBruma = Game.GetFormFromFile(0x00000F17, "BSHeartland.esm") as Location ;County Bruma
        BSHeartlandInstalled = True
    Else
        BSHeartlandInstalled = False
    EndIf
    ; End Edits by AndrealphusVIII

    CalcListLengths()

    If fModVersion
        If SkyInstalled && SKSE64Installed
            _WetSKConfigQuest.OnConfigInit()
        EndIf
        If fModVersion < 2.30 ;CHANGE VERSION NUMBER WHEN UPDATING
            ModUpdated = True
            Restart()
            Debug.Notification(UpdateText + "v2.3.0") ;CHANGE VERSION NUMBER WHEN UPDATING
        EndIf
    Else
        If SkyInstalled && SKSE64Installed
            _WetSKConfigQuest.OnConfigInit()
        EndIf
        EnableMod()
    EndIf
    
    fModVersion = 2.30 ;CHANGE VERSION NUMBER WHEN UPDATING
    ModUpdated = False
    Debug.Trace("")
    Debug.Trace("=====Wet and Cold is finished refreshing itself and searching for addons!=====")
    Debug.Trace("")
EndFunction

このGame.GetFormFromFileによる判定は、SKSE64が登場する前のModや、SKSE64が必須ではなく任意のModに使われています。こういった場合はすべて同じように直せます。

FNIS

FNIS_aa.pscの以下のようなdebugOutputを評価している箇所はすべてコメントアウトできます。

FNIS_aa.psc (papyrus)

if debugOutput
    Debug.Trace("FNIS aa SetAnimGroup mod: " + mod + " actor: " + (ac.GetBaseObject() as ActorBase) + " group: " + animGroup + " base: " + base + " number: " + number + skipText)
endif

FNIS_aa2.pscの方はコンパイルすると動作しなくなるので、再コンパイルしてはいけません。

Enhanced Character Edit

起動時にたったこれだけ出るので無視できなくもないですが、気になったので。

[07/14/2020 - 09:02:22AM] Error: File "mslVampiricThirst.esp" does not exist or is not currently loaded.
stack:
.Game.GetFormFromFile() - "" Line ?
[RaceCompatibilityInitQuest (08002859)].YARC_InitQuestScript.onBeginState() - "YARC_InitQuestScript.psc" Line 182
[RaceCompatibilityInitQuest (08002859)].YARC_InitQuestScript.GotoState() - "Form.psc" Line ?
[RaceCompatibilityInitQuest (08002859)].YARC_InitQuestScript.initialize() - "YARC_InitQuestScript.psc" Line 131
[RaceCompatibilityInitQuest (08002859)].YARC_InitQuestScript.OnUpdate() - "YARC_InitQuestScript.psc" Line 23

yarc_initquestscript.pscのOnBeginState関数の最初あたりです。

yarc_initquestscript.psc (papyrus)

Event OnBeginState()
; Debug.Trace("YARC: Initialize()")
    ;FormList mslVTRacesFL = Game.GetFormFromFile(0x008EF8, "mslVampiricThirst.esp") as FormList
    FormList mslVTRacesFL
    if Game.GetModByName("mslVampiricThirst.esp") != 255
        mslVTRacesFL = Game.GetFormFromFile(0x008EF8, "mslVampiricThirst.esp") as FormList
    endif

問題は、このままだとコンパイルが通らないことです。

USSEPからPlayerVampireQuestScript.pscとcompanionshousekeepingscript.pscを取り出して、手を加えます。

PlayerVampireQuestScript.psc (papyrus)

Form Property mslVTFeedAction auto
FormList Property RaceList auto
FormList Property VampireList auto

companionshousekeepingscript.psc (papyrus)

FormList Property PlayableRaceList auto
FormList Property PlayableVampireList auto

2行目以降ならどこでもいいので、プロパティを加えます。

yarc_initquestscript.pscのコンパイルを通すためだけに要るので、PlayerVampireQuestScript.pscとcompanionshousekeepingscript.pscをコンパイルしてはいけません。

たぶんですが、PlayerVampireQuestScript.pscとcompanionshousekeepingscript.pscの2つはヴァニラにあるスクリプトで、これらに手を加えていたModが昔あって、互換性を確保するために検査して修正する処理なのだと思います。

タイトルとURLをコピーしました