This mod is BUGGED : Can't search any mutation (even when you have enough skill points and greater mutagens) if you install this mod ! The mod itself is very useful with the percentage system, but disables the research of mutations (B&W)
However, do note that the skill "Synergy" has two glitches in the vanilla game:
1. It doesn't increase the Bonus by 50% the way it is shown in your character tab. For example, without my mod a Greater Green Mutagen with Synergy will display "+900 Vitality" but thats wrong, it doesn't increase by 300, its only +825.
That happens 'cause it doesnt add +50% to the total sum of 4x150=900 but only uses the 3 Skills, thus (3x150)/2 = 225
2. The additional Bonus "Synergy" gives you sticks with you even if you replace the Mutagen - it will only go away when you remove the Skill Synergy itself.
Meaning, lets say you are playing without my mod and got +600 Vitality and another +225 from Synergy, if you remove the Green Mutagen, you will keep the +225 until you remove Synergy aswell.
Since that strange behaviour is present in the base game, it also affects my mod (Just verified that ingame).
In PlayerAbilityManager.ws find this line: current.count = skillLevel * GetSkillGroupColorCount(color, skillGroupID);
Change it to this: current.count = skillLevel * (GetSkillGroupColorCount(color, skillGroupID) + 1);
Now it gives what it displays.
To fix mutagen removal update find this function in the same file:
public final function OnSkillMutagenUnequipped(item : SItemUniqueId, slot : EEquipmentSlots, prevColor : ESkillColor)
Replace whole function with this:
public final function OnSkillMutagenUnequipped(item : SItemUniqueId, slot : EEquipmentSlots, prevColor : ESkillColor) { var i : int; var newColor : ESkillColor;
I hope he integrates your fix with his mod. Otherwise everything works as intended, thanks!
Edit: Rebalanced version seems a wee bit OP I think, I'm gonna switch to normal version! I was sitting at around 14k HP with 4x decoctions in the rebalanced version (+4000 HP from the Decoction skill HP Bonus)
Oh, I didn't know that skill gives +1000 for *each* Decoction oO That might end up a bit OP indeed.
You see, I made the 15% Version because without speccing far into Alchemy, sitting on a fragile pile of only 6k Vitality on level 46 Deathmarch, those +600 Vitality Points are kinda laughable compared to 40% Attack Power or Sign Intensity. The latter frequently allows my Quen to sustain an additional hit before breaking, after all.
Thanks for the guidance with the necessary script changes, DominusSicarum! I will include this in my mod, but probably also make a standalone fix for those who dont want the +% Bonus
I understand the script lines and changes you posted, but can't say the same about the display.
Because it contains the labels (Vitality, Sign Intensity, Attack Power) I suppose this is in the localization files, and mods changing localization require users to merge the files for a proper installation, if I remember correctly? In that case I wouldn't want to add it, rather keep the "false" display and convenient installation.
Nah, item attributes display (the numerical value) in tooltips is handled by the guiTooltipComponent.ws, while in the character menu it's handled by... characterMenu.ws.
It's simple matter of changing RoundMath(variable) to NoTrailZeros(RoundTo(variable,precision)). And adding condition in guiTooltipComponent.ws to recognize specific case of the green mutagen stat.
public final function OnSkillMutagenUnequipped( out item : SItemUniqueId, slot : EEquipmentSlots, prevColor : ESkillColor, optional dontMerge : bool ) { var i : int; var newColor : ESkillColor; var ids : array< SItemUniqueId >; var itemName : name;
I'm including it right now, by the way DominusSicarum, where did you learn so much about Witcher3 scripting?
I mean, I understand all the scripts here, but the reason I didn't make the changes suggested here myself is because I wouldn't know where to find the correct script functions. For example "NoTrailZeros" seems specific to Witcher3 scripts - though I seem to recall a similar one among LUA.
Is there some kind of documentation im not aware of, which lists all script functions?
http://witcher.gamepedia.com/Witcher_3_Modding This is a somewhat useful page.
Other than that - I just dig through the script files (mass search in Sublime Text is a useful tool in that regard). All core functions (e.g. those dealing with base objects like strings or floats) are contained in the content\content0\scripts\core folder of your witcher 3 install.
Also - it's heavily based on c++. To the point of importing raw functions from C in previous script versions, lol.
Based on DominusSicarum's post at the next page, the synergy fix is in PlayerAbilityManager.ws. I deleted all other files from the mod, and it worked fine.
49 comments
Do not download this mod.
As noted below, it WILL BREAK your game.
You will not be able to research mutations in Blood and Wine.
Best,
Hem
However, do note that the skill "Synergy" has two glitches in the vanilla game:
1. It doesn't increase the Bonus by 50% the way it is shown in your character tab. For example, without my mod a Greater Green Mutagen with Synergy will display "+900 Vitality" but thats wrong, it doesn't increase by 300, its only +825.
That happens 'cause it doesnt add +50% to the total sum of 4x150=900 but only uses the 3 Skills, thus (3x150)/2 = 225
2. The additional Bonus "Synergy" gives you sticks with you even if you replace the Mutagen - it will only go away when you remove the Skill Synergy itself.
Meaning, lets say you are playing without my mod and got +600 Vitality and another +225 from Synergy, if you remove the Green Mutagen, you will keep the +225 until you remove Synergy aswell.
Since that strange behaviour is present in the base game, it also affects my mod (Just verified that ingame).
In PlayerAbilityManager.ws find this line:
current.count = skillLevel * GetSkillGroupColorCount(color, skillGroupID);
Change it to this:
current.count = skillLevel * (GetSkillGroupColorCount(color, skillGroupID) + 1);
Now it gives what it displays.
To fix mutagen removal update find this function in the same file:
public final function OnSkillMutagenUnequipped(item : SItemUniqueId, slot : EEquipmentSlots, prevColor : ESkillColor)
Replace whole function with this:
Basically old code checked for mutagen bonuses before nullifying the group's synergy color. This fixes that.
Would be cool if you included this into your mod.
Can also provide a way to include first digit after decimal point in bonus description.
I hope he integrates your fix with his mod. Otherwise everything works as intended, thanks!
Edit: Rebalanced version seems a wee bit OP I think, I'm gonna switch to normal version! I was sitting at around 14k HP with 4x decoctions in the rebalanced version (+4000 HP from the Decoction skill HP Bonus)
That might end up a bit OP indeed.
You see, I made the 15% Version because without speccing far into Alchemy, sitting on a fragile pile of only 6k Vitality on level 46 Deathmarch, those +600 Vitality Points are kinda laughable compared to 40% Attack Power or Sign Intensity. The latter frequently allows my Quen to sustain an additional hit before breaking, after all.
But thats why theres two versions after all
I will include this in my mod, but probably also make a standalone fix for those who dont want the +% Bonus
I understand the script lines and changes you posted, but can't say the same about the display.
Because it contains the labels (Vitality, Sign Intensity, Attack Power) I suppose this is in the localization files, and mods changing localization require users to merge the files for a proper installation, if I remember correctly?
In that case I wouldn't want to add it, rather keep the "false" display and convenient installation.
It's simple matter of changing RoundMath(variable) to NoTrailZeros(RoundTo(variable,precision)). And adding condition in guiTooltipComponent.ws to recognize specific case of the green mutagen stat.
public final function OnSkillMutagenUnequipped( out item : SItemUniqueId, slot : EEquipmentSlots, prevColor : ESkillColor, optional dontMerge : bool )
Only this is different:{
var i : int;
var newColor : ESkillColor;
var ids : array< SItemUniqueId >;
var itemName : name;
i = GetMutagenSlotIndex(slot);
if(i<0)
return;
if(CanUseSkill(S_Alchemy_s19))
{
MutagensSyngergyBonusUpdate( mutagenSlots[i].skillGroupID, GetSkillLevel( S_Alchemy_s19) );
}
mutagenSlots[i].item = GetInvalidUniqueId();
newColor = GetSkillGroupColor(mutagenSlots[i].skillGroupID);
LinkUpdate(newColor, prevColor);
theGame.GetGuiManager().IgnoreNewItemNotifications( true );
if (!dontMerge)
{
itemName = thePlayer.inv.GetItemName( item );
thePlayer.inv.RemoveItem( item );
ids = thePlayer.inv.AddAnItem( itemName, 1, true, true );
item = ids[0];
}
theGame.GetGuiManager().IgnoreNewItemNotifications( false );
}
current.count = skillLevel * (GetSkillGroupColorCount(color, skillGroupID) + 1);
In characterMenu.ws find private function GetGroupBonusDescription
At the end of it will be line:
if( mutagenStats[i].percentageValue )
In its block statement (between curly braces) change RoundMath(attributeValue * 100) to NoTrailZeros(RoundTo(attributeValue * 100, 3))
Should look like this:
In the same file, after line:
if( itemStats[i].percentageValue )
Do the same, so the end result looks like this:
Next, in the guiTooltipComponent.ws find function private function AddItemStats
Find this:
Replace with this:
I mean, I understand all the scripts here, but the reason I didn't make the changes suggested here myself is because I wouldn't know where to find the correct script functions. For example "NoTrailZeros" seems specific to Witcher3 scripts - though I seem to recall a similar one among LUA.
Is there some kind of documentation im not aware of, which lists all script functions?
This is a somewhat useful page.
Other than that - I just dig through the script files (mass search in Sublime Text is a useful tool in that regard).
All core functions (e.g. those dealing with base objects like strings or floats) are contained in the content\content0\scripts\core folder of your witcher 3 install.
Also - it's heavily based on c++. To the point of importing raw functions from C in previous script versions, lol.