WitcherScript first mod
WitcherScript files use .ws. CD PROJEKT RED's WitcherScript section is the source for language and compiler details. This chapter gives a controlled script-only experiment; it does not imply that the example was executed by ModDocs.
Scope and file layout
Keep a script experiment separate from an editor world project. In a test installation, create mods/modYourName/content/scripts/local/ and place an authored .ws file under local. The official first script mod says the mod folder needs the mod prefix for loading. Choose a distinctive suffix and avoid replacing another mod's directory. The game also has base scripts under content\content0\scripts\; inspect them as references, but put authored files in the mod folder rather than modifying originals.
For an initial check, add a uniquely named exec function to the .ws file. The official tutorial uses a HUD message example and invokes it through the developer console. Name the function so it cannot be confused with another installed mod, save the file with the actual .ws extension, then start the game in a controlled test profile. A text editor that silently appends .txt creates a file the script loader will not read.
Observe compilation before testing behavior
Check the first compiler result when the game starts. If compilation fails, preserve the exact diagnostic, filename and line number. Fix that error before adding any more code. A launch that reaches a menu does not by itself prove that the intended function compiled or was called. Use the developer console as documented in the official console setup page and invoke the function by its exact name. Observe the effect, then repeat after a restart with only this mod installed.
If the function is not recognized, inspect the mods/mod.../content/scripts/local/ path, extension, and startup compiler messages. If compilation succeeds but there is no effect, verify the console command name and whether the chosen action has a visible effect in the current game state. If adding another script mod breaks compilation, isolate the two mods and compare names, declarations and overridden symbols before claiming a load-order issue.
Expand carefully
Move from a console-callable function to actual gameplay behavior only after the small check passes. Read the official language guide and script compilation error overrides before changing existing script declarations. Record every copied or overridden game symbol and the game build it came from. Recheck that list after a game update; a prior compiler success is not proof that an override remains compatible.
For distribution, include only authored scripts and the required mod directory structure. State the supported game version, expected effect, exact test procedure, dependencies and known symbol conflicts. Preserve the previous working copy and a test save. Do not claim compatibility with other script mods until their combination was actually checked.