First follow twistedsheriffs fix to rename the file to init.lua and placing it at Cyberpunk 2077\bin\x64\plugins\cyber_engine_tweaks\mods\Recipe you will need to create the Recipe folder. Once thats done make these edits in the init.lua and it should work when you reload mods in CET. ts = Game.GetTransactionSystem() gameItemID = GetSingleton("gameItemID") player = Game.GetPlayer(); . . . for index, recipeId in ipairs(recipeIds) do local result = ts:GiveItem(player, fromTDBID(recipeId), 1); end
When you say "make these edits" do you mean completely replace all of this..?
local txsys = Game.GetTransactionSystem(); local player = Game.GetPlayer(); local gameItemID = GetSingleton("gameItemID") function fromTDBID(tdbid) return gameItemID:FromTDBID(tdbid) end local recipeIds = {
doesnt work, tried the other folks methods of making a folder and renaming it. that just throws this error in the log
[2024-01-17 11:09:54 UTC+00:00] [17532] sol: runtime error: init.lua:1: attempt to index global 'Game' (a nil value) stack traceback: init.lua:1: in main chunk [2024-01-17 11:10:26 UTC+00:00] [17532] sol: runtime error: init.lua:563: sol: received nil for 'self' argument (use ':' for accessing member functions, make sure member variables are preceeded by the actual object with '.' syntax) stack traceback: [C]: in function '__concat' init.lua:563: in main chunk
to reiterate the actul current working method (2.1)
For anyone struggling, try creating the folder Cyberpunk 2077\bin\x64\plugins\cyber_engine_tweaks\mods\recip, add the recip.lua file there and rename it to init.lua. Then instead of doing dofile you click on "Reload mods".
After 1.2 update use last version CET. Create Recipes folder in Mods folder. ( C:\Steam\steamapps\common\Cyberpunk 2077\bin\x64\plugins\cyber_engine_tweaks\mods\Recipes) and put recip.lua in Recipes folder (you created) dont change recip.lua . launch game , open console push the reload mods. you will see some init.lua warning there . Alt tab and go here C:\Steam\steamapps\common\Cyberpunk 2077\bin\x64\plugins\cyber_engine_tweaks\mods\Recipes and change the name recip.lua to init.lua . push the reload mods. you will see warning there mods loaded saved or finished something like that. Close console. Check your recipes tab in game for correction. If recipes there, save . close game and delete mods. Go back in game you will see there your recipes.
Thanks! with this it kind of works, but i get another issue now, it just gives like 12 or 15 recipes, and in Recipies.log i get this message: [2023-10-04 20:54:30 UTC-03:00] [13672] sol: runtime error: init.lua:563: sol: received nil for 'self' argument (use ':' for accessing member functions, make sure member variables are preceeded by the actual object with '.' syntax) stack traceback: [C]: in function '__concat' init.lua:563: in main chunk Any ideas here? i dont understand much
To all those struggling to get this to work this is how I got it running: ?Create a folder inside the mod folder, naming it whatever you want ?Place "recip.lua" inside ?Rename it "init.lua" ?Launch the game, or if launched hit the "reload all mods" button in the console Path should look something like this: Cyberpunk 2077/bin/x64/plugins/cyber_engine_tweaks/mods/Recipies
Outstanding, all the mod brother had to do was make a zip file with the following folders and then the renamed .lua bin->x64->plugins->cyber_engine_tweaks->mods->AllRecipes->init.lua and the mod loaded with no additional commands! Launch the game, load into the world, open up Cyber Engine Tweaks and click the "Reload all Mods" the mod will load giving you all the recipes!
300 comments
https://wiki.cybermods.net/cyber-engine-tweaks/console/scripts
CET 1.8.3 - Cyberpunk 2077\bin\x64\plugins\cyber_engine_tweaks\scripts
dofile("recip.lua")
ts = Game.GetTransactionSystem()
gameItemID = GetSingleton("gameItemID")
player = Game.GetPlayer();
.
.
.
for index, recipeId in ipairs(recipeIds) do
local result = ts:GiveItem(player, fromTDBID(recipeId), 1);
end
local txsys = Game.GetTransactionSystem();
local player = Game.GetPlayer();
local gameItemID = GetSingleton("gameItemID")
function fromTDBID(tdbid)
return gameItemID:FromTDBID(tdbid)
end
local recipeIds =
{
[2024-01-17 11:09:54 UTC+00:00] [17532] sol: runtime error: init.lua:1: attempt to index global 'Game' (a nil value)
stack traceback:
init.lua:1: in main chunk
[2024-01-17 11:10:26 UTC+00:00] [17532] sol: runtime error: init.lua:563: sol: received nil for 'self' argument (use ':' for accessing member functions, make sure member variables are preceeded by the actual object with '.' syntax)
stack traceback:
[C]: in function '__concat'
init.lua:563: in main chunk
For anyone struggling, try creating the folder Cyberpunk 2077\bin\x64\plugins\cyber_engine_tweaks\mods\recip, add the recip.lua file there and rename it to init.lua. Then instead of doing dofile you click on "Reload mods".
it didnt add a ton of recipes, but it worked.
! Today did it again, still working.
[2023-10-04 20:54:30 UTC-03:00] [13672] sol: runtime error: init.lua:563: sol: received nil for 'self' argument (use ':' for accessing member functions, make sure member variables are preceeded by the actual object with '.' syntax)
stack traceback:
[C]: in function '__concat'
init.lua:563: in main chunk
Any ideas here? i dont understand much
?Create a folder inside the mod folder, naming it whatever you want
?Place "recip.lua" inside
?Rename it "init.lua"
?Launch the game, or if launched hit the "reload all mods" button in the console
Path should look something like this: Cyberpunk 2077/bin/x64/plugins/cyber_engine_tweaks/mods/Recipies
bin->x64->plugins->cyber_engine_tweaks->mods->AllRecipes->init.lua and the mod loaded with no additional commands!
Launch the game, load into the world, open up Cyber Engine Tweaks and click the "Reload all Mods" the mod will load giving you all the recipes!