Witcher 3 technical structure

+
I am pretty sure someone has asked this before, but I can't seem to find the thread so please excuse my repost but I started modding recently (as I believe this game could have been much better with a bit more polished mechanics [especially early-game leveling and late-game signs] ._.) and I can't seem to find the scripts in the uncooked game files. So my question, where are the scripts for the game functions and more importantly how do I access and change/package them for mods?
 
Scripts are not uncooked are all. They are as Witcherscript Text files in \content\scripts iirc

you can make a script mod simply by copying an existing .ws file with the same relativepath into \Mods\modMyName\content\scripts

In fact, the game reads all .ws files in the scripts folder of your mods, so you can create new .ws files on top of vanilla code.
 
Many thanks,

damn, that's many files of separated scripts ._.
Do you by any chance know where the methods are that activate and define set bonuses? (I think I have the definition already)
I specifically want to make weaker set bonuses apply on lower tiers of the armor and am thinking about doing that by changing rarity to reflect the upgrade tier and multiplying (a lowered) bonus with that rarity.
 

Guest 2091327

Guest
I don't know exactly where to look, in what files, but this is implemented in the Ghost Mode mod, so you can have a look at the scripts there for inspiration.
 
@Pangaea666
Honestly, I didn't think that would help as much as it did. Thank you.

I don't know how to decompile mods, but as far as the scripts are talking it looks like they just give a "minor" bonus for all non-grandmaster pieces regardless of quality. I'd need to look through the item codes and definitions of the bonuses for more info. (Which I think both are .xml i.e. not accessible without "uncooking").#

Edit: I have decompiled the mod... it was easier than I thought lol XD
It looks like that mod does what I want to make but I don't find where the bonus was added up.
Honestly, I wish they released the set bonus rework as a separate mod, my work would be done here ;-;
 
Last edited:
Many thanks,

damn, that's many files of separated scripts ._.
Do you by any chance know where the methods are that activate and define set bonuses? (I think I have the definition already)
I specifically want to make weaker set bonuses apply on lower tiers of the armor and am thinking about doing that by changing rarity to reflect the upgrade tier and multiplying (a lowered) bonus with that rarity.

there's two parts to set bonuses:
1) if you just want to change *magnitudes* (e.g. change the seconds a set bonus applies, or the damage etc) then you can actually do that in the xml definitions.(this means, you need to uncook the game OR use Wolvenkit, which is the community mod editor where you can select files to uncook - no need to uncook the whole game anymore) Link: https://www.nexusmods.com/witcher3/mods/3161 .

2) if you want to change the actual mechanics, e.g. completely change what a set bonus does, then that's ... difficult. or at least takes a lot of work. I made a mod who adds new set bonuses, you can look inside it. https://www.nexusmods.com/witcher3/mods/2640 specifically the scripts, but it also includes xmls. (btw, you can also use WolvenKit to see what's inside a mod)

hope that helps :)
 
there's two parts to set bonuses:
1) if you just want to change *magnitudes* (e.g. change the seconds a set bonus applies, or the damage etc) then you can actually do that in the xml definitions.(this means, you need to uncook the game OR use Wolvenkit, which is the community mod editor where you can select files to uncook - no need to uncook the whole game anymore) Link: https://www.nexusmods.com/witcher3/mods/3161 .

2) if you want to change the actual mechanics, e.g. completely change what a set bonus does, then that's ... difficult. or at least takes a lot of work. I made a mod who adds new set bonuses, you can look inside it. https://www.nexusmods.com/witcher3/mods/2640 specifically the scripts, but it also includes xmls. (btw, you can also use WolvenKit to see what's inside a mod)

hope that helps :)


I did a bit of overthinking, I think the idea is quite easy to put into the game. Just need to change the function SetItemEquipped() function, add an extra tag to each item (just so the achievements aren't affected ._.), add a tag to each of the set pieces and find out how to take the quality of an item. (Which does look like a lot of work for someone who didn't mod that much yet ._.)
Edit: On second thought, I should scan the quality when adding the bonus... for compatibility sake.

But the better question does wolven kit still need to uncook mods manually? It doesn't seem like it uncooks the game, so how does it open mods?
 
Last edited:
WolvenKit reads the mods .bundle and .cache files and extracts files from those, no need to uncook them. These files can be accessed in Files - Add files from Mod.

One exeption to this is a .cache files are put under subdirectories in mods, like multiple texturecaches etc. These files need to be moved to the root modName/content/
 
Top Bottom