EDIT: November 23rd 2015: I'm using Google Drive to upload files. Please check the links in the end of the post. Suggestion: check for updates once a week.
EDIT: October 9th 2015: I've started playing again for some weeks now. I had stopped for a year almost, I think, sorry if I didn't answer to the replies.
I reprogrammed all the AI from the beginning to the end and the responsiveness is really better now (I didn't make a good "anti-lag system" in older versions, and I did applied the GetActors function to that system, which caused the homunculus to not respond fast to new enemies spawning and wasn't useful [Azzy helped me to figure that out])
The NEW VERSION (4) [Beta] corrected many issues.
Skills are used faster and in a smarter way (still a little bit slower than Azzy's AI though, 'cause it can't guess what was the first homunculus type, so it tries to use some of them depending of the situation).
Homunculus gets enemies faster and homunculi try to get a secondary enemy to use skills.
Better anti-lag system, sending one command in a cycle.
And no, there's no "dancing" in the AI. I consider it a bug exploit. As much as there's no skill use while casting another skill happening intentionally (it may still happen by a in game bug, I don't know: I've seen my homunculus walking while casting an area skill after being hit once).
And my anti-KS system is now more polite: if the enemy attacks another player/homunculus, the homunculus stops attacking even if it was on Attack State, avoiding stealing a player's enemy if it hit the enemy first but the homunculus was already close enough to attack.
Gibraltar AI: the real time configured AI (which is used without panel).
Hi, I'm from Brazil, and I've made an homunculus AI based on many others I had used by the years I played Ragnarök. In this post I'm going to advertise it as much as I'm going to describe its main functions, as the guide is still in portuguese (you can copy and paste to a translator too, if you want): the guide is in the folder "Documentação": it's the "Manual" file.
I believe the game's API here is the same of bRO's, and then it works with it, but it needs some testing...
If you can give me your feedback I'll be very grateful. The AI is in a stable version, now, and I'm without time to change it; but I can try new testing versions later, if I have more time, to apply more changes if errors are found.
At the end of the topic, I'm writing the links to the AI's blog and to its page in Facebook. I'll put the link to the official Brazilian game forum's AI thread too.
Sorry for any grammatical errors.
So, let's begin...
AI created for homunculi and mercenaries of Ragnarök. It doesn't need a panel as the settings can be changed inside the game (using default commands).
As it uses default commands to change options, some features are obviously not included, as there's no panel listing each of them. There's not much feedback for the configurations neither (some users complain about that, but there's no way to show every single option change in game: friending is the only one showing it, as it moves to the selected player if it was unfriended, and stays still if the player is friended).
You can see some of the options activated or not by files created at ID DATA and TEMP folders. The "Documentação" ("Documentation") folder has the "Manual do Usuário" ("User's Guide") and some other notes of the AI usage and distribution, as much the the updates' change logs.
So, if you use it for a while, you can get used to the commands, but it may be a little difficult at the beginning (I can only ask you a little patience and you may like it).
As said above, I can't create too many specific options, as there's no panel with listing of it. Then I had to simplify as much as I could: the main basic functions of setting aggro or defensive behaviour, minimum HP for aggro and using automatic skills or not are of course present.
But others like monster priority, defining each skill for each monster or situation can't be changed. These I had to program a general behaviour, like hitting MVPs before its mobs and using skills by a percentage of chance and in some defined situations causing the least interference possible in the player's gameplay. I'll describe it better below.
The newest version makes the homunculus prioritize higher monster IDs, so it tries to attack stronger monster first in some cases, while being attacked by a mob.
Note: you can program in LUA at any file though (except AI.lua and AI_M.lua; and CORE hidden folder's files are not recommended too) without worries of getting those game lock errors. I've made the AI to log the error and the homunculus will be the only one stuck. It's using protected calls. "Habilidades.lua" and "Skills.lua" have the skills functions and some descriptions.
If you change the AI, do not pass it: or at least write explicitly in a new document into the download file and in the place you publish it the explanation of the changes.
Here's a list of the main resources (and I'll translate the guide for applying them below each item):
1. Skills can be set to be used automatically or not (then allowing the user to use it manually without interference of the homunculus).
Command Standby (FOLLOW_CMD) twice to deactivate automatic skills use. Do the same again to enable skills.
2. Aggro behaviour for everything or not.
Use Standby once and then Move to switch the behaviour.
3. Aggro behaviour for each monster type or not (mercenaries do not recognize the types, but the AI uses the a Type file making system that Azzy created with homunculus).
Use the Attack command to mark an enemy/player for aggro behaviour. Use Move while chasing or attacking an enemy to unmark it for aggro.
4. Setting minimum HP to be aggressive.
When the Attack command is used, the minimum HP to be aggressive lowers 10%. When Move is used while attacking or chasing an enemy, the minimum HP raises 20%.
5. Adding or removing players to be "protected" (on PvP, only works with party players, or non-attackable ones).
Use Move to a player's position.
Note: there's an auto-friending to players who sit near the homunculus' owner and/or do nothing and just take damage without reacting. If the player reacts to the enemy or moves away, it's then automatically unfriended.
6. Long range shooter: the homunculus doesn't chase, but only uses skills or attacks enemies which come close. The homunculus will only chase if the enemy is already attacking the owner or the homunculus, as it's smarter to go to the enemy's position. This allows you to use "long range shooter" with Lifs and Amistrs (and now Filirs), too.
Use Move at the owner's position/tile. Do the same to disable, or send a Move command elsewhere.
It's pretty useless to use Long Range Shooter with any homunculus other than Vanilmirth and S types. But you can do that if you want.
In the other hand, in the newest version, using the Long Range Shooter with Sera or Dieter is great to keep the homunculus inside its AoE skills.
Patrol was removed in the newest version. It may be readded later.
7. Patrol around the user or another player (while near the user). This setting is lost after teleporting, changing map or vaporizing your homunculus.
First, make the owner sit.
For making it patrol around the owner, use the Move command at the owner's position. Then, within 10 s, use Move command to all positions you want the homunculus to patrol.
To make the homunculus patrol around a player, do the same procedure, but the first Move command at the other player's position. The homunculus will not patrol around the player if it leaves the owner's screen.
To deactivate patrol, use Move again to the owner's position (if the owner is stood up then it's twice to not enable "long range shooter" option). Standby twice (four times for not disabling the automatic skills).
8. Move away to use skills. Homunculus will move away from the enemy to use long range skills.
This is disabled or enabled using Move to the homunculus' position. You can disable temporarily by using Attack on an enemy. Then the homunculus won't move away until himself or the monster dies (good for keeping close to a MVP, for example).
9. Evade from enemies when with low HP (DESPAIR MODE). Homunculus will move away from the enemy when it has less than 60% HP, and less than the aggro minimum HP, after short time intervals. But the homunculus will keep attacking the enemies and using skills if they reach him. And the state will be canceled if the homunculus is hit by ranged attacks or the enemy starts casting any skill. In this state, the homunculus will be "desperate" and will use skills he normally wouldn't use, like Overboost and Granitic Armor.
This option is enabled or disabled with the "Move away to use skill" configuration above as it's part of it. If you disable auto skill use, then this will be disabled too.
Note: configuration(s) 6 is(are) lost after the homunculus is reset (vaporized, changes map or teleport).
AUTOMATIC SKILLS USE
The majority of the skills are enabled to be used automatically by the homunculus or mercenary. Except some of the buff skills that have long cooldowns as the global cooldown in homunculi problem wasn't corrected in bRO yet... [More dots of disappointment... Now crying a little...]
So, the buff skills are going to be used only if the homunculus wasn't changed to S version (third form) yet in some cases (and it is in first or second form). Or are not activated at all if there's a better attacking skill instead, like in Filir's case. I'll give more details below, in the next sections.
Some mercenaries' skills aren't activated neither, as I couldn't test or because they weren't present at bRO.
Oh, and any skill that consumes items, Loyalty/
Hunger or kills the homunculus/mercenary by reducing its HP is disabled.
Now some HP or Hunger consuming skills are enabled in special situations.
I don't remember how I programmed every single skill, 'cause it was a long time ago. But I'll try to be descriptive as much as I remember.
- Castling (activated when the player takes some damage thus having the hit motion. The homunculus must be close to the owner);
only in first and second form:
- Bulwark (used when monsters are attacking the homunculus, by a percentage of chance);
- Bloodlust (while attacking, in a chance).
only in first or second form:
- Urgent Escape (when the user moves; while chasing a monster, by chance).
- Caprice (while chasing or attacking);
- Chaotic Blessing.
Homunculi skills that are not for first and second form only in the list are automatically used by the homunculus S.
Some skills are only used in "despair mode", meaning they are used when the homunculus HP percentage is below 60% and below the Aggro HP Percentage. Some skills have their own HP percentage and requisites.
The homunculus' HP being low during the AFK means something went wrong (Dead Branch?) as it normally would keep high HP all the time. So the homunculus gets "desperate": its normal SP limitation of 50% to use skills is reduced to 20% and he starts using new skills. You can disable "despair mode" as explained above, in section "Resources", topic 9.
- Stahl Horn (enemy);
- Heilage Stange (enemy).
- Goldene Ferse;
- Stein Wand; e
- Angriff Modus ("despair mode", and when HP is below 25%).
- Volcanic Ash (random position, while idle; enemy's position while attacking, in a low chance);
- Lava Slide (owner's position, while idle and near player; homunculus' position if away from owner; enemy's position, while attacking);
- Magma Flow (re-used as soon as possible after the duration expires).
- Pyroclastic ("despair mode").
- Granitic Armor ("despair mode", but only if the homunculus and the owner have more than 50% HP).
- Eraser Cutter (enemy, with random level);
- Silent Breeze (enemy, after duration ends; and any player if its motion is Sit and it's next to Eira AND Eira is idle);
- Xeno Slasher (enemy's position, with random level, when there is more than one enemy attacking, or while in "despair mode").
- Overboost ("despair mode", tries only once as skill use test by SP may fail and Eira may start spamming the skill)
- Sonic Claw (while attacking);
- Tinder Breaker (while attacking or chasing);
I couldn't test the combos myself in the newest version, so I need someone who could tell me if it's working:
- Silvervein Rush and Midnight Frenzy combo (by chance);
- .C.B.C and E.Q.C combo.
- Needle of Paralysis;
- Summon Legion (
the owner's current HP must be high, as a prevention for if one day the bees actually become aggressive to the owner while idle);
- Poison Mist (owner's position, while idle and near player; homunculus' position if away from owner; enemy's position, while attacking);
- Painkiller (used on owner while idle, but only if it's in the skill's range: the homunculus won't move to it to not reveal the owner's position as it might be hiding, for example; and on any player if its motion is Sit and it's next to Sera AND Sera is idle).
1. Homunculus doesn't perform KS.
2. User's guide included (in portuguese, only, but you can use an automatic translator);
3. MVP's list so the homunculus attacks it before its mobs;
4. Homunculus defends the player first when its HP is below of the homunculus'. Then it defends itself. And at last it defends friended players.
5. The homunculus tries to contour obstacles with random positions if it can't move directly to its target which is attacking the owner;
6. The homunculus/mercenary moves a little bit to a random direction between time periods while attacking an enemy to avoid bug position;
7. Anti-lag system limiting the commands per-cycle so the AI doesn't freeze the player during times of large server movimentation (it's not 100% guaranteed to work, and may fail in some of the worst cases);
8. Homunculus tries to move before the user (doesn't work with high speeds);
9. Reserved Move and Reserved Attack Commands' functions changed to use area skills for Eira, Dieter and Sera (as there was a bug in the game, which I don't know if it was corrected or not, in which the homunculus' area skills used the owner's position to calculate range, and not the homunculus itself, so the skills couldn't be used if the player was far away or even hidden, for example). Now, commanding once or twice defines if Dieter uses Volcanic Ash or Lava Slide in the position, or makes Eira use Xeno Slasher or Sera use Poison Mist in different levels (1 or 5).
Some may say my AI doesn't have much to give as it doesn't have a panel. But it's a matter of choice and gameplay. The AI works with me very well in bRO as I don't want to lose time changing options at a panel and then vaporizing and creating the homunculus to test and repeat the process until it works.
I just, for example, use the Standby command twice and it's done, my homunculus will not use any skills until I use Standby command twice again.
Or if I want my homunculus to be aggro to a monster, I only command it to attack and it's configured to do so.
If I want it to chase a player on PvP, it's only an attack command too. And if I want my homunculus to chase no matter the HP, I just keep pressing to attack some times and it's configured, as the minimum HP to attack decreases in 10% each command.
Otherwise, if I want my homunculus to ignore a monster or player, I command it to Move while it's attacking the enemy so it stops attacking. And it raises the minimum HP to be aggressive in 20%.
Edited by ArthurGibraltar, 06 December 2015 - 11:39 AM.