1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Hey Guest, is it this your first time on the forums?

    Visit the Beginner's Box

    Introduce yourself, read some of the ins and outs of the community, access to useful links and information.

    Dismiss Notice

Class

Discussion in 'Modding [KAG Classic]' started by NEOparmen, Aug 19, 2013.

  1. NEOparmen

    NEOparmen Catapult Fodder

    Messages:
    27
    Hi all .I have created a vip class on the server . I want that this class could move only admins that simple players was not able to move in this class . How to do this?
    --- Double Post Merged, Aug 19, 2013, Original Post Date: Aug 19, 2013 ---
    Help plz
     
  2. kaizokuroof

    kaizokuroof Agkubuk|'Kaizokuroof' Cilobakil, Roofpointy Global Moderator Forum Moderator Donator Tester
    1. PumpkinStars - [Pk#] - Inactive

    Messages:
    909
    Hiya, through the use of seclevs, you'll need to restrict that class, so only people assigned the Admin seclev can access the class.

    You do this, by adding: no_class_vip; to the list of features in all the seclevs, but the admin ones.

    Just a note, the feature is: no_class_%classsname% - replace %classname% with the name of your class.

    let me know if you need further explaining on anything I've mentioned. For a full list of features, check out; https://doc.kag2d.com/wiki/Security_Levels#Features
     
    Alistasia and Contrary like this.
  3. NEOparmen

    NEOparmen Catapult Fodder

    Messages:
    27
    And what files are to be prescribed no_class_name class that ordinary users could not log in class?If I write in superadmin.cfg.example features in it,those who are super admins will not be able to log in class which I have appointed?
     
  4. kaizokuroof

    kaizokuroof Agkubuk|'Kaizokuroof' Cilobakil, Roofpointy Global Moderator Forum Moderator Donator Tester
    1. PumpkinStars - [Pk#] - Inactive

    Messages:
    909

    I think what you're asking, is what seclevs should you add the no_class feature to? You need to add the no_class feature, to ALL the classes that you DON'T want accessing the custom class.

    What the feature does, is it stops that seclev from being able to see/switch into that class. So if you added it to normal.cfg then anyone assinged the normal.cfg seclev, won't be able to access the class.

    Also note, that your security files, need to have the file extension .cfg or they won't load. They're named cfg.example, because they are example files.
     
  5. NEOparmen

    NEOparmen Catapult Fodder

    Messages:
    27
    for that I need to change the file normal.cfg.example in normal.cfg that would have worked Ong?
     
    kaizokuroof likes this.
  6. kaizokuroof

    kaizokuroof Agkubuk|'Kaizokuroof' Cilobakil, Roofpointy Global Moderator Forum Moderator Donator Tester
    1. PumpkinStars - [Pk#] - Inactive

    Messages:
    909
    Oh no! Gorillas???


    @@@@@@@@@@@

    Well, there is probably a few more steps you've missed, so I'll explain about Security Levels or "Seclevs" for short.

    First of all, you're going to want to setup your securitysetup.cfg file, it tells your server where to find the seclevs.cfg, Blacklist and whitelist.

    It's located: KAG/Base/Security/securitysetup.cfg

    The Seclevs.cfg file, is the file that points to your seclevs - you can make as many security levels as you see fit.
    Blacklist is the file that show's who's banned, or denied access from your server.
    Whitelist can be used to only allow people on that list, to have access to the server (should you wish to restrict it to certain people only)

    The seclevs.cfg file is located: KAG/Base/Security/seclevs.cfg - There is one already in there, with the extension seclevs.cfg.example, just remove the .example

    Anyways, it should have two lines of code that do something in it, one that tells your server to load the seclevs specified in the file and the other part tells your server where to find them.

    *Copied and pasted from the wiki*

    Code:
    # If 0, defers to hardcoded settings
    levels_active = 1
     
    # Level file paths go here as a ;-delimited list
    levels_files = Security/superadmin.cfg; Security/admin.cfg; Security/guard.cfg; Security/vip.cfg; Security/premium.cfg; Security/normal.cfg;
    levels_active = 1 - Means, yes load my configs, you can also set it to 0, meaning it will load the hardcoded configs (not what you want)

    levels_files = * - Tells the server where to load the configs from - this means, you don't have to store them in Base/Security - You could essentially put them anywhere in your KAG folder, so long as you tell it the path - I think it assumes they'll be somewhere in Base/ though, so I'd recommend just keeping them in the default location, it'll make your life easier.

    If all you want is the default seclevs, then inside Base/Security, will be those files you mentioned, with the .example file extension. Remove .example, so the files read %name of seclevs%.cfg, rather than %name of seclevs%.cfg.example

    One thing to note about your seclevs.cfg file, is that it will assign the seclevs from top down, so have your HIGHEST ranking seclev first, probably "Superadmin" and then work your way down - as in the example above.

    If everyone is going to be using the "normal.cfg" seclev, then add the no_class_class name into the features in that seclev, and it will restrict those users from accessing the class, remember to do premium.cfg as well (if you're using default seclevs)

    That should be all you really need to do, but if I missed something, you can always check out the link below - it also has a full list of Features/Roles/Commands and how to use them.

    BTW, all you need to know about seclevs is found here: https://doc.kag2d.com/wiki/Security_Levels
     
    miniu, farhhanshafi and Drusse like this.