Page 2 of 2 FirstFirst 1 2
Results 11 to 11 of 11

Thread: Is there a way to run dota 2 without GUI ?

  1. #11
    Basic Member
    Join Date
    Dec 2016
    The following works for me on Windows. A slight mod also works to get it to work on Linux/OSX

    >>> import subprocess
    >>> p = subprocess.Popen('"C:\\Program Files (x86)\\Steam\\steamapps\\common\\dota 2 beta\\game\\bin\\win64\\dota2.exe" -con_logfile scripts/vscripts/bots/console.log -con_timestamp -console -dev -insecure -noip -nowatchdog +clientport 27006 +dota_1v1_skip_strategy 1 +dota_surrender_on_disconnect 0 +host_timescale 1 +hostname dotaservice +sv_cheats 1 +sv_hibernate_when_empty 0 +tv_delay 0 +tv_enable 1 +tv_title 0895d28a-a8d5-11e9-b052-c86000c96ae6 +tv_autorecord 1 +tv_transmitall 1 -fill_with_bots +map start gamemode 6 +sv_lan 1')
    Note, that if you intend to pull the protobufs frame dumps in another server you will need to also add these options:
            if not self.offline:
                    '-botworldstatetosocket_frames {}'.format(self.ticks_per_observation),
                    '-botworldstatetosocket_radiant {}'.format(self.PORT_WORLDSTATES[TEAM_RADIANT]),
                    '-botworldstatetosocket_dire {}'.format(self.PORT_WORLDSTATES[TEAM_DIRE]),
    Also, if you want to run headless you can add the dedicated flag
            if self.host_mode == HOST_MODE_DEDICATED:
    Finally, if you intend to play with real-players joining the bots you need to change the 'sv_lan 1' to 'sv_lan 0' to allow others to join.

    In the top-most example of python code note I use some auto-generated values (like the tv_title which is a uuid I generate). Change as you will.
    Last edited by nostrademous; 07-17-2019 at 03:59 PM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts