Jump to content

Recommended Posts

Posted

Hello,



Visual Studio allows to double-click on paths logged in the output panel.


For example double-clicking on "C:\MyMod\MyFile.cs(42) : Error, you can't do that !" will open MyFile.cs at line 42. Quite handy.



The problem is : compilation task does not compile your source files directly, but a copy of them stored in a temporary folder (...\XCOM 2 SDK\Development\Src), and the UnrealScript compiler's output is passed to ModBuddy as is.


So if you double-click on the error/warning this will open the temporary copy, and you'll have to manually open and browse the original file to fix the error/warning.



The solution is to replace the compilation task, so it logs the path of original .uc file, instead of the temporary one.



Let's say the SDK is stored in "C:\steam\steamapps\common\XCOM 2 SDK"



1) Create "C:\steam\steamapps\common\XCOM 2 SDK\Binaries\Win32\ModBuddy\Extensions\Application\ModdedCompileScripts.targets"


(code based on decompiled XCOM2.Tasks.dll )


  Reveal hidden contents



2) Open "C:\steam\steamapps\common\XCOM 2 SDK\Binaries\Win32\ModBuddy\Extensions\Application\XCOM2.targets" in a text editor (make backup blahblahblah)



3) Add the following element after "<Project ...>" tag :


<Import Project="ModdedCompileScripts.targets" />


4) Replace "<CompileScripts" by "<ModdedCompileScripts"




  • Recently Browsing   0 members

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