Groups and groups starting out as a certain group

  • Hello All,


    I believed I asked this before and I could not do it, but a lot of changes since then. I see a place in the Server properties to put in a group name for new players? But when I put in a group name it does not automatically add a new player to that group. Maybe this still can not be done?

    DEATH AND DESTRUCTION PVP
    192.154.229.151:4255


  • Umm I do have a permission file with three workable types. Admins that can admin, Fly, so People can fly, and builders so people can well build. That is not the problem, the problem is the game will not automatically add them to the group I want them in.

    DEATH AND DESTRUCTION PVP
    192.154.229.151:4255


  • Umm I do have a permission file with three workable types. Admins that can admin, Fly, so People can fly, and builders so people can well build. That is not the problem, the problem is the game will not automatically add them to the group I want them in.

    no that's right if you want your players to be auto moved to a group lets say by how long they are online. you will need to make a script that updates the mysql database the line is simple something like this


    UPDATE `rising_world_server_2`.`player` SET `Group` = 'Surveyor' WHERE `player`.`OnlineTime` BETWEEN 0 AND 7200
    UPDATE `rising_world_server_2`.`player` SET `Group` = 'Settler' WHERE `player`.`OnlineTime` BETWEEN 7201 AND 14400


    note everyone on your server whos new would be in the group surveyor when they hit 7201 sec they will become a settler, this script works with the database but the game wont see any change till the player logs off and back on, only then will his group change. also note this is a cron job meaning it needs to update every sec or min depending how you set it up.

    Yahgiggle Steam Signature, real name Deon Hamilton :thumbsup: Server @ ip 139.99.136.76:4255 Name (The Federation of territory) Unity :thumbsup:

    If at first your code does not work call it version 0.1 with the odd bug :thinking:

    My Own Website




    31245-logo-png
  • no that's right if you want your players to be auto moved to a group lets say by how long they are online...


    I think @icon58 is asking something different; not how to move this or that player to some specific group, but how to have all new players automatically set into a default group the first time they connect.


    Functionally, this can be achieved by editing the default.permissions to the required settings and simply using the default group to which users are automatically added at first spawn. But I assume this is not enough for the OP.


    Quote

    you will need to make a script that updates the mysql database the line is simple something like this
    UPDATE `rising_world_server_2`.`player` SET `Group` = 'Surveyor' WHERE `player`.`OnlineTime` BETWEEN 0 AND 7200
    UPDATE `rising_world_server_2`.`player` SET `Group` = 'Settler' WHERE `player`.`OnlineTime` BETWEEN 7201 AND 14400


    Yes, but it is not obvious how to access the world SQL database in the first place (the getDatabase() LUA global function accesses a DB in the script folder, which is specific to the script itself and has no access to the world/server data).

  • I see a place in the Server properties to put in a group name for new players? But when I put in a group name it does not automatically add a new player to that group. Maybe this still can not be done?

    Actually that's indeed the way how this could be achieved. You have to put the name of the desired group into the settings_default_newplayer_group field in the server.properties file. Remember to put the filename there (without the ending), i.e. if your permission file is called "awesomegroup.permissions", you have to put "awesomegroup" there.
    Note that this only works for new players, i.e. for players who never joined the server in the past.


    Alternatively you could edit the default.permissions file of course, as @Miwarre suggested, but keep in mind that this affects all group permissions then (all permissions are based on the default.permissions file).


    Having a cronjob which updates the world database (as mentioned by @yahgiggle) is definitely the "crème de la crème", but also the most complicated solution in this case.
    Achieving something like this will be easier once the new API is ready, since it provides access to the world database, but also allows changing the player group directly :)

  • Okay I see my problem, "newplayer" since my alter ego has joined the server it will not see him as a new person. I am thinking the only way around this would be to wipe the server? This is my test server so it does not matter, HOW ever my main server may perturb people if I wipe it. :cursing::D

    DEATH AND DESTRUCTION PVP
    192.154.229.151:4255


  • I am thinking the only way around this would be to wipe the server?

    If it's just about a particular player, why don't you just set his group manually by typing setplayergroup playername groupname into console (of course you have to replace "playername" with the playername and "groupname" with the name of the group/permission, the player also has to be online)? Alternatively you can edit the player table in the world database manually by typing the group name into the "Group" column.

  • Then you should use the default.permissions file for that, as suggested by @Miwarre. All group permissions inherit the default.permissions, but can also overwrite them of course. The default.permissions is used for every player automatically.

Participate now!

Don’t have an account yet? Create a new account now and be part of our community!