Results 1 to 5 of 5

Thread: hero_selection.lua think() not being called

  1. #1
    Basic Member
    Join Date
    Nov 2011
    Posts
    8

    hero_selection.lua think() not being called [solved]

    Here's my hero_selection.lua based off the bots_example hero_selection.lua (I've also tried multiple examples from various github repositories to no avail)
    Code:
    ----------------------------------------------------------------------------------------------------
    function Think()
      print("Thinking about picking bots")
    
      if ( GetTeam() == TEAM_RADIANT )
      then
        print( "selecting radiant" );
        SelectHero( 0, "npc_dota_hero_tidehunter" );
        SelectHero( 1, "npc_dota_hero_zuus" );
        SelectHero( 2, "npc_dota_hero_enigma" );
        SelectHero( 3, "npc_dota_hero_antimage" );
        SelectHero( 4, "npc_dota_hero_crystal_maiden" );
      elseif ( GetTeam() == TEAM_DIRE )
      then
        print( "selecting dire" );
        SelectHero( 5, "npc_dota_hero_drow_ranger" );
        SelectHero( 6, "npc_dota_hero_earthshaker" );
        SelectHero( 7, "npc_dota_hero_juggernaut" );
        SelectHero( 8, "npc_dota_hero_mirana" );
        SelectHero( 9, "npc_dota_hero_nevermore" );
      end
    end
    ----------------------------------------------------------------------------------------------------
    function UpdateLaneAssignments()
      print("Updating lane assignments")
    end
    Here's the result (https://i.imgur.com/gsFYpx0.png) of joining a lobby with these settings (https://i.imgur.com/ZyKMnYX.png)


    Here's the console output from running "map dota"

    Code:
    Client] CL:  Connected to 'loopback'
    [Server] SV:  Sending server info to client 'Merry (メリイ)' at loopback
    [Server] SV:  WriteInitialSpawnGroups sending 1 groups
    [Client] Game: "Dota 2"
    [Client] Map: "dota"
    [Client] Players: 1 (0 bots) / 64 humans
    [Client] Build: 7447 (revision 3939031)
    [Client] Server Number: 8
    [SignonState] CL:  CNetworkGameClient::ProcessServerInfo
    Initializing script VM...
    ...done
    C:Gamerules: entering state 'DOTA_GAMERULES_STATE_INIT'
    [Client] CDOTA_Hud_Main::EventGameRulesStateChanged DOTA_GAMERULES_STATE_INIT
    [Client] CDOTA_Hud_Main::DeleteGameEndScreen deleted GameEndContainer
    [Client] CL:  CGameRulesGameSystem::GameInit installed game rules
    ReadSteamRemoteStorageFile( bufOut, "voice_ban.dt" ) -> 0.000364 seconds
    [Server] SV:  Connection to Steam servers successful.
    [SchemaSystemUtils] WARNING: Schema upconversion occuring for large data (16kb): models/props_structures/secretshop_radiant002_flag.vphys
    [Client] CL:  CGameClientConnectPrerequisite connection succeeded
    ChangeGameUIState: DOTA_GAME_UI_STATE_LOADING_SCREEN -> DOTA_GAME_UI_DOTA_INGAME
    [Server] SV:  IGameSystem::LoopActivateAllSystems
    [Host] HO:  IGameSystem::LoopActivateAllSystems
    [Server] SV:  64 player server started
    [Client] CL:  IGameSystem::LoopActivateAllSystems
    ReadSteamRemoteStorageFile( bufOut, "scripts/control_groups.txt" ) -> 0.000416 seconds
    [HostStateManager] Loading (dota)
    [SignonState] CL:  CNetworkGameClient::OnSwitchLoopModeFinished( game : success )
    S:Gamerules: entering state 'DOTA_GAMERULES_STATE_CUSTOM_GAME_SETUP'
    S:Gamerules: entering state 'DOTA_GAMERULES_STATE_HERO_SELECTION'
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [Server] SV:  VAC secure mode is activated.
    [Server] SV:  "redacted" STEAM USERID validated
    [Server] SV:  Sending full update to client Merry (メリイ) (reason:  initial update)
    [Client] CL:  Receiving uncompressed update from server
    Disabling damage on breakable prop models/props_structures/secretshop_radiant002_flag.vmdl - no physics interactions on model and no breakpieces.
    Disabling damage on breakable prop models/props_structures/secretshop_radiant002_flag.vmdl - no physics interactions on model and no breakpieces.
    Disabling damage on breakable prop models/props_structures/secretshop_radiant002_flag.vmdl - no physics interactions on model and no breakpieces.
    Disabling damage on breakable prop models/props_structures/secretshop_radiant002_flag.vmdl - no physics interactions on model and no breakpieces.
    [Client] CL:  Signon traffic "client":  incoming 91.798 KB [12 pkts], outgoing 1.373 KB [11 pkts]
    C:Gamerules: entering state 'DOTA_GAMERULES_STATE_HERO_SELECTION'
    [Client] LoadingDisplay changed from LOADING to NONE (map="dota")
    [Client] CDOTA_Hud_Main::EventGameRulesStateChanged DOTA_GAMERULES_STATE_HERO_SELECTION
    [Panorama] DispatchAsyncEvent backlog, failed to dispatch all this frame. Queue depth: 388 (3441 input number was)
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [GCClient] Received server welcome from GC.
    GC Connection established for server version 2059
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [WorldRenderer] Long grass load frame: 10.008515 ms for 641 grass tiles
    [WorldRenderer] CWorldRendererMgr::ServiceWorldRequests long frame: 10.044109ms
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [WorldRenderer] Long grass load frame: 10.009130 ms for 439 grass tiles
    [WorldRenderer] CWorldRendererMgr::ServiceWorldRequests long frame: 12.815421ms
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [WorldRenderer] Long grass load frame: 10.009191 ms for 966 grass tiles
    [WorldRenderer] CWorldRendererMgr::ServiceWorldRequests long frame: 10.041849ms
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    Encountered entity that cannot be used in portrait maps - info_player_start_dota
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    [VScript] Updating lane assignments
    ...
    (couldn't screenshot because of the spam)

    I've asked in discord but that no one else is experiencing it is making me wonder if I'm just doing something wrong or something could be wrong with my installation (although it seems like a damn strange symptom) perhaps?

    I'm using the workaround dota_bot_force_pick console command for now.
    Last edited by skipgamer; 05-03-2017 at 04:39 PM. Reason: All sorted

  2. #2
    Basic Member
    Join Date
    Dec 2016
    Posts
    120
    I cant download your images.

    but as i see, UpdateLane... should return hero's lineup. here is not

  3. #3
    Basic Member
    Join Date
    Nov 2011
    Posts
    8
    Quote Originally Posted by SIKIM View Post
    I cant download your images.

    but as i see, UpdateLane... should return hero's lineup. here is not
    The images are just imgur links, not sure why you can't access imgur, would appreciate someone else letting me know if that's a problem though.

    As for UpdateLane not returning anything, it's just there for testing purposes to show that the code's compiling(you know what I mean) and it's being called during the pick phase while think isn't.

  4. #4
    Basic Member
    Join Date
    May 2014
    Posts
    227
    Change your server location to "Local Host" instead of "Australia" and see if it works. But it's strange, because the "Update Lane Assignment" is printed in the console. Here is my hero selection result using your code
    20170503145400_1.jpg20170503145347_1.jpg
    Last edited by arz_on4dt; 05-03-2017 at 12:59 AM.

  5. #5
    Basic Member
    Join Date
    Nov 2011
    Posts
    8

    Lightbulb

    Quote Originally Posted by arz_on4dt View Post
    Change your server location to "Local Host" instead of "Australia" and see if it works. But it's strange, because the "Update Lane Assignment" is printed in the console. Here is my hero selection result using your code
    20170503145400_1.jpg20170503145347_1.jpg
    That'll do it, stupid oversight on my part. Thank you! I'll report back if it won't work but 99% sure it will.

Posting Permissions

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