![]() |
|
|||||||
| Homunculus and AI Discuss all homunculus and AI related topics here. |
![]() |
|
|
Thread Tools | Search this Thread |
|
|
#1 |
|
Stapo
![]() ![]() |
IF YOU ARE HAVING PROBLEMS MAKE SURE YOU HAVE THE LATEST VERSION
If you still have PROBLEMS, QUESTIONS, CONCERNS or SUGGESTIONS, Please post here and let me know so that i can address them. The current version is 1.09 See last post for info, as i'm kinda short on time. DOWNLOAD I'm going away for a while, so i wont be able to fix showstoppers, so the previous version 1.08 is available here: DOWNLOAD Mob_ID.lua file for OD1&2 and West Orcs on Loki and Chaos only - THIS IS NOT UPDATED, and is effectively USELESS. DOWNLOAD Azzy Merc+Homun AI: A generic mercenary and homunculus AI. Ease of use provided not by GUI, but by a simple configuration file, made for use by players, not programmers. Special thanks to Sera for her assistance in testing v1.00, and to Misch and Compass and all the others who've helped me with debugging and suggestions. Features:
How to use AzzyMercenaryAI:
1. Place mercenary into STANDBY mode by pressing ctl+T 2. Stand 1 cell to the west of a player and sit down to add them to friendlist 3. Stand 1 cell to the east of a player and sit down to remove them from friendlist How to configure the AI: The AI configuration is controlled by two files each for mercenary and homunculus AI, a config file, and a tactics file. For the homunculus, these files are H_Config.lua and H_Tactics.lua respectively. For the mercenary, these files are M_Config.lua and M_Tactics.lua respectively - note that without an updated MobID file, the default tactics will be applied to all monsters, since mercenaries lack a way to differentiate between monster types. To edit these files, double click the file, and when you get the message saying that windows cannot open this file, choose "Select the program from a list", and choose Notepad. Check the box "always use this program to open files of this type" Config options These options set the basic operating parameters of the AI. Playing well with others: If you plan to have both a merc and homun out at once, set AssumeHomun to 1. This is the default. Controlling aggro: Your merc/homun will seek out and attack monsters whenever it's HP % (as % of max hp, number from 0-100) is greater than AggroHP, and it's SP % is greater than AggroSP. When it lacks hp or sp, it will only fight monsters if it is attacked. Set AggroHP to 100 if you do not want the merc or homun to attack unless it, the owner, or a friend is attacked. The distance at which the merc/homun will target a monster to attack is set by AggroDist. Because the vision range is a 27x27 square centered on the player, high values of AggroDist will have no effect. Low values may be desirable to prevent the merc/homun from running ahead and aggroing things that might be off screen. If you want your merc/homun to not fight or do anything other than watch (and kite, if set to do so), set SuperPassive to 1. This may be desirable for gaining loyalty on a mercenary by killing monsters yourself, but is generally useless for a homun. If you want your merc/homun to stand still, and only use ranged skills or attacks, set DoNotChase to 1. Movement options: Your merc/homun will stay FollowStayBack cells behind you when following you. Setting this to 1-2 for un ranged mercenaries, and 2-3 for archer mercenaries for best results. The merc/homun will drop everything to follow you if it is ever more than MoveBound cells away from the owner. To use the Random Walk feature, set UseRandWalk to 1 - when this is enabled, the merc/homun will walk around randomly when idle and above it's AggroHP - the player can autofollow mercenaries, so in this way you can let the mercenary drag you around the map. UseOrbitWalk will make the merc/homun circle you when idle and above it's AggroHP, however this behavior is largely useless, and awkward behavior has been observed with it, so it's use is not recommended. When you sit down, your merc/homun will go non-aggressive, and if it isn't doing anything else, it will move close to you. Set the location it will move to with the RestXOff,RestYOff parameters. Ex: RestXOff,RestYOff=0,-2 will make your merc stand 2 cells to the south of you when you sit. Upon spawning, the mercenary will wait for SpawnDelay (in ms) before taking any actions. This prevents it from wasting it's immunity time, and also prevents it from KSing after teleporting or changing maps. Setting SpawnDelay to 1000 (1 second) is a good idea. When chasing monsters, if the merc/homun is not able to reach the target, it will eventually give up and look for a new target. ChaseGiveUp is the number of times it will attempt to move to the target before giving up. Kiting options: When using archer mercenaries, it is frequently advantageous for the mercenary to try to run away from monsters that try to attack it, while attacking them. Set KiteMonsters to 1 to turn this on. If KiteParanoid is set to 1, it will default to running away from monsters, even if they don't attack it - this can be overridden by the tactics list. By default, if KiteMonsters is set to 1, kiting will only be done on archer mercenaries - to make it kite even with melee mercenaries, set ForceKite to 1. This results is very strange behavior if the mercenary is supposed to be attacking, and is not recommended. The other kiting parameters define the specifics of kiting behavior, and it is recommended to not change them. Automatic use of skills: Turn on UseAutoSkill to automatically use offensive skills when attacking. To use only skills, and never normal attacks, also set UseSkillOnly to 1, to use attack skill even when chasing, set UseSkillOnly to -1. If the mercenary has an anti mob skill, it will be automatically used if the number of monsters in close proximity to the mercenary or owner is equal to or greater than AutoMobCount. To conserve SP, you may limit the number of times a mercenary will use skills on any single target - this is controlled by AutoSkillLimit. It defaults to 100 (effectively unlimited), set this to another number to limit the number of times skills will be used. Also to control SP use, you may want to not use auto skills unless there would be enough sp left to recast some sort of buff. Set UseAutoSkill_MinSP to this minimum SP value to do this. AutoSkillDelay is the delay (in ms) between uses of a skill. If you are having problems with the mercenary "double casting" skills, increase this value. Otherwise, leave it be. When using lancer mercenaries with Pierce, you may want it to use pierce only on monsters of certain sizes. Set UsePierceSize to the minimum size you want to use pierce on (small is 1, medium 2, large is 3). Note that this will not work unless an updated MobID file is present and the sizes are set in the tactics file. Buffs and duration skills: Many mercenaries and homunculi have buff skills with a specific duration. Turn these skills on to keep the appropriate buff up at all times (if the mercenary has the applicable buff). UseAutoQuicken (includes filer skill, Flitting, and Lif skill Urgent Escape), UseAutoGuard (includes Amistr skill, Amistr Bulwark) UseAutoSight, and UseAutoMag. Likewise they can use buff skills on their owner, UseProvokeOwner to use the mercenary's highest level of provoke on the owner, and UseSacrificeOwner to use Sacrifice on the owner. Automatic Pushback: Archer mercenaries often have a skill that can push enemies backwards. This can drastically reduce mortality of archer type mercenaries, which are often astonishingly fragile. Set UseAutoPushback to 1 to enable use of pushback - this is subject to override by the tactics list. AutoPushbackThreshold is the distance between the merc and target at which the mercenary will attempt to use a pushback skill on it. Automatic use of Debuffs: This is covered by the tactics, due to the potentially monster-specific nature of debuff skills. Tactics options The tactics list consists of an entry for each kind of monster you plan to be fighting. In order for any entry other than the default entry to be used on a mercenary, you must have an updated MobID file for the map and server you are on. For each entry, there are 7 fields for different settings. The format of a tactics list entry is: MyTact[id]={TACT_BASIC,TACT_SKILL,TACT_KITE,TACT_CAST,TACT_P USHBACK,TACT_DEBUFF,TACT_SIZE} id is the type id of the monster MyTact[0] is the default tactics used for any monster for which there is no tactics entry. If you want to ignore a monster entirely, you can simply do MyTact[id]=TACTICS_IGNORE as a shortcut. TACT_BASIC controls when it will attack a monster. The options for this are: TACT_TANK (Hit monster once, and then hold it until something kills it) TACT_IGNORE (Do not attack the monster, at all) TACT_ATTACK_L (Seek out and attack this monster, low priority) TACT_ATTACK_M (Seek out and attack this monster, medium priority) TACT_ATTACK_H (Seek out and attack this monster, high priority) TACT_REACT_L (React to this monster when self/owner/friend attacked, low priority) TACT_REACT_M (React to this monster when self/owner/friend attacked, medium priority) TACT_REACT_H (React to this monster when self/owner/friend attacked, high priority) TACT_REACT_SELF (React to this monster when self attacked only) TACT_SKILL controls how many times an offensive skill will be used on a target of this type. Set to SKILL_NEVER to never use skills, and SKILL_ALWAYS to always use skills. Set to a positive number to use a skill that number of times. Set to a negative number to use a level of the attack skill less than the maximum level - this is most useful for homuns that can 1-shot with bolts. TACT_KITE controls whether to kite from this target, this overrides the kiting settings in config. KITE_NEVER (never kite from this kind of monster) KITE_REACT (kite from this kind of monster only if attacked) KITE_ALWAYS (always kite from this monster - recommended for aggressive monsters) TACT_CAST controls whether to assume casts from this monster are aggressive acts. This is not very useful in pvm. The options are CAST_REACT and CAST_PASSIVE. TACT_PUSHBACK controls whether to use pushback skills, if applicable. The options are PUSH_NEVER, PUSH_SELF, and PUSH_FRIEND (use pushback skills on monsters attacking friend and owner as well as self). TACT_DEBUFF controls what, if any, debuff skills will be used. Set to the ID of the skill, or the name of the skill used in SkillList.lua to use that skill. Set it to that negative value to use that debuff while chasing. Set to 1 or -1 to use whatever debuff the merc might have - this can include provoke, which may make it undesirable to use. TACT_SIZE is the size of the monster for UsePierceSize. Options are SIZE_SMALL, SIZE_MEDIUM, SIZE_LARGE and SIZE_UNDEFINED. Default is SIZE_UNDEFINED. Version History 1.09 Fixed a ton of minor bugs. Default configs don't suck as bad as before. PVP Support - set PVPmode to 1 in the config. 1.08 Added homunculus support. Added use debuff skills. Added DoNotChase option Recoded chasing routine, so it doesnt suck like it used to. Fixed and tweaked a whole ton of stuff that i don't even remember. Added defaults file, so that missing lines from config wont choke the AI. Fixed unacceptable following behavior with archers, specifically in combination with AutoPushback Fixed friending bug. 1.071: Removed the crash on follow bug added with 1.07 1.07: Added actor-ID tactlist support. Replaced follow crash with a new and different follow crash. Added support for live friending. Added autofriending of homunculus. Fixed 0,0 kite bug. 1.061: Removed showstopper bug. 1.06: Added feature to autocast provoke or sacrifice on user. Added feature to auto use pushback skills (arrow repel and skid trap) if monsters are on the merc (doesn't work great). Added feature to make the merc go non-aggro if the player sits down. Added option to limit the number of times merc will use skills on a given enemy. Did work on future support of tactics based on actor IDs. Observed and captured several minor bugs with target acquisition for study (will be fixed later). Fixed bug with random walk. Improved friending AI (thanks Biochemist-ness). Added showstopper bug that crashes upon seeing a monster. 1.05: Recoded following to support following at distance (FollowStayBack), Fast transition from Chase to Attack, Added kiting support - it still leaves something to be desired, but i'm not sure what it's doing wrong... Poslag really hurts it bad. Also added an option to only use skill attacks. Added bug with random walk. 1.04: Fixed crash on load bug (line 873 error) 1.03: Added SuperPassive option, random crash error (line 903 error). Added crash on load bug. 1.02: Successfully made AI coexist with MirAI 1.01: Unsuccessfully made AI coexist with MirAI 1.00: Initial release
__________________
Aaron Kelden - 150/50 HS/DB RK Yzza .Rd, Dr. Azzy - 150/50 Genetics The Reason Why! 149/50 AS Ranger And more... Last edited by Dr. Azzy; 05-29-2008 at 04:07 AM. Reason: v1.09 released |
|
|
|
|
|
#2 |
|
Stapo
![]() ![]() |
Planned for 1.05
*Kiting (in progress) *Option to not use normal attacks (done) *Improvements to follow *Better behavior when returning to owner (in progress) *Fix to IsInAttackSight. (done) *Internal changes to prepare for pvp mode support. (in progress)
__________________
Aaron Kelden - 150/50 HS/DB RK Yzza .Rd, Dr. Azzy - 150/50 Genetics The Reason Why! 149/50 AS Ranger And more... |
|
|
|
|
|
#3 |
|
Stapo
![]() ![]() |
1.05 released, i've observed some strange behavior, and am not 100% sure it's fixed, so 1.04 is still up.
__________________
Aaron Kelden - 150/50 HS/DB RK Yzza .Rd, Dr. Azzy - 150/50 Genetics The Reason Why! 149/50 AS Ranger And more... |
|
|
|
|
|
#4 |
|
Drops
![]() ![]() |
I'm not sure if the UseRandWalk function is working properly. I keep getting an error about trying to compare a number to nil.
__________________
iRO Chaos
|
|
|
|
|
|
#5 | |
|
Stapo
![]() ![]() |
Quote:
<.< >.> Problem fixed - turned out to be a typo in a variable name. I hadnt tested UseRandWalk since i converted everything to use a configuration variable for the movement boundaries instead of a hardcoded number. The fix will be included in the minor update, 1.06, due out later tonight with luck.
__________________
Aaron Kelden - 150/50 HS/DB RK Yzza .Rd, Dr. Azzy - 150/50 Genetics The Reason Why! 149/50 AS Ranger And more... |
|
|
|
|
|
|
#6 |
|
Banned
Join Date: Sep 2007
Posts: 1,495
|
I don'tknow what version I have right now but whenever I tele on screen the AI likes to KS people
I like this bug |
|
|
|
|
|
#7 |
|
Stapo
![]() ![]() Join Date: Sep 2007
Posts: 570
Server: iRO Chaos
Guild: Punishment
Class: Shadow Chaser
|
how do you make it auto attack it seems to only attack argo monsters T_T
__________________
playing WoW Scarlet Crusade |
|
|
|
|
|
#8 |
|
Stapo
![]() ![]() |
Bug locke reported fixed in 1.06. Going to code a few more things into it, and then release it. Sorry for delays. Been a wierd weekend. My 4/20 celebrations today also reduced my productive coding time more than planned.
Set AggroHP to something other than 100. When the merc's hp% is above AggroHP, it will attack all monsters (subject to KS restrictions etc), otherwise it will only attack things targeting the mercenary, owner, or friends. I belive the default setting in my AI was 60 (thats what i usually use, because of how delicate mercs are)
__________________
Aaron Kelden - 150/50 HS/DB RK Yzza .Rd, Dr. Azzy - 150/50 Genetics The Reason Why! 149/50 AS Ranger And more... Last edited by Dr. Azzy; 04-21-2008 at 12:19 AM. |
|
|
|
|
|
#9 |
|
Stapo
![]() ![]() |
1.06 released.
New targeting AI released (Thanks Biochemist-ness for the help)
__________________
Aaron Kelden - 150/50 HS/DB RK Yzza .Rd, Dr. Azzy - 150/50 Genetics The Reason Why! 149/50 AS Ranger And more... |
|
|
|
|
|
#10 |
|
Banned
Join Date: Sep 2007
Posts: 1,495
|
bump I'm very new to this AI stuff
when I'm putting in the values for say the merc conserving SP and going psycho when he's at a certain hp this is at percents correct oh would it be possible to detect the highest level of a merc aspd potion and use it automatically? Or is that impossible/hard to code |
|
|
|
|
|
#11 | |
|
Stapo
![]() ![]() |
Quote:
AutoUseSkill_MinSP is an absolute sp value - I was thinking that the purpose of this would be if, for example, you always wanted to keep the 20 sp that you needed to recast weapon quicken, or something similar. You can't trigger the use of items from within the AI, plus the AI gets reset everytime you relog or teleport, so it would waste aspd pots anyway. Since they last 30 mins, and so does the mercenary, theres no reason to not just use the scroll and the pot at the same time. Download was updated with improved documentation, which has been conspicuously lacking from recent updates. The AzzyUtil.lua still said it was version 1.00
__________________
Aaron Kelden - 150/50 HS/DB RK Yzza .Rd, Dr. Azzy - 150/50 Genetics The Reason Why! 149/50 AS Ranger And more... |
|
|
|
|
|
|
#12 | |
|
Metaling
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Sep 2007
Location: Philadelphia Suburbs
Posts: 991
Server: iRO Chaos
Guild: Invision
Class: Merchant
|
What's up with Alt + T? I get an error when I use it:
Quote:
__________________
|
|
|
|
|
|
|
#13 |
|
Stapo
![]() ![]() |
Fixed in 1.07, but replaced with a similarly destructive bug. I'll release an 1.071 later today to fix that too.
I don't use the commands much myself, so i hadnt caught that one.
__________________
Aaron Kelden - 150/50 HS/DB RK Yzza .Rd, Dr. Azzy - 150/50 Genetics The Reason Why! 149/50 AS Ranger And more... |
|
|
|
|
|
#14 |
|
Stapo
![]() ![]() |
1.071 released.
__________________
Aaron Kelden - 150/50 HS/DB RK Yzza .Rd, Dr. Azzy - 150/50 Genetics The Reason Why! 149/50 AS Ranger And more... |
|
|
|
|
|
#15 |
|
Baby Poring
![]() Join Date: Sep 2007
Posts: 10
Server: iRO Chaos
Guild: Untouchables
Class: Rune Knight
|
I'm a little bit new with this AI scripting, but I do have a little grasp of it.
Can someone explain to me how the Mob_ID works? I downloaded it and there's like multiple instances of the same monster. I'm trying to set this up for the Geo map north of Einbroch.
__________________
![]() I glow... but the journey's not done... Other iRO Chaos Characters: Aeag Sedah 80/50 (HWizzie), Vendi Productus 95/47 (Forge BS) I_R_teh_1337!!! 92/50 (Support/BSS Priest), mAnUnUmPiT 73/43 (Semi-Hybrid Hunter) the Aima family tree |
|
|
|
|
|
#16 |
|
Stapo
![]() ![]() |
The idea with mobID is that it will have a list of actor IDs, with the monster type of the monster that has that actor ID. So a mobID file will have 1 entry for every individual monster on the map, ie 80 entries for geographer, and so on. On most maps, the IDs of these will all be consecutive, so you can fill in the list from that, and also the IDs of all monsters other than herb plants on a map is usually in 1 consecutive block.
Ein geos unfortunately is a wierd map, because the spawns are not simple. The order of the spawns there is 50 metalings then 30 geos (the instaspawners) then 5 holdens and then the other 50 geos (the timed zone spawns), followed by a bunch of other crap.
__________________
Aaron Kelden - 150/50 HS/DB RK Yzza .Rd, Dr. Azzy - 150/50 Genetics The Reason Why! 149/50 AS Ranger And more... |
|
|
|
|
|
#17 |
|
Baby Poring
![]() Join Date: Jan 2008
Location: Belgium
Posts: 15
Server: iRO Retired
Guild: Resurrection
Class: Mastersmith
|
Is it possible to add a friend in a list in the USER_AI folder instead of having to do it ingame?
You're doing a great thing but I'm kinda noobish with this stuff :3 Last edited by Arthur; 05-20-2008 at 12:43 PM. Reason: Clarify :3 |
|
|
|
|
|
#18 |
|
Poring
![]() Join Date: Sep 2007
Posts: 40
Server: iRO Chaos
Class: Blacksmith
|
Is it possible to get a gui going somehow?
|
|
|
|
|
|
#19 |
|
Stapo
![]() ![]() |
Working on it, problem is, i need to get someone else to write it or learn a new programming language in order to make a gui.
__________________
Aaron Kelden - 150/50 HS/DB RK Yzza .Rd, Dr. Azzy - 150/50 Genetics The Reason Why! 149/50 AS Ranger And more... |
|
|
|
|
|
#20 |
|
Trigger Happy
![]() ![]() ![]() ![]() ![]() ![]() Join Date: Sep 2007
Location: Thailand
Posts: 5,101
Server: tRO Retired
Class: Guillotine Cross
|
Question: Is there any way to enable Kill Steal without having to input everyone as friends? On my server some maps are considered FFA and I'm having problems making it attack.
|
|
|
|
![]() |
| Thread Tools | Search this Thread |
|
|