frootloopers Posted December 3, 2022 Share Posted December 3, 2022 I've been testing stuff out related to attachments in debug mode, but having to repeatedly quit and continue to see the effects is time-consuming. Textures are worse because I've gotta close the game as well. Is there a better way? I know you can just reload lua files and models auto-update when the file is updated, but I cant find a way to do the same with .txt files and textures. Link to comment Share on other sites More sharing options...
stuck1a Posted December 4, 2022 Share Posted December 4, 2022 (edited) Scripts must be parsed by the ScriptManager, to get this done at runtime, you must reinit the mod which contains them. Here are som example calls: getCore():ResetLua('default') -- reinit everythings getCore():ResetLua('foo') -- reinit files from mod with id "foo" getCore():ResetLua('foo', _G['bar.baz']) -- reinit mod "foo" and call global object bar.baz I never came up to test the third one since I didn't need that yet - just found it in the java classes and noted it for now. Might be useful for live mod updates or whatever. But for debugging the first and second should be enough. Edited December 9, 2022 by stuck1a typo frootloopers and excon 2 Link to comment Share on other sites More sharing options...
excon Posted August 20, 2023 Share Posted August 20, 2023 Hi - same issue as above - where do i enter those commands in ? I tried in the lua command line but get errors and no action - thanks! 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