BlackHawling Posted September 24, 2015 Share Posted September 24, 2015 been trying to figure how to start with this in DST, but i dont know how, help me please?tried with start_inv, but krampus sack doesn appear in inventory.. Link to comment https://forums.kleientertainment.com/forums/topic/58090-start-mod-char-with-krampus-sack/ Share on other sites More sharing options...
DrSmugleaf Posted September 24, 2015 Share Posted September 24, 2015 In your modmain.lua:AddPrefabPostInit("krampus_sack", function(inst) inst.components.inventoryitem.cangoincontainer = trueend)In your character.lua:local start_inv = { "krampus_sack",}Although that will make it so everyone can put the krampus sack in their inventories instead of it dropping on the ground. Not that big of a deal, considering how rare it is. Link to comment https://forums.kleientertainment.com/forums/topic/58090-start-mod-char-with-krampus-sack/#findComment-675695 Share on other sites More sharing options...
BlackHawling Posted October 4, 2015 Author Share Posted October 4, 2015 thank you! Link to comment https://forums.kleientertainment.com/forums/topic/58090-start-mod-char-with-krampus-sack/#findComment-677837 Share on other sites More sharing options...
halfrose Posted October 4, 2015 Share Posted October 4, 2015 In your modmain.lua:AddPrefabPostInit("krampus_sack", function(inst) inst.components.inventoryitem.cangoincontainer = trueend)In your character.lua:local start_inv = { "krampus_sack",}Although that will make it so everyone can put the krampus sack in their inventories instead of it dropping on the ground. Not that big of a deal, considering how rare it is. Apparently I did so, it worked on a offline server and while I am the host, but when I used it as client, this is what I received Link to comment https://forums.kleientertainment.com/forums/topic/58090-start-mod-char-with-krampus-sack/#findComment-677926 Share on other sites More sharing options...
DarkXero Posted October 4, 2015 Share Posted October 4, 2015 @halfrose:AddPrefabPostInit("krampus_sack", function(inst) if not GLOBAL.TheWorld.ismastersim then return end inst.components.inventoryitem.cangoincontainer = trueend)Because clients run the postinit because they also load the mod because it's a character mod. Also, I suggest: inst.OnNewSpawn = function(inst) local sack = SpawnPrefab("krampus_sack") inst.components.inventory:Equip(sack) endin the master_postinit of the mod character, so the backpack retains its backpack properties. Link to comment https://forums.kleientertainment.com/forums/topic/58090-start-mod-char-with-krampus-sack/#findComment-677930 Share on other sites More sharing options...
halfrose Posted October 5, 2015 Share Posted October 5, 2015 @halfrose:AddPrefabPostInit("krampus_sack", function(inst) if not GLOBAL.TheWorld.ismastersim then return end inst.components.inventoryitem.cangoincontainer = trueend)Because clients run the postinit because they also load the mod because it's a character mod. Also, I suggest: inst.OnNewSpawn = function(inst) local sack = SpawnPrefab("krampus_sack") inst.components.inventory:Equip(sack) endin the master_postinit of the mod character, so the backpack retains its backpack properties. Oh thanks it is working fine now! dude you are really good at coding! Link to comment https://forums.kleientertainment.com/forums/topic/58090-start-mod-char-with-krampus-sack/#findComment-677959 Share on other sites More sharing options...
Valkyrie19k Posted October 5, 2015 Share Posted October 5, 2015 DarkXero, Master of Codes. Should be a character mod dedicated to him. Perks would be altering the game's codes indefinitely. lol Link to comment https://forums.kleientertainment.com/forums/topic/58090-start-mod-char-with-krampus-sack/#findComment-678011 Share on other sites More sharing options...
naptimeshadows Posted December 2, 2015 Share Posted December 2, 2015 Any update to this?I tried it today, and after going to the Character Selection screen, the game stalls out loading the world.It doesn't crash, it's fully responsive when I move the window around, but it sticks on the pale yellow gradient that is used as a backdrop. It just sits there indefinitely. Any one else having that issue?I don't know enough about this stuff to try and change it myself. Link to comment https://forums.kleientertainment.com/forums/topic/58090-start-mod-char-with-krampus-sack/#findComment-690912 Share on other sites More sharing options...
naptimeshadows Posted December 2, 2015 Share Posted December 2, 2015 Any update to this?I tried it today, and after going to the Character Selection screen, the game stalls out loading the world.It doesn't crash, it's fully responsive when I move the window around, but it sticks on the pale yellow gradient that is used as a backdrop. It just sits there indefinitely. Any one else having that issue?I don't know enough about this stuff to try and change it myself. Nevermind! I moved the modmain piece from the bottom of the lua to the top, and it works perfectly. Link to comment https://forums.kleientertainment.com/forums/topic/58090-start-mod-char-with-krampus-sack/#findComment-690955 Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now