Jump to content

Coxis Reload-Sync


Dr_Cox1911

Recommended Posts

poster.png.3529965ca422127b7ff72c40844b9653.png

 

Greetings all!
 
I modded this thing in a couple of minutes and thought it might be useful for other people as well.
I coded it mainly for my own purpose and want to run this mod once the Workshop works fully.
 
Coxis Reload-Sync is only working in MP and still has some bugs, use at your own risk!
 
This mod supports TinyAVC!
 
 
 
What does Coxis Reload-Sync do?
Well, the name pretty much sums it up. With this mod you (=Serveradmin) can choose a reloaddifficulty and automatically sync it to your clients. The clients aren´t able to change the setting while the mod is loaded.
 
How do I (=Serveradmin) choose the difficulty?
Within the mod folder you find a "reloadsettings.ini" which should be pretty self-explanatory. Here is a quick example:
 
If I wanted to set the difficulty to medium my "reloadsettings.ini" would look like this:

[SETTINGS]
;Choose the desired difficulty here:
;1 = Easy
;2 = Medium
;3 = Hard
difficulty=2

MODS_02.png

 

Sourcecode: Github

Steam Workshop

Edited by Dr_Cox1911
restructured post for steam workshop release
Link to comment
Share on other sites

  • 1 month later...
  • 7 months later...
  • 6 months later...
  • 7 months later...

Is this mod even needed anymore? Haven't played for ages, so I don't know if this still works.

 

Might throw it on github though, so that others can contribute to it if it's still a thing.

Edited by Dr_Cox1911
Link to comment
Share on other sites

  • 1 month later...

I have rewritten the mod to use LuaNet, but unfortunately I can't figure out how to send the settings to the client without a player action like pressing a button or closing the damn dialog box.

Any LuaNet professionals here? I thought that I could simply add a "send"-Command in my init-function which get's called upon initialization of LuaNet, but the request for sending the setting is not received on the server-side.

 

The communication is working though, because I've added a debug button-press which sends the exact same command and the server receives it, sends the setting and the client changes it's reload difficulty accordingly.

Edited by Dr_Cox1911
Link to comment
Share on other sites

OnGameStart fires before the connection between the client and server is established it seems, because adding something to this event fires before the "Waiting for player-connect response from server" is done.

With LuaNet it should work with the "onInitAdd"-function but for some obscure reason the server doesn't receive the command. Looks like it is some sort of timing problem.

 

 

EDIT: I just uploaded the mod to github, so if someone of you guys want to take a look at it. The function that's responsibly for asking the server to send the settings is "CoxisReloadSyncClient.askSettings".

Edited by Dr_Cox1911
Link to comment
Share on other sites

  • 4 months later...

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...