Tout ce qui a été publié par Smooth
-
Exemples de profils
Des profils de combat entiers pour les cas courants, un Crâ à distance, un Iop au corps à corps, un Eniripsa soigneur, un farmeur prudent, un groupe et le profil d'un paquet retouché, chacun expliqué réglage par réglage. Read this page in English Ces profils montrent comment les réglages fonctionnent ensemble. Copiez-en un dans Importer sur la page Profils de combat (Partager des profils), puis changez ce que vous voulez dans l'éditeur. Les identifiants sont ceux des données du jeu : l'éditeur affiche leurs noms. Commencez petit. Un profil avec un rôle, une portée et des éléments joue déjà bien pour n'importe quel personnage de ce genre, et chaque réglage que vous ajoutez devrait répondre à quelque chose que vous avez vu mal tourner dans le journal des tours. Un Crâ à distance { "version": 1, "name": "Crâ Air", "description": "Frappe de loin, recule après avoir lancé ses sorts, commence par Tirs Éloignés.", "role": "damage", "range": "ranged", "elements": ["air"], "placement": "far", "positioning": "kite", "focus": "lowestLife", "opening": { "firstTurn": [{ "spell": 32465, "target": "self" }] }, "rules": [ { "when": { "enemies.within": { "cells": 2, "atLeast": 1 } }, "do": { "retreat": { "to": "outOfReach" } } } ] } Portée ranged et Placement far gardent le Crâ à la portée de son sort de dégâts le plus long, dès le départ. Positionnement kite : une fois qu'il a lancé ses sorts, il finit le tour là où le danger est le plus faible. Cible prioritaire lowestLife achève les ennemis d'abord, ce qui retire leur danger plus tôt. L'ouverture lance Tirs Éloignés (32465) sur lui-même à son premier tour, pour la portée en plus de ses sorts. La règle le fait sortir de portée dès qu'un ennemi se tient à 2 cases ou moins. Un Iop au corps à corps { "version": 1, "name": "Iop Terre", "role": "damage", "range": "melee", "elements": ["earth"], "risk": 70, "positioning": "charge", "opening": { "firstTurn": [{ "spell": 14676, "target": "self" }] }, "spells": [ { "id": 13107, "use": "avoid" } ] } Portée melee et Positionnement charge l'amènent au contact, quel que soit le danger. Risque 70 le laisse finir des tours là où les ennemis pourraient lui prendre jusqu'à 70 % de sa vie. L'ouverture lance Ferveur (14676) sur lui-même à son premier tour. Bond (13107) est réglé sur Éviter : son score est divisé par deux, il n'est donc lancé que quand il bat nettement tout le reste. Un Eniripsa soigneur { "version": 1, "name": "Eniripsa soigneur", "role": "healer", "allies": "protect", "positioning": "hold", "rules": [ { "when": { "ally.life": { "below": "50%" } }, "do": { "heal": { "target": "lowestLifeAlly" } } }, { "when": { "self.life": { "below": "35%" } }, "do": { "heal": { "target": "self" } } } ] } Rôle healer pèse le soin à 2 et les dégâts à 0,5, là où le rôle Dégâts les pèse à 0,5 et 1. Alliés protect compte le danger que courent ses alliés comme le sien. Positionnement hold le garde là où il se tient, sauf si un sort l'oblige à se déplacer. La première règle soigne l'allié le plus blessé dès que l'un d'eux est sous la moitié de sa vie. La seconde, en dessous, soigne l'Eniripsa lui-même : l'allié passe d'abord quand les deux s'appliquent. Un soigneur sans allié à soigner combat quand même : quand personne n'est blessé, le soin ne compte pour rien, et il frappe comme n'importe quel autre rôle, avec un poids moitié moindre. Un farmeur prudent Pour un personnage qui farme des monstres capables de le tuer, et qui ne doit prendre aucun risque : { "version": 1, "name": "Prudent", "risk": 20, "focus": "mostDangerous", "rules": [ { "when": { "self.life": { "below": "40%" } }, "do": { "retreat": { "to": "cover" } } } ], "monsters": [ { "race": 137, "noMelee": true } ] } Risque 20 : il évite de finir un tour là où les ennemis pourraient lui prendre plus d'un cinquième de sa vie. Cible prioritaire mostDangerous frappe d'abord l'ennemi qui pourrait lui faire le plus mal. Sous 40 % de sa vie, il finit ses tours hors de la vue des ennemis quand il le peut. Il ne finit jamais un tour à côté d'un monstre de la race des Chafers d'Incarnam (137). Le rôle, la portée et les éléments sont absents : le module les tire de la classe et des sorts du personnage, ce profil convient donc à n'importe quelle classe. Un groupe de bots Pour plusieurs bots qui combattent ensemble et rejoignent le même combat l'un après l'autre : { "version": 1, "name": "Groupe", "waitForAllies": 3, "allies": "protect" } Chaque bot attend que 3 autres personnages soient dans son équipe avant de se déclarer prêt, pour que le combat ne commence pas avant que le groupe soit au complet. Le compte à rebours du placement le lance quand même quand il arrive à sa fin. Rejoindre le combat, c'est le travail des paquets des bots. Passer les tours, mais placer le personnage Idle prend part aux combats et ne fait rien. Cette copie place aussi le personnage et le déclare prêt, et passe au bout de 2 secondes au lieu de 5 : { "version": 1, "name": "Idle, placé", "parts": { "placement": true, "challenges": false, "ready": true, "movement": false }, "rules": [ { "do": { "endTurn": { "after": 2 } } } ] } Le profil d'un paquet, retouché Pour jouer un profil fourni par un paquet en changeant quelques réglages, étendez-le plutôt que de le copier : quand le paquet est mis à jour, votre profil suit. { "version": 1, "name": "Crâ Feu, prudent", "extends": "@some-author:fighters/fire-cra", "risk": 25, "spells": [ { "id": 32426, "use": "prefer" } ] } Il joue tout ce que dit le profil du paquet, avec un risque plus bas, et privilégie Flèche de Recul (32426) en plus des réglages de sorts du paquet. Étendre un autre profil explique comment les deux sont assemblés.
-
Règles et conditions
Faites réagir un profil de combat au combat avec des règles : une condition comme une vie basse ou un ennemi proche, et une action comme se replier, soigner, cibler quelqu'un ou finir le tour, avec chaque sujet, test, action et cible. Read this page in English Les règles font réagir un profil à ce qui se passe pendant le combat : se replier quand la vie du personnage baisse, soigner un allié en difficulté, frapper en premier un monstre précis tant qu'il est là, prendre ses distances quand les ennemis se rapprochent. Chaque règle est une condition et une action, et la section Règles de l'éditeur les liste dans l'ordre. "rules": [ { "when": { "self.life": { "below": "30%" } }, "do": { "retreat": { "to": "outOfReach" } } }, { "when": { "ally.life": { "below": "40%" } }, "do": { "heal": { "target": "lowestLifeAlly" } } } ] Comment les règles s'appliquent Avant chaque action du tour du personnage, le module vérifie la condition de chaque règle sur le combat tel qu'il est à cet instant : une règle peut donc commencer ou cesser de s'appliquer en plein tour. Une règle sans condition s'applique tout le temps. Il existe deux sortes de règles. Les modificateurs changent la façon dont le module note un tour, et s'additionnent : chaque Cibler et chaque Éviter dont la condition est remplie s'applique ; parmi les règles de déplacement, Se replier, Approcher et Garder la distance, seule la première dont la condition est remplie s'applique. Les actions imposées disent au personnage quoi faire ensuite : Lancer, Attaquer, Soigner, Booster et Terminer le tour. Les sorts de l'ouverture passent d'abord, puis ces règles, dans leur ordre. La première qui peut être jouée tout de suite devient la prochaine action du personnage, et le module joue librement la suite du tour. Une action qui ne peut pas être jouée, faute de PA, de cible à portée ou de la cible elle-même, est passée. L'ordre compte donc pour les actions imposées : mettez la plus urgente en premier. Une règle « soigner quand un allié est bas » placée au-dessus de « attaquer l'ennemi avec le moins de vie » soigne d'abord chaque fois que les deux s'appliquent. Actions Action JSON Réglages Ce qu'elle fait Lancer cast spell : un sort, ou "weapon". target : facultatif. Lance ce sort en premier, sur la cible quand il y en a une, sinon là où il fait le plus. Attaquer attack target : facultatif Attaque en premier, avec son meilleur sort de dégâts ou l'arme, sur la cible quand il y en a une. Soigner heal target : facultatif Soigne en premier, la cible quand il y en a une. Booster buff target : facultatif Lance un bonus en premier, sur la cible quand il y en a une. Se replier retreat to : À couvert (cover) ou Hors de portée (outOfReach) Finit ses tours loin du danger : À couvert, hors de la vue de tout ennemi quand il le peut, comme le positionnement Se cacher ; Hors de portée, là où le danger est le plus faible, comme Harceler. Approcher approach target : facultatif Finit ses tours près de la cible, ou de l'ennemi le plus proche quand il n'y en a pas. Garder la distance keepDistance min et max : des cases Finit ses tours entre min et max cases de l'ennemi le plus proche. max à 0 veut dire sans limite haute. Cibler focus target Frapper la cible compte deux fois plus. Éviter avoid spell : un sort, ou "weapon". target : facultatif. Ne lance pas ce sort, et frapper la cible ne compte pour rien, tant que la règle s'applique. Terminer le tour endTurn after : des secondes, 0 par défaut Finit le tour sans agir, une fois ce nombre de secondes écoulé depuis son début. Terminer le tour est une action imposée comme les autres : quand c'est la première qui peut être jouée, le personnage ne fait rien d'autre dans ce tour. Son délai ne coûte jamais le tour : le module le termine au moins 2 secondes avant la fin du temps du tour, quoi que dise after. Une règle sans condition qui termine le tour, c'est ce qu'écrit Passer chaque tour au bout de (secondes) dans Jeu. Cibles La cible d'une règle désigne un combattant, recalculé à chaque décision. Cible JSON Le combattant N'importe qui Absente Personne en particulier : le module choisit. Soi-même "self" Le personnage. Ennemi avec le moins de vie "lowestLifeEnemy" L'ennemi à qui il reste le moins de vie. Allié avec le moins de vie "lowestLifeAlly" L'allié à qui il reste le moins de vie, le personnage non compris. Ennemi le plus proche "closestEnemy" L'ennemi le plus proche du personnage. Ennemi le plus dangereux "mostDangerousEnemy" L'ennemi qui pourrait infliger le plus au personnage là où il se tient. Un monstre { "monster": 4109 } Un ennemi de ce monstre. Une race { "race": 137 } Un ennemi de cette race de monstres. { "fighter": -2 } Seulement dans le JSON : un combattant du combat, par l'identifiant que le jeu lui donne. Surtout pour les scripts. Quand deux combattants sont à égalité, celui qui a le plus petit identifiant est pris. Une cible absente du combat, comme un monstre qui n'est pas là ou qui est mort, fait passer son tour à une action imposée. Conditions Une condition est remplie quand chacun de ses tests l'est. Dans l'éditeur, Seulement si ouvre la condition, Test ajoute un test, et Toutes, L'une et Pas ajoutent un groupe. Sujets Chaque test lit un sujet du combat. L'éditeur le nomme par qui et quoi, comme Personnage · PV. Sujet JSON Tests Lit Personnage · PV self.life below, above La vie du personnage, en nombre ou en pourcentage de son maximum. Personnage · Bouclier self.shield below, above Ses points de bouclier, en nombre ou en pourcentage de sa vie maximale. Personnage · PA self.ap below, above Ses PA restants. Personnage · PM self.mp below, above Ses PM restants. Personnage · Etats self.state is S'il est dans cet état. Ennemis · Etats enemy.state is Si un ennemi est dans cet état. Alliés · Etats ally.state is Si un allié est dans cet état, le personnage non compris. Alliés · PV ally.life below, above Si la vie d'un allié est dans cette fourchette, le personnage non compris. Ennemis · Nombre enemies.count is, atLeast, atMost Combien d'ennemis sont en vie, invocations comprises. Alliés · Nombre allies.count is, atLeast, atMost Combien d'alliés sont en vie, invocations comprises, le personnage non compris. Ennemis · Proches enemies.within cells, puis atLeast, atMost Combien d'ennemis se tiennent à cells cases ou moins du personnage. Alliés · Proches allies.within cells, puis atLeast, atMost Combien d'alliés se tiennent à cells cases ou moins du personnage. Ennemis · Monstre enemy.monster is Si ce monstre fait partie des ennemis en vie. Ennemis · Race enemy.race is Si un monstre de cette race fait partie des ennemis en vie. Combat · Tour global fight.round is, atLeast, atMost Le tour global du combat. Combat · Tours fight.turn is, atLeast, atMost Combien de tours le personnage a joués dans ce combat, celui en cours compris. Cible · PV target.life below, above Dans la condition d'un sort seulement : la vie du combattant sur lequel le sort est lancé. Cible · Distance target.distance below, above Dans la condition d'un sort seulement : à combien de cases se trouve ce combattant. Un sujet que cet Asterobot ne connaît pas n'est jamais rempli, et le profil affiche un avertissement à son sujet. Tests Test JSON Rempli quand Sous below La valeur est strictement plus petite. Un nombre, ou un pourcentage écrit en texte, comme "30%". Au-dessus de above La valeur est strictement plus grande. Un nombre ou un pourcentage. Est is La valeur est exactement celle-ci, ou, pour les états, les monstres et les races, celui-ci est là. Au moins atLeast Le nombre est celui-ci ou plus. Au plus atMost Le nombre est celui-ci ou moins. À moins de (cases) cells Pour Proches : la distance comptée, en cases. Un test avec plusieurs bornes les demande toutes : { "below": "60%", "above": "20%" } est rempli entre un cinquième et trois cinquièmes de la vie du personnage. Groupes Groupe JSON Rempli quand Toutes ces conditions all Chaque condition de sa liste est remplie. L'une de ces conditions any Au moins une condition de sa liste est remplie. Pas celle-ci not Sa condition n'est pas remplie. Les groupes se placent dans une condition et peuvent contenir leurs propres groupes. Cette condition est remplie pendant les deux premiers tours globaux, ou quand un ennemi est dans l'état Affaibli (l'identifiant d'un état, choisi par son nom dans l'éditeur), tant que moins de 3 ennemis se tiennent à 2 cases ou moins : "when": { "any": [ { "fight.round": { "atMost": 2 } }, { "enemy.state": { "is": 42 } } ], "not": { "enemies.within": { "cells": 2, "atLeast": 3 } } } Exemples Finir les tours là où le danger est le plus faible tant que la vie du personnage est sous 30 % : { "when": { "self.life": { "below": "30%" } }, "do": { "retreat": { "to": "outOfReach" } } } Garder en vie les alliés d'un soigneur d'abord : { "when": { "ally.life": { "below": "40%" } }, "do": { "heal": { "target": "lowestLifeAlly" } } } Ne pas laisser les ennemis encercler le personnage : { "when": { "enemies.within": { "cells": 1, "atLeast": 2 } }, "do": { "keepDistance": { "min": 2 } } } Frapper d'abord le Petit Gloot tant qu'il est dans le combat : { "when": { "enemy.monster": { "is": 4109 } }, "do": { "focus": { "target": { "monster": 4109 } } } } Garder l'arme pour la fin du tour : pas de coup d'arme tant que le personnage a encore plus de 4 PA : { "when": { "self.ap": { "above": 4 } }, "do": { "avoid": { "spell": "weapon" } } } Attendre 10 secondes et passer à partir du tour global 30, pour laisser filer un long combat : { "when": { "fight.round": { "atLeast": 30 } }, "do": { "endTurn": { "after": 10 } } } Exemples de profils assemble des règles avec les autres réglages dans des profils entiers.
-
Réglages du profil
Chaque réglage d'un profil de combat, section par section comme l'éditeur les montre, avec sa clé JSON, ses valeurs, sa valeur par défaut et ce qu'il change en combat. Read this page in English Cette page décrit chaque réglage d'un profil de combat, dans l'ordre des sections de l'éditeur. Chacun donne le libellé du formulaire, la clé qu'il a dans le JSON du profil, ses valeurs et sa valeur par défaut. Un réglage absent joue sa valeur par défaut : un profil n'a donc besoin que des réglages que vous voulez changer. Les règles ont leur propre page : Règles et conditions. Un profil court en fait déjà un complet : { "version": 1, "name": "Crâ Air", "role": "damage", "range": "ranged", "elements": ["air"], "positioning": "kite" } Comment le module décide explique ce que fait le module de ces réglages, et Exemples de profils montre des profils entiers pour les cas courants. Général Réglage JSON Valeurs Par défaut Nom name Du texte. Obligatoire. Description description Du texte, pour vous et ceux avec qui vous le partagez. Vide Étend extends Le nom d'un autre profil : Idle, un des vôtres ou celui d'un paquet. Aucun version 1, la version du format des profils. Seulement dans le JSON. 1 Étendre un autre profil explique Étend. Archétype Rôle role : à quoi sert le personnage en combat. Il fixe le poids de chaque partie du score d'un tour (Comment un tour est noté). Valeur JSON Joue Dégâts damage Frappe d'abord. Tank tank Frappe, et gêne davantage les ennemis. Soutien support Gêne les ennemis et aide son camp d'abord, frappe moins. Soigneur healer Soigne d'abord, aide son camp, frappe le moins. Vide, la valeur par défaut, prend le rôle que le jeu classe en premier pour la classe du personnage : Damage Dealer, Positioner et Summoner jouent Dégâts, Tank joue Tank, Healer joue Soigneur, et Protector, Buffer et Debuffer jouent Soutien. Quand la classe n'est pas connue, Dégâts. Portée range : la distance à laquelle le personnage combat, et où il est placé quand ses sorts ne sont pas encore connus. Valeur JSON Distance à l'ennemi le plus proche Automatique auto Selon la portée de ses sorts de dégâts, l'arme mise à part : quand la plupart portent à 2 cases ou moins, mêlée ; à partir de 6 cases, distance ; sinon mi-distance. Sans sorts, mi-distance. Mêlée melee Au contact. Mi-distance mid La moitié de la portée de son sort de dégâts le plus long. Distance ranged La portée de son sort de dégâts le plus long. Par défaut : Automatique. La portée compte le bonus de portée du personnage et les changements de portée des sorts. Éléments elements : les éléments dont il favorise les sorts, parmi Terre (earth), Feu (fire), Eau (water), Air (air) et Neutre (neutral). Un sort de dégâts de l'un d'eux compte 1,2 fois plus. Vide, la valeur par défaut, n'en favorise aucun : le module lance ce qui frappe le plus fort avec les vraies caractéristiques du personnage, ce qui suit son build et son équipement. Risque risk : le danger que le personnage accepte, de 0 (prudent) à 100 (téméraire). Par défaut : 50. Le module évite de finir un tour là où les ennemis pourraient lui infliger plus que ce pourcentage de sa vie pendant leur prochain tour, et là où ils pourraient le tuer, sauf avec un risque de 100. Le danger explique comment ce danger est calculé. Placement placement : où le personnage commence le combat. Valeur JSON Case de départ Automatique auto Celle d'où son premier tour se passerait le mieux, moins le danger qui y dépasse son risque. Tant que ses sorts ne sont pas connus, selon la portée : proche en mêlée, loin à distance, à 4 cases de l'ennemi le plus proche sinon. Proche close La plus proche des ennemis. Loin far La plus éloignée des ennemis. Par défaut : Automatique. Le module ne place le personnage que quand la partie Placement est activée (voir Jeu). Positionnement positioning : où le personnage finit son tour, une fois qu'il ne reste rien qui vaille la peine d'être lancé. Valeur JSON Finit ses tours Automatique auto À la distance de sa portée, jamais là où il peut être tué quand il peut l'éviter, ni au-delà du danger que son risque accepte. Charger charge Au contact de l'ennemi, quel que soit le danger. Tenir hold Là où il se tient : il ne se déplace que pour atteindre une cible. Harceler kite Une fois qu'il a lancé un sort dans le tour, là où le danger est le plus faible, puis aussi loin des ennemis qu'il le peut. Avant cela, il se rapproche comme Automatique. Se cacher hide Comme Harceler, en préférant une case qu'aucun ennemi ne voit, derrière un mur ou un combattant, quand le danger y est aussi faible. Par défaut : Automatique. Cible prioritaire focus : l'ennemi qu'il frappe en premier. Frapper cet ennemi compte deux fois plus. Valeur JSON Frappe en premier Meilleur score auto Personne en particulier : ce qui donne le meilleur score. Moins de vie lowestLife L'ennemi à qui il reste le moins de vie. Le plus proche closest L'ennemi le plus proche du personnage. Le plus dangereux mostDangerous L'ennemi qui pourrait infliger le plus au personnage là où il se tient. Par défaut : Meilleur score. Les monstres et les règles peuvent ajouter leur propre priorité : voir Monstres et Règles et conditions. Alliés allies : comment il traite les autres combattants de son équipe, personnages et invocations. Valeur JSON Les traite Ignorer ignore Évite seulement de leur faire du tort : les soigner ou les booster ne compte pour rien. Aider help Les soigne et les booste quand ça en vaut la peine, et évite de leur faire du tort. Protéger protect Comme Aider, et le danger qu'ils courent compte autant que le sien, si bien qu'il préfère les tours qui les laissent plus en sécurité : tuer ou gêner d'abord ce qui les menace. Par défaut : Aider. Faire du tort à son propre camp compte toujours contre un tour, par défaut cinq fois plus que faire du tort à un ennemi ne compte pour lui, quoi que dise ce réglage. Jeu Parties parts : les parties d'un combat que le module décide. Chacune est activée sauf si le profil la désactive. Partie JSON Quand elle est désactivée Placement parts.placement Le module ne déplace pas le personnage avant le combat. Sur une session relayée, vous le placez vous-même. Prêt parts.ready Le module ne déclare pas le personnage prêt : vous le faites sur une session relayée, sinon le combat commence à la fin du compte à rebours du placement. Déplacement parts.movement Le personnage ne se déplace jamais pendant ses tours : il lance ses sorts depuis là où il se tient. parts.challenges Seulement dans le JSON. Le module ne choisit pas encore les challenges, quoi qu'il dise. Les tours eux-mêmes sont toujours joués : pour les laisser à quelqu'un d'autre, désactivez le module, ou passez chaque tour avec le réglage ci-dessous. Passer chaque tour Passer chaque tour au bout de (secondes) : coché, le personnage finit chaque tour au bout de ce nombre de secondes, sans agir. C'est une règle sans condition, { "do": { "endTurn": { "after": 5 } } }, que le formulaire montre ici plutôt que parmi les règles. Idle, c'est exactement cela, avec toutes les parties désactivées. Arme weapon : ce qu'il fait de l'arme qu'il tient, ou des mains nues quand il n'en tient pas. Réglage JSON Valeurs Par défaut Arme weapon.use Privilégier (prefer), Normal (normal), Éviter (avoid), Jamais (never), comme pour un sort (voir Sorts) Normal Coups d'arme par tour weapon.maxPerTurn Un nombre, 0 pour aucune limite autre que celle de l'arme 0 Combats hors monstres pvp : ce qu'il fait dans un combat contre d'autres joueurs, comme un défi ou une agression. Valeur JSON Dans ces combats Idle idle Ne décide rien : le module répond seulement à ce à quoi le client Dofus répond de lui-même. Sur une session relayée, c'est vous qui les jouez. Jouer play Les joue comme des combats contre des monstres. Par défaut : Idle. Les combats contre des monstres sont les combats PvM et les brèches ; tout autre type de combat compte comme hors monstres. Note Le module ne connaît pas encore les sorts des personnages ennemis. Avec Jouer, il ne voit pas ce qu'ils pourraient lui faire pendant leur tour : son sens du danger est donc faible dans ces combats. Attendre les alliés waitForAllies : combien d'autres personnages doivent être dans l'équipe du personnage avant qu'il se déclare prêt. Par défaut : 0. C'est pour les combats de groupe où plusieurs bots arrivent l'un après l'autre : le personnage attend les autres, et le compte à rebours du placement lance quand même le combat quand il arrive à sa fin. Sorts spells : ce que dit le profil de certains sorts. Un sort absent de la liste est utilisé normalement : ne listez donc que les sorts que vous voulez changer. Lister un sort que le personnage n'a pas ne fait rien. Réglage JSON Valeurs Par défaut Sort id Un sort, choisi dans Choisir un sort. Obligatoire. Utilisation use Privilégier (prefer, compte 1,5 fois plus), Normal (normal), Éviter (avoid, moitié moins), Jamais (never, jamais lancé) Normal Par tour au plus maxPerTurn Un nombre, 0 pour aucune limite autre que celle du sort 0 Lancé sur target N'importe qui (any), Ennemis (enemy), Alliés (ally), Soi-même (self) : sur qui le sort peut être lancé N'importe qui Ennemis touchés au moins minTargets Un nombre : un lancer doit toucher au moins ce nombre d'ennemis 0 Seulement si when Une condition que le lancer doit remplir : voir Conditions Toujours La condition d'un sort peut aussi tester le combattant sur lequel il est lancé, avec Cible · PV (target.life) et Cible · Distance (target.distance). Par exemple, le Couperet d'un Iop (13115), privilégié mais gardé pour les ennemis sous le tiers de leur vie : { "id": 13115, "use": "prefer", "when": { "target.life": { "below": "33%" } } } L'arme n'est pas une entrée de sort : réglez-la avec Arme dans Jeu. Une entrée sans sort est refusée avec spells[0].id: required: the weapon is the profile's weapon. Ouverture opening : des sorts lancés en premier dans un tour, dans l'ordre, dès qu'ils peuvent l'être. Le module joue la suite du tour comme d'habitude. Réglage JSON Quand Premier tour opening.firstTurn Pendant le premier tour du personnage dans le combat, avant ceux de Chaque tour. Chaque tour opening.everyTurn Pendant chacun de ses tours. Chaque liste contient des sorts dans l'ordre où ils sont lancés. Un sort listé deux fois est lancé deux fois. Une étape qui ne peut pas être lancée tout de suite, faute de PA, de portée ou de ligne de vue, est passée, et la suivante est essayée. Dans le JSON, une étape est l'identifiant d'un sort, "weapon" pour un coup d'arme, ou un objet qui dit aussi sur qui le lancer. Pour un Iop qui lance Ferveur (14676) sur lui-même à son premier tour, puis ouvre chaque tour avec Pression (13106) : "opening": { "firstTurn": [{ "spell": 14676, "target": "self" }], "everyTurn": [13106] } La cible prend les mêmes valeurs que celle d'une règle : voir Cibles. Le formulaire modifie des listes de sorts simples ; une liste avec une étape qui vise une cible se modifie dans le JSON. Monstres monsters : ce qu'il fait face à certains monstres, choisis un par un (Par monstre) ou par leur race (Par race). Réglage JSON Valeurs Par défaut Monstre ou Race id ou race Un monstre, ou une race de monstres. L'un des deux est obligatoire. Priorité focus En premier (first) : le frapper compte deux fois plus. En dernier (last) : moitié moins. Ignorer (ignore) : le frapper ne compte pour rien. Vide : comme les autres Rester à distance (cases) keepAway Le nombre minimum de cases entre lui et l'endroit où le personnage finit ses tours 0 Jamais au corps à corps noMelee true : finit ses tours à au moins 2 cases de lui false Une entrée s'applique à chaque monstre du combat qui lui correspond. Un monstre qui correspond à plusieurs entrées, comme une par monstre et une par sa race, les reçoit toutes : les priorités se multiplient, et la plus grande distance l'emporte. Pour un personnage qui tue d'abord les Petits Gloots (4109) et reste à 3 cases de chaque monstre de la race des Chafers d'Incarnam (137) : "monsters": [ { "id": 4109, "focus": "first" }, { "race": 137, "keepAway": 3 } ] Poids weights : ce que vaut chaque partie du score d'un tour face aux autres. Le rôle les fixe (Comment un tour est noté donne le tableau), et un poids défini ici remplace celui du rôle. Chacun est un nombre, 0 ou plus. Poids JSON Ce qu'il pèse Dégâts damage Les dégâts infligés. Élimination kill Un ennemi tué. Soin heal La vie soignée. Contrôle control Les ennemis gênés : PA, PM ou caractéristiques réduits, poussés, mis dans un état. Bonus buff L'aide durable à son camp. Invocation summon Une invocation posée. Sécurité safety Finir le tour hors de danger. Placement position Finir le tour à la distance du profil. PA inutilisés waste Les PA non utilisés. Tort aux alliés allyHarm Le tort fait à son propre camp. Par défaut : 5. Les poids servent aux réglages fins, après le rôle, la portée, le risque et les autres réglages. Un poids de 0 coupe une partie : "safety": 0 fait ignorer complètement le danger au personnage. Un nom qui n'est pas l'un d'eux est ignoré, avec un avertissement. Challenges Note Bientôt. Les profils diront quels challenges choisir et à quel point tenter de les réussir. D'ici là, un réglage challenges écrit dans un profil est gardé tel quel et n'a aucun effet. Ensuite, Règles et conditions explique les règles : ce que fait le personnage quand quelque chose se passe pendant le combat.
-
Profils de combat
Créez, copiez, importez, exportez, modifiez et supprimez les profils de combat que jouent vos bots, sur la page Profils de combat, avec le profil par défaut, Idle, les profils fournis par les paquets et les profils qui en étendent un autre. Read this page in English Un profil de combat dit au module de combat comment un bot joue : le rôle que tient le personnage, la distance à laquelle il combat, les sorts qu'il préfère, les monstres qu'il frappe en premier, ce qu'il fait quand sa vie baisse. Chaque bot joue un profil, choisi dans son onglet Combat (Le module de combat), et un même profil peut servir à autant de bots que vous voulez. Vous n'avez pas besoin de profil pour commencer. Le profil par défaut s'adapte tout seul à n'importe quel personnage, et un profil n'a besoin que des réglages que vous voulez changer. Quelques lignes, comme un rôle, une portée et des éléments, font déjà un profil qui s'adapte à n'importe quel personnage de ce genre ; tout le reste sert à le rendre vraiment vôtre. D'où viennent les profils Profil Ce que c'est Pouvez-vous le modifier ? Le profil par défaut Chaque réglage à sa valeur par défaut. Il n'est pas dans la liste : un bot le joue quand son Profil est vide. Non : c'est ce sur quoi chaque réglage se rabat. Idle, Intégré Prend part au combat et passe chaque tour au bout de 5 secondes. Toutes les parties désactivées, une règle. Non. Copiez-le pour changer le délai ou réactiver des parties. Les vôtres Les profils que vous avez créés, copiés ou importés. Chacun est un fichier du dossier des données d'Asterobot. Oui. Celui d'un paquet, Paquet Fourni par un paquet que vous avez installé, nommé d'après lui, comme @some-author:fighters/fire-cra. Non. Copiez-le pour le modifier. La page Profils de combat Ouvrez Profils de combat dans le menu d'Asteroboard. La page liste tous les profils : Idle en premier, puis les vôtres par nom, puis ceux de vos paquets. Colonne Ce qu'elle montre Nom Le nom du profil, celui qu'affiche la liste Profil d'un bot. Source Les vôtres, Intégré ou Paquet. État Prêt, Injouable quand il a une erreur, ou combien d'avertissements il a. Survolez-le pour les lire. Le filtre au-dessus du tableau retrouve un profil par son nom. Chaque ligne a un menu : Élément Ce qu'il fait Modifier Ouvre votre profil dans l'éditeur. Voir pour Idle et ceux des paquets, qui s'ouvrent en lecture seule. Copier Enregistre une copie sous un nom à vous, puis l'ouvre dans l'éditeur. Exporter Télécharge le profil sous forme de fichier .json. Supprimer Supprime un de vos profils, après confirmation. Idle et ceux des paquets ne peuvent pas être supprimés. La page se met à jour toute seule quand un profil est enregistré, importé ou supprimé, et quand un paquet est installé ou retiré. Créer un profil Cliquez sur Nouveau profil. Tapez un Nom, puis cliquez sur Créer. L'éditeur s'ouvre sur le nouveau profil. Chaque réglage commence à sa valeur par défaut : il joue donc comme un bot sans profil tant que vous ne changez rien. Un nom est aussi le nom de fichier du profil : il ne peut pas être vide, commencer par @, ni contenir de / ou de caractère qu'un nom de fichier ne peut pas contenir. La fenêtre affiche alors fightprofiles: a profile's name can't be empty, start with @, or hold / or a character a file name can't. Un nom qu'un autre profil porte déjà donne fightprofiles: a profile already has this name. Copier un profil Copier, dans le menu d'une ligne ou dans l'éditeur, ouvre une fenêtre où le nom est déjà rempli avec celui de l'original suivi de copie. Changez-le si vous voulez, puis cliquez sur Copier. La copie est à vous, avec tous les réglages qu'avait l'original. Copier est la façon de modifier Idle ou le profil d'un paquet : la copie est un de vos profils, que vous pouvez modifier. Pour continuer de suivre le profil d'un paquet au fil de ses mises à jour tout en changeant quelques réglages, étendez-le plutôt (voir Étendre un autre profil). Partager des profils Exporter télécharge le profil tel qu'il est enregistré, dans un fichier qui porte le nom du profil, comme fire-cra.json. Les caractères autres que les lettres, les chiffres, ., - et _ deviennent - dans le nom du fichier. Pour utiliser un profil que quelqu'un a partagé : Cliquez sur Importer. Choisissez le fichier sous Fichier du profil, ou collez le JSON sous JSON du profil. Choisir un fichier remplit le texte : ce que vous voyez est ce qui sera importé. Cliquez sur Importer. Le profil rejoint les vôtres sous le nom qu'il porte. Quand vous avez déjà un profil de ce nom, la fenêtre demande « Vous avez déjà un profil nommé ... Le remplacer par celui-ci ? », et Le remplacer écrase le vôtre. Un texte qui n'est pas du JSON donne « Ce n'est pas du JSON valide : » avec la raison, et un JSON qui n'est pas un objet donne « Un profil est un objet JSON. » Un profil qu'Asterobot ne peut pas accepter est refusé avec la raison, comme lors d'une sauvegarde. Un profil désigne les sorts, les monstres et les états par leurs identifiants dans le jeu, les mêmes pour tous ceux qui jouent la même version du jeu : un profil partagé joue donc de la même façon sur un autre Asterobot. Supprimer un profil Supprimer demande d'abord : « ... sera supprimé définitivement. Les bots qui l'utilisent joueront le profil par défaut. » Les bots réglés dessus gardent son nom et jouent le profil par défaut jusqu'à ce que vous leur en donniez un autre. L'éditeur L'éditeur montre le profil deux fois : le formulaire à gauche, section par section, et son JSON à droite. Les deux sont en direct. Un changement dans le formulaire apparaît aussitôt dans le JSON, et le JSON que vous tapez remplit le formulaire dès qu'il se lit comme un profil. Les sections sont Général, Archétype, Jeu, Sorts, Ouverture, Monstres, Règles et Poids. Réglages du profil décrit chaque champ, et Règles et conditions les règles. Vide veut dire par défaut. Un champ laissé vide affiche Défaut, ou Hérité : avec la valeur que lui donne le profil étendu. Le bouton de réinitialisation à côté d'un champ que vous avez rempli le vide de nouveau. Choisir des sorts. Les sorts se choisissent dans Choisir un sort : choisissez une classe pour lister ses sorts, chacun à côté de sa variante, avec leur coût en PA, leur portée et leur icône, suivis des sorts des invocations que ces sorts amènent et des sorts que toutes les classes peuvent apprendre. Tapez pour les filtrer, ou pour chercher par son nom n'importe quel autre sort du jeu. Choisir des monstres, des races et des états. Tapez quelques lettres du nom, dans la langue du jeu, et choisissez-le dans la liste. Les monstres et les états affichent leur icône. Sauvegarder. Sauvegarder reste grisé tant que rien n'a changé. Quitter la page avec des changements non sauvegardés demande d'abord « Quitter sans enregistrer vos modifications ? ». Renommer. Changer le Nom dans Général puis sauvegarder renomme le profil, et chaque bot qui le joue suit le nouveau nom. Ce que le formulaire ne montre pas. Certains réglages ne s'écrivent que dans le JSON, comme un sort d'ouverture visant une cible ou un combattant visé par son identifiant dans une règle. Le formulaire les montre tels qu'ils sont écrits et les garde. Les réglages qu'il ne connaît pas, écrits pour un Asterobot plus récent, sont gardés aussi. Les noms et les icônes viennent des données du jeu de la version pour laquelle votre Asterobot est fait, ou de la plus récente que vous avez extraite quand ce n'est pas celle-là, dans la langue dans laquelle vous utilisez Asteroboard. Les icônes apparaissent une fois les données de cette version extraites avec elles : après une mise à jour d'Asterobot, extrayez-la de nouveau sur la page Gestionnaire de jeux (Extraire les données du jeu). Erreurs et avertissements Quand vous sauvegardez, Asterobot vérifie le profil. Une valeur qu'il ne peut pas utiliser bloque la sauvegarde, et l'éditeur affiche la raison avec le champ concerné, comme : fight: malformed profile: spells[0].use: "sometimes" is not one of prefer, normal, avoid, never Le champ est écrit à la façon du JSON : spells[0] est la première entrée de Sorts. Corrigez-le dans le formulaire ou le JSON, puis sauvegardez de nouveau. D'autres choses n'empêchent pas le profil de jouer, et s'affichent comme avertissements au-dessus du formulaire, sous À savoir : Avertissement Ce qu'il veut dire spell 12345: not in the game data, ignored Un identifiant que la version du jeu la plus récente que vous avez installée n'a pas. Pareil pour monster, monster race et state. rules[0].when.self.something: no such subject: never holds Une condition que cet Asterobot ne connaît pas. Elle n'est jamais remplie. weights.something: no such scoring term: ignored Un poids au nom inconnu. version: 2 is newer than this module's 1: what it adds is ignored Un profil écrit pour un Asterobot plus récent. extends: no profile has this name: its own fields play over the default profile Le profil qu'il étend n'existe plus. name: "...", but its file is "....json": it plays as "..." Un fichier renommé à la main : c'est le nom du fichier qui l'emporte. Un profil qui ne peut pas jouer du tout, comme un fichier qui n'est pas du JSON ou un profil dont le profil étendu en étend lui-même un autre, affiche Injouable en l'état avec la raison. Un bot réglé dessus joue le profil par défaut. Étendre un autre profil Étend, dans Général, fait partir un profil d'un autre : il reprend tous les réglages de ce profil, et ne change que ceux qu'il définit lui-même. C'est la façon de suivre le profil d'un paquet, ou un des vôtres, en gardant quelques changements par-dessus : Ce que le profil définit Ce qu'il joue Un réglage comme Rôle ou Risque Sa propre valeur, à la place de celle du profil étendu. Un objet, comme Parties Champ par champ : les champs qu'il définit remplacent ceux du profil étendu, les autres restent. Sorts et Monstres Les entrées du profil étendu, puis les siennes. Une entrée pour un sort ou un monstre que le profil étendu a déjà remplace cette entrée. Règles Les règles du profil étendu, puis les siennes. Poids Les poids du profil étendu, les siens les remplaçant par nom. L'éditeur montre les valeurs héritées en grisé dans chaque champ, et les entrées héritées d'une liste repliées au-dessus d'elle (« ... entrées héritées »). Quand le profil étendu change, par exemple parce que son paquet a été mis à jour, chaque profil qui l'étend suit. Quand il n'existe plus, le profil joue ses propres réglages par-dessus le profil par défaut et le signale dans un avertissement. Vous pouvez étendre Idle, un de vos profils ou celui d'un paquet, mais sur un seul niveau : étendre un profil qui en étend un autre est refusé avec extends: "..." extends another profile, and one level is all. Les profils des paquets Un paquet peut fournir des profils de combat en plus de son script. Une fois le paquet installé, ses profils apparaissent sur la page avec la source Paquet, nommés <paquet>/<nom>, et n'importe quel bot peut les jouer, qu'il joue ce paquet ou non. Question Réponse Quelle version joue ? Pour un bot qui joue ce paquet, la version du paquet qu'il joue. Pour tout autre bot, la plus récente installée. Que se passe-t-il quand le paquet est mis à jour ? Ses profils sont mis à jour avec lui, et les profils qui les étendent suivent. Et quand il est retiré ? Les bots réglés sur un de ses profils jouent le profil par défaut, et leur console dit pourquoi. Les auteurs de paquets trouveront comment fournir des profils dans Fournir des profils de combat. Les fichiers des profils Vos profils sont des fichiers du dossier fightprofiles du dossier des données d'Asterobot (Fichiers et dossiers), un fichier <nom>.json chacun, dans le même JSON que celui que montre l'éditeur. Asterobot lit le fichier d'un profil chaque fois qu'il s'en sert : vous pouvez donc aussi les modifier à la main. Un changement joue dès le combat suivant, et apparaît sur la page la prochaine fois qu'elle se charge. Un fichier qui n'est pas un profil lisible est listé avec son erreur. Copier un fichier .json dans le dossier revient à l'importer. Ensuite, Réglages du profil décrit chaque réglage d'un profil.
-
Comment le module décide
Ce que le module de combat sait d'un combat, comment il calcule les tours qu'il peut jouer, comment il les note et pèse le danger, et les limites qui font toujours avancer un combat, pour lire son journal des tours et régler un profil. Read this page in English Le module de combat ne suit pas une suite de coups écrite pour chaque classe. Avant chaque action, il regarde le combat tel qu'il est, calcule ce que le personnage peut vraiment faire, joue des tours entiers sur une copie du combat, et choisit celui que son profil note le mieux. Cette page explique comment, pour que vous puissiez lire le journal des tours et savoir quel réglage du profil change quoi. Ce qu'il sait Le module lit le combat à deux sources. Les messages du jeu, les mêmes que lit le client Dofus : l'équipe, la case, la vie, le bouclier, les PA, les PM, les caractéristiques, les résistances, les états et les effets actifs de chaque combattant, qui est invisible, le temps de relance de chaque sort et combien de fois il a été lancé, les glyphes et les pièges au sol, le tour de jeu et qui joue. Les sorts du personnage, à leurs niveaux, arrivent avec le début du combat. Les données du jeu de la version du jeu du bot : ce que coûte chaque sort, sa portée, sa zone et ses effets, qui il touche, les sorts des monstres à chaque grade, l'arme que tient le personnage, et les cases et les lignes de vue de la carte du combat. Quand il manque une information, il estime avec moins plutôt que de s'arrêter. Un ennemi dont les données du jeu n'ont pas les sorts est compté comme frappant à mains nues, et une carte de combat qu'il n'arrive pas à lire est jouée comme si chaque case était libre. Une décision finit toujours par sortir. Il ne sait pas non plus ce qu'il ne peut pas voir : un combattant invisible n'est jamais visé tant que le jeu ne le montre pas de nouveau. Ce que le personnage peut faire Pour chaque case où le personnage peut aller, le module calcule le coût du trajet : les PM du chemin, et les PA et PM que les ennemis à côté de lui lui prendraient quand il les quitte (le tacle), avec la formule du jeu. Une case où il serait arrêté est hors d'atteinte. Depuis chacune de ces cases, il vérifie chaque sort et l'arme comme le fait le jeu : PA, portée avec le bonus de portée du personnage et les effets qui changent la portée d'un sort, ligne de vue, lancer en ligne ou en diagonale, temps de relance, lancers par tour et par cible, les états qu'un sort exige ou interdit, la case libre qu'un sort demande, et la limite d'invocations. Pour chaque sort qu'il peut lancer, il calcule ce qui arrive à chaque combattant de la zone du sort : les dégâts avec leurs jets, les caractéristiques du lanceur et les résistances de la cible, les coups critiques selon leur probabilité, l'érosion et les boucliers, les soins, les poussées et les dégâts d'un choc contre un obstacle, les PA et PM retirés, les états, les invocations, et les sorts qu'un effet lance à son tour. Ce sont les règles que le client Dofus utilise pour prévisualiser un sort : le module et votre client sont donc d'accord sur ce que fait un sort. Le danger Avant de choisir, le module calcule à quel point chaque case serait dangereuse à la fin du tour : combien les ennemis pourraient y infliger au personnage pendant leur prochain tour. Il prend le pire cas. Chaque ennemi est compté depuis chaque case où il peut aller, avec chaque sort qui sera sorti de son temps de relance d'ici là, autant de lancers que ses PA le permettent, les plus gros dégâts par PA d'abord. Le Risque du profil en fait une limite : Risque Où le module évite de finir un tour 0 à 99 Là où les ennemis pourraient tuer le personnage, et là où ils pourraient lui infliger plus que ce pourcentage de sa vie. À 50, la valeur par défaut : plus de la moitié de sa vie. 100 Nulle part : le personnage combat comme si le danger n'existait pas. Le danger au-delà de cette limite compte contre un tour, comme sécurité. Tuer un ennemi retire sa part du danger : un tour qui tue une menace avant de passer devant elle vaut donc plus qu'un tour qui ne le fait pas. Préparer un tour Le module joue des tours sur des copies du combat : se déplacer, lancer un sort, en lancer un autre, se déplacer, finir le tour. Chaque action est jouée avec son résultat attendu : une poussée déplace vraiment la cible, une élimination retire vraiment l'ennemi, et le sort suivant en tient compte. Il n'essaie pas tous les tours possibles, il y en a bien trop. À chaque étape, il garde les 6 meilleurs tours commencés, prolonge chacun avec les meilleures actions suivantes, et va jusqu'à 5 actions de profondeur, dans la limite de 2000 actions par décision. Puis il ne joue que la première action du meilleur tour, attend la réponse du serveur, et décide de nouveau à partir du combat tel qu'il est devenu. Un sort au jet faible, une esquive ou une poussée qui s'est passée autrement ne fait pas dérailler la suite du tour. Le travail est borné par ces nombres, jamais par le temps. Le même combat et le même profil donnent la même décision sur un PC lent et sur un PC rapide, et une décision prend de quelques millisecondes à quelques dizaines de millisecondes. Comment un tour est noté Le score d'un tour additionne ce qu'il fait, chaque partie pondérée par le profil : Critère Ce qui compte Dégâts Les dégâts infligés, en moyenne : les coups critiques comptés selon leur probabilité, plafonnés à ce qui reste à la cible en vie et en bouclier. Élimination Un ennemi tué : la moitié de sa vie maximale, plus le danger qu'il ne représente plus. Soin La vie soignée, jusqu'à ce qui manque. Contrôle Les ennemis gênés : PA et PM retirés, caractéristiques réduites, poussés, mis dans un état. Bonus L'aide durable à son camp : un bonus ou un bouclier sur un allié, ou sur le personnage quand il dure au-delà de son tour. Un bonus qui ne dure que le tour du personnage compte pour ce qu'il lui permet de faire dans ce tour : il est donc lancé quand il rend quelque chose possible. Invocation Une créature invoquée. Sécurité Moins le danger restant au-delà de ce que le risque accepte. Placement À quel point la case où finit le tour convient au profil : sa distance aux ennemis, hors de leur vue pour se cacher. PA inutilisés Moins les PA restants, ou dépensés dans des sorts qui n'ont rien fait. Tort aux alliés Moins les dégâts et la gêne infligés à son propre camp. Une invocation compte pour la moitié d'un combattant de son espèce, dans chaque critère : elle meurt avec son invocateur, si bien que tuer l'invocateur vaut souvent plus. Le rôle fixe les poids, et un profil peut changer chacun d'eux avec Poids : Rôle Dégâts et élimination Soin Contrôle Bonus Invocation Sécurité, placement, PA inutilisés Tort aux alliés Dégâts 1 0,5 1 1 1 1 5 Tank 1 0,5 1,5 1 1 1 5 Soutien 0,7 1 2 2 1 1 5 Soigneur 0,5 2 1 1,5 1 1 5 Le profil déplace ensuite des sorts et des cibles précis : Réglage Effet sur le score L'Utilisation d'un sort Privilégier ×1,5, Éviter ×0,5, Jamais : jamais lancé. L'Arme fait de même pour les coups d'arme. Éléments Un sort d'un élément favorisé ×1,2. Cible prioritaire, la Priorité d'un monstre, une règle de ciblage Frapper l'ennemi ciblé ×2. Un monstre réglé sur En dernier ×0,5, sur Ignorer ×0 : le frapper ne compte pour rien. Plusieurs priorités sur un même ennemi se multiplient. Où finit le tour Une fois qu'il ne reste rien qui vaille la peine d'être lancé, le tour finit là où le profil veut voir le personnage : Portée règle la distance à laquelle il combat. Mêlée, c'est au contact, Distance, la portée de son sort de dégâts le plus long, Mi-distance, la moitié. Automatique, la valeur par défaut, lit les sorts de dégâts du personnage : quand la plupart portent à 2 cases ou moins, il joue en mêlée, à partir de 6 cases à distance, et à mi-distance entre les deux. Positionnement règle comment il y va : garder cette distance, charger, tenir, harceler ou se cacher. Réglages du profil décrit chacun. Rester à distance pour un monstre et les règles de déplacement (Se replier, Approcher, Garder la distance) ajoutent leur propre objectif. Dans tous les cas, la limite de danger tient : le module ne va pas là où le personnage peut être tué quand une autre case fait presque aussi bien. Placement Avant le combat, avec le Placement sur Automatique et les sorts du personnage connus, le module note chaque case de départ de son équipe comme il note un tour : il prévoit le premier tour depuis cette case, et retire le danger qui dépasse le risque, au cas où les monstres joueraient en premier. Avec Proche, il choisit la case la plus proche des ennemis, et avec Loin la plus éloignée. Tant qu'il ne connaît pas les sorts du personnage, Automatique se règle sur la portée : proche en mêlée, loin à distance, à 4 cases de l'ennemi le plus proche sinon. Les sorts du personnage sont connus depuis son combat précédent : seul le premier combat après le démarrage d'Asterobot est placé de cette façon. Les limites qui font avancer un combat Une action à la fois. Le module envoie une action, puis attend la réponse du serveur avant de décider la suivante. Il n'envoie jamais deux fois la même action. 3 secondes sans réponse veulent dire que le serveur n'a pas pris l'action. Le module écarte ce sort, ou les déplacements depuis cette case, pour le reste du tour, et décide de nouveau sans. Le journal des tours la marque Sans réponse. 30 actions par tour au plus, après quoi le tour finit. 2 secondes de marge. Sa dernière décision part au moins 2 secondes avant la fin du temps du tour, si bien que le délai d'une règle ne coûte jamais le tour. Toujours une action. Quand rien ne vaut la peine, il finit le tour. Ce qu'il ne pèse pas encore Marcher dans un piège ou finir un tour dans un glyphe. Il sait où ils se trouvent pour les sorts qui demandent une case libre, mais ne pèse pas ce qu'ils feraient au personnage. Les sorts des invocations d'un ennemi : le module ne sait pas encore quel monstre est une invocation, il les compte donc comme frappant à mains nues. Les bonus de sort que donnent certains équipements, comme plus de portée ou de dégâts sur un sort. Les challenges, et le tour des invocations que le personnage contrôle. Voir Bientôt.
-
Le module de combat
Laissez Asterobot jouer les combats d'un bot : activez le module de combat, choisissez son profil et sa vitesse, voyez ce qui change sur une session relayée, et lisez le journal des tours de ses derniers combats. Read this page in English Asterobot peut jouer les combats d'un bot à sa place. Le module de combat place le personnage, le déclare prêt et joue chacun de ses tours : il se déplace, lance des sorts, frappe avec son arme et termine le tour, avec les mêmes messages que ceux qu'envoie le client Dofus. Sa façon de jouer dépend du profil de combat du bot. Le module joue les combats, il ne les lance pas. Un combat commence quand le personnage attaque un groupe de monstres, se fait agresser ou rejoint un combat, et c'est le travail du paquet du bot, ou le vôtre quand vous jouez sur une session relayée. Une fois le combat commencé, le module le joue jusqu'au bout, puis attend le suivant. Ce qu'il décide Dans un combat contre des monstres, le module décide chaque partie du combat que son profil laisse activée : Partie Ce que fait le module Placement Choisit la case de départ du personnage parmi celles de son équipe. En placement Automatique, une fois les sorts du personnage connus, il choisit la case d'où son premier tour se passerait le mieux, moins le danger qui y dépasse ce que le risque du profil accepte, au cas où les monstres joueraient en premier. Prêt Déclare le personnage prêt, une fois assez d'alliés arrivés (Attendre les alliés). Sans cela, le combat commence à la fin du compte à rebours du placement. Tours Se déplace, lance des sorts, frappe et termine le tour, jusqu'à ce qu'il ne reste rien qui vaille la peine. Il répond aussi à tout ce à quoi le client Dofus répond de lui-même pendant un combat, comme le chargement de la carte du combat et la confirmation de chaque action qu'il a vue. Les challenges ne sont pas encore choisis : voir Bientôt. Chaque décision part du combat tel qu'il est à cet instant. Le module calcule ce que le personnage peut lancer depuis chaque case qu'il peut atteindre, combien chaque sort infligerait ou soignerait, et à quel point chaque case serait dangereuse une fois que les ennemis auront joué, puis il joue le tour que son profil note le mieux. Comment le module décide l'explique en détail. Le module a besoin que la version du jeu du bot soit extraite. Sans données du jeu, il joue avec ce que le jeu lui dit et rien d'autre, ce qui donne de mauvais tours, et la console du bot indique The fight module couldn't read the game data: it plays on without it. Quelques cas qu'il gère tout seul : Le personnage meurt. Le module n'a plus rien à décider, et continue de répondre au jeu jusqu'à la fin du combat. Le bot se reconnecte pendant un combat. Le serveur lui rend le combat, et le module en joue la suite, tour en cours compris. Un combat qui n'est pas contre des monstres, comme un défi ou une agression. Par défaut, le module n'y décide rien et répond seulement à ce à quoi le client répond de lui-même. La console du bot indique This fight isn't against monsters: the fight module only answers what the client answers by itself, and decides nothing. Un profil peut aussi jouer ces combats : voir Combats hors monstres dans Réglages du profil. L'activer Le module a ses propres réglages sur chaque bot, dans l'onglet Combat du bot. Ouvrez Gestionnaire de bots, cliquez sur le nom du bot, puis sur l'onglet Combat. Activez Jouer les combats de ce bot. Le changement est enregistré aussitôt. Choisissez un Profil dans la liste et cliquez sur Appliquer. Laissez-le vide pour jouer le profil par défaut. Choisissez une Vitesse. Tant que le module joue un combat, Joue le combat en cours apparaît à côté de l'interrupteur. Les réglages sont gardés avec le bot, ils survivent donc à un redémarrage. Quand l'enregistrement échoue, Impossible d'enregistrer les réglages de combat en donne la raison. Vous pouvez activer ou désactiver le module pendant un combat. Le changement s'applique au début du tour suivant, si bien qu'un tour n'est jamais joué par deux joueurs à la fois. Avant le premier tour, il s'applique aussitôt. Module désactivé, Asterobot n'envoie absolument rien pendant les combats du bot : le combat appartient au paquet, ou à vous. Le profil La liste Profil contient tous les profils que le bot peut jouer : Idle, les vôtres, et ceux fournis par vos paquets, nommés d'après leur paquet, comme @some-author:fighters/fire-cra. Modifier les profils ouvre la page Profils de combat. Choix Comment le bot combat Vide, affiché Profil par défaut Chaque réglage à sa valeur par défaut. Il s'adapte à n'importe quel personnage : le rôle que sa classe joue en premier, la portée de ses sorts, les sorts qu'il a vraiment. Idle Prend part au combat et passe chaque tour au bout de 5 secondes. Rien d'autre : ni placement, ni prêt. Tout autre profil Comme ce profil le dit. Le profil est relu au début de chaque combat, donc un profil que vous modifiez joue dès le combat suivant. Quand le profil ne peut pas être joué, parce qu'il a été supprimé, qu'il a une erreur ou que son paquet a été retiré, le bot joue le profil par défaut et sa console indique The fight profile can't be played: the default profile plays. Un profil que vous avez supprimé reste sélectionné dans la liste, pour que vous voyiez sur quoi le bot est réglé. Vitesse La vitesse règle à quelle allure le module agit. Quelle que soit la vitesse, il décide la même chose. Vitesse Avant chaque décision Ses réponses au jeu Lente Réfléchit 1,5 à 4 secondes Envoyées une fois que le client Dofus aurait joué ce qui s'est passé Normale (par défaut) Réfléchit 0,6 à 1,8 seconde Envoyées une fois que le client Dofus aurait joué ce qui s'est passé Turbo Décide aussitôt Envoyées aussitôt Warning Turbo répond aussitôt après chaque sort, plus vite qu'aucun vrai client de jeu : cela se remarque facilement. Le serveur l'accepte, mais quiconque regarde les combats du bot, ou ses délais, peut s'en apercevoir. Sur une session relayée Un bot en mode MITM (man-in-the-middle, « l'homme du milieu » : le bot relaie la session d'un client Dofus que vous jouez) peut aussi jouer ses combats. Votre client Dofus continue d'afficher le combat au fil de l'eau, mais tant que le module joue, les clics que vous faites pour ce que le profil décide sont sans effet : Asterobot les retient. Cela concerne vos déplacements, vos sorts et la fin de vos tours, ainsi que les boutons de placement et de prêt quand le profil laisse ces parties activées. Si vous cliquez quand même, le client de jeu affiche, au plus toutes les 10 secondes, une fenêtre dans la langue du bot : Le module de combat d'Asterobot joue ce combat : le jeu ne prend pas en compte ce que vous faites ici. Désactivez le module pour jouer dès le tour suivant. Ce que le profil laisse désactivé reste à vous : avec Placement désactivé dans ses Parties, vous placez le personnage vous-même et le module joue les tours. Pour reprendre tout le combat, désactivez le module : vous jouez dès le tour suivant. Mode MITM explique les sessions relayées. Journal des tours Le Journal des tours, en bas de l'onglet Combat, garde chaque décision des 10 derniers combats du bot, jusqu'au redémarrage d'Asterobot. Le combat le plus récent vient en premier et est ouvert : il indique quand il a commencé, En cours tant qu'il dure, sa carte et combien de décisions il a comptées. Le bouton d'actualisation à côté du titre relit le journal. Chaque décision se lit ainsi : Partie Ce qu'elle montre Heure et tour Quand elle a été envoyée, et le tour du combat. Action Placement, Prêt, Déplacement, Sort ou Fin du tour. Détails La cellule, ou le sort et la cellule sur laquelle il a été lancé. Arme ou mains nues est un coup d'arme. Score Ce que le profil en a pensé, puis ce que ce score a compté : dégâts, élimination, soin, contrôle, bonus, invocation, sécurité, placement, PA inutilisés, tort aux alliés. Aussi envisagé Les meilleures options suivantes, avec leur score. Sans réponse Le serveur n'a pas pris l'action. Le module a décidé de nouveau sans elle. Suivre un combat Pendant un combat, l'onglet Carte du bot montre la carte du combat avec chaque combattant là où il se tient, au fil de ses déplacements, des poussées et des morts. Bientôt Note Bientôt. Ces parties d'un combat ne sont pas encore jouées par le module : Les challenges. Le module ne choisit pas les challenges. Sur une session relayée, les choisir reste à vous, même quand le module joue ; sur un bot en mode Full socket, aucun n'est choisi. Les invocations que vous contrôlez, comme les fées de l'Eniripsa. Le module ne joue pas leur tour, qui s'écoule au bout de 15 secondes. Les invocations qui jouent seules, comme celles de l'Osamodas, ne sont pas concernées. Un plateau en direct dans l'onglet Combat, montrant le combat tel que le module le voit. Des scripts qui pilotent le module, depuis un paquet. Ensuite, Comment le module décide explique comment il choisit chaque action, et Profils de combat comment créer et partager des profils.
-
Fights
Short answers about the fight module, fight profiles, playing fights yourself, Turbo, PvP, challenges, summons and Dofus updates. How bots play their fights, and how to change the way they do. Can a bot fight on its own? Yes. Switch on Play this bot's fights on the bot's Fight tab, and the fight module places the character, says it's ready and plays every turn, in Full socket mode as in MITM mode. See The fight module. Does the bot attack monsters by itself? No. The fight module plays fights, it doesn't start them. Attacking a group is the job of the bot's package, or yours on a relayed session. Once the fight starts, the module takes over. Do I need a fight profile? No. With Profile left empty, the bot plays the default profile, which adapts to any character: the role its class plays first, the range its spells reach, the spells it really has. Make a profile when you want it to play differently. See Fight profiles. Does it work for every class? Yes. The module has no move written for a class. It reads every spell, effect and monster from the game data and works out what the character can do, so a new class, a new spell or a rebalanced one plays without waiting for an Asterobot update, once the new game version is extracted. See How the module decides. Can I play a fight myself on a relayed session? Yes. Switch the module off on the Fight tab: you play from the next turn. To leave only some parts to yourself, such as placement, switch them off in the profile's Parts instead. While the module plays, your clicks for what it decides are held back, and the game client says so. See On a relayed session. Is Turbo safe? Turbo decides the same things as the other speeds, but answers at once after every cast, faster than any real game client. The server accepts it, but it's easy to notice. Normal plays at the game client's pace. See Speed. Does it play duels and other fights against players? Not by default: in a fight that isn't against monsters, the module only answers what the game client answers on its own. Set Fights not against monsters to Play in the profile to have them played, knowing that the module doesn't know enemy characters' spells yet. See Profile settings. Does it do challenges? Not yet: the module doesn't choose challenges. On a relayed session, choosing them stays yours. Why does my summon do nothing? Summons that play on their own, such as the Osamodas's, play as usual. Summons you control yourself, such as the Eniripsa's fairies, aren't played by the module yet: their turn runs out after 15 seconds. See Fight problems. How do I share a profile? Export it on the Fight Profiles page and send the .json file. The other person opens Import. A package can also ship profiles, which everyone who installs it gets. See Share profiles. What happens to my profiles when Dofus updates? Nothing: they name spells, monsters and states by their game ids, which updates keep. When an update removes something a profile names, the profile still plays and shows a warning such as spell 12345: not in the game data, ignored. Extract the new game version so the module knows the new rules.
-
Fight problems
Why a bot does nothing in a fight, passes its turns, plays a profile you didn't pick, keeps refusing actions or ignores your clicks on a relayed session, and what to do about each. When the fight module doesn't play the way you expect, two places tell you why. The bot's Console tab says when a fight starts, whether the module plays it, and every action it sends. The Turn log on the Fight tab keeps every decision of the last 10 fights, with what each one counted (The fight module). The bot does nothing in a fight Check, in order: The module is off. The console says A fight started: the fight module is off and sends nothing. Switch on Play this bot's fights on the bot's Fight tab. A switch made during a fight takes effect at the next turn. The fight isn't against monsters. The console says This fight isn't against monsters: the fight module only answers what the client answers by itself, and decides nothing. That's the default for duels, aggressions and other fights against players: set Fights not against monsters to Play in the profile if you want them played (Play). The profile switches its parts off. Idle places nothing and passes every turn. Check Parts in the profile's Play section. The character is dead. A dead character has nothing left to decide: the module keeps answering the game until the fight ends. The bot passes every turn after a few seconds It plays Idle, or a profile with a rule that ends the turn. Idle passes every turn after 5 seconds. Pick another profile on the Fight tab, or leave Profile empty for the default profile. In your own profile, look for Pass every turn after (seconds) in Play, and for End the turn rules. The bot plays the default profile instead of mine The console says The fight profile can't be played: the default profile plays, with the reason. The profile was deleted, it has an error, or its package was removed. Open Fight Profiles: a profile marked Can't be played shows the reason when you hover over it, and the editor shows it above the form. Fix it and save, or pick another profile. The profile is read again at the next fight. The console says The fight profile extends a missing profile: it plays its own fields over the default profile when the profile it extends is gone. Set Extends to an existing profile, or to None. The bot never says it's ready It waits for its group: Wait for allies in the profile's Play section asks for more characters on its team than have joined. The placement countdown still starts the fight when it runs out. Lower the number, or check that the other bots really join the same fight. With the Ready part off, the module doesn't say it's ready at all: the countdown starts the fight. Not answered keeps coming back Not answered in the turn log means the server didn't take an action within 3 seconds. The module drops that spell, or walking from that cell, for the rest of the turn, and decides again without it, so a fight never gets stuck on it. The console says The server didn't answer the fight module's action: it decides again without it, or The server refused the fight module's action: it decides again without it when the game said no. The module works out what's possible the way the game does, so a refusal means it misjudged something, most often the AP and MP an enemy takes when the character walks away from it. When the same action is refused again and again, note the fight in the turn log and tell the Asterobot team (Getting help). My clicks do nothing during a fight On a relayed session, while the module plays a fight, the clicks you make for what its profile decides are held back, and your game client shows "Asterobot's fight module is playing this fight, so the game doesn't take what you do here. Turn the module off to play from the next turn." Switch the module off on the Fight tab to play yourself from the next turn, or switch off the parts you want to keep in the profile, such as Placement. A summon's turn runs out Summons you control yourself, such as the Eniripsa's fairies, aren't played by the module yet: their turn runs out after 15 seconds. On a relayed session, the module holds back your clicks during their turn too. Avoid casting those spells in the meantime, with Use set to Never for them in the profile's Spells. The module plays badly No game data. The console says The fight module couldn't read the game data: it plays on without it. Extract the bot's game version. A setting works against the character. A melee range on a ranged class, a low risk on a tank: the turn log shows what each decision counted. Compare with How the module decides, and change one setting at a time. Turbo. It decides the same things as the other speeds, but answers faster than any real game client: see Speed. Names or icons are missing in the profile editor The editor reads names and icons from the game data. Without an extracted game version, spells, monsters and states show as their ids. Icons appear once the game data has been extracted by an Asterobot that extracts them: after updating Asterobot, extract the game version again on Game Manager (Extract game data).
-
Profile examples
Whole fight profiles for common cases, a ranged Cra, a melee Iop, an Eniripsa healer, a careful farmer, a group and a tweaked package profile, each explained setting by setting. These profiles show how the settings work together. Copy one into Import on the Fight Profiles page (Share profiles), then change what you like in the editor. The ids are those of the game data: the editor shows their names. Start small. A profile with a role, a range and elements already plays well for any character of that kind, and every setting you add should answer something you saw go wrong in the turn log. A ranged Cra { "version": 1, "name": "Air Cra", "description": "Hits from afar, steps back after casting, opens with Distant Shots.", "role": "damage", "range": "ranged", "elements": ["air"], "placement": "far", "positioning": "kite", "focus": "lowestLife", "opening": { "firstTurn": [{ "spell": 32465, "target": "self" }] }, "rules": [ { "when": { "enemies.within": { "cells": 2, "atLeast": 1 } }, "do": { "retreat": { "to": "outOfReach" } } } ] } Range ranged and Placement far keep the Cra at the reach of its longest damaging spell, from the start. Positioning kite: once it has cast, it ends the turn where the danger is least. Focus lowestLife finishes enemies first, which removes their danger sooner. The opening casts Distant Shots (32465) on itself in its first turn, for the extra range of its spells. The rule makes it step out of reach as soon as an enemy stands within 2 cells. A melee Iop { "version": 1, "name": "Earth Iop", "role": "damage", "range": "melee", "elements": ["earth"], "risk": 70, "positioning": "charge", "opening": { "firstTurn": [{ "spell": 14676, "target": "self" }] }, "spells": [ { "id": 13107, "use": "avoid" } ] } Range melee and Positioning charge bring it into contact, whatever the danger. Risk 70 lets it end turns where the enemies could take up to 70% of its life. The opening casts Fervour (14676) on itself in its first turn. Jump (13107) is set to Avoid: its score is halved, so it's only cast when it clearly beats everything else. An Eniripsa healer { "version": 1, "name": "Eniripsa healer", "role": "healer", "allies": "protect", "positioning": "hold", "rules": [ { "when": { "ally.life": { "below": "50%" } }, "do": { "heal": { "target": "lowestLifeAlly" } } }, { "when": { "self.life": { "below": "35%" } }, "do": { "heal": { "target": "self" } } } ] } Role healer weighs healing at 2 and damage at 0.5, where the Damage role weighs them at 0.5 and 1. Allies protect counts the danger its allies are in as its own. Positioning hold keeps it where it stands unless a cast needs it to walk. The first rule heals the most hurt ally whenever one is below half its life. The second, below it, heals the Eniripsa itself: the ally comes first when both apply. A healer without allies to heal still fights: with no one hurt, healing counts nothing, and it hits like any other role, at half weight. A careful farmer For a character farming monsters that can kill it, which should take no chances: { "version": 1, "name": "Careful", "risk": 20, "focus": "mostDangerous", "rules": [ { "when": { "self.life": { "below": "40%" } }, "do": { "retreat": { "to": "cover" } } } ], "monsters": [ { "race": 137, "noMelee": true } ] } Risk 20: it avoids ending a turn where the enemies could take more than a fifth of its life. Focus mostDangerous hits first the enemy that could hurt it the most. Below 40% of its life, it ends its turns out of the enemies' sight when it can. It never ends a turn beside a monster of the Incarnam Chafers race (137). Role, range and elements are left out: the module takes them from the character's class and spells, so this profile suits any class. A group of bots For several bots fighting together, which join the same fight one after the other: { "version": 1, "name": "Group", "waitForAllies": 3, "allies": "protect" } Each bot waits until 3 other characters are on its team before saying it's ready, so the fight doesn't start before the group is complete. The placement countdown still starts it when it runs out. Joining the fight is the job of the bots' packages. Pass the turns, but place the character Idle takes part in fights and does nothing. This copy of it also places the character and says it's ready, and passes after 2 seconds instead of 5: { "version": 1, "name": "Idle, placed", "parts": { "placement": true, "challenges": false, "ready": true, "movement": false }, "rules": [ { "do": { "endTurn": { "after": 2 } } } ] } A package's profile, tweaked To play a profile a package ships while changing a few settings, extend it rather than copying it: when the package is updated, your profile follows. { "version": 1, "name": "Fire Cra, careful", "extends": "@some-author:fighters/fire-cra", "risk": 25, "spells": [ { "id": 32426, "use": "prefer" } ] } It plays everything the package's profile says, with a lower risk, and prefers Retreat Arrow (32426) on top of the package's own spell settings. Extend another profile explains how the two are put together.
-
Rules and conditions
Make a fight profile react to the fight with rules: a condition such as low life or an enemy nearby, and an action such as retreating, healing, focusing a target or ending the turn, with every subject, test, action and target. Rules make a profile react to what happens in the fight: retreat when the character's life runs low, heal an ally in trouble, hit a given monster first while it's there, keep away when enemies crowd in. Each rule is a condition and one action, and the Rules section of the editor lists them in order. "rules": [ { "when": { "self.life": { "below": "30%" } }, "do": { "retreat": { "to": "outOfReach" } } }, { "when": { "ally.life": { "below": "40%" } }, "do": { "heal": { "target": "lowestLifeAlly" } } } ] How rules apply Before each action of the character's turn, the module checks every rule's condition against the fight as it is at that moment, so a rule can start or stop applying in the middle of a turn. A rule without a condition applies all the time. Rules come in two kinds. Modifiers change how the module scores a turn, and add up: every Focus and Avoid whose condition holds applies; of the movement rules, Retreat, Approach and Keep distance, only the first one whose condition holds applies. Forcing actions tell the character what to do next: Cast, Attack, Heal, Buff and End the turn. The opening's spells come first, then these rules, in their order. The first one that can be played right now becomes the character's next action, and the module plays the rest of the turn freely. One that can't be played, for lack of AP, of a target in range or of the target itself, is passed over. So order matters for forcing actions: put the most urgent first. A rule like "heal when an ally is low" placed above "attack the lowest life enemy" heals first whenever both apply. Actions Action JSON Settings What it does Cast cast spell: a spell, or "weapon". target: optional. Casts this spell first, on the target when one is set, otherwise wherever it does the most. Attack attack target: optional Attacks first, with its best damaging spell or the weapon, on the target when one is set. Heal heal target: optional Heals first, the target when one is set. Buff buff target: optional Casts a buff first, on the target when one is set. Retreat retreat to: Cover (cover) or Out of reach (outOfReach) Ends its turns away from danger: Cover, out of every enemy's sight when it can, as Hide positioning does; Out of reach, where the danger is least, as Kite does. Approach approach target: optional Ends its turns close to the target, or to the nearest enemy when none is set. Keep distance keepDistance min and max: cells Ends its turns between min and max cells from the nearest enemy. max 0 means no upper limit. Focus focus target Hitting the target scores twice as much. Avoid avoid spell: a spell, or "weapon". target: optional. Doesn't cast that spell, and hitting the target counts nothing, while the rule applies. End the turn endTurn after: seconds, default 0 Ends the turn without acting, once that many seconds have passed since it began. End the turn is a forcing action like the others: when it's the first one that can be played, the character does nothing else in that turn. Its delay never costs the turn: the module ends it at least 2 seconds before the turn's time runs out, whatever after says. A rule with no condition that ends the turn is what Pass every turn after (seconds) writes in Play. Targets A rule's target names one fighter, worked out again at each decision. Target JSON The fighter Anyone Left out No one in particular: the module chooses. Self "self" The character. Lowest life enemy "lowestLifeEnemy" The enemy with the least life left. Lowest life ally "lowestLifeAlly" The ally with the least life left, the character not counted. Closest enemy "closestEnemy" The enemy nearest the character. Most dangerous enemy "mostDangerousEnemy" The enemy that could deal the character the most where it stands. A monster { "monster": 4109 } An enemy of that monster. A race { "race": 137 } An enemy of that monster race. { "fighter": -2 } Only in the JSON: one fighter of the fight, by the id the game gives it. Mostly for scripts. When two fighters tie, the one with the lowest id is taken. A target that isn't in the fight, such as a monster that isn't there or that died, makes a forcing rule pass over itself. Conditions A condition holds when every test in it holds. In the editor, Only when opens the condition, Test adds a test, and All of, Any of and Not add a group. Subjects Each test reads one subject of the fight. The editor names it as whose and what, such as Character · HP. Subject JSON Tests Reads Character · HP self.life below, above The character's life, as a number or a percent of its maximum. Character · Shield self.shield below, above Its shield points, as a number or a percent of its maximum life. Character · AP self.ap below, above Its AP left. Character · MP self.mp below, above Its MP left. Character · States self.state is Whether it is in that state. Enemies · States enemy.state is Whether an enemy is in that state. Allies · States ally.state is Whether an ally is in that state, the character not counted. Allies · HP ally.life below, above Whether an ally's life is in that range, the character not counted. Enemies · Number enemies.count is, atLeast, atMost How many enemies are alive, summons included. Allies · Number allies.count is, atLeast, atMost How many allies are alive, summons included, the character not counted. Enemies · Nearby enemies.within cells, then atLeast, atMost How many enemies stand within cells cells of the character. Allies · Nearby allies.within cells, then atLeast, atMost How many allies stand within cells cells of the character. Enemies · Monster enemy.monster is Whether that monster is among the living enemies. Enemies · Race enemy.race is Whether a monster of that race is among the living enemies. Fight · Round fight.round is, atLeast, atMost The fight's round. Fight · Turns fight.turn is, atLeast, atMost How many turns the character has played in this fight, the current one included. Target · HP target.life below, above In a spell's condition only: the life of the fighter the spell is cast on. Target · Distance target.distance below, above In a spell's condition only: how many cells away that fighter is. A subject this Asterobot doesn't know never holds, and the profile shows a warning for it. Tests Test JSON Holds when Below below The value is strictly less. A number, or a percent written as text, such as "30%". Above above The value is strictly more. A number or a percent. Is is The value is exactly this, or for states, monsters and races, this one is there. At least atLeast The count is this or more. At most atMost The count is this or less. Within (cells) cells For Nearby: the distance counted, in cells. A test with several bounds needs all of them: { "below": "60%", "above": "20%" } holds between a fifth and three fifths of the character's life. Groups Group JSON Holds when All of these all Every condition in its list holds. Any of these any At least one condition in its list holds. Not this not Its condition doesn't hold. Groups go inside a condition and can hold groups of their own. This condition holds in the first two rounds, or when an enemy is in the Weakened state (a state's id, picked by name in the editor), as long as fewer than 3 enemies stand within 2 cells: "when": { "any": [ { "fight.round": { "atMost": 2 } }, { "enemy.state": { "is": 42 } } ], "not": { "enemies.within": { "cells": 2, "atLeast": 3 } } } Examples End the turns where the danger is least while the character's life is below 30%: { "when": { "self.life": { "below": "30%" } }, "do": { "retreat": { "to": "outOfReach" } } } Keep a healer's allies alive first: { "when": { "ally.life": { "below": "40%" } }, "do": { "heal": { "target": "lowestLifeAlly" } } } Don't let enemies surround the character: { "when": { "enemies.within": { "cells": 1, "atLeast": 2 } }, "do": { "keepDistance": { "min": 2 } } } Hit the L'il Gloot first while it's in the fight: { "when": { "enemy.monster": { "is": 4109 } }, "do": { "focus": { "target": { "monster": 4109 } } } } Keep the weapon for the end of the turn: no weapon hit while the character still has more than 4 AP: { "when": { "self.ap": { "above": 4 } }, "do": { "avoid": { "spell": "weapon" } } } Wait 10 seconds and pass from round 30 on, to let a long fight run out: { "when": { "fight.round": { "atLeast": 30 } }, "do": { "endTurn": { "after": 10 } } } Profile examples puts rules together with the other settings in whole profiles.
-
Profile settings
Every setting of a fight profile, section by section as the editor shows them, with its JSON key, its values, its default and what it changes in a fight. This page describes every setting of a fight profile, in the order of the editor's sections. Each one gives the form's label, the key it has in the profile's JSON, its values and its default. A setting you leave out plays its default, so a profile only needs the settings you want to change. Rules have their own page: Rules and conditions. A short profile already makes a full one: { "version": 1, "name": "Air Cra", "role": "damage", "range": "ranged", "elements": ["air"], "positioning": "kite" } How the module decides explains what the module does with these settings, and Profile examples shows whole profiles for common cases. General Setting JSON Values Default Name name Text. Required. Description description Text, for you and the people you share it with. Empty Extends extends The name of another profile: Idle, one of yours or a package's. None version 1, the version of the profile format. Only in the JSON. 1 Extend another profile explains Extends. Archetype Role role: what the character is for in a fight. It sets the weight of each part of a turn's score (How a turn is scored). Value JSON Plays Damage damage Hits first. Tank tank Hits, and hinders the enemies more. Support support Hinders the enemies and helps its side first, hits less. Healer healer Heals first, helps its side, hits least. Empty, the default, takes the role the game ranks first for the character's class: Damage Dealer, Positioner and Summoner play Damage, Tank plays Tank, Healer plays Healer, and Protector, Buffer and Debuffer play Support. When the class isn't known, Damage. Range range: the distance the character fights at, and where it's placed when its spells aren't known yet. Value JSON Distance from the nearest enemy Automatic auto From the reach of its damaging spells, the weapon left out: when most of them reach 2 cells or less, melee; from 6 cells, long range; otherwise mid range. Without spells, mid range. Melee melee In contact. Mid range mid Half the reach of its longest damaging spell. Long range ranged The reach of its longest damaging spell. Default: Automatic. The reach counts the character's range bonus and the spells' range changes. Elements elements: the elements whose spells it favours, among Earth (earth), Fire (fire), Water (water), Air (air) and Neutral (neutral). A damaging spell of one of them scores 1.2 times as much. Empty, the default, favours none: the module casts whatever hits hardest with the character's real characteristics, which follows its build and gear. Risk risk: how much danger the character accepts, from 0 (careful) to 100 (reckless). Default: 50. The module avoids ending a turn where the enemies could deal it more than this percent of its life on their next turn, and where they could kill it, unless the risk is 100. The danger explains how that danger is worked out. Placement placement: where the character starts the fight. Value JSON Starting cell Automatic auto The one its first turn would go best from, less the danger there beyond its risk. Before its spells are known, by range: close for melee, far for long range, 4 cells from the nearest enemy otherwise. Close close The one nearest the enemies. Far far The one farthest from the enemies. Default: Automatic. The module only places the character when the Placement part is on (see Play). Positioning positioning: where the character ends its turn, once nothing is left worth casting. Value JSON Ends its turns Automatic auto At its range's distance, never where it can be killed when it can help it, nor beyond the danger its risk accepts. Charge charge In contact with the enemy, whatever the danger. Hold hold Where it stands: it only walks to reach a cast. Kite kite Once it has cast this turn, where the danger is least, then as far from the enemies as it can. Before that, it closes in as Automatic does. Hide hide As Kite, preferring a cell no enemy can see, behind a wall or a fighter, when the danger there is as low. Default: Automatic. Focus focus: which enemy it hits first. Hitting that enemy scores twice as much. Value JSON Hits first Best score auto No one in particular: whatever scores best. Lowest life lowestLife The enemy with the least life left. Closest closest The enemy nearest the character. Most dangerous mostDangerous The enemy that could deal the character the most where it stands. Default: Best score. Monsters and rules can add their own focus: see Monsters and Rules and conditions. Allies allies: how it treats the other fighters of its team, characters and summons. Value JSON Treats them Ignore ignore Only avoids hurting them: healing or buffing them counts nothing. Help help Heals and buffs them when it's worth it, and avoids hurting them. Protect protect As Help, and the danger they're in counts as much as its own, so it prefers turns that leave them safer: killing or hindering what threatens them first. Default: Help. Hurting its own side always counts against a turn, by default five times as much as hurting an enemy counts for it, whatever this says. Play Parts parts: the parts of a fight the module decides. Each is on unless the profile switches it off. Part JSON When it's off Placement parts.placement The module doesn't move the character before the fight. On a relayed session, you place it yourself. Ready parts.ready The module doesn't say the character is ready: you do on a relayed session, otherwise the fight starts when the placement countdown ends. Moving parts.movement The character never walks in its turns: it casts from where it stands. parts.challenges Only in the JSON. The module doesn't choose challenges yet, whatever it says. The turns themselves are always played: to leave them to someone else, switch the module off, or pass every turn with the setting below. Pass every turn Pass every turn after (seconds): when checked, the character ends every turn after that many seconds, without acting. It's a rule without a condition, { "do": { "endTurn": { "after": 5 } } }, which the form shows here rather than among the rules. Idle is exactly that, with every part off. Weapon weapon: what it does with the weapon it holds, or with bare hands when it holds none. Setting JSON Values Default Weapon weapon.use Prefer (prefer), Normal (normal), Avoid (avoid), Never (never), as for a spell (see Spells) Normal Weapon hits per turn weapon.maxPerTurn A number, 0 for no limit but the weapon's own 0 Fights not against monsters pvp: what it does in a fight against other players, such as a duel or an aggression. Value JSON In those fights Idle idle Decides nothing: the module only answers what the Dofus client answers on its own. On a relayed session, you play them. Play play Plays them as fights against monsters. Default: Idle. Fights against monsters are the PvM fights and the breaches; every other kind of fight counts as one not against monsters. Note The module doesn't know the spells of enemy characters yet. With Play, it can't see what they could do to it on their turn, so its sense of danger is low in those fights. Wait for allies waitForAllies: how many other characters must be on the character's team before it says it's ready. Default: 0. It's for group fights where several bots join one after the other: the character waits for the others, and the placement countdown still starts the fight when it ends. Spells spells: what the profile says about some spells. A spell not listed is used normally, so only list the spells you want to change. Listing a spell the character doesn't have does nothing. Setting JSON Values Default Spell id A spell, picked in Choose a spell. Required. Use use Prefer (prefer, scores 1.5 times as much), Normal (normal), Avoid (avoid, half as much), Never (never, never cast) Normal Per turn at most maxPerTurn A number, 0 for no limit but the spell's own 0 Cast on target Anyone (any), Enemies (enemy), Allies (ally), Self (self): who the spell may be aimed at Anyone Enemies hit at least minTargets A number: a cast must hit at least that many enemies 0 Only when when A condition the cast must meet: see Conditions Always A spell's condition can also test the fighter it's cast on, with Target · HP (target.life) and Target · Distance (target.distance). For example, an Iop's Chopper (13115), preferred but kept for enemies below a third of their life: { "id": 13115, "use": "prefer", "when": { "target.life": { "below": "33%" } } } The weapon isn't a spell entry: set it with Weapon in Play. An entry without a spell is refused with spells[0].id: required: the weapon is the profile's weapon. Opening opening: spells cast first in a turn, in order, whenever they can be cast. The module plays the rest of the turn as usual. Setting JSON When First turn opening.firstTurn In the character's first turn of the fight, before Every turn's. Every turn opening.everyTurn In each of its turns. Each list holds spells in the order they're cast. A spell listed twice is cast twice. A step that can't be cast right now, for lack of AP, range or line of sight, is skipped, and the next one is tried. In the JSON, a step is a spell's id, "weapon" for a weapon hit, or an object that also says whom to cast it on. For an Iop that casts Fervour (14676) on itself in its first turn, then opens every turn with Pressure (13106): "opening": { "firstTurn": [{ "spell": 14676, "target": "self" }], "everyTurn": [13106] } The target takes the same values as a rule's: see Targets. The form edits plain lists of spells; a list with a step aimed at a target is edited in the JSON. Monsters monsters: what it does with some monsters, picked one by one (By monster) or by their race (By race). Setting JSON Values Default Monster or Race id or race A monster, or a monster race. One of the two is required. Focus focus First (first): hitting it scores twice as much. Last (last): half as much. Ignore (ignore): hitting it counts nothing. Empty: as any other Keep away (cells) keepAway The fewest cells the character ends its turns from it 0 Never stand beside noMelee true: ends its turns at least 2 cells from it false An entry applies to every monster of the fight it matches. A monster that matches several entries, such as one by monster and one by its race, gets all of them: the focuses multiply, and the largest distance holds. For a character that kills L'il Gloots (4109) first and keeps 3 cells away from every monster of the Incarnam Chafers race (137): "monsters": [ { "id": 4109, "focus": "first" }, { "race": 137, "keepAway": 3 } ] Weights weights: what each part of a turn's score is worth against the others. The role sets them (How a turn is scored has the table), and a weight set here replaces the role's. Each is a number, 0 or more. Weight JSON What it weighs Damage damage Damage dealt. Kill kill An enemy killed. Heal heal Life healed. Control control Enemies hindered: AP, MP or characteristics lowered, pushed, put in a state. Buff buff Lasting help to its side. Summon summon A summon brought in. Safety safety Ending the turn out of danger. Position position Ending the turn at the profile's distance. Unused AP waste AP left unused. Harm to allies allyHarm Harm done to its own side. Default: 5. Weights are for fine tuning, after role, range, risk and the other settings. A weight of 0 switches a part off: "safety": 0 makes the character ignore the danger altogether. A name that isn't one of these is ignored, with a warning. Challenges Note Coming soon. Profiles will say which challenges to choose and how hard to try for them. Until then, a challenges setting written in a profile is kept as it is and has no effect. Next, Rules and conditions explains rules: what the character does when something happens in the fight.
-
Fight profiles
Make, copy, import, export, edit and delete the fight profiles your bots play, on the Fight Profiles page, with the default profile, Idle, the profiles packages ship and profiles that extend another. A fight profile tells the fight module how a bot plays: the role the character takes, the distance it fights at, which spells it prefers, which monsters it hits first, what it does when its life runs low. Each bot plays one profile, chosen on its Fight tab (The fight module), and one profile can serve as many bots as you like. You don't need a profile to start. The default profile adapts to any character on its own, and a profile only needs the settings you want to change. A few lines, such as a role, a range and elements, already make a profile that adapts to any character of that kind; everything else is for making it yours. Where profiles come from Profile What it is Can you change it? The default profile Every setting at its default. It isn't in the list: a bot plays it when its Profile is empty. No: it's what every setting falls back to. Idle, Built-in Takes part in the fight and passes every turn after 5 seconds. Every part off, one rule. No. Copy it to change the delay or switch parts back on. Yours Profiles you made, copied or imported. Each is a file in Asterobot's data folder. Yes. A package's, Package Shipped by a package you installed, named after it, such as @some-author:fighters/fire-cra. No. Copy it to change it. The Fight Profiles page Open Fight Profiles in Asteroboard's menu. The page lists every profile: Idle first, then yours by name, then those of your packages. Column What it shows Name The profile's name, the one a bot's Profile list shows. Source Yours, Built-in or Package. Status Ready, Can't be played when it has an error, or how many warnings it has. Hover over it to read them. The filter above the table finds a profile by name. Each row has a menu: Item What it does Edit Opens your profile in the editor. View for Idle and a package's, which open read-only. Copy Saves a copy under a name of your own, then opens it in the editor. Export Downloads the profile as a .json file. Delete Deletes one of your profiles, after asking. Idle and a package's can't be deleted. The page stays current on its own when a profile is saved, imported or deleted, and when a package is installed or removed. Make a profile Click New profile. Type a Name, then click Create. The editor opens on the new profile. Every setting starts at its default, so it plays like a bot with no profile until you change something. A name is also the profile's file name: it can't be empty, start with @, or contain a / or a character a file name can't hold. The dialog then shows fightprofiles: a profile's name can't be empty, start with @, or hold / or a character a file name can't. A name another profile has gives fightprofiles: a profile already has this name. Copy a profile Copy in a row's menu, or in the editor, opens a dialog with the name filled in as the original's followed by copy. Change it if you like, then click Copy. The copy is yours, with every setting the original had. Copying is how you change Idle or a package's profile: the copy is a profile of yours that you can edit. To keep following a package's profile as it's updated while changing a few settings, extend it instead (see Extend another profile). Share profiles Export downloads the profile exactly as it's stored, as a file named after the profile, such as fire-cra.json. Characters other than letters, digits, ., - and _ become - in the file name. To use a profile someone shared: Click Import. Pick the file under Profile file, or paste the JSON under Profile JSON. Picking a file fills in the text, so what you see is what's imported. Click Import. The profile joins yours under the name it carries. When you already have a profile with that name, the dialog asks "You already have a profile named ... Replace it with this one?", and Replace it overwrites yours. Text that isn't JSON gives "This isn't valid JSON:" with the reason, and JSON that isn't an object gives "A profile is a JSON object." A profile Asterobot can't accept is refused with the reason, as when you save it. A profile names spells, monsters and states by their game ids, which are the same for everyone playing the same game version, so a shared profile plays the same on another Asterobot. Delete a profile Delete asks first: "... will be deleted for good. Bots set to it will play the default profile." Bots set to it keep its name and play the default profile until you give them another one. The editor The editor shows the profile twice: the form on the left, section by section, and its JSON on the right. Both are live. A change in the form shows in the JSON at once, and JSON you type fills the form as soon as it reads as a profile. The sections are General, Archetype, Play, Spells, Opening, Monsters, Rules and Weights. Profile settings describes every field, and Rules and conditions the rules. Empty means default. A field you leave empty shows Default, or Inherited: with the value the extended profile gives it. The reset button next to a field you set empties it again. Picking spells. Spells are chosen in Choose a spell: pick a class to list its spells, each beside its variant, with their AP cost, range and icon, followed by the spells of the summons those spells bring and the spells every class can learn. Type to filter them, or to search every other spell of the game by name. Picking monsters, races and states. Type a few letters of the name, in the game's language, and pick it in the list. Monsters and states show their icon. Saving. Save is greyed out until something changes. Leaving the page with unsaved changes asks "Leave without saving your changes?" first. Renaming. Changing the Name in General and saving renames the profile, and every bot playing it follows the new name. What the form doesn't show. Some settings are written in the JSON only, such as an opening spell aimed at a target or a fighter targeted by its id in a rule. The form shows them as they're written and keeps them. Settings it doesn't know, written for a newer Asterobot, are kept too. Names and icons come from the game data of the game version your Asterobot is made for, or of the newest version you extracted when that one isn't, in the language you use Asteroboard in. Icons appear once that version's game data has been extracted with them: after updating Asterobot, extract it again on the Game Manager page (Extract game data). Errors and warnings When you save, Asterobot checks the profile. A value it can't use stops the save, and the editor shows the reason with the field it's about, such as: fight: malformed profile: spells[0].use: "sometimes" is not one of prefer, normal, avoid, never The field is written the way the JSON is: spells[0] is the first entry of Spells. Fix it in the form or the JSON, and save again. Other things don't stop it from playing, and show as warnings above the form, under Worth knowing: Warning What it means spell 12345: not in the game data, ignored An id the newest game version you installed doesn't have. The same for monster, monster race and state. rules[0].when.self.something: no such subject: never holds A condition that this Asterobot doesn't know. It never holds. weights.something: no such scoring term: ignored A weight with an unknown name. version: 2 is newer than this module's 1: what it adds is ignored A profile written for a newer Asterobot. extends: no profile has this name: its own fields play over the default profile The profile it extends is gone. name: "...", but its file is "....json": it plays as "..." A file renamed by hand: the file's name wins. A profile that can't be played at all, such as a file that isn't JSON or one whose extends itself extends another profile, shows Can't be played as it is with the reason. A bot set to it plays the default profile. Extend another profile Extends, in General, makes a profile start from another one: it takes every setting of that profile, and changes only the ones it sets itself. It's the way to follow a package's profile, or one of your own, and keep a few changes on top: What the profile sets What it plays A setting such as Role or Risk Its own value, instead of the extended profile's. An object, such as Parts Field by field: the fields it sets replace the extended profile's, the others stay. Spells and Monsters The extended profile's entries, then its own. An entry for a spell or a monster the extended profile already has replaces that entry. Rules The extended profile's rules, then its own. Weights The extended profile's weights, with its own replacing them by name. The editor shows the inherited values greyed out in each field, and the inherited entries of a list folded above it ("... inherited entries"). When the extended profile changes, for example because its package was updated, every profile extending it follows. When it's gone, the profile plays its own settings over the default profile and says so in a warning. You can extend Idle, one of your profiles or a package's, but only one level deep: extending a profile that extends another one is refused with extends: "..." extends another profile, and one level is all. Profiles from packages A package can ship fight profiles alongside its script. Once the package is installed, its profiles show on the page with the Package source, named <package>/<name>, and any bot can play them, whether or not it plays that package. Question Answer Which version plays? For a bot that plays that package, the version of the package it plays. For any other bot, the newest version installed. What happens when the package is updated? Its profiles are updated with it, and the profiles extending them follow. And when it's removed? Bots set to one of its profiles play the default profile, and their console says why. Package authors will find how to ship profiles in Ship fight profiles. Profile files Your profiles are files in the fightprofiles folder of Asterobot's data folder (Files and folders), one <name>.json file each, in the same JSON the editor shows. Asterobot reads a profile's file each time it's used, so you can also edit them by hand: a change plays from the next fight, and shows on the page the next time it loads. A file that isn't a readable profile is listed with its error. Copying a .json file into the folder is the same as importing it. Next, Profile settings describes every setting of a profile.
-
How the module decides
What the fight module knows about a fight, how it works out the turns it can play, how it scores them and weighs the danger, and the limits that keep a fight going, so you can read its turn log and tune a profile. The fight module doesn't follow a script of moves written for each class. Before each action, it looks at the fight as it is, works out what the character can really do, plays whole turns out on a copy of the fight, and picks the one its profile scores best. This page explains how, so you can read the turn log and know which profile setting changes what. What it knows The module reads the fight from two sources. The game's messages, the same ones the Dofus client reads: every fighter's team, cell, life, shield, AP, MP, characteristics, resistances, states and active effects, who is invisible, every spell's cooldown and how often it was cast, the glyphs and traps on the ground, the round and whose turn it is. The character's own spells, at their levels, come with the fight's start. The game data of the bot's game version: what each spell costs, its range, its zone and its effects, which targets it touches, the monsters' spells at each grade, the weapon the character holds, and the fight map's cells and line of sight. When a piece is missing, it estimates with less rather than stopping. An enemy whose spells the game data doesn't have is counted as hitting bare-handed, and a fight map it can't read is played as if every cell were open. A decision always comes out. It doesn't know what it can't see either: a fighter that is invisible is never aimed at until the game shows it again. What the character can do For each cell the character can walk to, the module works out the walk's cost: the MP of the path, and the AP and MP the enemies next to it would take when it leaves their side (tackle), with the game's own formula. A cell it would be stopped on is out of reach. From each of those cells, it checks every spell and the weapon the way the game does: AP, range with the character's range bonus and the effects that change a spell's range, line of sight, casting in a line or a diagonal, cooldowns, casts per turn and per target, the states a spell needs or forbids, the free cell a spell needs, and the summon limit. For each cast it can make, it works out what happens on every fighter in the spell's zone: damage with its rolls, the caster's characteristics and the target's resistances, critical hits by their chance, erosion and shields, heals, pushes and the damage of hitting an obstacle, AP and MP taken, states, summons, and the spells an effect casts in turn. These are the rules the Dofus client uses to preview a spell, so the module and your client agree on what a cast does. The danger Before choosing, the module works out how dangerous each cell would be at the end of the turn: how much the enemies could deal the character there on their next turn. It takes the worst case. Each enemy is counted from every cell it can walk to, with every spell it will have off cooldown by then, as many casts as its AP allows, the most damage per AP first. The profile's Risk turns that into a limit: Risk Where the module avoids ending a turn 0 to 99 Where the enemies could kill the character, and where they could deal it more than risk percent of its life. At 50, the default: more than half its life. 100 Nowhere: the character fights as if danger didn't exist. The danger beyond that limit counts against a turn as safety. Killing an enemy removes its share of the danger, so a turn that kills a threat before stepping in front of it is worth more than one that doesn't. Planning a turn The module plays turns out on copies of the fight: walk, cast, cast again, walk, end the turn. Each action is played with its expected result, so a push really moves the target, a kill really removes the enemy, and the next cast sees it. It doesn't try every possible turn, there are far too many. At each step it keeps the 6 best turns started so far, extends each with the best next actions, and goes up to 5 actions deep, within 2000 actions per decision. Then it plays only the first action of the best turn, waits for the server's answer, and decides again from the fight as it now is. A spell that rolled low, a dodge or a push that went differently doesn't throw the rest of the turn off. The work is bounded by these counts, never by time. The same fight and the same profile give the same decision on a slow PC and a fast one, and a decision takes a few milliseconds to a few tens of milliseconds. How a turn is scored A turn's score adds up what it does, each part weighted by the profile: Term What counts Damage The damage dealt, expected: critical hits counted by their chance, capped at what the target has left in life and shield. Kill An enemy killed: half its maximum life, plus the danger it no longer poses. Heal Life healed, up to what is missing. Control Enemies hindered: AP and MP taken, characteristics lowered, pushed, put in a state. Buff Lasting help to its side: a buff or a shield on an ally, or on the character when it outlasts its turn. A buff that only lasts the character's own turn counts for what it lets the character do in that turn, so it's cast when it enables something. Summon A creature summoned. Safety Minus the danger left beyond what the risk accepts. Position How well the cell the turn ends on suits the profile: its distance from the enemies, out of their sight to hide. Unused AP Minus the AP left over, or spent on casts that did nothing. Harm to allies Minus the damage and hindering done to its own side. A summon counts for half of a fighter of its kind, in every term: it dies with its summoner, so killing the summoner is often worth more. The role sets the weights, and a profile can change any of them with Weights: Role Damage and kill Heal Control Buff Summon Safety, position, unused AP Harm to allies Damage 1 0.5 1 1 1 1 5 Tank 1 0.5 1.5 1 1 1 5 Support 0.7 1 2 2 1 1 5 Healer 0.5 2 1 1.5 1 1 5 The profile then shifts single casts and targets: Setting Effect on the score A spell's Use Prefer ×1.5, Avoid ×0.5, Never: never cast. The weapon's Use does the same for weapon hits. Elements A cast of a favoured element ×1.2. Focus, a monster's Focus, a focus rule Hitting the focused enemy ×2. A monster set to Last ×0.5, to Ignore ×0: hitting it counts nothing. Several focuses on one enemy multiply. Where the turn ends Once nothing is left worth casting, the turn ends where the profile wants the character to stand: Range sets the distance it fights at. Melee is in contact, Long range the reach of its longest damaging spell, Mid range half of it. Automatic, the default, reads the character's damaging spells: when most of them reach 2 cells or less it plays melee, from 6 cells long range, mid range in between. Positioning sets how it gets there: keep that distance, charge, hold, kite or hide. Profile settings describes each. A monster's Keep away and the movement rules (Retreat, Approach, Keep distance) add their own goal. Through all of it, the danger limit holds: the module doesn't walk where the character can be killed when another cell does almost as well. Placement Before the fight, with Placement set to Automatic and the character's spells known, the module scores each starting cell of its team the way it scores a turn: it plans the first turn from there, and takes away the danger beyond the risk, should the monsters play first. With Close, it picks the cell nearest the enemies, and with Far the farthest from them. Before it knows the character's spells, Automatic goes by range: close for melee, far for long range, 4 cells from the nearest enemy otherwise. The character's spells are known from its previous fight, so only the first fight after Asterobot starts is placed that way. Limits that keep a fight going One action at a time. The module sends an action, then waits for the server's answer before deciding the next. It never sends an action twice. 3 seconds without an answer means the server didn't take the action. The module drops that spell, or walks from that cell, for the rest of the turn, and decides again without it. The turn log marks it Not answered. 30 actions per turn at most, after which the turn ends. 2 seconds of margin. Its last decision goes out at least 2 seconds before the turn's time runs out, so a rule's delay never costs the turn. Always an action. When nothing is worth doing, it ends the turn. What it doesn't weigh yet Walking into a trap or ending a turn in a glyph. It knows where they are for spells that need a free cell, but doesn't weigh what they'd do to the character. The spells of an enemy's summons: the module doesn't know which monster a summon is yet, so it counts them as hitting bare-handed. The spell bonuses some equipment gives, such as more range or damage on one spell. Challenges, and the turns of summons the character controls. See Coming soon.
-
The fight module
Let Asterobot play a bot's fights: turn the fight module on, choose its profile and speed, see what changes on a relayed session, and read the turn log of its last fights. Asterobot can play a bot's fights for it. The fight module places the character, says it's ready and plays each of its turns: it walks, casts spells, hits with the weapon and ends the turn, with the same messages the Dofus client sends. How it plays is up to the bot's fight profile. The module plays fights, it doesn't start them. A fight begins when the character attacks a group of monsters, gets attacked or joins a fight, and that's the job of the bot's package, or yours when you play on a relayed session. Once a fight starts, the module plays it to the end, then waits for the next one. What it decides In a fight against monsters, the module decides each part of the fight that its profile leaves on: Part What the module does Placement Picks the character's starting cell among its team's. With Automatic placement and the character's spells known, it picks the cell from which its first turn would go best, less the danger there beyond what the profile's risk accepts, should the monsters play first. Ready Says the character is ready, once enough allies have joined (Wait for allies). Without it, the fight starts when the placement countdown ends. Turns Walks, casts, hits and ends the turn, until nothing is left worth doing. It also answers everything the Dofus client answers on its own during a fight, such as loading the fight's map and confirming each action it saw. Challenges aren't chosen yet: see Coming soon. Each decision starts from what the fight looks like now. The module works out what the character can cast from each cell it can reach, how much each cast would deal or heal, and how dangerous each cell would be once the enemies play, then plays the turn its profile scores best. How the module decides explains it in full. The module needs the bot's game version to be extracted. Without game data, it plays on what the game tells it alone, which makes for poor turns, and the bot's console says The fight module couldn't read the game data: it plays on without it. A few cases it handles on its own: The character dies. The module has nothing left to decide, and keeps answering the game until the fight ends. The bot reconnects during a fight. The server hands the fight back, and the module plays the rest of it, the turn under way included. A fight that isn't against monsters, such as a duel or an aggression. By default the module decides nothing there and only answers what the client answers on its own. The bot's console says This fight isn't against monsters: the fight module only answers what the client answers by itself, and decides nothing. A profile can play these fights too: see Fights not against monsters in Profile settings. Turn it on The module has its own settings on each bot, on the bot's Fight tab. Open Bot Manager, click the bot's name, then the Fight tab. Switch on Play this bot's fights. The change is saved at once. Pick a Profile in the list and click Apply. Leave it empty to play the default profile. Pick a Speed. While the module plays a fight, Playing the fight under way appears next to the switch. The settings are kept with the bot, so they survive a restart. When saving fails, Couldn't save the fight settings says why. You can switch the module on or off during a fight. It takes effect at the start of the next turn, so a turn is never played by two players at once. Before the first turn, it takes effect at once. With the module off, Asterobot sends nothing at all during the bot's fights: the fight is the package's or yours. The profile The Profile list holds every profile the bot can play: Idle, your own, and those your packages ship, named after their package, such as @some-author:fighters/fire-cra. Edit profiles opens the Fight Profiles page. Choice How the bot fights Empty, shown as Default profile Every setting at its default. It adapts to any character: the role its class plays first, the range its spells reach, the spells it really has. Idle Takes part in the fight and passes every turn after 5 seconds. Nothing else: no placement, no ready. Any other profile As that profile says. The profile is read again when each fight starts, so a profile you change plays from the next fight. When the profile can't be played, because it was deleted, has an error or its package was removed, the bot plays the default profile and its console says The fight profile can't be played: the default profile plays. A profile you deleted stays selected in the list, so you can see what the bot is set to. Speed The speed sets how fast the module acts. Whatever the speed, it decides the same things. Speed Before each decision Its answers to the game Slow Thinks 1.5 to 4 seconds Sent once the Dofus client would have played what happened Normal (the default) Thinks 0.6 to 1.8 seconds Sent once the Dofus client would have played what happened Turbo Decides at once Sent at once Warning Turbo answers at once after every cast, faster than any real game client: it's easy to notice. The server accepts it, but anyone watching the bot's fights, or its timings, can tell. On a relayed session A bot in MITM mode (man-in-the-middle: the bot relays the session of a Dofus client you play) can play its fights too. Your Dofus client keeps showing the fight as it happens, but while the module plays, the clicks you make for what the profile decides do nothing: Asterobot holds them back. That means your moves, spells and the end of your turns, and the placement and ready buttons when the profile leaves those parts on. When you click anyway, the game client shows, at most every 10 seconds, a popup in the bot's language: Asterobot's fight module is playing this fight, so the game doesn't take what you do here. Turn the module off to play from the next turn. What the profile leaves off stays yours: with Placement off in its Parts, you place the character yourself and the module plays the turns. To take the whole fight back, switch the module off: you play from the next turn. MITM mode explains relayed sessions. Turn log The Turn log at the bottom of the Fight tab keeps every decision of the bot's last 10 fights, until Asterobot restarts. The newest fight comes first and is open: it shows when it started, Under way while it lasts, its map and how many decisions it had. The refresh button next to the title reads the log again. Each decision reads like this: Part What it shows Time and round When it was sent, and the fight's round. Action Placement, Ready, Move, Cast or End of turn. Details The cell, or the spell and the cell it was cast on. Weapon or bare hands is a hit with the weapon. Score What the profile made of it, then what that score counted: damage, kill, heal, control, buff, summon, safety, position, unused AP, harm to allies. Also weighed The next best options, with their scores. Not answered The server didn't take the action. The module decided again without it. Watching a fight During a fight, the bot's Map tab shows the fight's map with every fighter where it stands, as they walk, get pushed and die. Coming soon Note Coming soon. These parts of a fight aren't played by the module yet: Challenges. The module doesn't choose challenges. On a relayed session, choosing them stays yours, even while the module plays; on a Full socket bot, none is chosen. Summons you control, such as the Eniripsa's fairies. The module doesn't play their turns, which run out after 15 seconds. Summons that play on their own, such as the Osamodas's, aren't affected. A live board on the Fight tab, showing the fight as the module sees it. Scripts steering the module, from a package. Next, How the module decides explains how it chooses each action, and Fight profiles how to make and share profiles.
-
Paysan, les champs d'Astrub
Tu peux le mettre dans librarie oui, comme ça tout le monde pourra facilement l'utiliser, et directement le télécharger depuis asteroboard
-
SellingConditions
The rules of the auction house you opened: item types, taxes, level cap, which house it is and the NPC that runs it. Kind struct · Area Game.Exchange Carried by ExchangeBidBuyerStartedEvent (and by the seller start event). Read it as the configuration of the auction house window: 1. types: the item type ids this house trades. Only items of these types can be browsed or sold here. 2. max_item_level: items above this level are not accepted. 3. tax_percentage: sale tax, percent of the price. 0 means no tax at all. tax_modification_percentage replaces it when you change the price of an item already on sale. The client charges round(price * rate / 100), at least 1. 4. npc_contextual_id: keep it. The client sends it back as npc_id of NpcGenericActionRequest from the auction-house window. 5. auction_house_id: which auction house this is, as an id into the client's auction-house data table. The client copies two more int32 members but never reads them; they are left unnamed (one is the per-account sale limit, the other the unsold delay - the client gives no way to tell which). Not sent on its own — a record carried by the auction-house start events, never sent on its own. inferred Used by ExchangeBidBuyerStartedEvent ExchangeBidSellerStartedEvent Fields #FieldTypeMeaningYou set it 1typesrepeated int32Item type ids this auction house trades. The buy window lists these as its categories; the sell window only offers items of these types.never 3auction_house_idint32Which auction house this is: an id into the client's auction-house data table. Absent from beta and 3.2; named after the client routine that consumes it (SetAuctionHouseByBidId).never 4npc_contextual_idint32Contextual id of the auction-house NPC; the client sends it back as the NPC id of a generic NPC action.never 5tax_percentagefloatSale tax, in percent of the price. 0 means no tax. (percent)never 6max_item_levelint32Highest item level this auction house accepts.never 7quantitiesrepeated int32Lot sizes items are sold in. The 3.7 client copies it but never reads it; named as the only other repeated int32.never 8tax_modification_percentagefloatTax charged instead when you change the price of an item already on sale, in percent. (percent)never
-
PersistentStagingEvent
Long-running stagings of the current map: which sequences are running and since when, so the client can join them at the right point. Kind event · Area Game.Roleplay Lists the map stagings that are ALREADY RUNNING and since when. A staging is a scripted sequence of map effects (see StagingEvent): objects moving, materials and particles animating, sounds and music changing. A persistent one keeps running over time, so a player who arrives late must join it where it is, not restart it. WHY IT EXISTS StagingEvent starts ONE sequence now, at a percentage of its length. This event instead gives a start DATE: every client computes how long the stagings have been running and plays them from that point, so all players on the map see the same moment. WHAT TO DO WHEN YOU RECEIVE IT 1. Parse PersistentStagingEvent.start_date as a date-time in UTC (the client parses it with .NET's DateTime parser, assuming universal time) and correct it with your server-clock offset. 2. elapsed = now - start_date, never below 0. 3. For EACH id of PersistentStagingEvent.sequence_ids: play that sequence of the CURRENT map starting elapsed into it, at PersistentStagingEvent.intensity_multiplier percent strength (100 = as authored). An id the map does not have is ignored. 4. If the map is not rendered yet, keep the values and play the sequences once it is. 5. SEND NOTHING BACK. A bot that does not render the map can ignore this event. The record's bool and its second int32 are never read by the client: ignore them. WHAT THE OFFICIAL CLIENT DOES. Its map staging service converts the date through its time service, computes the elapsed time and, for each sequence id, calls StagingManager.PlaySequenceFromStartTime(sequenceId, startTime, intensityMultiplier); the manager builds a sequencer at intensityMultiplier / 100 and starts the sequence at that time (queued until the map is rendered). When you may send it Requires context_ready inferred Raised by: a player arrives on a map where scripted stagings are already running, or such a staging starts inferred Related messages Unsolicited - nothing you send causes this the server tells the client which map stagings are running; nothing requests it Nothing answers it - send it and move on the client only plays the sequences; its handler sends nothing Fields #FieldTypeMeaningYou set it 2intensity_multiplierint32How strongly to play the sequences, as a percentage (100 = as authored). (percent) The sequencer scales its effects by intensity_multiplier / 100.never 3start_datestringWhen the stagings started. (date-time text, read as UTC) The client parses it with .NET's DateTime parser and corrects it with its server-clock offset.never 4sequence_idsrepeated int32The running staging sequences of the current map. (map staging sequence ids) Each is played from the elapsed time since start_date.never
-
ObjectDeletedEvent
A whole item stack left your inventory: remove it. Kind event · Area Game.Inventory Remove the stack object_uid from your inventory, ALL of it. 1. Find the stack whose uid is object_uid (the uid of ObjectItem, not the gid). 2. Delete it entirely, and any shortcut that points to it. When only PART of a stack goes away, the server sends ObjectQuantityEvent with the new quantity instead. In the capture, selling a whole stack in the auction house (ExchangeObjectMovePricedRequest) sends this right after ExchangeBidHouseInListUpdatedEvent, followed by InventoryWeightEvent. Do not send anything back. When you may send it Requires context_ready inferred Related messages Unsolicited - nothing you send causes this the server sends it whenever a stack leaves your inventory for good, for example after you put it on sale in an auction house Fields #FieldTypeMeaningYou set it 1object_uidint32The uid of the stack to remove from your inventory. Observed: 8567885never
-
MergedInventoryType
Which window's item list merges extra storages: auction house or crafting. Kind enum · Area Game.Inventory This name is not Ankama's. It was chosen for this documentation from proven client behaviour, and is a label rather than protocol documentation. Used by InventoryUpdateMergedInventoryTypeRequest. Each named value is the one a window sends: auction house the auction house's sell list craft the craft and smith-magic lists (they share it) The remaining declared value is never sent by the client; it is left unnamed. Not sent on its own — an enum is never sent on its own. inferred Used by InventoryUpdateMergedInventoryTypeRequest Values ValueNumberMeaning MERGED_INVENTORY_TYPE_BID_HOUSE1The auction house's sell list. Sent by the auction-house item list when its bank or haven-bag toggle changes. MERGED_INVENTORY_TYPE_CRAFT2The craft and smith-magic item lists. Sent by both the craft and the smith-magic item lists.
-
ItemToSellInBid
One of your items on sale in the auction house: the item, its price and its remaining delay. Kind struct · Area Game.Exchange An element of ExchangeBidSellerStartedEvent.objects. - object (BidItem): the item on sale (its gid, sale uid, quantity and effects). - price: the price you asked for it, in kamas. - unsold_delay: how long it stays on sale before it comes back unsold. The client sorts your sell list by it. Other declared members (an int64, an enum, a string) are never read by the client; ignore them. Not sent on its own — a record inside ExchangeBidSellerStartedEvent, never sent on its own. inferred Used by ExchangeBidSellerStartedEvent Fields #FieldTypeMeaningYou set it 1unsold_delayint32Remaining time before the item comes back unsold; the sell list is sorted by it.never 3objectBidItemThe item on sale. Type BidItem.never 4priceint64The price you asked for this item, in kamas. (kamas)never
-
InventoryUpdateMergedInventoryTypeRequest
Sets which extra storages (bank, haven bag) a crafting or auction-house window merges into its item list. Kind request · Area Game.Inventory This name is not Ankama's. It was chosen for this documentation from proven client behaviour, and is a label rather than protocol documentation. 1. Set merged_inventory_type to the window you configure: auction house or crafting (craft and smith magic share one value). 2. Put in included_storages every storage to merge, from ObjectStorageKind: bank, haven bag, both, or none. The client always sends the complete set from both toggles, never a change. 3. An empty list means your inventory only. One declared member is a string-to-int64 map the client never writes; send it empty. When you may send it Requires character_loaded inferred Raised by: the player flips the bank or haven-bag toggle of the auction-house, craft or smith-magic item list proven Related messages Nothing answers it - send it and move on no reply is handled for it; the views update from the inventory events Fields #FieldTypeMeaningYou set it 2merged_inventory_typeMergedInventoryTypeWhich window's item list to configure: auction house or crafting. Observed: 1 Type MergedInventoryType.required 3included_storagesrepeated ObjectStorageKindStorages to merge into that list besides your inventory: bank and/or haven bag. Type ObjectStorageKind; the client only ever puts bank and haven bag here. Empty = inventory only.optional
-
HavenBagPermissionsUpdateRequest
Sets who besides the owner may enter the haven bag: the complete two-bit mask, friends and guild members. Kind request · Area Game.Haven.Bag Build permissions as a bit mask: bit 0 (value 1) shared with friends bit 1 (value 2) shared with guild members 1. Start from the mask the last HavenBagPermissionsUpdateEvent gave you. 2. Flip the bit you want to change. 3. Send the COMPLETE mask. The client never sends a delta: it recomputes friends + 2 * guild from both toggles every time. Send 0 to make the bag private again. When you may send it Requires character_loaded inferred Raised by: the player toggles 'friends' or 'guild members' in the haven-bag menu's share options proven Related messages You will then receive HavenBagPermissionsUpdateEvent inferred — the client changes its displayed toggles only when the permissions event comes back Fields #FieldTypeMeaningYou set it 1permissionsint32The complete new mask of who may enter: 1 = friends, 2 = guild members; 0 = owner only.required
-
HavenBagPermissionsUpdateEvent
Who besides the owner may enter the haven bag: a two-bit mask, friends and guild members. Kind event · Area Game.Haven.Bag Read permissions as a bit mask: bit 0 (value 1) shared with friends bit 1 (value 2) shared with guild members 0 means private (owner only), 3 means both. 1. Store the whole value. The client keeps it as the bag's current permissions and redraws its two share toggles from it; it does nothing else with the message. 2. Treat it as a replacement, not a change: the client overwrites both toggles every time. 3. To change the setting, send HavenBagPermissionsUpdateRequest with the COMPLETE new mask built from these two bits. Any other declared member is padding: no dumped client reads it. When you may send it Requires character_loaded inferred Related messages Arrives after HavenBagPermissionsUpdateRequest Fields #FieldTypeMeaningYou set it 1permissionsint32Bit mask of who may enter: 1 = friends, 2 = guild members; 0 = owner only.never
-
FightStatisticsEvent
End-of-fight statistics: one detailed block per fighter, plus a summary block. Kind event · Area Game.Fight The statistics of the fight that just ended, for the results screen. WHEN IT ARRIVES. Right after FightEndEvent (3.7.10.10 capture: FightEndEvent, then this event, then AlterationsEvent). WHAT TO DO WHEN YOU RECEIVE IT 1. FightStatisticsEvent.detailed_statistics: for each fighter id, that fighter's DetailedStatistics (damage, heals, shields, AP and MP, kills, and the fighter's identity). In a solo fight against monsters, expect at least your own entry. 2. FightStatisticsEvent.base_statistics: the summary block (seven counters). 3. Use them for display or logging; nothing in the game state depends on them. 4. SEND NOTHING BACK. WHAT THE OFFICIAL CLIENT DOES. It converts every fighter's DetailedStatistics into the Statistics tab blocks (keyed by fighter id), converts the summary block, and publishes both together for the fight-result screen; it then opens the results screen when its display conditions hold. When you may send it Requires character_loaded inferred Related messages Unsolicited - nothing you send causes this pushed by the server right after FightEndEvent; no request asks for it Nothing answers it - send it and move on the client only stores the statistics for the results screen Fields #FieldTypeMeaningYou set it 1detailed_statisticsrepeated type not documented yetEach fighter's statistics, keyed by fighter id. (fighter (entity) id -> statistics) One DetailedStatistics per fighter of the fight.never 2base_statisticstype not documented yetThe summary statistics block. A BaseStatistics record (seven counters).never
-
ExchangeTypesItemsExchangerDescriptionForUserEvent
Every listing of one item in the open auction house: the answer to a search request. Kind event · Area Game.Exchange The answer to ExchangeBidHouseSearchRequest. 1. Match it to your request by object_gid. 2. Replace what you know about that item's listings with item_descriptions: one BidExchangerObject per listing. An empty list means nobody sells that item here right now. 3. To buy one, use that listing's object_uid and one of its prices. object_type is the item's category; the client uses it to find the category the item belongs to in the open auction house. The server also answers an unfollow (search with follow = false), and then sends an empty list. Do not read that as "sold out". When you may send it Requires context_ready inferred Related messages Arrives after ExchangeBidHouseSearchRequest Fields #FieldTypeMeaningYou set it 1item_descriptionsrepeated BidExchangerObjectOne entry per listing currently on sale for that item. Type BidExchangerObject.never 2object_typeint32The item's type (category). Observed: 40never 3object_gidint32The item (GID) these listings are for: the one you searched. Observed: 28277never