wbykos Posted June 26, 2015 Share Posted June 26, 2015 How do i do this? Need to put translation if client have language pack installed and i dont want set all_clients_require_mod = true Link to comment https://forums.kleientertainment.com/forums/topic/55687-checking-that-the-mod-exist-on-client-from-server/ Share on other sites More sharing options...
Auth Posted June 26, 2015 Share Posted June 26, 2015 Pretty sure if the server's name is in another language that only people that speak it will join. Link to comment https://forums.kleientertainment.com/forums/topic/55687-checking-that-the-mod-exist-on-client-from-server/#findComment-650116 Share on other sites More sharing options...
Seiai Posted June 26, 2015 Share Posted June 26, 2015 @wbykos, ModManager:GetEnabledModNames() Link to comment https://forums.kleientertainment.com/forums/topic/55687-checking-that-the-mod-exist-on-client-from-server/#findComment-650122 Share on other sites More sharing options...
wbykos Posted June 26, 2015 Author Share Posted June 26, 2015 I'm don't need possibility, need function that check this Link to comment https://forums.kleientertainment.com/forums/topic/55687-checking-that-the-mod-exist-on-client-from-server/#findComment-650123 Share on other sites More sharing options...
wbykos Posted June 26, 2015 Author Share Posted June 26, 2015 (edited) @wbykos,ModManager:GetEnabledModNames() I've tried this in AddComponentPostInit("playerspawner", function ... player.ModManager:GetEnabledModNames() but got error "attempt to index field 'ModManager' (a nil value)" If check GLOBAL.ModManager:GetEnabledModNames() its return server modnames...need clients Edited June 26, 2015 by wbykos Link to comment https://forums.kleientertainment.com/forums/topic/55687-checking-that-the-mod-exist-on-client-from-server/#findComment-650125 Share on other sites More sharing options...
przemolsz Posted June 26, 2015 Share Posted June 26, 2015 @wbykos, "ModManager" is a global value. I assume you're putting it inside your modmain.lua. If so, useGLOBAL.ModManger:GetEnabledModNames()But either way, it's useless in such a mod, as it only returns mods installed on your side, the server-side in this case. I'll write here if I find a way to solve your problem. Link to comment https://forums.kleientertainment.com/forums/topic/55687-checking-that-the-mod-exist-on-client-from-server/#findComment-650126 Share on other sites More sharing options...
Seiai Posted June 26, 2015 Share Posted June 26, 2015 as it only returns mods installed on your sidewell, then make all clients require your mod and have them tell your server, whether they have the mod. Link to comment https://forums.kleientertainment.com/forums/topic/55687-checking-that-the-mod-exist-on-client-from-server/#findComment-650127 Share on other sites More sharing options...
wbykos Posted June 26, 2015 Author Share Posted June 26, 2015 (edited) @przemolsz,Thanks. Its needed for lang translation from server-side messages. @Seiai,In this case need to do this without all_clients_require_mod = true Edited June 26, 2015 by wbykos Link to comment https://forums.kleientertainment.com/forums/topic/55687-checking-that-the-mod-exist-on-client-from-server/#findComment-650131 Share on other sites More sharing options...
przemolsz Posted June 26, 2015 Share Posted June 26, 2015 @wbykos, I think I know a good solution. You need to create a simple "toggle" mod that is installed on all of the clients (all_clients_require_mod = true) that checks whether the client has the language pack installed. I'd suggest to do it this way: In your original mod's modmain, you put this:GLOBAL.TUNING.IS_x_LANGUAGE_INSTALLED = trueThen, in the toggle mod's modmain:AddModRPCHandler("x_languagepack", "clientcheck", function(player) --this happens when the player has the language pack installedend)AddSimPostInit(function() if GLOBAL.TUNING.IS_x_LANGUAGE_INSTALLED then SendModRPCToServer(MOD_RPC.x_languagepack.clientcheck) endend) Link to comment https://forums.kleientertainment.com/forums/topic/55687-checking-that-the-mod-exist-on-client-from-server/#findComment-650141 Share on other sites More sharing options...
Seiai Posted June 27, 2015 Share Posted June 27, 2015 In this case need to do this without all_clients_require_mod = truewhy? the game automatically installs the mod on all clients if someone tries to join the server. @przemolsz, what u did there is exactly what i said, make the clients tell u what mods are installed. but your solution only works, if @wbykos is the owner of all the languagepacks he want to include. instead u could just use ModManager:GetEnabledModNames() to pass all the enabled languagepacks to the server. Link to comment https://forums.kleientertainment.com/forums/topic/55687-checking-that-the-mod-exist-on-client-from-server/#findComment-650220 Share on other sites More sharing options...
przemolsz Posted June 27, 2015 Share Posted June 27, 2015 (edited) @Seiai,I think what he wants to do is give choice to the players, if they want to play with a language pack, then send them translated massages, otherwise use normal ones, not forcing them to download the mod. And how do you want to pass all of the mod names to the server? Is there a function that lets you send strings? EDIT: Okay, nevermind. I get it now. Although mod names may sometimes differentiate, someone might have a Steam Workshop version named "workshop-491135223", somebody else a Klei forum's version of the mod - "x_languagepack". It's not a perfect solution, but we'll see what @wbykos says. Edited June 27, 2015 by przemolsz Link to comment https://forums.kleientertainment.com/forums/topic/55687-checking-that-the-mod-exist-on-client-from-server/#findComment-650265 Share on other sites More sharing options...
wbykos Posted June 27, 2015 Author Share Posted June 27, 2015 What i say? I say that i made mine first mod :] not without big help from this subforumhttp://steamcommunity.com/sharedfiles/filedetails/?id=470195667 Conclusion that the server cant get any non default data from connected clients. And yes, przemolsz talking right, i want put default and alternate translation to server messages without intervening to client-side. At the moment its impossible but when it happens i will add English translation to mine mod :] Link to comment https://forums.kleientertainment.com/forums/topic/55687-checking-that-the-mod-exist-on-client-from-server/#findComment-650276 Share on other sites More sharing options...
Seiai Posted June 27, 2015 Share Posted June 27, 2015 (edited) intervening to client-sidei wouldn't call it "intervening", u really only have the clients tell u their languagepacks via an RPC. if u really dont like that they "have" to autoinstall the mod via "all_clients_require_mod = true", then just dont. anyone who happens to have your mod installed, will send his info to your server, so your server can adapt. and if they want the server to adapt, they just have the option to install your mod. Edited June 27, 2015 by Seiai Link to comment https://forums.kleientertainment.com/forums/topic/55687-checking-that-the-mod-exist-on-client-from-server/#findComment-650283 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