Woomymaster Posted January 10, 2022 Share Posted January 10, 2022 Ive been digging for hours ive found that when i add a component it should go in component.lua and be able to edit it in tuning.lua but i need to make a separate tuning.lua in the mod itself but WHERE DO I PUT IT please im dyin' here Link to comment https://forums.kleientertainment.com/forums/topic/136843-how-do-i-edit-the-tuninglua/ Share on other sites More sharing options...
Wonderlarr Posted January 10, 2022 Share Posted January 10, 2022 8 hours ago, Woomymaster said: Ive been digging for hours ive found that when i add a component it should go in component.lua and be able to edit it in tuning.lua but i need to make a separate tuning.lua in the mod itself but WHERE DO I PUT IT please im dyin' here The best way to "edit tuning.lua" from a mod would be to overwrite a value or values it sets, a simple way to do this would be inside your modmain.lua. Let's say we want to edit TUNING.SANITY_HUGE. Normally, tuning.lua defines it as 50, but if we do GLOBAL.TUNING.SANITY_HUGE = 128 -- only works inside modmain.lua inside our modmain.lua, now TUNING.SANITY_HUGE is 128. If you wanna do this from a component, or basically any file that isn't modmain.lua, lose the GLOBAL. at the beginning, to get TUNING.SANITY_HUGE = 128 -- works elsewhere You can do this to as many values as you want, and change them just like any other variable, just keep in mind that it will effect vanilla items and mechanics if you edit these values. 1 Link to comment https://forums.kleientertainment.com/forums/topic/136843-how-do-i-edit-the-tuninglua/#findComment-1531676 Share on other sites More sharing options...
Woomymaster Posted January 10, 2022 Author Share Posted January 10, 2022 ok i got that but say i add new variables and mechanics where would i put those, also in modmain.lua? Link to comment https://forums.kleientertainment.com/forums/topic/136843-how-do-i-edit-the-tuninglua/#findComment-1531679 Share on other sites More sharing options...
Wonderlarr Posted January 10, 2022 Share Posted January 10, 2022 43 minutes ago, Woomymaster said: ok i got that but say i add new variables and mechanics where would i put those, also in modmain.lua? What kind of mechanics? New items should always go in their own script files, not in modmain.lua Link to comment https://forums.kleientertainment.com/forums/topic/136843-how-do-i-edit-the-tuninglua/#findComment-1531690 Share on other sites More sharing options...
Woomymaster Posted January 11, 2022 Author Share Posted January 11, 2022 like a new stat bar or a perk that does something Link to comment https://forums.kleientertainment.com/forums/topic/136843-how-do-i-edit-the-tuninglua/#findComment-1531752 Share on other sites More sharing options...
Wonderlarr Posted January 11, 2022 Share Posted January 11, 2022 1 hour ago, Woomymaster said: like a new stat bar or a perk that does something You should take a look at this post right here, you seem new and this post is a great place to learn basics. Link to comment https://forums.kleientertainment.com/forums/topic/136843-how-do-i-edit-the-tuninglua/#findComment-1531771 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