Charsis Posted April 16, 2019 Share Posted April 16, 2019 I forget how to add files to modmain, anyone know? If I have file with changes to existing content like mychanges_rope.lua then how I import this file to modmain? Link to comment https://forums.kleientertainment.com/forums/topic/104994-how-to-add-files-to-modmain/ Share on other sites More sharing options...
Ultroman Posted April 16, 2019 Share Posted April 16, 2019 (edited) You don't "add files to modmain" (unless I've totally slept through a class). What exactly are you changing? Can I see your file? If you've copied the original rope.lua and made changes to it, all you have to do is name it the same as the original file, and place it in the same folder structure as the game, but underneath your mod folder e.g. scripts\prefabs\rope.lua But overwriting the original game files in your mod is seriously bad practice. You should do whatever you can to modify the game code using the appropriate tools given in the API e.g. AddPrefabPostInit. Edited April 16, 2019 by Ultroman Link to comment https://forums.kleientertainment.com/forums/topic/104994-how-to-add-files-to-modmain/#findComment-1179435 Share on other sites More sharing options...
Charsis Posted April 16, 2019 Author Share Posted April 16, 2019 @Ultroman yes modifying function part of something is what I am doing. So if I add the AddPrefabPostInit for rope in mychanges_rope.lua file then nothing will happen because file isn't executed by modmain or something like that and I need to import it in there. Know syntax how to do that? Link to comment https://forums.kleientertainment.com/forums/topic/104994-how-to-add-files-to-modmain/#findComment-1179449 Share on other sites More sharing options...
Ultroman Posted April 16, 2019 Share Posted April 16, 2019 Why not just put the code in modmain, then? Anyway, I believe it's modimport("mychanges_rope.lua") Link to comment https://forums.kleientertainment.com/forums/topic/104994-how-to-add-files-to-modmain/#findComment-1179450 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