dota2 bot api更新
dota2ai吧
全部回复
仅看楼主
level 8
adamqqq 楼主
12月20日Bot API更新
- 从VPKs中移出npc_units.txt,npc_abilities.txt和npc_heroes.txt,所以更容易获取单位/英雄/能力/增益状态/参数的名称。
- 修正了Action_LevelAbility()能够升级技能超出其最大等级的错误。
- 为Action_PurchaseItem()添加了一个返回值。
- 增加Action_CourierDeliver()。
通知一个单位使用信使, 返回值bool
- 增加GetBaseMovementSpeed()和GetCurrentMovementSpeed()。
获取一个单位的基础移动速度,返回值int。
获取一个单位的当前移动速度,返回值int。
- 添加IsCourierAvailable()。
查询信使是否空闲,返回值bool。
- 修正了一个导致机器人认为非英雄单位对于他们的团队是不可见的错误(这破坏了大多数关于非英雄单位的函数的作用)。
- 修正了一个将导致GetLastSeenLocation()和GetTimeSinceLastSeen()不工作的错误。
12月21日Bot API更新
- 添加了单位函数Action_Chat(message,bAllChat)
通知单位发送聊天消息,返回值void。
- 添加了单位函数GetNearbyTrees(radius)
获取周围的树木,返回值variant。
- 添加了全局函数GetTreeLocation(treeIndex)
获取树的位置,返回值vector。
- 添加了单位函数HasModifier(name)
判断一个单位是否有特定的增益状态,返回值bool。
- 添加了单位函数NumModifiers()
获取一个单位身上增益状态的数目,返回值int。
- 添加了单位函数GetModifier(modifierIndex)
获取一个单位增益状态的名称,返回值cstring 。
- 添加了全局函数IsPlayerBot(playerID)
判断一个玩家是否为机器人,返回值bool。
- 添加了单位函数IsBot()
判断一个单位是否被机器人控制,返回值bool。
- 添加了全局函数IsTeamPlayer(playerID)
判断一个玩家是否是场上,返回值bool。
- 添加了全局函数GetTeamForPlayer(playerID)
获取一个玩家所在的队伍,返回值int 。
- 添加了全局函数GetTeamPlayers(teamNumber)
返回一个团队的所有玩家ID,返回值variant。
- 添加了单位函数GetCurrentActionType()
获取一个单位的动作类型。
- 添加了了BOT_ACTION_TYPE_ * 常量。
- 修正了导致Action_CourierDeliver()无法工作的错误。
- 修复机器人 API Action_LevelAbility()绕过升级技能的规则。(比如2级就能升级同一个技能2次)
- 所有的GetNearby *函数现在的返回值将会按照由近至远距离排序。
来源:http://dev.dota2.com/forumdisplay.php?f=497
API说明:http://docs.moddota.com/lua_bots/
2016年12月22日 05点12分 1
level 10
赞一个!很欣赏一个这样能为贴吧做贡献有热心和想法的吧友[大拇指]
2016年12月22日 06点12分 2
level 10
今天貌似官方又更新了!
增加了机器人API的功能性,快去翻译搬运过来!
2016年12月22日 06点12分 3
我们和美国隔了12小时的,文中所说的21号就是今天了
2016年12月22日 07点12分
2016年12月22日 08点12分
level 4
我在官方论坛好像见过楼主这个id
2016年12月22日 07点12分 4
[滑稽]
2016年12月22日 08点12分
说不定那个论坛全是中国人。。
2016年12月22日 08点12分
今日问题反馈:TK中路对线,不应该第一件出个瓶子么?他出鞋子反复放技能没蓝就走回家然后又走回来,中单挂机等级都比他高。我觉得第一件装备还是瓶子控符好吧。
2016年12月22日 08点12分
层主再次反馈:目前制作的火女,宙斯,TK好像都只会对线,不会干别的,我们推中了,宙斯火女还在线上补刀,然后TK站着那里也不逃跑还在补刀,被平A死了。
2016年12月22日 08点12分
level 9
[真棒]
2016年12月22日 09点12分 5
level 1
现在电脑AI恢复正常了吗?
2016年12月23日 03点12分 6
没有,官方目前7.0的正戏有太多时间要更新了,而且又要过年了,所以把机器人的脚本编辑权交给了广大玩家爱好者,把锅给了玩家么们。。
2016年12月23日 05点12分
好像今天官方特地修复更新了,看楼下我贴的信息。
2016年12月23日 05点12分
@攻心城 那到底正常了没,冰蛙又不是中国人,过个屁年
2016年12月23日 06点12分
@攻心城 玩了一会儿,好像正常了,更新的真快[吐舌]
2016年12月23日 07点12分
level 1
不知道他老是盯着这个点干嘛,不开团都舍不得走开[乖]
2016年12月23日 08点12分 8
7.0找不到回家的路,想家了。
2016年12月23日 09点12分
@攻心城 这个是卡在插眼了,他找不到新的眼位,所以卡住了
2016年12月24日 06点12分
level 8
adamqqq 楼主
12月22日Bot API更新
- 更改Action_PickUpRune()函数,现在参数将使用神符列表,而不是实体句柄。
- 修正HasBuyback()只对你的队友工作的错误。(可以判定我方和敌方能否买活)
- 从bot技能API中移除UpgradeAbility()(现在只能通过Action_LevelAbility()升级)
- 添加单位函数:
GetAbilityPoints()
- 返回未分配的技能点数
GetBaseDamage()
- 返回单位的基础攻击伤害(从最小值和最大值之间随机取出)
GetBaseDamageVariance()
- 返回单位的基础攻击伤害区间
GetAttackRange()
- 返回单位的攻击距离
GetAttackSpeed()
- 返回单位的攻击速度
GetSecondsPerAttack()
- 返回单位每秒能攻击几次(攻击速度的倒数)
GetAttackPoint()
- 返回单位的攻击前摇
- 增加了全局函数:
GetTower()
- 需要团队和塔的编号,返回塔的句柄
GetBarracks()
- 需要团队和兵营的编号,返回兵营的句柄
GetLaneFrontAmount()
- 需要团队和分路的编号,以及是否应该忽略塔,返回一个从0到1的浮点值。(经过测试,这个值与兵线的位置有关,应该是建议英雄应该处于哪个位置,等待官方说明文档更新)
GetLaneFrontLocation()
- 需要团队和分路的编号和距离当前前面的增量距离,返回一个坐标。
GetRuneSpawnLocation()
- 获取神符刷新位置,返回一个坐标。
- 增加技能函数:
GetInitialCharges()
- 获得技能或物品的初始充能
GetCurrentCharges()
- 获得技能或物品的目前充能
GetSecondaryCharges()
- 获得技能或物品相关技能的目前充能(好像没有这种技能吧?)
- 添加常量:(似乎会根据当前所处的团队自动调用对应的常量?)
TOWER_TOP_1
TOWER_TOP_2
TOWER_TOP_3
TOWER_MID_1
TOWER_MID_2
TOWER_MID_3
TOWER_BOT_1
TOWER_BOT_2
TOWER_BOT_3
TOWER_BASE_1
TOWER_BASE_2
- 塔的句柄
BARRACKS_TOP_MELEE
BARRACKS_TOP_RANGED
BARRACKS_MID_MELEE
BARRACKS_MID_RANGED
BARRACKS_BOT_MELEE
BARRACKS_BOT_RANGED
- 兵营的句柄
RUNE_POWERUP_1
RUNE_POWERUP_2
RUNE_BOUNTY_1
RUNE_BOUNTY_2
RUNE_BOUNTY_3
RUNE_BOUNTY_4
- 符的句柄
2016年12月24日 06点12分 9
充能是什么东西?类似于骨灰盒,魔棒,火枪散弹,死亡先知的吸?
2016年12月24日 08点12分
@攻心城 对 散失刀之类的
2016年12月24日 08点12分
level 10
January 12 Bot Update
Fixed sorting in the bot script selection dialog, updated the sorting options, and fixed how upvotes are counted.
Talent upgrades can now be done via Action_LevelAbility().
Added GetShrine() and GetAncient() to the global bot script API.
Added SHRINE_BASE_1, SHRINE_BASE_2, SHRINE_BASE_3, SHRINE_BASE_4, SHRINE_BASE_5, SHRINE_JUNGLE_1, and SHRINE_JUNGLE_2 constants to the bot script API.
Added GetLastAttackTime() and IsInvisible() to the unit bot script API.
Renamed GetPlayer() to GetPlayerID() for clarity.
note: IsInvisible() returns if the unit has an "invisibility-causing" modifier on them, NOT whether they're currently visible by the other team. A unit that has used shadow blade but is dusted or under truesight will still return true.
2017年01月13日 15点01分 10
level 10
January 12 Bot Update, Part II
Added GetUnitList() global bot script function for returning a list of the specified unit types.
Added UNIT_LIST_ALL, UNIT_LIST_ALLIES, UNIT_LIST_ALLIED_HEROES, UNIT_LIST_ALLIED_CREEPS, UNIT_LIST_ENEMIES, UNIT_LIST_ENEMY_HEROES, UNIT_LIST_ENEMY_CREEPS, and UNIT_LIST_NEUTRAL_CREEPS global bot script constants.
There is now a AbilityLevelUpThink() function available in the bot script API that can override the default bot leveling.
Added GetPowerTreadsStat() to the ability bot script API.
Added GetHealthRegen(), GetManaRegen(), GetSpellAmp(), GetArmor(), GetMagicResist(), and GetEvasion() to the unit bot script API.
Fixed GetPlayerID() to actually work.
Fixed GetBaseDamage() returning a bad value.
Changed GetBaseDamageVariance() to be the +/- value on damage, rather than the width of the entire range. (it's half of what it was previously)
Fixed GetBaseDamage(), GetBaseDamageVariance(), GetAttackRange(), GetAttackSpeed(), GetSecondsPerAttack(), GetAttackPoint(), and GetLastAttackTime() to work on any visible unit, rather than just teammates.
Please keep in mind performance considerations when using GetUnitList(). The function itself is reasonably fast because it will build the lists on-demand and no more than once per frame, but the lists can be long and performing logic on all units (or even all creeps) can easily get pretty slow.
2017年01月13日 15点01分 11
level 10
补上1月9号的:
January 9 Bot Update
Added fill_with_bots command-line paramater for running a bot-filled dedicated server.
Fixed typo in example lina script.
Made dota_bot_dump_state also dump to the console.
Fixed bot script functions Action_DropItem() and Action_PickUpItem() to work properly.
Added Action_SwapItems() to the bot script API. Takes two inventory slot indices and swaps their contents.
Added unit-scoped GetBoundingRadius()
Added unit-scoped GetItemSlotType() to the bot script API. Takes an inventory slot index and returns an index type (see added constants below)
Added unit-scoped WasRecentlyDamagedByTower(), TimeSinceDamagedByTower(), WasRecentlyDamagedByCreep(), and TimeSinceDamagedByCreep() to the bot script API.
Added global GetDroppedItemList() to the bot script API. Returns a table that alternates between script handles and locations of visible items that have been dropped on the ground.
Added ITEM_SLOT_TYPE_INVALID, ITEM_SLOT_TYPE_MAIN, ITEM_SLOT_TYPE_BACKPACK, and ITEM_SLOT_TYPE_STASH constants to the bot script API.
Fixed ability-scoped IsCooldownReady() and GetCooldownTimeRemaining() to only work on yourself and teammates in the bot script API.
Fixed crashes caused by scripts supplying nil to Action_MoveToUnit(), Action_AttackUnit(), Action_UseAbility(), Action_UseAbilityOnEntity(), Action_UseAbilityOnLocation(), Action_UseAbilityOnTree().
Added unit-scoped FindItemSlot() to bot script API for finding the slot containing the first instance of a named item.
2017年01月13日 16点01分 12
level 7
问一个问题为什么我用gcfscape打开vpk那个显示invalid file:mapping bounds exceed while searching for string Null teminator
2017年01月14日 04点01分 13
不知道,你在外面发个帖问问
2017年01月15日 07点01分
level 8
adamqqq 楼主
1月9日bot api更新
添加了命令行参数fill_with_bots以运行充满bot的专用服务器。
修复了lina示例脚本中的拼写错误。
现在dota_bot_dump_state也将转储到控制台。
修复了函数Action_DropItem()和Action_PickUpItem()不工作的问题。
添加了函数Action_SwapItems()。获取两个物品栏索引并交换它们。
添加了单位作用域函数GetBoundingRadius()
添加了单位作用域函数GetItemSlotType()。获取物品索引并返回索引类型(请参阅下面添加的常量)
添加了单元作用域函数WasRecentlyDamagedByTower(),TimeSinceDamagedByTower(),WasRecentlyDamagedByCreep()和TimeSinceDamagedByCreep()。
添加了全局函数GetDroppedItemList()。返回在脚本句柄和已放置在地面上的可见项目的位置之间交替的表。
添加了常量ITEM_SLOT_TYPE_INVALID,ITEM_SLOT_TYPE_MAIN,ITEM_SLOT_TYPE_BACKPACK和ITEM_SLOT_TYPE_STASH。
-不存在,主物品栏,背包,贮藏处。
修复了函数IsCooldownReady()和GetCooldownTimeRemaining()只能为自己和队友工作的问题。
修复了向一下函数提供nil参数引起的崩溃。Action_MoveToUnit(),Action_AttackUnit(),Action_UseAbility(),Action_UseAbilityOnEntity(),Action_UseAbilityOnLocation(),Action_UseAbilityOnTree()
添加单位作用域函数FindItemSlot(),通过物品名查找其在物品栏中的第一个位置。
2017年01月14日 11点01分 14
level 8
adamqqq 楼主
1月12日bot更新
更新游戏中选择自定义ai的对话框,添加了排序选项,并修复了投票的问题。
天赋树升级现在可以通过Action_LevelAbility()完成。
添加了全局函数GetShrine()和GetAncient()。
-获取小泉水和遗迹的句柄
将SHRINE_BASE_1,SHRINE_BASE_2,SHRINE_BASE_3,SHRINE_BASE_4,SHRINE_BASE_5,SHRINE_JUNGLE_1和SHRINE_JUNGLE_2常数添加到bot脚本API。
添加了单位函数GetLastAttackTime()和IsInvisible()。
为了清楚起见,将GetPlayer()重命名为GetPlayerID()。
注意:IsInvisible()的返回值只考虑单位是否处于隐形状态,而不是它是否对某个团队可见。使用隐刀但是被显隐之尘显形或处在真视领域下的单位仍将返回true。
2017年01月14日 11点01分 15
level 8
adamqqq 楼主
1月12日Bot更新,第二部分
添加了全局脚本函数GetUnitList(),用于返回指定单位类型的列表。
添加了全局脚本常量UNIT_LIST_ALL,UNIT_LIST_ALLIES,UNIT_LIST_ALLIED_HEROES,UNIT_LIST_ALLIED_CREEPS,UNIT_LIST_ENEMIES,UNIT_LIST_ENEMY_HEROES,UNIT_LIST_ENEMY_CREEPS和UNIT_LIST_NEUTRAL_CREEPS。
现在AbilityLevelUpThink()函数在bot脚本API中可用,它可以覆盖默认的英雄升级。
添加了技能函数GetPowerTreadsStat()。
添加了单位函数GetHealthRegen(),GetManaRegen(),GetSpellAmp(),GetArmor(),GetMagicResist()和GetEvasion()。
修复GetPlayerID()不工作的问题。
修复GetBaseDamage()返回错误值的问题。
将GetBaseDamageVariance()更改为获取攻击力的+/-值,而不是整个攻击力的范围。 (它是以前的一半)
修复GetBaseDamage(),GetBaseDamageVariance(),GetAttackRange(),GetAttackSpeed(),GetSecondsPerAttack(),GetAttackPoint()和GetLastAttackTime(),他们现在可以对所有可见单位工作,而不仅仅是队友。
在使用GetUnitList()时,请注意性能问题。函数本身是相当快的,因为它将按需构建列表,每帧不超过一次,但是列表可能很长,并且所有单位(甚至所有野怪)上的执行逻辑很容易变得很慢。
2017年01月14日 11点01分 16
多谢你的持续翻译
2017年01月14日 16点01分
GetPowerTreadsStat是什么
2017年01月14日 16点01分
@攻心城 获取动力鞋的状态?花式切假腿哈哈
2017年01月15日 07点01分
GetPowerTreadsStat 动力鞋去调用提示调用对象为空
2017年01月16日 11点01分
1 2 3 4 5 6 尾页