However I've encountered a problem, bolt prices becomes ridiculously expensive. I tried to buy the relic Explosive Bolts from Hattori and a whole bundle of them costs over 11k crowns which is a fortune. Is there a way to add a code specifically for bolt prices inside "modItemBasePrice.ws"? I'd like to really tone it down because that much crowns for bolts is just bonkers.
Is this how the code should look like?
private function MakeReasonablePriceBolt(out params : SReasonablePriceParams) { var quality : int;
quality = params.invComp.GetItemQuality(params.itemId); if (2 <= quality && quality <= 4) { if (quality == 2) params.outputPrice *= 0.05; else if (quality == 3) params.outputPrice *= 0.075; else if (quality == 4) params.outputPrice *= 0.1; } } Because I tried it and it doesn't work.
Nevermind, I found where the problem lies. I didn't add case 'bolt' under category. Now it works perfectly. I'll share the code if anyone wants to use it because apparently bolt prices aren't affected by the current version of the mod. This is the codes inside of "modItemBasePrice.ws" and you can freely change the values of the item prices here.
Spoiler:
Show
struct SReasonablePriceParams { var invComp : CInventoryComponent; var itemId : SItemUniqueId; var inputPrice : float; var outputPrice : float; }
class CModItemBasePrice { public function GetItemBasePrice( invComp : CInventoryComponent, itemId : SItemUniqueId ) : int { var itemName : name; var configPrice : int; var reasonablePriceParams : SReasonablePriceParams;
category = params.invComp.GetItemCategory(params.itemId); switch (category) { case 'armor': MakeReasonablePriceChestArmor(params); return; case 'boots': case 'pants': case 'gloves': MakeReasonablePriceOtherArmor(params); return; case 'bolt': MakeReasonablePriceBolt(params); return; } }
private function MakeReasonablePriceWeapon(out params : SReasonablePriceParams) { var quality : int;
quality = params.invComp.GetItemQuality(params.itemId); if (2 <= quality && quality <= 5) { if (quality == 2) params.outputPrice += 50; else if (quality == 3) params.outputPrice += 250; else if (quality == 4) params.outputPrice += 1250; else if (quality == 5) params.outputPrice += 2500; } }
private function MakeReasonablePriceChestArmor(out params : SReasonablePriceParams) { var quality : int;
quality = params.invComp.GetItemQuality(params.itemId); if (2 <= quality && quality <= 5) { if (quality == 2) params.outputPrice += 40; else if (quality == 3) params.outputPrice += 200; else if (quality == 4) params.outputPrice += 1000; else if (quality == 5) params.outputPrice += 2000; } }
private function MakeReasonablePriceOtherArmor(out params : SReasonablePriceParams) { var quality : int;
quality = params.invComp.GetItemQuality(params.itemId); if (2 <= quality && quality <= 5) { if (quality == 2) params.outputPrice += 20; else if (quality == 3) params.outputPrice += 100; else if (quality == 4) params.outputPrice += 500; else if (quality == 5) params.outputPrice += 1000; } }
private function MakeReasonablePriceBolt(out params : SReasonablePriceParams) { var quality : int;
quality = params.invComp.GetItemQuality(params.itemId); if (2 <= quality && quality <= 4) { if (quality == 2) params.outputPrice *= 0.05; else if (quality == 3) params.outputPrice *= 0.075; else if (quality == 4) params.outputPrice *= 0.1; } } }
To the mod creator, feel free to use this if you wish.
Hey cat, the mod doesn't seem to be equipped to handle price changes made to common and witcher items. I've tried to include the qualities 1 and 5 to functions such as "MakeReasonablePriceWeapon" inside of "modItemBasePrice.ws", but they have no effect in-game.
NOTE: The mod also, understandably, doesn't seem equipped to handle bolts, which I can sell thanks to the mod Sellable Bolts, but I do not know how to go about adding it. Further customization for users to manually define the prices of items of different types, such as food, junk, etc, (if not already available) would also be awesome!
You did not notice "if (2 <= quality && quality <= 4)". Change it to "if (1 <= quality && quality <= 5)", or remove if-condition completely, and it will work. You can identify bolts by "bolt" category.
Good idea. Original prices in configs are too big. Considering you get 20 bolts from crafting for the price of one sold by merchants. Maybe sometime later.
I don't know if you know this but the game developers set the prices high so that you don't have the facility to buy them, the trick in all this is to be able to manufacture them. In no game in the series can you get rich easily, everything is expensive and it's done that way on purpose.
You can go to modPrices.ws and modify BUY_PRICE_MULT from 1.0 to however high you would like it to be. I like it at 1.0 though. Otherwise, haggling over quest rewards is silly.
This is a really interesting mod, but after running it for a while i started to wonder. Does it change the Runewright upgrade prices or the Vineyard's renovation prices?
Unlike other price-related mods, this mod doesn't players to sell items to merchants for a good price, but rather lowers the base value of all items to balance them out. In other words, it lowers the size of the economy in the game. Am I right? So shouldn't the cost of repairing the Runemaker and Toussaint's house in the expansion pack be reduced as well? Will I be able to earn enough money to cover the cost of the expansion pack content after installing this mod?
> it lowers the size of the economy in the game Yes. > shouldn't the cost of repairing the Runemaker and Toussaint's house Should be, but unfortunately is not reduced. I did not find a way to edit dialogue prices. Part of costs can be compensated with console command addmoney(10000).
Hello. i have goty 1.3.2 gog version and i get this error. i made sure to replace goty patch i need help. and thank you.
Edit: both with goty patch and non goty patch gives same result although their size differs.
Error [modreasonableprices]game\gui\_old\components\guiaddsocketsinventorycomponent.ws(42): 'modPrices' is not a member of 'handle:CR4Game' Error [modreasonableprices]game\gui\_old\components\guidisassembleinventorycomponent.ws(87): 'modPrices' is not a member of 'handle:CR4Game' Error [modreasonableprices]game\gui\_old\components\guisocketsinventorycomponent.ws(63): 'modPrices' is not a member of 'handle:CR4Game' Error [modreasonableprices]game\gui\_old\components\guirepairinventorycomponent.ws(25): 'modPrices' is not a member of 'handle:CR4Game' Error [modreasonableprices]game\gui\_old\components\guirepairinventorycomponent.ws(66): 'modPrices' is not a member of 'handle:CR4Game' Error [modreasonableprices]game\gui\_old\components\guishopinventorycomponent.ws(75): 'modPrices' is not a member of 'handle:CR4Game' Error [modreasonableprices]game\gui\_old\components\guishopinventorycomponent.ws(105): 'modPrices' is not a member of 'handle:CR4Game' Error [modreasonableprices]game\gui\_old\components\guitooltipcomponent.ws(560): 'modPrices' is not a member of 'handle:CR4Game' Error [modreasonableprices]game\gui\_old\components\guitooltipcomponent.ws(574): 'modPrices' is not a member of 'handle:CR4Game' Error [modreasonableprices]game\gui\_old\components\guitooltipcomponent.ws(595): 'modPrices' is not a member of 'handle:CR4Game' Error [modreasonableprices]game\components\craftsmancomponent.ws(99): 'modPrices' is not a member of 'handle:CR4Game' Error [modreasonableprices]game\modcode\modprices.ws(62): 'modItemBasePrice' is not a member of 'handle:CR4Game' Error [modreasonableprices]game\modcode\modprices.ws(79): 'modItemBasePrice' is not a member of 'handle:CR4Game' Error [modreasonableprices]game\modcode\modprices.ws(92): 'modItemBasePrice' is not a member of 'handle:CR4Game' Error [modreasonableprices]game\modcode\modprices.ws(126): 'modItemBasePrice' is not a member of 'handle:CR4Game' Error [modreasonableprices]game\modcode\modprices.ws(142): 'modItemBasePrice' is not a member of 'handle:CR4Game' Error [modreasonableprices]game\modcode\modprices.ws(154): 'modItemBasePrice' is not a member of 'handle:CR4Game' Error [modreasonableprices]game\gui\menus\inventorymenu.ws(2720): 'modPrices' is not a member of 'handle:CR4Game' Error [modreasonableprices]game\gui\menus\inventorymenu.ws(2782): 'modPrices' is not a member of 'handle:CR4Game' Error [modreasonableprices]game\gui\menus\inventorymenu.ws(2812): 'modPrices' is not a member of 'handle:CR4Game' Error [modreasonableprices]game\gui\menus\inventorymenu.ws(2820): 'modPrices' is not a member of 'handle:CR4Game' Error [modreasonableprices]game\gui\menus\inventorymenu.ws(2953): 'modPrices' is not a member of 'handle:CR4Game' Error [modreasonableprices]game\gui\menus\craftingmenu.ws(373): 'modPrices' is not a member of 'handle:CR4Game'
Warning [content0]engine\environment.ws(30): Global native function 'EnableDebugOverlayFilter' was not exported from C++ code. Warning [content0]engine\environment.ws(32): Global native function 'EnableDebugPostProcess' was not exported from C++ code. Warning [content0]engine\showflags.ws(11): Global native function 'DebugSetEShowFlag' was not exported from C++ code.
Yes. There is Script Merger for Witcher 3. Or you can merge scripts using differencing and merging tool like WinMerge. The idea is that when multiple mods modify the same files ("scripts" are "*.ws" files), multiple mod-copies of the same script have to merged into a single file. Because game uses only the first modded script it finds alphabetically. What happened before is that game found "r4Game.ws" file which does not contain variables "modPrices" and "modItemBasePrice". But these variables were in other "r4Game.ws" file (in modReasonablePrices). And then some other modded script specifies that it needs "modPrices", but "modPrices" were not included, because of duplicated file.
57 comments
However I've encountered a problem, bolt prices becomes ridiculously expensive. I tried to buy the relic Explosive Bolts from Hattori and a whole bundle of them costs over 11k crowns which is a fortune. Is there a way to add a code specifically for bolt prices inside "modItemBasePrice.ws"? I'd like to really tone it down because that much crowns for bolts is just bonkers.
Is this how the code should look like?
private function MakeReasonablePriceBolt(out params : SReasonablePriceParams)
{
var quality : int;
quality = params.invComp.GetItemQuality(params.itemId);
if (2 <= quality && quality <= 4)
{
if (quality == 2)
params.outputPrice *= 0.05;
else if (quality == 3)
params.outputPrice *= 0.075;
else if (quality == 4)
params.outputPrice *= 0.1;
}
}
Because I tried it and it doesn't work.
struct SReasonablePriceParams
{
var invComp : CInventoryComponent;
var itemId : SItemUniqueId;
var inputPrice : float;
var outputPrice : float;
}
class CModItemBasePrice
{
public function GetItemBasePrice( invComp : CInventoryComponent, itemId : SItemUniqueId ) : int
{
var itemName : name;
var configPrice : int;
var reasonablePriceParams : SReasonablePriceParams;
itemName = invComp.GetItemName(itemId);
configPrice = theGame.GetDefinitionsManager().GetItemPrice(itemName);
reasonablePriceParams.invComp = invComp;
reasonablePriceParams.itemId = itemId;
reasonablePriceParams.inputPrice = configPrice;
reasonablePriceParams.outputPrice = configPrice;
MakeReasonablePrice(reasonablePriceParams);
return CeilF(reasonablePriceParams.outputPrice);
}
private function MakeReasonablePrice(out params : SReasonablePriceParams)
{
var category : name;
if (params.invComp.ItemHasTag(params.itemId, 'PlayerSteelWeapon' ) || params.invComp.ItemHasTag(params.itemId, 'PlayerSilverWeapon' ))
{
MakeReasonablePriceWeapon(params);
return;
}
category = params.invComp.GetItemCategory(params.itemId);
switch (category)
{
case 'armor':
MakeReasonablePriceChestArmor(params);
return;
case 'boots':
case 'pants':
case 'gloves':
MakeReasonablePriceOtherArmor(params);
return;
case 'bolt':
MakeReasonablePriceBolt(params);
return;
}
}
private function MakeReasonablePriceWeapon(out params : SReasonablePriceParams)
{
var quality : int;
quality = params.invComp.GetItemQuality(params.itemId);
if (2 <= quality && quality <= 5)
{
if (quality == 2)
params.outputPrice += 50;
else if (quality == 3)
params.outputPrice += 250;
else if (quality == 4)
params.outputPrice += 1250;
else if (quality == 5)
params.outputPrice += 2500;
}
}
private function MakeReasonablePriceChestArmor(out params : SReasonablePriceParams)
{
var quality : int;
quality = params.invComp.GetItemQuality(params.itemId);
if (2 <= quality && quality <= 5)
{
if (quality == 2)
params.outputPrice += 40;
else if (quality == 3)
params.outputPrice += 200;
else if (quality == 4)
params.outputPrice += 1000;
else if (quality == 5)
params.outputPrice += 2000;
}
}
private function MakeReasonablePriceOtherArmor(out params : SReasonablePriceParams)
{
var quality : int;
quality = params.invComp.GetItemQuality(params.itemId);
if (2 <= quality && quality <= 5)
{
if (quality == 2)
params.outputPrice += 20;
else if (quality == 3)
params.outputPrice += 100;
else if (quality == 4)
params.outputPrice += 500;
else if (quality == 5)
params.outputPrice += 1000;
}
}
private function MakeReasonablePriceBolt(out params : SReasonablePriceParams)
{
var quality : int;
quality = params.invComp.GetItemQuality(params.itemId);
if (2 <= quality && quality <= 4)
{
if (quality == 2)
params.outputPrice *= 0.05;
else if (quality == 3)
params.outputPrice *= 0.075;
else if (quality == 4)
params.outputPrice *= 0.1;
}
}
}
To the mod creator, feel free to use this if you wish.
The same happens with (quality == 1), but after fiddling with it a bunch, I figured that this is the base price and it is better to not touch it.
function MakeReasonablePriceWeapon:
private function MakeReasonablePriceWeapon(out params : SReasonablePriceParams)
{
var quality : int;
quality = params.invComp.GetItemQuality(params.itemId);
if (2 <= quality && quality <= 4)
{
if (quality == 2)
params.outputPrice += ((params.outputPrice * 0.25) + 100);
else if (quality == 3)
params.outputPrice += ((params.outputPrice * 0.50) + 200);
else if (quality == 4)
params.outputPrice += ((params.outputPrice) + 400);
else if (quality == 5)
params.outputPrice += ((params.outputPrice * 2.0) + 800);
}
}
NOTE: The mod also, understandably, doesn't seem equipped to handle bolts, which I can sell thanks to the mod Sellable Bolts, but I do not know how to go about adding it. Further customization for users to manually define the prices of items of different types, such as food, junk, etc, (if not already available) would also be awesome!
You can identify bolts by "bolt" category.
Hello iCat42
This mod require an update for the 4.03 version.
Here the changelog for help:
Scripts 4.02 vs 4.03
I can offer my assistance to update this mod and share to you in Direct Message (No DP %, just my name in the description).
In other words, it lowers the size of the economy in the game. Am I right?
So shouldn't the cost of repairing the Runemaker and Toussaint's house in the expansion pack be reduced as well?
Will I be able to earn enough money to cover the cost of the expansion pack content after installing this mod?
Yes.
> shouldn't the cost of repairing the Runemaker and Toussaint's house
Should be, but unfortunately is not reduced. I did not find a way to edit dialogue prices. Part of costs can be compensated with console command addmoney(10000).
Thank you for answer.
Edit: Did it by editing craftingMenu.ws
temCost = m_craftingManager.GetCraftingCost(tag);
to
itemCost = RoundMath(0.5 * m_craftingManager.GetCraftingCost(tag));
Thanks for answering a comment before this one that had the solution for it!
i have goty 1.3.2 gog version and i get this error. i made sure to replace goty patch
i need help.
and thank you.
Edit: both with goty patch and non goty patch gives same result although their size differs.
Error [modreasonableprices]game\gui\_old\components\guiaddsocketsinventorycomponent.ws(42): 'modPrices' is not a member of 'handle:CR4Game'
Error [modreasonableprices]game\gui\_old\components\guidisassembleinventorycomponent.ws(87): 'modPrices' is not a member of 'handle:CR4Game'
Error [modreasonableprices]game\gui\_old\components\guisocketsinventorycomponent.ws(63): 'modPrices' is not a member of 'handle:CR4Game'
Error [modreasonableprices]game\gui\_old\components\guirepairinventorycomponent.ws(25): 'modPrices' is not a member of 'handle:CR4Game'
Error [modreasonableprices]game\gui\_old\components\guirepairinventorycomponent.ws(66): 'modPrices' is not a member of 'handle:CR4Game'
Error [modreasonableprices]game\gui\_old\components\guishopinventorycomponent.ws(75): 'modPrices' is not a member of 'handle:CR4Game'
Error [modreasonableprices]game\gui\_old\components\guishopinventorycomponent.ws(105): 'modPrices' is not a member of 'handle:CR4Game'
Error [modreasonableprices]game\gui\_old\components\guitooltipcomponent.ws(560): 'modPrices' is not a member of 'handle:CR4Game'
Error [modreasonableprices]game\gui\_old\components\guitooltipcomponent.ws(574): 'modPrices' is not a member of 'handle:CR4Game'
Error [modreasonableprices]game\gui\_old\components\guitooltipcomponent.ws(595): 'modPrices' is not a member of 'handle:CR4Game'
Error [modreasonableprices]game\components\craftsmancomponent.ws(99): 'modPrices' is not a member of 'handle:CR4Game'
Error [modreasonableprices]game\modcode\modprices.ws(62): 'modItemBasePrice' is not a member of 'handle:CR4Game'
Error [modreasonableprices]game\modcode\modprices.ws(79): 'modItemBasePrice' is not a member of 'handle:CR4Game'
Error [modreasonableprices]game\modcode\modprices.ws(92): 'modItemBasePrice' is not a member of 'handle:CR4Game'
Error [modreasonableprices]game\modcode\modprices.ws(126): 'modItemBasePrice' is not a member of 'handle:CR4Game'
Error [modreasonableprices]game\modcode\modprices.ws(142): 'modItemBasePrice' is not a member of 'handle:CR4Game'
Error [modreasonableprices]game\modcode\modprices.ws(154): 'modItemBasePrice' is not a member of 'handle:CR4Game'
Error [modreasonableprices]game\gui\menus\inventorymenu.ws(2720): 'modPrices' is not a member of 'handle:CR4Game'
Error [modreasonableprices]game\gui\menus\inventorymenu.ws(2782): 'modPrices' is not a member of 'handle:CR4Game'
Error [modreasonableprices]game\gui\menus\inventorymenu.ws(2812): 'modPrices' is not a member of 'handle:CR4Game'
Error [modreasonableprices]game\gui\menus\inventorymenu.ws(2820): 'modPrices' is not a member of 'handle:CR4Game'
Error [modreasonableprices]game\gui\menus\inventorymenu.ws(2953): 'modPrices' is not a member of 'handle:CR4Game'
Error [modreasonableprices]game\gui\menus\craftingmenu.ws(373): 'modPrices' is not a member of 'handle:CR4Game'
Warning [content0]engine\environment.ws(30): Global native function 'EnableDebugOverlayFilter' was not exported from C++ code.
Warning [content0]engine\environment.ws(32): Global native function 'EnableDebugPostProcess' was not exported from C++ code.
Warning [content0]engine\showflags.ws(11): Global native function 'DebugSetEShowFlag' was not exported from C++ code.
but i am not sure if i know how to merge scripts.
is some other mod interfering with this one ?
Edit: it's working now thanks to you.
What happened before is that game found "r4Game.ws" file which does not contain variables "modPrices" and "modItemBasePrice". But these variables were in other "r4Game.ws" file (in modReasonablePrices). And then some other modded script specifies that it needs "modPrices", but "modPrices" were not included, because of duplicated file.