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 https://forums.kleientertainment.com/forums/topic/37980-help-enabling-full-beard-on-start/ Share on other sites More sharing options...
leemuar Posted July 2, 2014 Share Posted July 2, 2014 sure it is possible Link to comment https://forums.kleientertainment.com/forums/topic/37980-help-enabling-full-beard-on-start/#findComment-506497 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 https://forums.kleientertainment.com/forums/topic/37980-help-enabling-full-beard-on-start/#findComment-506522 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 https://forums.kleientertainment.com/forums/topic/37980-help-enabling-full-beard-on-start/#findComment-506530 Share on other sites More sharing options...
leemuar Posted July 2, 2014 Share Posted July 2, 2014 (edited) 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. Edited July 2, 2014 by leemuar Link to comment https://forums.kleientertainment.com/forums/topic/37980-help-enabling-full-beard-on-start/#findComment-506537 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 https://forums.kleientertainment.com/forums/topic/37980-help-enabling-full-beard-on-start/#findComment-506560 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 https://forums.kleientertainment.com/forums/topic/37980-help-enabling-full-beard-on-start/#findComment-506630 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 https://forums.kleientertainment.com/forums/topic/37980-help-enabling-full-beard-on-start/#findComment-506741 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 https://forums.kleientertainment.com/forums/topic/37980-help-enabling-full-beard-on-start/#findComment-506743 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 https://forums.kleientertainment.com/forums/topic/37980-help-enabling-full-beard-on-start/#findComment-507121 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