Jump to content
  • entries
    251
  • comments
    818
  • views
    192845

Well that was painless. Relatively speaking...


DocClox

1538 views

So, I just finished migrating back to Mod Organizer for my development environment. I know I swore "never again" but I was losing track of too many files with Wrye.

 

And so far it seems to be working well. Or at least it seems to be working which is more than I have been able to achieve before this.

 

Now I just need to rewrite my makefile so I can use my usual console-centric workflow and I'll be happy.

 

(why isn't there a command line CK anyway? I always thought that was a major omission. And there are probably about two other people who'd agree with me ... :().

12 Comments


Recommended Comments

DocClox

Posted

Just don't add a "*" at the end. And certainly not a "/"

Content Consumer

Posted

Forgot about those. :)

 

I actually tried it once, just to see how far it would get before the OS shut down. Pretty far, actually... I think there was something like 20mb left on the drive, starting from about 300gb.

DocClox

Posted

BEHOLD THE MAGNIFICENCE!!!

 

 

DATA=/m/steam/SteamApps/common/Skyrim/Data
SRCDIR=/steam/SteamApps/common/Skyrim/data/scripts/source

MODIR=/steam/SteamApps/common/Skyrim/ModOrganizer/Mods
SRC_SUFF=scripts/source

SLAVE_TATS=$(MODIR)/SlaveTats/$(SRC_SUFF)
SKSE=$(MODIR)/skse_1_07_03/$(SRC_SUFF)
RACEMENU=$(MODIR)/racemenu_scripts/$(SRC_SUFF)
JC=$(MODIR)/JContainers/$(SRC_SUFF)
DDI=$(MODIR)/DeviousDevices-Integration-2.9.0/$(SRC_SUFF)
DDX=$(MODIR)/Devious Devices Expansion/$(SRC_SUFF)
DDA=$(MODIR)/Devious_Devices_Assets/$(SRC_SUFF)
SEXLAB=$(MODIR)/SexLabFramework/$(SRC_SUFF)
SLA=$(MODIR)/sexlab_aroused_scripts/$(SRC_SUFF)
ZAZ_PATCH="$(MODIR)/ZazAnimationPack Patch v0607/$(SRC_SUFF)"
ZAZ_MAIN="$(MODIR)/ZazAnimationPack Main v0605/$(SRC_SUFF)"
FNIS="$(MODIR)/FNIS_Behavior_V5_5/$(SRC_SUFF)"
FNIS_BEASTIE="$(MODIR)/FNIS_Creature_Pack_5_3_Beta1/$(SRC_SUFF)"
SKY_UI="$(MODIR)/SkyUI_4.1_SDK/$(SRC_SUFF)"

PVDIR="/cygdrive/m/steam/SteamApps/common/Skyrim Mods/Bash Installers/pretty_vacant/scripts/source"
PCC="/m/steam/SteamApps/common/Skyrim/Papyrus Compiler/PapyrusCompiler - Original.exe"


PEX=$(PSCS:.psc=.pex)
PAPFLAGS=$(SRCDIR)/TESV_Papyrus_Flags.flg

all: ../*.pex

../%.pex: %.psc
${PCC} $* -f=$(PAPFLAGS) -i=$(FNIS)\;$(FNIS_BEASTIE)\;$(SEXLAB)\;$(SLA)\;"$(DDX)"\;$(DDI)\;$(DDA)\;$(SLAVE_TATS)\;$(RACEMENU)\;$(JC)\;$(ZAZ_PATCH)\;$(ZAZ_MAIN)\;$(SKY_UI)\;$(SKSE)\;$(SRCDIR) -o=..

 

Well, you probably need to be an old UNIX-head to really appreciate it...

Earen

Posted

slight more lazy solution I use - parse current MO profile (no way to get current one?), obtain active mod list, generate "include" dirs

DocClox

Posted

slight more lazy solution I use - parse current MO profile (no way to get current one?), obtain active mod list, generate "include" dirs

Makes sense. I might try that.

Earen

Posted

 

slight more lazy solution I use - parse current MO profile (no way to get current one?), obtain active mod list, generate "include" dirs

Makes sense. I might try that.

Maybe. I use Python though, seems Bash was never my cup of tea... I also found that it's more safe to re-compire entire directory rather than single script

DocClox

Posted

I've done a fair bit with Python.What are you parsing? modlist.txt?

 

And yeah, every now and then I do a "touch *" and rebuild everything. Of course, what it really needs is a script to generate dependencies by parsing .psc files. Include that, and make gets to do its job.

 

You could probably do a cheap and dirty one quite easily...

Earen

Posted

I've done a fair bit with Python.What are you parsing? modlist.txt? And yeah, every now and then I do a "touch *" and rebuild everything. Of course, what it really needs is a script to generate dependencies by parsing .psc files. Include that, and make gets to do its job. You could probably do a cheap and dirty one quite easily...

yeah, it's modlist.txt and the code looks like:

 

 

 

import os
import sys

MO_PROFILE = 'MslVT_TESTING'
PATH_MO = 'I:\\ModOrganizer\\'
PATH_SKYRIM = 'Path to Skyrim\\'

DIR_SOURCE = 'scripts\\source'
PATH_VANILLA_SCRIPTS = PATH_SKYRIM + 'Data\\scripts\\source'
PATH_FLAGS = PATH_SKYRIM + 'Data\\scripts\\TESV_Papyrus_Flags.flg'
PATH_COMPILER = PATH_SKYRIM + 'Papyrus Compiler\\PapyrusCompiler.exe'
PATH_MODS = PATH_MO + 'mods'
PATH_PROFILE = PATH_MO + 'profiles' + MO_PROFILE + ''

# list of active mods
def getUsedMods():
    with open(PATH_PROFILE + 'modlist.txt') as f:
        return [line[1:] for line in f.readlines() if line[0] == '+']


# list of 'includes' generated from list of active mods
def getAllImportDirs():
    return [os.path.join(PATH_MODS, modName, DIR_SOURCE)[:-1] for modName in getUsedMods() if os.path.isdir(os.path.join(PATH_MODS, modName, DIR_SOURCE))]


def listDirs(d):
    return [os.path.join(d,o) for o in os.listdir(d) if os.path.isdir(os.path.join(d,o))]


def enrichWithSubdirs(dirs):
    dirs2 = []
    for d in dirs:
        if os.path.isdir(d):
            dirs2.append(d)
            dirs2 += listDirs(d)

    return dirs2


def outputDirFromPSC(scriptFile):
    return os.path.dirname(os.path.dirname(scriptFile))


def sourceDirFromPSC(scriptFile):
    return os.path.dirname(scriptFile)


def quotes(s):
    return "\"" + s + "\""

    
def compileScript(scriptFile, outputDir):

    print 'compiling', scriptFile

    args = [
        'PapyrusCompiler.exe',
        quotes(scriptFile),
        #'-quiet',
        #'-debug',
        '-all',
        '-f=' + quotes(PATH_FLAGS),
        '-o=' + quotes(outputDir),
        '-i=' + ';'.join( map(quotes, enrichWithSubdirs([PATH_VANILLA_SCRIPTS] + getAllImportDirs() + [sourceDirFromPSC(scriptFile)]) )[::-1] ),
    ]

    joined = ' '.join(args)
    os.system(joined)

	
if __name__ == '__main__':

    if len(sys.argv) < 2:
        raise Exception('argc less than 1')

    # had to do this due to some quotation issues? IDK anymore
    os.chdir(os.path.dirname(PATH_COMPILER))

    scriptFile = sys.argv[1]
    compileScript(sourceDirFromPSC(scriptFile), outputDirFromPSC(scriptFile))
    #compileScript(scriptFile, outputDirFromPSC(scriptFile))

 

 

 

Just note that the code is enough dirty

DocClox

Posted

 

 

#! /bin/sh

cat <<HD
MODIR=/steam/SteamApps/common/Skyrim/ModOrganizer/Mods
SRC_SUFF=scripts/source

HD

cat modlist.txt| awk '
BEGIN {
        printf("INCS=");
}
/^+/ {
        s = $0
        sub(/+/, "", s);
        printf("%s%s%s ", "$(MODIR)", s, "$(SRC_SUFF)");
}
'

 

 

Of course, that still needs to filter out directories that don't have any scripts to include, but it's a good start.

mericus

Posted

How did you get the mod to activate? Mine collapses at 74% after download, then I activate in Nexus Mod Manager It reads it cannot continue. after fifteen times downloading through different links it still refuses to install. even the upload to here failed, twice instead I can put the link to the download on loverslab. I have used nexus mod manager on countless other mods and had no problems except with anything created by Devious.

of the fifteen times, I downloaded this it refuses to install past unpacking at 74% every time!

 Do I need to program in Unix to fix my problem and after doing so how do I find the correct place to put the code once I have programmed it?!

×
×
  • Create New...