Goregonzola Posted February 14, 2021 Share Posted February 14, 2021 Hey there! I would like to add my character some abilities when she reaches certain Naughtiness-levels. My quesion is: How can I reference to these values in codings? I've looked around in the Krampus lua file, but I didn't found anything about it. Bonus question: Is this meter resets when a Krampus spawns, or is it grows to infinity? Thanks in advance! Link to comment Share on other sites More sharing options...
Bigfootmech Posted February 14, 2021 Share Posted February 14, 2021 If you have both Combined Status Bar, and the Insight mod (Penguin actually coded it). It should show you your naughtiness value. So if you dig in to his (the Insight) code, you'll be able to see where he finds it. Also, I'm pretty sure it resets to 0 when a Krampus is spawned. I'm also pretty sure that he can spawn above a certain naughtiness value, but a chance. Then guaranteed when it hits the upper limit. 1 Link to comment Share on other sites More sharing options...
penguin0616 Posted February 14, 2021 Share Posted February 14, 2021 (edited) 2 hours ago, Bigfootmech said: I'm also pretty sure that he can spawn above a certain naughtiness value, but a chance. Then guaranteed when it hits the upper limit. You just have to pass the threshold. Once you do, krampii spawn, your threshold changes and your naughtiness is reset to 0. Additionally, your naughtiness resets when you leave/enter caves/surface, or leave/rejoin a game. @BillTheCipher Naughtiness stuff is handled in components/kramped.lua You have to use the debug library to get at the stored values though. Basically, you want the "_activeplayers" upvalue from any member of kramped that references it (GetDebugString is probably your best bet, as it's the least likely to get overridden by another mod). Edited February 14, 2021 by penguin0616 2 Link to comment Share on other sites More sharing options...
Goregonzola Posted February 14, 2021 Author Share Posted February 14, 2021 Thanks for the tips! I'll search around. Link to comment 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