A packet reader to support AIs?

All non-related to RO or OpenKore goes here. Enter at your own risk.

Moderator: Moderators

Message
Author
Darki
Been there done that!
Been there done that!
Posts: 143
Joined: 25 Oct 2008, 08:14
Noob?: No
Location: Spain, Madrid
Contact:

A packet reader to support AIs?

#1 Post by Darki »

I've been developing an AI for my homúnculus on iRO and something I noticed is the really poor support the built-in engine has in terms of data sent to the AI so we can work with it. You can't even know the map you're in or if you missed a hit, and it's really annoying specially because most of the information required that would make the AI easier to manage is shown on screen for us.

How difficult would be to create a simple program to read the packets sent between server ans client (much like OK does), to create a little text file that the AI could check for that data? I was thinking about this after using OK and seeing some programs like RCK that are even admitted by oficial mods, and it would be possible to give it a try.

Unfortunately I have no idea about how would this be done because my knowledge in programming is really limited, so before trying anything I'd love to see some opinions from people who know. What do you think?
ImageImageImage
ImageImageImage
ImageImageImage

EternalHarvest
Developers
Developers
Posts: 1798
Joined: 05 Dec 2008, 05:42
Noob?: Yes

Re: A packet reader to support AIs?

#2 Post by EternalHarvest »

Darki wrote:read the packets sent between server ans client (much like OK does)
It's the same as OK with XKore, it may be used for that (or maybe its library with some other program).

Darki
Been there done that!
Been there done that!
Posts: 143
Joined: 25 Oct 2008, 08:14
Noob?: No
Location: Spain, Madrid
Contact:

Re: A packet reader to support AIs?

#3 Post by Darki »

well, using OK to do that seems a bit excesive as all we would need is to get some information.

The info I'm thinking about now would be for example complete identification of actors as AI is a bit crap at that, you can identify between monsters, but for example you can't identify if an actor is an NPC, another homunculus or a mercenary (and mercenaries can't even identify between monsters). Is impossible for example afaik to identify a homunculus from a mercenary, and that is crap for tactic-based target checks. Also it would be great to get party and/or guild affiliations, mainly because AI can't know who is in your party or guild so it's almost impossible to make it run in WoEs well. Itt wouldn't hurt if you could get the names of the players/AIs too so you don't need to work with their IDs, as they're hard to get.

Combat-wise, it would be nice to know when you hit the monster, how much damage you do, and also when the hit lands or misses, and also the same info in reverse: How many hits you received and how many of them landed or missed you. This might not be very useful for me know as I don't need those checks in my AI but it would be great, for example, to know when a skill had effect (for example if you're actually under the effect of a self-buff, or if that Caprice you shot at that Marin missed because it was water-element), and to know if a skill is in cooldown/delay state. There could be used info for when you're under a SE, but as you can't throw healing skills other than Aid Potion to homunculus, it wouldn't be that useful (just to know if you're frozen so you can't move and stuff like that).

The same could be applied to the owner, for example, so the homunculus can act to help better or maybe coordinate damages for max exp.

And field-wise, it would be awesome to know in what map you are, to get if a certain square is walkable, and to know if a field is under PvP mode so you can attack-be attacked-by players.

Then, that info could be implemented in the commands for the AI somehow but I'm sure that this would be too much for Gs to tolerate. But making it to give as an output a text file that the AI could read wouldn't be too bad.

So, would a program to do this hard to make?
ImageImageImage
ImageImageImage
ImageImageImage

EternalHarvest
Developers
Developers
Posts: 1798
Joined: 05 Dec 2008, 05:42
Noob?: Yes

Re: A packet reader to support AIs?

#4 Post by EternalHarvest »

The things you're talking about in second post aren't really related to just intercepting packets, that's more like parsing them to get environment information.

For intercepting packets there are many ways, you can make a plugin for Ragnarok Online Plugin System, or use OpenKore's netredirect.dll and make a server it would connect to like XKore 1 does.

For parsing these packets, OpenKore can be used as a documentation, or, if you're in Perl, you can just import serverType modules and use structures they contain.
text file that the AI could read
But it's doubtful Gravity's crippled Lua would allow you to do that.

Post Reply