Page 1 of 1

Client feature - Save CFG settings

PostPosted: Sat Feb 08, 2014 5:46 pm
by Durf
Basically I would like to see a menu option to save the currently affected settings used by the client to play the game.

So you could connect to a server, happen to like the settings a lot, and you would be able to go into the menu and choose:
-Save FULL CFG
-Save mini CFG

The "mini" CFG contains ONLY the settings that changed from default (the red text that appears when you connect to a server)
The "FULL" CFG will contain all the default settings FIRST, along with all the changed settings AFTER.

The mini would be good for the server owners that either have a fresh installation and want to host the one idea.
The full CFG would be good to change the ENTIRE server safely without any settings interfering; or for those who have a 'messy' server installation and need to have those defaults reset for them


AFAIK, this shouldn't be too too hard to do; should even be able to work in a local or LAN game since it is the settings that the client uses to play the game.

Personally I think this would be a HUGE selling point for the +ap client; I can think of at least 10 people who would switch to use +ap just because they can save server copies.

Re: Client feature - Save CFG settings

PostPosted: Sat Feb 08, 2014 9:07 pm
by nelg
I don't think it will copy the COMPLETE amount of settings.
for example, it won't copy SHOT_THRESH because that is serverside and does not get sent to the client. (Maybe vertrex can rig up a guessing thing for the stuff that doesn't get sent to the client. )

Re: Client feature - Save CFG settings

PostPosted: Sun Feb 09, 2014 1:44 am
by Vertrex
I've made alterations to your idea Druf because of the restrictive nature of the game, code and my knowledge. Currently you have these options:

Main Game Window
Image

Config Setup Window
Image

  • Save User Config - Saves the user config to user.cfg in var directory.
  • Load User Config - Load the user config from user.cfg in var directory.
  • Save Changed Config - Save the changed config to config_changed.cfg in var directory.
  • Save All - Saves all the config to config_all.cfg in var directory.
  • Load All - Loads all the config from the beginning of game start.
I was unable to save "DEFAULT" settings because all settings are changed right from the beginning of game start...

nelg wrote:I don't think it will copy the COMPLETE amount of settings.
for example, it won't copy SHOT_THRESH because that is serverside and does not get sent to the client. (Maybe vertrex can rig up a guessing thing for the stuff that doesn't get sent to the client. )
Nelg is right. Unless those settings are converted to network settings and also exist within the client as well will it actually work. I've tested it out with client without those settings and server that sends networking stuff to client hasn't worked like it does for CYCLE_SPEED and the rest of the commands.

Re: Client feature - Save CFG settings

PostPosted: Sun Feb 09, 2014 2:35 am
by Durf
the whole user.cfg part is confusing me. I'm not sure what you mean or what your mod does..

I've gotten users to use their user folders where the user.cfg file is actually stored; they can save any other custom user.cfg files there too
All because of the "Color Codes" link on my site (profile builder - exports a custom user.cfg)
So I'm a little confused about the purpose of all this "user.cfg" talk...please enlighten?

Although it might not be necessary, I've given it some further thought and came up with a much simpler solution (hopefully):
A server feature: an extra folder or somewhere in the installation directory maybe "/var/public"..?
(I have more on this feature but for now this is the simplest way to explain it, theres just a new directory)
The server owner chooses what CFGs to put in that folder.
A client feature: in the menus a user can choose to "Download server CFG" or "attempt" it.
Basically it then saves all the files that is in that server's "public" folder, into the CLIENT's or USER FOLDER's: "/var/downloaded/<author/server name>"

So Ideally it is the responsibility of the server owner to share the CFG settings.
(I have more on this idea that I will explain later, but for now this is easiest)
BY DEFAULT!! There should be a info.txt file in the server's "public" folder.
This info.txt file should contain who the CFG files were created by, and any other info the server owner wishes to add. But importantly it conatins the AUTHOR NAME and SERVER NAME to be used by the CLIENT when saving into the "downloaded" folder.

Hope that made sense; hope it makes things much easier on both sides (server owner and client user); aaaand I hope it doesn't make it any harder on you (developer).
But I do think this is a better solution as we can refine it later with other options and because it indirectly solves the issue nelg pointed out ;)

Re: Client feature - Save CFG settings

PostPosted: Sun Feb 09, 2014 2:47 am
by Vertrex
The basic use is to load players custom changed settings and apply them to the clieent. Well I can change user.cfg => custom_user.cfg if that helps it out. But then there's the settings_client.cfg I added which thus far was fairly useful in my test with settings in client mode. Its located in the config directory of the game.

That server/client feature is not possible at the moment. Why do you think RESOURCE_REPOSITORY_CLIENT/SERVER were created? Its because clients and servers did not have the ability to direct access another's computer to download files. In this case the feature of "/var/public/..." won't work since the clients/servers don't have that kind of power... :(

Re: Client feature - Save CFG settings

PostPosted: Sun Feb 09, 2014 2:58 am
by Durf
Vertrex wrote:The basic use is to load players custom changed settings and apply them to the clieent. Well I can change user.cfg => custom_user.cfg if that helps it out. But then there's the settings_client.cfg I added which thus far was fairly useful in my test with settings in client mode. Its located in the config directory of the game.

This part still confuses me. the idea was to get the SERVER settings..? not client settings? so all this fiddling with user.cfg is the wrong set of variables! We'd be looking for the settings kept in the server's settings_custom.cfg. As much as we could anyway...

Vertrex wrote:That server/client feature is not possible at the moment. Why do you think RESOURCE_REPOSITORY_CLIENT/SERVER were created? Its because clients and servers did not have the ability to direct access another's computer to download files. In this case the feature of "/var/public/..." won't work since the clients/servers don't have that kind of power... :(

Oh, I see.

Well can't the server send a message to the client? Can't the client interpret that message in any way it wants? (this makes the transfer of SPECIFIC files more secure ;o no viruses to misinterpret, just CFG settings in a msg)
So how about a kind of server output that will be read by the +ap client and will know the save it.
The server message is generated by the files in the public folder ;o

That should be able to work no problem...right?

Re: Client feature - Save CFG settings

PostPosted: Sun Feb 09, 2014 3:10 am
by Vertrex
Durf wrote:
Vertrex wrote:The basic use is to load players custom changed settings and apply them to the clieent. Well I can change user.cfg => custom_user.cfg if that helps it out. But then there's the settings_client.cfg I added which thus far was fairly useful in my test with settings in client mode. Its located in the config directory of the game.

This part still confuses me. the idea was to get the SERVER settings..? not client settings? so all this fiddling with user.cfg is the wrong set of variables! We'd be looking for the settings kept in the server's settings_custom.cfg. As much as we could anyway...
I added those features more for the sake of those, like me, who make adjustments to the user.cfg during game play and want to apply them to the client so the changes will be saved when the client closes.

There is the thing about the "Save Changed Config" since it writes "ALL" changed settings to /var/config_changed.cfg. That also includes client settings but since its been executed from the client side I am not surprised since some settings were changed from the client side. What we can perhaps do is ensure settings aren't applied as "changed" when the game starts. However I am not certain what kind of impact it would have on client/server but I'll have to test it out for further analysis.

Durf wrote:
Vertrex wrote:That server/client feature is not possible at the moment. Why do you think RESOURCE_REPOSITORY_CLIENT/SERVER were created? Its because clients and servers did not have the ability to direct access another's computer to download files. In this case the feature of "/var/public/..." won't work since the clients/servers don't have that kind of power... :(

Oh, I see.

Well can't the server send a message to the client? Can't the client interpret that message in any way it wants? (this makes the transfer of SPECIFIC files more secure ;o no viruses to misinterpret, just CFG settings in a msg)
So how about a kind of server output that will be read by the +ap client and will know the save it.
The server message is generated by the files in the public folder ;o

That should be able to work no problem...right?
Heh. You think I can? Right now I don't even understand clearly how the messaging works between clients and servers. Sure I've gone through some extensive overview of the code for them messaging but I still haven't grasped it to the point of understanding yet... :(

Re: Client feature - Save CFG settings

PostPosted: Sun Feb 09, 2014 3:32 am
by Durf
Vertrex wrote:
Durf wrote:
Vertrex wrote:The basic use is to load players custom changed settings and apply them to the clieent. Well I can change user.cfg => custom_user.cfg if that helps it out. But then there's the settings_client.cfg I added which thus far was fairly useful in my test with settings in client mode. Its located in the config directory of the game.

This part still confuses me. the idea was to get the SERVER settings..? not client settings? so all this fiddling with user.cfg is the wrong set of variables! We'd be looking for the settings kept in the server's settings_custom.cfg. As much as we could anyway...
I added those features more for the sake of those, like me, who make adjustments to the user.cfg during game play and want to apply them to the client so the changes will be saved when the client closes.

Yea, and all the users who've used my site just use the console to "include filename.cfg" since it is a VALID CFG directory. Just seems like such a small/specific thing to add in as a menu feature (maybe too specific).
Give my 'color codes' tool a try, open up all the options and see what I mean, I think that has all the changes during game you are talking about. My users just INCLUDE them in game.

So just to be clear, is there anything different about what your feature does? Or is there someway to make the use of that feature along with my tool easier? I'm still not sure about it and probably won't be until I try it out, so this all might be useless opinions.


Vertrex wrote:There is the thing about the "Save Changed Config" since it writes "ALL" changed settings to /var/config_changed.cfg. That also includes client settings but since its been executed from the client side I am not surprised since some settings were changed from the client side. What we can perhaps do is ensure settings aren't applied as "changed" when the game starts. However I am not certain what kind of impact it would have on client/server but I'll have to test it out for further analysis.

I'm thinking that it doesn't do what I personally wanted it to, and if the feature below ends up working, then this would be useless. I suggest you just drop it since it wouldn't be sufficient for a lot of tronners (IMO).

Vertrex wrote:
Durf wrote:
Vertrex wrote:That server/client feature is not possible at the moment. Why do you think RESOURCE_REPOSITORY_CLIENT/SERVER were created? Its because clients and servers did not have the ability to direct access another's computer to download files. In this case the feature of "/var/public/..." won't work since the clients/servers don't have that kind of power... :(

Oh, I see.

Well can't the server send a message to the client? Can't the client interpret that message in any way it wants? (this makes the transfer of SPECIFIC files more secure ;o no viruses to misinterpret, just CFG settings in a msg)
So how about a kind of server output that will be read by the +ap client and will know the save it.
The server message is generated by the files in the public folder ;o

That should be able to work no problem...right?
Heh. You think I can? Right now I don't even understand clearly how the messaging works between clients and servers. Sure I've gone through some extensive overview of the code for them messaging but I still haven't grasped it to the point of understanding yet... :(


1)Custom command in the CLIENT to send a request to the server.
2)PLAYER_MESSAGE can be sent to the player, pretty sure that is what makes all the red text when someone connects. All of the output in the files in that public folder. starting with info.txt.

3)Can't the client be made to interpret any output as it wants? like a server PHP script can interpret when a line of output is a custom command.
So if the server the first line of info.txt the client would interpret that as a command to listen to all similar outputs until you get the finished signal. kinda like a password to make the client start saving.

Hit me up on Gtalk if this is sounding too complicated over here, and ask me all the questions you need, 'cause I feel like if I could script in PHP for a server and a client too, I could make it work.
So if it can work with scripts it should be able to work with c++ for sure.
Maybe I can write up a proper concept in a little bit; show you what I mean.

Re: Client feature - Save CFG settings

PostPosted: Sun Feb 09, 2014 7:13 am
by Vertrex
You know what... I don't see any reason to even having that save/load for user.cfg since the game already does that... pretty stupid of me to add menu options for it. If players have the ability and thought of mind to use console to include cfg then there is no point in creating stuff from the menu in the first place! I'll leave the config save for all changes of config.

Heh, I know how well player_message and stuff work but I don't understand any of it after the part of message transfer. I'm already seriously annoyed since going through 10's and 1000s of code lines and still I don't get it... Quite frustrating really at how difficult the dev team programmed it. Anyway I cannot replicate something I don't know anything about. So something like using PLAYER_MESSAGE system is useless for me because I don't understand how messages are transferred between client and server. Maybe fman would have better luck at it since he understands that part better than me.

Tired...
For once in 8 years of tronning I'm tired... really tired...

Re: Client feature - Save CFG settings

PostPosted: Sun Feb 09, 2014 8:14 pm
by Durf
Hope I didn't discourage you o.o

Shame that it's so hard to do :/
I was thinking though, the client will output any PLAYER_MESSAGE sent by the server right?
So can't the client just have an IF statement to check if the messages being sent are supposed to be saved to a file? like if all the messages start with "###directory/filename###" then you know that the rest of that player_message is part of that file.
It's a really make-shift way to do it but I had thought that way wasn't going to be too hard.

But hey, if you don't want to it is fine.
This idea was more for the general public than it was for me; to make the +ap client more appealing.
Maybe F-man will read this topic sometime and get off his butt ;P

Re: Client feature - Save CFG settings

PostPosted: Mon Feb 10, 2014 12:59 am
by Vertrex
I know dude but I first can't even fathom how the messages are sent and received. That banned words filter was done BEFORE the messages are sent or received which was easier. When the messages are sent/received, I have absolutely no clue how they are parsed or anything. It isn't difficult thus far but I just don't get it since I'm still much a beginner at c++ :P

Ya, maybe fman could deal with it when he has free time and comes over to check recent/new posts. Perhaps then he could implement it for me instead :)

Re: Client feature - Save CFG settings

PostPosted: Sat Jun 14, 2014 8:33 pm
by Durf
*bump*

Checking how this is doing too ;P

I realize this was one of the more complex ideas (only +ap servers would have the option available if its in use; only +ap clients would be able to make use of that option.), so I understand if you don't want to finish this feature so soon (especially since I have more ideas that may also be 'complex', it might just be better to fit it all in a new version altogether).

From what I recall, it is just adding a new CFG directory inside the default installation's CFG directory called "public" and anything put inside that is for public download (at their discretion, to be used by a +ap client, to download into a CFG resource folder, similar to the maps resource but organized into folder's named after the server_name setting).

Yea...*bump*