CanTotu Posted May 23, 2015 Share Posted May 23, 2015 Well, thanks to Peter's tournament mod, I started to create a sprinter mod which allows players to run pressing SHIFT. Mod works perfectly for me but when a friend tries to join, it gives an error like 'Missing Mods'. Here are my codes. What should I edit? Modmain.lua:local TheNet = GLOBAL.TheNetAddReplicableComponent( "sprinter" )function PlayerComponents( inst ) inst:AddComponent("sprinter") inst.components.health.RecalculatePenalty = function(forceupdatewidget) end endAddPlayerPostInit( PlayerComponents )GLOBAL.TUNING.SPRINT_MULT = 1.5GLOBAL.TUNING.SPRINT_HUNGER_MULT = 8GLOBAL.AddModRPCHandler( "run", "StartSprint", function(inst) inst.components.sprinter.is_sprinting = true end )GLOBAL.AddModRPCHandler( "run", "StopSprint", function(inst) inst.components.sprinter.is_sprinting = false end )modinfo:dst_compatible = truereign_of_giants_compatible = trueall_clients_require_mod = trueclient_only_mod = falseicon_atlas = "modicon.xml"icon = "modicon.tex"--This lets people search for servers with this mod by these tagsserver_filter_tags = {"run"}--configuration_options = {}--[[Special Thanks To:Klei Entertainment--]] Link to comment https://forums.kleientertainment.com/forums/topic/54314-sprinter-mod-error/ Share on other sites More sharing options...
DarkXero Posted May 23, 2015 Share Posted May 23, 2015 Mods that are not in the workshop aren't downloaded automatically.You need to give your mod to your friend. Link to comment https://forums.kleientertainment.com/forums/topic/54314-sprinter-mod-error/#findComment-639982 Share on other sites More sharing options...
CanTotu Posted May 23, 2015 Author Share Posted May 23, 2015 I uploaded it on workshop but still he gets the error Link to comment https://forums.kleientertainment.com/forums/topic/54314-sprinter-mod-error/#findComment-639985 Share on other sites More sharing options...
Pyr0mrcow Posted May 25, 2015 Share Posted May 25, 2015 Did you redownload it from there yourself? If I understand correctly, the server tells joiners what to get using the mod's workshop ID, so...there's that.Alternatively, for testing purposes, it should work if you send the file to them and they put it in their mod folder. Link to comment https://forums.kleientertainment.com/forums/topic/54314-sprinter-mod-error/#findComment-640351 Share on other sites More sharing options...
Kzisor Posted May 25, 2015 Share Posted May 25, 2015 (edited) @CanTotu, you need the following code before any components.if not TheWorld.ismastersim then return instend EXAMPLE:function PlayerComponents( inst ) if not TheWorld.ismastersim then return inst end inst:AddComponent("sprinter") inst.components.health.RecalculatePenalty = function(forceupdatewidget) end endAddPlayerPostInit( PlayerComponents ) Edited May 25, 2015 by Kzisor Link to comment https://forums.kleientertainment.com/forums/topic/54314-sprinter-mod-error/#findComment-640362 Share on other sites More sharing options...
CanTotu Posted May 25, 2015 Author Share Posted May 25, 2015 @CanTotu, you need the following code before any components.if not TheWorld.ismastersim then return instend EXAMPLE:function PlayerComponents( inst ) if not TheWorld.ismastersim then return inst end inst:AddComponent("sprinter") inst.components.health.RecalculatePenalty = function(forceupdatewidget) end endAddPlayerPostInit( PlayerComponents )Thanks. I'll try that. Link to comment https://forums.kleientertainment.com/forums/topic/54314-sprinter-mod-error/#findComment-640390 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