Advertisement
Guest User

Missing Gwent Cards Tracker (Next-Gen Update) question

a guest
Jul 8th, 2023
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.26 KB | Gaming | 0 0
  1. // https://www.nexusmods.com/witcher3/mods/7179?
  2. // Missing Gwent Cards Tracker (Next-Gen Update)
  3.  
  4. // Diffs from modMissingCardTracker-7179-5-0-1671052024 vs stock patch 4.03.
  5.  
  6. // What dose these extra code-bits have to do with this Gwent mod, if anything?
  7.  
  8. // Note: I've removed some spacing that was added into the modded file, so the line numbers
  9. // of the original mod @ Nexus may be a little off when searching your copy of the
  10. // inventoryComponent.ws file.
  11.  
  12. // Line 312 of mod.
  13. var quality : int;
  14.  
  15. // Stock patch 4.03 @ line 312 is empty.
  16.  
  17. //-------------------------------------------
  18.  
  19. // Line 324 of mod.
  20. quality = RoundMath(CalculateAttributeValue( GetItemAttributeValue(item, 'quality' ) ) );
  21. if ( quality == 5 ) isWitcherGear = true;
  22. if ( quality == 4 ) isRelicGear = true;
  23.  
  24. // Stock patch 4.03 @ line 324.
  25. if ( RoundMath(CalculateAttributeValue( GetItemAttributeValue(item, 'quality' ) )) == 5 ) isWitcherGear = true;
  26. if ( RoundMath(CalculateAttributeValue( GetItemAttributeValue(item, 'quality' ) )) == 4 ) isRelicGear = true;
  27.  
  28. //-------------------------------------------
  29.  
  30. // Line 362 of mod.
  31. case 'bolt' :
  32. itemAttributes.PushBack( GetItemAttributeValue(item, 'SilverDamage') );
  33. break;
  34.  
  35. // Stock patch 4.03 @ line 351 is empty.
  36.  
  37. //-------------------------------------------
  38.  
  39. // Line 382 of mod.
  40. if ( itemCategory == 'bolt' )
  41. {
  42. if ( quality == 5 ) level = level - 14;
  43. else if ( quality == 4 ) level = level - 10;
  44. else if ( quality == 3 ) level = level - 6;
  45. else if ( quality == 2 ) level = level - 4;
  46. }
  47.  
  48. else if ( isWitcherGear ) level = level - 2;
  49. else if ( isRelicGear ) level = level - 1;
  50.  
  51. // Stock patch 4.03 @ line 366.
  52. if ( isWitcherGear ) level = level - 2;
  53. if ( isRelicGear ) level = level - 1;
  54.  
  55. //-------------------------------------------
  56.  
  57. // Line 775 of mod (added below stock code line 349).
  58. GetWitcherPlayer().DisplayHudMessage(GetLocStringByKeyExt("panel_alchemy_exception_already_cooked"));
  59.  
  60. // Stock patch 4.03 @ line 349.
  61. LogAssert(false, "CInventoryComponent.GiveItemTo: cannot add singleton item as player already has this item!");
  62.  
  63. //-------------------------------------------
  64.  
  65. // Line 1655 of mod.
  66. player.AddCraftingSchematic( itemName, player.GetInventory().ItemHasTag(item, 'NoNotification') );
  67.  
  68. // Stock patch 4.03 @ line 1629.
  69. player.AddCraftingSchematic( itemName );
  70.  
  71. //-------------------------------------------
  72.  
  73. // Line 2586 of mod.
  74. theGame.GetDefinitionsManager().GetAbilityAttributeValue( 'Runeword 10 _Stats', 'stamina_runeword_gain', min, max );
  75.  
  76. // Stock patch 4.03 @ line 2560.
  77. theGame.GetDefinitionsManager().GetAbilityAttributeValue( 'Runeword 10 _Stats', 'stamina', min, max );
  78.  
  79. //-------------------------------------------
  80.  
  81. // Line 2594 of mod.
  82. theGame.GetDefinitionsManager().GetAbilityAttributeValue( 'Runeword 12 _Stats', 'focus_runeword_gain', min, max );
  83.  
  84. // Stock patch 4.03 @ line 2568.
  85. theGame.GetDefinitionsManager().GetAbilityAttributeValue( 'Runeword 12 _Stats', 'focus', min, max );
  86.  
  87. //-------------------------------------------
  88.  
  89. // Line 2730 of mod.
  90. else if(buffType == EET_Cat && attrs[j] == 'critical_hit_chance')
  91. {
  92. newAttr.value = val.valueAdditive;
  93. newAttr.percentageValue = true;
  94. }
  95.  
  96. // Stock patch 4.03 @ line 2702.
  97. }
  98.  
  99. //-------------------------------------------
  100.  
  101. // Line 3885 of mod.
  102. if ( RoundMath( CalculateAttributeValue( GetItemAttributeValue( item, 'quality' ) ) ) == 5 && !ItemHasTag(item, 'noDye') )
  103.  
  104. // Stock patch 4.03 @ line 3852.
  105. if ( RoundMath( CalculateAttributeValue( GetItemAttributeValue( item, 'quality' ) ) ) == 5 )
  106.  
  107. //-------------------------------------------
  108.  
  109. // Line 3901 of mod.
  110. ItemHasTag(item, theGame.params.ITEM_SET_TAG_VIPER) ||
  111. ItemHasTag(item, theGame.params.ITEM_SET_TAG_NETFLIX);
  112. }
  113.  
  114. public final function DetectTagOfASet(item : SItemUniqueId) : name
  115. {
  116. if (ItemHasTag(item, theGame.params.ITEM_SET_TAG_BEAR) )
  117. return theGame.params.ITEM_SET_TAG_BEAR;
  118. if (ItemHasTag(item, theGame.params.ITEM_SET_TAG_GRYPHON) )
  119. return theGame.params.ITEM_SET_TAG_GRYPHON;
  120. if (ItemHasTag(item, theGame.params.ITEM_SET_TAG_LYNX) )
  121. return theGame.params.ITEM_SET_TAG_LYNX;
  122. if (ItemHasTag(item, theGame.params.ITEM_SET_TAG_WOLF) )
  123. return theGame.params.ITEM_SET_TAG_WOLF;
  124. if (ItemHasTag(item, theGame.params.ITEM_SET_TAG_RED_WOLF) )
  125. return theGame.params.ITEM_SET_TAG_RED_WOLF;
  126. if (ItemHasTag(item, theGame.params.ITEM_SET_TAG_VAMPIRE) )
  127. return theGame.params.ITEM_SET_TAG_VAMPIRE;
  128. if (ItemHasTag(item, theGame.params.ITEM_SET_TAG_VIPER) )
  129. return theGame.params.ITEM_SET_TAG_VIPER;
  130. if (ItemHasTag(item, theGame.params.ITEM_SET_TAG_NETFLIX) )
  131. return theGame.params.ITEM_SET_TAG_NETFLIX;
  132.  
  133. return '';
  134.  
  135. // Stock patch 4.03 @ line 3868.
  136. ItemHasTag(item, theGame.params.ITEM_SET_TAG_VIPER);
  137.  
  138. //-------------------------------------------
  139.  
  140. // Line 4084 of mod.
  141. if(IsItemMask( item ))
  142. slot = EES_Quickslot2;
  143.  
  144. if(slot == EES_Petard2)
  145. slot == EES_Petard1;
  146.  
  147. // Stock patch 4.03 @ line 4026 is empty.
  148.  
  149. //-------------------------------------------
  150.  
  151. // Line 4323 of mod.
  152. lvl = RoundF( playerLevel + RandRangeF( 3, 1 ) );
  153.  
  154. // Stock patch 4.03 @ line 4259.
  155. lvl = RoundF( playerLevel + RandRangeF( 1, 0 ) );
  156.  
  157. //-------------------------------------------
  158.  
  159. // Line 4667 of mod.
  160. else
  161. {
  162. theGame.GetGamerProfile().NoticeAchievementProgress(EA_GwintCollector, foundCardsStringNames.Size(), allStringNamesOfCards.Size());
  163. }
  164.  
  165. // Stock patch 4.03 @ line 4602.
  166. }
  167.  
  168. //-------------------------------------------
  169.  
  170. // Line 5449 of mod (OKAY HERE'S THE MOD).
  171. //modMissingCardTracker start
  172.  
  173. // Line 5930 of mod (OKAY HERE'S THE MOD).
  174. //modMissingCardTracker stop
  175.  
  176. // So what's with those other codes added into the inventoryComponent.ws file that aren't stock patch 4.03 code?
  177. // Maybe - weapon, armor, stats, crafting, etc. mods, that the Modder' had installed, before making this mod public?
  178.  
  179. // Can we just add the "commented" //modMissingCardTracker code and forget the rest of the additional "code changes"?
  180.  
  181. // I manually "diff" to add script mods myself, I'd like to know what code is truly required for "this" mod to work.
  182.  
  183. // Thanks!
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement