Cowboypunkcolt Posted July 2, 2014 Share Posted July 2, 2014 I'm working on a new character mod (a longhaired cat that is shavable with multiple sprites according to shaven-ness) and am wanting to have the game start with the full coat. Since it's just using the beard script (but instead of picking new separate beard sprites, it's picking new character sprites), it's automatically starting out at the shortest length. Does anyone know if it's possible to make it start at the last beard-day instead of the first? Link to comment Share on other sites More sharing options...
leemuar Posted July 2, 2014 Share Posted July 2, 2014 sure it is possible Link to comment Share on other sites More sharing options...
Mobbstar Posted July 2, 2014 Share Posted July 2, 2014 sure it is possible Good to know. You don't happen to have an idea how it is possible? What bits of code to alter, add or remove? Link to comment Share on other sites More sharing options...
leemuar Posted July 2, 2014 Share Posted July 2, 2014 Good to know. You don't happen to have an idea how it is possible? What bits of code to alter, add or remove? I surely can take a look if topic starter will share files of his mod. Link to comment Share on other sites More sharing options...
leemuar Posted July 2, 2014 Share Posted July 2, 2014 Basically, if you use standard beard component, just set the amount of beard's bits and then call the stategraph function to show the "full beard"Here is an example from the Wilson prefab: inst.AnimState.OverrideSymbol("beard", "beard", "beard_long")inst.components.beard.bits = 9 But this mod can implement fur growing differently, so it really depends on how the mod is written. Link to comment Share on other sites More sharing options...
Cowboypunkcolt Posted July 2, 2014 Author Share Posted July 2, 2014 I got it to work! I was just sort of thinking about it dumb. Thank, leemuar for helping me think about it less dumb. In any case, it's really just Wilson's beard feature, but over the span of 10 days, and instead of the animstate line referring to the beard sprite, it refers to a new character sprite.For reference, the code I ended up with is this (with stand-in numbers for the days and beard-bits): inst:AddComponent("beard")inst.components.beard.bits = 10inst.AnimState:SetBuild("winterfull") inst.components.beard.onreset = function()inst.AnimState:SetBuild("winter") end inst.components.beard.prize = "beardhair" --tune the beard economy...local beard_days = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10}local beard_bits = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10} inst.components.beard:AddCallback(beard_days[1], function() inst.components.beard.bits = beard_bits[1] end) inst.components.beard:AddCallback(beard_days[2], function() inst.components.beard.bits = beard_bits[2] end) inst.components.beard:AddCallback(beard_days[3], function() inst.components.beard.bits = beard_bits[3]inst.AnimState:SetBuild("winterhalf") end) inst.components.beard:AddCallback(beard_days[4], function() inst.components.beard.bits = beard_bits[4] end) inst.components.beard:AddCallback(beard_days[5], function() inst.components.beard.bits = beard_bits[5] end) inst.components.beard:AddCallback(beard_days[6], function() inst.components.beard.bits = beard_bits[6] end) inst.components.beard:AddCallback(beard_days[7], function() inst.components.beard.bits = beard_bits[7] end) inst.components.beard:AddCallback(beard_days[8], function() inst.components.beard.bits = beard_bits[8] end) inst.components.beard:AddCallback(beard_days[9], function() inst.components.beard.bits = beard_bits[9]inst.AnimState:SetBuild("winterfull") end) inst.components.beard:AddCallback(beard_days[10], function() inst.components.beard.bits = beard_bits[10] end) Link to comment Share on other sites More sharing options...
leemuar Posted July 3, 2014 Share Posted July 3, 2014 Nice work, bro! Don't forget to share your mod with us when it's done! Link to comment Share on other sites More sharing options...
Cowboypunkcolt Posted July 3, 2014 Author Share Posted July 3, 2014 Nice work, bro! Don't forget to share your mod with us when it's done! Will do, just a couple days of work left, I think! Link to comment Share on other sites More sharing options...
Zomsabra Posted July 3, 2014 Share Posted July 3, 2014 Good luck on the mod, I will be sure to check it out! Link to comment Share on other sites More sharing options...
Cowboypunkcolt Posted July 5, 2014 Author Share Posted July 5, 2014 Thanks for the support!Finished the first draft for this character pack!http://forums.kleientertainment.com/files/file/803-wisp-wynter-and-wei/ 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.