Kazaki Posted January 3, 2015 Share Posted January 3, 2015 I'de like know how to override a few clock functions from widgets/uiclock.lua and I'm not shure how to access the clock and it's functions. I've tried:GLOBAL.UIclockandGLOBAL.GetClock()as I've seen in this thread: http://oldforums.kleientertainment.com/showthread.php?10817-Creating-a-Mod-using-the-Mod-System/page10 but neither seem to work since "the variables are not declared" Anyone have an idea on how to do this? Not shure if this is the right location to ask about a mod scripting question. Sorry if it is not! Link to comment Share on other sites More sharing options...
rezecib Posted January 4, 2015 Share Posted January 4, 2015 @Kazaki, The clock, like the weather and lighting, is currently in a mostly non-moddable state. They will get rewritten at some point to expose them to mods properly again. Link to comment Share on other sites More sharing options...
Kazaki Posted January 4, 2015 Author Share Posted January 4, 2015 Actually managed to figure out a way which is working for me. example to override the UpdateDayString() function of the clock local require = GLOBAL.requirelocal tempclock = require "widgets/uiclock"tempclock.UpdateDayString = function (self) //codeend Link to comment Share on other sites More sharing options...
Kazaki Posted January 4, 2015 Author Share Posted January 4, 2015 Another question: How can someone overwrite a script file completely ? I've tried adding the directories scritps/components/..... with the lua file I want to replace but it doesn't seem to work. Link to comment Share on other sites More sharing options...
rezecib Posted January 4, 2015 Share Posted January 4, 2015 I've tried adding the directories scritps/components/..... with the lua file I want to replace but it doesn't seem to work. That should work. That is the method I am using in DST RoG Characters to replace the eater component, spiderbrain, etc. If it's not working then the issue is probably elsewhere... 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