Coder Social home page Coder Social logo

Comments (2)

ghaggin avatar ghaggin commented on June 25, 2024 1

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

from braindanceprotocol.

osulli avatar osulli commented on June 25, 2024

#34 merged

from braindanceprotocol.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.