Jump to content
  • 0

C/C++ Magic Anvil OpenKO Proje


Dr.Lynx
 Share

Go to solution Solved by twostars,

Question

6 answers to this question

Recommended Posts

  • 0
  • Solution
Posted (edited)
13 hours ago, Dr.Lynx said:

I meant to ask, what do I need to do to make the Upgrade or Magic Anvil work?

The CUIUpgradeSelect (menu), CUIItemUpgrade (item upgrades) & CUIRingUpgrade (accessory upgrades) UI classes need implementing. They don't exist in the source at all.
That includes all (client-side) packet handling for upgrades.

The accompanying server should handle it already.

Edit:
I implemented CUIUpgradeSelect (the menu):

Hidden Content

    Give reaction to this post to see the hidden content.

Server's a bit iffy since the upgrade behaviour looks very hacked from the officially reversed implementation I originally had for it years ago, so I can't speak much to that, but from the client's side that leaves implementation of the main upgrade UIs (that actually do things other than just displaying a very simple menu to open other UIs).

You can, however, use that as a very rough idea as to what's involved. Just consider that it needs to do so much more, e.g.:
Load the many, many controls those UIs use,
Selectively hide/show the right controls.
Manage the inventory slots accordingly (this UI copies them from the inventory rather than some of the other UIs that straight up moves them).
Handle the upgrade animation itself (as part of selectively hiding/showing the right controls) with the "cover" controls.
Handle the upgrade packets which tell it whether or not it upgraded successfully or burned, and handle appropriately (showing the message, triggering the appropriate upgrade animation).
etc.

Fun!

Edited by twostars
  • Like 14
  • Thanks 1
  • Love 1
  • Ouch 1
Link to comment
Share on other sites

  • 0
14 hours ago, Dr.Lynx said:

magic anvil is not working it is not in the table SQL where does it get it from openko is in the proje ?

Are you reporting a bug with the OpenKO project? If so, please use their GitHub issue tracker; otherwise, provide more details so we can help.

Link to comment
Share on other sites

  • 0

The Magic Anvil system is not working in the Openko project. It seems to be dependent on x and z within the .opd file. This object cannot be removed, and to activate it, I added the necessary entries into the database table. How can I activate the upgrade, or what steps should I follow?

 

I emptied the tables one by one, but it still doesn't go away. It's related to the .opd file, but when I delete it from other sources, such as K_OBJECTPOS, it disappears.

 

image.thumb.png.5298bd9107b5cbb1899c3f492e7b7bc8.png

Link to comment
Share on other sites

  • 0

It's a little unclear what your specific problem here is.
Are you trying to open the upgrade UI? There is no such UI implemented in the client, so that's not going to work.

The UI it would officially show is CUIUpgradeSelect, and then CUIItemUpgrade or CUIRingUpgrade depending on if you selected item upgrades or accessories.
None of these UIs are implemented.

As far as the spawn behaviour goes, you're describing somewhat unofficial behaviour. The K_OBJECTPOS table in general is unofficial; officially it's attached via the server's map file (.SMD).
This effectively is what was unofficially moved to K_OBJECTPOS. OpenKO's server doesn't use it (I don't think I was the one that removed it, it was probably already disabled by bitshift and I just removed the remaining refs to it).

Regardless, while that spawns the NPC, it still attaches itself to the object that always exists in the client (as loaded from its .OPD file).

The main behavioural difference here from what you're describing may be that the object is loaded as visible by default, while officially, some objects (such as this) are hidden by default and only marked as visible when they're attached by an NPC.

Client source projects like this require a lot of work. There are a lot of things just like upgrades that aren't implemented here whatsoever, or are flat out outdated (e.g. how animations work). A lot of time and effort is needed to be invested in this or any project to get them anywhere near usable.

Edited by twostars
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...