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

Windows Is it possible to change the 'Build Phase' time in an offline CTF server?

Discussion in 'Help' started by A_Sarcastic_Whale, Apr 29, 2016.

Thread Status:
Not open for further replies.
Mods: makmoud98, Mazey
  1. A_Sarcastic_Whale

    A_Sarcastic_Whale Shark Slayer

    Messages:
    10
    Hi all,
    The question I have for you today is:
    Is there a way to change the 'Build/Preparation Phase' time period in an offline server set up like the one in my previous thread? I want to be able to authentically test how 'good' of a flag defense structure I can make in the standard build phase without having to use a stopwatch in real life.

    Thanks in advance!
     
  2. kaizokuroof

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

    Messages:
    909
    Hey,
    Sorry, I'm sleep deprived but want to help and my head hurts trying to follow what you're writing. You can just set the gamemode to CTF and have it start when you connect if you like. Is this what you're asking for?
     
  3. makmoud98

    makmoud98 You are already DEAD Forum Moderator Staff Alumni Tester

    Messages:
    586
    you can skip build phase by typing
    Code:
    getRules().SetCurrentState(GAME);
    into the console

    BTW you can paste into the console with CTRL+V
     
    kaizokuroof likes this.
  4. kaizokuroof

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

    Messages:
    909
    I think he wants the 3 minute build phase, to test structures.

    You can also change the gamemode in KAG/autoconfig.cfg - sv_gamemode = CTF;
    and runlocalhost.bat or make your own startup script:

    KAG.exe noautoupdate nolauncher autostart Scripts/localhost.as (or something similar). I think CTF is set to only start when there is a player on each team, so you could add a bot or edit the rules.
     
  5. A_Sarcastic_Whale

    A_Sarcastic_Whale Shark Slayer

    Messages:
    10
    Yeah, that's exactly what I want. The way I am playing the maps at the moment is going into the CTF tutorial and typing '/loadmap maps/ctf/hearthplains.png' into the console, but it only has a 5 second build phase like the tutorial.
    I want to find out if I can change this to the standard 3 minute one, or if that's not possible.
    Sorry if what I wrote is confusing in the first post.
     
  6. kaizokuroof

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

    Messages:
    909
    Change the gamemode in KAG/autoconfig.cfg
    Code:
     sv_gamemode = CTF;
    Edit KAG/Base/Rules/CTF/Scripts/CTF.as and find line 40. It should read:
    Code:
     this.minimum_players_in_team = cfg.read_s32("minimum_players_in_team", 2); 
    Change it to:
    Code:
    this.minimum_players_in_team = 1;
    and then launch the: runlocalhost.bat

    I would copy the entire KAG directory (while game/steam is closed) and then playing with the scripts. I haven't tested, but in theory it should work.. I hope :D
     
  7. A_Sarcastic_Whale

    A_Sarcastic_Whale Shark Slayer

    Messages:
    10
    This didn't work the first time, I got a ton of script errors when A: loading into a CTF map and B: when changing maps. When I changed maps there were a few floating blocks, and then none.
    So I changed the
    Code:
    this.minimum_players_in_team = 1
    to read
    Code:
     this.minimum_players_in_team = cfg.read_s32("minimum_players_in_team", 1);
    and what happened then was that I would load into an empty map, with two errors.

    I have already tested the stuff with an external stopwatch now, so I don't need to know how to load into the game, but if you want to we can keep investigating.
     
    kaizokuroof likes this.
  8. kaizokuroof

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

    Messages:
    909
    Na, that's all good. I'll check tonight. One thing though, the line you changed should have read: this.minimum_players_in_team = 1; rather than
    this.minimum_players_in_team = cfg.read_s32("minimum_players_in_team", 1);

    The reason I told you to change to just 1, is that the first command is pulling it from config files.
    As for the gamemode error, sounds weird, should have just launched a localhost server that puts you in as a player of CTF. I'll close this thread as you fixed your issue yourself, but if I get time I'll come back and update the thread. PM if you want this reopened for whatever reason.
     
Mods: makmoud98, Mazey
Thread Status:
Not open for further replies.