Jump to content

[LE] Compiling scripts without recompiling dependencies


Recommended Posts

I'm making some small tweaks to an existing mod. This mod has many soft interfaces with other mods which work directly with quest scripts retrieved by Form ID from the named mods. Right now I'm trying to update an interface to use a newer version of a mod which changed the plugin name. All of these interfaces are activated/reloaded from a single .psc file. I need to make a change to this file to update the plugin name it's checking.

 

However, my problem is that when I compile this master interface file, I enter a world of pain. Every single interface (of which there are many) ends up trying to re-compile too, which in turn ends up attempting to re-compile the original mod, which in turn attempts to re-compile the original mod's requirements, etc, etc.

 

Note: I'm specifying the .psc files to compile, not compiling the whole folder. The console output does indicate it's only the 4 files I intended to compile which are being considered for compiling. It seems to be dependency that's compiling the rest.

 

 

I feel like I'm definitely doing something wrong here. Should be able to provide some sort of header, or the .pex, and it won't recursively compile all the other scripts as well? Hopefully I've just missed something or put files in the wrong place and I won't have to track down every mod's source files just to tweak this one small thing.

 

Thank you for any insight you can provide!

Link to comment
Share on other sites

The compiler is not trying to re-compile the other scripts. The compiler needs access to the PSC files that house any functions or properties in use on the script being compiled. Without seeing the script(s) that you are wanting to compile and the compiler error associated with it, I cannot give any more information beyond speculating that you do not have all the necessary PSC files accessible to the compiler.

Link to comment
Share on other sites

A little more of a detailed example that I should have included originally. I'm looking for a more general understanding of how to decouple compilation units in Papyrus to avoid running into this issue in the future rather than answers for this specific mod.

 

I have "mcm.psc", which contains a property for scripts "interfaceA.psc", "interfaceB.psc", "interfaceC.psc", etc. I've modified "mcm.psc" and "interfaceA.psc", which should generate "mcm.pex" and "interface.pex". I have no wish to alter "interfaceB.pex", etc.

 

However, "interfaceB.psc" makes reference to, and uses functions from, "modB_mainQuest.psc". I don't have "modB_mainQuest.psc" currently. This missing "modB_mainQuest.psc" problem bubbles up as "interfaceB.psc" attempts to reference things which aren't defined, which then causes "mcm.psc" to fail to compile.

 

 

 

Is there any way to avoid having to include "modB_mainQuest.psc", and all the things that script makes reference to? i.e. Can I provide a .psc with dummy/stub functions which the full mod's .pex would provide bodies for at runtime?

Edited by BrineyBelfast
Link to comment
Share on other sites

There is no way to avoid not having the necessary PSC files.

It might be possible to create a "dummy PSC" with whatever functions / properties being called. But having never done that, I am not sure exactly what would happen.

 

Keep in mind, that the compiler stops at the first issue that prevents compilation. You may find that the script is referencing even more scripts from other mods. May just be easiest to get the PSC files from all the mods that the main one keeps referencing. No need to include them in the final package since they were not edited. But would be good to have on hand for any future editing needs.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...