The Witcher 3

File information

Last updated

Original upload

Created by

iCat42

Uploaded by

iCat42

Virus scan

Safe to use

57 comments

  1. AstralZephyrS8
    AstralZephyrS8
    • member
    • 0 kudos
    Hi, firstly, amazing mod.

    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.
    1. AstralZephyrS8
      AstralZephyrS8
      • member
      • 0 kudos
      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;

      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.
  2. delular100
    delular100
    • member
    • 3 kudos
    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.
    1. iCat42
      iCat42
      • premium
      • 49 kudos
      Show me your function MakeReasonablePriceWeapon
    2. delular100
      delular100
      • member
      • 3 kudos
      It looks like this (down below), but without the (quality == 5) part. I added it to test before replying to you and it didn't work.

      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:
      Spoiler:  
      Show

      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!
    3. iCat42
      iCat42
      • premium
      • 49 kudos
      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.
    4. delular100
      delular100
      • member
      • 3 kudos
      Based
    5. vaibhavpal27
      vaibhavpal27
      • member
      • 0 kudos
      is there an issue with the mod? Doesn't work for me.
  3. deleted175752840
    deleted175752840
    • account closed
    • 1 kudos
    Hi. Can you make bolts sellable and adjust their price also please?
    1. iCat42
      iCat42
      • premium
      • 49 kudos
      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.
  4. ElementaryLewis
    ElementaryLewis
    • premium
    • 310 kudos
    [EDIT] Thanks for the update.
    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).
    1. iCat42
      iCat42
      • premium
      • 49 kudos
      Hello. I know. Thanks. I will update it in a few days.
    2. ElementaryLewis
      ElementaryLewis
      • premium
      • 310 kudos
      No problem. Just here to remind you and offer my help.
  5. Sohzph
    Sohzph
    • supporter
    • 0 kudos
    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.
    1. hrmpk
      hrmpk
      • member
      • 1 kudos
      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. 
  6. NeteriXX
    NeteriXX
    • member
    • 0 kudos
    Can I use it with Improved Merchants? How to merge them both?
  7. zZChronoZz
    zZChronoZz
    • member
    • 0 kudos
    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?
    1. iCat42
      iCat42
      • premium
      • 49 kudos
      No, it does not.
    2. p357mag
      p357mag
      • supporter
      • 3 kudos
      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?
    3. iCat42
      iCat42
      • premium
      • 49 kudos
      > 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).
    4. p357mag
      p357mag
      • supporter
      • 3 kudos
      Aha, there was such a problem.
      Thank you for answer.
  8. merowiinger
    merowiinger
    • member
    • 0 kudos
    Hi, could you do a new version for Next Gen 4.00? Thanks
    1. iCat42
      iCat42
      • premium
      • 49 kudos
      Yes. It will get "Complete Edition" update. I just have little time for modding now.
    2. merowiinger
      merowiinger
      • member
      • 0 kudos
      thanks alot
  9. vpagliarini
    vpagliarini
    • supporter
    • 4 kudos
    Hey, what do I need to do if all i want is to reduce crafting prices by half?

    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!
  10. bigbossksa
    bigbossksa
    • premium
    • 2 kudos
    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.
    1. iCat42
      iCat42
      • premium
      • 49 kudos
      Merge scripts
    2. bigbossksa
      bigbossksa
      • premium
      • 2 kudos
      thank you for answering.
      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.
    3. ArchDevilAdam
      ArchDevilAdam
      • member
      • 0 kudos
      What do you mean by merge? Using witcher script merger or what?
    4. iCat42
      iCat42
      • premium
      • 49 kudos
      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.