Support OpenKore:
Learn about
the Fund Pool

OpenKore Todo


Contents


Introduction

OpenKore is kept alive by the people who work on it. Without the great work of all the people who have contributed to OpenKore, OpenKore would not be where it is today. Everybody is welcome to contribute to OpenKore, even people who have minimal technical skills!

This wiki page will serve as some sort of a scratchboard as well as a road map for what should be done in the future. If you're interested in contributing to OpenKore, this page will serve as a nice guide to start.

Difficulty level

Each todo item is marked with a "hardness level":

Remember, if you have questions, you can just ask us at the forum or at IRC. We'll be glad to mentor you. :)

Tips


Table files updates

npcs.txt

Level: easy

Instead of a single npcs.txt for an OpenKore folder, a separate npcs.txt can be created prepended by the name of the server (upon the assumption that the npcs do not change their positions relative to the same server; i.e. a kafra in a particular server will remain in the same place no matter what character you are using).

Documentation updates

We need more and better documentation. Specifically, we need the following:

Non-technical documentation

Level: very easy

We need to migrate the FAQs section to the wiki.

Technical documentation and documentation tools

  • We need a document which describes OpenKore's global design.
    Level: easy/medium
  • We should document all the hooks we have. Currently hooks are practically undocumented. For this, we will need to extend our comments-to-HTML program, makedoc.pl (located in src/doc/).
    Level: medium
  • Write a tutorial on converting code from the old AI to the task framework.
    Level: medium
  • The Frequently Asked Questions section needs to be updated with recent FAQs from the boards and the IRC chats.
    Level: easy/medium


Load different table files based on server

Level: easy/medium

Some servers require different table files. For instance, the portals for Hidden Temple seem to be different for each server. Different servers also have different item- and skill names. Thus, it should be possible to specify in servers.txt which table files should be loaded instead of the default ones. For example, suppose we have this entry in servers.txt:

[Hello World Private Server]
ip 123.456.789.10
port 1234
master_version 10
version 20
portals helloworld/portals.txt
portalsLOS helloworld/portalsLOS.txt
items helloworld/items.txt

This will, for instance, make OpenKore load 'tables/helloworld/portals.txt' (instead of 'tables/portals.txt') when it connects to Hello World Private Server (but not when it connects to, say, Philippines RO).

Refactoring

New AI

New AI design

Level: hard

The current AI design is kinda old and is showing its limitation. Please see AI subsystem and task framework overview for a discussion on the proposed new AI design.

Rewrite attack AI

Level: medium

The attack AI is very old and contains a lot of cruft. It also uses a lot of CPU. People say that OpenKore "drunk dances" when attacking aggressive monsters. The attack AI should be rewritten to use less CPU and to be more reliable. Currently the relies a lot on polling to check for changed conditions. It should be more event-based, by using plugin hooks for detecting environment changes.

The new attack AI should be based on the new task framework.

Automated storage, selling, and buying sequences

Level: medium

Currently the sequence is: buy, store, sell. Sometimes this sequence doesn't make sense, since the Kafra and the Tool Dealer may be on separate locations (or even on separate maps). This should be fixed.

The new storage/selling/buying routines should be based on the new task framework. Each of those should be its own separate task. That is, we should have one task that's specialized in putting things in storage, one task that's specialized in selling, and one task that's specialized in buying. Then a high-level task should be written which combines all of these together.

Homunculus classification

Level: easy/medium

Homunculus are currently classified as players (so that Kore would not attack it and in order to prevent kill stealing). However, as Homunculus become more and more specialized, it makes more sense to classify them into a separate category. These things must be done:

  • Introduce a $homunculusList ActorList object that maintains a list of homunculus on screen, similar to $playersList and $monstersList.
  • Change the network handling code to use the Actor::Homunculus class to represent a Homunculus, similar to how Actor::Player and Actor::Monster are currently used.
  • The attack AI and damage tables update function must be modified to correctly handle homunculus attacks.

Revamp of functions.pl

Level: medium

functions.pl exists because of historical reasons. It doesn't really have a well-defined purpose, and just contains a collection of various functions. What we need to do is to move those functions to other modules, where it makes sense. Also, we need some kind of "Core" module which will model OpenKore's "core", the thing that glues everything together.

To help those who would like to model OpenKore, here is what functions.pl contains:

  • All connection state specific stuff (referred to in-code as constates)
  • Initialization and maintenance of IPC connections
  • Parse RO client send messages (during XKore mode)
  • Some received packet handling (those that cannot be handled purely by the packet parser)
  • Housekeeping

XML config files

Level: easy

Comment by VCL: do we really want this? What's wrong with the current format?

Have OpenKore use either the (current) text format or a new, XML based format.

Example:
<buyAuto>

   <item="Meat">
       <npc>izlude 105 99</npc>
       <distance>5</distance>
       <amount>
           <min>1</min>
           <max>75</max>
       </amount>
       <zeny></zeny>
   </item>
   <item="Fly Wing">
       <npc>prt_fild05 190 221</npc>
       <distance>7</distance>
       <amount>
           <min>3</min>
           <max>100</max>
       </amount>
   </item>
</buyAuto>

This concept isn't confined to just Config.txt however; this can also be used for some table files such as npcs.txt or any other table file that doesn't depend on RO's data.grf text files (such as items.txt).

Along with this, a separate parser would have to be developed, and maybe even a built-in config editor.

Plugins

Monk Combo plugin

Currently autoCombo seems to have many problems regarding its success rate. From inspection of the packet patterns, it looks like you receive the status of Triple Attack Delay more than once. For example, if you have Triple Attack as well as Quad Blows, you will receive the Delay packet once for the Triple Attack, then again for the Quad Blows (and if you actually did Quad Blows, you'll receive yet anothe delay packet for Raging Thrust).

The problem would seem to be that OpenKore calculates the combo delay from the *first* combo packet. However, it can be inferred from the above that it should have actually computed the delay from the second packet. Computing from the first packet is very imprecise, since both network as well as server lag would contribute to the failure.

Instead of having You are again: Triple Attack Delay it might be better to stack them up and say You are now: Triple Attack Delay (1) for the first packet, then You are now: Triple Attack Delay (2) for the second packet, and so on. This way we can do a waitBeforeUse $char->{combo_delay} together with whenStatusActive Triple Attack Delay (2)

The following is a log while spamming the Chain Combo hotkey in XKore:

 Skill Chain Combo failed (Requirement)
 Skill Chain Combo failed (Requirement)
 You are now: Triple Attack Delay
 You have combo delay 884
 [ 95/ 64] You use Triple Attack (lvl 5) on Monster *** (0) - Dmg: 270 (delay 29.7)
 Skill Chain Combo failed (Requirement)
 Skill Chain Combo failed (Requirement)
 [ 95/ 64] Monster Argiope (0) attacks You - Dmg: Miss! (delay 79.2)
 Skill Chain Combo failed (Requirement)
 Skill Chain Combo failed (Requirement)
 You are again: Triple Attack Delay
 You are no longer: Triple Attack Delay
 You are now: Triple Attack Delay
 You have combo delay 584
 [ 95/ 62] You use Chain Combo (lvl 3) on Monster *** (0) - Dmg: 332 (delay 29.7)
 Skill Chain Combo failed (Requirement)
 Skill Chain Combo failed (Requirement)

As can be seen above, the Chain Combo is only succesful after the second Triple Attack Delay packet is received.

One other way about this is to spam the combo packet ... but that of course is inefficient and not really elegant.