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

KAG Mod Manager 1.09

Basic app for managing KAG mods with the new web API system

  1. Shadlington
    This is a simple app for managing mods with the new KAG web API system for registering and managing them, soon to be integrated into the game itself for increased security, reliability and ease of distribution.

    This app is pretty crappy to be honest - it's just something quickly thrown together in order to provide a way of using the new system until someone comes along and makes a better one. If you decide to do that get in touch and I'll give you my as-yet-unpublished documentation for the web API, plus any advice you may want.

    The zip file here should, in theory, work on windows machines to allow you to run it - just unzip it and run ModManager.exe. Let me know if you have any issues - python .exes can be temperamental.

    It's written in python and the source code is available here: https://github.com/Shadlington/KAGModManager

    How to use

    General Info
    This is not really aimed at general users, it's aimed at developers mostly. The emphasis is on helping devs to register mods and upload their code, not to help people manage the mods they have installed (someone else will inevitably build an app that does that eventually).

    Currently this system isn't integrated with the KAG client/server, but it will be. There will be 3 ways of managing/distributing the mods on your server/clients - unverified (which basically is what we do now - sending files directly from server to client without any verification), verified (the same as it is now but it'll use the API to verify if the mods have come from the developer that they claim to have come from without being tampered with - this will require that a registration.json file be generated for the mod at the root of the mod directory, which this app will do for you, and it doesn't require you to upload any code to the API) and API-download (which requires that devs upload their code to the API directly - again, this app will do that for you - and then clients will download the mods from there instead of from the server itself).

    When you upload a mod package it'll create 3 versions of the package - full, server and client. Full contains all (allowed) files, server contains all except client-specific ones and client contains all except server-specific ones. You can use the app to download the full version, or alternatively use URLs of the following structure in any browser: https://api.kag2d.com/v1/game/thd/kag/mod/<devname>/<modname>/full, https://api.kag2d.com/v1/game/thd/kag/mod/<devname>/<modname>/client, https://api.kag2d.com/v1/game/thd/kag/mod/<devname>/<modname>/server

    Actions
    Refresh: press this to refresh the mod list. If you have entered any filter values on the right then the list will be filtered accordingly (e.g. enter 'Shadlington' in the developer filter to only get mods developed by me).
    New Mod: press this to allow entering the details for a new mod you want to register (then press submit or cancel). You'll need to enter your kag auth details in the developer credentials to do this.
    Edit Mod: press this to allow editing an existing mod, after selecting said mod from the list. Again, you need your credentials (and you need to be the developer that registered it originally, or on the owner list of either the mod or the group if the devType is group).
    Fetch Dev Key: get the secret developer key for the selected mod. Don't share this with anyone! It is used to create the devHash value in a mod's registration.json file, which is used to verify that the mod has really come from you, the developer. Again, dev credentials are required.
    Generate Reg File: generates a registration.json file for you in the folder specified by the 'Mod folder path' field. You need to have selected the correct mod from the list. Again, dev credentials are required.
    Upload Mod Package: packages up your mod (as specified by the 'Mod folder path' and your mod list selection) and uploads it to the API (you don't need to generate the reg file yourself if you click this, it'll be done automatically). Again, dev credentials are required.
    Download Mod Package: if a package has been uploaded for the selected mod then it will be downloaded to the chosen location (you'll be prompted to choose a file path when you press the button). This will only download the 'full' version of the mod for now (as opposed to the client/server ones).
    Delete Mod: delete your mod. Dev credentials required.

    Fields
    Name: The human-readable name of the mod
    Name URL: The string to use in the <modname> part of this url: https://api.kag2d.com/v1/game/thd/kag/mod/<devname>/<modname>/info. This cannot be edited once it has been set.
    Developer: The developer that registered the mod - either a username or a devgroup. This cannot be changed once it has been set.
    Developer Type: Individual or group - what kind of developer is responsible for this mod? Choose group if you want the mod to be developed by a devgroup, otherwise choose individual.
    Owner List: Only relevant for groups. Which members of the group have 'ownership' of this mod. This list determines who is allowed to edit a mod's info. You cannot take yourself off the owner list. Group owners can put themselves on the owner list of any mod that is developed by their group. This must be a comma-delimited list of usernames, where each username is already a member of the devgroup.
    Developer Access List: Only relevant for groups. Which members of the group need access to the mod's developer key and to be able to upload mod packages? This must be a comma-delimited list of usernames, where each username is already a member of the devgroup.
    Description: The mod description
    Full/Server/Client enabled: If these are unticked then downloading the associated package will require developer authentication (and if ticked anyone can download). As the download mod button is linked to the full package, it will only be enabled when the full box is ticked.
    Registration time: The time when the mod was originally registered
    Developer key: Secret key used for generating the mod reg file (registration,json)
    Mod folder path: The path to the mod used by the 'Generate Reg File' and 'Upload Mod Package' actions.
    Developer Credentials: Your kag account's username and password.