PlasticTou Posted May 25, 2024 Share Posted May 25, 2024 I'm trying to create a mod to acceleate game running. with the following script, but it seem to be unable to load, my guess is that "TheSim ... " won't be able to run until other things are loaded, any ideas? local accelerate_factor = 1.5 print(TheSim:GetTimeScale()) print(TheSim:GetTimeScale() ~= accelerate_factor) if TheSim:GetTimeScale() ~= accelerate_factor then TheSim:SetTimeScale(accelerate_factor) end Link to comment https://forums.kleientertainment.com/forums/topic/156330-question-on-mod-creation/ Share on other sites More sharing options...
PlasticTou Posted May 25, 2024 Author Share Posted May 25, 2024 Also, I noticed when exeucting settimescale(x), in cave and returning to surface, the character will be located at spawning point (the door) Link to comment https://forums.kleientertainment.com/forums/topic/156330-question-on-mod-creation/#findComment-1716775 Share on other sites More sharing options...
Rickzzs Posted May 25, 2024 Share Posted May 25, 2024 Your code looks correct. You can see my mod Speed Me Up, which works in a world without caves. To acclerate a world with caves, networking is required. Link to comment https://forums.kleientertainment.com/forums/topic/156330-question-on-mod-creation/#findComment-1716835 Share on other sites More sharing options...
PlasticTou Posted May 26, 2024 Author Share Posted May 26, 2024 12 hours ago, Rickzzs said: Your code looks correct. You can see my mod Speed Me Up, which works in a world without caves. To acclerate a world with caves, networking is required. Was able to check the mod, and I think it does work in the cave... at least in solo server. I think my issue was with "TheSim" is not initialized (can't confirm as I don't know how to debug this with this... ), my script has it as a single call, but you used button for function call. Link to comment https://forums.kleientertainment.com/forums/topic/156330-question-on-mod-creation/#findComment-1716982 Share on other sites More sharing options...
PlasticTou Posted May 26, 2024 Author Share Posted May 26, 2024 also in reference to is there a way to run this in both server and local? (creating 2 mods, 1 server 1 local)? Link to comment https://forums.kleientertainment.com/forums/topic/156330-question-on-mod-creation/#findComment-1716994 Share on other sites More sharing options...
Rickzzs Posted May 26, 2024 Share Posted May 26, 2024 You need to learn RPC to send command to server. Local speed is independent from server speed, if they mismatch you'll see acclerated animation. If you enable cave, you even need to sync the speed across shards, if necessary. Link to comment https://forums.kleientertainment.com/forums/topic/156330-question-on-mod-creation/#findComment-1717156 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