How to solve script compilation issues when launching the game with mods

+

Guest 2364765

Guest
How to solve script compilation issues when launching the game with mods

Not sure whether CDPR directly envisioned for the script mods to be used like this but here's a solution for all of your compiling issues (give you don't mess with them, but use supposedly "working" ones)
Quick and easy:
Step1) Download ModKit
Step2) Install modkit
Step3) Go into the modkit folder and enter "r4data" folder, copy scripts folder
Step4) Go into your Witcher 3 installation folder, open or create "Mods" folder
Step4) Now make a new folder and name it "modBaseScripts", inside that folder make a new one named "content"
Step5) Paste scripts inside that folder
Step6) Now go to Documents\The Witcher 3 and open/create Mods.settings file (make sure it's Mods.settings instead of Mods.settings.txt !).
Step7) Now edit contents of the file as follows:

[modBaseScripts]
Enabled=1
Priority=9999
[modAnyRealMod]
Enabled=1
Priority=9998

Now, every mod you install has to be added to this file It is important that base scripts mod has the lowest priority(highest number) so it will load last, leaving only vanilla (unmodified) files to be loaded from that folder.

Congrats, now your game should compile script mods successfully!
 
Last edited by a moderator:
Not quite...

While the (base)script now compiles it causes a 100% driver crash. Without the script (enabled = 0) the game launches.

If I remove all but "/scripts" and "x64.release.redscripts" it compiles and runs.

Something wrong, somewhere, and I may need to re-install - possible contamination by subversions of dlc or patches skipped (or not replaced), and old content0 mods for lighting.
 
Ok the scripting works but now the game crashes after loading the game (Without other script mods loaded) Also Geralt's body texture goes missing when applying this script method. Only the head shows up for a second then crashes.
 
Here is an easy fix for MOD script errors.

Paste the code below into a blank notepad txt file and rename it to telemetryKeyword.ws and once that is done, place the file in The Witcher 3 Wild Hunt\content\content0\scripts\engine and that's it.

Copy and Paste code below this line

/*
Copyright © CD Projekt RED 2015
*/






import class CR4TelemetryScriptProxy extends CObject
{
import final function Log( eventType : ER4TelemetryEvents );
import final function LogWithLabel( eventType : ER4TelemetryEvents, label : String );
import final function LogWithValue( eventType : ER4TelemetryEvents, value : int );
import final function LogWithValueStr( eventType : ER4TelemetryEvents, value : String );


import final function LogWithLabelAndValue( eventType : ER4TelemetryEvents, label : String, value : int );
import final function LogWithLabelAndValueStr( eventType : ER4TelemetryEvents, label : String, value : String );


import final function SetCommonStatFlt( statType: ER4CommonStats, value : float );
import final function SetCommonStatI32( statType: ER4CommonStats, value : int );


import final function SetGameProgress( value : float );


import final function AddSessionTag( tag : String );
import final function RemoveSessionTag( tag : String );


import final function XDPPrintUserStats( statisticName : String );
import final function XDPPrintUserAchievement( achievementName : String );
}
 
Last edited by a moderator:
I believe there is a simpler solution which I found thanks to all suggestions to use script directory from Mod Tools installation. At least it worked for me.
I've installed mod tools and compared the scripts directory contents found in r4data with the one in \The Witcher 3 Wild Hunt\content\content0\scripts\.
I've found that my installation of a game was missing one script: \The Witcher 3 Wild Hunt\content\content0\scripts\engine\telemetryKeyword.ws.
I copied it over and no more script errors.

I suggest that anyone having script compilation errors look if they are not missing some of the scripts, or simply copy over scripts directory from the mod tools. Of course make a backup first :).

Edit: It appears my solution is basically the same as SoloCreep's :).
 
Last edited:
or you could just copy the contents of

yourmodkitdirectory\r4data\scripts\

to

yourwitcher3directory\content\content0\scripts\
 
Thank you so much, I tried the most of the fixes and nothing worked till I tried yours Solocreep! Plus yours was the simplest to implement!
Thanks again :)
 
Last edited:
Unabel to resolve script compilation errors

Thanks for all commentators.

Seems that since I am a newbie I cannot post and mention links, so I will try this route.

I have been modding TW3 for a while now, but only the xml files.
Recently I came across mods asking me to place mods into the W3 mods directory. I did that but I kept getting script compile errors at startup time.
So I looked on the internet and found some things here.
Every thread mentions that I have to replace some files into the directory: Witcher Game Dir content\content0\scripts\engine

Fine, I can do that. But I DO NOT have that directory in my Witcher 3 game, starting from ; \scripts\engine

I have also seen another thread:
at this link:forums.cdprojektred.com/threads/56044-How-to-solve-script-compilation-issues-when-launching-the-game-with-mods
and it too mentions the same solution.

What do I do so I do not BREAK the game.
Much regards
 
I did everything u wrote but could understand thit part "Now, every mod you install has to be added to this file" . the "file" u meant, is Mods.settings file? How do i add mods there?
 
I did everything u wrote but could understand thit part "Now, every mod you install has to be added to this file" . the "file" u meant, is Mods.settings file? How do i add mods there?

I made a mod based on this thread. You can check it to better understand how to make this work.
 
Last edited:
Top Bottom