Woopsies, I moved it to its own repo and didn't update some links. https://github.com/camcallahan/log2-socketSystem
That is the most recent version, minus the multiple gameffect bug fixed above. When I'm back home I'll go through and update everything.
CameronC's items/scripts (NEW: the socketSystem)
Re: CameronC's items/scripts (NEW: the socketSystem)
Hello again
I see you've made changes to your site but I'm missing it's two files that are not there (socketSystem.lua and socketItems.lua).
Could you put on the forum.
Thanks
I see you've made changes to your site but I'm missing it's two files that are not there (socketSystem.lua and socketItems.lua).
Could you put on the forum.
Thanks
Re: CameronC's items/scripts (NEW: the socketSystem)
Those two files are no longer needed so that is why they are not included anymore. Here is how you install socketSystem:melierax wrote:Hello again
I see you've made changes to your site but I'm missing it's two files that are not there (socketSystem.lua and socketItems.lua).
Could you put on the forum.
Thanks
1. Get the newest code:
If you have LordYigs models/gfxIndex stuff already you can copy/paste the individual scripts from github: https://github.com/camcallahan/log2-soc ... er/scripts
OR download the zip from github: https://github.com/camcallahan/log2-soc ... master.zip
OR download the zip from MediaFire link: http://www.mediafire.com/download/c2vxz ... 1-4-15.zip
(I've made some minor changes to some of the gems, mostly standardizing how the ability gems create components and removing blank lines added to gem descriptions)
2. Copy the main folders into your mod_assets folder for the dungeon (Do NOT overwrite init.lua, as you will want to just add these import lines to your file instead of losing anything you've added to yours).
The import lines that go into your init.lua are these:
Code: Select all
-- Cameron Callahan's SocketSystem Base Items
import "mod_assets/scripts/socketSystem/socketBaseItems.lua"
--[[ LordYig's Gem Collection for LOG1 (definitions for GEMS converted by Cameron for LOG2)
Alcoves in this pack have not been converted for use. Download LordYig's
original LOG1 asset pack here: http://www.nexusmods.com/grimrock/mods/177/
--]]
import "mod_assets/scripts/socketSystem/alcoves_and_gems_collection.lua"
-- Cameron Callahan's SocketSystem Gem Sets
import "mod_assets/scripts/socketSystem/socketElementGems.lua"
import "mod_assets/scripts/socketSystem/socketAbilityGems.lua"
import "mod_assets/scripts/socketSystem/socketPassiveGems.lua"
import "mod_assets/scripts/socketSystem/socketSkullGems.lua"
Optionally, if you want to have any item have sockets added to it when you pick it up, you can add this onPickUpItem hook to your party definition in init.lua:
Code: Select all
onPickUpItem = function(self, item)
-- General Triggers Below (Skill/Trait triggers, etc)
local theGameEffect = item.go.item:getGameEffect()
local beforeGE = ""
if theGameEffect ~= nil then beforeGE = "\n" end
if theGameEffect == nil then theGameEffect = "" end
beforeGE = theGameEffect .. beforeGE
if item.go.item:hasTrait("shield") and not item.go:getComponent("sockets") then
local shieldSockets = math.random(1, 2)
item.go:createComponent("Counter", "sockets")
item.go.sockets:setValue(shieldSockets)
item.go:createComponent("Counter", "gemcount")
item.go.gemcount:setValue(shieldSockets)
item.go.item:setGameEffect(beforeGE.."- Free Sockets ("..tostring(item.go.gemcount:getValue()).."/"..tostring(item.go.sockets:getValue())..").")
elseif item.go.item:hasTrait("chest_armor") and not item.go:getComponent("sockets") then
local chestSockets = math.random(2, 4)
item.go:createComponent("Counter", "sockets")
item.go.sockets:setValue(chestSockets)
item.go:createComponent("Counter", "gemcount")
item.go.gemcount:setValue(chestSockets)
item.go.item:setGameEffect(beforeGE.."- Free Sockets ("..tostring(item.go.gemcount:getValue()).."/"..tostring(item.go.sockets:getValue())..").")
elseif (item.go:getComponent("meleeattack") or item.go:getComponent("rangedattack") or item.go:getComponent("firearmattack")) and not item.go:getComponent("sockets") then
if item.go.item:hasTrait("two_handed") then
local weaponSockets = math.random(2, 4)
item.go:createComponent("Counter", "sockets")
item.go.sockets:setValue(weaponSockets)
item.go:createComponent("Counter", "gemcount")
item.go.gemcount:setValue(weaponSockets)
item.go.item:setGameEffect(beforeGE.."- Free Sockets ("..tostring(item.go.gemcount:getValue()).."/"..tostring(item.go.sockets:getValue())..").")
else
local weaponSockets = math.random(1, 2)
item.go:createComponent("Counter", "sockets")
item.go.sockets:setValue(weaponSockets)
item.go:createComponent("Counter", "gemcount")
item.go.gemcount:setValue(weaponSockets)
item.go.item:setGameEffect(beforeGE.."- Free Sockets ("..tostring(item.go.gemcount:getValue()).."/"..tostring(item.go.sockets:getValue())..").")
end
end
return
end,
},
the SocketItems.lua file is now split up into the multiple gem files imported after that base file and lordyigs models (the ELEMENT, PASSIVE, ABILITY, SKULL files). Splitting them up was just for convenience. I hope this is enough to get this working for you.
Writer and sometimes artist of the very slightly acclaimed comic series Scrambled Circuits. A comic series about a robot written by a human.
Grimrock 2 socketSystem: viewtopic.php?f=22&t=8546 / Github
Grimrock 2 socketSystem: viewtopic.php?f=22&t=8546 / Github
Re: CameronC's items/scripts (NEW: the socketSystem)
Thank you very much
Re: CameronC's items/scripts (NEW: the socketSystem)
Is there a LoG 2 mod out there that actually uses this socket system?