Asparagus Posted January 5, 2015 Share Posted January 5, 2015 So I because of a previously mentioned issue... hounds, lightning... I have a surplus of Blue Gems... now Back in ROG, or Vanilla, you could give Chester a blue gem on every storage slot he has an during a full moon, he becomes a Snow Chester that acts as a mobile fridge or nightmarefuel to get Shadow Chester with additional 3 extra storage slots... now I tried to make a Snow Chester.... and... nothing T_T Is this really the case for DST or is it just me? Link to comment Share on other sites More sharing options...
SuperPsiPower Posted January 5, 2015 Share Posted January 5, 2015 Snow and shadow chester are not in Vanilla. They may or may not be implemented before the DLC for DST. So you will have to wait until then! Link to comment Share on other sites More sharing options...
tetrified Posted January 5, 2015 Share Posted January 5, 2015 Snow and shadow chester are not in Vanilla. They may or may not be implemented before the DLC for DST. So you will have to wait until then! Woah, they aren't? Someone might have to mod that in, I'll take a peek at the code later. Link to comment Share on other sites More sharing options...
rezecib Posted January 5, 2015 Share Posted January 5, 2015 Snow and shadow chester are not in Vanilla. Actually, they are in vanilla, but they were added during RoG's development, if I remember correctly. But in DST, the transformation is disabled-- I think it wasn't seen as high priority and has gotten a little buried now, like the dynamic music. The shadow chester transformation, in particular, is a bit of a technical challenge, I think. At least I wasn't able to get it working when I tried. Link to comment Share on other sites More sharing options...
tetrified Posted January 5, 2015 Share Posted January 5, 2015 Actually, they are in vanilla, but they were added during RoG's development, if I remember correctly. But in DST, the transformation is disabled-- I think it wasn't seen as high priority and has gotten a little buried now, like the dynamic music. The shadow chester transformation, in particular, is a bit of a technical challenge, I think. At least I wasn't able to get it working when I tried. Is this due to the custom chest settings thing you mentioned here? or something different? Honestly I'm not too comfortable with the netcode yet and this is out of my area anyway. Link to comment Share on other sites More sharing options...
rezecib Posted January 5, 2015 Share Posted January 5, 2015 @tetrified, It was crashing because the number of inventory slots is read-only. I'm guessing to get it implemented properly, it'd have to pull the items out of chester, delete his container component and widget, then set up the shadow chester container and widget, and re-add the items. But then there's also the problem of the container widget setup referring to the prefab name instead of letting you completely override it with the argument to WidgetSetup... There is an entry for shadow chester, but it will try to do it for chester again instead, because the prefab name doesn't change on transformation. Also, just looking at the code now, apparently shadow chester causes food to spoil as quickly as if it were on the ground. Never seen that documented anywhere o_O Link to comment Share on other sites More sharing options...
tetrified Posted January 5, 2015 Share Posted January 5, 2015 @tetrified, It was crashing because the number of inventory slots is read-only. I'm guessing to get it implemented properly, it'd have to pull the items out of chester, delete his container component and widget, then set up the shadow chester container and widget, and re-add the items. But then there's also the problem of the container widget setup referring to the prefab name instead of letting you completely override it with the argument to WidgetSetup... There is an entry for shadow chester, but it will try to do it for chester again instead, because the prefab name doesn't change on transformation. Also, just looking at the code now, apparently shadow chester causes food to spoil as quickly as if it were on the ground. Never seen that documented anywhere o_O If I'm reading this right, you don't have to re-add the items, because we just want to remove the nightmare fuel, right? Also holy cow, how has nobody documented that? Link to comment Share on other sites More sharing options...
rezecib Posted January 5, 2015 Share Posted January 5, 2015 @tetrified, Well, I might be wrong, but I think you can actually have extra fuel in there that won't get consumed (e.g. 1 in every slot, except one of the slots is a stack of 40-- that would leave you with one stack of 39, I think). It uses this line: container:ConsumeByName("nightmarefuel", container:GetNumSlots())So I think that just consumes 9 nightmare fuel, but you could actually have more. Link to comment Share on other sites More sharing options...
Asparagus Posted January 6, 2015 Author Share Posted January 6, 2015 Ahh, the music... I missed them... players new to the game sure are missing the thrill of killing a boss with the EFS or EFS of Winter Playing :3Here's me hoping for the music coming back soon... and Maxwell's freedom... and the "puppet's" reactions to him... and the new characters... Charlie... and... and... stuff... Link to comment Share on other sites More sharing options...
tetrified Posted January 6, 2015 Share Posted January 6, 2015 @rezecib, I wouldn't know, I've never been foolhardy enough to put more than 9 nightmare fuel in chester. Link to comment Share on other sites More sharing options...
Asparagus Posted January 6, 2015 Author Share Posted January 6, 2015 1 container:ConsumeByName("nightmarefuel", container:GetNumSlots()) Doesn't this line say that all nightmare fuel will be consumed? ... But it also didn't mention how much nightmare fuel is consumed per inventory slot... So, "ConsumeByName" will consume any item with the name "nightmarefuel" ... Or something... Link to comment Share on other sites More sharing options...
tetrified Posted January 6, 2015 Share Posted January 6, 2015 Doesn't this line say that all nightmare fuel will be consumed? ... But it also didn't mention how much nightmare fuel is consumed per inventory slot... So, "ConsumeByName" will consume any item with the name "nightmarefuel" ... Or something... container:ConsumeByName("nightmarefuel", container:GetNumSlots())container:GetNumSlots() should return 9, so it would only consume nine the actual code for container:ConsumeByName:function Container:ConsumeByName(item, amount) local total_num_found = 0 local function tryconsume(v) local num_found = 0 if v and v.prefab == item then local num_left_to_find = amount - total_num_found if v.components.stackable then if v.components.stackable.stacksize > num_left_to_find then v.components.stackable:SetStackSize(v.components.stackable.stacksize - num_left_to_find) num_found = amount else num_found = num_found + v.components.stackable.stacksize self:RemoveItem(v, true):Remove() end else num_found = num_found + 1 self:RemoveItem(v):Remove() end end return num_found end for k,v in pairs(self.slots) do total_num_found = total_num_found + tryconsume(v) if total_num_found >= amount then break end endend Link to comment Share on other sites More sharing options...
tetrified Posted January 6, 2015 Share Posted January 6, 2015 @rezecib, So new developments: AFAIK SnowChester works just fineShadow chester is having a little bit of an issue, however; when I initialize chester with 12 slots he works fine but when I try to get him to be created at a full moon, I get this issue[string "scripts/prefabs/container_classified.lua"]:10: wrong number of arguments to 'insert'any ideas? Link to comment Share on other sites More sharing options...
Asparagus Posted January 7, 2015 Author Share Posted January 7, 2015 local function MorphChester(inst) if not TheWorld.state.isnight or not TheWorld.state.isfullmoon or inst.ChesterState ~= "NORMAL" then return end local container = inst.components.container local canShadow, canSnow = inst:CanMorph() if canShadow then container:ConsumeByName("nightmarefuel", container:GetNumSlots()) MorphShadowChester(inst, true) elseif canSnow then container:ConsumeByName("bluegem", container:GetNumSlots()) MorphSnowChester(inst, true) endendI have a question: In line 124, it just says return... but what should it return? false? another variable? Link to comment Share on other sites More sharing options...
tetrified Posted January 7, 2015 Share Posted January 7, 2015 if not TheWorld.state.isnight or not TheWorld.state.isfullmoon or inst.ChesterState ~= "NORMAL" then return endThis function doesn't actually return anything, it just calls other functions.I suppose you could say "return false" but it wouldn't matter.for example where it gets called on 152:MorphChester(inst)if it returned false, it would be like sayingfalsein the middle of your codeI mean you can do it, but there's no reason to The call is the main giveaway, the other giveaway is that there's no return true anywhere Link to comment Share on other sites More sharing options...
Asparagus Posted January 7, 2015 Author Share Posted January 7, 2015 So at the risk of further making myself sound more like an idiot... is there a legit way to get either special Chesters? or do I have to reengineer this to make it happen? Also, will it have a negative effect during multiplayer? (when I let other people in?) Snow Chester's kinda a must have accessory for me during long winter explorations... Link to comment Share on other sites More sharing options...
Developer V2C Posted January 7, 2015 Developer Share Posted January 7, 2015 Chester morphing will be back very soon in our next patch. =) Link to comment Share on other sites More sharing options...
Asparagus Posted January 7, 2015 Author Share Posted January 7, 2015 ... which will be either today... or tomorrow, right mister Klei god Sir? Oh, thank you! guess I didn't have to sacrifice a chicken and eat it's heart... ok... bye... Link to comment Share on other sites More sharing options...
tetrified Posted January 7, 2015 Share Posted January 7, 2015 So at the risk of further making myself sound more like an idiot... is there a legit way to get either special Chesters? or do I have to reengineer this to make it happen? Also, will it have a negative effect during multiplayer? (when I let other people in?) Snow Chester's kinda a must have accessory for me during long winter explorations... Totally got snow chester working perfectly, but since apparently this is happening: Chester morphing will be back very soon in our next patch. =) There's literally no point in making a mod for it Shadow chester is a little trickier, due to what I mentioned in the post a lil while back asking rez about it. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.
Please be aware that the content of this thread may be outdated and no longer applicable.