CDOTAGamerules 
s
c
#
AddBotPlayerWithEntityScript(heroNamestring, playerNamestring, teamDOTATeam_t, entityScriptstring): CDOTA_BaseNPC_Hero | nil
s
c
#

  • entityScript - Path to a script file executed in the context of spawned hero entity.
  • Spawn a bot player of the passed hero name, player name, and team.
    AddEventMetadataLeaderboardEntry(arg1string, arg2uint, arg3uint, arg4uint, arg5uint, arg6uint, arg7uint, arg8uint, arg9uint): bool
    s
    c
    #

    Event-only.
    AddItemToWhiteList(itemNamestring): nil
    s
    c
    #

    Add an item to the whitelist.
    AddMinimapDebugPoint(arg1int, arg2Vector, arg3int, arg4int, arg5int, arg6int, arg7float): nil
    s
    c
    #

    Add a point on the minimap.
    AddMinimapDebugPointForTeam(arg1int, arg2Vector, arg3int, arg4int, arg5int, arg6int, arg7float, arg8int): nil
    s
    c
    #

    Add a point on the minimap for a specific team.
    BeginNightstalkerNight(durationfloat): nil
    s
    c
    #

    Begin night stalker night.
    BeginTemporaryNight(durationfloat): nil
    s
    c
    #

    Begin temporary night.
    BotPopulate(): nil
    s
    c
    #

    Fills all the teams with bots if cheat mode is enabled.
    Defeated(): nil
    s
    c
    #

    Kills the ancient, etc.
    DidMatchSignoutTimeOut(): bool
    s
    c
    #

    True when we have waited some time after end of the game and not received signout.
    EnableCustomGameSetupAutoLaunch(enabledbool): nil
    s
    c
    #

    Enabled (true) or disable (false) auto launch for custom game setup.
    FinishCustomGameSetup(): nil
    s
    c
    #

    Indicate that the custom game setup phase is complete, and advance to the game.
    ForceCreepSpawn(): nil
    s
    c
    #

    Spawn the next wave of creeps.
    ForceGameStart(): nil
    s
    c
    #

    Transition game state to DOTA_GAMERULES_STATE_GAME_IN_PROGRESS.
    GetCustomGameDifficulty(): int
    s
    c
    #

    Returns the difficulty level of the custom game mode.
    GetCustomGameTeamMaxPlayers(teamDOTATeam_t): int
    s
    c
    #

    Get whether a team is selectable during game setup.
    GetDifficulty(): int
    s
    c
    #

    Returns difficulty level of the custom game mode.
    GetDOTATime(includePreGamebool, includeNegativeTimebool): float
    s
    c
    #

    Returns the actual DOTA in-game clock time.
    GetDroppedItem(indexint): CDOTA_Item_Physical | nil
    s
    c
    #

    Gets the Xth dropped item.
    GetGameFrameTime(): float
    s
    c
    #

    Returns the number of seconds elapsed since the last frame was renderered. This time doesn't count up when the game is paused.
    GetGameModeEntity(): CDOTABaseGameMode
    s
    c
    #

    Get the game mode entity.
    GetGameSessionConfigValue(arg1string, arg2string): string
    s
    c
    #

    Get a string value from the game session config (map options).
    GetGameTime(): float
    s
    c
    #

    Returns the number of seconds elapsed since map start. This time doesn't count up when the game is paused.
    GetMatchID(): Uint64
    s
    c
    #

    Get the MatchID for this game.
    GetMatchSignoutComplete(): bool
    s
    c
    #

    Have we received the post match signout message that includes reward information.
    GetNianTotalDamageTaken(): int
    s
    c
    #

    For New Bloom, get total damage taken by the Nian / Year Beast.
    GetPlayerCustomGameAccountRecord(playerIdPlayerID): table
    s
    c
    #

    Gets the player's custom game account record, as it looked at the start of this session.
    GetStateTransitionTime(): float
    s
    c
    #

    Get time remaining between state changes.
    GetTimeOfDay(): float
    s
    c
    #

    Get the time of day.
    GetWeatherWindDirection(): Vector
    s
    c
    #

    Get Weather Wind Direction Vector.
    IsCheatMode(): bool
    s
    c
    #

    Are cheats enabled on the server.
    IsDaytime(): bool
    s
    c
    #

    Is it day time?
    IsGamePaused(): bool
    s
    c
    #

    Returns whether the game is paused.
    IsHeroRespawnEnabled(): bool
    s
    c
    #

    Returns whether hero respawn is enabled.
    IsInBanPhase(): bool
    s
    c
    #

    Are we in the ban phase of hero pick?
    IsItemInWhiteList(itemNamestring): bool
    s
    c
    #

    Query an item in the whitelist.
    IsNightstalkerNight(): bool
    s
    c
    #

    Is it night stalker night-time?
    IsTemporaryNight(): bool
    s
    c
    #

    Is it temporarily night-time?
    LockCustomGameSetupTeamAssignment(lockedbool): nil
    s
    c
    #

    Lock (true) or unlock (false) team assignemnt. If team assignment is locked players cannot change teams.
    MakeTeamLose(teamDOTATeam_t): nil
    s
    c
    #

    Makes the specified team lose.
    NumDroppedItems(): int
    s
    c
    #

    Returns the number of items currently dropped on the ground.
    PlayerHasCustomGameHostPrivileges(playerCDOTAPlayer): bool
    s
    c
    #

    Whether a player has custom game host privileges (shuffle teams, etc.).
    Playtesting_UpdateAddOnKeyValues(): nil
    s
    c
    #

    Updates custom hero, unit and ability KeyValues in memory with the latest values from disk.
    PrepareSpawners(arg1float): nil
    s
    c
    #

    Prepare Dota lane style spawners with a given interval.
    RemoveItemFromWhiteList(itemNamestring): nil
    s
    c
    #

    Remove an item from the whitelist.
    ResetDefeated(): nil
    s
    c
    #

    Restart after killing the ancient, etc.
    ResetGameTime(): nil
    s
    c
    #

    Restart gametime from 0.
    ResetToCustomGameSetup(): nil
    s
    c
    #

    Restart at custom game setup.
    ResetToHeroSelection(): nil
    s
    c
    #

    Restart the game at hero selection.
    SendCustomMessage(arg1string, arg2int, arg3int): nil
    s
    c
    #

    Sends a message on behalf of a player.
    SendCustomMessageToTeam(arg1string, arg2int, arg3int, arg4int): nil
    s
    c
    #

    Sends a message on behalf of a player to the specified team.
    SetCreepMinimapIconScale(scalefloat): nil
    s
    c
    #

    Scale the creep icons on the minimap.
    SetCreepSpawningEnabled(arg1bool): nil
    s
    c
    #

    Sets whether the regular Dota creeps spawn.
    SetCustomGameAccountRecordSaveFunction(arg1handle, arg2handle): nil
    s
    c
    #

    Sets a callback to handle saving custom game account records (callback is passed a Player ID and should return a flat simple table).
    SetCustomGameAllowBattleMusic(allowbool): nil
    s
    c
    #

    Sets a flag to enable/disable the default music handling code for custom games.
    SetCustomGameAllowHeroPickMusic(allowbool): nil
    s
    c
    #

    Sets a flag to enable/disable the default music handling code for custom games.
    SetCustomGameAllowMusicAtGameStart(allowbool): nil
    s
    c
    #

    Sets a flag to enable/disable the default music handling code for custom games.
    SetCustomGameDifficulty(difficultyint): nil
    s
    c
    #

    Set the difficulty level of the custom game mode.
    SetCustomGameEndDelay(delayfloat): nil
    s
    c
    #

    Sets the game end delay.
    SetCustomGameSetupAutoLaunchDelay(delayfloat): nil
    s
    c
    #

    Set the amount of time to wait for auto launch.
    SetCustomGameSetupRemainingTime(remainingTimefloat): nil
    s
    c
    #

    Set the amount of remaining time, in seconds, for custom game setup. 0 = finish immediately, -1 = wait forever.
    SetCustomGameSetupTimeout(timeoutfloat): nil
    s
    c
    #

    Setup (pre-gameplay) phase timeout. 0 = instant, -1 = forever (until FinishCustomGameSetup is called).
    SetCustomGameTeamMaxPlayers(teamDOTATeam_t, maxPlayersint): nil
    s
    c
    #

    Set whether a team is selectable during game setup.
    SetCustomVictoryMessage(messagestring): nil
    s
    c
    #

    Sets the victory message.
    SetCustomVictoryMessageDuration(durationfloat): nil
    s
    c
    #

    Sets the victory message duration.
    SetEventMetadataCustomTable(metadataTablehandle): bool
    s
    c
    #

    Event-only.
    SetEventSignoutCustomTable(metadataTablehandle): bool
    s
    c
    #

    Event-only.
    SetFirstBloodActive(activebool): nil
    s
    c
    #

    Sets whether First Blood has been triggered.
    SetGameWinner(teamDOTATeam_t): nil
    s
    c
    #

    Makes the specified team win.
    SetGoldPerTick(amountint): nil
    s
    c
    #

    Set the auto gold increase per timed interval.
    SetGoldTickTime(timefloat): nil
    s
    c
    #

    Set the time interval between auto gold increases.
    SetHeroMinimapIconScale(scalefloat): nil
    s
    c
    #

    Scale the hero minimap icons on the minimap.
    SetHeroRespawnEnabled(enabledbool): nil
    s
    c
    #

    Control if the normal DOTA hero respawn rules apply.
    SetHeroSelectionTime(selectionTimefloat): nil
    s
    c
    #

    Sets the amount of time players have to pick their hero.
    SetHeroSelectPenaltyTime(arg1float): nil
    s
    c
    #

    Sets amount of penalty time before randoming a hero.
    SetHideKillMessageHeaders(hideHeadersbool): nil
    s
    c
    #

    Sets whether the multikill, streak, and first-blood banners appear at the top of the screen.
    SetOverlayHealthBarUnit(unitCDOTA_BaseNPC, styleint): nil
    s
    c
    #

    Show this unit's health on the overlay health bar.
    SetPostGameTime(timefloat): nil
    s
    c
    #

    Sets the amount of time players have between the game ending and the server disconnecting them.
    SetPreGameTime(timefloat): nil
    s
    c
    #

    Sets the amount of time players have between picking their hero and game start.
    SetRuneMinimapIconScale(minimapRuneIconScalefloat): nil
    s
    c
    #

    Scale the rune icons on the minimap.
    SetRuneSpawnTime(timefloat): nil
    s
    c
    #

    Sets the amount of time between rune spawns.
    SetSafeToLeave(safeToLeavebool): nil
    s
    c
    #

    Mark this game as safe to leave.
    SetSameHeroSelectionEnabled(enabledbool): nil
    s
    c
    #

    When true, players can repeatedly pick the same hero.
    SetShowcaseTime(timefloat): nil
    s
    c
    #

    Sets the amount of time players have between the strategy phase and entering the pre-game phase.
    SetStartingGold(amountint): nil
    s
    c
    #

    Set the starting gold amount.
    SetStrategyTime(timefloat): nil
    s
    c
    #

    Sets the amount of time players have between the hero selection and entering the showcase phase.
    SetTimeOfDay(timefloat): nil
    s
    c
    #

    Set the time of day.
    SetTreeRegrowTime(timefloat): nil
    s
    c
    #

    Sets the tree regrow time in seconds.
    SetUseBaseGoldBountyOnHeroes(useBaseGoldBountiesbool): nil
    s
    c
    #

    Heroes will use the basic NPC functionality for determining their bounty, rather than DOTA specific formulas.
    SetUseCustomHeroXPValues(useCustomXPValuesbool): nil
    s
    c
    #

    Allows heroes in the map to give a specific amount of XP (this value must be set).
    SetUseUniversalShopMode(useUniversalShopModebool): nil
    s
    c
    #

    When true, all items are available at as long as any shop is in range.
    SetWeatherWindDirection(arg1Vector): nil
    s
    c
    #

    Set Weather Wind Direction Vector.
    SetWhiteListEnabled(whiteListEnabledbool): nil
    s
    c
    #

    Item whitelist functionality enable/disable.
    SpawnAndReleaseCreeps(): nil
    s
    c
    #

    Spawn and release the next creep wave from Dota lane style spawners.
    State_Get(): DOTA_GameState
    s
    c
    #

    Get the current Gamerules state.