Legendary script might have changed the rarity of all associated consumables
Nyquis opened this issue · 2 comments
Hello since running the legendary script my maxdoc mk1 became legendary as well as all the lootable versions of that item. Could it be possible to reset the rarity and what commands could I run to do so?
Hello since running the legendary script my maxdoc mk1 became legendary as well as all the lootable versions of that item. Could it be possible to reset the rarity and what commands could I run to do so?
If you look at the cheats/legend.lua
script, you can see that it upgrades every item that the player has equipped including consumables, cyberware, etc. You can modify this script to suit your preferences by simply removing any slots that you do not want upgraded from the slots
variable.
In order to undo any upgrades, replace the 'cheats/legend.lua' script with the script below (to revert to the original you can copy and past from this repo). It is set right now to revert the item equipped in the consumable slot back to uncommon. If you want it to edit something else, change Consumable
in the line with itemid = espd:GetItemInEquipSlot2('Consumable', 0)
to whatever you want to edit. To change the rarity, change 'Uncommon' in the line with Game['gameRPGManager::ForceItemQuality;GameObjectgameItemDataCName'](player, itemdata, CName.new('Uncommon'))
to your desired rarity.
After changing the script, restart your game so the changes can become active. I couldn't figure out how to get changes in the script to work without restarting the game.
local Legend = {
rootPath = "plugins.cyber_engine_tweaks.mods.braindance_protocol."
}
local Utilities = require(Legend.rootPath.."utility")
function Legend.Create()
local moduleName = "I Am Legend - Make all equipped gear Legendary with max stats."
Utilities.StartProtocol(moduleName)
player = Game.GetPlayer()
ssc = Game.GetScriptableSystemsContainer()
ts = Game.GetTransactionSystem()
es = ssc:Get(CName.new('EquipmentSystem'))
cs = ssc:Get(CName.new('CraftingSystem'))
espd = es:GetPlayerData(player)
espd['GetItemInEquipSlot2'] = espd['GetItemInEquipSlot;gamedataEquipmentAreaInt32']
cs['SetItemLevel2'] = cs['SetItemLevel;gameItemData']
itemid = espd:GetItemInEquipSlot2('Consumable', 0)
if itemid.tdbid.hash ~= 0 then
itemdata = ts:GetItemData(player, itemid)
cs:SetItemLevel2(itemdata)
Game['gameRPGManager::ForceItemQuality;GameObjectgameItemDataCName'](player, itemdata, CName.new('Uncommon'))
end
Utilities.FinishProtocol(moduleName)
end
return Legend
Edit: for a better version of this, check out #34