dota2ai吧 关注:2,082贴子:31,191

回复:dota2 bot api更新

只看楼主收藏回复

6月20日更新
添加了dota_bot_long_frame_limit convar,用于指定控制台中要报告的函数运行时间过长的毫秒阈值。 默认为2.0 ms。
添加了GetAnimActivity()全局脚本功能。 返回动画索引。
添加了GetAnimCycle()全局脚本功能。 返回当前动画的值(0.0 - 1.0)。
为常见的动画活动添加了许多常量。 (参见维基列表)
修复了在专用服务器上运行的脚本如果包含空目录无法正确安装的问题。


IP属地:浙江63楼2017-07-15 11:01
回复
    6月8日更新
    添加了全局GetItemComponents(sItemName)函数 - 返回用于合成物品配件的表。
    添加了单位范围的GetTalent(nTier,nSide)函数 - 返回一个天赋的句柄。
    添加了单位范围的GetBaseHealthRegen(),GetBaseManaRegen(),GetHealthRegenPerStr()和GetManaRegenPerInt()函数。
    添加了单位范围的GetAttackProjectileSpeed()函数。
    添加了单位范围的IsMinion()函数。
    由于新地图布局,修复中立阵营被错误地分配给天辉/夜魇的两侧。
    已删除GetNeutralSpawner()中的“name”字段。
    在GetNeutralSpawners()中添加了“team”字段。
    添加一个“type”字段(small/medium/large/ancient)到GetNeutralSpawners()。
    添加了一个“speed”字段(normal/fast/slow)到GetNeutralSpawners()。
    向GetNeutralSpawners()添加了“min”和“max”边界。
    修复信使的指令总是进入队列,这个问题导致了信使在运送物品时永远不能使用速度爆发。
    修复PointToLineDistance()以实际返回一个表。
    此外,以下机器人现在可以在专用服务器上运行:
    Ranked Matchmaking AI by:adamqqq
    Nostrademous - Full Bot Overwrite
    BOT EXPERIMENT Credit:FURIOUSPUPPY
    PubSimulator
    这只是初步列表,以确保专用服务器一切正常,我们将添加更多正常工作的脚本。


    IP属地:浙江64楼2017-07-15 11:09
    回复
      请问楼主,为什么用Ranked Matchmaking AI 这个脚本的AI,电脑英雄中有几个不买装备?


      IP属地:福建65楼2017-07-18 13:34
      收起回复
        7月20日今天为大家带来的更新是 机器人脚本互相之间进入匹配对抗赛啦!每个脚本都在实时匹配对抗,并根据输赢获得一定的匹配分(MMR),以下是官方原文:
        dota_spectator_auto_spectate_bot_games
        If you set this to 1, it'll automatically spectate a game that is a random bot script vs another one. We're tracking MMR internally, but haven't surfaced anything official in the UI yet.
        大意是:只要你调出控制台打指令 dota_spectator_auto_spectate_bot_games 1 就可以自动进入机器人脚本互相匹配对抗(指令打后大概等几秒就可以了,指令后面的1是开启,0是关闭)。官方目前正在内部模拟脚本比赛并追踪MMR,目前客户端前台还没有UI界面展示。所以目前任何玩家想要观战就可以按上述操作打指令。


        IP属地:广东66楼2017-07-20 15:00
        回复
          July 25 Bot Update
          Fixed TP locations not being set in the CastAbility callback.
          Added unit-scoped IsCourier() function.
          Added GetModifierSourceAbility( nModifier ) function that returns a handle to the ability responsible for the specified modifier.
          Added InstallCourierDeathCallback -- takes a function with one parameter (a table containing unit (handle to the courier unit) and team (the team number of the courier))
          Added InstallRoshanDeathCallback -- takes a function with no parameters


          IP属地:广东来自手机贴吧67楼2017-07-28 12:20
          回复
            July 26 Bot Update
            Fixed bot selection dialog to actually sort by upvotes when Upvotes is selected.
            Added more debug info to all the validation that is displayed if you run with -dev. (unit name and location)
            Added global CreateRemoteHTTPRequest() for doing requests to non-localhost web servers (it will prepend http:// to your string)
            Fixed two neutral camps that were incorrectly reporting which side of the river they were on.


            IP属地:广东来自手机贴吧68楼2017-07-28 12:21
            回复
              7月25日更新
              修复TP位置未在CastAbility()回调中被设置。
              添加了单位函数IsCourier()。
              添加了GetModifierSourceAbility(nModifier)函数,该函数将返回特定增益状态的源技能句柄。
              添加了InstallCourierDeathCallback() - 接收有一个参数(包含单位的表(信使单位的句柄)和团队(信使所有者队伍的常量))的函数
              添加了InstallRoshanDeathCallback()函数 - 接收一个没有参数的函数


              IP属地:浙江69楼2017-07-29 22:22
              回复
                7月26日更新
                修复选择机器人脚本的对话框在按投票排序时能正确排序。
                为使用-dev运行时显示的所有验证添加了更多调试信息。 (单位名称和位置)
                添加了全局CreateRemoteHTTPRequest()函数来对非本地主机Web服务器进行请求(它将在您的字符串中添加http://)
                修复了两个不正确地报告处于河流哪一侧的中立野怪营地。


                IP属地:浙江70楼2017-07-29 22:25
                回复
                  电脑只参团守塔不进攻,这个问题一定要修改,不然真的不好玩。电脑智商低总比当摆设好一些。


                  IP属地:河南71楼2017-08-06 00:33
                  回复
                    美国时间8月24号久违的机器人更新 August 24 Bot UpdateBot Pathing:
                    Added Action_MoveDirectly to move to a location while bypassing the bot pathfinder (uses normal pathfinding).
                    Added GeneratePath( vStart, vEnd, tAvoidanceZones, funcCompletion ) to the global bot script API. It takes a start location, and end location, a table with an array of packed avoidance zones (3-vectors of x, y, and radius), and a function to call when the pathfind completes. The specified function should two parameters: the overall length of the path and a table containing waypoints along the path. If the pathfind fails, it will call the function with an empty waypoint table.
                    Added AddAvoidanceZone( vLocationAndRadius ) and RemoveAvoidanceZone( iZone ) to the global bot script API. AddAvoidanceZone adds a packed avoidance zone (3-vector of x, y, radius) that GeneratePath() will not path through. It returns an index to the newly-created avoidance zone. Avoidance zones can be removed by calling RemoveAvoidanceZone with that index.
                    Added Action_MovePath( tWaypoints ) to the bot script API. It takes the waypoint table returned from GeneratePath() and paths a bot along it.
                    Added the queue and push variants of the above Action_ functions.
                    Bot State Dumping:
                    Servers can now be run with a -botworldstatetosocket <port> parameter. This will cause the server to generate a protobuf containing the full bot-visible worldstate to that team, and send it as binary array (SerializeToArray) to the specified localhost socket. Each of these data blocks is prefaced by 32-bit integer containing size of the block.
                    This is intended for doing offline or external analysis of running games. The protobuf it generates is attached to this post.


                    IP属地:广东72楼2017-08-26 13:25
                    收起回复
                      上一层楼8月24号更新日志还有一个txt 附件,这是全部原文贴上来仅供欣赏:
                      message CMsgBotWorldState
                      {
                      enum UnitType
                      {
                      INVALID = 0;
                      HERO = 1;
                      CREEP_HERO = 2; // creep that should be considered a hero for targeting, etc
                      LANE_CREEP = 3;
                      JUNGLE_CREEP = 4;
                      ROSHAN = 5;
                      TOWER = 6;
                      BARRACKS = 7;
                      SHRINE = 8;
                      FORT = 9; // the ancient
                      BUILDING = 10; // building that is not a tower/barracks/shrine/etc
                      COURIER = 11;
                      WARD = 12;
                      };
                      message Vector
                      {
                      required int32 x = 1;
                      required int32 y = 2;
                      required int32 z = 3;
                      };
                      message Player
                      {
                      optional uint32 player_id = 1;
                      optional uint32 hero_id = 2;
                      optional bool is_alive = 3;
                      optional float respawn_time = 4;
                      optional uint32 kills = 5;
                      optional uint32 deaths = 6;
                      optional uint32 assists = 7;
                      };
                      message Ability
                      {
                      optional uint32 handle = 1;
                      optional uint32 ability_id = 2;
                      optional uint32 slot = 3;
                      optional uint32 caster_handle = 5;
                      optional uint32 level = 6;
                      optional uint32 cast_range = 10;
                      optional float channel_time = 11;
                      optional float cooldown_remaining = 12;
                      optional bool is_activated = 20;
                      optional bool is_toggled = 21;
                      optional bool is_in_ability_phase = 22;
                      optional bool is_channeling = 23;
                      optional bool is_stolen = 24;
                      // ITEMS ONLY
                      optional uint32 charges = 30;
                      optional uint32 secondary_charges = 31;
                      optional bool is_combined_locked = 40;
                      optional uint32 power_treads_stat = 50;
                      };
                      message DroppedItem
                      {
                      optional uint32 item_id = 1;
                      optional Vector location = 2;
                      };
                      message RuneInfo
                      {
                      optional uint32 type = 1;
                      optional Vector location = 2;
                      optional uint32 status = 3;
                      optional float time_since_seen = 4;
                      };
                      message TeleportInfo
                      {
                      optional uint32 player_id = 1;
                      optional Vector location = 2;
                      optional float time_remaning = 3;
                      };
                      message Modifier
                      {
                      optional string name = 1;
                      optional uint32 stack_count = 2;
                      optional float remaining_duration = 3;
                      repeated uint32 auxiliary_units_handles = 4;
                      }
                      message LinearProjectile
                      {
                      optional uint32 handle = 1;
                      optional uint32 caster_handle = 2;
                      optional uint32 caster_player_id = 3;
                      optional uint32 ability_handle = 4;
                      optional Vector location = 5;
                      optional uint32 velocity = 6;
                      optional uint32 radius = 7;
                      };
                      message TrackingProjectile
                      {
                      optional uint32 caster_handle = 1;
                      optional uint32 caster_player_id = 2;
                      optional uint32 ability_handle = 3;
                      optional Vector location = 4;
                      optional uint32 velocity = 5;
                      optional bool is_dodgeable = 6;
                      optional bool is_attack = 7;
                      };
                      message EventAbility
                      {
                      optional uint32 ability_id = 1;
                      optional uint32 player_id = 2;
                      optional uint32 unit_handle = 3;
                      optional Vector location = 4;
                      optional bool is_channel_start = 5;
                      };
                      message EventDamage
                      {
                      optional uint32 damage = 1;
                      optional uint32 victim_player_id = 2;
                      optional uint32 victim_unit_handle = 3;
                      optional uint32 attacker_player_id = 4;
                      optional uint32 attacker_unit_handle = 5;
                      optional uint32 ability_id = 6;
                      };
                      message EventCourierKilled
                      {
                      optional uint32 team_id = 1;
                      optional uint32 courier_unit_handle = 2;
                      optional uint32 killer_player_id = 3;
                      optional uint32 killer_unit_handle = 4;
                      };


                      IP属地:广东73楼2017-08-26 13:28
                      收起回复
                        这是上上层楼8月24号更新日志的 txt 附件,由于原文较长,分为两楼描述,这是原文剩余部分:
                        message EventRoshanKilled
                        {
                        optional uint32 killer_player_id = 1;
                        optional uint32 killer_unit_handle = 2;
                        }
                        message EventTree
                        {
                        optional uint32 tree_id = 1;
                        optional bool destroyed = 2;
                        optional bool respawned = 3;
                        optional Vector location = 4;
                        };
                        message Unit
                        {
                        // FOR ALL UNITS
                        optional uint32 handle = 1;
                        optional UnitType unit_type = 2;
                        optional string name = 3;
                        optional uint32 team_id = 4;
                        optional uint32 level = 5;
                        optional Vector location = 6;
                        optional bool is_alive = 7;
                        optional uint32 bounding_radius = 10;
                        optional uint32 facing = 11;
                        optional uint32 ground_height = 12;
                        optional uint32 vision_range_daytime = 15;
                        optional uint32 vision_range_nighttime = 16;
                        optional uint32 health = 20;
                        optional uint32 health_max = 21;
                        optional float health_regen = 22;
                        optional uint32 mana = 25;
                        optional uint32 mana_max = 26;
                        optional float mana_regen = 27;
                        optional uint32 base_movement_speed = 30;
                        optional uint32 current_movement_speed = 31;
                        optional int32 anim_activity = 35;
                        optional float anim_cycle = 36;
                        optional uint32 base_damage = 40;
                        optional uint32 base_damage_variance = 41;
                        optional uint32 bonus_damage = 42;
                        optional uint32 attack_damage = 43;
                        optional uint32 attack_range = 44;
                        optional uint32 attack_speed = 45;
                        optional float attack_anim_point = 46;
                        optional uint32 attack_acquisition_range = 47;
                        optional uint32 attack_projectile_speed = 48;
                        optional uint32 attack_target_handle = 49;
                        optional uint32 bounty_xp = 60;
                        optional uint32 bounty_gold_min = 61;
                        optional uint32 bounty_gold_max = 62;
                        optional bool is_channeling = 65;
                        optional uint32 active_ability_handle = 66;
                        optional bool is_attack_immune = 70;
                        optional bool is_blind = 71;
                        optional bool is_block_disabled = 72;
                        optional bool is_disarmed = 73;
                        optional bool is_dominated = 74;
                        optional bool is_evade_disabled = 75;
                        optional bool is_hexed = 76;
                        optional bool is_invisible = 77;
                        optional bool is_invulnerable = 78;
                        optional bool is_magic_immune = 79;
                        optional bool is_muted = 80;
                        optional bool is_nightmared = 82;
                        optional bool is_rooted = 83;
                        optional bool is_silenced = 84;
                        optional bool is_specially_deniable = 85;
                        optional bool is_stunned = 86;
                        optional bool is_unable_to_miss = 87;
                        optional bool has_scepter = 88;
                        repeated Ability abilities = 90;
                        repeated Ability items = 91;
                        repeated Modifier modifiers = 92;
                        repeated TrackingProjectile incoming_tracking_projectiles = 93;
                        // FOR BOTS
                        optional uint32 action_type = 100;
                        optional uint32 ability_target_handle = 101;
                        // FOR HEROES
                        optional uint32 primary_attribute = 110;
                        optional bool is_illusion = 111;
                        optional uint32 respawn_time = 112;
                        optional uint32 buyback_cost = 113;
                        optional uint32 buyback_cooldown = 114;
                        optional float spell_amplifiction = 115;
                        optional uint32 armor = 116;
                        optional uint32 magic_resist = 117;
                        optional float evasion = 118;
                        optional uint32 xp_needed_to_level = 120;
                        optional uint32 ability_points = 121;
                        optional uint32 gold = 122;
                        optional uint32 last_hits = 123;
                        optional uint32 denies = 124;
                        // FOR CREEPS
                        optional float remaining_lifespan = 130;
                        // FOR COURIERS
                        optional bool flying_courier = 140;
                        // FOR SHRINES
                        optional float shrine_cooldown = 150;
                        optional bool is_shrine_healing = 151;
                        };
                        optional uint32 team_id = 1;
                        optional uint32 game_time = 2;
                        optional uint32 game_state = 3;
                        optional uint32 hero_pick_state = 4;
                        optional float time_of_day = 5;
                        optional float glyph_cooldown = 6;
                        optional uint32 glyph_cooldown_enemy = 7;
                        repeated Player players = 10;
                        repeated Unit units = 11;
                        repeated DroppedItem dropped_items = 12;
                        repeated RuneInfo rune_infos = 13;
                        repeated TeleportInfo incoming_teleports = 14;
                        repeated EventAbility ability_events = 20;
                        repeated EventDamage damage_events = 21;
                        repeated EventCourierKilled courier_killed_events = 22;
                        repeated EventRoshanKilled roshan_killed_events = 23;
                        repeated EventTree tree_events = 24;
                        };


                        IP属地:广东74楼2017-08-26 13:30
                        回复
                          美国时间8月25号更新:
                          August 25 Bot Update
                          Split botworldstatetosocket into botworldstatetosocket_radiant and botworldstatetosocket_dire for sending different teams to different ports.
                          Added botworldstatetosocket_frames command-line switch to only send world state updates every N frames.
                          Fixed a bunch of memory leaks in bot script APIs.
                          Tree events in the worldstate are now delayed if your team can't see them, and when you can see the change it will have delayed (a new EventTree field in the protobuf) set to true.
                          Made some optimizations to the bot code.


                          IP属地:广东75楼2017-08-29 15:54
                          回复
                            美国时间8月30号更新,这次主要是bug修复:
                            August 30 Bot Update
                            Fixed bug that was causing default bots to not know who was near them.
                            Fixed -botworldstatetosocket_radiant and -botworldstatetosocket_dire not sending UDP data to their port properly.


                            IP属地:广东76楼2017-08-31 13:57
                            回复
                              美国时间9月18号的小更新:
                              September 18 Bot Update
                              Couple small bot state dump fixes:
                              dota_time in CMsgBotWorldState is now a float rather than a uint
                              Changed CMsgBotWorldState socket sending from UDP to TCP. (this one actually shipped last week but I didn't post anything about it then)


                              IP属地:广东78楼2017-09-19 07:48
                              回复