1. 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

[solved]How to add a custom gamemode properly?

Discussion in 'Modding Help' started by Frederikam, Feb 15, 2014.

  1. Frederikam

    Frederikam Drill Rusher

    Messages:
    88
    Hi,
    For some time now I've been running a server with my own custom gamemode. My gamemode is based on the CTF gamemode and I've pretty much just written some changes (along with other things away from the Rules folder), but whenever the server updates the Rules folder is reset. I tried putting the gamemode in a mod folder but it didn't load. I tried using autoupdate_ignore_custom.cfg but my gamemode still got replaced.
    Whenever this happens on my server I quickly just run a small bash script to copy over files, but it's not very convenient.
    I have attached the zipped up version of the folder that I want to add to the rules folder.
     

    Attached Files:

  2. SnIcKeRs

    SnIcKeRs Bison Rider

    Messages:
    148
    use in mod folder your custom autostart_server.as ( you can find it in Scripts folder)
     
    Frederikam likes this.
  3. Frederikam

    Frederikam Drill Rusher

    Messages:
    88
    You're not right but you led me on the right track. The server_autostart.as includes a script called DefaultStart.as
    There I found the two line 10 and 16:
    Code:
    LoadRules(  "Rules/" + sv_gamemode + "/gamemode.cfg" );
    
    
    LoadMapCycle( "Rules/" + sv_gamemode + "/mapcycle.cfg" );
    I then edited these paths to my own Rules folder in my mod folder.
     
  4. ZeroZ30o

    ZeroZ30o Haxor

    Messages:
    119
    Edit: Sorry, didn't notice the solved tag, my bad :S!

    This reminds me alot of https://forum.kag2d.com/resources/rulesloader.128/.
    Try that maybe?
    gamemode.cfg doesn't load when inside a mod folder without that apparently, so yeah. Also, I recommend hoping on kag.modding for general questions such as this one.
     
    Last edited: Feb 16, 2014
    Frederikam likes this.